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

## : ATHIS-based Smoking Status Q to O - TTL Representation

Active as of 2026-06-18

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 "SmokingStatusQuestionnaireResponseToObservation"] ; #
      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 SmokingStatusQuestionnaireResponseToObservation</b></p><a name=\"SmokingStatusQuestionnaireResponseToObservation\"> </a><a name=\"hcSmokingStatusQuestionnaireResponseToObservation\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://fhir.hl7.at/prenudge/appdata/r4/StructureMap/SmokingStatusQuestionnaireResponseToObservation<span style=\"color: navy\">\" = \"</span>SmokingStatusQuestionnaireResponseToObservation<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">ATHIS-based Smoking Status Q to O</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>group </b>SmokingStatusQuestionnaireResponseToObservation<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>  <span style=\"color: navy\">// </span><span style=\"color: green\">Administrative metadata. Implementations may replace or enrich the identifier</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">if the Observation needs a separate stable business identifier.</span>#xD;\n  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.identifier<b> as </b><span style=\"color: maroon\">identifier</span><span style=\"color: navy\"><b> -&gt; </b></span>tgt.identifier = <span style=\"color: maroon\">identifier</span> <i>\"copyIdentifier\"</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><span style=\"color: navy\">, </span> tgt.issued = <span style=\"color: maroon\">authored</span> <i>\"copyAuthoredToObservationTimes\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">IPS/APS-style tobacco smoking status coding.</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\">'72166-2'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Tobacco smoking status'</span><span style=\"color: navy\">)</span> <i>\"setTobaccoSmokingStatusCode\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">User-entered QuestionnaireResponse data is considered manual input.</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  <span style=\"color: navy\">// </span><span style=\"color: green\">Keep the derivation from QuestionnaireResponse to Observation traceable.</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\">// </span><span style=\"color: green\">ATHIS answer mapping to the clinical SNOMED CT valueCodeableConcept.</span>#xD;\n  src.item<b> as </b><span style=\"color: maroon\">groupItem</span><b> where </b>groupItem.linkId = 'smoking-status-athis'<b> then </b>SmokingStatusGroupToObservation<span style=\"color: navy\">(</span><span style=\"color: maroon\">groupItem</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tgt</span><span style=\"color: navy\">)</span> <i>\"mapSmokingStatusGroup\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span><b>group </b>SmokingStatusGroupToObservation<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">groupItem</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>  <span style=\"color: navy\">// </span><span style=\"color: green\">SK1 = Ja, täglich -&gt; current every day smoker.</span>#xD;\n  groupItem.item<b> as </b><span style=\"color: maroon\">sk1</span><b> where </b>sk1.linkId = 'sk1'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    sk1.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\">coding</span><b> where </b>(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-daily')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.value = <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\">'449868002'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Smokes tobacco daily'</span><span style=\"color: navy\">)</span> <i>\"mapCurrentDailySmoker\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"evaluateSk1Daily\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"sk1Daily\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">SK1 = Ja, gelegentlich -&gt; current occasional smoker.</span>#xD;\n  groupItem.item<b> as </b><span style=\"color: maroon\">sk1</span><b> where </b>sk1.linkId = 'sk1'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    sk1.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\">coding</span><b> where </b>(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-occasionally')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.value = <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\">'428041000124106'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Occasional tobacco smoker'</span><span style=\"color: navy\">)</span> <i>\"mapCurrentOccasionalSmoker\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"evaluateSk1Occasional\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"sk1Occasional\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">SK1 = Nein and past tobacco smoking = Ja, täglich or Ja, gelegentlich -&gt; former smoker.</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">The past-tobacco-smoking item is enabled only when SK1 is negative.</span>#xD;\n  groupItem.item<b> as </b><span style=\"color: maroon\">past</span><b> where </b>past.linkId = 'past-tobacco-smoking'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    past.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\">coding</span><b> where </b>(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-daily')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.value = <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\">'8517006'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Ex-smoker'</span><span style=\"color: navy\">)</span> <i>\"mapPastDailyToFormerSmoker\"</i><span style=\"color: navy\">;</span>#xD;\n      answer.value<b> as </b><span style=\"color: maroon\">coding</span><b> where </b>(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-occasionally')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.value = <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\">'8517006'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Ex-smoker'</span><span style=\"color: navy\">)</span> <i>\"mapPastOccasionalToFormerSmoker\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"evaluatePastSmoking\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"pastSmokingFormer\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">SK1 = Nein and past tobacco smoking = Nein -&gt; never smoker.</span>#xD;\n  groupItem.item<b> as </b><span style=\"color: maroon\">past</span><b> where </b>past.linkId = 'past-tobacco-smoking'<b> then</b><span style=\"color: navy\"> {#xD;\n</span>    past.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\">coding</span><b> where </b>(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-no')<span style=\"color: navy\"><b> -&gt; </b></span>tgt.value = <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\">'266919005'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'Never smoked tobacco'</span><span style=\"color: navy\">)</span> <i>\"mapPastNoToNeverSmoker\"</i><span style=\"color: navy\">;</span>#xD;\n    <span style=\"color: navy\">}</span> <i>\"evaluatePastNo\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">}</span> <i>\"pastSmokingNever\"</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/SmokingStatusQuestionnaireResponseToObservation"^^xsd:anyURI] ; #
      fhir:version [ fhir:v "0.1.0"] ; #
      fhir:name [ fhir:v "SmokingStatusQuestionnaireResponseToObservation"] ; #
      fhir:title [ fhir:v "ATHIS-based Smoking Status Q to O"] ; #
      fhir:status [ fhir:v "active"] ; #
      fhir:date [ fhir:v "2026-06-18T13:38:50+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 "ATHIS-based Smoking Status Q to O"] ; #
      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/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 "SmokingStatusQuestionnaireResponseToObservation" ] ;
    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 "copyIdentifier" ] ;
          ( 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:transform [ fhir:v "copy" ] ;
            ( fhir:parameter [
    fhir:value [
    a fhir:id ;
    fhir:v "identifier"           ]         ] )       ] )     ] [
    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 "copyAuthoredToObservationTimes" ] ;
          ( 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: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 "setTobaccoSmokingStatusCode" ] ;
          ( 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 "72166-2"           ]         ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Tobacco smoking status"           ]         ] )       ] )     ] [
    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 "mapSmokingStatusGroup" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "src" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "groupItem" ] ;
    fhir:condition [ fhir:v "groupItem.linkId = 'smoking-status-athis'" ]       ] ) ;
          ( fhir:dependent [
    fhir:name [ fhir:v "SmokingStatusGroupToObservation" ] ;
            ( fhir:variable [ fhir:v "groupItem" ] [ fhir:v "tgt" ] )       ] )     ] )
      ] [
    fhir:name [ fhir:v "SmokingStatusGroupToObservation" ] ;
    fhir:typeMode [ fhir:v "none" ] ;
        ( fhir:input [
    fhir:name [ fhir:v "groupItem" ] ;
    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 "sk1Daily" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "groupItem" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "sk1" ] ;
    fhir:condition [ fhir:v "sk1.linkId = 'sk1'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "evaluateSk1Daily" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sk1" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "mapCurrentDailySmoker" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "coding" ] ;
    fhir:condition [ fhir:v "(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-daily')" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    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 "449868002"               ]             ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Smokes tobacco daily"               ]             ] )           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "sk1Occasional" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "groupItem" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "sk1" ] ;
    fhir:condition [ fhir:v "sk1.linkId = 'sk1'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "evaluateSk1Occasional" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "sk1" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "mapCurrentOccasionalSmoker" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "coding" ] ;
    fhir:condition [ fhir:v "(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-occasionally')" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    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 "428041000124106"               ]             ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Occasional tobacco smoker"               ]             ] )           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "pastSmokingFormer" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "groupItem" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "past" ] ;
    fhir:condition [ fhir:v "past.linkId = 'past-tobacco-smoking'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "evaluatePastSmoking" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "past" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "mapPastDailyToFormerSmoker" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "coding" ] ;
    fhir:condition [ fhir:v "(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-daily')" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    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 "8517006"               ]             ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Ex-smoker"               ]             ] )           ] )         ] [
    fhir:name [ fhir:v "mapPastOccasionalToFormerSmoker" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "coding" ] ;
    fhir:condition [ fhir:v "(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-yes-occasionally')" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    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 "8517006"               ]             ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Ex-smoker"               ]             ] )           ] )         ] )       ] )     ] [
    fhir:name [ fhir:v "pastSmokingNever" ] ;
          ( fhir:source [
    fhir:context [ fhir:v "groupItem" ] ;
    fhir:element [ fhir:v "item" ] ;
    fhir:variable [ fhir:v "past" ] ;
    fhir:condition [ fhir:v "past.linkId = 'past-tobacco-smoking'" ]       ] ) ;
          ( fhir:rule [
    fhir:name [ fhir:v "evaluatePastNo" ] ;
            ( fhir:source [
    fhir:context [ fhir:v "past" ] ;
    fhir:element [ fhir:v "answer" ] ;
    fhir:variable [ fhir:v "answer" ]         ] ) ;
            ( fhir:rule [
    fhir:name [ fhir:v "mapPastNoToNeverSmoker" ] ;
              ( fhir:source [
    fhir:context [ fhir:v "answer" ] ;
    fhir:element [ fhir:v "value" ] ;
    fhir:variable [ fhir:v "coding" ] ;
    fhir:condition [ fhir:v "(coding.system = 'https://fhir.hl7.at/prenudge/appdata/r4/CodeSystem/athis-answers') and (coding.code = 'yn-no')" ]           ] ) ;
              ( fhir:target [
    fhir:context [ fhir:v "tgt" ] ;
    fhir:contextType [ fhir:v "variable" ] ;
    fhir:element [ fhir:v "value" ] ;
    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 "266919005"               ]             ] [
    fhir:value [
    a fhir:string ;
    fhir:v "Never smoked tobacco"               ]             ] )           ] )         ] )       ] )     ] )
      ] ) . #