National Healthcare Safety Network (NHSN) Digital Quality Measure (dQM) Reporting Implementation Guide
1.0.0-ballot - STU1 Ballot United States of America flag

This page is part of the National Healthcare Safety Network (NHSN) Digital Quality Measure (dQM) Reporting Implementation Guide (v1.0.0-ballot: STU 1 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. . For a full list of available versions, see the Directory of published versions

: Effective - Data Requirements - JSON Representation

Page standards status: Informative

Raw json | Download


{
  "resourceType" : "Library",
  "id" : "effective-data-requirements",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Library effective-data-requirements</b></p><a name=\"effective-data-requirements\"> </a><a name=\"hceffective-data-requirements\"> </a><a name=\"effective-data-requirements-en-US\"> </a><h2>Related Artifacts</h2><table class=\"grid\"><tr><td>Depends On</td><td>Library FHIRHelpers</td><td><a href=\"http://fhir.org/guides/cqf/common/4.0.1/4.0.1/Library-FHIRHelpers.html\">http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1</a></td></tr><tr><td>Depends On</td><td>Library Global</td><td><a href=\"http://hl7.org/fhir/us/cqfmeasures/STU4/Library-MATGlobalCommonFunctions.html\">http://hl7.org/fhir/us/cqfmeasures/Library/MATGlobalCommonFunctions</a></td></tr><tr><td>Depends On</td><td>Code system ActCode</td><td><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-ActCode.html\">ActCode</a></td></tr><tr><td>Depends On</td><td>Code system Observation Category</td><td><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-observation-category.html\">Observation Category Codes</a></td></tr><tr><td>Depends On</td><td>Code system LOINC</td><td><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-loinc.html\">Logical Observation Identifiers, Names and Codes (LOINC)</a></td></tr><tr><td>Depends On</td><td>Code system V2-0074</td><td><a href=\"http://terminology.hl7.org/5.3.0/CodeSystem-v2-0074.html\">diagnosticServiceSectionId</a></td></tr><tr><td>Depends On</td><td>Value set Encounter Inpatient</td><td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a></td></tr><tr><td>Depends On</td><td>Value set Emergency Department Visit</td><td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></td></tr><tr><td>Depends On</td><td>Value set Observation Services</td><td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></td></tr><tr><td>Depends On</td><td>Value set Inpatient, Emergency, and Observation Locations</td><td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.265/expansion\">Inpatient, Emergency, and Observation Locations</a></td></tr></table><h2>Parameters</h2><table class=\"grid\"><tr><td>Measurement Period</td><td>in</td><td>0</td><td>1</td><td>Period</td></tr><tr><td>SDE Encounter</td><td>out</td><td>0</td><td>*</td><td>Encounter</td></tr><tr><td>SDE Medication Request</td><td>out</td><td>0</td><td>*</td><td>MedicationRequest</td></tr><tr><td>SDE Coverage</td><td>out</td><td>0</td><td>*</td><td>Coverage</td></tr><tr><td>SDE Procedure</td><td>out</td><td>0</td><td>*</td><td>Procedure</td></tr><tr><td>SDE Device</td><td>out</td><td>0</td><td>*</td><td>Device</td></tr><tr><td>SDE Observation Lab Category</td><td>out</td><td>0</td><td>*</td><td>Observation</td></tr><tr><td>SDE Observation Vital Signs Category</td><td>out</td><td>0</td><td>*</td><td>Observation</td></tr><tr><td>SDE DiagnosticReport Others</td><td>out</td><td>0</td><td>*</td><td>DiagnosticReport</td></tr><tr><td>SDE Medication Administration</td><td>out</td><td>0</td><td>*</td><td>MedicationAdministration</td></tr><tr><td>SDE Observation Category</td><td>out</td><td>0</td><td>*</td><td>Observation</td></tr><tr><td>SDE Condition</td><td>out</td><td>0</td><td>*</td><td>Condition</td></tr><tr><td>Initial Population</td><td>out</td><td>0</td><td>*</td><td>Encounter</td></tr><tr><td>SDE DiagnosticReport Lab</td><td>out</td><td>0</td><td>*</td><td>DiagnosticReport</td></tr><tr><td>SDE Location</td><td>out</td><td>0</td><td>*</td><td>Location</td></tr><tr><td>SDE Service Request</td><td>out</td><td>0</td><td>*</td><td>ServiceRequest</td></tr><tr><td>SDE DiagnosticReport Note</td><td>out</td><td>0</td><td>*</td><td>DiagnosticReport</td></tr><tr><td>SDE Minimal Patient</td><td>out</td><td>0</td><td>1</td><td>Patient</td></tr><tr><td>SDE Medication</td><td>out</td><td>0</td><td>*</td><td>Medication</td></tr><tr><td>SDE Specimen</td><td>out</td><td>0</td><td>*</td><td>Specimen</td></tr></table><h2>Data Requirements</h2><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> (<a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>)</td></tr><tr style=\"background-color: #efefef\"><td>Filter</td><td>Value</td></tr><tr><td>type</td><td>In ValueSet <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a></td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> (<a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>)</td></tr><tr style=\"background-color: #efefef\"><td>Filter</td><td>Value</td></tr><tr><td>type</td><td>In ValueSet <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> (<a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>)</td></tr><tr style=\"background-color: #efefef\"><td>Filter</td><td>Value</td></tr><tr><td>type</td><td>In ValueSet <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> (<a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>)</td></tr><tr style=\"background-color: #efefef\"><td>Filter</td><td>Value</td></tr><tr><td>class</td><td>One of these codes: <a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-ActCode.html#v3-ActCode-EMER\">ActCode</a> EMER: emergency, <a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-ActCode.html#v3-ActCode-ACUTE\">ActCode</a> ACUTE: inpatient acute, <a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-ActCode.html#v3-ActCode-IMP\">ActCode</a> IMP: inpatient encounter, <a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-ActCode.html#v3-ActCode-NONAC\">ActCode</a> NONAC: inpatient non-acute, <a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-v3-ActCode.html#v3-ActCode-SS\">ActCode</a> SS: short stay</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> (<a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/location.html\">Location</a> (<a href=\"http://hl7.org/fhir/R4/location.html\">Location</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/medicationrequest.html\">MedicationRequest</a> (<a href=\"http://hl7.org/fhir/R4/medicationrequest.html\">MedicationRequest</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/coverage.html\">Coverage</a> (<a href=\"http://hl7.org/fhir/R4/coverage.html\">Coverage</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/procedure.html\">Procedure</a> (<a href=\"http://hl7.org/fhir/R4/procedure.html\">Procedure</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/device.html\">Device</a> (<a href=\"http://hl7.org/fhir/R4/device.html\">Device</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> (<a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/diagnosticreport.html\">DiagnosticReport</a> (<a href=\"http://hl7.org/fhir/R4/diagnosticreport.html\">DiagnosticReport</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/medicationadministration.html\">MedicationAdministration</a> (<a href=\"http://hl7.org/fhir/R4/medicationadministration.html\">MedicationAdministration</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/condition.html\">Condition</a> (<a href=\"http://hl7.org/fhir/R4/condition.html\">Condition</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/servicerequest.html\">ServiceRequest</a> (<a href=\"http://hl7.org/fhir/R4/servicerequest.html\">ServiceRequest</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a> (<a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/medication.html\">Medication</a> (<a href=\"http://hl7.org/fhir/R4/medication.html\">Medication</a>)</td></tr></table><table class=\"grid\"><tr><td colspan=\"2\"><b>Type</b>: <a href=\"http://hl7.org/fhir/R4/specimen.html\">Specimen</a> (<a href=\"http://hl7.org/fhir/R4/specimen.html\">Specimen</a>)</td></tr></table></div>"
  },
  "extension" : [
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code" : "EMER",
        "display" : "emergency"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code" : "ACUTE",
        "display" : "inpatient acute"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code" : "IMP",
        "display" : "inpatient encounter"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code" : "NONAC",
        "display" : "inpatient non-acute"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code" : "SS",
        "display" : "short stay"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
        "code" : "laboratory",
        "display" : "Laboratory"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
        "code" : "vital-signs",
        "display" : "Vital Signs"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://loinc.org",
        "code" : "LP29684-5",
        "display" : "Radiology"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://loinc.org",
        "code" : "LP7839-6",
        "display" : "Pathology"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://loinc.org",
        "code" : "LP29708-2",
        "display" : "Cardiology"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/v2-0074",
        "code" : "LAB",
        "display" : "Laboratory"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
        "code" : "social-history",
        "display" : "Social History"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
        "code" : "survey",
        "display" : "Survey"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
        "code" : "imaging",
        "display" : "Imaging"
      }
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
      "valueCoding" : {
        "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
        "code" : "procedure",
        "display" : "Procedure"
      }
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "Encounters"
        },
        {
          "url" : "statement",
          "valueString" : "define \"Encounters\":\n  [Encounter]"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 0
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "Qualifying Encounters During Measurement Period"
        },
        {
          "url" : "statement",
          "valueString" : "define \"Qualifying Encounters During Measurement Period\":\n ( [Encounter: \"Encounter Inpatient\"]\n  union [Encounter: \"Emergency Department Visit\"]\n  union [Encounter: \"Observation Services\"]\n  union [Encounter: class in {\"emergency\", \"inpatient acute\", \"inpatient encounter\", \"inpatient non-acute\", \"short stay\"}]) QualifyingEncounters\n  where QualifyingEncounters.status in {'in-progress', 'finished', 'triaged', 'onleave', 'entered-in-error'}\n    and QualifyingEncounters.period overlaps \"Measurement Period\""
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 1
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "Encounters with Patient Hospital Locations"
        },
        {
          "url" : "statement",
          "valueString" : "//potentially an issue as this may pull ALL EXISTING ENCOUNTERS (no period to look against)\ndefine \"Encounters with Patient Hospital Locations\":\n  \"Encounters\" Encounters\n  where exists(\n    Encounters.location EncounterLocation\n    where Global.GetLocation(EncounterLocation.location).type in \"Inpatient, Emergency, and Observation Locations\"\n      and EncounterLocation.period overlaps Encounters.period\n  )\n  and Encounters.status in {'in-progress', 'finished', 'triaged', 'onleave', 'entered-in-error'}"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 2
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "Initial Population"
        },
        {
          "url" : "statement",
          "valueString" : "// and Encounters.period overlaps \"Measurement Period\" (?)\n\ndefine \"Initial Population\":\n  \"Qualifying Encounters During Measurement Period\"\n  union \"Encounters with Patient Hospital Locations\""
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 3
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Encounter"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Encounter\": \n  \"Encounters\" Encounters\n  where exists(\n    \"Initial Population\" IP\n    where Encounters.period overlaps IP.period)\n  return SharedResource.EncounterResource(Encounters,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-encounter'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 4
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Medication Request"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Medication Request\":\n  [MedicationRequest] MedicationRequests \n  where exists(\n    \"Initial Population\" IP\n    where MedicationRequests.authoredOn during IP.period)\n  return SharedResource.MedicationRequestResource(MedicationRequests,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-medicationrequest'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 5
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Coverage"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Coverage\": \n\t[Coverage] Coverages\n  where exists(\n    \"Initial Population\" IP\n    where Coverages.period overlaps IP.period)\n  return SharedResource.CoverageResource(Coverages,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-coverage'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 6
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Procedure"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Procedure\":\n  [Procedure] Procedures \n  where exists(\n    \"Initial Population\" IP\n    where Global.\"Normalize Interval\"(Procedures.performed) overlaps IP.period)\n  return SharedResource.ProcedureResource(Procedures,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-procedure'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 7
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Device"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Device\":\n  [Device] Devices \n  where exists(\"Initial Population\")\n  return DeviceResource(Devices,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-device'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 8
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "Observations"
        },
        {
          "url" : "statement",
          "valueString" : "define \"Observations\":\n  [Observation]"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 9
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Observation Lab Category"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Observation Lab Category\":\n  \"Observations\" Observations \n  where (exists(Observations.category Category where Category ~ \"laboratory\"))\n    and exists(\n      \"Initial Population\" IP\n      where Global.\"Normalize Interval\"(Observations.effective) overlaps IP.period)\n  return SharedResource.ObservationLabResource(Observations,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-observation-lab'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 10
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Observation Vital Signs Category"
        },
        {
          "url" : "statement",
          "valueString" : "//Vital Signs Observation has its own profile in FHIR Base\ndefine \"SDE Observation Vital Signs Category\":\n  \"Observations\" Observations \n  where (exists(Observations.category Category where Category ~ \"vital-signs\"))\n    and exists(\n      \"Initial Population\" IP\n      where Global.\"Normalize Interval\"(Observations.effective) overlaps IP.period)\n  return ObservationVitalSignsResource(Observations,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-observation-vitals'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 11
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE DiagnosticReport Others"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE DiagnosticReport Others\":\n  [DiagnosticReport] DiagnosticReports\n  where not ((exists(DiagnosticReports.category Category where Category ~ \"Radiology\"))\n    or exists((DiagnosticReports.category Category where Category ~ \"Pathology\"))\n    or exists((DiagnosticReports.category Category where Category ~ \"Cardiology\"))\n    or exists(DiagnosticReports.category Category where Category ~ \"LAB\"))\n    and exists(\"Initial Population\" IP\n      where Global.\"Normalize Interval\"(DiagnosticReports.effective) overlaps IP.period)\n  return DiagnosticReportResource(DiagnosticReports,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-diagnosticreport'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 12
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Medication Administration"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Medication Administration\":\n  [MedicationAdministration] MedicationAdministrations \n  where exists(\n    \"Initial Population\" IP\n    where Global.\"Normalize Interval\"(MedicationAdministrations.effective) overlaps IP.period)\n  return SharedResource.MedicationAdministrationResource(MedicationAdministrations,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-medicationadministration'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 13
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Observation Category"
        },
        {
          "url" : "statement",
          "valueString" : "//Defaulting to base FHIR profile as there are no individual profiles in US Core 3.1.1 that cover these Observation categories\ndefine \"SDE Observation Category\":\n  \"Observations\" Observations \n  where ((exists(Observations.category Category where Category ~ \"social-history\"))\n    or (exists(Observations.category Category where Category ~ \"survey\"))\n    or (exists(Observations.category Category where Category ~ \"imaging\"))\n    or (exists(Observations.category Category where Category ~ \"procedure\")))\n    and exists(\n      \"Initial Population\" IP\n      where Global.\"Normalize Interval\"(Observations.effective) overlaps IP.period)\n  return ObservationResource(Observations,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-observation'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 14
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Condition"
        },
        {
          "url" : "statement",
          "valueString" : "//============================================================================\n//Supplemental Data Element\n//When FHIR.canonical value is present, US Core 3.1.1 profiles are used\n//When FHIR.canonical value is not present, FHIR Base profiles are used\n//============================================================================\ndefine \"SDE Condition\":\n  [Condition] Conditions \n  where exists(\"Initial Population\")\n  return SharedResource.ConditionResource(Conditions,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 15
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DiagnosticReports"
        },
        {
          "url" : "statement",
          "valueString" : "define \"DiagnosticReports\":\n  [DiagnosticReport]"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 16
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE DiagnosticReport Lab"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE DiagnosticReport Lab\":\n  \"DiagnosticReports\" DiagnosticReports\n  where (exists(DiagnosticReports.category Category where Category ~ \"LAB\")\n    and exists(\n      \"Initial Population\" IP\n      where Global.\"Normalize Interval\"(DiagnosticReports.effective) overlaps IP.period))\n  return SharedResource.DiagnosticReportLabResource(DiagnosticReports,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-diagnosticreport-lab'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 17
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "IP Encounters Overlap Measurement Period"
        },
        {
          "url" : "statement",
          "valueString" : "//Double checking for IP's period during MP as IP is created out of qualifying encounters, which checks for it, \n//and encounter's locations, which doesn't\ndefine \"IP Encounters Overlap Measurement Period\":\n  \"Initial Population\" IP\n  where IP.period overlaps \"Measurement Period\""
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 18
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "Get Locations from IP Encounters in Measurement Period"
        },
        {
          "url" : "statement",
          "valueString" : "define \"Get Locations from IP Encounters in Measurement Period\":\n  flatten(\"IP Encounters Overlap Measurement Period\" Encounters\n  let locationElements: Encounters.location\n  return\n    locationElements LE\n    let locationReference: LE.location\n    return Global.GetLocation(locationReference))"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 19
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Location"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Location\":\n  \"Get Locations from IP Encounters in Measurement Period\" Locations\n  where exists(\"Initial Population\")\n  and Locations is not null\n  return SharedResource.LocationResource(Locations,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-location'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 20
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Service Request"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Service Request\":\n  [ServiceRequest] ServiceRequests\n  where exists(\"Initial Population\" IP\n    where ServiceRequests.authoredOn during IP.period)\n  return SharedResource.ServiceRequestResource(ServiceRequests,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-servicerequest'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 21
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE DiagnosticReport Note"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE DiagnosticReport Note\":\n  \"DiagnosticReports\" DiagnosticReports\n  where ((exists(DiagnosticReports.category Category where Category ~ \"Radiology\"))\n    or exists((DiagnosticReports.category Category where Category ~ \"Pathology\"))\n    or exists((DiagnosticReports.category Category where Category ~ \"Cardiology\")))\n    and exists(\n      \"Initial Population\" IP\n      where Global.\"Normalize Interval\"(DiagnosticReports.effective) overlaps IP.period)\n  return DiagnosticReportResource(DiagnosticReports,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-diagnosticreport-note'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 22
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Minimal Patient"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Minimal Patient\":\n  Patient p\n  return SharedResource.PatientResource(p,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/cross-measure-patient'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 23
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Medication"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Medication\":\n  (\"SDE Medication Request\"\n  union \"SDE Medication Administration\") MedReqOrAdmin\n  where MedReqOrAdmin.medication is FHIR.Reference\n  and exists(\"Initial Population\") //No longer need to check for timing here because it's checked in SDE Medication Request/Administriation\n  return SharedResource.MedicationResource(GetMedicationFrom(MedReqOrAdmin.medication),\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-medication'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 24
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "SDE Specimen"
        },
        {
          "url" : "statement",
          "valueString" : "define \"SDE Specimen\":\n  [Specimen] Specimens\n  where exists(\n    \"Initial Population\" IP\n    where Global.\"Normalize Interval\"(Specimens.collection.collected) overlaps IP.period\n  )\n  return SharedResource.SpecimenResource(Specimens,\n  {FHIR.canonical{value: 'http://hl7.org/fhir/us/nhsn-dqm/StructureDefinition/ach-specimen'}})"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 25
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "FHIRHelpers"
        },
        {
          "url" : "name",
          "valueString" : "ToString"
        },
        {
          "url" : "statement",
          "valueString" : "define function ToString(value EncounterStatus): value.value"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 26
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "FHIRHelpers"
        },
        {
          "url" : "name",
          "valueString" : "ToInterval"
        },
        {
          "url" : "statement",
          "valueString" : "define function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 27
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "MATGlobalCommonFunctionsFHIR4"
        },
        {
          "url" : "name",
          "valueString" : "GetLocation"
        },
        {
          "url" : "statement",
          "valueString" : "// Returns the location for the given location reference\n\n/*Returns the Location resource specified by the given reference*/\ndefine function \"GetLocation\"(reference Reference ):\n  singleton from (\n\t[Location] Locations\n\twhere Locations.id = GetId(reference.reference)\n  )"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 28
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "MATGlobalCommonFunctionsFHIR4"
        },
        {
          "url" : "name",
          "valueString" : "GetId"
        },
        {
          "url" : "statement",
          "valueString" : "/*Returns the tail of the given uri (i.e. everything after the last slash in the URI).*/\ndefine function \"GetId\"(uri String ):\n  Last(Split(uri, '/'))"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 29
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "FHIRHelpers"
        },
        {
          "url" : "name",
          "valueString" : "ToConcept"
        },
        {
          "url" : "statement",
          "valueString" : "define function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 30
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterResource(encounter Encounter, profileURLs List<FHIR.canonical>):\n  encounter e\n  return Encounter{\n    id: FHIR.id{value: 'LCR-' + e.id},\n    meta: MetaElement(e, profileURLs),\n    extension: e.extension,\n    identifier: EncounterIdentifier(e.identifier),\n    status: e.status,\n    statusHistory: EncounterStatusHistory(e.statusHistory),\n    class: e.class,\n    classHistory: EncounterClassHistory(e.classHistory),\n    type: e.type,\n    serviceType: e.serviceType,\n    priority: e.priority,\n    subject: e.subject,\n    participant: EncounterParticipant(e.participant),\n    period: e.period,\n    length: e.length,\n    reasonCode: e.reasonCode,\n    reasonReference: e.reasonReference,\n    diagnosis: EncounterDiagnosis(e.diagnosis),\n    account: e.account,\n    hospitalization: EncounterHospitalization(e.hospitalization),\n    location: EncounterLocation(e.location),\n    partOf: e.partOf\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 31
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MetaElement"
        },
        {
          "url" : "statement",
          "valueString" : "define function \"MetaElement\"(resource Resource, profileURLs List<FHIR.canonical>):\n  resource r\n  return FHIR.Meta{\n    extension: r.meta.extension,\n    versionId: r.meta.versionId,\n    lastUpdated: r.meta.lastUpdated,\n    profile: profileURLs,\n    security: r.meta.security,\n    tag: r.meta.tag\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 32
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterIdentifier"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterIdentifier(identifier List<FHIR.Identifier>):\n  identifier i\n  return FHIR.Identifier{\n    use: i.use,\n    type: i.type,\n    system: i.system,\n    value: i.value,\n    period: i.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 33
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterStatusHistory"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterStatusHistory(statusHistory List<FHIR.Encounter.StatusHistory>):\n  statusHistory sH\n  return FHIR.Encounter.StatusHistory{\n    status: sH.status,\n    period: sH.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 34
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterClassHistory"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterClassHistory(classHistory List<FHIR.Encounter.ClassHistory>):\n  classHistory cH\n  return FHIR.Encounter.ClassHistory{\n    class: cH.class,\n    period: cH.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 35
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterParticipant"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterParticipant(participant List<FHIR.Encounter.Participant>):\n  participant p\n  return FHIR.Encounter.Participant{\n    type: p.type,\n    period: p.period,\n    individual: p.individual\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 36
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterDiagnosis"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterDiagnosis(diagnosis List<FHIR.Encounter.Diagnosis>):\n  diagnosis d\n  return FHIR.Encounter.Diagnosis{\n    condition: d.condition,\n    use: d.use,\n    rank: d.rank\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 37
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterHospitalization"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterHospitalization(hospitalization FHIR.Encounter.Hospitalization):\n  hospitalization h\n  return FHIR.Encounter.Hospitalization{\n    preAdmissionIdentifier: h.preAdmissionIdentifier,\n    origin: h.origin,\n    admitSource: h.admitSource,\n    reAdmission: h.reAdmission,\n    dietPreference: h.dietPreference,\n    specialCourtesy: h.specialCourtesy,\n    specialArrangement: h.specialArrangement,\n    destination: h.destination,\n    dischargeDisposition: h.dischargeDisposition\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 38
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "EncounterLocation"
        },
        {
          "url" : "statement",
          "valueString" : "define function EncounterLocation(location List<FHIR.Encounter.Location>):\n  location l\n  return FHIR.Encounter.Location{\n    location: l.location,\n    status: l.status,\n    physicalType: l.physicalType,\n    period: l.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 39
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "FHIRHelpers"
        },
        {
          "url" : "name",
          "valueString" : "ToDateTime"
        },
        {
          "url" : "statement",
          "valueString" : "define function ToDateTime(value dateTime): value.value"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 40
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationRequestResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationRequestResource(medicationRequest MedicationRequest, profileURLs List<FHIR.canonical>):\n  medicationRequest m\n  return MedicationRequest{\n    id: FHIR.id {value: 'LCR-' + m.id},\n    meta: MetaElement(medicationRequest, profileURLs),\n    extension: m.extension,\n    status: m.status,\n    statusReason: m.statusReason,\n    intent: m.intent,\n    category: m.category,\n    priority: m.priority,\n    doNotPerform: m.doNotPerform,\n    reported: m.reported,\n    medication: m.medication,\n    subject: m.subject,\n    encounter: m.encounter,\n    authoredOn: m.authoredOn,\n    requester: m.requester,\n    recorder: m.recorder,\n    reasonCode: m.reasonCode,\n    reasonReference: m.reasonReference,\n    instantiatesCanonical: m.instantiatesCanonical,\n    instantiatesUri: m.instantiatesUri,\n    courseOfTherapyType: m.courseOfTherapyType,\n    dosageInstruction: MedicationRequestDosageInstruction(m.dosageInstruction)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 41
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationRequestDosageInstruction"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationRequestDosageInstruction(dosageInstruction List<FHIR.Dosage>):\n  dosageInstruction dI\n  return FHIR.Dosage{\n    text: dI.text,\n    patientInstruction: dI.patientInstruction,\n    timing: dI.timing,\n    asNeeded: dI.asNeeded,\n    site: dI.site,\n    route: dI.route,\n    method: dI.method,\n    doseAndRate: MedicationRequestDoseAndRate(dI.doseAndRate)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 42
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationRequestDoseAndRate"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationRequestDoseAndRate(doseAndRate List<FHIR.Dosage.DoseAndRate>):\n  doseAndRate dR\n  return FHIR.Dosage.DoseAndRate{\n    type: dR.type,\n    dose: dR.dose,\n    rate: dR.rate\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 43
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "CoverageResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function CoverageResource(coverage Coverage, profileURLs List<FHIR.canonical>):\n  coverage c\n  return Coverage{\n    id: FHIR.id{value: 'LCR-' + c.id},\n    meta: MetaElement(c, profileURLs),\n    extension: c.extension,\n    status: c.status,\n    type: c.type,\n    policyHolder: c.policyHolder,\n    subscriber: c.subscriber,\n    subscriberId: c.subscriberId,\n    beneficiary: c.beneficiary,\n    dependent: c.dependent,\n    relationship: c.relationship,\n    period: c.period,\n    payor: c.payor,\n    class: CoverageClass(c.class),\n    order: c.order,\n    network: c.network,\n    subrogation: c.subrogation,\n    contract: c.contract\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 44
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "CoverageClass"
        },
        {
          "url" : "statement",
          "valueString" : "define function CoverageClass(class List<FHIR.Coverage.Class>):\n  class c\n  return FHIR.Coverage.Class{\n    value: c.value,\n    name: c.name\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 45
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ProcedureResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function ProcedureResource(procedure Procedure, profileURLs List<FHIR.canonical>):\n  procedure p\n  return Procedure{\n    id: FHIR.id {value: 'LCR-' + p.id},\n    meta: MetaElement(p, profileURLs),\n    extension: p.extension,\n    instantiatesCanonical: p.instantiatesCanonical,\n    instantiatesUri: p.instantiatesUri,\n    basedOn: p.basedOn,\n    partOf: p.partOf,\n    status: p.status,\n    statusReason: p.statusReason,\n    category: p.category,\n    code: p.code,\n    subject: p.subject,\n    encounter: p.encounter,\n    performed: p.performed,\n    recorder: p.recorder,\n    asserter: p.asserter,\n    performer: ProcedurePerformer(p.performer),\n    location: p.location,\n    reasonCode: p.reasonCode,\n    reasonReference: p.reasonReference,\n    bodySite: p.bodySite,\n    outcome: p.outcome,\n    report: p.report,\n    complication: p.complication,\n    complicationDetail: p.complicationDetail,\n    followUp: p.followUp,\n    note: p.note,\n    focalDevice: ProcedureFocalDevice(p.focalDevice),\n    usedReference: p.usedReference,\n    usedCode: p.usedCode\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 46
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ProcedurePerformer"
        },
        {
          "url" : "statement",
          "valueString" : "define function ProcedurePerformer(performer List<FHIR.Procedure.Performer>):\n  performer p\n  return FHIR.Procedure.Performer{\n    function: p.function,\n    actor: p.actor,\n    onBehalfOf: p.onBehalfOf\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 47
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ProcedureFocalDevice"
        },
        {
          "url" : "statement",
          "valueString" : "define function ProcedureFocalDevice(device List<FHIR.Procedure.FocalDevice>):\n  device d\n  return FHIR.Procedure.FocalDevice{\n    action: d.action,\n    manipulated: d.manipulated\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 48
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DeviceResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function DeviceResource(device Device, profileURLs List<FHIR.canonical>):\n  device d\n  return Device{\n    id: FHIR.id{value: 'LCR-' + d.id},\n    meta: SharedResource.MetaElement(d, profileURLs),\n    extension: d.extension,\n    definition: d.definition,\n    udiCarrier: DeviceUdiCarrier(d.udiCarrier),\n    status: d.status,\n    statusReason: d.statusReason,\n    distinctIdentifier: d.distinctIdentifier,\n    manufacturer: d.manufacturer,\n    manufactureDate: d.manufactureDate,\n    expirationDate: d.expirationDate,\n    lotNumber: d.lotNumber,\n    serialNumber: d.serialNumber,\n    deviceName: DeviceDeviceName(d.deviceName),\n    modelNumber: d.modelNumber,\n    partNumber: d.partNumber,\n    type: d.type,\n    specialization: DeviceSpecialization(d.specialization),\n    version: DeviceVersion(d.version),\n    property: DeviceProperty(d.property),\n    patient: d.patient,\n    owner: d.owner,\n    contact: d.contact,\n    location: d.location,\n    url: d.url,\n    note: d.note,\n    safety: d.safety,\n    parent: d.parent\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 49
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DeviceUdiCarrier"
        },
        {
          "url" : "statement",
          "valueString" : "//\n//Measure Specific Resource Creation Functions\n//\ndefine function DeviceUdiCarrier(udiCarrier List<FHIR.Device.UdiCarrier>):\n  udiCarrier u\n  return FHIR.Device.UdiCarrier{\n    deviceIdentifier: u.deviceIdentifier,\n    issuer: u.issuer,\n    jurisdiction: u.jurisdiction,\n    carrierAIDC: u.carrierAIDC,\n    carrierHRF: u.carrierHRF,\n    entryType: u.entryType\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 50
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DeviceDeviceName"
        },
        {
          "url" : "statement",
          "valueString" : "define function DeviceDeviceName(deviceName List<FHIR.Device.DeviceName>):\n  deviceName d\n  return FHIR.Device.DeviceName{\n    name: d.name,\n    type: d.type\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 51
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DeviceSpecialization"
        },
        {
          "url" : "statement",
          "valueString" : "define function DeviceSpecialization(specialization List<FHIR.Device.Specialization>):\n  specialization s\n  return FHIR.Device.Specialization{\n    systemType: s.systemType,\n    version: s.version\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 52
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DeviceVersion"
        },
        {
          "url" : "statement",
          "valueString" : "define function DeviceVersion(version List<FHIR.Device.Version>):\n  version v\n  return FHIR.Device.Version{\n    type: v.type,\n    component: v.component,\n    value: v.value\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 53
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DeviceProperty"
        },
        {
          "url" : "statement",
          "valueString" : "define function DeviceProperty(deviceProperty List<FHIR.Device.Property>):\n  deviceProperty d\n  return FHIR.Device.Property{\n    id: d.id,\n    type: d.type,\n    valueQuantity: d.valueQuantity,\n    valueCode: d.valueCode\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 54
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationLabResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationLabResource(observation Observation, profileURLs List<FHIR.canonical>):\n  observation o\n  return Observation{\n    id: FHIR.id {value: 'LCR-' + o.id},\n    meta: MetaElement(o, profileURLs),\n    extension: o.extension,\n    basedOn: o.basedOn,\n    partOf: o.partOf,\n    status: o.status,\n    category: ObservationLabCategory(o.category),\n    code: o.code,\n    subject: o.subject,\n    focus: o.focus,\n    encounter: o.encounter,\n    effective: o.effective,\n    issued: o.issued,\n    performer: o.performer,\n    value: o.value,\n    dataAbsentReason: o.dataAbsentReason,\n    interpretation: o.interpretation,\n    note: o.note,\n    bodySite: o.bodySite,\n    method: o.method,\n    specimen: o.specimen,\n    device: o.device,\n    referenceRange: ObservationReferenceRange(o.referenceRange),\n    hasMember: o.hasMember,\n    derivedFrom: o.derivedFrom,\n    component: ObservationComponent(o.component)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 55
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationLabCategory"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationLabCategory(category List<CodeableConcept>):\n  category c\n  return CodeableConcept{\n    coding: ObservationLabCoding(c.coding),\n    text: c.text\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 56
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationLabCoding"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationLabCoding(coding List<Coding>):\n  coding c\n  return Coding{\n    id: c.id,\n    extension: c.extension,\n    system: c.system,\n    version: c.version,\n    code: c.code,\n    display: c.display,\n    userSelected: c.userSelected\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 57
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationReferenceRange"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationReferenceRange(referenceRange List<FHIR.Observation.ReferenceRange>):\n  referenceRange rR\n  return FHIR.Observation.ReferenceRange{\n    low: rR.low,\n    high: rR.high,\n    type: rR.type,\n    appliesTo: rR.appliesTo,\n    age: rR.age,\n    text: rR.text\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 58
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationComponent"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationComponent(component List<FHIR.Observation.Component>):\n  component c\n  return FHIR.Observation.Component{\n    code: c.code,\n    value: c.value,\n    dataAbsentReason: c.dataAbsentReason,\n    interpretation: c.interpretation,\n    referenceRange: c.referenceRange\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 59
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationVitalSignsResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationVitalSignsResource(observation Observation, profileURLs List<FHIR.canonical>):\n  observation o\n  return Observation{\n    id: FHIR.id {value: 'LCR-' + o.id},\n    meta: SharedResource.MetaElement(o, profileURLs),\n    extension: o.extension,\n    partOf: o.partOf,\n    status: o.status,\n    category: ObservationVitalSignsCategory(o.category),\n    code: o.code,\n    subject: o.subject,\n    focus: o.focus,\n    encounter: o.encounter,\n    effective: o.effective,\n    issued: o.issued,\n    performer: o.performer,\n    value: o.value,\n    dataAbsentReason: o.dataAbsentReason,\n    interpretation: o.interpretation,\n    note: o.note,\n    bodySite: o.bodySite,\n    method: o.method,\n    specimen: o.specimen,\n    device: o.device,\n    referenceRange: SharedResource.ObservationReferenceRange(o.referenceRange),\n    hasMember: o.hasMember,\n    derivedFrom: o.derivedFrom,\n    component: ObservationVitalSignsComponent(o.component)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 60
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationVitalSignsCategory"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationVitalSignsCategory(category List<CodeableConcept>):\n  category c\n  return CodeableConcept{\n    coding: ObservationVitalSignsCoding(c.coding),\n    text: c.text\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 61
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationVitalSignsCoding"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationVitalSignsCoding(coding List<Coding>):\n  coding c\n  return Coding{\n    system: c.system,\n    version: c.version,\n    code: c.code,\n    display: c.display,\n    userSelected: c.userSelected\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 62
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationVitalSignsComponent"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationVitalSignsComponent(component List<FHIR.Observation.Component>):\n  component c\n  return FHIR.Observation.Component{\n    code: c.code,\n    value: c.value,\n    dataAbsentReason: c.dataAbsentReason,\n    interpretation: c.interpretation,\n    referenceRange: SharedResource.ObservationReferenceRange(c.referenceRange)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 63
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "DiagnosticReportResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function DiagnosticReportResource(diagnosticReport DiagnosticReport, profileURLs List<FHIR.canonical>):\n  diagnosticReport d\n  return DiagnosticReport{\n    id: FHIR.id{value: 'LCR-' + d.id},\n    meta: SharedResource.MetaElement(d, profileURLs),\n    extension: d.extension,\n    basedOn: d.basedOn,\n    status: d.status,\n    category: d.category,\n    code: d.code,\n    subject: d.subject,\n    encounter: d.encounter,\n    effective: d.effective,\n    issued: d.issued,\n    performer: d.performer,\n    resultsInterpreter: d.resultsInterpreter,\n    specimen: d.specimen,\n    result: d.result,\n    conclusion: d.conclusion,\n    conclusionCode: d.conclusionCode\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 64
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationAdministrationResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationAdministrationResource(medicationAdministration MedicationAdministration, profileURLs List<FHIR.canonical>):\n  medicationAdministration m\n  return MedicationAdministration{\n    id: FHIR.id {value: 'LCR-' + m.id},\n    meta: MetaElement(m, profileURLs),\n    extension: m.extension,\n    instantiates: m.instantiates,\n    partOf: m.partOf,\n    status: m.status,\n    statusReason: m.statusReason,\n    category: m.category,\n    medication: m.medication,\n    subject: m.subject,\n    context: m.context,\n    supportingInformation: m.supportingInformation,\n    effective: m.effective,\n    performer: MedicationAdministrationPerformer(m.performer),\n    reasonCode: m.reasonCode,\n    reasonReference: m.reasonReference,\n    request: m.request,\n    device: m.device,\n    note: m.note,\n    dosage: MedicationAdministrationDosage(m.dosage),\n    eventHistory: m.eventHistory\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 65
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationAdministrationPerformer"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationAdministrationPerformer(performer List<FHIR.MedicationAdministration.Performer>):\n  performer p\n  return FHIR.MedicationAdministration.Performer{\n    function: p.function,\n    actor: p.actor\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 66
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationAdministrationDosage"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationAdministrationDosage(dosage FHIR.MedicationAdministration.Dosage):\n  dosage d\n  return FHIR.MedicationAdministration.Dosage{\n    text: d.text,\n    site: d.site,\n    route: d.route,\n    method: d.method,\n    dose: d.dose,\n    rate: d.rate\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 67
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "ObservationResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function ObservationResource(observation Observation, profileURLs List<FHIR.canonical>):\n  observation o\n  return Observation{\n    id: FHIR.id {value: 'LCR-' + o.id},\n    meta: SharedResource.MetaElement(o, profileURLs),\n    extension: o.extension,\n    partOf: o.partOf,\n    status: o.status,\n    category: o.category,\n    code: o.code,\n    subject: o.subject,\n    focus: o.focus,\n    encounter: o.encounter,\n    effective: o.effective,\n    issued: o.issued,\n    performer: o.performer,\n    value: o.value,\n    dataAbsentReason: o.dataAbsentReason,\n    interpretation: o.interpretation,\n    note: o.note,\n    bodySite: o.bodySite,\n    method: o.method,\n    specimen: o.specimen,\n    device: o.device,\n    referenceRange: SharedResource.ObservationReferenceRange(o.referenceRange),\n    hasMember: o.hasMember,\n    derivedFrom: o.derivedFrom,\n    component: SharedResource.ObservationComponent(o.component)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 68
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ConditionResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function ConditionResource(condition Condition, profileURLs List<FHIR.canonical>):\n  condition c\n  return Condition{\n    id: FHIR.id {value: 'LCR-' + c.id},\n    meta: MetaElement(c, profileURLs),\n    extension: c.extension,\n    clinicalStatus: c.clinicalStatus,\n    verificationStatus: c.verificationStatus,\n    category: c.category,\n    severity: c.severity,\n    code: c.code,\n    bodySite: c.bodySite,\n    subject: c.subject,\n    encounter: c.encounter,\n    onset: c.onset,\n    abatement: c.abatement,\n    recordedDate: c.recordedDate,\n    stage: ConditionStage(c.stage),\n    evidence: ConditionEvidence(c.evidence),\n    note: c.note\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 69
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ConditionStage"
        },
        {
          "url" : "statement",
          "valueString" : "define function ConditionStage(stage List<FHIR.Condition.Stage>):\n  stage s\n  return FHIR.Condition.Stage{\n    summary: s.summary,\n    assessment: s.assessment,\n    type: s.type\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 70
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ConditionEvidence"
        },
        {
          "url" : "statement",
          "valueString" : "define function ConditionEvidence(evidence List<FHIR.Condition.Evidence>):\n  evidence e\n  return FHIR.Condition.Evidence{\n    code: e.code,\n    detail: e.detail\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 71
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "DiagnosticReportLabResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function DiagnosticReportLabResource(diagnosticReport DiagnosticReport, profileURLs List<FHIR.canonical>):\n  diagnosticReport d\n  return DiagnosticReport{\n    id: FHIR.id{value: 'LCR-' + d.id},\n    meta: MetaElement(d, profileURLs),\n    extension: d.extension,\n    basedOn: d.basedOn,\n    status: d.status,\n    category: DiagnosticReportCategory(d.category),\n    code: d.code,\n    subject: d.subject,\n    encounter: d.encounter,\n    effective: d.effective,\n    issued: d.issued,\n    performer: d.performer,\n    resultsInterpreter: d.resultsInterpreter,\n    specimen: d.specimen,\n    result: d.result,\n    conclusion: d.conclusion,\n    conclusionCode: d.conclusionCode\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 72
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "DiagnosticReportCategory"
        },
        {
          "url" : "statement",
          "valueString" : "define function DiagnosticReportCategory(category List<CodeableConcept>):\n  category c\n  return CodeableConcept{\n    coding: DiagnosticReportCoding(c.coding)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 73
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "DiagnosticReportCoding"
        },
        {
          "url" : "statement",
          "valueString" : "define function DiagnosticReportCoding(coding List<Coding>):\n  coding c\n  return Coding{\n    system: c.system,\n    version: c.version,\n    code: c.code,\n    display: c.display,\n    userSelected: c.userSelected\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 74
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "LocationResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function LocationResource(location Location, profileURLs List<FHIR.canonical>):\n  location l\n  return Location{\n    id: FHIR.id {value: 'LCR-' + l.id},\n    meta: MetaElement(l, profileURLs),\n    extension: l.extension,\n    status: l.status,\n    operationalStatus: l.operationalStatus,\n    name: l.name,\n    alias: l.alias,\n    description: l.description,\n    mode: l.mode,\n    type: l.type,\n    telecom: l.telecom,\n    address: LocationAddress(l.address),\n    physicalType: l.physicalType,\n    position: LocationPosition(l.position),\n    managingOrganization: l.managingOrganization,\n    partOf: l.partOf,\n    hoursOfOperation: LocationHoursOfOperation(l.hoursOfOperation),\n    availabilityExceptions: l.availabilityExceptions,\n    endpoint: l.endpoint\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 75
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "LocationAddress"
        },
        {
          "url" : "statement",
          "valueString" : "define function LocationAddress(address FHIR.Address):\n  address a\n  return FHIR.Address{\n    use: a.use,\n    type: a.type,\n    text: a.text,\n    line: a.line,\n    city: a.city,\n    district: a.district,\n    state: a.state,\n    postalCode: a.postalCode,\n    country: a.country,\n    period: a.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 76
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "LocationPosition"
        },
        {
          "url" : "statement",
          "valueString" : "define function LocationPosition(position FHIR.Location.Position):\n  position p\n  return FHIR.Location.Position{\n    longitude: p.longitude,\n    latitude: p.latitude,\n    altitude: p.altitude\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 77
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "LocationHoursOfOperation"
        },
        {
          "url" : "statement",
          "valueString" : "define function LocationHoursOfOperation(hoursOfOperation List<FHIR.Location.HoursOfOperation>):\n  hoursOfOperation hOO\n  return FHIR.Location.HoursOfOperation{\n    daysOfWeek: hOO.daysOfWeek,\n    allDay: hOO.allDay,\n    openingTime: hOO.openingTime,\n    closingTime: hOO.closingTime\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 78
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "ServiceRequestResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function ServiceRequestResource(serviceRequest ServiceRequest, profileURLs List<FHIR.canonical>):\n  serviceRequest sR\n  return ServiceRequest{\n    id: FHIR.id {value: 'LCR-' + sR.id},\n    meta: MetaElement(sR, profileURLs),\n    extension: sR.extension,\n    instantiatesCanonical: sR.instantiatesCanonical,\n    instantiatesUri: sR.instantiatesUri,\n    basedOn: sR.basedOn,\n    replaces: sR.replaces,\n    requisition: sR.requisition,\n    status: sR.status,\n    intent: sR.intent,\n    category: sR.category,\n    priority: sR.priority,\n    doNotPerform: sR.doNotPerform,\n    code: sR.code,\n    orderDetail: sR.orderDetail,\n    quantity: sR.quantity,\n    subject: sR.subject,\n    encounter: sR.encounter,\n    occurrence: sR.occurrence,\n    asNeeded: sR.asNeeded,\n    authoredOn: sR.authoredOn,\n    requester: sR.requester,\n    performerType: sR.performerType,\n    performer: sR.performer,\n    locationCode: sR.locationCode,\n    locationReference: sR.locationReference,\n    reasonCode: sR.reasonCode,\n    reasonReference: sR.reasonReference,\n    insurance: sR.insurance,\n    supportingInfo: sR.supportingInfo,\n    specimen: sR.specimen,\n    bodySite: sR.bodySite,\n    note: sR.note,\n    patientInstruction: sR.patientInstruction,\n    relevantHistory: sR.relevantHistory\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 79
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientResource(patient Patient, profileURLs List<FHIR.canonical>):\n  patient p\n  return Patient{\n    id: FHIR.id{value: 'LCR-' + p.id},\n    meta: MetaElement(p, profileURLs),\n    extension: GetPatientExtensions(p) union GetIdExtensions(p),\n    identifier: PatientIdentifier(p.identifier),\n    active: p.active,\n    name: PatientName(p.name),\n    telecom: PatientTelecom(p.telecom),\n    gender: p.gender,\n    birthDate: p.birthDate,\n    deceased: p.deceased,\n    address: PatientAddress(p.address),\n    maritalStatus: p.maritalStatus,\n    multipleBirth: p.multipleBirth,\n    photo: p.photo,\n    contact: PatientContact(p.contact),\n    communication: PatientCommunication(p.communication),\n    generalPractitioner: p.generalPractitioner,\n    managingOrganization: p.managingOrganization,\n    link: PatientLink(p.link)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 80
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "GetPatientExtensions"
        },
        {
          "url" : "statement",
          "valueString" : "define function \"GetPatientExtensions\"(domainResource DomainResource):\n  domainResource.extension E\n  where E.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'\n    or E.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'\n    or E.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex'\n    or E.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity'\n    or E.url = 'http://hl7.org/fhir/StructureDefinition/patient-genderIdentity'\n return E"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 81
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "GetIdExtensions"
        },
        {
          "url" : "statement",
          "valueString" : "define function \"GetIdExtensions\"(domainResource DomainResource):\n  domainResource.extension E\n    return E"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 82
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientIdentifier"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientIdentifier(identifier List<FHIR.Identifier>):\n  identifier i\n  return FHIR.Identifier{\n    id: i.id,\n    extension: i.extension,\n    use: i.use,\n    type: i.type,\n    system: i.system,\n    value: i.value,\n    period: i.period,\n    assigner: i.assigner\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 83
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientName"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientName(name List<FHIR.HumanName>):\n  name n\n  return FHIR.HumanName{\n    id: n.id,\n    extension: n.extension,\n    use: n.use,\n    text: n.text,\n    family: n.family,\n    given: n.given,\n    prefix: n.prefix,\n    suffix: n.suffix,\n    period: n.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 84
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientTelecom"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientTelecom(telecom List<FHIR.ContactPoint>):\n  telecom t\n  return FHIR.ContactPoint{\n    system: t.system,\n    value: t.value,\n    use: t.use,\n    rank: t.rank,\n    period: t.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 85
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientAddress"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientAddress(address List<FHIR.Address>):\n  address a\n  return FHIR.Address{\n    id: a.id,\n    extension: a.extension,\n    use: a.use,\n    type: a.type,\n    text: a.text,\n    line: a.line,\n    city: a.city,\n    district: a.district,\n    state: a.state,\n    postalCode: a.postalCode,\n    country: a.country,\n    period: a.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 86
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientContact"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientContact(contact List<FHIR.Patient.Contact>):\n  contact c\n  return FHIR.Patient.Contact{\n    id: c.id,\n    extension: c.extension,\n    relationship: c.relationship,\n    name: c.name,\n    telecom: c.telecom,\n    address: c.address,\n    gender: c.gender,\n    organization: c.organization,\n    period: c.period\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 87
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientCommunication"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientCommunication(communication List<FHIR.Patient.Communication>):\n  communication c\n  return FHIR.Patient.Communication{\n    id: c.id,\n    extension: c.extension,\n    language: c.language,\n    preferred: c.preferred\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 88
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "PatientLink"
        },
        {
          "url" : "statement",
          "valueString" : "define function PatientLink(link List<FHIR.Patient.Link>):\n  link l\n  return FHIR.Patient.Link{\n    id: l.id,\n    extension: l.extension,\n    modifierExtension: l.modifierExtension,\n    other: l.other,\n    type: l.type\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 89
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationResource(medication Medication, profileURLs List<FHIR.canonical>):\n  medication m\n  return Medication{\n    id: FHIR.id {value: 'LCR-' + m.id},\n    meta: MetaElement(m, profileURLs),\n    extension: m.extension,\n    code: m.code,\n    status: m.status,\n    manufacturer: m.manufacturer,\n    form: m.form,\n    amount: m.amount,\n    ingredient: MedicationIngredient(m.ingredient),\n    batch: MedicationBatch(m.batch)\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 90
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationIngredient"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationIngredient(ingredient List<FHIR.Medication.Ingredient>):\n  ingredient i\n  return FHIR.Medication.Ingredient{\n    item: i.item,\n    strength: i.strength\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 91
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "MedicationBatch"
        },
        {
          "url" : "statement",
          "valueString" : "define function MedicationBatch(batch FHIR.Medication.Batch):\n  batch b\n  return FHIR.Medication.Batch{\n    lotNumber: b.lotNumber,\n    expirationDate: b.expirationDate\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 92
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "GetMedicationFrom"
        },
        {
          "url" : "statement",
          "valueString" : "//\n//Functions\n//\ndefine function \"GetMedicationFrom\"(choice Choice<FHIR.CodeableConcept, FHIR.Reference>):\n  case\n    when choice is FHIR.Reference then\n      GetMedication(choice as FHIR.Reference)\n    else\n      null\n  end"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 93
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "NHSNdQMAcuteCareHospitalInitialPopulation"
        },
        {
          "url" : "name",
          "valueString" : "GetMedication"
        },
        {
          "url" : "statement",
          "valueString" : "define function \"GetMedication\"(reference Reference ):\n  singleton from (\n    [Medication] Medications\n    where Medications.id = Global.GetId(reference.reference)\n  )"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 94
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "SpecimenResource"
        },
        {
          "url" : "statement",
          "valueString" : "define function SpecimenResource(specimen Specimen, profileURLs List<FHIR.canonical>):\n  specimen s\n  return Specimen{\n    id: FHIR.id {value: 'LCR-' + s.id},\n    meta: MetaElement(s, profileURLs),\n    extension: s.extension,\n    identifier: s.identifier,\n    accessionIdentifier: s.accessionIdentifier,\n    status: s.status,\n    type: s.type,\n    subject: s.subject,\n    receivedTime: s.receivedTime,\n    parent: s.parent,\n    request: s.request,\n    collection: SpecimenCollection(s.collection),\n    processing: SpecimenProcessing(s.processing),\n    container: SpecimenContainer(s.container),\n    condition: s.condition,\n    note: s.note\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 95
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "SpecimenCollection"
        },
        {
          "url" : "statement",
          "valueString" : "define function SpecimenCollection(collection FHIR.Specimen.Collection):\n  collection c\n  return FHIR.Specimen.Collection{\n    collector: c.collector,\n    collected: c.collected,\n    //duration: c.duration, Does not parse for some reason? Need to bring up with SmileCDR\n    quantity: c.quantity,\n    method: c.method,\n    bodySite: c.bodySite,\n    fastingStatus: c.fastingStatus\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 96
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "SpecimenProcessing"
        },
        {
          "url" : "statement",
          "valueString" : "define function SpecimenProcessing(processing List<FHIR.Specimen.Processing>):\n  processing p\n  return FHIR.Specimen.Processing{\n    description: p.description,\n    procedure: p.procedure,\n    additive: p.additive,\n    time: p.time\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 97
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    },
    {
      "extension" : [
        {
          "url" : "libraryName",
          "valueString" : "SharedResourceCreation"
        },
        {
          "url" : "name",
          "valueString" : "SpecimenContainer"
        },
        {
          "url" : "statement",
          "valueString" : "define function SpecimenContainer(container List<FHIR.Specimen.Container>):\n  container c\n  return FHIR.Specimen.Container{\n    description: c.description,\n    type: c.type,\n    capacity: c.capacity,\n    specimenQuantity: c.specimenQuantity,\n    additive: c.additive\n  }"
        },
        {
          "url" : "displaySequence",
          "valueInteger" : 98
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
    }
  ],
  "url" : "http://hl7.org/fhir/us/nhsn-dqm/Library/effective-data-requirements",
  "identifier" : [
    {
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:oid:2.25.316204395913842452684237438142819890580.28.3"
    }
  ],
  "version" : "1.0.0-ballot",
  "name" : "EffectiveDataRequirements",
  "status" : "active",
  "type" : {
    "coding" : [
      {
        "system" : "http://terminology.hl7.org/CodeSystem/library-type",
        "code" : "module-definition"
      }
    ]
  },
  "date" : "2024-08-12T17:44:04+00:00",
  "publisher" : "HL7 International / Public Health",
  "contact" : [
    {
      "name" : "HL7 International / Public Health",
      "telecom" : [
        {
          "system" : "url",
          "value" : "http://www.hl7.org/Special/committees/pher"
        }
      ]
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "US",
          "display" : "United States of America"
        }
      ]
    }
  ],
  "relatedArtifact" : [
    {
      "type" : "depends-on",
      "display" : "Library FHIRHelpers",
      "resource" : "http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"
    },
    {
      "type" : "depends-on",
      "display" : "Library Global",
      "resource" : "http://hl7.org/fhir/us/cqfmeasures/Library/MATGlobalCommonFunctions"
    },
    {
      "type" : "depends-on",
      "display" : "Code system ActCode",
      "resource" : "http://terminology.hl7.org/CodeSystem/v3-ActCode"
    },
    {
      "type" : "depends-on",
      "display" : "Code system Observation Category",
      "resource" : "http://terminology.hl7.org/CodeSystem/observation-category"
    },
    {
      "type" : "depends-on",
      "display" : "Code system LOINC",
      "resource" : "http://loinc.org"
    },
    {
      "type" : "depends-on",
      "display" : "Code system V2-0074",
      "resource" : "http://terminology.hl7.org/CodeSystem/v2-0074"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Encounter Inpatient",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Emergency Department Visit",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Observation Services",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
    },
    {
      "type" : "depends-on",
      "display" : "Value set Inpatient, Emergency, and Observation Locations",
      "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.265"
    }
  ],
  "parameter" : [
    {
      "name" : "Measurement Period",
      "use" : "in",
      "min" : 0,
      "max" : "1",
      "type" : "Period"
    },
    {
      "name" : "SDE Encounter",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Encounter"
    },
    {
      "name" : "SDE Medication Request",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "MedicationRequest"
    },
    {
      "name" : "SDE Coverage",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Coverage"
    },
    {
      "name" : "SDE Procedure",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Procedure"
    },
    {
      "name" : "SDE Device",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Device"
    },
    {
      "name" : "SDE Observation Lab Category",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Observation"
    },
    {
      "name" : "SDE Observation Vital Signs Category",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Observation"
    },
    {
      "name" : "SDE DiagnosticReport Others",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "DiagnosticReport"
    },
    {
      "name" : "SDE Medication Administration",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "MedicationAdministration"
    },
    {
      "name" : "SDE Observation Category",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Observation"
    },
    {
      "name" : "SDE Condition",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Condition"
    },
    {
      "name" : "Initial Population",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Encounter"
    },
    {
      "name" : "SDE DiagnosticReport Lab",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "DiagnosticReport"
    },
    {
      "name" : "SDE Location",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Location"
    },
    {
      "name" : "SDE Service Request",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "ServiceRequest"
    },
    {
      "name" : "SDE DiagnosticReport Note",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "DiagnosticReport"
    },
    {
      "name" : "SDE Minimal Patient",
      "use" : "out",
      "min" : 0,
      "max" : "1",
      "type" : "Patient"
    },
    {
      "name" : "SDE Medication",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Medication"
    },
    {
      "name" : "SDE Specimen",
      "use" : "out",
      "min" : 0,
      "max" : "*",
      "type" : "Specimen"
    }
  ],
  "dataRequirement" : [
    {
      "type" : "Encounter",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
      ],
      "mustSupport" : [
        "type",
        "status",
        "period",
        "id",
        "extension",
        "identifier",
        "statusHistory",
        "class",
        "classHistory",
        "serviceType",
        "priority",
        "subject",
        "participant",
        "length",
        "reasonCode",
        "reasonReference",
        "diagnosis",
        "account",
        "hospitalization",
        "location",
        "partOf"
      ],
      "codeFilter" : [
        {
          "path" : "type",
          "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
        }
      ]
    },
    {
      "type" : "Encounter",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
      ],
      "mustSupport" : [
        "type",
        "status",
        "period",
        "id",
        "extension",
        "identifier",
        "statusHistory",
        "class",
        "classHistory",
        "serviceType",
        "priority",
        "subject",
        "participant",
        "length",
        "reasonCode",
        "reasonReference",
        "diagnosis",
        "account",
        "hospitalization",
        "location",
        "partOf"
      ],
      "codeFilter" : [
        {
          "path" : "type",
          "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
        }
      ]
    },
    {
      "type" : "Encounter",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
      ],
      "mustSupport" : [
        "type",
        "status",
        "period",
        "id",
        "extension",
        "identifier",
        "statusHistory",
        "class",
        "classHistory",
        "serviceType",
        "priority",
        "subject",
        "participant",
        "length",
        "reasonCode",
        "reasonReference",
        "diagnosis",
        "account",
        "hospitalization",
        "location",
        "partOf"
      ],
      "codeFilter" : [
        {
          "path" : "type",
          "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
        }
      ]
    },
    {
      "type" : "Encounter",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
      ],
      "mustSupport" : [
        "class",
        "status",
        "period",
        "id",
        "extension",
        "identifier",
        "statusHistory",
        "classHistory",
        "type",
        "serviceType",
        "priority",
        "subject",
        "participant",
        "length",
        "reasonCode",
        "reasonReference",
        "diagnosis",
        "account",
        "hospitalization",
        "location",
        "partOf"
      ],
      "codeFilter" : [
        {
          "path" : "class",
          "code" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
              "code" : "EMER",
              "display" : "emergency"
            },
            {
              "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
              "code" : "ACUTE",
              "display" : "inpatient acute"
            },
            {
              "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
              "code" : "IMP",
              "display" : "inpatient encounter"
            },
            {
              "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
              "code" : "NONAC",
              "display" : "inpatient non-acute"
            },
            {
              "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
              "code" : "SS",
              "display" : "short stay"
            }
          ]
        }
      ]
    },
    {
      "type" : "Encounter",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Encounter"
      ],
      "mustSupport" : [
        "status",
        "period",
        "id",
        "extension",
        "identifier",
        "statusHistory",
        "class",
        "classHistory",
        "type",
        "serviceType",
        "priority",
        "subject",
        "participant",
        "length",
        "reasonCode",
        "reasonReference",
        "diagnosis",
        "account",
        "hospitalization",
        "location",
        "partOf"
      ]
    },
    {
      "type" : "Location",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Location"
      ],
      "mustSupport" : [
        "id",
        "extension",
        "status",
        "operationalStatus",
        "name",
        "alias",
        "description",
        "mode",
        "type",
        "telecom",
        "address",
        "physicalType",
        "position",
        "managingOrganization",
        "partOf",
        "hoursOfOperation",
        "availabilityExceptions",
        "endpoint"
      ]
    },
    {
      "type" : "MedicationRequest",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
      ],
      "mustSupport" : [
        "authoredOn",
        "id",
        "extension",
        "status",
        "statusReason",
        "intent",
        "category",
        "priority",
        "doNotPerform",
        "reported",
        "medication",
        "subject",
        "encounter",
        "requester",
        "recorder",
        "reasonCode",
        "reasonReference",
        "instantiatesCanonical",
        "instantiatesUri",
        "courseOfTherapyType",
        "dosageInstruction"
      ]
    },
    {
      "type" : "Coverage",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Coverage"
      ],
      "mustSupport" : [
        "period",
        "id",
        "extension",
        "status",
        "type",
        "policyHolder",
        "subscriber",
        "subscriberId",
        "beneficiary",
        "dependent",
        "relationship",
        "payor",
        "class",
        "order",
        "network",
        "subrogation",
        "contract"
      ]
    },
    {
      "type" : "Procedure",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Procedure"
      ],
      "mustSupport" : [
        "performed",
        "id",
        "extension",
        "instantiatesCanonical",
        "instantiatesUri",
        "basedOn",
        "partOf",
        "status",
        "statusReason",
        "category",
        "code",
        "subject",
        "encounter",
        "recorder",
        "asserter",
        "performer",
        "location",
        "reasonCode",
        "reasonReference",
        "bodySite",
        "outcome",
        "report",
        "complication",
        "complicationDetail",
        "followUp",
        "note",
        "focalDevice",
        "usedReference",
        "usedCode"
      ]
    },
    {
      "type" : "Device",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Device"
      ],
      "mustSupport" : [
        "id",
        "extension",
        "definition",
        "udiCarrier",
        "status",
        "statusReason",
        "distinctIdentifier",
        "manufacturer",
        "manufactureDate",
        "expirationDate",
        "lotNumber",
        "serialNumber",
        "deviceName",
        "modelNumber",
        "partNumber",
        "type",
        "specialization",
        "version",
        "property",
        "patient",
        "owner",
        "contact",
        "location",
        "url",
        "note",
        "safety",
        "parent"
      ]
    },
    {
      "type" : "Observation",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Observation"
      ],
      "mustSupport" : [
        "id",
        "extension",
        "basedOn",
        "partOf",
        "status",
        "category",
        "code",
        "subject",
        "focus",
        "encounter",
        "effective",
        "issued",
        "performer",
        "value",
        "dataAbsentReason",
        "interpretation",
        "note",
        "bodySite",
        "method",
        "specimen",
        "device",
        "referenceRange",
        "hasMember",
        "derivedFrom",
        "component"
      ]
    },
    {
      "type" : "DiagnosticReport",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/DiagnosticReport"
      ],
      "mustSupport" : [
        "category",
        "effective",
        "id",
        "extension",
        "basedOn",
        "status",
        "code",
        "subject",
        "encounter",
        "issued",
        "performer",
        "resultsInterpreter",
        "specimen",
        "result",
        "conclusion",
        "conclusionCode"
      ]
    },
    {
      "type" : "MedicationAdministration",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/MedicationAdministration"
      ],
      "mustSupport" : [
        "effective",
        "id",
        "extension",
        "instantiates",
        "partOf",
        "status",
        "statusReason",
        "category",
        "medication",
        "subject",
        "context",
        "supportingInformation",
        "performer",
        "reasonCode",
        "reasonReference",
        "request",
        "device",
        "note",
        "dosage",
        "eventHistory"
      ]
    },
    {
      "type" : "Condition",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Condition"
      ],
      "mustSupport" : [
        "id",
        "extension",
        "clinicalStatus",
        "verificationStatus",
        "category",
        "severity",
        "code",
        "bodySite",
        "subject",
        "encounter",
        "onset",
        "abatement",
        "recordedDate",
        "stage",
        "evidence",
        "note"
      ]
    },
    {
      "type" : "ServiceRequest",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
      ],
      "mustSupport" : [
        "authoredOn",
        "id",
        "extension",
        "instantiatesCanonical",
        "instantiatesUri",
        "basedOn",
        "replaces",
        "requisition",
        "status",
        "intent",
        "category",
        "priority",
        "doNotPerform",
        "code",
        "orderDetail",
        "quantity",
        "subject",
        "encounter",
        "occurrence",
        "asNeeded",
        "requester",
        "performerType",
        "performer",
        "locationCode",
        "locationReference",
        "reasonCode",
        "reasonReference",
        "insurance",
        "supportingInfo",
        "specimen",
        "bodySite",
        "note",
        "patientInstruction",
        "relevantHistory"
      ]
    },
    {
      "type" : "Patient",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Patient"
      ],
      "mustSupport" : [
        "id",
        "identifier",
        "active",
        "name",
        "telecom",
        "gender",
        "birthDate",
        "deceased",
        "address",
        "maritalStatus",
        "multipleBirth",
        "photo",
        "contact",
        "communication",
        "generalPractitioner",
        "managingOrganization",
        "link"
      ]
    },
    {
      "type" : "Medication",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Medication"
      ],
      "mustSupport" : [
        "id",
        "extension",
        "code",
        "status",
        "manufacturer",
        "form",
        "amount",
        "ingredient",
        "batch"
      ]
    },
    {
      "type" : "Specimen",
      "profile" : [
        🔗 "http://hl7.org/fhir/StructureDefinition/Specimen"
      ],
      "mustSupport" : [
        "collection",
        "collection.collected",
        "id",
        "extension",
        "identifier",
        "accessionIdentifier",
        "status",
        "type",
        "subject",
        "receivedTime",
        "parent",
        "request",
        "processing",
        "container",
        "condition",
        "note"
      ]
    }
  ]
}