Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-h-wang committed Oct 30, 2024
1 parent 4c6b53b commit 0dd829d
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ start:
dateTimeIn: $start
_start:
expressionType: nested
condition: $dateTimeIn NOT_NULL
condition: $start NOT_NULL
expressionsMap:
extension_1:
generateList: true
Expand All @@ -20,7 +20,7 @@ _start:
value: hl7v2-date-time
valueString:
type: STRING
valueOf: $dateTimeIn
valueOf: $start
expressionType: HL7Spec

end:
Expand All @@ -32,7 +32,7 @@ end:
dateTimeIn: $end
_end:
expressionType: nested
condition: $dateTimeOut NOT_NULL
condition: $end NOT_NULL
expressionsMap:
extension_1:
generateList: true
Expand All @@ -43,5 +43,5 @@ _end:
value: hl7v2-date-time
valueString:
type: STRING
valueOf: $dateTimeOut
valueOf: $end
expressionType: HL7Spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ deviceIdentifier:
extension:
expressionType: nested
generateList: true
vars:
ei2: EI.2
ei3: EI.3
ei4: EI.4
condition: $ei2 NOT_NULL || $ei3 NOT_NULL || $ei4 NOT_NULL
expressions:
- expressionType: nested
expressionsMap:
Expand All @@ -19,6 +24,7 @@ extension:
expressionType: nested
expressions:
- expressionType: nested
condition: $ei2 NOT_NULL
expressionsMap:
url:
type: SYSTEM_URL
Expand All @@ -28,6 +34,7 @@ extension:
expressionType: HL7Spec
valueOf: EI.2
- expressionType: nested
condition: $ei3 NOT_NULL
expressionsMap:
url:
type: SYSTEM_URL
Expand All @@ -37,6 +44,7 @@ extension:
expressionType: HL7Spec
valueOf: EI.3
- expressionType: nested
condition: $ei4 NOT_NULL
expressionsMap:
url:
type: SYSTEM_URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extension_1-assigning-authority:
ei2: EI.2
ei3: EI.3
ei4: EI.4
condition: $ei2 NOT_NULL || $ei3 NOT_NULL || $ei4 NOT_NULL
expressionsMap:
url:
type: SYSTEM_URL
Expand Down
34 changes: 34 additions & 0 deletions prime-router/metadata/HL7/catchall/hl7/segments/PRT/Device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,47 @@ manufactureDate:
expressionType: JEXL
vars:
dateTimeIn: PRT.17
_manufactureDate:
expressionType: nested
vars:
dateTimeIn: PRT.17
condition: $dateTimeIn NOT_NULL
expressionsMap:
extension_1:
generateList: true
expressionType: nested
expressionsMap:
url:
type: SYSTEM_URL
value: hl7v2-date-time
valueString:
type: STRING
valueOf: $dateTimeIn
expressionType: HL7Spec

expirationDate:
type: STRING
valueOf: "GeneralUtils.dateTimeWithZoneId(dateTimeIn,ZONEID)"
expressionType: JEXL
vars:
dateTimeIn: PRT.18
_expirationDate:
expressionType: nested
vars:
dateTimeIn: PRT.18
condition: $dateTimeIn NOT_NULL
expressionsMap:
extension_1:
generateList: true
expressionType: nested
expressionsMap:
url:
type: SYSTEM_URL
value: hl7v2-date-time
valueString:
type: STRING
valueOf: $dateTimeIn
expressionType: HL7Spec

lotNumber:
type: STRING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ extension:
value: PRT.21
type: STRING
valueIdentifier:
valueOf: datatypes/EI/Device-udiCarrier
valueOf: datatypes/EI/Identifier
specs: PRT.21
expressionType: resource
- expressionType: nested
Expand Down Expand Up @@ -280,7 +280,7 @@ extension:
expressionType: resource
- expressionType: nested
vars:
prt15: STRING_ALL, PRT.24
prt24: STRING_ALL, PRT.24
condition: $prt24 NOT_NULL
specs: PRT.24 *
generateList: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ elements:
schema: classpath:/metadata/hl7_mapping/datatypes/device-udiCarrier/EI.yml

- name: device-manufacture-date
resource: '%resource.manufactureDate.value'
resource: '%resource.manufactureDate'
constants:
dtmFieldPath: '%{hl7PRTFieldPath}-17'
schema: classpath:/metadata/hl7_mapping/datatypes/dateTime/DTMorDT.yml

- name: device-expiry-date
resource: '%resource.expirationDate.value'
resource: '%resource.expirationDate'
constants:
dtmFieldPath: '%{hl7PRTFieldPath}-18'
schema: classpath:/metadata/hl7_mapping/datatypes/dateTime/DTMorDT.yml
Expand All @@ -51,13 +51,13 @@ elements:
hl7Spec: [ '%{hl7PRTFieldPath}-20' ]

- name: device-donation-identification
resource: '%resource.distinctIdentifier.extension'
resource: '%resource.distinctIdentifier'
schema: classpath:/metadata/hl7_mapping/datatypes/identifier/EI.yml
constants:
hl7EIField: '%{hl7PRTFieldPath}-21'

- name: device-type
resource: '%resource.type.value'
resource: '%resource.type'
schema: classpath:/metadata/hl7_mapping/datatypes/codeableConcept/CNE.yml
constants:
cneFieldPath: '%{hl7PRTFieldPath}-22'
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ elements:

- name: PRT.24
resource: '%resource.extension.where(url = "PRT.24").value'
schema: classpath:/metadata/hl7_mapping/datatypes/Identifier/PLN.yml
schema: classpath:/metadata/hl7_mapping/datatypes/identifier/PLN.yml
resourceIndex: contactIdentifierIndex
constants:
hl7TelecomField: '%{hl7PRTFieldPath}-24(%{contactIdentifierIndex})'
plnField: '%{hl7PRTFieldPath}-24(%{contactIdentifierIndex})'
Loading

0 comments on commit 0dd829d

Please sign in to comment.