PreNUDGE FHIR® IG for Data Provider / Data from Apps (R4)
0.1.0 - ci-build

PreNUDGE FHIR® IG for Data Provider / Data from Apps (R4) - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

## : WHOQOL-BREF Q score to O score - JSON Representation

Active as of 2026-06-18

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "WHOQOLBrefQuestionnaireResponseToObservation",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap WHOQOLBrefQuestionnaireResponseToObservation</b></p><a name=\"WHOQOLBrefQuestionnaireResponseToObservation\"> </a><a name=\"hcWHOQOLBrefQuestionnaireResponseToObservation\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/WHOQOLBrefQuestionnaireResponseToObservation<span style=\"color: navy\">&quot; = &quot;</span>WHOQOLBrefQuestionnaireResponseToObservation<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">WHOQOL-BREF Q score to O score</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>QR <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/observation.html\" title=\"Observation\">http://hl7.org/fhir/StructureDefinition/Observation</a><span style=\"color: navy\">&quot; </span><b>alias </b>Obs <b>as </b><b>target</b>\r\n\r\n<b>imports</b><span style=\"color: navy\"> &quot;</span>http://hl7.org/fhir/StructureMap/*<span style=\"color: navy\">&quot;\r\n</span><b>imports</b><span style=\"color: navy\"> &quot;</span><a href=\"StructureMap-QuestionnaireResponseToObservationBase.html\" title=\"Shared base for Q to O\">https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/QuestionnaireResponseToObservationBase</a><span style=\"color: navy\">&quot;\r\n</span>\r\n<b>group </b>WHOQOLBrefQuestionnaireResponseToObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src<b> then </b>SetObservationBase<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>&quot;Base&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span> tgt.meta<b> as </b><span style=\"color: maroon\">meta</span><span style=\"color: navy\">, </span> meta.profile = <span style=\"color: blue\">'https://fhir.hl7.at/prenudge/appdata/r4/StructureDefinition/at-prenudge-whoqol-bref-score-observation'</span> <i>&quot;SetProfile&quot;</i><span style=\"color: navy\">;</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'405152002'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Quality of life'</span><span style=\"color: navy\">)</span> <i>&quot;SetCode&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">// </span><span style=\"color: green\">EffectiveDateTime from authored</span>\r\n  src.authored<b> as </b><span style=\"color: maroon\">authored</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.effectiveDateTime = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'dateTime'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">dt</span><span style=\"color: navy\">, </span> dt.value = <span style=\"color: maroon\">authored</span> <i>&quot;SetEffective&quot;</i><span style=\"color: navy\">;</span>\r\n  src.item<b> as </b><span style=\"color: maroon\">generalGroup</span><b> where </b>linkId = 'general'<b> then</b><span style=\"color: navy\"> {\r\n</span>    generalGroup.item<b> as </b><span style=\"color: maroon\">scoreItem</span><b> where </b>linkId = 'general-score'<b> then </b>MapGeneralScore<span style=\"color: navy\">(</span><span style=\"color: maroon\">scoreItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>&quot;MapGeneralScore&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessGeneral&quot;</i><span style=\"color: navy\">;</span>\r\n  src.item<b> as </b><span style=\"color: maroon\">domain1Group</span><b> where </b>linkId = 'domain1'<b> then</b><span style=\"color: navy\"> {\r\n</span>    domain1Group.item<b> as </b><span style=\"color: maroon\">scoreItem</span><b> where </b>linkId = 'domain1-score'<b> then </b>MapPhysicalScore<span style=\"color: navy\">(</span><span style=\"color: maroon\">scoreItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>&quot;MapDomain1Score&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessDomain1&quot;</i><span style=\"color: navy\">;</span>\r\n  src.item<b> as </b><span style=\"color: maroon\">domain2Group</span><b> where </b>linkId = 'domain2'<b> then</b><span style=\"color: navy\"> {\r\n</span>    domain2Group.item<b> as </b><span style=\"color: maroon\">scoreItem</span><b> where </b>linkId = 'domain2-score'<b> then </b>MapPsychologicalScore<span style=\"color: navy\">(</span><span style=\"color: maroon\">scoreItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>&quot;MapDomain2Score&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessDomain2&quot;</i><span style=\"color: navy\">;</span>\r\n  src.item<b> as </b><span style=\"color: maroon\">domain3Group</span><b> where </b>linkId = 'domain3'<b> then</b><span style=\"color: navy\"> {\r\n</span>    domain3Group.item<b> as </b><span style=\"color: maroon\">scoreItem</span><b> where </b>linkId = 'domain3-score'<b> then </b>MapRelationshipsScore<span style=\"color: navy\">(</span><span style=\"color: maroon\">scoreItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>&quot;MapDomain3Score&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessDomain3&quot;</i><span style=\"color: navy\">;</span>\r\n  src.item<b> as </b><span style=\"color: maroon\">domain4Group</span><b> where </b>linkId = 'domain4'<b> then</b><span style=\"color: navy\"> {\r\n</span>    domain4Group.item<b> as </b><span style=\"color: maroon\">scoreItem</span><b> where </b>linkId = 'domain4-score'<b> then </b>MapEnvironmentScore<span style=\"color: navy\">(</span><span style=\"color: maroon\">scoreItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>&quot;MapDomain4Score&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessDomain4&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">TODO: Comment/Note mapping disabled due to MaLaC-HD limitation</span>\r\n<span style=\"color: navy\">// </span><span style=\"color: green\">See: https://gitlab.com/cdehealth/malac-hd/-/issues/128</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>MapGeneralScore<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    answer.valueDecimal<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      val.value<b> as </b><span style=\"color: maroon\">numVal</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.component<b> as </b><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span> comp.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'60132005'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Generalized'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> comp.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><span style=\"color: navy\">, </span> qty.value = <span style=\"color: maroon\">numVal</span><span style=\"color: navy\">, </span> qty.unit = <span style=\"color: blue\">'score'</span><span style=\"color: navy\">, </span> qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span><span style=\"color: navy\">, </span> qty.code = <span style=\"color: blue\">'{score}'</span> <i>&quot;SetComponent&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;ExtractValue&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAnswer&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>MapPhysicalScore<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    answer.valueDecimal<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      val.value<b> as </b><span style=\"color: maroon\">numVal</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.component<b> as </b><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span> comp.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'19388002'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Physical'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> comp.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><span style=\"color: navy\">, </span> qty.value = <span style=\"color: maroon\">numVal</span><span style=\"color: navy\">, </span> qty.unit = <span style=\"color: blue\">'score'</span><span style=\"color: navy\">, </span> qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span><span style=\"color: navy\">, </span> qty.code = <span style=\"color: blue\">'{score}'</span> <i>&quot;SetComponent&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;ExtractValue&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAnswer&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>MapPsychologicalScore<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    answer.valueDecimal<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      val.value<b> as </b><span style=\"color: maroon\">numVal</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.component<b> as </b><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span> comp.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'60224009'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Psychologic'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> comp.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><span style=\"color: navy\">, </span> qty.value = <span style=\"color: maroon\">numVal</span><span style=\"color: navy\">, </span> qty.unit = <span style=\"color: blue\">'score'</span><span style=\"color: navy\">, </span> qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span><span style=\"color: navy\">, </span> qty.code = <span style=\"color: blue\">'{score}'</span> <i>&quot;SetComponent&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;ExtractValue&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAnswer&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>MapRelationshipsScore<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    answer.valueDecimal<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      val.value<b> as </b><span style=\"color: maroon\">numVal</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.component<b> as </b><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span> comp.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'272151006'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Relationships'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> comp.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><span style=\"color: navy\">, </span> qty.value = <span style=\"color: maroon\">numVal</span><span style=\"color: navy\">, </span> qty.unit = <span style=\"color: blue\">'score'</span><span style=\"color: navy\">, </span> qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span><span style=\"color: navy\">, </span> qty.code = <span style=\"color: blue\">'{score}'</span> <i>&quot;SetComponent&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;ExtractValue&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAnswer&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>MapEnvironmentScore<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  src.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    answer.valueDecimal<b> as </b><span style=\"color: maroon\">val</span><b> then</b><span style=\"color: navy\"> {\r\n</span>      val.value<b> as </b><span style=\"color: maroon\">numVal</span><span style=\"color: navy\"><b> -&gt; </b></span> tgt.component<b> as </b><span style=\"color: maroon\">comp</span><span style=\"color: navy\">, </span> comp.code = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://snomed.info/sct'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'276339004'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Environment'</span><span style=\"color: navy\">)</span><span style=\"color: navy\">, </span> comp.value = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Quantity'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">qty</span><span style=\"color: navy\">, </span> qty.value = <span style=\"color: maroon\">numVal</span><span style=\"color: navy\">, </span> qty.unit = <span style=\"color: blue\">'score'</span><span style=\"color: navy\">, </span> qty.system = <span style=\"color: blue\">'http://unitsofmeasure.org'</span><span style=\"color: navy\">, </span> qty.code = <span style=\"color: blue\">'{score}'</span> <i>&quot;SetComponent&quot;</i><span style=\"color: navy\">;</span>\r\n    <span style=\"color: navy\">}</span> <i>&quot;ExtractValue&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;ProcessAnswer&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      },
      "url" : "https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/WHOQOLBrefQuestionnaireResponseToObservation",
      "version" : "0.1.0",
      "name" : "WHOQOLBrefQuestionnaireResponseToObservation",
      "title" : "WHOQOL-BREF Q score to O score",
      "status" : "active",
      "date" : "2026-06-18T13:38:50+00:00",
      "publisher" : "The PreNUDGE Consortium",
      "contact" : [
        {
          "name" : "The PreNUDGE Consortium",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://prenudge.at"
            }
          ]
        },
        {
          "name" : "The PreNUDGE Consortium",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://prenudge.at",
              "use" : "work"
            }
          ]
        }
      ],
      "description" : "WHOQOL-BREF Q score to O score",
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
          "mode" : "source",
          "alias" : "QR"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Observation",
          "mode" : "target",
          "alias" : "Obs"
        }
      ],
      "import" : [
        "http://hl7.org/fhir/StructureMap/*"🔗 ,
        "https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/QuestionnaireResponseToObservationBase"
      ],
      "group" : [
        {
          "name" : "WHOQOLBrefQuestionnaireResponseToObservation",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "Base",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "dependent" : [
                {
                  "name" : "SetObservationBase",
                  "variable" : [
                    "src",
                    "tgt"
                  ]
                }
              ]
            },
            {
              "name" : "SetProfile",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "meta",
                  "variable" : "meta"
                },
                {
                  "context" : "meta",
                  "contextType" : "variable",
                  "element" : "profile",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "https://fhir.hl7.at/prenudge/appdata/r4/StructureDefinition/at-prenudge-whoqol-bref-score-observation"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "SetCode",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "code",
                  "transform" : "cc",
                  "parameter" : [
                    {
                      "valueString" : "http://snomed.info/sct"
                    },
                    {
                      "valueString" : "405152002"
                    },
                    {
                      "valueString" : "Quality of life"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "SetEffective",
              "source" : [
                {
                  "context" : "src",
                  "element" : "authored",
                  "variable" : "authored"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "effectiveDateTime",
                  "variable" : "dt",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "dateTime"
                    }
                  ]
                },
                {
                  "context" : "dt",
                  "contextType" : "variable",
                  "element" : "value",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "authored"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "ProcessGeneral",
              "source" : [
                {
                  "context" : "src",
                  "element" : "item",
                  "variable" : "generalGroup",
                  "condition" : "linkId = 'general'"
                }
              ],
              "rule" : [
                {
                  "name" : "MapGeneralScore",
                  "source" : [
                    {
                      "context" : "generalGroup",
                      "element" : "item",
                      "variable" : "scoreItem",
                      "condition" : "linkId = 'general-score'"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "MapGeneralScore",
                      "variable" : [
                        "scoreItem",
                        "tgt"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "ProcessDomain1",
              "source" : [
                {
                  "context" : "src",
                  "element" : "item",
                  "variable" : "domain1Group",
                  "condition" : "linkId = 'domain1'"
                }
              ],
              "rule" : [
                {
                  "name" : "MapDomain1Score",
                  "source" : [
                    {
                      "context" : "domain1Group",
                      "element" : "item",
                      "variable" : "scoreItem",
                      "condition" : "linkId = 'domain1-score'"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "MapPhysicalScore",
                      "variable" : [
                        "scoreItem",
                        "tgt"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "ProcessDomain2",
              "source" : [
                {
                  "context" : "src",
                  "element" : "item",
                  "variable" : "domain2Group",
                  "condition" : "linkId = 'domain2'"
                }
              ],
              "rule" : [
                {
                  "name" : "MapDomain2Score",
                  "source" : [
                    {
                      "context" : "domain2Group",
                      "element" : "item",
                      "variable" : "scoreItem",
                      "condition" : "linkId = 'domain2-score'"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "MapPsychologicalScore",
                      "variable" : [
                        "scoreItem",
                        "tgt"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "ProcessDomain3",
              "source" : [
                {
                  "context" : "src",
                  "element" : "item",
                  "variable" : "domain3Group",
                  "condition" : "linkId = 'domain3'"
                }
              ],
              "rule" : [
                {
                  "name" : "MapDomain3Score",
                  "source" : [
                    {
                      "context" : "domain3Group",
                      "element" : "item",
                      "variable" : "scoreItem",
                      "condition" : "linkId = 'domain3-score'"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "MapRelationshipsScore",
                      "variable" : [
                        "scoreItem",
                        "tgt"
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "ProcessDomain4",
              "source" : [
                {
                  "context" : "src",
                  "element" : "item",
                  "variable" : "domain4Group",
                  "condition" : "linkId = 'domain4'"
                }
              ],
              "rule" : [
                {
                  "name" : "MapDomain4Score",
                  "source" : [
                    {
                      "context" : "domain4Group",
                      "element" : "item",
                      "variable" : "scoreItem",
                      "condition" : "linkId = 'domain4-score'"
                    }
                  ],
                  "dependent" : [
                    {
                      "name" : "MapEnvironmentScore",
                      "variable" : [
                        "scoreItem",
                        "tgt"
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "MapGeneralScore",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "ProcessAnswer",
              "source" : [
                {
                  "context" : "src",
                  "element" : "answer",
                  "variable" : "answer"
                }
              ],
              "rule" : [
                {
                  "name" : "ExtractValue",
                  "source" : [
                    {
                      "context" : "answer",
                      "element" : "valueDecimal",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetComponent",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "numVal"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "component",
                          "variable" : "comp"
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cc",
                          "parameter" : [
                            {
                              "valueString" : "http://snomed.info/sct"
                            },
                            {
                              "valueString" : "60132005"
                            },
                            {
                              "valueString" : "Generalized"
                            }
                          ]
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "value",
                          "variable" : "qty",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "numVal"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "score"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "http://unitsofmeasure.org"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "{score}"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "MapPhysicalScore",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "ProcessAnswer",
              "source" : [
                {
                  "context" : "src",
                  "element" : "answer",
                  "variable" : "answer"
                }
              ],
              "rule" : [
                {
                  "name" : "ExtractValue",
                  "source" : [
                    {
                      "context" : "answer",
                      "element" : "valueDecimal",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetComponent",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "numVal"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "component",
                          "variable" : "comp"
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cc",
                          "parameter" : [
                            {
                              "valueString" : "http://snomed.info/sct"
                            },
                            {
                              "valueString" : "19388002"
                            },
                            {
                              "valueString" : "Physical"
                            }
                          ]
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "value",
                          "variable" : "qty",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "numVal"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "score"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "http://unitsofmeasure.org"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "{score}"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "MapPsychologicalScore",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "ProcessAnswer",
              "source" : [
                {
                  "context" : "src",
                  "element" : "answer",
                  "variable" : "answer"
                }
              ],
              "rule" : [
                {
                  "name" : "ExtractValue",
                  "source" : [
                    {
                      "context" : "answer",
                      "element" : "valueDecimal",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetComponent",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "numVal"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "component",
                          "variable" : "comp"
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cc",
                          "parameter" : [
                            {
                              "valueString" : "http://snomed.info/sct"
                            },
                            {
                              "valueString" : "60224009"
                            },
                            {
                              "valueString" : "Psychologic"
                            }
                          ]
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "value",
                          "variable" : "qty",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "numVal"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "score"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "http://unitsofmeasure.org"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "{score}"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "MapRelationshipsScore",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "ProcessAnswer",
              "source" : [
                {
                  "context" : "src",
                  "element" : "answer",
                  "variable" : "answer"
                }
              ],
              "rule" : [
                {
                  "name" : "ExtractValue",
                  "source" : [
                    {
                      "context" : "answer",
                      "element" : "valueDecimal",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetComponent",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "numVal"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "component",
                          "variable" : "comp"
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cc",
                          "parameter" : [
                            {
                              "valueString" : "http://snomed.info/sct"
                            },
                            {
                              "valueString" : "272151006"
                            },
                            {
                              "valueString" : "Relationships"
                            }
                          ]
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "value",
                          "variable" : "qty",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "numVal"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "score"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "http://unitsofmeasure.org"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "{score}"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "name" : "MapEnvironmentScore",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "ProcessAnswer",
              "source" : [
                {
                  "context" : "src",
                  "element" : "answer",
                  "variable" : "answer"
                }
              ],
              "rule" : [
                {
                  "name" : "ExtractValue",
                  "source" : [
                    {
                      "context" : "answer",
                      "element" : "valueDecimal",
                      "variable" : "val"
                    }
                  ],
                  "rule" : [
                    {
                      "name" : "SetComponent",
                      "source" : [
                        {
                          "context" : "val",
                          "element" : "value",
                          "variable" : "numVal"
                        }
                      ],
                      "target" : [
                        {
                          "context" : "tgt",
                          "contextType" : "variable",
                          "element" : "component",
                          "variable" : "comp"
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "cc",
                          "parameter" : [
                            {
                              "valueString" : "http://snomed.info/sct"
                            },
                            {
                              "valueString" : "276339004"
                            },
                            {
                              "valueString" : "Environment"
                            }
                          ]
                        },
                        {
                          "context" : "comp",
                          "contextType" : "variable",
                          "element" : "value",
                          "variable" : "qty",
                          "transform" : "create",
                          "parameter" : [
                            {
                              "valueString" : "Quantity"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "value",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueId" : "numVal"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "unit",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "score"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "system",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "http://unitsofmeasure.org"
                            }
                          ]
                        },
                        {
                          "context" : "qty",
                          "contextType" : "variable",
                          "element" : "code",
                          "transform" : "copy",
                          "parameter" : [
                            {
                              "valueString" : "{score}"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }