Generated Narrative: StructureMap EMM3Extraction #xD; map "http://fhir.mn/core/StructureMap/EMM3Extraction" = "EMM3Extraction"#xD; #xD; uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QuestionnaireResponse as source#xD; uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target#xD; uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target#xD; #xD; group EMM3Extraction(source src : QuestionnaireResponse, target bnd : Bundle) {#xD; // We're taking a QuestionnaireResponse and creating a transaction Bundle#xD; src -> bnd.id = uuid() "bundleid";#xD; src -> bnd.type = 'transaction' "bundletype";#xD; // Navigate into the demographic group of the form to extract Patient#xD; src.item as item where linkId = 'demographics' -> bnd.entry as entry, entry.resource = create('Patient') as patient then ExtractPatient(item, patient) "extractpatient";#xD; }#xD; #xD; group ExtractPatient(source item, target patient : Patient) {#xD; // Find the family name item and map its string answer to Patient.name.family#xD; item.item as i where linkId = 'demographics.family-name' then {#xD; i.answer as ans then {#xD; ans.value : string as v -> patient.name as n, n.family = v "patientfamilyname";#xD; };#xD; };#xD; // Find the given name item and map its string answer to Patient.name.given#xD; item.item as i where linkId = 'demographics.given-name' then {#xD; i.answer as ans then {#xD; ans.value : string as v -> patient.name as n, n.given = v "patientgivenname";#xD; };#xD; };#xD; }#xD; #xD;
Эрүүл мэндийн хөгжлийн төв (Health Development Center, Mongolia)
Эрүүл мэндийн хөгжлийн төв (Health Development Center)