Skip to content

Commit

Permalink
Merge branch 'main' into platform/bill/16143
Browse files Browse the repository at this point in the history
  • Loading branch information
wcutshall authored Dec 13, 2024
2 parents f5f6a49 + 986d6fb commit 7184d8a
Show file tree
Hide file tree
Showing 21 changed files with 1,062 additions and 76 deletions.
93 changes: 93 additions & 0 deletions prime-router/docs/design/design/RS-Extention-Registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
103 changes: 103 additions & 0 deletions prime-router/metadata/HL7/catchall/hl7/datatypes/CP/CPExtension.yml
Original file line number Diff line number Diff line change
@@ -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
34 changes: 33 additions & 1 deletion prime-router/metadata/HL7/catchall/hl7/segments/IN1/Coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,36 @@ extension:
expressions:
- expressionType: resource
valueOf: datatypes/AUI/AUIExtension
specs: IN1.14
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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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' ]
Original file line number Diff line number Diff line change
Expand Up @@ -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'
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'
Loading

0 comments on commit 7184d8a

Please sign in to comment.