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

## : BMI Q to Body Height, Body Weight and BMI Observations Bundle - TTL Representation

Active as of 2026-06-24

Raw ttl | Download

    @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 -------------------------------------------------------------------

     a fhir:StructureMap ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:id [ fhir:v "BmiQuestionnaireResponseToObservations"] ; #
      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 BmiQuestionnaireResponseToObservations</b></p><a name=\"BmiQuestionnaireResponseToObservations\"> </a><a name=\"hcBmiQuestionnaireResponseToObservations\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/BmiQuestionnaireResponseToObservations<span style=\"color: navy\">\" = \"</span>BmiQuestionnaireResponseToObservations<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">BMI Q to Body Height, Body Weight and BMI Observations Bundle</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/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">\" </span><b>alias </b>Bundle <b>as </b><b>target</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>group </b>BmiQuestionnaireResponseToObservations<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>Bundle<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span>  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.type = <span style=\"color: blue\">'collection'</span> <i>\"SetBundleType\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">heightEntry</span><span style=\"color: navy\">, </span> heightEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">heightObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<b> then </b>MapBodyHeightObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">heightObs</span><span style=\"color: navy\">)</span> <i>\"MapBodyHeightObservation\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"CreateBodyHeightEntry\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">weightEntry</span><span style=\"color: navy\">, </span> weightEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">weightObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<b> then </b>MapBodyWeightObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">weightObs</span><span style=\"color: navy\">)</span> <i>\"MapBodyWeightObservation\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"CreateBodyWeightEntry\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span> tgt.entry<b> as </b><span style=\"color: maroon\">bmiEntry</span><span style=\"color: navy\">, </span> bmiEntry.resource = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Observation'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">bmiObs</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    src<b> then </b>MapBodyMassIndexObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">src</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">bmiObs</span><span style=\"color: navy\">)</span> <i>\"MapBodyMassIndexObservation\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"CreateBmiEntry\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>SetCommonObservationFields<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<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <span style=\"color: blue\">'final'</span> <i>\"setFinalStatus\"</i><span style=\"color: navy\">;</span>#xD;\n  src.subject<b> as </b><span style=\"color: maroon\">subject</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.subject = <span style=\"color: maroon\">subject</span> <i>\"copySubject\"</i><span style=\"color: navy\">;</span>#xD;\n  src.authored<b> as </b><span style=\"color: maroon\">authored</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.effective = <span style=\"color: maroon\">authored</span> <i>\"copyAuthoredToEffective\"</i><span style=\"color: navy\">;</span>#xD;\n  src.authored<b> as </b><span style=\"color: maroon\">authored</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.issued = <span style=\"color: maroon\">authored</span> <i>\"copyAuthoredToIssued\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.method = <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\">'87982008'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Manual'</span><span style=\"color: navy\">)</span> <i>\"setManualMethod\"</i><span style=\"color: navy\">;</span>#xD;\n  src.id<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.derivedFrom = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Reference'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">reference</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    id<span style=\"color: navy\"><b> -&gt; </b></span>reference.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'QuestionnaireResponse/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">id</span><span style=\"color: navy\">)</span> <i>\"setDerivedFromReference\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"setDerivedFrom\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>MapBodyHeightObservation<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>SetCommonObservationFields<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>\"SetCommonFields\"</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-bodyheight-observation'</span> <i>\"SetProfile\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.category = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'vital-signs'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Vital Signs'</span><span style=\"color: navy\">)</span> <i>\"SetCategory\"</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://loinc.org'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'8302-2'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Body height'</span><span style=\"color: navy\">)</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n  src.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Identifier'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">targetIdentifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    identifier.system<b> as </b><span style=\"color: maroon\">system</span><span style=\"color: navy\"><b> -&gt; </b></span>targetIdentifier.system = <span style=\"color: maroon\">system</span> <i>\"SetIdentifierSystem\"</i><span style=\"color: navy\">;</span>#xD;\n    identifier.value<b> as </b><span style=\"color: maroon\">value</span><span style=\"color: navy\"><b> -&gt; </b></span>targetIdentifier.value = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">value</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'-bodyheight'</span><span style=\"color: navy\">)</span> <i>\"SetIdentifierValue\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"SetIdentifier\"</i><span style=\"color: navy\">;</span>#xD;\n  src.item<b> as </b><span style=\"color: maroon\">bmiGroup</span><b> where </b>bmiGroup.linkId = 'bmi'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    bmiGroup.item<b> as </b><span style=\"color: maroon\">heightItem</span><b> where </b>heightItem.linkId = 'height-cm'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      heightItem.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        answer.value<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.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\">'cm'</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\">'cm'</span> <i>\"SetValue\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"ExtractPrimitiveValue\"</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\">}</span> <i>\"ProcessHeightItem\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"ProcessBmiGroup\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>MapBodyWeightObservation<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>SetCommonObservationFields<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>\"SetCommonFields\"</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-bodyweight-observation'</span> <i>\"SetProfile\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.category = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'vital-signs'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Vital Signs'</span><span style=\"color: navy\">)</span> <i>\"SetCategory\"</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://loinc.org'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'29463-7'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Body weight'</span><span style=\"color: navy\">)</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n  src.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Identifier'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">targetIdentifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    identifier.system<b> as </b><span style=\"color: maroon\">system</span><span style=\"color: navy\"><b> -&gt; </b></span>targetIdentifier.system = <span style=\"color: maroon\">system</span> <i>\"SetIdentifierSystem\"</i><span style=\"color: navy\">;</span>#xD;\n    identifier.value<b> as </b><span style=\"color: maroon\">value</span><span style=\"color: navy\"><b> -&gt; </b></span>targetIdentifier.value = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">value</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'-bodyweight'</span><span style=\"color: navy\">)</span> <i>\"SetIdentifierValue\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"SetIdentifier\"</i><span style=\"color: navy\">;</span>#xD;\n  src.item<b> as </b><span style=\"color: maroon\">bmiGroup</span><b> where </b>bmiGroup.linkId = 'bmi'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    bmiGroup.item<b> as </b><span style=\"color: maroon\">weightItem</span><b> where </b>weightItem.linkId = 'weight-kg'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      weightItem.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        answer.value<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.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\">'kg'</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\">'kg'</span> <i>\"SetValue\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"ExtractPrimitiveValue\"</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\">}</span> <i>\"ProcessWeightItem\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"ProcessBmiGroup\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>MapBodyMassIndexObservation<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>SetCommonObservationFields<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>\"SetCommonFields\"</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-bmi-observation'</span> <i>\"SetProfile\"</i><span style=\"color: navy\">;</span>#xD;\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.category = <b>cc</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'http://terminology.hl7.org/CodeSystem/observation-category'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'vital-signs'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Vital Signs'</span><span style=\"color: navy\">)</span> <i>\"SetCategory\"</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://loinc.org'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'39156-5'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Body mass index (BMI) [Ratio]'</span><span style=\"color: navy\">)</span> <i>\"SetCode\"</i><span style=\"color: navy\">;</span>#xD;\n  src.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier = <b>create</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'Identifier'</span><span style=\"color: navy\">)</span><b> as </b><span style=\"color: maroon\">targetIdentifier</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>    identifier.system<b> as </b><span style=\"color: maroon\">system</span><span style=\"color: navy\"><b> -&gt; </b></span>targetIdentifier.system = <span style=\"color: maroon\">system</span> <i>\"SetIdentifierSystem\"</i><span style=\"color: navy\">;</span>#xD;\n    identifier.value<b> as </b><span style=\"color: maroon\">value</span><span style=\"color: navy\"><b> -&gt; </b></span>targetIdentifier.value = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">value</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'-bmi'</span><span style=\"color: navy\">)</span> <i>\"SetIdentifierValue\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"SetIdentifier\"</i><span style=\"color: navy\">;</span>#xD;\n  src.item<b> as </b><span style=\"color: maroon\">bmiGroup</span><b> where </b>bmiGroup.linkId = 'bmi'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    bmiGroup.item<b> as </b><span style=\"color: maroon\">bmiItem</span><b> where </b>bmiItem.linkId = 'bmi-kg-m2'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>      bmiItem.answer<b> as </b><span style=\"color: maroon\">answer</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span>        answer.value<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.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\">'kg/m2'</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\">'kg/m2'</span> <i>\"SetValue\"</i><span style=\"color: navy\">;</span>#xD;\n        <span style=\"color: navy\">}</span> <i>\"ExtractPrimitiveValue\"</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\">}</span> <i>\"ProcessBmiItem\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"ProcessBmiGroup\"</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/BmiQuestionnaireResponseToObservations"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "BmiQuestionnaireResponseToObservations"] ; #
      fhir:title [ fhir:v "BMI Q to Body Height, Body Weight and BMI Observations Bundle"] ; #
      fhir:status [ fhir:v "active"] ; #
      fhir:date [ fhir:v "2026-06-24T11:55:57+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 "BMI Q to Body Height, Body Weight and BMI Observations Bundle"] ; #
      fhir:structure ( [
    fhir:url [
    fhir:v "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"^^xsd:anyURI ;
    fhir:link <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/Bundle"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/Bundle>     ] ;
    fhir:mode [ fhir:v "target" ] ;
    fhir:alias [ fhir:v "Bundle" ]
      ] [
    fhir:url [
    fhir:v "http://hl7.org/fhir/StructureDefinition/Observation"^^xsd:anyURI ;
    fhir:link <http://hl7.org/fhir/StructureDefinition/Observation>     ] ;
    fhir:mode [ fhir:v "target" ] ;
    fhir:alias [ fhir:v "Obs" ]
      ] ) ; #
      fhir:group ( [
    fhir:name [ fhir:v "BmiQuestionnaireResponseToObservations" ] ;
    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 "Bundle" ] ;
    fhir:mode [ fhir:v "target" ]     ] ) ;
        ( fhir:rule [
    fhir:name [ fhir:v "SetBundleType" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "type" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "collection"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "CreateBodyHeightEntry" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "entry" ] ;
    fhir:variable [ fhir:v "heightEntry" ]       ] [
    fhir:context [ fhir:v "heightEntry" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "resource" ] ;
    fhir:variable [ fhir:v "heightObs" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Observation"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "MapBodyHeightObservation" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "MapBodyHeightObservation" ] ;
              ( fhir:variable [ fhir:v "src" ] [ fhir:v "heightObs" ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "CreateBodyWeightEntry" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "entry" ] ;
    fhir:variable [ fhir:v "weightEntry" ]       ] [
    fhir:context [ fhir:v "weightEntry" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "resource" ] ;
    fhir:variable [ fhir:v "weightObs" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Observation"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "MapBodyWeightObservation" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "MapBodyWeightObservation" ] ;
              ( fhir:variable [ fhir:v "src" ] [ fhir:v "weightObs" ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "CreateBmiEntry" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "entry" ] ;
    fhir:variable [ fhir:v "bmiEntry" ]       ] [
    fhir:context [ fhir:v "bmiEntry" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "resource" ] ;
    fhir:variable [ fhir:v "bmiObs" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Observation"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "MapBodyMassIndexObservation" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "src" ]         ] ) ;
            ( fhir:dependent [
    fhir:name [ fhir:v "MapBodyMassIndexObservation" ] ;
              ( fhir:variable [ fhir:v "src" ] [ fhir:v "bmiObs" ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "SetCommonObservationFields" ] ;
    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 "setFinalStatus" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "status" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "final"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "copySubject" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "subject" ] ;
    fhir:variable [ fhir:v "subject" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "subject" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "subject"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "copyAuthoredToEffective" ] ;
          ( 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 "effective" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "authored"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "copyAuthoredToIssued" ] ;
          ( 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 "issued" ] ;
    fhir:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "authored"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "setManualMethod" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "method" ] ;
    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 "87982008"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Manual"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "setDerivedFrom" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "id" ] ;
    fhir:variable [ fhir:v "id" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "derivedFrom" ] ;
    fhir:variable [ fhir:v "reference" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Reference"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "setDerivedFromReference" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "id" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "reference" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "reference" ] ;
    fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "QuestionnaireResponse/"             ]           ] [
    fhir:value [
    a fhir:id ;
    fhir:v "id"             ]           ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "MapBodyHeightObservation" ] ;
    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 "SetCommonFields" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "SetCommonObservationFields" ] ;
            ( 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-bodyheight-observation"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "SetCategory" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "category" ] ;
    fhir:transform [ fhir:v "cc" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "vital-signs"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Vital Signs"           ]         ] )       ] )     ] [
    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://loinc.org"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "8302-2"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Body height"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "SetIdentifier" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "identifier" ] ;
    fhir:variable [ fhir:v "identifier" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "identifier" ] ;
    fhir:variable [ fhir:v "targetIdentifier" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Identifier"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "SetIdentifierSystem" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "identifier" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:variable [ fhir:v "system" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "targetIdentifier" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "system"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "SetIdentifierValue" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "identifier" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "value" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "targetIdentifier" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "value"             ]           ] [
    fhir:value [
    a fhir:string ;
    fhir:v "-bodyheight"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "ProcessBmiGroup" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "bmiGroup" ] ;
    fhir:condition [ fhir:v "bmiGroup.linkId = 'bmi'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "ProcessHeightItem" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "bmiGroup" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "heightItem" ] ;
    fhir:condition [ fhir:v "heightItem.linkId = 'height-cm'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "ProcessAnswer" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "heightItem" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]           ] ) ;
              ( fhir:rule [
    fhir:name [ fhir:v "ExtractPrimitiveValue" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "val" ]             ] ) ;
                ( fhir:rule [
    fhir:name [ fhir:v "SetValue" ] ;
                  ( 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 "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 "cm"                   ]                 ] )               ] [
    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 "cm"                   ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "MapBodyWeightObservation" ] ;
    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 "SetCommonFields" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "SetCommonObservationFields" ] ;
            ( 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-bodyweight-observation"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "SetCategory" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "category" ] ;
    fhir:transform [ fhir:v "cc" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "vital-signs"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Vital Signs"           ]         ] )       ] )     ] [
    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://loinc.org"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "29463-7"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Body weight"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "SetIdentifier" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "identifier" ] ;
    fhir:variable [ fhir:v "identifier" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "identifier" ] ;
    fhir:variable [ fhir:v "targetIdentifier" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Identifier"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "SetIdentifierSystem" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "identifier" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:variable [ fhir:v "system" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "targetIdentifier" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "system"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "SetIdentifierValue" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "identifier" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "value" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "targetIdentifier" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "value"             ]           ] [
    fhir:value [
    a fhir:string ;
    fhir:v "-bodyweight"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "ProcessBmiGroup" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "bmiGroup" ] ;
    fhir:condition [ fhir:v "bmiGroup.linkId = 'bmi'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "ProcessWeightItem" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "bmiGroup" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "weightItem" ] ;
    fhir:condition [ fhir:v "weightItem.linkId = 'weight-kg'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "ProcessAnswer" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "weightItem" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]           ] ) ;
              ( fhir:rule [
    fhir:name [ fhir:v "ExtractPrimitiveValue" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "val" ]             ] ) ;
                ( fhir:rule [
    fhir:name [ fhir:v "SetValue" ] ;
                  ( 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 "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 "kg"                   ]                 ] )               ] [
    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 "kg"                   ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "MapBodyMassIndexObservation" ] ;
    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 "SetCommonFields" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "SetCommonObservationFields" ] ;
            ( 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-bmi-observation"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "SetCategory" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "category" ] ;
    fhir:transform [ fhir:v "cc" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "vital-signs"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Vital Signs"           ]         ] )       ] )     ] [
    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://loinc.org"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "39156-5"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Body mass index (BMI) [Ratio]"           ]         ] )       ] )     ] [
    fhir:name [ fhir:v "SetIdentifier" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "identifier" ] ;
    fhir:variable [ fhir:v "identifier" ]       ] ) ;
          ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "identifier" ] ;
    fhir:variable [ fhir:v "targetIdentifier" ] ;
    fhir:transform [ fhir:v "create" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:string ;
    fhir:v "Identifier"           ]         ] )       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "SetIdentifierSystem" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "identifier" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:variable [ fhir:v "system" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "targetIdentifier" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "system" ] ;
    fhir:transform [ fhir:v "copy" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "system"             ]           ] )         ] )       ] [
    fhir:name [ fhir:v "SetIdentifierValue" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "identifier" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "value" ]         ] ) ;
            ( fhir:target [
    fhir:context [ fhir:v "targetIdentifier" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:transform [ fhir:v "append" ] ;
              ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "value"             ]           ] [
    fhir:value [
    a fhir:string ;
    fhir:v "-bmi"             ]           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "ProcessBmiGroup" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "bmiGroup" ] ;
    fhir:condition [ fhir:v "bmiGroup.linkId = 'bmi'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "ProcessBmiItem" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "bmiGroup" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "bmiItem" ] ;
    fhir:condition [ fhir:v "bmiItem.linkId = 'bmi-kg-m2'" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "ProcessAnswer" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "bmiItem" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]           ] ) ;
              ( fhir:rule [
    fhir:name [ fhir:v "ExtractPrimitiveValue" ] ;
                ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "val" ]             ] ) ;
                ( fhir:rule [
    fhir:name [ fhir:v "SetValue" ] ;
                  ( 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 "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 "kg/m2"                   ]                 ] )               ] [
    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 "kg/m2"                   ]                 ] )               ] )             ] )           ] )         ] )       ] )     ] )
      ] ) . #