From dacf182306fd7bff16f1186d129ac62c74a0b126 Mon Sep 17 00:00:00 2001 From: Jose Costa Teixeira Date: Thu, 19 Oct 2023 07:08:14 +0200 Subject: [PATCH] rename map files --- ...C-LMToPatient.fml => IMMZCLMToPatient.fml} | 0 .../{IMMZ-C-QRToLM.fml => IMMZCQRToLM.fml} | 128 +++++++------- ...C-QRToPatient.fml => IMMZCQRToPatient.fml} | 166 +++++++++--------- ...oResources.fml => IMMZD1LMToResources.fml} | 0 .../{IMMZ-D1-QRToLM.fml => IMMZD1QRToLM.fml} | 112 ++++++------ ...oResources.fml => IMMZD1QRToResources.fml} | 36 ++-- ...oResources.fml => IMMZD4LMToResources.fml} | 0 .../{IMMZ-D4-QRToLM.fml => IMMZD4QRToLM.fml} | 40 ++--- ...oResources.fml => IMMZD4QRToResources.fml} | 36 ++-- .../codesystem-extended-content-codes.json | 0 .../anc_valuesets/valueset-anc-b9-de45.json | 0 .../anc_valuesets/valueset-anc-b9-de46.json | 0 .../anc_valuesets/valueset-anc-b9-de47.json | 0 .../ValueSet-active-condition.json | 0 .../ValueSet-inactive-condition.json | 0 ...et-careplanbirthcontrolmethods-values.json | 0 .../valueset-current-medications-values.json | 0 ...eset-devicebirthcontrolmethods-values.json | 0 .../valueset-drug-allergies-values.json | 0 .../existing_WHO/valueset-gender-values.json | 0 ...st-level-of-education-achieved-values.json | 0 .../valueset-hiv-stage-values.json | 0 .../valueset-hiv-test-result-values.json | 0 .../valueset-marital-status-values.json | 0 ...-medicationbirthcontrolmethods-values.json | 0 ...or-abortion-stage-of-pregnancy-values.json | 0 ...lueset-miscarriage-or-abortion-values.json | 0 .../valueset-nobirthcontrolmethod-values.json | 0 .../valueset-occupation-values.json | 0 .../valueset-payment-method-values.json | 0 .../valueset-pregnancystatus-values.json | 0 ...lueset-pregnancystatuspregnant-values.json | 0 ...t-procedurebirthcontrolmethods-values.json | 0 .../valueset-reason-for-referral-values.json | 0 .../valueset-referred-by-values.json | 0 ...et-sti-risk-assessment-factors-values.json | 0 .../valueset-visit-type-values.json | 0 .../existing_WHO/valueset-whoatc-uv-ips.json | 0 .../valueset/valueset-adverse-event-type.json | 0 39 files changed, 259 insertions(+), 259 deletions(-) rename input/maps/{IMMZ-C-LMToPatient.fml => IMMZCLMToPatient.fml} (100%) rename input/maps/{IMMZ-C-QRToLM.fml => IMMZCQRToLM.fml} (97%) rename input/maps/{IMMZ-C-QRToPatient.fml => IMMZCQRToPatient.fml} (97%) rename input/maps/{IMMZ-D1-LMToResources.fml => IMMZD1LMToResources.fml} (100%) rename input/maps/{IMMZ-D1-QRToLM.fml => IMMZD1QRToLM.fml} (97%) rename input/maps/{IMMZ-D1-QRToResources.fml => IMMZD1QRToResources.fml} (98%) rename input/maps/{IMMZ-D4-LMToResources.fml => IMMZD4LMToResources.fml} (100%) rename input/maps/{IMMZ-D4-QRToLM.fml => IMMZD4QRToLM.fml} (97%) rename input/maps/{IMMZ-D4-QRToResources.fml => IMMZD4QRToResources.fml} (98%) rename {input => zzzoldStuff}/vocabulary/codesystem/codesystem-extended-content-codes.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de45.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de46.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de47.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/cqf_valuesets/ValueSet-active-condition.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/cqf_valuesets/ValueSet-inactive-condition.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-careplanbirthcontrolmethods-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-current-medications-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-devicebirthcontrolmethods-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-drug-allergies-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-gender-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-highest-level-of-education-achieved-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-hiv-stage-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-hiv-test-result-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-marital-status-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-medicationbirthcontrolmethods-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-stage-of-pregnancy-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-nobirthcontrolmethod-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-occupation-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-payment-method-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-pregnancystatus-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-pregnancystatuspregnant-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-procedurebirthcontrolmethods-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-reason-for-referral-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-referred-by-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-sti-risk-assessment-factors-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-visit-type-values.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/existing_WHO/valueset-whoatc-uv-ips.json (100%) rename {input => zzzoldStuff}/vocabulary/valueset/valueset-adverse-event-type.json (100%) diff --git a/input/maps/IMMZ-C-LMToPatient.fml b/input/maps/IMMZCLMToPatient.fml similarity index 100% rename from input/maps/IMMZ-C-LMToPatient.fml rename to input/maps/IMMZCLMToPatient.fml diff --git a/input/maps/IMMZ-C-QRToLM.fml b/input/maps/IMMZCQRToLM.fml similarity index 97% rename from input/maps/IMMZ-C-QRToLM.fml rename to input/maps/IMMZCQRToLM.fml index 11a414d9c4..238f04f71f 100644 --- a/input/maps/IMMZ-C-QRToLM.fml +++ b/input/maps/IMMZCQRToLM.fml @@ -1,65 +1,65 @@ -map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCQRToLM" = "IMMZCQRToLM" - -uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source -uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZCRegisterClient" alias IMMZC as target - -group QRespToIMMZC ( source qr : QResp, target immzc : IMMZC) { - qr.item as item then { - - item.answer first as answer where item.linkId = 'uniqueId' then { - answer.value as content -> immzc.uniqueId = content "SetIdentifier"; - } "FirstAnswerForIdentifier"; - - item where item.linkId = 'name' then NameToIMMZC( item, immzc ) "SetNames"; - - item where item.linkId = 'caregiver' -> immzc.caregiver as caregiver then NameToIMMZC( item, caregiver ) "SetNames"; - - item.answer first as answer where item.linkId = 'sex' then { - answer.value as coding then { - coding.code as content -> immzc.sex = content "SetSex"; - } "ProcessCoding"; - } "FirstAnswerForIdentifier"; - - item.answer first as answer where item.linkId = 'birthDate' then { - answer.value as content -> immzc.birthDate = content "SetBirthDate2"; - } "FirstAnswerForBirthDate"; - - item.answer as caregiver where item.linkId = 'caregiver' -> immzc.caregiver as caretgt - then NameToIMMZC( caregiver, caretgt ) "SetCaregiver"; - - item.answer first as answer where item.linkId = 'phone' then { - answer.value as content -> immzc.phone = content "SetPhone"; - } "FirstAnswerForPhone"; - - item.answer first as answer where item.linkId = 'administrativeArea' then { - answer.value as coding -> immzc.administrativeArea as area then { - coding -> area.coding = coding "SetCodingValue"; - coding.display as display -> area.text = display "SetDisplay"; - } "SetCoding"; - } "FirstAnswerForAdministrativeArea"; - - item.answer first as answer where item.linkId = 'healthWorker' then { - answer.value as content -> immzc.healthWorker = content "SetHealthWorker"; - } "FirstAnswerForHealthWorker"; - - } "processItems"; - -} - -group NameToIMMZC( source name, target immzc) { - name.item as item then { - - item.answer first as answer where item.linkId = 'fullName' then { - answer.value as content -> immzc.name = content "SetFullName"; - } "FirstAnswerForFullName"; - - item.answer first as answer where item.linkId = 'firstName' then { - answer.value as content -> immzc.firstName = content "SetFirstName"; - } "FirstAnswerForFirstName"; - - item.answer first as answer where item.linkId = 'familyName' then { - answer.value as content -> immzc.familyName = content "SetFamilyName"; - } "FirstAnswerForFamilyName"; - - } "processNameItems"; +map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCQRToLM" = "IMMZCQRToLM" + +uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source +uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZCRegisterClient" alias IMMZC as target + +group QRespToIMMZC ( source qr : QResp, target immzc : IMMZC) { + qr.item as item then { + + item.answer first as answer where item.linkId = 'uniqueId' then { + answer.value as content -> immzc.uniqueId = content "SetIdentifier"; + } "FirstAnswerForIdentifier"; + + item where item.linkId = 'name' then NameToIMMZC( item, immzc ) "SetNames"; + + item where item.linkId = 'caregiver' -> immzc.caregiver as caregiver then NameToIMMZC( item, caregiver ) "SetNames"; + + item.answer first as answer where item.linkId = 'sex' then { + answer.value as coding then { + coding.code as content -> immzc.sex = content "SetSex"; + } "ProcessCoding"; + } "FirstAnswerForIdentifier"; + + item.answer first as answer where item.linkId = 'birthDate' then { + answer.value as content -> immzc.birthDate = content "SetBirthDate2"; + } "FirstAnswerForBirthDate"; + + item.answer as caregiver where item.linkId = 'caregiver' -> immzc.caregiver as caretgt + then NameToIMMZC( caregiver, caretgt ) "SetCaregiver"; + + item.answer first as answer where item.linkId = 'phone' then { + answer.value as content -> immzc.phone = content "SetPhone"; + } "FirstAnswerForPhone"; + + item.answer first as answer where item.linkId = 'administrativeArea' then { + answer.value as coding -> immzc.administrativeArea as area then { + coding -> area.coding = coding "SetCodingValue"; + coding.display as display -> area.text = display "SetDisplay"; + } "SetCoding"; + } "FirstAnswerForAdministrativeArea"; + + item.answer first as answer where item.linkId = 'healthWorker' then { + answer.value as content -> immzc.healthWorker = content "SetHealthWorker"; + } "FirstAnswerForHealthWorker"; + + } "processItems"; + +} + +group NameToIMMZC( source name, target immzc) { + name.item as item then { + + item.answer first as answer where item.linkId = 'fullName' then { + answer.value as content -> immzc.name = content "SetFullName"; + } "FirstAnswerForFullName"; + + item.answer first as answer where item.linkId = 'firstName' then { + answer.value as content -> immzc.firstName = content "SetFirstName"; + } "FirstAnswerForFirstName"; + + item.answer first as answer where item.linkId = 'familyName' then { + answer.value as content -> immzc.familyName = content "SetFamilyName"; + } "FirstAnswerForFamilyName"; + + } "processNameItems"; } \ No newline at end of file diff --git a/input/maps/IMMZ-C-QRToPatient.fml b/input/maps/IMMZCQRToPatient.fml similarity index 97% rename from input/maps/IMMZ-C-QRToPatient.fml rename to input/maps/IMMZCQRToPatient.fml index 13551363c9..4edf0a1e33 100644 --- a/input/maps/IMMZ-C-QRToPatient.fml +++ b/input/maps/IMMZCQRToPatient.fml @@ -1,84 +1,84 @@ -map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCQRToPatient" = "IMMZCQRToPatient" - -uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source -uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZCRegisterClient" alias IMMZC as source -uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target - -imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCQRToLM" -imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCLMToPatient" - -group QRestToIMMZC ( - source qr : QResp, - target patient: Patient -) { - qr -> create("http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZCRegisterClient") as model - then{ - qr -> model then QRespToIMMZC( qr, model) "QRtoLM"; - qr -> patient then IMMZCToPatient( model, patient ) "LMtoPatient"; - } "QRtoPatient"; -} - -/* -group QRespToIMMZC ( - source qr : QResp, - target patient : Patient -) { - qr.item as item then { - - item.answer first as answer where item.linkId = 'uniqueId' -> patient.identifier as identifier then { - answer.valueString as content -> identifier.value = content "set identifier"; - } "firstAnswerForIdentifier"; - - item as name where item.linkId = 'name' -> patient.name as pname then NameToHumanName( name, pname ) "setNames"; - - item.answer first as answer where item.linkId = 'sex' then { - answer.valueCoding as coding then { - coding.code as content -> patient.gender = translate(content, - 'http://worldhealthorganization.github.io/smart-immunizations-mini/ConceptMap/IMMZ.C.SexToAdministrativeGender', - 'code') "setSex"; - } "processCoding"; - } "firstAnswerForIdentifier2"; - - item.answer first as answer where item.linkId = 'birthDate' then { - answer.valueDate as content -> patient.birthDate = content "set birthDate"; - } "firstAnswerForBirthDate"; - - item as caregiver where item.linkId = 'caregiver' -> patient.contact as contact, contact.name as hname - then NameToHumanName( caregiver, hname ) "set caregiver"; - - item.answer first as answer where item.linkId = 'phone' -> patient.telecom as telecom then { - answer.valueString as content -> telecom.value = content, telecom.system = 'phone' "setPhone"; - } "firstAnswerForPhone"; - - item.answer first as answer where item.linkId = 'administrativeArea' -> patient.address as address then { - answer.valueCoding first as coding -> address then { - coding.code as content -> address.text = content "setAddressToCode"; - coding.display as content -> address.text = content "setAddressToDisplay"; - } "setAddressText"; - } "firstAnswerForAdministrativeArea"; - - } "processItems"; - -} - -group NameToHumanName( - source name, - target hname -) { - name.item as item then { - - item.answer first as answer where item.linkId = 'fullName' then { - answer.valueString as content -> hname.text = content "set full name"; - } "firstAnswerForFullName"; - - item.answer first as answer where item.linkId = 'firstName' then { - answer.valueString as content -> hname.given = content "set first name"; - } "firstAnswerForFirstName"; - - item.answer first as answer where item.linkId = 'familyName' then { - answer.valueString as content -> hname.family = content "set family name"; - } "firstAnswerForFamilyName"; - - } "processNameItems"; -} +map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCQRToPatient" = "IMMZCQRToPatient" + +uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source +uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZCRegisterClient" alias IMMZC as source +uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target + +imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCQRToLM" +imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZCLMToPatient" + +group QRestToIMMZC ( + source qr : QResp, + target patient: Patient +) { + qr -> create("http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZCRegisterClient") as model + then{ + qr -> model then QRespToIMMZC( qr, model) "QRtoLM"; + qr -> patient then IMMZCToPatient( model, patient ) "LMtoPatient"; + } "QRtoPatient"; +} + +/* +group QRespToIMMZC ( + source qr : QResp, + target patient : Patient +) { + qr.item as item then { + + item.answer first as answer where item.linkId = 'uniqueId' -> patient.identifier as identifier then { + answer.valueString as content -> identifier.value = content "set identifier"; + } "firstAnswerForIdentifier"; + + item as name where item.linkId = 'name' -> patient.name as pname then NameToHumanName( name, pname ) "setNames"; + + item.answer first as answer where item.linkId = 'sex' then { + answer.valueCoding as coding then { + coding.code as content -> patient.gender = translate(content, + 'http://worldhealthorganization.github.io/smart-immunizations-mini/ConceptMap/IMMZ.C.SexToAdministrativeGender', + 'code') "setSex"; + } "processCoding"; + } "firstAnswerForIdentifier2"; + + item.answer first as answer where item.linkId = 'birthDate' then { + answer.valueDate as content -> patient.birthDate = content "set birthDate"; + } "firstAnswerForBirthDate"; + + item as caregiver where item.linkId = 'caregiver' -> patient.contact as contact, contact.name as hname + then NameToHumanName( caregiver, hname ) "set caregiver"; + + item.answer first as answer where item.linkId = 'phone' -> patient.telecom as telecom then { + answer.valueString as content -> telecom.value = content, telecom.system = 'phone' "setPhone"; + } "firstAnswerForPhone"; + + item.answer first as answer where item.linkId = 'administrativeArea' -> patient.address as address then { + answer.valueCoding first as coding -> address then { + coding.code as content -> address.text = content "setAddressToCode"; + coding.display as content -> address.text = content "setAddressToDisplay"; + } "setAddressText"; + } "firstAnswerForAdministrativeArea"; + + } "processItems"; + +} + +group NameToHumanName( + source name, + target hname +) { + name.item as item then { + + item.answer first as answer where item.linkId = 'fullName' then { + answer.valueString as content -> hname.text = content "set full name"; + } "firstAnswerForFullName"; + + item.answer first as answer where item.linkId = 'firstName' then { + answer.valueString as content -> hname.given = content "set first name"; + } "firstAnswerForFirstName"; + + item.answer first as answer where item.linkId = 'familyName' then { + answer.valueString as content -> hname.family = content "set family name"; + } "firstAnswerForFamilyName"; + + } "processNameItems"; +} */ \ No newline at end of file diff --git a/input/maps/IMMZ-D1-LMToResources.fml b/input/maps/IMMZD1LMToResources.fml similarity index 100% rename from input/maps/IMMZ-D1-LMToResources.fml rename to input/maps/IMMZD1LMToResources.fml diff --git a/input/maps/IMMZ-D1-QRToLM.fml b/input/maps/IMMZD1QRToLM.fml similarity index 97% rename from input/maps/IMMZ-D1-QRToLM.fml rename to input/maps/IMMZD1QRToLM.fml index f42088eb17..c0f310fa96 100644 --- a/input/maps/IMMZ-D1-QRToLM.fml +++ b/input/maps/IMMZD1QRToLM.fml @@ -1,57 +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"; - +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"; + } \ No newline at end of file diff --git a/input/maps/IMMZ-D1-QRToResources.fml b/input/maps/IMMZD1QRToResources.fml similarity index 98% rename from input/maps/IMMZ-D1-QRToResources.fml rename to input/maps/IMMZD1QRToResources.fml index c07b65ea4e..3e5085acf0 100644 --- a/input/maps/IMMZ-D1-QRToResources.fml +++ b/input/maps/IMMZD1QRToResources.fml @@ -1,19 +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"; +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"; } \ No newline at end of file diff --git a/input/maps/IMMZ-D4-LMToResources.fml b/input/maps/IMMZD4LMToResources.fml similarity index 100% rename from input/maps/IMMZ-D4-LMToResources.fml rename to input/maps/IMMZD4LMToResources.fml diff --git a/input/maps/IMMZ-D4-QRToLM.fml b/input/maps/IMMZD4QRToLM.fml similarity index 97% rename from input/maps/IMMZ-D4-QRToLM.fml rename to input/maps/IMMZD4QRToLM.fml index 6be9dcce14..7fe470640f 100644 --- a/input/maps/IMMZ-D4-QRToLM.fml +++ b/input/maps/IMMZD4QRToLM.fml @@ -1,20 +1,20 @@ -map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4QRToLM" = "IMMZD4QRToLM" - -uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source -uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD4CheckContraindications" alias IMMZD4 as target - -group QRespToIMMZD4 ( source qr : QResp, target immz : IMMZD4) { - - qr.subject as patient -> immz.patient = patient "SetPatient"; - - qr.item as item then { - - - - item.answer as answer where item.linkId = 'contraindications' then { - answer.value as content -> immz.contraindications = content "SetContraindication"; - } "SetContraindicationAnswer"; - - } "processItems"; -} - +map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4QRToLM" = "IMMZD4QRToLM" + +uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source +uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD4CheckContraindications" alias IMMZD4 as target + +group QRespToIMMZD4 ( source qr : QResp, target immz : IMMZD4) { + + qr.subject as patient -> immz.patient = patient "SetPatient"; + + qr.item as item then { + + + + item.answer as answer where item.linkId = 'contraindications' then { + answer.value as content -> immz.contraindications = content "SetContraindication"; + } "SetContraindicationAnswer"; + + } "processItems"; +} + diff --git a/input/maps/IMMZ-D4-QRToResources.fml b/input/maps/IMMZD4QRToResources.fml similarity index 98% rename from input/maps/IMMZ-D4-QRToResources.fml rename to input/maps/IMMZD4QRToResources.fml index ba4e13c828..dd394906cc 100644 --- a/input/maps/IMMZ-D4-QRToResources.fml +++ b/input/maps/IMMZD4QRToResources.fml @@ -1,19 +1,19 @@ -map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4QRToResources" = "IMMZD4QRToResources" - -uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source -uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD4CheckContraindications" alias IMMZD4 as source -uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target - -imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4QRToLM" -imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4LMToResources" - -group QRespToBundle ( - source qr : QResp, - target bundle: Bundle -) { - qr -> create("http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD4CheckContraindications") as model - then{ - qr -> model then QRespToIMMZD4( qr, model) "QRtoLM"; - qr -> bundle then IMMZD4ToBundle( model, bundle ) "LMtoBundle"; - } "QRtoBundle"; +map "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4QRToResources" = "IMMZD4QRToResources" + +uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source +uses "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD4CheckContraindications" alias IMMZD4 as source +uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target + +imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4QRToLM" +imports "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD4LMToResources" + +group QRespToBundle ( + source qr : QResp, + target bundle: Bundle +) { + qr -> create("http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD4CheckContraindications") as model + then{ + qr -> model then QRespToIMMZD4( qr, model) "QRtoLM"; + qr -> bundle then IMMZD4ToBundle( model, bundle ) "LMtoBundle"; + } "QRtoBundle"; } \ No newline at end of file diff --git a/input/vocabulary/codesystem/codesystem-extended-content-codes.json b/zzzoldStuff/vocabulary/codesystem/codesystem-extended-content-codes.json similarity index 100% rename from input/vocabulary/codesystem/codesystem-extended-content-codes.json rename to zzzoldStuff/vocabulary/codesystem/codesystem-extended-content-codes.json diff --git a/input/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de45.json b/zzzoldStuff/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de45.json similarity index 100% rename from input/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de45.json rename to zzzoldStuff/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de45.json diff --git a/input/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de46.json b/zzzoldStuff/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de46.json similarity index 100% rename from input/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de46.json rename to zzzoldStuff/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de46.json diff --git a/input/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de47.json b/zzzoldStuff/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de47.json similarity index 100% rename from input/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de47.json rename to zzzoldStuff/vocabulary/valueset/anc_valuesets/valueset-anc-b9-de47.json diff --git a/input/vocabulary/valueset/cqf_valuesets/ValueSet-active-condition.json b/zzzoldStuff/vocabulary/valueset/cqf_valuesets/ValueSet-active-condition.json similarity index 100% rename from input/vocabulary/valueset/cqf_valuesets/ValueSet-active-condition.json rename to zzzoldStuff/vocabulary/valueset/cqf_valuesets/ValueSet-active-condition.json diff --git a/input/vocabulary/valueset/cqf_valuesets/ValueSet-inactive-condition.json b/zzzoldStuff/vocabulary/valueset/cqf_valuesets/ValueSet-inactive-condition.json similarity index 100% rename from input/vocabulary/valueset/cqf_valuesets/ValueSet-inactive-condition.json rename to zzzoldStuff/vocabulary/valueset/cqf_valuesets/ValueSet-inactive-condition.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-careplanbirthcontrolmethods-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-careplanbirthcontrolmethods-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-careplanbirthcontrolmethods-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-careplanbirthcontrolmethods-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-current-medications-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-current-medications-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-current-medications-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-current-medications-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-devicebirthcontrolmethods-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-devicebirthcontrolmethods-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-devicebirthcontrolmethods-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-devicebirthcontrolmethods-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-drug-allergies-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-drug-allergies-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-drug-allergies-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-drug-allergies-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-gender-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-gender-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-gender-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-gender-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-highest-level-of-education-achieved-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-highest-level-of-education-achieved-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-highest-level-of-education-achieved-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-highest-level-of-education-achieved-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-hiv-stage-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-hiv-stage-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-hiv-stage-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-hiv-stage-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-hiv-test-result-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-hiv-test-result-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-hiv-test-result-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-hiv-test-result-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-marital-status-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-marital-status-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-marital-status-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-marital-status-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-medicationbirthcontrolmethods-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-medicationbirthcontrolmethods-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-medicationbirthcontrolmethods-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-medicationbirthcontrolmethods-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-stage-of-pregnancy-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-stage-of-pregnancy-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-stage-of-pregnancy-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-stage-of-pregnancy-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-miscarriage-or-abortion-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-nobirthcontrolmethod-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-nobirthcontrolmethod-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-nobirthcontrolmethod-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-nobirthcontrolmethod-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-occupation-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-occupation-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-occupation-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-occupation-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-payment-method-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-payment-method-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-payment-method-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-payment-method-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-pregnancystatus-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-pregnancystatus-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-pregnancystatus-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-pregnancystatus-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-pregnancystatuspregnant-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-pregnancystatuspregnant-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-pregnancystatuspregnant-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-pregnancystatuspregnant-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-procedurebirthcontrolmethods-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-procedurebirthcontrolmethods-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-procedurebirthcontrolmethods-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-procedurebirthcontrolmethods-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-reason-for-referral-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-reason-for-referral-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-reason-for-referral-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-reason-for-referral-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-referred-by-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-referred-by-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-referred-by-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-referred-by-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-sti-risk-assessment-factors-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-sti-risk-assessment-factors-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-sti-risk-assessment-factors-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-sti-risk-assessment-factors-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-visit-type-values.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-visit-type-values.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-visit-type-values.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-visit-type-values.json diff --git a/input/vocabulary/valueset/existing_WHO/valueset-whoatc-uv-ips.json b/zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-whoatc-uv-ips.json similarity index 100% rename from input/vocabulary/valueset/existing_WHO/valueset-whoatc-uv-ips.json rename to zzzoldStuff/vocabulary/valueset/existing_WHO/valueset-whoatc-uv-ips.json diff --git a/input/vocabulary/valueset/valueset-adverse-event-type.json b/zzzoldStuff/vocabulary/valueset/valueset-adverse-event-type.json similarity index 100% rename from input/vocabulary/valueset/valueset-adverse-event-type.json rename to zzzoldStuff/vocabulary/valueset/valueset-adverse-event-type.json