-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added in structuremaps for D1 Client History.
- Loading branch information
1 parent
72c0e71
commit e37cd65
Showing
11 changed files
with
352 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Instance: Example.IMMZ.D1.QuestionnaireResponse.1 | ||
InstanceOf: QuestionnaireResponse | ||
Usage: #example | ||
* status = #completed | ||
* authored = "2023-10-18T19:20:20.913Z" | ||
* questionnaire = Canonical(QIMMZD1ClientHistoryMeasles) | ||
* subject = Reference(patient123456) | ||
|
||
* item[+] | ||
* linkId = "dose0" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "completedPrimarySeries" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "hivStatus" | ||
* answer.valueCoding = IMMZ.D1#DE12 | ||
* item[+] | ||
* linkId = "pretermBirth" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "severelyImmunosuppressed" | ||
* answer.valueBoolean = false | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Instance: Example.IMMZ.D1.QuestionnaireResponse.2 | ||
InstanceOf: QuestionnaireResponse | ||
Usage: #example | ||
* status = #completed | ||
* authored = "2023-10-18T19:20:20.913Z" | ||
* questionnaire = Canonical(QIMMZD1ClientHistoryMeasles) | ||
* subject = Reference(patient654321) | ||
|
||
* item[+] | ||
* linkId = "dose0" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "completedPrimarySeries" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "hivStatus" | ||
* answer.valueCoding = IMMZ.D1#DE12 | ||
* item[+] | ||
* linkId = "pretermBirth" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "severelyImmunosuppressed" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "vaccineHistory" | ||
* item[+] | ||
* linkId = "vaccineType" | ||
* answer.valueCoding = $ICD11#XM4AJ8 | ||
* item[+] | ||
* linkId = "vaccineDate" | ||
* answer.valueDate = "2023-04-05" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Instance: Example.IMMZ.D1.QuestionnaireResponse.3 | ||
InstanceOf: QuestionnaireResponse | ||
Usage: #example | ||
* status = #completed | ||
* authored = "2023-10-18T19:20:20.913Z" | ||
* questionnaire = Canonical(QIMMZD1ClientHistoryMeasles) | ||
* subject = Reference(patient654321) | ||
|
||
* item[+] | ||
* linkId = "dose0" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "completedPrimarySeries" | ||
* answer.valueBoolean = true | ||
* item[+] | ||
* linkId = "dateSeriesCompleted" | ||
* answer.valueDate = "2023-01-01" | ||
* item[+] | ||
* linkId = "hivStatus" | ||
* answer.valueCoding = IMMZ.D1#DE11 | ||
* item[+] | ||
* linkId = "pretermBirth" | ||
* answer.valueBoolean = false | ||
* item[+] | ||
* linkId = "severelyImmunosuppressed" | ||
* answer.valueBoolean = true | ||
* item[+] | ||
* linkId = "artStartDate" | ||
* answer.valueDate = "2022-06-01" | ||
* item[+] | ||
* linkId = "vaccineHistory" | ||
* item[+] | ||
* linkId = "vaccineType" | ||
* answer.valueCoding = $ICD11#XM4AJ8 | ||
* item[+] | ||
* linkId = "vaccineDate" | ||
* answer.valueDate = "2023-04-05" | ||
* item[+] | ||
* linkId = "vaccineHistory" | ||
* item[+] | ||
* linkId = "vaccineType" | ||
* answer.valueCoding = $ICD11#XM4AJ8 | ||
* item[+] | ||
* linkId = "vaccineDate" | ||
* answer.valueDate = "2023-10-05" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Instance: patient654321 | ||
InstanceOf: Patient | ||
Usage: #example | ||
|
||
* id = "P654321" | ||
* identifier.value = "654321" | ||
* name[+] | ||
* text = "Test Patient" | ||
* family = "Patient" | ||
* given = "Test" | ||
* gender = #female | ||
* birthDate = "2022-04-01" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1LMToResources" = "IMMZD1LMToResources" | ||
|
||
uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryMeasles" alias IMMZD1 as source | ||
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target | ||
|
||
group IMMZD1ToBundle (source immz : IMMZD1, target bundle: Bundle) { | ||
immz -> bundle.type = 'collection' "SetCollection"; | ||
|
||
immz.patient as patient then { | ||
|
||
|
||
immz.dose0 as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE80' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.value = content "SetValue"; | ||
} "SetDose0Observation"; | ||
|
||
immz.completedPrimarySeries as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE8' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.value = content "SetValue"; | ||
} "SetPrimarySeriesObservation"; | ||
|
||
immz.dateSeriesCompleted as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE81' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.value = content "SetValue"; | ||
} "SetDateSeriesObservation"; | ||
|
||
immz.hivStatus as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE10' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.valueCodeableConcept as code then { | ||
content -> code.coding = content "SetCoding"; | ||
} "SetCodeableConcept"; | ||
} "SetHIVStatusObservation"; | ||
|
||
immz.pretermBirth as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE15' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.value = content "SetValue"; | ||
} "SetPretermBirthObservation"; | ||
|
||
immz.severelyImmunosuppressed as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE92' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.value = content "SetValue"; | ||
} "SetSeverelyImmunosuppressedObservation"; | ||
|
||
immz.artStartDate as content -> bundle.entry as entry, entry.resource = create('Observation') as obs then { | ||
patient -> obs.subject = patient "SetPatient"; | ||
content -> obs.code as code then { | ||
content -> code.coding as coding then { | ||
content -> coding.system = 'http://smart.who.int/ig/smart-immunizations/CodeSystem/IMMZ.D1' "SetObsSystem"; | ||
content -> coding.code = 'DE49' "SetObsCode"; | ||
} "SetObsCoding"; | ||
} "SetObsCode"; | ||
content -> obs.value = content "SetValue"; | ||
} "SetARTDateObservation"; | ||
|
||
immz.vaccineHistory as history -> bundle.entry as entry, entry.resource = create('Immunization') as imm then { | ||
patient -> imm.patient = patient "SetPatient"; | ||
history -> imm.status = 'completed' "SetStatus"; | ||
|
||
history.vaccineType as vaccine -> imm.vaccineCode as code then { | ||
vaccine -> code.coding = vaccine "SetVaccineCoding"; | ||
} "SetVaccineType"; | ||
history.vaccineDate as date -> imm.occurrence = cast(date, 'dateTime') "SetDate"; | ||
|
||
} "SetVaccineHistoryObservation"; | ||
|
||
} "GetPatient"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1QRToLM" = "IMMZD1QRToLM" | ||
|
||
uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source | ||
uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryMeasles" alias IMMZD1 as target | ||
|
||
group QRespToIMMZD1 ( source qr : QResp, target immz : IMMZD1) { | ||
|
||
qr.subject as patient -> immz.patient = patient "SetPatient"; | ||
|
||
qr.item as item then { | ||
|
||
item.answer first as answer where item.linkId = 'dose0' then { | ||
answer.value as content -> immz.dose0 = content "SetDose0"; | ||
} "FirstAnswerForDose0"; | ||
|
||
item.answer first as answer where item.linkId = 'completedPrimarySeries' then { | ||
answer.value as content -> immz.completedPrimarySeries = content "SetCompletedPrimarySeries"; | ||
} "FirstAnswerForCompletedPrimarySeries"; | ||
|
||
item.answer first as answer where item.linkId = 'dateSeriesCompleted' then { | ||
answer.value as content -> immz.dateSeriesCompleted = content "SetDateSeriesCompleted"; | ||
} "FirstAnswerDateSeriesCompleted"; | ||
|
||
item.answer first as answer where item.linkId = 'hivStatus' then { | ||
answer.value as coding -> immz.hivStatus = coding "SetHIVStatus"; | ||
} "FirstAnswerForHIVStatus"; | ||
|
||
item.answer first as answer where item.linkId = 'pretermBirth' then { | ||
answer.value as content -> immz.pretermBirth = content "SetPretermBirth"; | ||
} "FirstAnswerForPretermBirth"; | ||
|
||
item.answer first as answer where item.linkId = 'severelyImmunosuppressed' then { | ||
answer.value as content -> immz.severelyImmunosuppressed = content "SetSeverelyImmunosuppressed"; | ||
} "FirstAnswerForSeverelyImmunosuppressed"; | ||
|
||
|
||
item.answer first as answer where item.linkId = 'artStartDate' then { | ||
answer.value as content -> immz.artStartDate = content "SetARTStartDated"; | ||
} "FirstAnswerARTStartDate"; | ||
|
||
item as history where item.linkId = 'vaccineHistory' -> immz.vaccineHistory as vaccine then { | ||
history.item as entry then { | ||
entry.answer as answer where entry.linkId = 'vaccineType' then { | ||
answer.value as coding -> vaccine.vaccineType = coding "SetVaccineType"; | ||
} "AnswerForVaccineType"; | ||
|
||
entry.answer as answer where entry.linkId = 'vaccineDate' then { | ||
answer.value as content -> vaccine.vaccineDate = content "SetVaccineDate"; | ||
} "AnswerForVaccineDate"; | ||
|
||
} "HistoryLoop"; | ||
|
||
} "ForVaccineHistory"; | ||
|
||
} "processItems"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1QRToResources" = "IMMZD1QRToResources" | ||
|
||
uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source | ||
uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryMeasles" alias IMMZD1 as source | ||
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target | ||
|
||
imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1QRToLM" | ||
imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1LMToResources" | ||
|
||
group QRespToBundle ( | ||
source qr : QResp, | ||
target bundle: Bundle | ||
) { | ||
qr -> create("http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryMeasles") as model | ||
then{ | ||
qr -> model then QRespToIMMZD1( qr, model) "QRtoLM"; | ||
qr -> bundle then IMMZD1ToBundle( model, bundle ) "LMtoBundle"; | ||
} "QRtoBundle"; | ||
} |
Oops, something went wrong.