diff --git a/.github/renovate.json b/.github/renovate.json index 615e2b2f0..901ca1185 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -33,6 +33,10 @@ "org.apache.httpcomponents.client5:httpclient5-fluent" ], "allowedVersions": "!/^5\\.3$/" + }, + { + "matchPackageNames": ["com.azure:azure-identity"], + "allowedVersions": "!/^1\\.14\\.0$/" }], "pinDigests": false } diff --git a/README.md b/README.md index 0e63c5943..dbc6dcde4 100644 --- a/README.md +++ b/README.md @@ -347,12 +347,10 @@ with this option enabled. 4. Run the `./cleanslate` script. For more information you can refer to the [ReportStream docs](https://github.com/CDCgov/prime-reportstream/blob/master/prime-router/docs/docs-deprecated/getting-started/getting-started.md#building-the-baseline) 5. If attempting to access the metadata endpoint in ReportStream add the variable `ETOR_TI_baseurl="http://host.docker.internal:8080"` to `.prime-router/.vault/env/.env.local` file before building the container 6. Run RS with `docker compose up --build -d` -7. Edit `/settings/STLTs/Flexion/flexion.yml` to comment the lines related to staging settings, and uncomment the ones for local settings: - - `authTokenUrl`, `reportUrl`, `authHeaders.host` under REST `transport` in `receivers` - - `type` and `credentialName` under SFTP `transport` in `receivers` -8. Run the `./reset.sh` script to reset the database -9. Run the `./load-etor-org-settings.sh` to apply the ETOR organization settings -10. Run the `./setup-local-vault.sh` script to set up the local vault secrets +7. Run the `reset.sh` script to reset the database +8. Run the `update_org_yaml.sh` script to update the RS organization settings +9. Run the `load-etor-org-settings.sh` to apply the ETOR organization settings +10. Run the `setup-local-vault.sh` script to set up the local vault secrets - You can verify that the script created the secrets successfully by going to `http://localhost:8200/` in your browser, use the token in `prime-router/.vault/env/.env.local` to authenticate, and then go to `Secrets engines` > `secret/` to check the available secrets #### Submit request to ReportStream diff --git a/e2e/build.gradle b/e2e/build.gradle index 397ced5bf..d7c4b28c5 100644 --- a/e2e/build.gradle +++ b/e2e/build.gradle @@ -15,8 +15,8 @@ dependencies { implementation 'org.apache.httpcomponents.client5:httpclient5-fluent:5.4.1' //jackson - implementation 'com.fasterxml.jackson.core:jackson-core:2.18.0' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.0' + implementation 'com.fasterxml.jackson.core:jackson-core:2.18.1' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.1' //fhir implementation 'ca.uhn.hapi.fhir:hapi-fhir-base:7.4.5' diff --git a/etor/build.gradle b/etor/build.gradle index 84dcdc75b..2d0069afa 100644 --- a/etor/build.gradle +++ b/etor/build.gradle @@ -14,7 +14,7 @@ dependencies { testImplementation testFixtures(project(':shared')) implementation 'com.azure:azure-storage-blob:12.28.1' - implementation 'com.azure:azure-identity:1.14.0' + implementation 'com.azure:azure-identity:1.13.3' testImplementation 'org.apache.groovy:groovy:4.0.23' testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0' diff --git a/examples/Test/Automated/004_CA_ORU_R01_leading_zeroes.hl7 b/examples/Test/Automated/004_CA_ORU_R01_leading_zeroes.hl7 new file mode 100644 index 000000000..4a6ce65de --- /dev/null +++ b/examples/Test/Automated/004_CA_ORU_R01_leading_zeroes.hl7 @@ -0,0 +1,6 @@ +MSH|^~\&|SISGDSP|SISGDSP|SISHIERECEIVER^11903029^L,M,N|^automated-staging-test-receiver-id^L,M,N|20240226034304||ORU^R01^ORU_R01|004|N|2.5.1 +PID|1||80008836^^^&NPI^MR||CDPHSIX^BOY MOMSIX^^^^^B|||M||2106-3^White||||||||||||2186-5^Not Hispanic or Latino||N|1 +NK1|1|CDPHSIX|MTH^Mother|132 ST^^SAN DIEGO^CA^92126^USA +ORC|RE|7181233072^FormNumber||189430284^HospOrdNumber||||||||^ROSEN^REBECCA|||||||||UCSD JACOBS MEDICAL CENTER^^^^^^^^^R797| 2961DR YLLUT^^SAN DIEGO^CA^99999-9999 +OBR|1|7181233072^FormNumber||54079-9^Galactosemia newborn screening panel|||202402131546|||||||||^JOHNSON^KATHRYN||||||20240226034304|||F +OBX|1|NM|42906-8^Galactose 1 phosphate uridyl transferase^LN|1|05.100|enzyme units|>50|N|||F|||20240226034304 \ No newline at end of file diff --git a/examples/Test/Automated/005_CA_ORU_R01_no_leading_zeroes.hl7 b/examples/Test/Automated/005_CA_ORU_R01_no_leading_zeroes.hl7 new file mode 100644 index 000000000..478b295fd --- /dev/null +++ b/examples/Test/Automated/005_CA_ORU_R01_no_leading_zeroes.hl7 @@ -0,0 +1,6 @@ +MSH|^~\&|SISGDSP|SISGDSP|SISHIERECEIVER^11903029^L,M,N|^automated-staging-test-receiver-id^L,M,N|20240226034304||ORU^R01^ORU_R01|005|N|2.5.1 +PID|1||80008836^^^&NPI^MR||CDPHSIX^BOY MOMSIX^^^^^B|||M||2106-3^White||||||||||||2186-5^Not Hispanic or Latino||N|1 +NK1|1|CDPHSIX|MTH^Mother|132 ST^^SAN DIEGO^CA^92126^USA +ORC|RE|7181233072^FormNumber||189430284^HospOrdNumber||||||||^ROSEN^REBECCA|||||||||UCSD JACOBS MEDICAL CENTER^^^^^^^^^R797| 2961DR YLLUT^^SAN DIEGO^CA^99999-9999 +OBR|1|7181233072^FormNumber||54079-9^Galactosemia newborn screening panel|||202402131546|||||||||^JOHNSON^KATHRYN||||||20240226034304|||F +OBX|1|NM|42906-8^Galactose 1 phosphate uridyl transferase^LN|1|0.6500|enzyme units|>50|N|||F|||20240226034304 \ No newline at end of file diff --git a/operations/environments/dev/main.tf b/operations/environments/dev/main.tf index b2b4204f2..2e88e43b4 100644 --- a/operations/environments/dev/main.tf +++ b/operations/environments/dev/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.6.0" + version = "4.7.0" } } diff --git a/operations/environments/internal/main.tf b/operations/environments/internal/main.tf index dafad9b61..1b3c51c44 100644 --- a/operations/environments/internal/main.tf +++ b/operations/environments/internal/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.6.0" + version = "4.7.0" } } diff --git a/operations/environments/pr/main.tf b/operations/environments/pr/main.tf index 0efd6d7d9..b55c82164 100644 --- a/operations/environments/pr/main.tf +++ b/operations/environments/pr/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.6.0" + version = "4.7.0" } } diff --git a/operations/environments/prd/main.tf b/operations/environments/prd/main.tf index 877854dc0..7066217d4 100644 --- a/operations/environments/prd/main.tf +++ b/operations/environments/prd/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.6.0" + version = "4.7.0" } } diff --git a/operations/environments/stg/main.tf b/operations/environments/stg/main.tf index 32c00b74e..bfb1ab6c9 100644 --- a/operations/environments/stg/main.tf +++ b/operations/environments/stg/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { azurerm = { source = "hashicorp/azurerm" - version = "4.6.0" + version = "4.7.0" } } diff --git a/operations/template/alert.tf b/operations/template/alert.tf index 13588dca7..a25e8c5ea 100644 --- a/operations/template/alert.tf +++ b/operations/template/alert.tf @@ -260,6 +260,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "ti-log-errors-alert" { query = <<-QUERY AppServiceConsoleLogs + | where _ResourceId !contains "pre-live" | project columnifexists("ResultDescription", 'default_value') | project JsonResult = parse_json(ResultDescription) | evaluate bag_unpack(JsonResult) : (level: string, message: string) diff --git a/rs-e2e/build.gradle b/rs-e2e/build.gradle index 53f561f94..183f314d5 100644 --- a/rs-e2e/build.gradle +++ b/rs-e2e/build.gradle @@ -14,8 +14,8 @@ dependencies { testImplementation testFixtures(project(':shared')) //jackson - implementation 'com.fasterxml.jackson.core:jackson-core:2.18.0' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.0' + implementation 'com.fasterxml.jackson.core:jackson-core:2.18.1' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.1' // azure implementation 'com.azure:azure-storage-blob:12.28.1' diff --git a/rs-e2e/src/main/resources/assertion_definitions.json b/rs-e2e/src/main/resources/assertion_definitions.json index ff38c7cbe..700734794 100644 --- a/rs-e2e/src/main/resources/assertion_definitions.json +++ b/rs-e2e/src/main/resources/assertion_definitions.json @@ -36,6 +36,24 @@ "OBR-16 = ORC-12", "OBR.count() = 1" ] + }, + { + "name": "CDPH leading zeros", + "conditions": [ + "MSH-10 = '004'" + ], + "rules": [ + "OBX-5 = '5.100'" + ] + }, + { + "name": "CDPH no leading zeros", + "conditions": [ + "MSH-10 = '005'" + ], + "rules": [ + "OBX-5 = '0.6500'" + ] } ] } diff --git a/scripts/rs/update_org_yaml.sh b/scripts/rs/update_org_yaml.sh new file mode 100755 index 000000000..5ccce812e --- /dev/null +++ b/scripts/rs/update_org_yaml.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +source "$CDCTI_HOME/scripts/hurl/utils.sh" + +# This script updates the organization settings YAML files in RS to: +# - use local REST transport settings for Flexion's etor-service-receiver receivers +# - use local SFTP transport settings for Flexion's simulated-hospital and simulated-lab receivers +# - use local SFTP transport settings for partner organizations + +# Requirements: +# - yq (https://github.com/mikefarah/yq) +# - This script should run inside the prime-router directory of the prime-reportstream codebase + +ORG_SETTINGS_DIR="settings/STLTs" + +check_installed_commands yq + +echo "Updating transport in Flexion org settings file..." +yq eval '.[0].receivers[] |= ( + select(.name == "simulated-hospital" or .name == "simulated-lab").transport = { + "type": "SFTP", + "host": "sftp", + "port": 22, + "filePath": "./upload", + "credentialName": "DEFAULT-SFTP" + } | + select(.name == "etor-service-receiver-orders") |= ( + .transport.authTokenUrl = "http://host.docker.internal:8080/v1/auth/token" | + .transport.reportUrl = "http://host.docker.internal:8080/v1/etor/orders" + ) | + select(.name == "etor-service-receiver-results") |= ( + .transport.authTokenUrl = "http://host.docker.internal:8080/v1/auth/token" | + .transport.reportUrl = "http://host.docker.internal:8080/v1/etor/results" + ) +)' -i "$ORG_SETTINGS_DIR/Flexion/flexion.yml" + +echo "Updating transport in partner org settings files..." +for file in "$ORG_SETTINGS_DIR/CA/ucsd.yml" "$ORG_SETTINGS_DIR/LA/la-ochsner.yml" "$ORG_SETTINGS_DIR/LA/la-phl.yml"; do + yq eval '.[0].receivers[] |= select(.name == "etor-nbs-results" or .name == "etor-nbs-orders").transport = { + "type": "SFTP", + "host": "sftp", + "port": 22, + "filePath": "./upload", + "credentialName": "DEFAULT-SFTP" + }' -i "$file" +done + +echo "Updates completed." diff --git a/shared/build.gradle b/shared/build.gradle index 88bae5d55..98d453f95 100644 --- a/shared/build.gradle +++ b/shared/build.gradle @@ -22,10 +22,10 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:8.0' //jackson - implementation 'com.fasterxml.jackson.core:jackson-core:2.18.0' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.0' - implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.0' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.0' + implementation 'com.fasterxml.jackson.core:jackson-core:2.18.1' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.18.1' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.18.1' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.1' // hapi fhir api 'ca.uhn.hapi.fhir:hapi-fhir-base:7.4.5' @@ -49,7 +49,7 @@ dependencies { // azure sdk implementation 'com.azure:azure-security-keyvault-secrets:4.9.0' - implementation 'com.azure:azure-identity:1.14.0' + implementation 'com.azure:azure-identity:1.13.3' testImplementation 'org.apache.groovy:groovy:4.0.23' testFixturesImplementation 'org.apache.groovy:groovy:4.0.23'