Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor rs-e2e project to remove Hapi HL7 library #1654

Open
wants to merge 65 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
347c87c
WIP: refactored to remove hapi hl7 library
basiliskus Dec 12, 2024
8fd2209
Moved files to more appropiate location
basiliskus Dec 12, 2024
600cbd9
Update HL7MessageTest.groovy
luis-pabon-tf Dec 12, 2024
ad70a59
Merge branch 'story/1532/remove-hapi-hl7-lib' of https://github.com/C…
luis-pabon-tf Dec 12, 2024
d78067b
Accounting for edge cases
basiliskus Dec 12, 2024
95cfd1d
Made class with static methods static
basiliskus Dec 12, 2024
d0d73b2
Improved delimiter handling and added test assertions
basiliskus Dec 12, 2024
245f572
Handling additional edge case
basiliskus Dec 12, 2024
b78bbaf
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 12, 2024
d18a563
Update HL7MessageTest.groovy
luis-pabon-tf Dec 12, 2024
47a7030
Improved encoding character handling to use defaults and move to HL7P…
basiliskus Dec 12, 2024
d16b7e5
Update HapiHL7ExpressionEvaluatorTest.groovy
luis-pabon-tf Dec 12, 2024
d29df3a
Extracted parsing logic to HL7Parser
basiliskus Dec 13, 2024
69e45cb
Added method to return string of message and fixed a couple of tests
basiliskus Dec 13, 2024
97d9196
Moved flies from /external/hapi folder to /hl7 folder
basiliskus Dec 13, 2024
3968569
Renamed files to remove Hapi prefix
basiliskus Dec 13, 2024
1168d01
Renamed files to remove Hapi prefix
basiliskus Dec 13, 2024
e123db1
Replaced magic strings
basiliskus Dec 13, 2024
6db46de
Update HL7Message.java
luis-pabon-tf Dec 13, 2024
c3c1223
Update HL7ExpressionEvaluator.java
luis-pabon-tf Dec 13, 2024
6c704cf
Updating tests and some cleanup
luis-pabon-tf Dec 13, 2024
de65a59
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 13, 2024
527dc53
Update HL7ExpressionEvaluator.java
luis-pabon-tf Dec 13, 2024
0350cbd
Update HL7ExpressionEvaluatorTest.groovy
luis-pabon-tf Dec 13, 2024
a1381ef
Refactored for HL7ExpressionEvaluator to use the new parser and remov…
basiliskus Dec 13, 2024
362ca7a
Update HL7ExpressionEvaluatorTest.groovy
luis-pabon-tf Dec 13, 2024
07b2aa4
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 13, 2024
031b66c
Fixed test + cleanup
basiliskus Dec 13, 2024
b4380a6
Fixed a couple of issues in HL7Message and refactored to extract segm…
basiliskus Dec 16, 2024
acafb51
Fixed HL7MessageTest tests
basiliskus Dec 17, 2024
8371cc3
Added HL7MessageException, improved error handling in HL7Message, ref…
basiliskus Dec 17, 2024
4b278aa
Update HL7FileMatcherTest.groovy
luis-pabon-tf Dec 17, 2024
8666d1f
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 17, 2024
ea1d47f
Added test cobverage for HL7Message and fixed parsing issue
basiliskus Dec 17, 2024
336a6f1
Merge branch 'story/1532/remove-hapi-hl7-lib' of github.com:CDCgov/tr…
basiliskus Dec 17, 2024
f4290aa
Add more HL7Parser coverage
luis-pabon-tf Dec 17, 2024
bc6e64e
Added test coverage for HL7ParserTest
basiliskus Dec 17, 2024
b73037b
Removed unused HL7Segment.getIndex
basiliskus Dec 17, 2024
2a157a7
Completed HL7Parser coverage
luis-pabon-tf Dec 17, 2024
3f8acfe
Merge branch 'story/1532/remove-hapi-hl7-lib' of https://github.com/C…
luis-pabon-tf Dec 17, 2024
01bf3c1
Removed gradle dependency to the hapi library and removed last few me…
basiliskus Dec 17, 2024
a7c1532
Added test coverage and changed exception type
basiliskus Dec 18, 2024
aabbb4d
Fixed a couple of issues brought up by sonar
basiliskus Dec 18, 2024
cbe5508
Replacing IllegalArgumentException with HL7ParserException custom exc…
basiliskus Dec 18, 2024
3e8ae35
Changed parser behaviour to return an empty string instead of null wh…
basiliskus Dec 18, 2024
cbf9762
Added a not to the readme about returning an empty string when value …
basiliskus Dec 18, 2024
0d9b31d
Added javadocs
basiliskus Dec 18, 2024
733a48c
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 18, 2024
d92bca1
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 19, 2024
9b7f2e2
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 19, 2024
d34f1ba
Refactored for better separation of concerns. Created HL7Path and HL7…
basiliskus Dec 20, 2024
38556b6
Fixed tests, added test coverage and some more refactoring
basiliskus Dec 20, 2024
7770998
Fixed a few more tests. A couple more to go
basiliskus Dec 20, 2024
b64eca5
Added javadocs
basiliskus Dec 23, 2024
fe296f6
Updated edge case handling and fixed test
basiliskus Dec 23, 2024
eaadd34
Merge branch 'main' into story/1532/remove-hapi-hl7-lib
luis-pabon-tf Dec 23, 2024
e74266f
Fixed remaining test
basiliskus Dec 23, 2024
b845dcd
Removed unnecessary logic
basiliskus Dec 23, 2024
12ee956
Override equals method in HL7Path to address issue raised by SonarCloud
basiliskus Dec 23, 2024
c157395
Need to override hashCode and toString as well
basiliskus Dec 23, 2024
c524996
Added test coverage for new methods
basiliskus Dec 23, 2024
e350ce1
Moved logic in HL7Parser.parseMessageFieldValue to HL7Message.getValu…
basiliskus Dec 23, 2024
466c3f4
Moved logic in HL7Parser.parsePath to HL7Path.parse to avoid circular…
basiliskus Dec 23, 2024
4c0a923
Removed HL7Parser and moved message parsing logic to HL7Message to av…
basiliskus Dec 23, 2024
905fa8d
Fixed equals overload logic
basiliskus Dec 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rs-e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Information on how to set up the sample files evaluated by the tests can be foun

- The output files generated by the framework are stored in an Azure blob storage container. Every time the tests are run, a cleanup task moves the files to a folder with the year/month/day format for better organization. The files are retained in the container for 90 days before being deleted
- The code that organizes the files is using EST time zone. This means that if you are in PST, you may run into an issue if you submit a run before 9 PM PST and then run the tests after 9pm. You'd need to make sure to run both tasks before or after 9pm so the files are where they are expected to be
- The HL7 parser and expression evaluator returns an empty string when the value is not found. It will only throw an exception if the path is not a valid HL7 notation

## Running the tests

Expand Down
4 changes: 0 additions & 4 deletions rs-e2e/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ dependencies {
// azure
implementation 'com.azure:azure-storage-blob:12.29.0'

// hapi hl7
implementation 'ca.uhn.hapi:hapi-base:2.5.1'
implementation 'ca.uhn.hapi:hapi-structures-v251:2.5.1'

testImplementation 'org.apache.groovy:groovy:4.0.24'
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gov.hhs.cdc.trustedintermediary.rse2e;

import gov.hhs.cdc.trustedintermediary.rse2e.hl7.HL7FileStream;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package gov.hhs.cdc.trustedintermediary.rse2e;
package gov.hhs.cdc.trustedintermediary.rse2e.external.azure;

import com.azure.storage.blob.BlobClient;
import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.BlobContainerClientBuilder;
import com.azure.storage.blob.models.BlobItem;
import com.azure.storage.blob.models.ListBlobsOptions;
import gov.hhs.cdc.trustedintermediary.rse2e.FileFetcher;
import gov.hhs.cdc.trustedintermediary.rse2e.hl7.HL7FileStream;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZoneOffset;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gov.hhs.cdc.trustedintermediary.rse2e;
package gov.hhs.cdc.trustedintermediary.rse2e.external.azure;

import java.time.LocalDate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package gov.hhs.cdc.trustedintermediary.rse2e;
package gov.hhs.cdc.trustedintermediary.rse2e.external.azure;

import com.azure.storage.blob.BlobClient;
import com.azure.storage.blob.BlobContainerClient;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading