From f4b43863e9cf2aada827181d98432d08a34a7ea0 Mon Sep 17 00:00:00 2001 From: Josh Fisk Date: Fri, 13 Dec 2024 09:35:52 -0800 Subject: [PATCH 1/2] Add CP to Extension mappings (#16767) * CPExtension mappings * CPExtension Integration Tests * MOCExtension name change to fit existing patterns --- .../design/design/RS-Extention-Registry.yml | 93 +++++ .../hl7/codesystem/ExtensionUrlMapping.yml | 4 + .../catchall/hl7/datatypes/CP/CPExtension.yml | 103 ++++++ .../MOC/{Extension.yml => MOCExtension.yml} | 0 .../catchall/hl7/segments/IN1/Coverage.yml | 34 +- .../hl7/segments/ORC/OBRExtension.yml | 2 +- .../hl7_mapping/OML_O21/OML_O21-base.yml | 2 +- .../hl7_mapping/OML_O21/OML_O21-test.yml | 2 +- .../hl7_mapping/datatypes/extensionCP/CP.yml | 33 ++ .../hl7_mapping/resources/Coverage/IN1.yml | 28 +- .../mappinginventory/catchall/cp/CPTests.kt | 16 + .../catchall/cp/cp-to-extension.fhir | 195 +++++++++++ .../catchall/cp/cp-to-extension.hl7 | 3 + .../catchall/in1/IN1-to-Coverage.fhir | 323 +++++++++++++++++- .../catchall/in1/IN1-to-Coverage.hl7 | 2 +- .../catchall/omlo21/oml_o21-full.fhir | 216 ++++++++++++ .../catchall/omlo21/oml_o21-full.hl7 | 2 +- 17 files changed, 1042 insertions(+), 16 deletions(-) create mode 100644 prime-router/metadata/HL7/catchall/hl7/datatypes/CP/CPExtension.yml rename prime-router/metadata/HL7/catchall/hl7/datatypes/MOC/{Extension.yml => MOCExtension.yml} (100%) create mode 100644 prime-router/src/main/resources/metadata/hl7_mapping/datatypes/extensionCP/CP.yml create mode 100644 prime-router/src/testIntegration/kotlin/datatests/mappinginventory/catchall/cp/CPTests.kt create mode 100644 prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.fhir create mode 100644 prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.hl7 diff --git a/prime-router/docs/design/design/RS-Extention-Registry.yml b/prime-router/docs/design/design/RS-Extention-Registry.yml index 8b3bb667f28..247103ae682 100644 --- a/prime-router/docs/design/design/RS-Extention-Registry.yml +++ b/prime-router/docs/design/design/RS-Extention-Registry.yml @@ -3418,6 +3418,99 @@ valueType: String hl7Use: XTN.12 +- Resource: Any + FHIR-Type: Extension + HL7-Type: + CP: + Example: + { + "fullUrl": "Coverage/1733795578717198000.8888487d-55f4-4d1d-963d-f8692fc77e9c", + "resource": { + "resourceType": "Coverage", + "id": "1733795578717198000.8888487d-55f4-4d1d-963d-f8692fc77e9c", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.40" + }, + { + "url": "CP.1.1", + "valueDecimal": 33.33 + }, + { + "url": "CP.1.2", + "valueString": "MXN" + }, + { + "url": "CP.2", + "valueString": "P3" + }, + { + "url": "CP.3", + "valueDecimal": 3.003 + }, + { + "url": "CP.4", + "valueDecimal": -3 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + # CWE to CodeableConcept + } + }, + { + "url": "CP.6", + "valueString": "P" + } + ] + } + ] + } + } + Extension: + - id: composite-price + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price" + valueType: Extension + hl7Use: NA + extension: + - id: hl7v2Field + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field" + valueType: String + hl7Use: NA + description: Identifies the HL7 field of the data. + - id: cp-price-quantity + url: "CP.1.1" + valueType: Decimal + hl7use: CP.1.1 + - id: cp-price-denomination + url: "CP.1.2" + valueType: String + hl7use: CP.1.2 + - id: cp-price-type + url: "CP.2" + valueType: String + hl7use: CP.2 + - id: cp-from-value + url: "CP.3" + valueType: Decimal + hl7use: CP.3 + - id: cp-to-value + url: "CP.4" + valueType: Decimal + hl7use: CP.4 + - id: cp-range-units + url: "CP.5" + valueType: CodeableConcept + hl7use: CP.5 + - id: cp-range-type + url: "CP.6" + valueType: String + hl7use: CP.6 + - Resource: Any FHIR-Type: MessageHeader.destination HL7-Type: diff --git a/prime-router/metadata/HL7/catchall/hl7/codesystem/ExtensionUrlMapping.yml b/prime-router/metadata/HL7/catchall/hl7/codesystem/ExtensionUrlMapping.yml index 2643e984fed..cc27f956220 100644 --- a/prime-router/metadata/HL7/catchall/hl7/codesystem/ExtensionUrlMapping.yml +++ b/prime-router/metadata/HL7/catchall/hl7/codesystem/ExtensionUrlMapping.yml @@ -65,6 +65,10 @@ - id: "xon-organization" url: "https://reportstream.cdc.gov/fhir/StructureDefinition/xon-organization" +# CP -> Extension +- id: "composite-price" + url: "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price" + # CX -> Identifier - id: "assigning-facility" url: "https://reportstream.cdc.gov/fhir/StructureDefinition/assigning-facility" diff --git a/prime-router/metadata/HL7/catchall/hl7/datatypes/CP/CPExtension.yml b/prime-router/metadata/HL7/catchall/hl7/datatypes/CP/CPExtension.yml new file mode 100644 index 00000000000..ad352c02b56 --- /dev/null +++ b/prime-router/metadata/HL7/catchall/hl7/datatypes/CP/CPExtension.yml @@ -0,0 +1,103 @@ +# $schema: ./../../../../../json_schema/fhir/hl7-to-fhir-mapping-resource-template.json + +url: + type: SYSTEM_URL + value: composite-price + +extension: + expressionType: nested + generateList: true + expressions: + - expressionType: nested + expressionsMap: + url: + type: SYSTEM_URL + value: hl7v2Field + valueString: + type: STRING + expressionType: HL7Spec + valueOf: $cpExtensionName + - expressionType: nested + vars: + cp11: STRING, CP.1 + condition: $cp11 NOT_NULL + expressionsMap: + url: + type: STRING + value: CP.1.1 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: CP.1.1 + - expressionType: nested + vars: + cp12: STRING, CP.1.2 + condition: $cp12 NOT_NULL + expressionsMap: + url: + type: STRING + value: CP.1.2 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CP.1.2 + - expressionType: nested + vars: + cp2: STRING, CP.2 + condition: $cp2 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CP.2 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CP.2 + - expressionType: nested + vars: + cp3: STRING, CP.3 + condition: $cp3 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CP.3 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: CP.3 + - expressionType: nested + vars: + cp4: STRING, CP.4 + condition: $cp4 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CP.4 + valueDecimal: + type: STRING + expressionType: HL7Spec + valueOf: CP.4 + - expressionType: nested + vars: + cp5: STRING_ALL, CP.5 + condition: $cp5 NOT_NULL + expressionsMap: + url: + type: STRING + value: CP.5 + valueCodeableConcept: + valueOf: datatypes/CWE/CodeableConcept + specs: CP.5 + expressionType: resource + - expressionType: nested + vars: + cp6: STRING, CP.6 + condition: $cp6 NOT_NULL + expressionsMap: + url: + type: STRING + valueOf: CP.6 + valueString: + type: STRING + expressionType: HL7Spec + valueOf: CP.6 diff --git a/prime-router/metadata/HL7/catchall/hl7/datatypes/MOC/Extension.yml b/prime-router/metadata/HL7/catchall/hl7/datatypes/MOC/MOCExtension.yml similarity index 100% rename from prime-router/metadata/HL7/catchall/hl7/datatypes/MOC/Extension.yml rename to prime-router/metadata/HL7/catchall/hl7/datatypes/MOC/MOCExtension.yml diff --git a/prime-router/metadata/HL7/catchall/hl7/segments/IN1/Coverage.yml b/prime-router/metadata/HL7/catchall/hl7/segments/IN1/Coverage.yml index 8479f85f8bc..c4bfd5d0c1b 100644 --- a/prime-router/metadata/HL7/catchall/hl7/segments/IN1/Coverage.yml +++ b/prime-router/metadata/HL7/catchall/hl7/segments/IN1/Coverage.yml @@ -13,4 +13,36 @@ extension: expressions: - expressionType: resource valueOf: datatypes/AUI/AUIExtension - specs: IN1.14 \ No newline at end of file + specs: IN1.14 + - expressionType: resource + vars: + in137: STRING, IN1.37 + condition: $in137 NOT_NULL + valueOf: datatypes/CP/CPExtension + constants: + cpExtensionName: IN1.37 + specs: IN1.37 + - expressionType: resource + vars: + in138: STRING, IN1.38 + condition: $in138 NOT_NULL + valueOf: datatypes/CP/CPExtension + constants: + cpExtensionName: IN1.38 + specs: IN1.38 + - expressionType: resource + vars: + in140: STRING, IN1.40 + condition: $in140 NOT_NULL + valueOf: datatypes/CP/CPExtension + constants: + cpExtensionName: IN1.40 + specs: IN1.40 + - expressionType: resource + vars: + in141: STRING, IN1.41 + condition: $in141 NOT_NULL + valueOf: datatypes/CP/CPExtension + constants: + cpExtensionName: IN1.41 + specs: IN1.41 diff --git a/prime-router/metadata/HL7/catchall/hl7/segments/ORC/OBRExtension.yml b/prime-router/metadata/HL7/catchall/hl7/segments/ORC/OBRExtension.yml index c2509802ecf..78c9142b244 100644 --- a/prime-router/metadata/HL7/catchall/hl7/segments/ORC/OBRExtension.yml +++ b/prime-router/metadata/HL7/catchall/hl7/segments/ORC/OBRExtension.yml @@ -335,7 +335,7 @@ extension: expressionType: HL7Spec valueOf: OBR.22 - expressionType: resource - valueOf: datatypes/MOC/Extension + valueOf: datatypes/MOC/MOCExtension vars: obr23: STRING_ALL, OBR.23 condition: $obr23 NOT_NULL diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-base.yml b/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-base.yml index 305e890b694..5038b8227fa 100644 --- a/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-base.yml +++ b/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-base.yml @@ -1,6 +1,6 @@ # $schema: ./../../../../../../metadata/json_schema/fhir/fhir-to-hl7-mapping.json -hl7Class: ca.uhn.hl7v2.model.v27.message.OML_O21 +hl7Class: fhirengine.translation.hl7.structures.fhirinventory.message.OML_O21 constants: # Prefix for RS custom extension URLs diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-test.yml b/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-test.yml index d9c02000ec8..5dda094bd39 100644 --- a/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-test.yml +++ b/prime-router/src/main/resources/metadata/hl7_mapping/OML_O21/OML_O21-test.yml @@ -1,6 +1,6 @@ # $schema: ./../../../../../../metadata/json_schema/fhir/fhir-to-hl7-mapping.json -hl7Class: ca.uhn.hl7v2.model.v27.message.OML_O21 +hl7Class: fhirengine.translation.hl7.structures.fhirinventory.message.OML_O21 extends: classpath:/metadata/hl7_mapping/OML_O21/OML_O21-base.yml elements: diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/datatypes/extensionCP/CP.yml b/prime-router/src/main/resources/metadata/hl7_mapping/datatypes/extensionCP/CP.yml new file mode 100644 index 00000000000..12df1c0bab0 --- /dev/null +++ b/prime-router/src/main/resources/metadata/hl7_mapping/datatypes/extensionCP/CP.yml @@ -0,0 +1,33 @@ +# $schema: ./../../../../../../../metadata/json_schema/fhir/fhir-to-hl7-mapping.json + +elements: + + - name: cp-price-quantity + value: [ '%resource.extension.where(url = "CP.1.1").value' ] + hl7Spec: [ '%{cpField}-1-1' ] + + - name: cp-price-denomination + value: [ '%resource.extension.where(url = "CP.1.2").value' ] + hl7Spec: [ '%{cpField}-1-2' ] + + - name: cp-price-type + value: [ '%resource.extension.where(url = "CP.2").value' ] + hl7Spec: [ '%{cpField}-2' ] + + - name: cp-from-value + value: [ '%resource.extension.where(url = "CP.3").value' ] + hl7Spec: [ '%{cpField}-3' ] + + - name: cp-to-value + value: [ '%resource.extension.where(url = "CP.4").value' ] + hl7Spec: [ '%{cpField}-4' ] + + - name: cp-range-units + resource: '%resource.extension.where(url = "CP.5").value' + schema: classpath:/metadata/hl7_mapping/datatypes/codeableConcept/CWE.yml + constants: + cweField: '%{cpField}-5' + + - name: cp-range-type + value: [ '%resource.extension.where(url = "CP.6").value' ] + hl7Spec: [ '%{cpField}-6' ] diff --git a/prime-router/src/main/resources/metadata/hl7_mapping/resources/Coverage/IN1.yml b/prime-router/src/main/resources/metadata/hl7_mapping/resources/Coverage/IN1.yml index fe437d13fce..b412907a538 100644 --- a/prime-router/src/main/resources/metadata/hl7_mapping/resources/Coverage/IN1.yml +++ b/prime-router/src/main/resources/metadata/hl7_mapping/resources/Coverage/IN1.yml @@ -5,8 +5,32 @@ constants: elements: - - name: aui-extension + - name: in1-authorization-information resource: '%resource.extension.where(url = "IN1.14")' schema: classpath:/metadata/hl7_mapping/datatypes/extensionAUI/AUI.yml constants: - auiField: '%{hl7IN1Field}-14' \ No newline at end of file + auiField: '%{hl7IN1Field}-14' + + - name: in1-policy-deductable + resource: '%resource.extension(%`rsext-composite-price`).where(extension(%`rsext-hl7v2Field`).value = "IN1.37")' + schema: classpath:/metadata/hl7_mapping/datatypes/extensionCP/CP.yml + constants: + cpField: '%{hl7IN1Field}-37' + + - name: in1-policy-limit-amount + resource: '%resource.extension(%`rsext-composite-price`).where(extension(%`rsext-hl7v2Field`).value = "IN1.38")' + schema: classpath:/metadata/hl7_mapping/datatypes/extensionCP/CP.yml + constants: + cpField: '%{hl7IN1Field}-38' + + - name: in1-room-rate-semi-private + resource: '%resource.extension(%`rsext-composite-price`).where(extension(%`rsext-hl7v2Field`).value = "IN1.40")' + schema: classpath:/metadata/hl7_mapping/datatypes/extensionCP/CP.yml + constants: + cpField: '%{hl7IN1Field}-40' + + - name: in1-room-rate-private + resource: '%resource.extension(%`rsext-composite-price`).where(extension(%`rsext-hl7v2Field`).value = "IN1.41")' + schema: classpath:/metadata/hl7_mapping/datatypes/extensionCP/CP.yml + constants: + cpField: '%{hl7IN1Field}-41' diff --git a/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/catchall/cp/CPTests.kt b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/catchall/cp/CPTests.kt new file mode 100644 index 00000000000..6fa650b9945 --- /dev/null +++ b/prime-router/src/testIntegration/kotlin/datatests/mappinginventory/catchall/cp/CPTests.kt @@ -0,0 +1,16 @@ +package gov.cdc.prime.router.datatests.mappinginventory.cp + +import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping +import org.junit.jupiter.api.Test + +class CPTests { + @Test + fun `test CP mapped to CPExtension`() { + assert( + verifyHL7ToFHIRToHL7Mapping( + "catchall/cp/cp-to-extension", + outputSchema = "classpath:/metadata/hl7_mapping/OML_O21/OML_O21-test.yml" + ).passed + ) + } +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.fhir new file mode 100644 index 00000000000..86c2f6a5a65 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.fhir @@ -0,0 +1,195 @@ +{ + "resourceType": "Bundle", + "id": "1733797768446514000.f1548dec-5abc-4302-9b8d-59f755ec9b2f", + "meta": { + "lastUpdated": "2024-12-09T18:29:28.450-08:00" + }, + "identifier": { + "system": "https://reportstream.cdc.gov/prime-router", + "value": "MSG00001" + }, + "type": "message", + "entry": [ + { + "fullUrl": "MessageHeader/1733797768476500000.9c68bbf7-cd15-490d-a357-ac0d515575f8", + "resource": { + "resourceType": "MessageHeader", + "id": "1733797768476500000.9c68bbf7-cd15-490d-a357-ac0d515575f8", + "meta": { + "tag": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0103", + "code": "P" + } + ] + }, + "eventCoding": { + "system": "http://terminology.hl7.org/CodeSystem/v2-0003", + "code": "O21", + "display": "OML^O21^OML_O21" + } + } + }, + { + "fullUrl": "Provenance/1733797768760500000.23e4e2bd-4532-468d-89ec-e012d5702477", + "resource": { + "resourceType": "Provenance", + "id": "1733797768760500000.23e4e2bd-4532-468d-89ec-e012d5702477", + "activity": { + "coding": [ + { + "display": "OML^O21^OML_O21" + } + ] + } + } + }, + { + "fullUrl": "Provenance/1733797768767441000.19ac0704-100d-4d66-8cb9-3094fba92b95", + "resource": { + "resourceType": "Provenance", + "id": "1733797768767441000.19ac0704-100d-4d66-8cb9-3094fba92b95", + "recorded": "2024-12-09T18:29:28Z", + "policy": [ + "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" + ], + "activity": { + "coding": [ + { + "code": "v2-FHIR transformation" + } + ] + }, + "agent": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code": "assembler" + } + ] + }, + "who": { + "reference": "Organization/1733797768766853000.2f23f653-749b-4b43-b159-d1d955375f3a" + } + } + ] + } + }, + { + "fullUrl": "Organization/1733797768766853000.2f23f653-749b-4b43-b159-d1d955375f3a", + "resource": { + "resourceType": "Organization", + "id": "1733797768766853000.2f23f653-749b-4b43-b159-d1d955375f3a", + "identifier": [ + { + "value": "CDC PRIME - Atlanta" + }, + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0301" + } + ] + }, + "system": "urn:ietf:rfc:3986", + "value": "2.16.840.1.114222.4.1.237821" + } + ] + } + }, + { + "fullUrl": "Patient/1733797768779870000.bb1ddb84-5fa1-484f-96a4-4616988212fc", + "resource": { + "resourceType": "Patient", + "id": "1733797768779870000.bb1ddb84-5fa1-484f-96a4-4616988212fc" + } + }, + { + "fullUrl": "Provenance/1733797768780413000.e0ff5861-fd54-4149-8ee0-415a1dcc9123", + "resource": { + "resourceType": "Provenance", + "id": "1733797768780413000.e0ff5861-fd54-4149-8ee0-415a1dcc9123", + "target": [ + { + "reference": "Patient/1733797768779870000.bb1ddb84-5fa1-484f-96a4-4616988212fc" + } + ], + "recorded": "2024-12-09T18:29:28Z", + "activity": { + "coding": [ + { + "system": "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code": "UPDATE" + } + ] + } + } + }, + { + "fullUrl": "Coverage/1733797768783117000.2931a2e0-097c-481f-9adf-46e114f827b2", + "resource": { + "resourceType": "Coverage", + "id": "1733797768783117000.2931a2e0-097c-481f-9adf-46e114f827b2", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.40" + }, + { + "url": "CP.1.1", + "valueDecimal": 33.33 + }, + { + "url": "CP.1.2", + "valueString": "MXN" + }, + { + "url": "CP.2", + "valueString": "P3" + }, + { + "url": "CP.3", + "valueDecimal": 3.003 + }, + { + "url": "CP.4", + "valueDecimal": -3 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "OR", + "display": "Oven Range" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "P" + } + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.hl7 new file mode 100644 index 00000000000..be3735df492 --- /dev/null +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/cp/cp-to-extension.hl7 @@ -0,0 +1,3 @@ +MSH|^~\&|||||||OML^O21^OML_O21|MSG00001|P|2.5.1 +PID|1 +IN1||||||||||||||||||||||||||||||||||||||||33.33&MXN^P3^3.003^-3^OR&Oven Range&HL79999^P \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.fhir index bac350c4bb3..c341f40f512 100644 --- a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.fhir +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.fhir @@ -1,8 +1,8 @@ { "resourceType": "Bundle", - "id": "1732324230716018000.38edba19-1d39-4040-85af-9f5f6248813c", + "id": "1733797806213402000.63933238-a67a-4568-8544-178612c57351", "meta": { - "lastUpdated": "2024-11-22T17:10:30.720-08:00" + "lastUpdated": "2024-12-09T18:30:06.217-08:00" }, "identifier": { "system": "https://reportstream.cdc.gov/prime-router", @@ -11,10 +11,10 @@ "type": "message", "entry": [ { - "fullUrl": "MessageHeader/1732324230752828000.fc7cea9d-d7ca-4378-91d4-ea97c86b4787", + "fullUrl": "MessageHeader/1733797806248346000.554ce0a6-e3fb-4b4e-b8e2-c111f8944cd5", "resource": { "resourceType": "MessageHeader", - "id": "1732324230752828000.fc7cea9d-d7ca-4378-91d4-ea97c86b4787", + "id": "1733797806248346000.554ce0a6-e3fb-4b4e-b8e2-c111f8944cd5", "meta": { "tag": [ { @@ -31,17 +31,108 @@ } }, { - "fullUrl": "Patient/1732324231018814000.533db9a5-5375-4746-be23-f7140d4a3280", + "fullUrl": "Provenance/1733797806498618000.239e218a-0960-4528-939e-5ee68bfbba1d", + "resource": { + "resourceType": "Provenance", + "id": "1733797806498618000.239e218a-0960-4528-939e-5ee68bfbba1d", + "activity": { + "coding": [ + { + "display": "OML^O21^OML_O21" + } + ] + } + } + }, + { + "fullUrl": "Provenance/1733797806506657000.35b16b0c-d80a-4017-8cad-868a79863b64", + "resource": { + "resourceType": "Provenance", + "id": "1733797806506657000.35b16b0c-d80a-4017-8cad-868a79863b64", + "recorded": "2024-12-09T18:30:06Z", + "policy": [ + "http://hl7.org/fhir/uv/v2mappings/message-oru-r01-to-bundle" + ], + "activity": { + "coding": [ + { + "code": "v2-FHIR transformation" + } + ] + }, + "agent": [ + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type", + "code": "assembler" + } + ] + }, + "who": { + "reference": "Organization/1733797806506092000.a6f8b4f5-e971-4ee2-8891-8b67af7df93d" + } + } + ] + } + }, + { + "fullUrl": "Organization/1733797806506092000.a6f8b4f5-e971-4ee2-8891-8b67af7df93d", + "resource": { + "resourceType": "Organization", + "id": "1733797806506092000.a6f8b4f5-e971-4ee2-8891-8b67af7df93d", + "identifier": [ + { + "value": "CDC PRIME - Atlanta" + }, + { + "type": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/v2-0301" + } + ] + }, + "system": "urn:ietf:rfc:3986", + "value": "2.16.840.1.114222.4.1.237821" + } + ] + } + }, + { + "fullUrl": "Patient/1733797806517233000.6ddc53a3-0587-4db5-8c73-5b6634eb1369", "resource": { "resourceType": "Patient", - "id": "1732324231018814000.533db9a5-5375-4746-be23-f7140d4a3280" + "id": "1733797806517233000.6ddc53a3-0587-4db5-8c73-5b6634eb1369" } }, { - "fullUrl": "Coverage/1732324231019741000.a36368bf-6c63-4970-8948-034a92248964", + "fullUrl": "Provenance/1733797806517793000.28f02504-824d-4c22-a6a1-e234b3affd5f", + "resource": { + "resourceType": "Provenance", + "id": "1733797806517793000.28f02504-824d-4c22-a6a1-e234b3affd5f", + "target": [ + { + "reference": "Patient/1733797806517233000.6ddc53a3-0587-4db5-8c73-5b6634eb1369" + } + ], + "recorded": "2024-12-09T18:30:06Z", + "activity": { + "coding": [ + { + "system": "https://terminology.hl7.org/CodeSystem/v3-DataOperation", + "code": "UPDATE" + } + ] + } + } + }, + { + "fullUrl": "Coverage/1733797806523309000.c5403041-1e4b-4f81-bc46-f16237041fec", "resource": { "resourceType": "Coverage", - "id": "1732324231019741000.a36368bf-6c63-4970-8948-034a92248964", + "id": "1733797806523309000.c5403041-1e4b-4f81-bc46-f16237041fec", "extension": [ { "url": "IN1.14", @@ -59,6 +150,222 @@ "valueString": "DR TEETH AND THE ELECTRIC MAYHEM" } ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.37" + }, + { + "url": "CP.1.1", + "valueDecimal": 11.11 + }, + { + "url": "CP.1.2", + "valueString": "USD" + }, + { + "url": "CP.2", + "valueString": "P1" + }, + { + "url": "CP.3", + "valueDecimal": 1.001 + }, + { + "url": "CP.4", + "valueDecimal": -1 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "R", + "display": "Range Units" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "F" + } + ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.38" + }, + { + "url": "CP.1.1", + "valueDecimal": 22.22 + }, + { + "url": "CP.1.2", + "valueString": "RUB" + }, + { + "url": "CP.2", + "valueString": "P2" + }, + { + "url": "CP.3", + "valueDecimal": 2.002 + }, + { + "url": "CP.4", + "valueDecimal": -2 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "RR", + "display": "Russian Rubble" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "F" + } + ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.40" + }, + { + "url": "CP.1.1", + "valueDecimal": 33.33 + }, + { + "url": "CP.1.2", + "valueString": "MXN" + }, + { + "url": "CP.2", + "valueString": "P3" + }, + { + "url": "CP.3", + "valueDecimal": 3.003 + }, + { + "url": "CP.4", + "valueDecimal": -3 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "OR", + "display": "Oven Range" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "P" + } + ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.41" + }, + { + "url": "CP.1.1", + "valueDecimal": 44.44 + }, + { + "url": "CP.1.2", + "valueString": "CAD" + }, + { + "url": "CP.2", + "valueString": "P4" + }, + { + "url": "CP.3", + "valueDecimal": 4.004 + }, + { + "url": "CP.4", + "valueDecimal": -4 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "HHR", + "display": "Home Home Range" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "P" + } + ] } ] } diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.hl7 index 6d424a80fa2..0279bf1db76 100644 --- a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.hl7 +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/in1/IN1-to-Coverage.hl7 @@ -1,3 +1,3 @@ MSH|^~\&|||||||OML^O21^OML_O21|MSG00001|P|2.5.1 PID|1 -IN1||||||||||||||1701^19700101^DR TEETH AND THE ELECTRIC MAYHEM \ No newline at end of file +IN1||||||||||||||1701^19700101^DR TEETH AND THE ELECTRIC MAYHEM|||||||||||||||||||||||11.11&USD^P1^1.001^-1^R&Range Units&HL79999^F|22.22&RUB^P2^2.002^-2^RR&Russian Rubble&HL79999^F||33.33&MXN^P3^3.003^-3^OR&Oven Range&HL79999^P|44.44&CAD^P4^4.004^-4^HHR&Home Home Range&HL79999^P \ No newline at end of file diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.fhir b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.fhir index 214a988f494..d24dfe4dad2 100644 --- a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.fhir +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.fhir @@ -13262,6 +13262,222 @@ "valueString": "DR TEETH AND THE ELECTRIC MAYHEM" } ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.37" + }, + { + "url": "CP.1.1", + "valueDecimal": 11.11 + }, + { + "url": "CP.1.2", + "valueString": "USD" + }, + { + "url": "CP.2", + "valueString": "P1" + }, + { + "url": "CP.3", + "valueDecimal": 1.001 + }, + { + "url": "CP.4", + "valueDecimal": -1 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "R", + "display": "Range Units" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "F" + } + ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.38" + }, + { + "url": "CP.1.1", + "valueDecimal": 22.22 + }, + { + "url": "CP.1.2", + "valueString": "RUB" + }, + { + "url": "CP.2", + "valueString": "P2" + }, + { + "url": "CP.3", + "valueDecimal": 2.002 + }, + { + "url": "CP.4", + "valueDecimal": -2 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "RR", + "display": "Russian Rubble" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "F" + } + ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.40" + }, + { + "url": "CP.1.1", + "valueDecimal": 33.33 + }, + { + "url": "CP.1.2", + "valueString": "MXN" + }, + { + "url": "CP.2", + "valueString": "P3" + }, + { + "url": "CP.3", + "valueDecimal": 3.003 + }, + { + "url": "CP.4", + "valueDecimal": -3 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "OR", + "display": "Oven Range" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "P" + } + ] + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/composite-price", + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/hl7v2Field", + "valueString": "IN1.41" + }, + { + "url": "CP.1.1", + "valueDecimal": 44.44 + }, + { + "url": "CP.1.2", + "valueString": "CAD" + }, + { + "url": "CP.2", + "valueString": "P4" + }, + { + "url": "CP.3", + "valueDecimal": 4.004 + }, + { + "url": "CP.4", + "valueDecimal": -4 + }, + { + "url": "CP.5", + "valueCodeableConcept": { + "coding": [ + { + "extension": [ + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding", + "valueString": "coding" + }, + { + "url": "https://reportstream.cdc.gov/fhir/StructureDefinition/cwe-coding-system", + "valueString": "HL79999" + } + ], + "code": "HHR", + "display": "Home Home Range" + } + ] + } + }, + { + "url": "CP.6", + "valueString": "P" + } + ] } ] } diff --git a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.hl7 b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.hl7 index 23863a51bb8..baa36fced05 100644 --- a/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.hl7 +++ b/prime-router/src/testIntegration/resources/datatests/mappinginventory/catchall/omlo21/oml_o21-full.hl7 @@ -8,7 +8,7 @@ NK1|1|SURYAN&Prefix&Own&SpousePrefix&Spouse^GENARO^GR^JR^Sir^Md^L^I^CON&Context NK1|2|SUPERMAN&Prefix&Own&SpousePrefix&Spouse^GENARO^GR^JR^Sir^Md^L^I^CON&Context the namee&HL70448^2000&2030^G^20000501102531^2030501102531^Dr|OTH^Other^HL70063^OT^OTHER RELATIONSHIP^L|4861 20TH AVE^^THUNDER MOUNTAIN^IG^99999^USA^H|^PRN^PH^example2@exmaple.com^1^720^5553954^2^any^^^+1 720 555 3955|^WPN^PH^^1^555^4672293^^^^^+1 555 467 2294|F^Federal Agency^HL70131|20220501102531-0400|20230501102531-0400|||052479^^^^^^20160822|HospitalsRUs^^112233^^^^^^^HRU||N^Not Applicable^HL70001|19860505||||E^English^HL70296|||||||||||^WPN^PH^^1^720^5553954^^^^^+1 720 555 3955|4861 20TH AVE^#B^AURORA^IG^99999^USA^H^World^King^12^8^2017&2025^2020^2021|052479^^^^^^^20210428|||||||^VHN^SAT^^1^314^5553131^^^^^+1 314 555 3132|^AWN^FX^^1^281^5558181^^^^^+1 281 555 8182 PV1|1|O|A&Point OF Care&C^1&Room&3^B&Bed&A^Hospital Assigned&2.4.4.4&ISO^^R^&Building^&Floor^Totally A Real Location^Comprehensive&&UID4This^AA&AssigningAUTH&ISO|R^Routine^HL70007|232323|^^^Hospital Prio&2.4.4.4&ISO^active^location type^^^Description^Entity ID&NAME&UNI&ISO^ASSIGNEE&222.1111.22222&UUID|1^BEETHOVEN^LUDWIG^B^2ND^DR^MD^^Namespace&AssigningSystem&UUID^B^^^DL^^^^^^^^MD~1^BEETHOVEN2^LUDWIG^B^2ND^DR^MD^^Namespace&AssigningSystem&UUID^B^^^DL^^^^^^^^MD|1^MOZART~1^MOZARTJR|1^CHOPIN~1^CHOPINSR|URO^Urology Service^HL70069|^^^^^^^^Its Temporary|P^Passed^HL70087|R^Re-admission^HL70092|RL^Real Life^HL70023||VIP^Very Interesting Person^HL70099|1^BACH~1^BACHtheSecond|H^Human Patient^HL70018|22|||||||||||20020101|C^Collectors^HL70021|1|0|Y^Yes^HL70111|20080101|H^Happy^HL70112|^202305061200|F^Fed^HL70114|H^A Hospital Of Course^HL70115||A^Active^HL70117|^^^^^^^^Pending Location|^^^^^^^^Prior Location|20240801102531-0400|20240801102531-0400|100|199|142|130|alternate visit|A^Account Level^HL70326||Service Description|episode identifier PV2|^^^Hospital PriorPending&2.4.4.4&ISO^active^location type^^^Description^Entity ID&NAME&UNI&ISO^ASSIGNEE&222.1111.22222&UUID||1^AD||||413^V~423^X|20230601102531-0400|20230701102531-0400|5|12|Description|1^BEETHOVEN&VAN&Referral Source Code1&VAL&ROGER^LUDWIG^B^2ND^DR^MD^SRC^&AssigningSystem&ISO^B^A^NPI^DL^^A^NameContext^^G^20220501102531-0400^20230501102531-0400^MD^AssignJ^AssignA~1^BEETHOVEN&VAN&Referral Source Code2&VAL&ROGER^LUDWIG^B^2ND^DR^MD^SRC^&AssigningSystem&ISO^B^A^NPI^DL^^A^NameContext^^G^20220501102531-0400^20230501102531-0400^MD^AssignJ^AssignA||EMP_ILL||||||100^PublicCode|SEC|Org1^1234-5&TestText&LN&1234-5&TestAltText&LN&1&2&OriginalText^123^Check Digit^C1^Assigning Authority&2.1.4.1&ISO^MD^Hospital A&2.16.840.1.113883.9.11&ISO~Org2^1234-5&TestText&LN&1234-5&TestAltText&LN&1&2&OriginalText^123^Check Digit^C1^Assigning Authority&2.1.4.1&ISO^MD^Hospital A&2.16.840.1.113883.9.11&ISO||3^Elective^HL70217|20230501102531-0400|||20220501102531-0400|||||||||444^MODE||123^CARELEVEL1 -IN1||||||||||||||1701^19700101^DR TEETH AND THE ELECTRIC MAYHEM +IN1||||||||||||||1701^19700101^DR TEETH AND THE ELECTRIC MAYHEM|||||||||||||||||||||||11.11&USD^P1^1.001^-1^R&Range Units&HL79999^F|22.22&RUB^P2^2.002^-2^RR&Russian Rubble&HL79999^F||33.33&MXN^P3^3.003^-3^OR&Oven Range&HL79999^P|44.44&CAD^P4^4.004^-4^HHR&Home Home Range&HL79999^P ORC|RE|Specimen123^SPHL-000048^2.16.840.1.114222.4.1.10765^ISO|Specimen12311^SPHL-000048^2.16.840.1.114222.4.1.10765^ISO|Specimen12322^SPHL-000048^2.16.840.1.114222.4.1.10765^ISO|CM|E||Specimen12333&SPHL-000048&2.16.840.1.114222.4.1.10765&ISO^Specimen12333454&SPHL-000048&2.16.840.1.114222.4.1.10765&ISO|20230725|71^^ORC.10Name~71^^ORC.10Name2|82^^ORC.11Name~82^^ORC.11Name2|93^^ORC.12Name~93^^ORC.12Name2|12.12.12&enter location id&L|123^^^+123~1234^^^+1234|202101021000||EO^entering org text^HL79999|ED^entering device text^HL79999|60^^ORC.19Name~60^^ORC.19Name2||CDPH, Viral and Rickettsial Disease Laboratory^^^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO^XX^STARLINKS.CDC.Stag&2.16.840.1.114222.8.7.6.5.4.1&ISO^A^SPHL-000048~CDPH, Viral and Rickettsial Disease Laboratory part two^^^^^STARLIMS.CDC.Stag&2.16.840.1.114222.4.3.3.2.1.2&ISO|111 Street St^^Streetsville^ST~112 Street St^^Streetsville^ST|456^^^+456~4567^^^+4567|111 Road Rd^^Roadsville^RD~112 Road Rd^^Roadsville^RD|OS^order status^HL79999||20260404|EMP^Employee^HL70177|I^Inpatient Order^HL70482|EL^Electronic^HL70483|UMM^Universal Modifier^HL70000|20250403|33~332 OBR|1|Placer Identifier^Placer Identifier Namespace^Placer Universal ID^ISO|Filler Identifier^Filler Identifier Namespace^Filler Universal ID^ISO|123^Universal service identifier||202202021022||20240220|1771|1^Collector&VAN&Identifier&VAL&ROGER^LUDWIG^B^2ND^DR^MD^SRC^&AssigningSystem&ISO^B^A^NPI^DL^^A^NameContext~1^Collectorx2&VAN&Identifier&VAL&ROGER^LUDWIG^B^2ND^DR^MD^SRC^&AssigningSystem&ISO^B^A^NPI^DL^^A^NameContext|G|512^Danger code|R^relevent info^ISO|202102021000|ID^BOUIN&Bouin's solution&HL70371^Collection Method^LN&Left Naris&HL70163^^CMMC&Collection Method Modifer Code&HL7|1^Ordering&VAN&Provider&VAL&JollyROGER~2^Ordering&VAN&Provider&VAL&JollyROGER|^WPN^BP^^1^260^7595016^^^^^+1 260 759 5016~^WPN^Internet^order.callback@email.com~^WPN^BP^^1^260^7595016^^^^^+1 260 759 5016~^WPN^Internet^order.callback2@email.com|placer1|placer2|filler1|filler2||100&$^16&code|OTH|F|444&ParentId^888^ParentOBSdescriptor||1^result&VAN&copiesto&VAL&NotSoJollyROGER~2^results&VAN&copiesto&VAL&NotSoJollyROGER|adb4a5cc-50ec-4f1e-95d7-0c1f77cacee1&CSV&11D1111111&CLIA^f34b0f57-1601-4480-ae8a-d4006e50f38d&Other CSV&22D2222222&CLIA2||3216^ReasonForStudy~3216^ReasonForStudy2||123&Assistant&Results Interpreter&S&ESQ&DR&MD&&Assigning Authority&2.1.4.1&ISO^20230401102531-0400^20230501102531-0400^Point of Care^Room 101^Bed A^Hospital A&2.16.840.1.113883.9.11&ISO^active^^Building 123^Floor A~123&Assistant&Results Interpreter&S&ESQ&DR&MD&&Assigning Authority&2.1.4.1&ISO^20230401102531-0400^20230501102531-0400^Point of Care^Room 101^Bed A^Hospital A&2.16.840.1.113883.9.11&ISO^active^^Building 123^Floor A|||20230806123359-0500|||4438^Collectors Comment~4438^Collectors Comment2|||||5019^Procedure Code|887766^Procedure Code Modifier~887766^Procedure Code Modifier2|7461^Placer Supplemental~7461^Placer Supplemental2|8811^Fillter Supplemental~8811^Fillter Supplemental2|71435^Medically Necessary Duplicate Procedure|N|443331^Parent Universal Service Identifier|||Alt^Placer Order~Alt^Placer Order2|adb4a5cc-50ec-4f1e-95d7-0c1f77cacee1&CSV&11D1111111&CLIA^f34b0f57-1601-4480-ae8a-d4006e50f38d&Other CSV&22D2222222&CLIA2 NTE|1|L|Note about the observation request~second~third~fourth|||20230207|20230208|20230209|CC^Coded Request note From 986d6fb4b327a001a2bcb5c4b11197439f1cc7e6 Mon Sep 17 00:00:00 2001 From: Josh Fisk Date: Fri, 13 Dec 2024 11:35:02 -0800 Subject: [PATCH 2/2] Allow alternate input on MSH for RADx_MARS (#16788) * Allow alternate input on MSH 5 and 6 for RADx_Mars * Using sample hl7 from ticket description --- .../v251/radxmars/onboarding/constraints.xml | 30 ------------------- .../v251/radxmars/production/constraints.xml | 30 ------------------- .../validation/MarsOtcElrValidatorTests.kt | 11 +++++++ .../marsotcelr/valid_altered_msh.hl7 | 9 ++++++ 4 files changed, 20 insertions(+), 60 deletions(-) create mode 100644 prime-router/src/test/resources/validation/marsotcelr/valid_altered_msh.hl7 diff --git a/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/onboarding/constraints.xml b/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/onboarding/constraints.xml index 75e5166f1dc..ec78da25b9d 100644 --- a/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/onboarding/constraints.xml +++ b/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/onboarding/constraints.xml @@ -584,27 +584,12 @@ Text="ISO"/> - - MSH-5.2 (Universal ID) shall contain one of the values in the list: ['2.16.840.1.114222.4.3.15.2','2.16.840.1.114222.4.3.15.1']. - - - - MSH-6.3 (Universal ID Type) shall contain the value 'ISO'. </Assertion> </Constraint> - <Constraint ID="MSH-6.2" Strength="SHALL"> - <Description> MSH-6.2 (Universal ID) shall contain the value '2.16.840.1.114222.4.1.217446'. </Description> - <Assertion> - <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="6[1].2[1]" - Text="2.16.840.1.114222.4.1.217446"/> - </Assertion> - </Constraint> <Constraint ID="MSH-7" Strength="SHALL"> <Description> MSH-7.1 (Time) shall match the regular expression '^(\d{14}\.\d{1,4}|\d{14})((\x2D|\x2B)\d{4})$'. </Description> <Assertion> @@ -612,13 +597,6 @@ Regex="^(\d{14}\.\d{1,4}|\d{14})((\x2D|\x2B)\d{4})$"/> </Assertion> </Constraint> - <Constraint ID="MSH-6.1" Strength="SHALL"> - <Description> MSH-6.1 (Namespace ID) shall contain the value 'AIMS.PLATFORM'. </Description> - <Assertion> - <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="6[1].1[1]" - Text="AIMS.PLATFORM"/> - </Assertion> - </Constraint> <Constraint ID="MSH-1" Strength="SHALL"> <Description> MSH-1 (Field Separator) shall contain the value '|'. </Description> <Assertion> @@ -679,14 +657,6 @@ <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="15[1]" Text="NE"/> </Assertion> </Constraint> - <Constraint ID="MSH-5.1" Strength="SHALL"> - <Description> MSH-5.1 (Namespace ID) shall contain one of the values in the list: ['AIMS.INTEGRATION.STG','AIMS.INTEGRATION.PRD']. </Description> - <Assertion> - <StringList CSV="AIMS.INTEGRATION.STG,AIMS.INTEGRATION.PRD" IgnoreCase="false" - NotPresentBehavior="PASS" - Path="5[1].1[1]"/> - </Assertion> - </Constraint> </ByID> <ByID ID="OBX_NIH_2-8-1"> <Constraint ID="OBX-19" Strength="SHALL"> diff --git a/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/production/constraints.xml b/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/production/constraints.xml index 6be6551b1dc..f96e980e3f9 100644 --- a/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/production/constraints.xml +++ b/prime-router/src/main/resources/metadata/hl7_validation/v251/radxmars/production/constraints.xml @@ -684,27 +684,12 @@ Text="ISO"/> </Assertion> </Constraint> - <Constraint ID="MSH-5.2" Strength="SHALL"> - <Description> MSH-5.2 (Universal ID) shall contain one of the values in the list: ['2.16.840.1.114222.4.3.15.2','2.16.840.1.114222.4.3.15.1']. </Description> - <Assertion> - <StringList CSV="2.16.840.1.114222.4.3.15.2,2.16.840.1.114222.4.3.15.1" IgnoreCase="false" - NotPresentBehavior="PASS" - Path="5[1].2[1]"/> - </Assertion> - </Constraint> <Constraint ID="MSH-6.3" Strength="SHALL"> <Description> MSH-6.3 (Universal ID Type) shall contain the value 'ISO'. </Description> <Assertion> <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="6[1].3[1]" Text="ISO"/> </Assertion> </Constraint> - <Constraint ID="MSH-6.2" Strength="SHALL"> - <Description> MSH-6.2 (Universal ID) shall contain the value '2.16.840.1.114222.4.1.217446'. </Description> - <Assertion> - <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="6[1].2[1]" - Text="2.16.840.1.114222.4.1.217446"/> - </Assertion> - </Constraint> <Constraint ID="MSH-7" Strength="SHALL"> <Description> MSH-7.1 (Time) shall match the regular expression '^(\d{14}\.\d{1,4}|\d{14})((\x2D|\x2B)\d{4})$'. </Description> <Assertion> @@ -712,13 +697,6 @@ Regex="^(\d{14}\.\d{1,4}|\d{14})((\x2D|\x2B)\d{4})$"/> </Assertion> </Constraint> - <Constraint ID="MSH-6.1" Strength="SHALL"> - <Description> MSH-6.1 (Namespace ID) shall contain the value 'AIMS.PLATFORM'. </Description> - <Assertion> - <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="6[1].1[1]" - Text="AIMS.PLATFORM"/> - </Assertion> - </Constraint> <Constraint ID="MSH-1" Strength="SHALL"> <Description> MSH-1 (Field Separator) shall contain the value '|'. </Description> <Assertion> @@ -779,14 +757,6 @@ <PlainText IgnoreCase="false" NotPresentBehavior="PASS" Path="15[1]" Text="NE"/> </Assertion> </Constraint> - <Constraint ID="MSH-5.1" Strength="SHALL"> - <Description> MSH-5.1 (Namespace ID) shall contain one of the values in the list: ['AIMS.INTEGRATION.STG','AIMS.INTEGRATION.PRD']. </Description> - <Assertion> - <StringList CSV="AIMS.INTEGRATION.STG,AIMS.INTEGRATION.PRD" IgnoreCase="false" - NotPresentBehavior="PASS" - Path="5[1].1[1]"/> - </Assertion> - </Constraint> </ByID> <ByID ID="OBR_NIH"> <Constraint ID="OBR-22.1" Strength="SHOULD"> diff --git a/prime-router/src/test/kotlin/validation/MarsOtcElrValidatorTests.kt b/prime-router/src/test/kotlin/validation/MarsOtcElrValidatorTests.kt index 8bcf227d3b4..16b35f45c91 100644 --- a/prime-router/src/test/kotlin/validation/MarsOtcElrValidatorTests.kt +++ b/prime-router/src/test/kotlin/validation/MarsOtcElrValidatorTests.kt @@ -32,4 +32,15 @@ class MarsOtcElrValidatorTests { val report = validator.validate(messages[0]) assertThat(report.isValid()).isTrue() } + + @Test + fun `test valid RADxMARS message with NIST invalid MSH-5-1, MSH-5-2, MSH-6-1, MSH-6-2 `() { + val sampleMessageInputStream = + this.javaClass.classLoader.getResourceAsStream("validation/marsotcelr/valid_altered_msh.hl7") + + val sampleMessage = sampleMessageInputStream!!.bufferedReader().use { it.readText() } + val messages = HL7Reader(ActionLogger()).getMessages(sampleMessage) + val report = validator.validate(messages[0]) + assertThat(report.isValid()).isTrue() + } } \ No newline at end of file diff --git a/prime-router/src/test/resources/validation/marsotcelr/valid_altered_msh.hl7 b/prime-router/src/test/resources/validation/marsotcelr/valid_altered_msh.hl7 new file mode 100644 index 00000000000..dbdea1b3ef7 --- /dev/null +++ b/prime-router/src/test/resources/validation/marsotcelr/valid_altered_msh.hl7 @@ -0,0 +1,9 @@ +MSH|^~\&|AbbottInformatics^2.16.840.1.113883.3.8589.4.1.22^ISO|AbbottInformatics^00Z0000002^CLIA|CDC PRIME^2.16.840.1.114222.4.1.237821^ISO|CDC PRIME^2.16.840.1.114222.4.1.237821^ISO|20241204094313+0100||ORU^R01^ORU_R01|20241204094313+0100_Your Test Kit ID|T|2.5.1|||NE|NE|||||PHLabReport-NoAck^ELR251R1_Rcvr_Prof^2.16.840.1.113883.9.11^ISO +SFT|Meadows Design, LLC|1.0.0|RADx MARS Hub API|1.0.0|| +PID|1||c2sense079177^^^&2.16.840.1.113883.3.8589.4.1.22&ISO^PI||Smith^Rebecca^P||20241204|F||2076-8^Native Hawaiian or Other Pacific Islander^HL70005^^^^2.5.1|^^^^60013^^^^||^^PH^^^111^1111111|||||||||H^Hispanic or Latino^HL70189^^^^2.5.1 +ORC|RE||Your Test Kit ID^^2.16.840.1.113883.3.8589.4.1.22^ISO|||||||||^^SA.Proctor|||||||||SA.Proctor|^^^^60013^^^^|^^PH^^^111^1111111| +OBR|1||Your Test Kit ID^^2.16.840.1.113883.3.8589.4.1.22^ISO|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^^^^2.71|||20241204094313+0100|||||||||^^SA.Proctor||||||20241204094313+0100|||F +OBX|1|CWE|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^^^^2.71||260415000^Not Detected^SCT^^^^20210301|||N^Normal^HL70078^^^^2.5.1|||F||||00Z0000016||10811877011337_DIT^^99ELR^^^^Vunknown||20241204094313+0100||||SA.Proctor^^^^^&2.16.840.1.113883.3.8589.4.1.152&ISO^XX^^^00Z0000016|13 Fake AtHome Test Street^^Fake City| +NTE|1|L|10811877011337_DIT +OBX|2|NM|35659-2^Age at specimen collection^LN^^^^2.71||28|a^year^UCUM^^^^2.1|||||F||||00Z0000016||||||||SA.Proctor^^^^^&2.16.840.1.113883.3.8589.4.1.152&ISO^XX^^^00Z0000016|13 Fake AtHome Test Street^^Fake City|||||QST +SPM|1|^Your Test Kit ID&&2.16.840.1.113883.3.8589.4.1.22&ISO||697989009^Anterior nares swab (specimen)^SCT^^^^20210301|||||||||||||20241204094313+0100|20241204094313+0100 \ No newline at end of file