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

## : Shared base for Q to O - JSON Representation

Active as of 2026-06-24

Raw json | Download

    {
      "resourceType" : "StructureMap",
      "id" : "QuestionnaireResponseToObservationBase",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap QuestionnaireResponseToObservationBase</b></p><a name=\"QuestionnaireResponseToObservationBase\"> </a><a name=\"hcQuestionnaireResponseToObservationBase\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> &quot;</span>https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/QuestionnaireResponseToObservationBase<span style=\"color: navy\">&quot; = &quot;</span>QuestionnaireResponseToObservationBase<span style=\"color: navy\">&quot;\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Shared base for Q to O</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/questionnaireresponse.html\" title=\"QuestionnaireResponse\">http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse</a><span style=\"color: navy\">&quot; </span><b>alias </b>QR <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> &quot;</span><a href=\"http://hl7.org/fhir/R4/observation.html\" title=\"Observation\">http://hl7.org/fhir/StructureDefinition/Observation</a><span style=\"color: navy\">&quot; </span><b>alias </b>Obs <b>as </b><b>target</b>\r\n\r\n<b>group </b>SetObservationBase<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>QR, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>Obs<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span>  <span style=\"color: navy\">// </span><span style=\"color: green\">Fixed values</span>\r\n  src<span style=\"color: navy\"><b> -&gt; </b></span>tgt.status = <span style=\"color: blue\">'final'</span> <i>&quot;SetStatus&quot;</i><span style=\"color: navy\">;</span>\r\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>&quot;SetMethod&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Copy identifier from QuestionnaireResponse to Observation</span>\r\n  src.identifier<b> as </b><span style=\"color: maroon\">srcId</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\">tgtId</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    srcId.system<b> as </b><span style=\"color: maroon\">s</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtId.system = <span style=\"color: maroon\">s</span> <i>&quot;CopyIdSystem&quot;</i><span style=\"color: navy\">;</span>\r\n    srcId.value<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtId.value = <span style=\"color: maroon\">v</span> <i>&quot;CopyIdValue&quot;</i><span style=\"color: navy\">;</span>\r\n    srcId.use<b> as </b><span style=\"color: maroon\">u</span><span style=\"color: navy\"><b> -&gt; </b></span>tgtId.use = <span style=\"color: maroon\">u</span> <i>&quot;CopyIdUse&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;CopyIdentifier&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Set derivedFrom reference back to the QuestionnaireResponse</span>\r\n  src.id<b> as </b><span style=\"color: maroon\">srcRefId</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\">ref</span><span style=\"color: navy\">, </span> ref.reference = <b>append</b><span style=\"color: navy\">(</span><span style=\"color: blue\">'QuestionnaireResponse/'</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">srcRefId</span><span style=\"color: navy\">)</span> <i>&quot;SetDerivedFrom&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Subject reference</span>\r\n  src.subject<b> as </b><span style=\"color: maroon\">subject</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.subject = <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\">ref</span><b> then</b><span style=\"color: navy\"> {\r\n</span>    subject.reference<b> as </b><span style=\"color: maroon\">r</span><span style=\"color: navy\"><b> -&gt; </b></span>ref.reference = <span style=\"color: maroon\">r</span> <i>&quot;CopySubjectRef&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">}</span> <i>&quot;SetSubject&quot;</i><span style=\"color: navy\">;</span>\r\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Instance creation datetime</span>\r\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>&quot;SetEffective&quot;</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
      },
      "url" : "https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/QuestionnaireResponseToObservationBase",
      "version" : "0.1.0",
      "name" : "QuestionnaireResponseToObservationBase",
      "title" : "Shared base for Q to O",
      "status" : "active",
      "date" : "2026-06-24T07:21:07+00:00",
      "publisher" : "The PreNUDGE Consortium",
      "contact" : [
        {
          "name" : "The PreNUDGE Consortium",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://prenudge.at"
            }
          ]
        },
        {
          "name" : "The PreNUDGE Consortium",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://prenudge.at",
              "use" : "work"
            }
          ]
        }
      ],
      "description" : "Shared base for Q to O",
      "structure" : [
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
          "mode" : "source",
          "alias" : "QR"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/Observation",
          "mode" : "target",
          "alias" : "Obs"
        }
      ],
      "group" : [
        {
          "name" : "SetObservationBase",
          "typeMode" : "none",
          "input" : [
            {
              "name" : "src",
              "type" : "QR",
              "mode" : "source"
            },
            {
              "name" : "tgt",
              "type" : "Obs",
              "mode" : "target"
            }
          ],
          "rule" : [
            {
              "name" : "SetStatus",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "status",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueString" : "final"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "SetMethod",
              "source" : [
                {
                  "context" : "src"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "method",
                  "transform" : "cc",
                  "parameter" : [
                    {
                      "valueString" : "http://snomed.info/sct"
                    },
                    {
                      "valueString" : "87982008"
                    },
                    {
                      "valueString" : "Manual"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "CopyIdentifier",
              "source" : [
                {
                  "context" : "src",
                  "element" : "identifier",
                  "variable" : "srcId"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "identifier",
                  "variable" : "tgtId",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Identifier"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "CopyIdSystem",
                  "source" : [
                    {
                      "context" : "srcId",
                      "element" : "system",
                      "variable" : "s"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtId",
                      "contextType" : "variable",
                      "element" : "system",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "s"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "CopyIdValue",
                  "source" : [
                    {
                      "context" : "srcId",
                      "element" : "value",
                      "variable" : "v"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtId",
                      "contextType" : "variable",
                      "element" : "value",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "v"
                        }
                      ]
                    }
                  ]
                },
                {
                  "name" : "CopyIdUse",
                  "source" : [
                    {
                      "context" : "srcId",
                      "element" : "use",
                      "variable" : "u"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "tgtId",
                      "contextType" : "variable",
                      "element" : "use",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "u"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "SetDerivedFrom",
              "source" : [
                {
                  "context" : "src",
                  "element" : "id",
                  "variable" : "srcRefId"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "derivedFrom",
                  "variable" : "ref",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                },
                {
                  "context" : "ref",
                  "contextType" : "variable",
                  "element" : "reference",
                  "transform" : "append",
                  "parameter" : [
                    {
                      "valueString" : "QuestionnaireResponse/"
                    },
                    {
                      "valueId" : "srcRefId"
                    }
                  ]
                }
              ]
            },
            {
              "name" : "SetSubject",
              "source" : [
                {
                  "context" : "src",
                  "element" : "subject",
                  "variable" : "subject"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "subject",
                  "variable" : "ref",
                  "transform" : "create",
                  "parameter" : [
                    {
                      "valueString" : "Reference"
                    }
                  ]
                }
              ],
              "rule" : [
                {
                  "name" : "CopySubjectRef",
                  "source" : [
                    {
                      "context" : "subject",
                      "element" : "reference",
                      "variable" : "r"
                    }
                  ],
                  "target" : [
                    {
                      "context" : "ref",
                      "contextType" : "variable",
                      "element" : "reference",
                      "transform" : "copy",
                      "parameter" : [
                        {
                          "valueId" : "r"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "name" : "SetEffective",
              "source" : [
                {
                  "context" : "src",
                  "element" : "authored",
                  "variable" : "authored"
                }
              ],
              "target" : [
                {
                  "context" : "tgt",
                  "contextType" : "variable",
                  "element" : "issued",
                  "transform" : "copy",
                  "parameter" : [
                    {
                      "valueId" : "authored"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }