HIMSRiskBehaviourQRToLM-PhysicalActivity
type: StructureMap
node role: treeRoot
id:
  v: HIMSRiskBehaviourQRToLM-PhysicalActivity
text:
  status:
    v: generated
  div: map "http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-PhysicalActivity" = "HIMSRiskBehaviourQRToLM-PhysicalActivity" // Maps the Risk Behaviour Questionnaire Response to the HIMS Logical Model data elements. uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QResp as source uses "http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary" 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 = 'physicalActivity' then { answer.value as coding then { coding.code as content -> immzc.physicalActivity = content "SetPhysicalActivity"; } "ProcessCoding"; } "FirstAnswerForPhysicalActivity"; } "processItems"; }
url:
  v: http://openhie.org/fhir/sri-lanka/StructureMap/HIMSRiskBehaviourQRToLM-PhysicalActivity
version:
  v: 0.1.0
name:
  v: HIMSRiskBehaviourQRToLM-PhysicalActivity
status:
  v: draft
date:
  v: 2023-11-10T04:37:53+00:00
publisher:
  v: Jembi Health Systems
contact:
  name:
    v: Jembi Health Systems
  telecom:
    system:
      v: url
    value:
      v: https://www.jembi.org
  telecom:
    system:
      v: email
contact:
  name:
    v: Richard Langford
  telecom:
    system:
      v: email
    use:
      v: work
description:
  v: Maps the Risk Behaviour Questionnaire Response to the HIMS Logical Model data elements.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
    code:
      v: 001
    display:
      v: World
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse
    link: http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse
  mode:
    v: source
  alias:
    v: QResp
structure:
  url:
    v: http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary
    link: http://openhie.org/fhir/sri-lanka/StructureDefinition/HIMSRiskBehaviourDataDictionary
  mode:
    v: target
  alias:
    v: IMMZC
group:
  name:
    v: QRespToIMMZC
  type mode:
    v: none
  input:
    name:
      v: qr
    type:
      v: QResp
    mode:
      v: source
  input:
    name:
      v: immzc
    type:
      v: IMMZC
    mode:
      v: target
  rule:
    name:
      v: processItems
    source:
      context:
        v: qr
      element:
        v: item
      variable:
        v: item
    rule:
      name:
        v: FirstAnswerForPhysicalActivity

v: item

v: answer

v: first

v: answer

v: item.linkId = 'physicalActivity'

v: ProcessCoding

context:
  v: answer
element:
  v: value
variable:
  v: coding

name:
  v: SetPhysicalActivity
source:
  context:
    v: coding
  element:
    v: code
  variable:
    v: content
target:
  context:
    v: immzc
  context type:
    v: variable
  element:
    v: physicalActivity
  transform:
    v: copy
  parameter:
    value:
      v: content