Skip to content

Commit

Permalink
add test, updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-h-wang committed Oct 30, 2024
1 parent fa71d6c commit 7e6bce6
Show file tree
Hide file tree
Showing 6 changed files with 1,147 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ extension_2-universalId:

extension_3-universalIdType:
generateList: true
vars:
universalIdType: String, HD.3
condition: $universalIdType NOT_NULL
expressionType: nested
expressionsMap:
url:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ extension:
generateList: true
expressionType: nested
expressions:
- expressionType: nested
vars:
prt1: STRING_ALL, PRT.1
condition: $prt1 NOT_NULL
expressionsMap:
url:
value: PRT.1
type: STRING
valueIdentifier:
valueOf: datatypes/EI/Identifier
specs: PRT.1
type: resource
- expressionType: nested
vars:
prt2: STRING_ALL, PRT.2
Expand Down Expand Up @@ -60,15 +48,15 @@ extension:
vars:
prt5: STRING_ALL, PRT.5
condition: $prt5 NOT_NULL
generateList: true
specs: PRT.5 *
generateList: true
expressionsMap:
url:
type: STRING
value: PRT.5
valueRelatedPerson:
valueReference:
valueOf: datatypes/XCN/RelatedPerson
expressionType: resource
expressionType: reference
- expressionType: nested
vars:
prt6: STRING_ALL, PRT.6
Expand Down Expand Up @@ -103,9 +91,9 @@ extension:
url:
type: STRING
value: PRT.8
valueOrganization:
valueReference:
valueOf: datatypes/XON/Organization
expressionType: resource
expressionType: reference
- expressionType: nested
vars:
prt9: STRING_ALL, PRT.9
Expand All @@ -116,9 +104,9 @@ extension:
url:
type: STRING
value: PRT.9
valueLocation:
valueReference:
valueOf: datatypes/PL/Location
expressionType: resource
expressionType: reference
- expressionType: nested
vars:
prt10: STRING_ALL, PRT.10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ elements:
# XCN[Practitioner] FHIR > HL7 mappings are largely compatible with XCN[RelatedPerson]
# implement union+tail for PRT[PractitionerRole] only
- name: PRT.5
resource: '%resource.extension.where(url = "PRT.5").value'
resource: '%resource.extension.where(url = "PRT.5").value.resolve()'
schema: classpath:/metadata/hl7_mapping/resources/Practitioner/XCN.yml
resourceIndex: relatedPersonIndex
constants:
Expand All @@ -42,13 +42,13 @@ elements:
cweField: '%{hl7PRTFieldPath}-7(%{organizationUnitTypeIndex})'

- name: PRT.8
resource: '%resource.extension.where(url = "PRT.8").value'
resource: '%resource.extension.where(url = "PRT.8").value.resolve()'
schema: classpath:/metadata/hl7_mapping/resources/Organization/XON.yml
constants:
hl7XONField: '%{hl7PRTFieldPath}-8'

- name: PRT.9
resource: '%resource.extension.where(url = "PRT.9").value'
resource: '%resource.extension.where(url = "PRT.9").value.resolve()'
schema: classpath:/metadata/hl7_mapping/resources/Location/PL/PL.yml
constants:
hl7PLField: '%{hl7PRTFieldPath}-9'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package gov.cdc.prime.router.datatests.mappinginventory.catchall.prt

import gov.cdc.prime.router.datatests.mappinginventory.verifyHL7ToFHIRToHL7Mapping
import org.junit.jupiter.api.Test

class PRTToDeviceTests {
@Test
fun `test translate from PRT to Device to PRT`() {
assert(verifyHL7ToFHIRToHL7Mapping("catchall/prt/prt-to-device").passed)
}
}
Loading

0 comments on commit 7e6bce6

Please sign in to comment.