HL7 FHIR Implementation Guide: Sri Lanka
0.1.0 - STU1 International flag

HL7 FHIR Implementation Guide: Sri Lanka, published by Jembi Health Systems. This is not an authorized publication; it is the continuous build for version 0.1.0. This version is based on the current content of https://github.com/jembi/Sri-Lanka and changes regularly. See the Directory of published versions

StructureMap:

Official URL: http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryQRToCondition Version: 0.1.0
Draft as of 2023-11-10 Computable Name: HIMSMedicalHistoryQRToCondition

Maps the Medical History Questionnaire Response to the HIMS Condition resource data elements.

map "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryQRToCondition" = "HIMSMedicalHistoryQRToCondition"

// Maps the Medical History Questionnaire Response to the HIMS Condition resource data elements.

uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source
uses "http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSMedicalHistoryDataDictionary" alias IMMZC as source
uses "http://hl7.org/fhir/StructureDefinition/Bundle" as target
uses "http://hl7.org/fhir/StructureDefinition/Condition" as target

imports "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryQRToLM"
imports "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSMedicalHistoryLMToCondition"

group QRestToIMMZC(source qr : QResp, target bundle : Bundle) {
  qr -> bundle.id = uuid() "ruleBundleId";
  qr -> bundle.type = 'collection' "ruleBundleType";
  qr ->  bundle.entry as entry,  entry.resource = create('Condition') as condition,  create('http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSMedicalHistoryDataDictionary') as model then {
    qr -> model then QRespToIMMZC(qr, model) "QRtoLM";
    qr -> condition then DataDictToCondition(model, condition) "LMtoCondition";
    qr -> condition.code = create('CodeableConcept') as code "SetCode";
  } "QRtoCondition";
}