@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

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

# -------------------------------------------------------------------------------------

