FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: StructureMap/SHCToCoreDataSetVS

Packagewho.ddcc
Resource TypeStructureMap
IdSHCToCoreDataSetVS
FHIR VersionR4
Sourcehttp://smart.who.int/ddcc/https://build.fhir.org/ig/WorldHealthOrganization/ddcc/StructureMap-SHCToCoreDataSetVS.html
URLhttp://smart.who.int/ddcc/StructureMap/SHCToCoreDataSetVS
Version1.0.0
Statusdraft
Date2025-06-24T09:07:32+00:00
NameSHCToCoreDataSetVS
Realmuv
Authoritywho

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: StructureMap SHCToCoreDataSetVS

map "http://smart.who.int/ddcc/StructureMap/SHCToCoreDataSetVS" = "SHCToCoreDataSetVS"

uses "http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-bundle-dm" alias SHCVaccinationBundleDM as source
uses "http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-patient-general-dm" alias SHCPatientDM as source
uses "http://hl7.org/fhir/uv/shc-vaccination/StructureDefinition/shc-vaccination-dm" alias SHCImmunizationDM as source
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias DDCCBundle as target
uses "http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS" alias DDCCVS as target

group SHCToVS(source shc : SHCVaccinationBundleDM, target ddccBundle : DDCCBundle) {
  shc.entry as patientEntrySHC then {
    patientEntrySHC.resource : Patient first as patient then {
      shc.entry as entry then {
        // entry.resource : Immunization as immunization where vaccineCode.memberOf('http://smart.who.int/ddcc/ValueSet/who-ddcc-allowed-vaccines-covid-19') ->  ddccBundle.entry as outentry,  create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS') as ddcc then {
        entry.resource : Immunization as immunization ->  ddccBundle.entry as outentry,  create('http://smart.who.int/ddcc/StructureDefinition/DDCCCoreDataSetVS') as ddcc then {
          immunization then PatientToDDCCVS(patient, ddcc) "set patient";
          immunization -> ddcc.vaccination as vaccination then ImmunizationToDDCC(immunization, vaccination) "set vaccination";
          immunization -> outentry.resource = ddcc "set outentry";
        } "immunizations";
      } "entries";
    } "get patient";
  } "find patient";
}

group PatientToDDCCVS(source patient : SHCPatientDM, target tgt : DDCCVS) {
  patient.name as name then NameToText(name, tgt) "set name";
  patient.birthDate as birthDate -> tgt.birthDate = birthDate "set birthDate";
  patient.identifier first as identifier -> tgt.identifier = identifier "set identifier";
}

group NameToText(source name : HumanName, target ddcc) {
  // append doesn't work until ddcc.name is set
  name.given first as given -> ddcc.name = (given.replaceMatches('