Skip to content

Commit

Permalink
Merge branch 'main' into create-vpn-before-destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
somesylvie committed Oct 29, 2024
2 parents 3b561a1 + 36b9f1b commit fba0562
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"org.apache.httpcomponents.client5:httpclient5-fluent"
],
"allowedVersions": "!/^5\\.3$/"
},
{
"matchPackageNames": ["com.azure:azure-identity"],
"allowedVersions": "!/^1\\.14\\.0$/"
}],
"pinDigests": false
}
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions e2e/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion etor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions examples/Test/Automated/004_CA_ORU_R01_leading_zeroes.hl7
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions examples/Test/Automated/005_CA_ORU_R01_no_leading_zeroes.hl7
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion operations/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.6.0"
version = "4.7.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion operations/environments/internal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.6.0"
version = "4.7.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion operations/environments/pr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.6.0"
version = "4.7.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion operations/environments/prd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.6.0"
version = "4.7.0"
}
}

Expand Down
2 changes: 1 addition & 1 deletion operations/environments/stg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "4.6.0"
version = "4.7.0"
}
}

Expand Down
1 change: 1 addition & 0 deletions operations/template/alert.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions rs-e2e/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
18 changes: 18 additions & 0 deletions rs-e2e/src/main/resources/assertion_definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
]
}
]
}
48 changes: 48 additions & 0 deletions scripts/rs/update_org_yaml.sh
Original file line number Diff line number Diff line change
@@ -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."
10 changes: 5 additions & 5 deletions shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit fba0562

Please sign in to comment.