Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RS Integration Tests in Staging (#1293)
* Added new module rs-e2e for RS Integration Tests in Staging * Added initial implementation to pull files from Azure storage container * Added local file fecther, hl7 file matcher, and first test assertion on matched files Co-authored-by: Sylvie <[email protected]> * Cleaned up and simplified logic * Clean up: remove comment * start copying rule engine stuff from etor project Co-Authored-By: Basilio Bogado <[email protected]> * first draft of assertions Co-Authored-By: Basilio Bogado <[email protected]> * Renamed 'transformation' to 'assertion', plus some cleanup * Some more refatoring to adapt the transformation engine to be used for HL7 assertions * Turned arrays in definitions into key value pairs * Updated the assertion definitions to use new syntax and added initial implementation for the hl7 expression evaluator Co-authored-by: Sylvie <[email protected]> * Further implementation for the hl7 expression validator. Got a test expression working for equal comparison between hl7 field and a literal value Co-authored-by: Sylvie <[email protected]> * Cleanup * Some refactoring and cleanup for parseAndEvaluate * Added implementation for evaluateMembership and removed Optional return value Co-authored-by: Sylvie <[email protected]> * Added method to evaluate count operation + cleanup * Use both input and output messages, add a few more statements to test Co-Authored-By: Basilio Bogado <[email protected]> * Start making AssertionRuleEngine work and some associated cleanup Co-Authored-By: Basilio Bogado <[email protected]> * Start using the rules file, doing a little cleanup and troubleshooting Co-Authored-By: Basilio Bogado <[email protected]> * Fixed loading of the definitions file and dependency injection * Fixed null pointer exception. All test assertions are now passing * Added missing assertion * Added missing catch of NumberFormatException * Trying to fix issue with sonar * Added HL7FileStream record to be able to later log the file name Co-authored-by: Sylvie <[email protected]> * Refactored, added logging and fixed dependency injection Co-authored-by: Sylvie <[email protected]> * Added unit tests for the asserion rules engine Co-authored-by: Sylvie <[email protected]> * Catched missing exceptions Co-authored-by: Sylvie <[email protected]> * Refactored to use singleton pattern and dependency injection system for consistency Co-authored-by: Sylvie <[email protected]> * Refactored to reduce code duplication and merge rule engine framework Co-authored-by: Sylvie <[email protected]> * Further refactoring to abstract and reduce code duplication among rule engine frameworks. Still pending to integrate the transformation and validation rule engines to use the new classes Co-authored-by: Sylvie <[email protected]> * Further refactoring to integrate the transformation and validation rule engines to use the new classes Co-authored-by: Sylvie <[email protected]> * Fixed tests in rs-e2e + cleanup * Refactoring to improve null handling * Added test cobverafe for HapiHL7ExpressionEvaluator and HapiHL7FileMatcher Co-authored-by: Sylvie <[email protected]> * Cleanup and move class to appropiate location * Added some of the remaining test coverage * Added test coverage * Updated assertion definitions Co-authored-by: Sylvie <[email protected]> * Added sample file to test UCSD transformations Co-authored-by: Sylvie <[email protected]> * Updated message to avoid sending to ucsd Co-authored-by: Sylvie <[email protected]> * Fixed arguments order Co-authored-by: Sylvie <[email protected]> * Implemented a simple HL7 parser given we can't get what we need from the Hapi library * Added missing error handling * Removed unused code and fixed failing tests Co-authored-by: Sylvie <[email protected]> * Added unit tests in rs-e2e to the allUnitTests task Co-authored-by: Sylvie <[email protected]> * Fixed regex Co-authored-by: Sylvie <[email protected]> * Added github workflow to run the automated test Co-authored-by: Sylvie <[email protected]> * CHanged one assertion to fail to test the workflow Co-authored-by: Sylvie <[email protected]> * Tests are still passing in the PR. Trying something else Co-authored-by: Sylvie <[email protected]> * Updated MSH-10 ids for sample messages + cleanup Co-authored-by: Sylvie <[email protected]> * Need more output from log to get information about the reason for test failure * Way too much output in the logs with --info * Reverted the change to make test fail and updated cron job to run 2 hours after the staging flow run * Removed pull_request trigger used for testing * Add additional test coverage * Added missing javadocs + cleanup * Fixed merge conflicts * Renamed 'result' to 'ORU' to avoid confusion * Moved HapiHL7FileMatcher and HL7FileStream to rs-e2e project given they are not used outside of this project * Updated to follow convention * Explicitly use UTF-8 charset * Move injections before public methods * Updated language to capture what is really the issue here * Simplified logic * Set all patterns as private static final * Missed one Pattern * Changed ArrayList for Set, which is more appropiate in this case * Moved HapiHL7ExpressionEvaluator and HapiHL7Message to rs-e2e project * Added back JavaDocs * Avoid code duplication * Need to keep inputstream open until used * Added readme files for the rs-e2e project and the sample files Co-authored-by: Sylvie <[email protected]> * Added ADRs for the assertion engine and the automated rs integration test. Some more work to be done on the integration test one Co-authored-by: Sylvie <[email protected]> * Added integration test section in the main readme Co-authored-by: Sylvie <[email protected]> * Fixed merge conflicts * Added a couple more assertions for UCSD transformations * Added more to the integration test ADR. Still some more pending Co-authored-by: Sylvie <[email protected]> * Update shared/src/test/groovy/gov/hhs/cdc/trustedintermediary/wrappers/HealthDataTest.groovy Co-authored-by: Jorge Lopez <[email protected]> * More updates to ADR * Renamed readme.md => README.MD for consistency and changed urls to use relative path from the root of the repo * Missed on last commit * Formatting * Added a few more impact points * Capitalized file extenesion by mistake * Trying to update file extension capitalization * Trying to get git to catch the file extension capitalization * Reverting workaround to get git to catch the file extension capitalization --------- Co-authored-by: Sylvie <[email protected]> Co-authored-by: Jorge Lopez <[email protected]>
- Loading branch information