SDOH Clinical Care
2.1.0 - STU 2.1 United States of America flag

This page is part of the SDOH Clinical Care for Multiple Domains (v2.1.0: STU 2.1) based on FHIR R4. This is the current published version in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

: SDOHCC StructureMap PRAPARE - XML Representation

Draft as of 2023-07-27

Raw xml | Download



<StructureMap xmlns="http://hl7.org/fhir">
  <id value="SDOHCC-StructureMapPRAPARE"/>
  <text>
    <status value="additional"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
      <pre>/// name = &quot;SDOHCCPRAPAREMap&quot;
/// status = draft
/// title = &quot;SDOHCC StructureMap PRAPARE&quot;
/// description = &quot;A StructureMap instance that represents the resource that transforms specific questions and answers from the PRAPARE questionnaire represented in LOINC (code 93025-5) into their corresponding Observations and derived Conditions (health concerns).&quot;


// This is a more complex example where the author has chosen to extract *all* answers to Observations and to create a grouping Observation

map &quot;http://hl7.org/fhir/us/sdoh-clinicalcare/StructureMap/SDOHCC-StructureMapPRAPARE&quot; = &quot;SDOHCCPRAPAREMap&quot;

uses &quot;http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse&quot; alias questionnaireResponse as source
uses &quot;http://hl7.org/fhir/StructureDefinition/Bundle&quot; as target
uses &quot;http://hl7.org/fhir/StructureDefinition/Observation&quot; 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-BundlePRAPAREExample' &quot;bundleId&quot;;
  src -&gt; bundle.type = 'transaction' &quot;bundleType&quot;;
    
  //for each answer item in the questionnareResponse, create an Observation and add it to the groupObservation
  src.item as rootItem then 
    rootContent(src, rootItem, bundle);

  //create group observation containing all observations as hasMember
  src -&gt; bundle.entry as entry, entry.resource = create('sdohccObservation') as groupObservation then 
    TransformGroupObservation(src, bundle, groupObservation, entry) &quot;bundleGroupObsn&quot;;  
}

group rootContent(source qResponse: questionnaireResponse, source rootItem, target bundle) {
  rootItem.item as groupItem then 
    groupContent(qResponse, groupItem, bundle);
}

group groupContent(source qResponse: questionnaireResponse, source groupItem, target bundle) {
  groupItem.item as answerItem then
    itemContent(qResponse, answerItem, bundle);
}

group itemContent(source qResponse: questionnaireResponse, source answerItem, target bundle) {
  //create a single Observation for questions that can only have one answer
  answerItem where answerItem.linkId != '/93043-8/32624-9' and answerItem.linkId != '/93041-2/93031-3' and answerItem.linkId != '/93041-2/93030-5'-&gt; bundle.entry as entry, entry.resource = create('sdohccObservation') as observation then 
    TransformObservation(qResponse, answerItem, bundle, observation, entry, bundle) &quot;obsn&quot;;

  //create multiple Observations for each answer on questions that can have multiple answers (Question 2, 14 and 15)
  answerItem.answer as answer where answerItem.linkId = '/93043-8/32624-9' or answerItem.linkId = '/93041-2/93031-3' or answerItem.linkId = '/93041-2/93030-5' -&gt; bundle.entry as entry, entry.resource = create('sdohccObservation') as observation then 
    TransformObservation(qResponse, answerItem, bundle, observation, entry, bundle),
    SetValueCodeableConceptFromAnswer(answer, observation);
}

group SetValueCodeableConceptFromAnswer(source answer, target observation) {
  answer -&gt; observation.value = create('CodeableConcept') as newCC then {
    answer.value as coding -&gt; newCC.coding = coding as newCoding;
  } &quot;obsnValue&quot;;
}

group TransformObservation(source src: questionnaireResponse, source answerItem, source srcBundle: Bundle, target observation: sdohccObservation, target entry, target bundle: Bundle)
{
  src -&gt; observation.id = uuid() then
  	SetObservationFullUrl(observation, entry) &quot;obsnFullUrl&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;obsnCatSocialHistory&quot;;
  src -&gt; observation.category = cc('http://terminology.hl7.org/CodeSystem/observation-category', 'survey', 'Survey') &quot;obsnCatSurvey&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;;

  //set dates
  src.authored as authored -&gt; observation.issued = authored, observation.effective = authored;
  
  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.subject as qSubject -&gt; observation.performer = create('Reference') as newReference then {
    qSubject.reference as qReference -&gt; newReference.reference = qReference;
    qSubject.display as qDisplay -&gt; newReference.display = qDisplay;
  };  

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

  //answerItem.answer as answer -&gt; observation.id = uuid() then
  //	SetValue(answer, observation);

  //Set observation.code mapping for each corresponding answer

  // 1. Ethnicity
  answerItem where linkId = '/93043-8/56051-6' -&gt; observation.code = cc('http://loinc.org', '56051-6') as code then 
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeEthnicity&quot;;
  answerItem where linkId = '/93043-8/56051-6' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 2. Race
  //TBD: How to handle &quot;Others&quot; text?
  answerItem where linkId = '/93043-8/32624-9' -&gt; observation.code = cc('http://loinc.org', '32624-9') as code &quot;obsCodeRace&quot;;
  answerItem where linkId = '/93043-8/32624-9' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 3. Farm Worker Status
  answerItem where linkId = '/93043-8/93035-4' -&gt; observation.code = cc('http://loinc.org', '93035-4') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeFarmWorkerStatus&quot;;
  answerItem where linkId = '/93043-8/93035-4' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 4. Veteran Status
  answerItem where linkId = '/93043-8/93034-7' -&gt; observation.code = cc('http://loinc.org', '93034-7') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeVetStatus&quot;;
  answerItem where linkId = '/93043-8/93034-7' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'veteran-status' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Veteran Status' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;  
  
  // 5. English Proficiency
  answerItem where linkId = '/93043-8/54899-0' -&gt; observation.code = cc('http://loinc.org', '54899-0') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeEngProf&quot;;
  answerItem where linkId = '/93043-8/54899-0' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 6. Household Size
  answerItem where linkId = '/93042-0/63512-8' -&gt; observation.code = cc('http://loinc.org', '63512-8') as code then {
    answerItem.answer as answer -&gt; observation.value = create('Quantity') as newQty then {
      answer.value as vs -&gt; newQty.value = vs &quot;obsnQtyValue&quot;;
      src -&gt; newQty.unit = '{#}' &quot;obsnQtyUnit&quot;;
      src -&gt; newQty.system = 'http://unitsofmeasure.org' &quot;obsnQtySystem&quot;;
      src -&gt; newQty.code = '{#}' &quot;obsnQtyCode&quot;;
    } &quot;obsnValue&quot;;
  } &quot;obsnCodeHouseholdSize&quot;;
  answerItem where linkId = '/93042-0/63512-8' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 7. Housing
  answerItem where linkId = '/93042-0/71802-3' -&gt; observation.code = cc('http://loinc.org', '71802-3') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeHousing&quot;;
  answerItem where linkId = '/93042-0/71802-3' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'homelessness' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Homelessness' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 8. Housing Status
  answerItem where linkId = '/93042-0/93033-9' -&gt; observation.code = cc('http://loinc.org', '93033-9') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeHousingStatus&quot;;
  answerItem where linkId = '/93042-0/93033-9' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'housing-instability' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Housing Instability' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 9. Neighborhood
  answerItem where linkId = '/93042-0/56799-0' -&gt; observation.code = cc('http://loinc.org', '56799-0') as code then
    SetValue(answerItem, observation) &quot;obsnCodeNeighborhood&quot;;
  answerItem where linkId = '/93042-0/56799-0' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 10. Education
  answerItem where linkId = '/93041-2/82589-3' -&gt; observation.code = cc('http://loinc.org', '82589-3') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeEducation&quot;;
  answerItem where linkId = '/93041-2/82589-3' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'educational-attainment' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Educational Attainment' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 11. Employment
  answerItem where linkId = '/93041-2/67875-5' -&gt; observation.code = cc('http://loinc.org', '67875-5') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeEmployment&quot;;
  answerItem where linkId = '/93041-2/67875-5' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'employment-status' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Employment Status' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 12. Insurance
  answerItem where linkId = '/93041-2/76437-3' -&gt; observation.code = cc('http://loinc.org', '76437-3') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeInsurance&quot;;
  answerItem where linkId = '/93041-2/76437-3' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'health-insurance-coverage-status' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Health Insurance Coverage Status' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 13. Household Income
  answerItem where linkId = '/93041-2/63586-2' -&gt; observation.code = cc('http://loinc.org', '63586-2') as code then {
    answerItem.answer as answer -&gt; observation.value = create('Quantity') as newQty then {
      answer.value as vs -&gt; newQty.value = vs &quot;obsnQtyValue&quot;;
      src -&gt; newQty.unit = '/a' &quot;obsnQtyUnit&quot;;
      src -&gt; newQty.system = 'http://unitsofmeasure.org' &quot;obsnQtySystem&quot;;
      src -&gt; newQty.code = '/a' &quot;obsnQtyCode&quot;;
    } &quot;obsnBalue&quot;;
  } &quot;obsnCodeHouseholdIncome&quot;;
  answerItem where linkId = '/93041-2/63586-2' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;  

  // 14. Material Security
  answerItem where linkId = '/93041-2/93031-3' -&gt; observation.code = cc('http://loinc.org', '93031-3') as code &quot;obsnCodeMaterialSecurity&quot;;
  // answer: Food
  answerItem where linkId = '/93041-2/93031-3' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'material-hardship' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Material Hardship' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;
  
  // 15. Transportation
  answerItem where linkId = '/93041-2/93030-5' -&gt; observation.code = cc('http://loinc.org', '93030-5') as code &quot;obsnCodeTransportation&quot;;
  answerItem where linkId = '/93041-2/93030-5' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'transportation-insecurity' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Transportation Insecurity' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 16. Social Integration
  answerItem where linkId = '/93040-4/93029-7' -&gt; observation.code = cc('http://loinc.org', '93029-7') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeSocInteg&quot;;
  answerItem where linkId = '/93040-4/93029-7' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'social-connection' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Social Connection' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 17. Stress
  answerItem where linkId = '/93040-4/93038-8' -&gt; observation.code = cc('http://loinc.org', '93038-8') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeStress&quot;;
  answerItem where linkId = '/93040-4/93038-8' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'stress' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Stress' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 18. Incarceration
  answerItem where linkId = '/93039-6/93028-9' -&gt; observation.code = cc('http://loinc.org', '93028-9') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeIncarceration&quot;;
  answerItem where linkId = '/93039-6/93028-9' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 19. Refugee
  answerItem where linkId = '/93039-6/93027-1' -&gt; observation.code = cc('http://loinc.org', '93027-1') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeRefugee&quot;;
  answerItem where linkId = '/93039-6/93027-1' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 20. Safety
  answerItem where linkId = '/93039-6/93026-3' -&gt; observation.code = cc('http://loinc.org', '93026-3') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeSafety&quot;;
  answerItem where linkId = '/93039-6/93026-3' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'sdoh-category-unspecified' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'SDOH Category Unspecified' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  // 21. Domestic Violence
  answerItem where linkId = '/93039-6/76501-6' -&gt; observation.code = cc('http://loinc.org', '76501-6') as code then
    SetValueCodeableConcept(answerItem, observation) &quot;obsnCodeDomViolence&quot;;
  answerItem where linkId = '/93039-6/76501-6' -&gt; observation.category = create('CodeableConcept') as newCC then {
    src -&gt; newCC.coding = create('Coding') as newCoding then {
      src -&gt; newCoding.system = 'http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;obsnCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'intimate-partner-violence' &quot;obsnCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Intimate Partner Violence' &quot;obsnCatCodingDisplay&quot;;
    } &quot;obsnCatCoding&quot;;
  } &quot;obsnCat&quot;;

  //create a Condition if homeless
  answerItem where linkId = '/93042-0/71802-3' and answer.value.code ='LA30190-5' -&gt; bundle.entry as entry, entry.resource = create('sdohccCondition') as condition then
    TransformCondition(src, bundle, condition, entry), SetConditionCodeAndEvidence1(src, srcBundle, condition) &quot;conditionHomeless&quot;;

  //create a Condition if unemployed
  answerItem where linkId = '/93041-2/67875-5' and answer.value.code ='LA17956-6' -&gt; bundle.entry as entry, entry.resource = create('sdohccCondition') as condition then
    TransformCondition(src, bundle, condition, entry), SetConditionCodeAndEvidence2(src, srcBundle, condition) &quot;conditionUnemployed&quot;;

  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;;
}

group SetValue(source answerItem, target observation) {
  answerItem.answer as answer -&gt; observation.id as id then {
    answer.value as vs -&gt; observation.value = vs;
  };
}

group SetValueCodeableConcept(source src, target observation) {
  src.answer as answer -&gt; observation.value = create('CodeableConcept') as newCC then {
    answer.value as coding -&gt; newCC.coding = coding as newCoding;
  };
}

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, target condition: sdohccCondition, target entry)
{
  src -&gt; condition.id = uuid() then
    SetConditionFullUrl(condition, entry) &quot;conditionFullUrl&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;conditionVerificationStatus&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;conditionCatCodingSystem&quot;;
      src -&gt; newCoding.code = 'health-concern' &quot;conditionCatCodingCode&quot;;
      src -&gt; newCoding.display = 'Health Concern' &quot;conditionCatCodingDisplay&quot;;
    } &quot;conditionCatCoding&quot;;
  } &quot;conditionCat&quot;;
    
  src.authored as authored -&gt; condition.onset = create('Period') as period,
    period.start = authored &quot;conditionOnset&quot;;

  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.subject as qSubject -&gt; condition.asserter = 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: sdohccCondition, target entry)
{
  condition.id as id -&gt; entry.fullUrl = append('http://hl7.org/fhir/us/sdoh-clinicalcare/Condition/', id);
}

group SetConditionCodeAndEvidence1(source src: questionnaireResponse, source bundle, target condition)
{
  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;conditionCodeCodingSystem&quot;;
        src -&gt; newCoding.code = '32911000' &quot;conditionCodeCodingCode&quot;;
        src -&gt; newCoding.display = 'Homeless' &quot;conditionCodeCodingDisplay&quot;;
    } &quot;conditionCoding&quot;;
    src -&gt; newCodeCC.coding = create('Coding') as newCoding2 then {
        src -&gt; newCoding2.system = 'http://hl7.org/fhir/sid/icd-10-cm' &quot;conditionCodeCodingSystem&quot;;
        src -&gt; newCoding2.code = 'Z59.0' &quot;conditionCodeCodingCode&quot;;
        src -&gt; newCoding2.display = 'Homelessness' &quot;conditionCodeCodingDisplay&quot;;
    } &quot;conditionCoding&quot;;
  } &quot;conditionCode&quot;;
  
  //Add sdoh category
  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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;conditionCatCodingSystem&quot;;
        src -&gt; newCoding.code = 'homelessness' &quot;conditionCatCodingCode&quot;;
        src -&gt; newCoding.display = 'Homelessness' &quot;conditionCatCodingDisplay&quot;;
    } &quot;conditionCatCoding&quot;;
  } &quot;conditionCat&quot;;

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

group SetConditionCodeAndEvidence2(source src: questionnaireResponse, source bundle, target condition)
{
  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;conditionCodeCodingSystem&quot;;
        src -&gt; newCoding.code = '73438004' &quot;conditionCodeCodingCode&quot;;
        src -&gt; newCoding.display = 'Unemployed' &quot;conditionCodeCodingDisplay&quot;;
    } &quot;conditionCoding&quot;;
    src -&gt; newCodeCC.coding = create('Coding') as newCoding2 then {
        src -&gt; newCoding2.system = 'http://hl7.org/fhir/sid/icd-10-cm' &quot;conditionCodeCodingSystem&quot;;
        src -&gt; newCoding2.code = 'Z56.0' &quot;conditionCodeCodingCode&quot;;
        src -&gt; newCoding2.display = 'Unemployment, unspecified' &quot;conditionCodeCodingDisplay&quot;;
    } &quot;conditionCoding&quot;;
  } &quot;conditionCode&quot;; 
  //Add sdoh category
  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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes' &quot;conditionCatCodingSystem&quot;;
        src -&gt; newCoding.code = 'employment-status' &quot;conditionCatCodingCode&quot;;
        src -&gt; newCoding.display = 'Employment Status' &quot;conditionCatCodingDisplay&quot;;
    } &quot;conditionCatCoding&quot;;
  }&quot;conditionCat&quot;;  
  bundle.entry as entries -&gt; condition.evidence as evidence, evidence.detail = create('Reference') as detailReference then {
  	entries.resource as obs where code.coding.code = '67875-5'-&gt; detailReference.reference = reference(obs)  &quot;conditionEvidence&quot;; 
  };
}

group TransformGroupObservation(source src: questionnaireResponse, source bundle:Bundle, target groupObservation: Observation, target entry)
{
  src -&gt; groupObservation.id = uuid() then
    SetObservationFullUrl(groupObservation, entry) &quot;grpObsnFullUrl&quot;; 
  src -&gt; groupObservation.status = 'final' &quot;grpObsnStatus&quot;; 
  src -&gt; groupObservation.category = cc('http://terminology.hl7.org/CodeSystem/observation-category', 'social-history', 'Social History') &quot;grpObsnCatSocialHistory&quot;;
  src -&gt; groupObservation.category = cc('http://terminology.hl7.org/CodeSystem/observation-category', 'survey', 'Survey') &quot;grpObsnCatSurvey&quot;;

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

  src.authored as authored -&gt; groupObservation.effective = authored;
  src.subject as qSubject -&gt; groupObservation.subject = create('Reference') as newReference then {
    qSubject.reference as qReference -&gt; newReference.reference = qReference &quot;grpObsnSubjRef&quot;;
    qSubject.display as qDisplay -&gt; newReference.display = qDisplay &quot;grpObsnSubjDisplay&quot;;
  } &quot;grpObsnSubject&quot;;  

  src -&gt; groupObservation.code = cc('http://loinc.org', '93025-5') &quot;grpObsnCode&quot;;   

  //only add observations that are derived from the answers
  bundle.entry as entries -&gt; groupObservation.hasMember = create('Reference') as df then {
    entries.resource as obs where status.exists() and hasMember.exists().not() -&gt; df.reference = reference(obs) &quot;grpObsnHasMemberReference&quot;; 
  } &quot;grpObsnHasMember&quot;;

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

  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;;    
}</pre>
    </div>
  </text>
  <url
       value="http://hl7.org/fhir/us/sdoh-clinicalcare/StructureMap/SDOHCC-StructureMapPRAPARE"/>
  <version value="2.1.0"/>
  <name value="SDOHCCStructureMapPRAPARE"/>
  <title value="SDOHCC StructureMap PRAPARE"/>
  <status value="draft"/>
  <date value="2023-07-27T20:42:33+00:00"/>
  <publisher value="HL7 International Patient Care WG"/>
  <contact>
    <name value="HL7 International Patient Care WG"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/patientcare"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="patientcare@lists.hl7.org"/>
    </telecom>
  </contact>
  <description
               value="A StructureMap instance that represents the resource that transforms specific questions and answers from the PRAPARE questionnaire represented in LOINC (code 93025-5) into their corresponding Observations and derived Conditions (health concerns)."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <structure>
    <url
         value="http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse"/>
    <mode value="source"/>
    <alias value="questionnaireResponse"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
    <mode value="target"/>
  </structure>
  <structure>
    <url value="http://hl7.org/fhir/StructureDefinition/Observation"/>
    <mode value="target"/>
  </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-BundlePRAPAREExample"/>
        </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="rootItem"/>
      </source>
      <dependent>
        <name value="rootContent"/>
        <variable value="src"/>
        <variable value="rootItem"/>
        <variable value="bundle"/>
      </dependent>
    </rule>
    <rule>
      <name value="bundleGroupObsn"/>
      <source>
        <context value="src"/>
      </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="groupObservation"/>
        <transform value="create"/>
        <parameter>
          <valueString value="sdohccObservation"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformGroupObservation"/>
        <variable value="src"/>
        <variable value="bundle"/>
        <variable value="groupObservation"/>
        <variable value="entry"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="rootContent"/>
    <typeMode value="none"/>
    <input>
      <name value="qResponse"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="rootItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="item"/>
      <source>
        <context value="rootItem"/>
        <element value="item"/>
        <variable value="groupItem"/>
      </source>
      <dependent>
        <name value="groupContent"/>
        <variable value="qResponse"/>
        <variable value="groupItem"/>
        <variable value="bundle"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="groupContent"/>
    <typeMode value="none"/>
    <input>
      <name value="qResponse"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="groupItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="item"/>
      <source>
        <context value="groupItem"/>
        <element value="item"/>
        <variable value="answerItem"/>
      </source>
      <dependent>
        <name value="itemContent"/>
        <variable value="qResponse"/>
        <variable value="answerItem"/>
        <variable value="bundle"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="itemContent"/>
    <typeMode value="none"/>
    <input>
      <name value="qResponse"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="answerItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="obsn"/>
      <source>
        <context value="answerItem"/>
        <condition
                   value="(answerItem.linkId != '/93043-8/32624-9') and (answerItem.linkId != '/93041-2/93031-3') and (answerItem.linkId != '/93041-2/93030-5')"/>
      </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="observation"/>
        <transform value="create"/>
        <parameter>
          <valueString value="sdohccObservation"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformObservation"/>
        <variable value="qResponse"/>
        <variable value="answerItem"/>
        <variable value="bundle"/>
        <variable value="observation"/>
        <variable value="entry"/>
        <variable value="bundle"/>
      </dependent>
    </rule>
    <rule>
      <name value="answer"/>
      <source>
        <context value="answerItem"/>
        <element value="answer"/>
        <variable value="answer"/>
        <condition
                   value="(answerItem.linkId = '/93043-8/32624-9') or (answerItem.linkId = '/93041-2/93031-3') or (answerItem.linkId = '/93041-2/93030-5')"/>
      </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="observation"/>
        <transform value="create"/>
        <parameter>
          <valueString value="sdohccObservation"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformObservation"/>
        <variable value="qResponse"/>
        <variable value="answerItem"/>
        <variable value="bundle"/>
        <variable value="observation"/>
        <variable value="entry"/>
        <variable value="bundle"/>
      </dependent>
      <dependent>
        <name value="SetValueCodeableConceptFromAnswer"/>
        <variable value="answer"/>
        <variable value="observation"/>
      </dependent>
    </rule>
  </group>
  <group>
    <name value="SetValueCodeableConceptFromAnswer"/>
    <typeMode value="none"/>
    <input>
      <name value="answer"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="observation"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="obsnValue"/>
      <source>
        <context 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>
  </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="srcBundle"/>
      <type value="Bundle"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="observation"/>
      <type value="sdohccObservation"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="bundle"/>
      <type value="Bundle"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="obsnFullUrl"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
      <dependent>
        <name value="SetObservationFullUrl"/>
        <variable value="observation"/>
        <variable value="entry"/>
      </dependent>
    </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="obsnCatSocialHistory"/>
      <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="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="authored"/>
      <source>
        <context value="src"/>
        <element value="authored"/>
        <variable value="authored"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="issued"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="authored"/>
        </parameter>
      </target>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="effective"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="authored"/>
        </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="subject"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="qSubject"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="performer"/>
        <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="obsnDerivedFrom"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="id"/>
      </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="obsnDerivedFromReference"/>
        <source>
          <context 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>
    <rule>
      <name value="obsnCodeEthnicity"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/56051-6'"/>
      </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="56051-6"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/56051-6'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsCodeRace"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/32624-9'"/>
      </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="32624-9"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/32624-9'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeFarmWorkerStatus"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/93035-4'"/>
      </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="93035-4"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/93035-4'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeVetStatus"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/93034-7'"/>
      </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="93034-7"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/93034-7'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="veteran-status"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Veteran Status"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeEngProf"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/54899-0'"/>
      </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="54899-0"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93043-8/54899-0'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeHouseholdSize"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/63512-8'"/>
      </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="63512-8"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnValue"/>
        <source>
          <context value="answerItem"/>
          <element value="answer"/>
          <variable value="answer"/>
        </source>
        <target>
          <context value="observation"/>
          <contextType value="variable"/>
          <element value="value"/>
          <variable value="newQty"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Quantity"/>
          </parameter>
        </target>
        <rule>
          <name value="obsnQtyValue"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="vs"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="vs"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnQtyUnit"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="unit"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="{#}"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnQtySystem"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="http://unitsofmeasure.org"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnQtyCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="{#}"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/63512-8'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeHousing"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/71802-3'"/>
      </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="71802-3"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/71802-3'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="homelessness"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Homelessness"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeHousingStatus"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/93033-9'"/>
      </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="93033-9"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/93033-9'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="housing-instability"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Housing Instability"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeNeighborhood"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/56799-0'"/>
      </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="56799-0"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValue"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93042-0/56799-0'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeEducation"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/82589-3'"/>
      </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="82589-3"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/82589-3'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="educational-attainment"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Educational Attainment"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeEmployment"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/67875-5'"/>
      </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="67875-5"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/67875-5'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="employment-status"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Employment Status"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeInsurance"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/76437-3'"/>
      </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="76437-3"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/76437-3'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="health-insurance-coverage-status"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Health Insurance Coverage Status"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeHouseholdIncome"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/63586-2'"/>
      </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="63586-2"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnBalue"/>
        <source>
          <context value="answerItem"/>
          <element value="answer"/>
          <variable value="answer"/>
        </source>
        <target>
          <context value="observation"/>
          <contextType value="variable"/>
          <element value="value"/>
          <variable value="newQty"/>
          <transform value="create"/>
          <parameter>
            <valueString value="Quantity"/>
          </parameter>
        </target>
        <rule>
          <name value="obsnQtyValue"/>
          <source>
            <context value="answer"/>
            <element value="value"/>
            <variable value="vs"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="value"/>
            <transform value="copy"/>
            <parameter>
              <valueId value="vs"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnQtyUnit"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="unit"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="/a"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnQtySystem"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="system"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="http://unitsofmeasure.org"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnQtyCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newQty"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="/a"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/63586-2'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeMaterialSecurity"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/93031-3'"/>
      </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="93031-3"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/93031-3'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="material-hardship"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Material Hardship"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeTransportation"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/93030-5'"/>
      </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="93030-5"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93041-2/93030-5'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="transportation-insecurity"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Transportation Insecurity"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeSocInteg"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93040-4/93029-7'"/>
      </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="93029-7"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93040-4/93029-7'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="social-connection"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Social Connection"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeStress"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93040-4/93038-8'"/>
      </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="93038-8"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93040-4/93038-8'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="stress"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Stress"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeIncarceration"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/93028-9'"/>
      </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="93028-9"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/93028-9'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeRefugee"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/93027-1'"/>
      </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="93027-1"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/93027-1'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeSafety"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/93026-3'"/>
      </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="93026-3"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/93026-3'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="sdoh-category-unspecified"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="SDOH Category Unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="obsnCodeDomViolence"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/76501-6'"/>
      </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="76501-6"/>
        </parameter>
      </target>
      <dependent>
        <name value="SetValueCodeableConcept"/>
        <variable value="answerItem"/>
        <variable value="observation"/>
      </dependent>
    </rule>
    <rule>
      <name value="obsnCat"/>
      <source>
        <context value="answerItem"/>
        <condition value="linkId = '/93039-6/76501-6'"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="category"/>
        <variable value="newCC"/>
        <transform value="create"/>
        <parameter>
          <valueString value="CodeableConcept"/>
        </parameter>
      </target>
      <rule>
        <name value="obsnCatCoding"/>
        <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="obsnCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="intimate-partner-violence"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="obsnCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Intimate Partner Violence"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="conditionHomeless"/>
      <source>
        <context value="answerItem"/>
        <condition
                   value="(linkId = '/93042-0/71802-3') and (answer.value.code = 'LA30190-5')"/>
      </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="sdohccCondition"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformCondition"/>
        <variable value="src"/>
        <variable value="bundle"/>
        <variable value="condition"/>
        <variable value="entry"/>
      </dependent>
      <dependent>
        <name value="SetConditionCodeAndEvidence1"/>
        <variable value="src"/>
        <variable value="srcBundle"/>
        <variable value="condition"/>
      </dependent>
    </rule>
    <rule>
      <name value="conditionUnemployed"/>
      <source>
        <context value="answerItem"/>
        <condition
                   value="(linkId = '/93041-2/67875-5') and (answer.value.code = 'LA17956-6')"/>
      </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="sdohccCondition"/>
        </parameter>
      </target>
      <dependent>
        <name value="TransformCondition"/>
        <variable value="src"/>
        <variable value="bundle"/>
        <variable value="condition"/>
        <variable value="entry"/>
      </dependent>
      <dependent>
        <name value="SetConditionCodeAndEvidence2"/>
        <variable value="src"/>
        <variable value="srcBundle"/>
        <variable value="condition"/>
      </dependent>
    </rule>
    <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>
  </group>
  <group>
    <name value="SetValue"/>
    <typeMode value="none"/>
    <input>
      <name value="answerItem"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="observation"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="answer"/>
      <source>
        <context value="answerItem"/>
        <element value="answer"/>
        <variable value="answer"/>
      </source>
      <target>
        <context value="observation"/>
        <contextType value="variable"/>
        <element value="id"/>
        <variable value="id"/>
      </target>
      <rule>
        <name value="value"/>
        <source>
          <context value="answer"/>
          <element value="value"/>
          <variable value="vs"/>
        </source>
        <target>
          <context value="observation"/>
          <contextType value="variable"/>
          <element value="value"/>
          <transform value="copy"/>
          <parameter>
            <valueId value="vs"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="SetValueCodeableConcept"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="observation"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="answer"/>
      <source>
        <context value="src"/>
        <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>
  </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"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="condition"/>
      <type value="sdohccCondition"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="conditionFullUrl"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </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="conditionVerificationStatus"/>
      <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="conditionCat"/>
      <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="conditionCatCoding"/>
        <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="conditionCatCodingSystem"/>
          <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="conditionCatCodingCode"/>
          <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="conditionCatCodingDisplay"/>
          <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="conditionOnset"/>
      <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="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="subject"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="qSubject"/>
      </source>
      <target>
        <context value="condition"/>
        <contextType value="variable"/>
        <element value="asserter"/>
        <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="sdohccCondition"/>
      <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>
  <group>
    <name value="SetConditionCodeAndEvidence1"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="condition"/>
      <mode value="target"/>
    </input>
    <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="conditionCoding"/>
        <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="conditionCodeCodingSystem"/>
          <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="conditionCodeCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="32911000"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Homeless"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="conditionCoding"/>
        <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="conditionCodeCodingSystem"/>
          <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="conditionCodeCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Z59.0"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Homelessness"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="conditionCat"/>
      <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="conditionCatCoding"/>
        <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="conditionCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="homelessness"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Homelessness"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </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="conditionEvidence"/>
        <source>
          <context value="entries"/>
          <element value="resource"/>
          <variable value="obs"/>
          <condition value="code.coding.code = '71802-3'"/>
        </source>
        <target>
          <context value="detailReference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="reference"/>
          <parameter>
            <valueId value="obs"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="SetConditionCodeAndEvidence2"/>
    <typeMode value="none"/>
    <input>
      <name value="src"/>
      <type value="questionnaireResponse"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="bundle"/>
      <mode value="source"/>
    </input>
    <input>
      <name value="condition"/>
      <mode value="target"/>
    </input>
    <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="conditionCoding"/>
        <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="conditionCodeCodingSystem"/>
          <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="conditionCodeCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="73438004"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unemployed"/>
            </parameter>
          </target>
        </rule>
      </rule>
      <rule>
        <name value="conditionCoding"/>
        <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="conditionCodeCodingSystem"/>
          <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="conditionCodeCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Z56.0"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCodeCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding2"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Unemployment, unspecified"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </rule>
    <rule>
      <name value="conditionCat"/>
      <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="conditionCatCoding"/>
        <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="conditionCatCodingSystem"/>
          <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/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCatCodingCode"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="code"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="employment-status"/>
            </parameter>
          </target>
        </rule>
        <rule>
          <name value="conditionCatCodingDisplay"/>
          <source>
            <context value="src"/>
          </source>
          <target>
            <context value="newCoding"/>
            <contextType value="variable"/>
            <element value="display"/>
            <transform value="copy"/>
            <parameter>
              <valueString value="Employment Status"/>
            </parameter>
          </target>
        </rule>
      </rule>
    </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="conditionEvidence"/>
        <source>
          <context value="entries"/>
          <element value="resource"/>
          <variable value="obs"/>
          <condition value="code.coding.code = '67875-5'"/>
        </source>
        <target>
          <context value="detailReference"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="reference"/>
          <parameter>
            <valueId value="obs"/>
          </parameter>
        </target>
      </rule>
    </rule>
  </group>
  <group>
    <name value="TransformGroupObservation"/>
    <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="groupObservation"/>
      <type value="Observation"/>
      <mode value="target"/>
    </input>
    <input>
      <name value="entry"/>
      <mode value="target"/>
    </input>
    <rule>
      <name value="grpObsnFullUrl"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="id"/>
        <transform value="uuid"/>
      </target>
      <dependent>
        <name value="SetObservationFullUrl"/>
        <variable value="groupObservation"/>
        <variable value="entry"/>
      </dependent>
    </rule>
    <rule>
      <name value="grpObsnStatus"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="status"/>
        <transform value="copy"/>
        <parameter>
          <valueString value="final"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="grpObsnCatSocialHistory"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <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="grpObsnCatSurvey"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <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="grpObsMeta"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="meta"/>
        <variable value="newMeta"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Meta"/>
        </parameter>
      </target>
      <rule>
        <name value="grpObsnMetaProfile"/>
        <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="authored"/>
      <source>
        <context value="src"/>
        <element value="authored"/>
        <variable value="authored"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="effective"/>
        <transform value="copy"/>
        <parameter>
          <valueId value="authored"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="grpObsnSubject"/>
      <source>
        <context value="src"/>
        <element value="subject"/>
        <variable value="qSubject"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="subject"/>
        <variable value="newReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="grpObsnSubjRef"/>
        <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="grpObsnSubjDisplay"/>
        <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="grpObsnCode"/>
      <source>
        <context value="src"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="code"/>
        <transform value="cc"/>
        <parameter>
          <valueString value="http://loinc.org"/>
        </parameter>
        <parameter>
          <valueString value="93025-5"/>
        </parameter>
      </target>
    </rule>
    <rule>
      <name value="grpObsnHasMember"/>
      <source>
        <context value="bundle"/>
        <element value="entry"/>
        <variable value="entries"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="hasMember"/>
        <variable value="df"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="grpObsnHasMemberReference"/>
        <source>
          <context value="entries"/>
          <element value="resource"/>
          <variable value="obs"/>
          <condition value="status.exists() and hasMember.exists().not()"/>
        </source>
        <target>
          <context value="df"/>
          <contextType value="variable"/>
          <element value="reference"/>
          <transform value="reference"/>
          <parameter>
            <valueId value="obs"/>
          </parameter>
        </target>
      </rule>
    </rule>
    <rule>
      <name value="grpObsnDerivedFrom"/>
      <source>
        <context value="src"/>
        <element value="id"/>
        <variable value="id"/>
      </source>
      <target>
        <context value="groupObservation"/>
        <contextType value="variable"/>
        <element value="derivedFrom"/>
        <variable value="newReference"/>
        <transform value="create"/>
        <parameter>
          <valueString value="Reference"/>
        </parameter>
      </target>
      <rule>
        <name value="grpObsnDerivedFromReference"/>
        <source>
          <context 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>
    <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>
  </group>
</StructureMap>