{
  "resourceType" : "StructureMap",
  "id" : "IMMZD1HepatitisBQRToResources",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1HepatitisBQRToResources<span style=\"color: navy\">&quot; = &quot;</span>IMMZD1HepatitisBQRToResources<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Hepatitis B Immunization Client History - Transform QuestionnaireResponse to resources</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">&quot; </span><b>alias </b>QResp <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureDefinition-IMMZD1ClientHistoryHepatitisB.html\" title=\"IMMZ.D1 Capture Client History for Hepatitis B\">http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryHepatitisB</a><span style=\"color: navy\">&quot; </span><b>alias </b>IMMZD1 <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">&quot; </span><b>alias </b>Bundle <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-IMMZD1HepatitisBQRToLM.html\" title=\"IMMZD1HepatitisBQRToLM\">http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1HepatitisBQRToLM</a><span style=\"color: navy\">&quot;\r\n</span><b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-IMMZD1HepatitisBLMToResources.html\" title=\"IMMZD1HepatitisBLMToResources\">http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1HepatitisBLMToResources</a><span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>QRespToBundle<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">qr</span><span style=\"color: navy\"> : </span>QResp, <b>target</b> <span style=\"color: maroon\">bundle</span><span style=\"color: navy\"> : </span>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  qr<span style=\"color: navy\"><b> -&gt; </b></span><b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryHepatitisB'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">model</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    qr<span style=\"color: navy\"><b> -&gt; </b></span>model<b> then </b>HepatitisBQRespToIMMZD1<span style=\"color: navy\">(</span><span style=\"color: maroon\">qr</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">model</span><span style=\"color: navy\">)</span> <i>&quot;QRtoLM&quot;</i><span style=\"color: navy\">;</span>\r\n    qr<span style=\"color: navy\"><b> -&gt; </b></span>bundle<b> then </b>HepatitisBIMMZD1ToBundle<span style=\"color: navy\">(</span><span style=\"color: maroon\">model</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bundle</span><span style=\"color: navy\">)</span> <i>&quot;LMtoBundle&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;QRtoBundle&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
  },
  "url" : "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1HepatitisBQRToResources",
  "version" : "0.1.0",
  "name" : "IMMZD1HepatitisBQRToResources",
  "status" : "draft",
  "date" : "2024-04-04T07:29:23+00:00",
  "publisher" : "World Health Organization (WHO)",
  "contact" : [{
    "name" : "World Health Organization (WHO)",
    "telecom" : [{
      "system" : "url",
      "value" : "https://www.who.int"
    }]
  }],
  "description" : "Hepatitis B Immunization Client History - Transform QuestionnaireResponse to resources",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
      "code" : "001"
    }]
  }],
  "structure" : [{
    "url" : "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
    "mode" : "source",
    "alias" : "QResp"
  },
  {
    "url" : "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryHepatitisB",
    "mode" : "source",
    "alias" : "IMMZD1"
  },
  {
    "url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
    "mode" : "target",
    "alias" : "Bundle"
  }],
  "import" : ["http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1HepatitisBQRToLM",
  "http://smart.who.int/ig/smart-immunizations/StructureMap/IMMZD1HepatitisBLMToResources"],
  "group" : [{
    "name" : "QRespToBundle",
    "typeMode" : "none",
    "input" : [{
      "name" : "qr",
      "type" : "QResp",
      "mode" : "source"
    },
    {
      "name" : "bundle",
      "type" : "Bundle",
      "mode" : "target"
    }],
    "rule" : [{
      "name" : "QRtoBundle",
      "source" : [{
        "context" : "qr"
      }],
      "target" : [{
        "contextType" : "variable",
        "variable" : "model",
        "transform" : "create",
        "parameter" : [{
          "valueString" : "http://smart.who.int/ig/smart-immunizations/StructureDefinition/IMMZD1ClientHistoryHepatitisB"
        }]
      }],
      "rule" : [{
        "name" : "QRtoLM",
        "source" : [{
          "context" : "qr"
        }],
        "target" : [{
          "context" : "model",
          "contextType" : "variable"
        }],
        "dependent" : [{
          "name" : "HepatitisBQRespToIMMZD1",
          "variable" : ["qr",
          "model"]
        }]
      },
      {
        "name" : "LMtoBundle",
        "source" : [{
          "context" : "qr"
        }],
        "target" : [{
          "context" : "bundle",
          "contextType" : "variable"
        }],
        "dependent" : [{
          "name" : "HepatitisBIMMZD1ToBundle",
          "variable" : ["model",
          "bundle"]
        }]
      }]
    }]
  }]
}