Structured Data Capture
4.0.0-ballot - STU 4 ballot International flag

Structured Data Capture, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 4.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/sdc/ and changes regularly. See the Directory of published versions

: SDOHCCHungerVitalSignMap - XML Representation

Page standards status: Trial-use Maturity Level: 4

Raw xml | Download


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="SDOHCCHungerVitalSignMap"/>
  <text>
    <status value="additional"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <pre>/// url = &quot;http://hl7.org/fhir/uv/sdc/StructureMap/SDOHCCHungerVitalSignMap&quot;
/// name = &quot;SDOHCCHungerVitalSignMap&quot;
/// status = &quot;active&quot;
/// title = &quot;SDOHCC StructureMap HungerVitalSign&quot;
/// description = &quot;A StructureMap instance that represents the resource that transforms a specific question and answer from the LOINC Hunger Vital Sign [HVS] questionnaire (LOINC code 88121-9) into a corresponding Observation (SDOHCC Observation response Hunger Vital Sign Q3 Example) and derived Condition (SDOHCC Condition Food Insecurity Example).&quot;
/// experimental = &quot;true&quot;

map &quot;http://hl7.org/fhir/uv/sdc/StructureMap/SDOHCCHungerVitalSignMap&quot; = &quot;SDOHCCHungerVitalSignMap&quot;

uses &quot;http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse&quot; alias questionnaireResponse as source
uses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; alias bundle as target
uses &quot;http://hl7.org/fhir/StructureDefinition/Observation&quot; alias observation as target
uses &quot;http://hl7.org/fhir/StructureDefinition/Condition&quot; alias sdohccCondition as target
uses &quot;http://hl7.org/fhir/StructureDefinition/Observation&quot; alias sdohccObservation as target

group sdohMapping(source src : questionnaireResponse, target bundle : Bundle) {
  //temporarily set id to human-readable id as example
  //src -&gt; bundle.id = uuid();
  src -&gt; bundle.id = 'SDOHCC-BundleHungerVitalSignExample' &quot;bundleId&quot;;
  src -&gt; bundle.type = 'transaction' &quot;bundleType&quot;;

  //for each 'key' answer item in the questionnareResponse, create an Observation
  src.item as answerItem3 where linkId = '/88124-3' -&gt; bundle.entry as entry, entry.resource = create('Observation') as observation3 then 
    TransformObservation(src, answerItem3, observation3, entry); 

  //create condition if answer to third question is &quot;At Risk&quot;
  src.item as answerItem4 where linkId = '/88124-3' and answer.value.code ='LA19952-3' -&gt; bundle.entry as entry, entry.resource = create('Condition') as condition then
    TransformCondition(src, bundle, condition, entry);
}

group TransformObservation(source src: questionnaireResponse, source answerItem, target observation: Observation, target entry)
{
  src -&gt; entry.request as request then {
    src -&gt; request.method = 'POST' &quot;obsnRequestMethod&quot;;
    src -&gt; request.url = 'Observation' &quot;obsnRequestUrl&quot;;
  } &quot;obsnEntryRequest&quot;;

  //temporarily set id to human-readable id as example
  //src -&gt; observation.id = uuid() then
  //  SetObservationFullUrl(observation, entry);
  src -&gt; observation.id = 'SDOHCC-ObservationResponseHungerVitalSignQuestion3Example' then
   	SetObservationFullUrl(observation, entry) &quot;obsn3Id&quot;;

  src -&gt; observation.meta = create('Meta') as newMeta then {
    src -&gt; newMeta.profile = 'http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-ObservationScreeningResponse' &quot;obsnMetaProfile&quot;;
  } &quot;obsnMeta&quot;;

  src -&gt; observation.status = 'final' &quot;obsnStatus&quot;;

  src -&gt; observation.category = cc('http://terminology.hl7.org/CodeSystem/observation-category', 'social-history', 'Social History') &quot;obsnCatSocialHist&quot;;
  src -&gt; observation.category = cc('http://terminology.hl7.org/CodeSystem/observation-category', 'survey', 'Survey') &quot;obsnCatSurvey&quot;;
  src -&gt; observation.category = cc('http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes', 'food-insecurity', 'Food Insecurity') &quot;obsnCatFoodInsecurity&quot;;  

  answerItem as i -&gt; observation.code = cc('http://loinc.org', '88124-3') as code &quot;obsn3Code&quot;;

  src.subject as qSubject -&gt; observation.subject = create('Reference') as newReference then {
    qSubject.reference as qReference -&gt; newReference.reference = qReference;
    qSubject.display as qDisplay -&gt; newReference.display = qDisplay;
  };

  src.authored as authored -&gt; observation.effective = authored, observation.issued = authored;

  answerItem.answer as answer -&gt; observation.value = create('CodeableConcept') as newCC then {
    answer.value as coding -&gt; newCC.coding = coding as newCoding;
  };

  src -&gt; observation.derivedFrom = create('Reference') as newReference then {
    src.id as id -&gt; newReference.reference = append('QuestionnaireResponse/', id);
  } &quot;obsnDerivation&quot;;
}

group SetObservationFullUrl(source observation: Observation, target entry)
{
  observation.id as id -&gt; entry.fullUrl = append('http://hl7.org/fhir/us/sdoh-clinicalcare/Observation/', id);
}

group TransformCondition(source src: QuestionnaireResponse, source bundle: Bundle, target condition: Condition, target entry)
{
  //temporarily set id to human-readable id as example
  //src -&gt; condition.id = uuid() then
  src -&gt; condition.id = 'SDOHCC-ConditionFoodInsecurityExample' then
    SetConditionFullUrl(condition, entry) &quot;conditionId&quot;;
       
  src -&gt; condition.meta = create('Meta') as newMeta then {
    src -&gt; newMeta.profile = 'http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-Condition' &quot;conditionMetaProfile&quot;;
  } &quot;conditionMeta&quot;;

  src -&gt; condition.clinicalStatus = cc('http://terminology.hl7.org/CodeSystem/condition-clinical', 'active', 'Active') &quot;conditionClinicalStatus&quot;;
  src -&gt; condition.verificationStatus = cc('http://terminology.hl7.org/CodeSystem/condition-ver-status', 'unconfirmed', 'Unconfirmed') &quot;conditionVeriStatus&quot;;
  src -&gt; condition.category = create('CodeableConcept') as newCC then {
      src -&gt; newCC.coding = create('Coding') as newCoding then {
        src -&gt; newCoding.system = 'http://hl7.org/fhir/us/core/CodeSystem/condition-category' &quot;conditionCatCodingSystemHealthConcern&quot;;
        src -&gt; newCoding.code = 'health-concern' &quot;conditionCatCodingCodeHealthConcern&quot;;
        src -&gt; newCoding.display = 'Health Concern' &quot;conditionCatCodingDisplayHealthConcern&quot;;
    } &quot;conditionCatCodingHealthConcern&quot;;
  } &quot;conditionCatHealthConcern&quot;;

  //Add sdoh category
  src -&gt; condition.category = cc('http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes', 'food-insecurity', 'Food Insecurity') &quot;conditionCatFoodInsecurity&quot;;

  src -&gt; condition.code = create('CodeableConcept') as newCodeCC then {
      src -&gt; newCodeCC.coding = create('Coding') as newCoding then {
        src -&gt; newCoding.system = 'http://snomed.info/sct' &quot;conditionCodeCodingSystemFoodInsecurity&quot;;
        src -&gt; newCoding.code = '733423003' &quot;conditionCodeCodingCodeFoodInsecurity&quot;;
        src -&gt; newCoding.display = 'Food insecurity' &quot;conditionCodeCodingDisplayFoodInsecurity&quot;;
    } &quot;conditionCodeCodingFoodInsecurity&quot;;
    src -&gt; newCodeCC.coding = create('Coding') as newCoding2 then {
        src -&gt; newCoding2.system = 'http://hl7.org/fhir/sid/icd-10-cm' &quot;conditionCodeCodingSystemLackOfFood&quot;;
        src -&gt; newCoding2.code = 'Z59.4' &quot;conditionCodeCodingCodeLackOfFood&quot;;
        src -&gt; newCoding2.display = 'Lack of adequate food' &quot;conditionCodeCodingDisplayLackOfFood&quot;;
    } &quot;conditionCodeCodingLackOfFood&quot;;
  } &quot;conditionCode&quot;;
      
  src.authored as authored -&gt; condition.onset = create('Period') as period,
    period.start = authored;

  bundle.entry as entries -&gt; condition.evidence as evidence, evidence.detail = create('Reference') as detailReference then {
  	entries.resource as obs3 where code.coding.code = '88124-3'-&gt; detailReference.reference = reference(obs3); 
  };

  src.subject as qSubject -&gt; condition.subject = create('Reference') as newReference then {
    qSubject.reference as qReference -&gt; newReference.reference = qReference;
    qSubject.display as qDisplay -&gt; newReference.display = qDisplay;
  };

  src -&gt; entry.request as request then {
    src -&gt; request.method = 'POST' &quot;conditionRequestMethod&quot;;
    src -&gt; request.url = 'Condition' &quot;conditionRequestUrl&quot;;
  } &quot;conditionEntryRequest&quot;;  
}

group SetConditionFullUrl(source condition: Condition, target entry)
{
  condition.id as id -&gt; entry.fullUrl = append('http://hl7.org/fhir/us/sdoh-clinicalcare/Condition/', id);
}</pre>
    </div>
  </text>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir"/>
  </extension>
  <url
       value="http://hl7.org/fhir/uv/sdc/StructureMap/SDOHCCHungerVitalSignMap"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:2.16.840.1.113883.4.642.40.17.43.5"/>
  </identifier>
  <version value="4.0.0-ballot"/>
  <name value="SDOHCCHungerVitalSignMap"/>
  <status value="draft"/>
  <date value="2024-12-16T09:47:19+00:00"/>
  <publisher value="HL7 International / FHIR Infrastructure"/>
  <contact>
    <name value="HL7 International / FHIR Infrastructure"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/fiwg"/>
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/fiwg"/>
    </telecom>
  </contact>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"/>
    <mode value="source"/>
    <alias value="questionnaireResponse"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <mode value="target"/>
    <alias value="bundle"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Observation"/>
    <mode value="target"/>
    <alias value="observation"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Condition"/>
    <mode value="target"/>
    <alias value="sdohccCondition"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Observation"/>
    <mode value="target"/>
    <alias value="sdohccObservation"/>
  </structure>
  <group>
    <name value="sdohMapping"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="bundleId"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="SDOHCC-BundleHungerVitalSignExample"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="bundleType"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="type"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="transaction"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="item"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="answerItem3"/>
        <condition value="linkId = '/88124-3'"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="entry"/>
      </target>
      <target>
        <context value="entry"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="observation3"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Observation"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformObservation"/>
        <variable value="src"/>
        <variable value="answerItem3"/>
        <variable value="observation3"/>
        <variable value="entry"/>
      </dependent>
    </rule>
    <rule>
      <name value="item"/>
      <source>
        <context value="src"/>
        <element value="item"/>
        <variable value="answerItem4"/>
        <condition
                   value="(linkId = '/88124-3') and (answer.value.code = 'LA19952-3')"/>
      </source>
      <target>
        <context value="bundle"/>
        <contextType value="variable"/>
        <element value="entry"/>
        <variable value="entry"/>
      </target>
      <target>
        <context value="entry"/>
        <contextType value="variable"/>
        <element value="resource"/>
        <variable value="condition"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Condition"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformCondition"/>
        <variable value="src"/>
        <variable value="bundle"/>
        <variable value="condition"/>
        <variable value="entry"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="TransformObservation"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="answerItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="observation"/>
      <type value="Observation"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="obsnEntryRequest"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="entry"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="request"/>
      </target>
      <rule>
        <name value="obsnRequestMethod"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="obsnRequestUrl"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Observation"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="obsn3Id"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="copy"/>
        <parameter>
          <valueString
                       value="SDOHCC-ObservationResponseHungerVitalSignQuestion3Example"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetObservationFullUrl"/>
        <variable value="observation"/>
        <variable value="entry"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnMeta"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnMetaProfile"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="newMeta"/>
          <contextType value="variable"/>
          <element value="profile"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-ObservationScreeningResponse"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="obsnStatus"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="final"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsnCatSocialHist"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <transform value="cc"/>
        <parameter>
          <valueString
                       value="http://terminology.hl7.org/CodeSystem/observation-category"/>
        </parameter>
        <parameter>
          <valueString value="social-history"/>
        </parameter>
        <parameter>
          <valueString value="Social History"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsnCatSurvey"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <transform value="cc"/>
        <parameter>
          <valueString
                       value="http://terminology.hl7.org/CodeSystem/observation-category"/>
        </parameter>
        <parameter>
          <valueString value="survey"/>
        </parameter>
        <parameter>
          <valueString value="Survey"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsnCatFoodInsecurity"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <transform value="cc"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
        </parameter>
        <parameter>
          <valueString value="food-insecurity"/>
        </parameter>
        <parameter>
          <valueString value="Food Insecurity"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsn3Code"/>
      <source>
        <context value="answerItem"/>
        <variable value="i"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="code"/>
        <transform value="cc"/>
        <parameter>
          <valueString value="http://loinc.org"/>
        </parameter>
        <parameter>
          <valueString value="88124-3"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="subject"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="qSubject"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <variable value="newReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="reference"/>
        <source>
          <context value="qSubject"/>
          <element value="reference"/>
          <variable value="qReference"/>
        </source>
        <target>
          <context value="newReference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="qReference"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="display"/>
        <source>
          <context value="qSubject"/>
          <element value="display"/>
          <variable value="qDisplay"/>
        </source>
        <target>
          <context value="newReference"/>
          <contextType value="variable"/>
          <element value="display"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="qDisplay"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="authored"/>
      <source>
        <context value="src"/>
        <element value="authored"/>
        <variable value="authored"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="effective"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="authored"/>
        </parameter>
      </target>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="issued"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="authored"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="answer"/>
      <source>
        <context value="answerItem"/>
        <element value="answer"/>
        <variable value="answer"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="value"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="value"/>
        <source>
          <context value="answer"/>
          <element value="value"/>
          <variable value="coding"/>
        </source>
        <target>
          <context value="newCC"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="newCoding"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="coding"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="obsnDerivation"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="derivedFrom"/>
        <variable value="newReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="id"/>
        <source>
          <context value="src"/>
          <element value="id"/>
          <variable value="id"/>
        </source>
        <target>
          <context value="newReference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="append"/>
          <parameter>
            <valueString value="QuestionnaireResponse/"/>
          </parameter>
          <parameter>
            <valueId value="id"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="SetObservationFullUrl"/>
    <typeMode value="none"/>
    <input>
      <name value="observation"/>
      <type value="Observation"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="observation"/>
        <element value="id"/>
        <variable value="id"/>
      </source>
      <target>
        <context value="entry"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/us/sdoh-clinicalcare/Observation/"/>
        </parameter>
        <parameter>
          <valueId value="id"/>
        </parameter>
      </target>
    </rule>
  </group>
  <group>
    <name value="TransformCondition"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="QuestionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="condition"/>
      <type value="Condition"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="conditionId"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="SDOHCC-ConditionFoodInsecurityExample"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetConditionFullUrl"/>
        <variable value="condition"/>
        <variable value="entry"/>
      </dependent>
    </rule>
    <rule>
      <name value="conditionMeta"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <rule>
        <name value="conditionMetaProfile"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="newMeta"/>
          <contextType value="variable"/>
          <element value="profile"/>
          <transform value="copy"/>
          <parameter>
            <valueString
                         value="http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-Condition"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="conditionClinicalStatus"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="clinicalStatus"/>
        <transform value="cc"/>
        <parameter>
          <valueString
                       value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
        </parameter>
        <parameter>
          <valueString value="active"/>
        </parameter>
        <parameter>
          <valueString value="Active"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="conditionVeriStatus"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="verificationStatus"/>
        <transform value="cc"/>
        <parameter>
          <valueString
                       value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
        </parameter>
        <parameter>
          <valueString value="unconfirmed"/>
        </parameter>
        <parameter>
          <valueString value="Unconfirmed"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="conditionCatHealthConcern"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="conditionCatCodingHealthConcern"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="newCC"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="newCoding"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Coding"/>
          </parameter>
        </target>
        <rule>
          <name value="conditionCatCodingSystemHealthConcern"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString
                           value="http://hl7.org/fhir/us/core/CodeSystem/condition-category"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCatCodingCodeHealthConcern"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="health-concern"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCatCodingDisplayHealthConcern"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Health Concern"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="conditionCatFoodInsecurity"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="category"/>
        <transform value="cc"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
        </parameter>
        <parameter>
          <valueString value="food-insecurity"/>
        </parameter>
        <parameter>
          <valueString value="Food Insecurity"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="conditionCode"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="code"/>
        <variable value="newCodeCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="conditionCodeCodingFoodInsecurity"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="newCodeCC"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="newCoding"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Coding"/>
          </parameter>
        </target>
        <rule>
          <name value="conditionCodeCodingSystemFoodInsecurity"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="http://snomed.info/sct"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingCodeFoodInsecurity"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="733423003"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingDisplayFoodInsecurity"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Food insecurity"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="conditionCodeCodingLackOfFood"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="newCodeCC"/>
          <contextType value="variable"/>
          <element value="coding"/>
          <variable value="newCoding2"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Coding"/>
          </parameter>
        </target>
        <rule>
          <name value="conditionCodeCodingSystemLackOfFood"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="http://hl7.org/fhir/sid/icd-10-cm"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingCodeLackOfFood"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Z59.4"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingDisplayLackOfFood"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Lack of adequate food"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="authored"/>
      <source>
        <context value="src"/>
        <element value="authored"/>
        <variable value="authored"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="onset"/>
        <variable value="period"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Period"/>
        </parameter>
      </target>
      <target>
        <context value="period"/>
        <contextType value="variable"/>
        <element value="start"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="authored"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="entry"/>
      <source>
        <context value="bundle"/>
        <element value="entry"/>
        <variable value="entries"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="evidence"/>
        <variable value="evidence"/>
      </target>
      <target>
        <context value="evidence"/>
        <contextType value="variable"/>
        <element value="detail"/>
        <variable value="detailReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="resource"/>
        <source>
          <context value="entries"/>
          <element value="resource"/>
          <variable value="obs3"/>
          <condition value="code.coding.code = '88124-3'"/>
        </source>
        <target>
          <context value="detailReference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="reference"/>
          <parameter>
            <valueId value="obs3"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="subject"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="qSubject"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <variable value="newReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="reference"/>
        <source>
          <context value="qSubject"/>
          <element value="reference"/>
          <variable value="qReference"/>
        </source>
        <target>
          <context value="newReference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="qReference"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="display"/>
        <source>
          <context value="qSubject"/>
          <element value="display"/>
          <variable value="qDisplay"/>
        </source>
        <target>
          <context value="newReference"/>
          <contextType value="variable"/>
          <element value="display"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="qDisplay"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="conditionEntryRequest"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="entry"/>
        <contextType value="variable"/>
        <element value="request"/>
        <variable value="request"/>
      </target>
      <rule>
        <name value="conditionRequestMethod"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="method"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="POST"/>
          </parameter>
        </target>
      </rule>
      <rule>
        <name value="conditionRequestUrl"/>
        <source>
          <context value="src"/>
        </source>
        <target>
          <context value="request"/>
          <contextType value="variable"/>
          <element value="url"/>
          <transform value="copy"/>
          <parameter>
            <valueString value="Condition"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="SetConditionFullUrl"/>
    <typeMode value="none"/>
    <input>
      <name value="condition"/>
      <type value="Condition"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="id"/>
      <source>
        <context value="condition"/>
        <element value="id"/>
        <variable value="id"/>
      </source>
      <target>
        <context value="entry"/>
        <contextType value="variable"/>
        <element value="fullUrl"/>
        <transform value="append"/>
        <parameter>
          <valueString
                       value="http://hl7.org/fhir/us/sdoh-clinicalcare/Condition/"/>
        </parameter>
        <parameter>
          <valueId value="id"/>
        </parameter>
      </target>
    </rule>
  </group>
</StructureMap>