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

Add Golden Copy Tests #1674

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
07b96d1
WIP Initial setup
jherrflexion Dec 16, 2024
2d14e9a
add notes for later and initial setup/cleanup
pluckyswan Dec 16, 2024
f8afd54
Added basic compare
jherrflexion Dec 17, 2024
dad2cd3
Testing workflow dispatch
jherrflexion Dec 17, 2024
1d8877c
Aded Golden tests to gradle
jherrflexion Dec 17, 2024
9b81688
Adding Golden tests to Workflows
jherrflexion Dec 17, 2024
d4867f7
Added fetch parameter
jherrflexion Dec 17, 2024
87dbc14
Removed comments
jherrflexion Dec 17, 2024
5bef9f0
add input files and delete unused input files
pluckyswan Dec 18, 2024
83edb87
refactor file fetcher and implementation
pluckyswan Dec 18, 2024
084387d
refactor file fetcher calls
pluckyswan Dec 18, 2024
1e49731
add env to workflow and rename file path
pluckyswan Dec 18, 2024
3de1187
modify example files to be aligned with readme reqs
pluckyswan Dec 19, 2024
ebe7a46
move directory up one and fix file paths
pluckyswan Dec 19, 2024
9605cc1
move golden copy to automated to get files after transformed
pluckyswan Dec 19, 2024
f63c56c
use correct syntax
pluckyswan Dec 19, 2024
de61fb5
make variables strings
pluckyswan Dec 19, 2024
96cae6c
add dollar sign to echo
pluckyswan Dec 19, 2024
e17f1e9
try fixing format
pluckyswan Dec 19, 2024
0747ee8
change syntax
pluckyswan Dec 19, 2024
bdbed53
remove line break at end of line in example files
pluckyswan Dec 19, 2024
71a243d
add double quotes to if statement
pluckyswan Dec 19, 2024
24e5ac3
add golden copy versions of example files and revert to og directory …
pluckyswan Dec 19, 2024
401c50f
modify msh-10 header in example file
pluckyswan Dec 19, 2024
229af63
fix syntax
pluckyswan Dec 19, 2024
9485cda
remove breaks from example file
pluckyswan Dec 19, 2024
3c850de
add example file
pluckyswan Dec 19, 2024
1f0dde2
remove comment, add quotes to variable, and create workflow file
pluckyswan Dec 19, 2024
d7623ae
remove done
pluckyswan Dec 19, 2024
92c039c
remove unused workflow
pluckyswan Dec 19, 2024
f29edc1
add id to workflow step
pluckyswan Dec 19, 2024
5b648b7
separate workflows and update readme
pluckyswan Dec 19, 2024
7b545da
add notes on next steps
pluckyswan Dec 20, 2024
ccca6ab
stub out filter for organizing and fetching azure files
pluckyswan Dec 20, 2024
6873446
modify filter for file paths
pluckyswan Dec 23, 2024
9fbe6fa
update readme and file examples base on filter for new receiver
pluckyswan Dec 23, 2024
885cd21
fix uses pathing
pluckyswan Dec 23, 2024
bc83820
fix uses pathing
pluckyswan Dec 23, 2024
cf0489f
add workflow dispatch
pluckyswan Dec 23, 2024
91371ae
combine submit workflows into one and update readmes
pluckyswan Dec 23, 2024
000d590
delete unused workflow
pluckyswan Dec 23, 2024
06558f7
rename reusable workflow
pluckyswan Dec 23, 2024
0fba3fb
readd the og workflow and delete new one
pluckyswan Dec 23, 2024
a9cf564
move folders around
pluckyswan Dec 23, 2024
7a13855
fix file changes
pluckyswan Dec 23, 2024
8ca3337
change file path
pluckyswan Dec 23, 2024
5086197
remove semi colon
pluckyswan Dec 23, 2024
85b11b6
mess with pathing regex
pluckyswan Dec 23, 2024
17a5382
correct naming in workflow
pluckyswan Dec 24, 2024
77d9c71
use correct inputs syntax
pluckyswan Dec 24, 2024
b67cd88
workflow fixes
pluckyswan Dec 24, 2024
7143562
pass secrets to workflow
pluckyswan Dec 24, 2024
c87d402
fix file path and exclude from test
pluckyswan Dec 24, 2024
e6e7fbd
remove incorrect expected files and replace input files
pluckyswan Dec 24, 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
27 changes: 7 additions & 20 deletions .github/workflows/automated-staging-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,10 @@ on:
workflow_dispatch:

jobs:
test_files:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Run automated tests
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AUTOMATED_TEST_AZURE_STORAGE_CONNECTION_STRING }}
run: ./gradlew rs-e2e:clean rs-e2e:automatedTest

- name: Send slack notification on test failure
if: failure()
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "Automated Staging RS Integration Test Failed!: https://github.com/CDCgov/trusted-intermediary/actions/runs/${{ github.run_id }}"
call-staging-test-run:
uses: ./.github/workflows/staging-test-run_reusable.yml
with:
FILE_PATH: '../examples/Test/Automated/Assertion/'
NAME: 'Automated'
TEST_TYPE: 'automatedTest'
secrets: inherit # pragma: allowlist secret
57 changes: 29 additions & 28 deletions .github/workflows/automated-staging-test-submit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:

- name: Install jwt-cli
run: |
curl --silent --location https://github.com/mike-engel/jwt-cli/releases/latest/download/jwt-linux.tar.gz | tar xvz -C /usr/local/bin/
sudo chmod +x /usr/local/bin/jwt
curl --silent --location https://github.com/mike-engel/jwt-cli/releases/latest/download/jwt-linux.tar.gz | tar xvz -C /usr/local/bin/
sudo chmod +x /usr/local/bin/jwt

- name: Write private key to file
run: |
Expand All @@ -28,32 +28,33 @@ jobs:

- name: Send HL7 sample messages to staging RS
run: |
host=https://staging.prime.cdc.gov:443
client_id=flexion
client_sender=simulated-sender
jwt=$(jwt encode --exp='+5min' --jti $(uuidgen) --alg RS256 \
-k $client_id.$client_sender -i $client_id.$client_sender \
-s $client_id.$client_sender -a $host --no-iat -S @/tmp/staging_private_key.pem)

token=$(curl \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "scope=$client_id.*.report" \
--data "client_assertion=$jwt" \
--data "client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" \
--data "grant_type=client_credentials" \
--silent \
"$host/api/token" | jq -r ".access_token")

for file in $(pwd)/examples/Test/Automated/*.hl7; do
echo "Sending $file"
curl \
--header "Content-Type: application/hl7-v2" \
--header "Client: $client_id.$client_sender" \
--header "Authorization: Bearer $token" \
--data-binary "@$file" \
--silent \
"$host/api/waters"
done
shopt -s globstar
host=https://staging.prime.cdc.gov:443
client_id=flexion
client_sender=simulated-sender
jwt=$(jwt encode --exp='+5min' --jti $(uuidgen) --alg RS256 \
-k $client_id.$client_sender -i $client_id.$client_sender \
-s $client_id.$client_sender -a $host --no-iat -S @/tmp/staging_private_key.pem)

token=$(curl \
--header "Content-Type: application/x-www-form-urlencoded" \
--data "scope=$client_id.*.report" \
--data "client_assertion=$jwt" \
--data "client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" \
--data "grant_type=client_credentials" \
--silent \
"$host/api/token" | jq -r ".access_token")

for file in $(pwd)/examples/Test/Automated/**/*.hl7; do
echo "Sending $file"
curl \
--header "Content-Type: application/hl7-v2" \
--header "Client: $client_id.$client_sender" \
--header "Authorization: Bearer $token" \
--data-binary "@$file" \
--silent \
"$host/api/waters"
done

- name: Clean up private key
if: always()
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/golden-copy-staging-test-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Golden Copy Staging Test - Run integration tests

on:
schedule:
- cron: "10 7 * * 2-6" # Tuesday to Saturday at 2am EST (7:10am UTC) - two hours after `automated-staging-test-submit` runs
workflow_dispatch:

jobs:
call-staging-test-run:
uses: ./.github/workflows/staging-test-run_reusable.yml
with:
FILE_PATH: '../examples/Test/Automated/GoldenCopy/Expected/'
NAME: 'Golden Copy'
TEST_TYPE: 'goldenCopyTest'
secrets: inherit # pragma: allowlist secret
49 changes: 49 additions & 0 deletions .github/workflows/staging-test-run_reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Staging Test - Run integration tests

on:
workflow_call:
inputs:
TEST_TYPE:
type: string
description: The e2e test to run
required: true
default: 'automatedTest'
NAME:
type: string
description: The name of test
required: true
default: 'Automated'
FILE_PATH:
type: string
description: The path to local files
required: true
default: '../examples/Test/Automated/Assertion/'
secrets:
AUTOMATED_TEST_AZURE_STORAGE_CONNECTION_STRING:
required: true
SLACK_WEBHOOK_URL:
required: true

jobs:
test_files:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Run automated tests
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AUTOMATED_TEST_AZURE_STORAGE_CONNECTION_STRING }}
LOCAL_FILE_PATH: ${{ inputs.FILE_PATH }}
run: |
./gradlew rs-e2e:clean rs-e2e:${{ inputs.TEST_TYPE }}

- name: Send slack notification on test failure
if: failure()
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "${{ inputs.NAME }} Staging RS Integration Test Failed!: https://github.com/CDCgov/trusted-intermediary/actions/runs/${{ github.run_id }}"

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MSH|^~\&|GOLDEN-COPY|SISGDSP|SISHIERECEIVER^11903029^L,M,N|^automated-staging-test-receiver-id^L,M,N|20241206093739||ORU^R01^ORU_R01|008|N|2.5.1PID|1||80015955^^^&NPI^MR||INTERFACE^BOY A CDPHONE^^^^^B||202411180830|M||2131-1^Other Race||||||||||||UNK^Unknown||Y|1NK1|1|INTERFACE^CDPHONE|MTH^Mother|456 ST^^SAN DIEGO^CA^92123^USA|^^^^^858^2490016|||||||||||19921118ORC|RE|7902698491^FormNumber||^HospOrdNumber||||||||1427255868^JOHNSON^KATHRYN^^^^^^^^^^NPI|||||||||^^^^^^^^^R797|AG N 005EVA DLEIFR, F N 0037TERTS ONSER^^SAN DIEGO^CA^99999-9999OBR|1|7902698491^FormNumber||54089-8^NB Screen Panel Patient AHIC|||202411021023|||||||202411031023||||||||20241206093739|||FOBR|2|7902698491^FormNumber||57128-1^Newborn Screening Report summary panel|||202411021023|||||||202411031023||||||||20241206093739|||FOBX|1|TX|57724-7^Newborn screening short narrative summary^LN|1|ACTION REQUIRED\.br\\.br\Testing Lab - Quest \R\ S W 0094DVLB TESNU, SAN JUAN CAPISTRANO, CA 99999-9999\.br\\.br\Lab Director - Daisydoublek Toulousep, MD,PhD, Quest, (491)154-5445\.br\\.br\SCID Reviewer - Meadowsaffronpa Maxrm\.br\\.br\Lab Remarks: CD3/CD8/CD45RO, Percent:This test was developed and its analytical performance characteristics have been determined by Quest Diagnostics Nichols Institute San Juan Capistrano. It has not been cleared or approved by FDA. This assay has been validated pursuant to the CLIA regulations and is used for clinical purposes. \.br\\.br\Follow-up:\.br\\.br\Clinical Reviewer Comments: Testing\.br\\.br\Follow-up Recommendation: Refer to CCS-approved Immunology Center\.br\\.br\Disclaimer:\.br\\.br\This test was developed and its performance characteristics have been determined by Quest Diagnostics Nichols Institute, San Juan Capistrano. It has not been cleared or approved by the U.S. Food and Drug Administration. The FDA has determined that such clearance or approval is not necessary. Performance characteristics refer to the analytical performance of the test. \.br\\.br\|||N|||F|||20241206093739OBR|3|7902698491^FormNumber||57717-1^Newborn screen card data panel|||202411021023|||||||202411031023||||||||20241206093739|||FOBX|1|TM|57715-5^Time of birth^LN|1|0830|||N|||F|||20241206093739OBX|2|NM|73806-2^Newborn age in hours^LN|1|73|hour(s)||N|||F|||20241206093739OBX|3|TX|62327-2^Post-discharge provider practice address^LN|1|AG N 005EVA DLEIFR, F N 0037TERTS ONSER SAN DIEGO CA 99999-9999 USA|||N|||F|||20241206093739OBR|4|7902698491^FormNumber||57794-0^Newborn screening test results panel in Dried blood spot|||202411021023|||||||202411031023||||||||20241206093739|||FOBR|5|7902698491^FormNumber||62333-0^Severe combined immunodeficiency (SCID) newborn screening panel|||202411021023|||||||202411031023||||||||20241206093739|||FOBX|1|NM|6690-2^Leukocytes [#/volume] in Blood by Automated count^LN|1|45.1|Thousand/uL|9.0-30.0|H|||F|||20241206093739OBX|2|NM|789-8^Erythrocytes [#/volume] in Blood by Automated count^LN|1|4.25|Million/uL|3.90-5.90||||F|||20241206093739OBX|3|NM|718-7^Hemoglobin [Mass/volume] in Blood^LN|1|18.1|g/dL|13.4-19.9||||F|||20241206093739OBX|4|NM|4544-3^Hematocrit [Volume Fraction] of Blood by Automated count^LN|1|50.1|%|42.0-65.0||||F|||20241206093739OBX|5|NM|787-2^Erythrocyte mean corpuscular volume [Entitic volume] by Automated count^LN|1|100.0|fL|88.0-123.0||||F|||20241206093739OBX|6|NM|785-6^Erythrocyte mean corpuscular hemoglobin [Entitic mass] by Automated count^LN|1|35.1|pg|31.0-37.0||||F|||20241206093739OBX|7|NM|786-4^Erythrocyte mean corpuscular hemoglobin concentration [Mass/volume] by Automated count^LN|1|30.2|g/dL|28.0-36.0||||F|||20241206093739OBX|8|NM|777-3^Platelets [#/volume] in Blood by Automated count^LN|1|200|Thousand/uL|150-450||||F|||20241206093739OBX|9|NM|776-5^Platelet mean volume [Entitic volume] in Blood by Rees-Ecker^LN|1|11.1|fL|7.5-12.5||||F|||20241206093739OBX|10|NM|788-0^Erythrocyte distribution width [Ratio] by Automated count^LN|1|14.1|%|13.0-18.0||||F|||20241206093739OBX|11|NM|751-8^Neutrophils [#/volume] in Blood by Automated count^LN|1|7000|cells/uL|5000-21000||||F|||20241206093739OBX|12|NM|26507-4^Neutrophils.band form [#/volume] in Blood^LN^29153|1|3000|cells/uL|1500-4200||||F|||20241206093739OBX|13|NM|30433-7^Metamyelocytes [#/volume] in Blood^LN^29154|1|1|cells/uL|0|H|||F|||20241206093739OBX|14|NM|30446-9^Myelocytes [#/volume] in Blood^LN^29162|1|0|cells/uL|0||||F|||20241206093739OBX|15|NM|26523-1^Promyelocytes [#/volume] in Blood^LN^29163|1|0|cells/uL|0||||F|||20241206093739OBX|16|NM|731-0^Lymphocytes [#/volume] in Blood by Automated count^LN^29164|1|6000|cells/uL|2000-11500||||F|||20241206093739OBX|17|NM|742-7^Monocytes [#/volume] in Blood by Automated count^LN^29165|1|1200|cells/uL|300-2400||||F|||20241206093739OBX|18|NM|711-2^Eosinophils [#/volume] in Blood by Automated count^LN^29166|1|600|cells/uL|15-800||||F|||20241206093739OBX|19|NM|704-7^Basophils [#/volume] in Blood by Automated count^LN^29167|1|200|cells/uL|0-300||||F|||20241206093739OBX|20|NM|30376-8^Blasts [#/volume] in Blood^LN^29168|1|0|cells/uL|0||||F|||20241206093739OBX|21|NM|30392-5^Nucleated erythrocytes [#/volume] in Blood^LN^29169|1|300|cells/uL|0-5000||||F|||20241206093739OBX|22|NM|770-8^Neutrophils/100 leukocytes in Blood by Automated count^LN^29170|1|20|%|||||F|||20241206093739OBX|23|NM|26508-2^Neutrophils.band form/100 leukocytes in Blood^LN^29171|1|2|%|||||F|||20241206093739OBX|24|NM|28541-1^Metamyelocytes/100 leukocytes in Blood^LN^29172|1|1|%|||||F|||20241206093739OBX|25|NM|26498-6^Myelocytes/100 leukocytes in Blood^LN^29173|1|1|%|||||F|||20241206093739OBX|26|NM|26524-9^Promyelocytes/100 leukocytes in Blood^LN^29174|1|1|%|||||F|||20241206093739OBX|27|NM|736-9^Lymphocytes/100 leukocytes in Blood by Automated count^LN^29175|1|1|%|||||F|||20241206093739OBX|28|NM|13046-8^Lymphocytes Variant/100 leukocytes in Blood^LN^29176|1|1|%|0-10||||F|||20241206093739OBX|29|NM|5905-5^Monocytes/100 leukocytes in Blood by Automated count^LN^29177|1|1|%|||||F|||20241206093739OBX|30|NM|713-8^Eosinophils/100 leukocytes in Blood by Automated count^LN^29178|1|1|%|||||F|||20241206093739OBX|31|NM|706-2^Basophils/100 leukocytes in Blood by Automated count^LN^29179|1|1|%|||||F|||20241206093739OBX|32|NM|26446-5^Blasts/100 leukocytes in Blood^LN^29180|1|1|%|||||F|||20241206093739OBX|33|NM|19048-8^Nucleated erythrocytes/100 leukocytes [Ratio] in Blood^LN^29181|1|1|/100 WBC|0|H|||F|||20241206093739OBX|34|NM|8122-4^CD3 cells [#/volume] in Blood^LN^86007711^CD3+ T-Cells, Absolute^L|1|3000|cells/uL|2500-5500||||F|||20241206093739OBX|35|NM|8124-0^CD3 cells/100 cells in Blood^LN^86007712^CD3+ T-Cells, Percent^L|1|60|% of Lymphs|53-84||||F|||20241206093739OBX|36|NM|24467-3^CD3+CD4+ (T4 helper) cells [#/volume] in Blood^LN^86007713^CD3+/CD4+ T-Helper, Abs^L|1|2000|cells/uL|1600-4000||||F|||20241206093739OBX|37|NM|8123-2^CD3+CD4+ (T4 helper) cells/100 cells in Blood^LN^86007714^CD3+/CD4+ T-Helper,Percent^L|1|40|% of Lymphs|35-64||||F|||20241206093739OBX|38|NM|14135-8^CD3+CD8+ (T8 suppressor cells) cells [#/volume] in Blood^LN^86007715^CD3+/CD8+ T-Cytotoxic, Abs^L|1|1000|cells/uL|560-1700||||F|||20241206093739OBX|39|NM|8101-8^CD3+CD8+ (T8 suppressor cells) cells/100 cells in Blood^LN^86007716^CD3+/CD8+T-Cytotox,Percent^L|1|15|% of Lymphs|12-28||||F|||20241206093739OBX|40|NM|8116-6^CD19 cells [#/volume] in Blood^LN^86007717^CD19+ B-cells, Absolute^L|1|500|cells/uL|300-2000||||F|||20241206093739OBX|41|NM|8117-4^CD19 cells/100 cells in Blood^LN^86007718^CD19+ B-cells, Percent^L|1|10|% of Lymphs|6-32||||F|||20241206093739OBX|42|NM|9728-7^CD16C+CD56+ cells [#/volume] in Blood^LN^86007719^CD16/CD56 NK-cells, Abs^L|1|200|cells/uL|170-1100||||F|||20241206093739OBX|43|NM|8112-5^CD16+CD56+ cells/100 cells in Blood^LN^86007720^CD16/CD56 NK-cells,Percent^L|1|9|% of Lymphs|4-18||||F|||20241206093739OBX|44|NM|26759-1^CD4+CD45RA+cells [#/volume] in Blood^LN^86007721^CD3/CD4/CD45RA, Absolute^L|1|1500|cells/uL|1200-3700||||F|||20241206093739OBX|45|NM|13336-3^CD4+CD45RA+cells/100 cells in Blood^LN^^CD3/CD4/CD45RA, Percent^L|1|8|% CD4|||||F|||20241206093739OBX|46|NM|82743-6^CD8+CD45RA+ Cells # Bld^LN^86007723^CD3/CD8/CD45RA, Absolute^L|1|600|cells/uL|450-1500||||F|||20241206093739OBX|47|NM|82744-4^CD8+CD45RA+ Cells/100 CD8 NFr Bld^LN^86007724^CD3/CD8/CD45RA, Percent^L|1|10|% CD8|||||F|||20241206093739OBX|48|NM|85792-0^CD3+CD4+CD45RO+ # Bld^LN^86007725^CD3/CD4/CD45RO, Absolute^L|1|500|cells/uL|60-900||||F|||20241206093739OBX|49|NM|85791-2^CD3+CD4+CD45RO+/100 CD3 NFr Bld^LN^86007726^CD3/CD4/CD45RO, Percent^L|1|5|% CD4|2-22||||F|||20241206093739OBX|50|NM|85790-4^CD3+CD8+CD45RO+ # Bld^LN^86007727^CD3/CD8/CD45RO, Absolute^L|1|50|cells/uL|30-330||||F|||20241206093739OBX|51|NM|85789-6^CD3+CD8+CD45RO+/100 CD3 NFr Bld^LN^86007728^CD3/CD8/CD45RO, Percent^L|1|2|% CD8|1-9||||F|||20241206093739OBX|52|CE|62321-5^Severe combined immunodeficiency newborn screen interpretation^LN|1|LA18593-6^Out of range^LN|||A|||F|||20241206093739OBX|53|TX|62322-3^Severe combined immunodeficiency newborn screening comment-discussion^LN|1|Refer to CCS-approved Immunology Center|||A|||F|||20241206093739
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MSH|^~\&|GOLDEN-COPY|SISGDSP|SISHIERECEIVER^11903029^L,M,N|^automated-staging-test-receiver-id^L,M,N|20241211104422||ORU^R01^ORU_R01|011|N|2.5.1PID|1||80015981^^^&NPI^MR||HIPPO^BOY B ALLIE^^^^^B||202412091336|M||2106-3^White||||||||||||2186-5^Not Hispanic or Latino||Y|2NK1|1|HIPPO^ALLIE|MTH^Mother|518 BIG BEN WAY^^OCEANSIDE^CA^92058^USA|^^^^^442^2885325|||||||||||19941209ORC|RE|7322694174^FormNumber||189728238^HospOrdNumber||||||||1427255868^JOHNSON^KATHRYN^^^^^^^^^^NPI|||||||||UC SAN DIEGO MEDICAL CENTER^^^^^^^^^R508|W 025TS HT71 , C #^^SAN DIEGO^CA^99999-9999OBR|1|7322694174^FormNumber||54089-8^NB Screen Panel Patient AHIC|||202412101414|||||||||^JOHNSON^KATHRYN||||||20241211104422|||FOBR|2|7322694174^FormNumber||57128-1^Newborn Screening Report summary panel|||202412101414|||||||||^JOHNSON^KATHRYN||||||20241211104422|||FOBX|1|CE|57721-3^Reason for lab test in Dried blood spot^LN|1|LA12427-3^Subsequent screen - for clarification of initial results (not by law or protocol)^LN|||N|||F|||20241211104422OBX|2|CE|57718-9^Sample quality of Dried blood spot^LN|1|LA12443-0^Specimen quantity insufficient for testing^LN|||N|||F|||20241211104422OBX|3|CE|57131-5^Newborn conditions with positive markers [Identifier] in Dried blood spot^LN|1|LA137-2^None^LN|||N|||F|||20241211104422OBX|4|CE|57720-5^Newborn conditions with equivocal markers [Identifier] in Dried blood spot^LN|1|LA137-2^None^LN|||N|||F|||20241211104422OBX|5|TX|57724-7^Newborn screening short narrative summary^LN|1|ACTION REQUIRED\.br\\.br\Testing Lab - COMMUNITY REG MEDICAL CENTER LAB \R\ NAR 01303DR OJEIV OHC, TS513 E, FRESNO, CA 99999\.br\\.br\Lab Director - Genetic Disease Laboratory, (510) 231-1790\.br\\.br\** This specimen was inadequate for testing for the following reason: ** 13 - Specimen not collected on acceptable filter paper including expired form THE PHYSICIAN LISTED HAS BEEN NOTIFIED \.br\\.br\|||N|||F|||20241211104422OBX|6|TX|57129-9^Full newborn screening summary report for display or printing^LN|1||||N|||F|||20241211104422OBR|3|7322694174^FormNumber||57717-1^Newborn screen card data panel|||202412101414|||||||||^JOHNSON^KATHRYN||||||20241211104422|||FOBX|1|ST|57716-3^State printed on filter paper card [Identifier] in NBS card^LN|1|CA|||N|||F|||20241211104422OBX|2|NM|8339-4^Birthweight^LN|1|2812|grams||N|||F|||20241211104422OBX|3|TM|57715-5^Time of birth^LN|1|1336|||N|||F|||20241211104422OBX|4|CE|57722-1^Birth plurality of Pregnancy^LN|1|LA12412-5^Twins^LN|||N|||F|||20241211104422OBX|5|NM|73806-2^Newborn age in hours^LN|1|24|hour(s)||N|||F|||20241211104422OBX|6|CE|57713-0^Infant NICU factors that affect newborn screening interpretation^LN|1|LA137-2^None^LN|||N|||F|||20241211104422OBX|7|CE|67704-7^Feeding types^LN|1|LA16914-6^Breast milk^LN|||N|||F|||20241211104422OBX|8|TX|^^^99717-5^Accession Number^L|1|346-07-783/21-2024-21|||N|||F|||20241211104422OBX|9|TX|62324-9^Post-discharge provider name^LN|1|EUSTRATIA HUBBARD|||N|||F|||20241211104422OBX|10|TX|62327-2^Post-discharge provider practice address^LN|1|W 025TS HT71 , C # SAN DIEGO CA 99999-9999 USA|||N|||F|||20241211104422OBR|4|7322694174^FormNumber||57794-0^Newborn screening test results panel in Dried blood spot|||202412101414|||||||||^JOHNSON^KATHRYN||||||20241211104422|||F
Expand Down
19 changes: 19 additions & 0 deletions examples/Test/Automated/GoldenCopy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This folder contains the HL7 sample files that are used in the Golden Copy ReportStream
integration tests. The [golden-copy-staging-test-submit.yml](/.github/workflows/automated-staging-test-submit.yml)
Github workflow that runs daily will grab these files and send them to ReportStream in staging.
The files are expected to go through the whole flow and to be delivered to an Azure blob
container that will later be used by the
[golden-copy-staging-test-run.yml](/.github/workflows/golden-copy-staging-test-run.yml) workflow to run tests on them by comparing the golden copy to the actual output.

## Requirements for the HL7 files

The files are required to:

- Be a valid HL7 file
- Be a supported HL7 message type: `ORM`, `OML` or `ORU`
- Have `automated-staging-test-receiver-id` in `MSH-6.2` in order to be routed correctly
- If it's a sample file for UCSD, which has transformation that will overwrite `MSH-6.2`, the HL7 is required to have the prefix `AUTOMATEDTEST-` in `MSH-10` as a workaround - there is special routing in ReportStream to handle this
- Each file must have a unique value in `MSH-10`. We use this value to match the input and output files, so if it's not unique, we won't be able to match the files correctly
- We format `MSH-10` based on the file index, like `001` (or `AUTOMATEDTEST-001` for UCSD)
- `MSH-11` needs to have a value of `N`
- `MSH-3` needs to be `GOLDEN-COPY`
Loading
Loading