2026 US Quality Core Implementation Guide
0.5.0 - cibuild US

2026 US Quality Core Implementation Guide, published by Office of the National Coordinator for Health Information Technology (ONC). This guide is not an authorized publication; it is the continuous build for version 0.5.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/us-quality-core/ and changes regularly. See the Directory of published versions

## : US Quality Core Common - JSON Representation

Active as of 2025-10-02

Raw json | Download

    {
      "resourceType" : "Library",
      "id" : "USQualityCoreCommon",
      "meta" : {
        "profile" : [
          🔗 "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary"🔗 ,
          "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"🔗 ,
          "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library"🔗 ,
          "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library"
        ]
      },
      "text" : {
        "status" : "extensions",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n<div>\n    <table class=\"grid dict\">\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Title: </b></th>\n            <td style=\"padding-left: 4px;\">US Quality Core Common</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">USQualityCoreCommon</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Version: </b></th>\n            <td style=\"padding-left: 4px;\">0.5.0</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Url: </b></th>\n            <td style=\"padding-left: 4px;\"><a href=\"Library-USQualityCoreCommon.html\">US Quality Core Common</a></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Type: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                    \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>system: </b> <span><a href=\"http://hl7.org/fhir/R4/codesystem-library-type.html\">http://terminology.hl7.org/CodeSystem/library-type</a></span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>code: </b> <span>logic-library</span>\n                        </p>\n                        \n                        \n                    \n                \n                \n            </td>\n        </tr>\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Date: </b></th>\n            <td style=\"padding-left: 4px;\">2025-10-02 13:51:38+0000</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Publisher: </b></th>\n            <td style=\"padding-left: 4px;\">Office of the National Coordinator for Health Information Technology (ONC)</td>\n        </tr>\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Description: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>Common terminologies and functions used in US Quality Core-based CQL artifacts</p>\n</div></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Jurisdiction: </b></th>\n            <td style=\"padding-left: 4px;\">US</td>\n        </tr>\n        \n\n        \n            <tr>\n                <th scope=\"row\"><b>Topic: </b></th>\n                <td style=\"padding-left: 4px;\"/>\n            </tr>\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Related Artifacts: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                \n                \n                <p><b>Dependencies</b></p>\n                <ul>\n                  \n                    <li><a href=\"Library-USQualityCore-ModelInfo.html\">US Quality Core Model Definition</a> version: 0.5.0</li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html\">http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/uv/cql/STU2/Library-FHIRCommon.html\">http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/v3/ActCode/cs.html\">v3 Code System ActCode</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/codesystem-task-code.html\">Task Codes</a></li>\n                  \n                </ul>\n                \n                \n                \n                \n                \n            </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Parameters: </b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              <tr><th><b>Name</b></th><th><b>Type</b></th><th><b>Min</b></th><th><b>Max</b></th><th><b>In/Out</b></th></tr>\n              \n                <tr><th>Patient</th><th>Resource</th><th>0</th><th>1</th><th>Out</th></tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n\n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><a id=\"cql-content\"><b>Content: </b></a> text/cql</th></tr>\n              <tr><td><pre><code class=\"language-cql\">/*\n@description: Common terminologies and functions used in USQualityCore-based CQL artifacts\n@comment: The modelinfo included with the published IG is using [derived modelinfo](https://hl7.org/fhir/uv/cql/using-modelinfo.html#derived-modelinfo)\nto enable reuse of data elements and libraries defined in the [US Core](https://hl7.org/fhir/us/core)\nand [US CQL](https://hl7.org/fhir/us/cql) Common IGs. This library is derived from the QICoreCommon shared library used in FHIR-based\nquality measure specifications. However, most of the functionality that was defined in QICoreCommon is now either in [FHIRCommon](https://hl7.org/fhir/uv/cql/Library-FHIRCommon.html)\nor [USCoreCommon](https://hl7.org/fhir/us/cql/Library-USCoreCommon.html).\n*/\nlibrary USQualityCoreCommon version '0.5.0'\n\nusing USQualityCore version '0.5.0'\n\ninclude hl7.fhir.uv.cql.FHIRHelpers version '4.0.1'\ninclude hl7.fhir.uv.cql.FHIRCommon version '2.0.0'\n\ncodesystem &quot;ActCode&quot;: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'\ncodesystem &quot;TaskCodeSystem&quot;: 'http://hl7.org/fhir/CodeSystem/task-code'\n\n// Encounter Class Codes\ncode &quot;ambulatory&quot;: 'AMB' from ActCode display 'ambulatory'\ncode &quot;emergency&quot;: 'EMER' from ActCode display 'emergency'\ncode &quot;field&quot;: 'FLD' from ActCode display 'field'\ncode &quot;home health&quot;: 'HH' from ActCode display 'home health'\ncode &quot;inpatient encounter&quot;: 'IMP' from ActCode display 'inpatient encounter'\ncode &quot;inpatient acute&quot;: 'ACUTE' from ActCode display 'inpatient acute'\ncode &quot;inpatient non-acute&quot;: 'NONAC' from ActCode display 'inpatient non-acute'\ncode &quot;observation encounter&quot;: 'OBSENC' from ActCode display 'observation encounter'\ncode &quot;pre-admission&quot;: 'PRENC' from ActCode display 'pre-admission'\ncode &quot;short stay&quot;: 'SS' from ActCode display 'short stay'\ncode &quot;virtual&quot;: 'VR' from ActCode display 'Virtual'\n\n//Task codes\ncode &quot;Fulfill&quot;: 'fulfill' from &quot;TaskCodeSystem&quot; display 'Fulfill'\n\ncontext Patient\n\n/*\n@description: Returns the id of the given uri (i.e. everything after the last slash)\n*/\ndefine fluent function getId(uri String):\n  Last(Split(uri, '/'))\n\n/*\n@description: Returns the System.ValueSet instance with the url and version (if present) of the given canonical reference\n*/\ndefine fluent function toValueSet(canonical FHIR.canonical):\n  System.ValueSet {\n    id: canonical.url(),\n    version: canonical.version()\n  }\n\n/*\n@description: Converts the activity extent pattern used to represent negated activities to either a codeableConcept or a value set\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function toActivityExtent(codeableConcept FHIR.CodeableConcept):\n  (codeableConcept.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-notDoneValueSet').value) X\n    return\n      if X is not null\n        then X.toValueSet()\n        else codeableConcept\n\n/*\n@description: Returns the value of the recorded extension for a Communication Not Done\n*/\ndefine fluent function recorded(communicationNotDone CommunicationNotDone):\n  communicationNotDone.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime\n\n/*\n@description: Returns the negated activity extent for a Communication Not Done\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function topic(communicationNotDone CommunicationNotDone):\n  communicationNotDone.topic.toActivityExtent()\n\n/*\n@description: Returns the value of the doNotPerformReason extension for a Device Not Requested\n*/\ndefine fluent function doNotPerformReason(deviceNotRequested DeviceNotRequested):\n  deviceNotRequested.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-doNotPerformReason').value as FHIR.CodeableConcept\n\n/*\n@description: Returns the value of the doNotPerform extension for a Device Not Requested\n*/\ndefine fluent function doNotPerform(deviceNotRequested DeviceNotRequested):\n  deviceNotRequested.ext('http://hl7.org/fhir/5.0/StructureDefinition/extension-DeviceRequest.doNotPerform').value as FHIR.boolean\n\n/*\n@description: Returns the negated activity extent for a Device Not Requested\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function code(deviceNotRequested DeviceNotRequested):\n  deviceNotRequested.code.toActivityExtent()\n\n/*\n@description: Returns the value of the abatement extension for a FamilyMemberHistory\n*/\ndefine fluent function abatement(familyMemberHistory FamilyMemberHistory):\n  familyMemberHistory.ext('hl7.org/fhir/StructureDefinition/familymemberhistory-abatement').value as Choice&lt;FHIR.date, FHIR.Age, FHIR.boolean&gt;\n\n/*\n@description: Returns the value of the severity extension for a FamilyMemberHistory\n*/\ndefine fluent function severity(familyMemberHistory FamilyMemberHistory):\n  familyMemberHistory.ext('hl7.org/fhir/StructureDefinition/familymemberhistory-severity').value as FHIR.CodeableConcept\n\n/*\n@description: Returns the negated activity extent for an Immunization Not Done\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function vaccineCode(immunizationNotDone ImmunizationNotDone):\n  immunizationNotDone.vaccineCode.toActivityExtent()\n\n/*\n@description: Returns the value of the recorded extension for a Medication Administration Not Done\n*/\ndefine fluent function recorded(medicationAdministrationNotDone MedicationAdministrationNotDone):\n  medicationAdministrationNotDone.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime\n\n/*\n@description: Returns the negated activity extent for a Medication Administration Not Done\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function medication(medicationAdministrationNotDone MedicationAdministrationNotDone):\n  medicationAdministrationNotDone.medication.toActivityExtent()\n\n/*\n@description: Returns the value of the recorded extension for a Medication Dispense Declined\n*/\ndefine fluent function recorded(medicationDispenseDeclined MedicationDispenseDeclined):\n  medicationDispenseDeclined.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime\n\n/*\n@description: Returns the negated activity extent for a Medication Dispense Declined\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function medication(medicationDispenseDeclined MedicationDispenseDeclined):\n  (medicationDispenseDeclined.medication as FHIR.CodeableConcept).toActivityExtent()\n\n/*\n@description: Returns the negated activity extent for a Medication Not Requested\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function medication(medicationNotRequested MedicationNotRequested):\n  medicationNotRequested.medication.toActivityExtent()\n\n/*\n@description: Returns the notDoneReason for an ObservationCancelled\n*/\ndefine fluent function notDoneReason(observationCancelled ObservationCancelled):\n  observationCancelled.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-notDoneReason').value as FHIR.CodeableConcept\n\n/*\n@description: Returns the negated activity extent for an ObservationCancelled\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function code(observationCancelled ObservationCancelled):\n  observationCancelled.code.toActivityExtent()\n\n/*\n@description: Returns the value of the recorded extension for a Procedure\n*/\ndefine fluent function recorded(procedure Procedure):\n  procedure.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime\n\n/*\n@description: Returns the value of the recorded extension for a Medication Administration Not Done\n*/\ndefine fluent function recorded(procedureNotDone ProcedureNotDone):\n  procedureNotDone.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-recorded').value as FHIR.dateTime\n\n/*\n@description: Returns the negated activity extent for a Procedure Not Done\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function code(procedureNotDone ProcedureNotDone):\n  procedureNotDone.code.toActivityExtent()\n\n/*\n@description: Returns the value of the recorded extension for a Medication Administration Not Done\n*/\ndefine fluent function reasonRefused(serviceNotRequested ServiceNotRequested):\n  serviceNotRequested.ext('http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-doNotPerformReason').value as FHIR.CodeableConcept\n\n/*\n@description: Returns the negated activity extent for a Service Not Requested\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function code(serviceNotRequested ServiceNotRequested):\n  serviceNotRequested.code.toActivityExtent()\n\n/*\n@description: Returns the negated activity extent for a Task Rejected\n@seealso: [Negation In US Quality Core](negation.html)\n*/\ndefine fluent function code(taskRejected TaskRejected):\n  taskRejected.code.toActivityExtent()\n\n/*\n@description: Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for\nthe final day if it is less than 24 hours. This also includes the first 24 hour period.\n*/\ndefine fluent function toDayNumbers(Period Interval&lt;DateTime&gt;):\n  ( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayNumber\n    return end of DayNumber\n\n/*\n@description: Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.\nNote that the result will include intervals that are closed at the beginning and open at the end\n*/\ndefine fluent function daysInPeriod(Period Interval&lt;DateTime&gt;):\n  ( Period.toDayNumbers()) DayIndex\n    let startPeriod: start of Period + (24 hours * (DayIndex - 1)),\n    endPeriod: if (hours between startPeriod and end of Period &lt; 24) then startPeriod\n      else start of Period + (24 hours * DayIndex)\n    return Tuple {\n      dayIndex: DayIndex,\n      dayPeriod: Interval[startPeriod, endPeriod)\n    }\n</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><b>Content: </b> application/elm+xml</th></tr>\n              <tr><td><pre><code>Encoded data (129396 characters)</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n        \n        \n        <tr>\n          <td colspan=\"2\">\n            <table>\n              <tr><th><b>Content: </b> application/elm+json</th></tr>\n              <tr><td><pre><code>Encoded data (229676 characters)</code></pre></td></tr>\n            </table>\n          </td>\n        </tr>\n        \n        \n    </table>\n</div>\n</div>"
      },
      "url" : "http://fhir.org/guides/onc/us-quality-core/Library/USQualityCoreCommon",
      "version" : "0.5.0",
      "name" : "USQualityCoreCommon",
      "title" : "US Quality Core Common",
      "status" : "active",
      "experimental" : false,
      "type" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/library-type",
            "code" : "logic-library"
          }
        ]
      },
      "date" : "2025-10-02T13:51:38+00:00",
      "publisher" : "Office of the National Coordinator for Health Information Technology (ONC)",
      "contact" : [
        {
          "name" : "Office of the National Coordinator for Health Information Technology (ONC)",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://www.healthit.gov/feedback"
            }
          ]
        }
      ],
      "description" : "Common terminologies and functions used in US Quality Core-based CQL artifacts",
      "jurisdiction" : [
        {
          "coding" : [
            {
              "system" : "urn:iso:std:iso:3166",
              "code" : "US",
              "display" : "United States of America"
            }
          ],
          "text" : "USA"
        }
      ],
      "topic" : [
        {
          "text" : "FHIR"
        },
        {
          "text" : "CQL"
        }
      ],
      "relatedArtifact" : [
        {
          "type" : "depends-on",
          "display" : "Model USQualityCore",
          "resource" : "http://fhir.org/guides/onc/us-quality-core/Library/USQualityCore-ModelInfo|0.5.0"
        },
        {
          "type" : "depends-on",
          "display" : "Library FHIRHelpers",
          "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"
        },
        {
          "type" : "depends-on",
          "display" : "Library FHIRCommon",
          "resource" : "http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0"
        },
        {
          "type" : "depends-on",
          "display" : "Code System ActCode",
          "resource" : "http://terminology.hl7.org/CodeSystem/v3-ActCode"
        },
        {
          "type" : "depends-on",
          "display" : "Code System TaskCodeSystem",
          "resource" : "http://hl7.org/fhir/CodeSystem/task-code"
        }
      ],
      "parameter" : [
        {
          "name" : "Patient",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Resource"
        }
      ],
      "content" : [
        {
          "contentType" : "text/cql",
          "data" : "[encoded data, 13396 characters]"
        },
        {
          "contentType" : "application/elm+xml",
          "data" : "[encoded data, 129396 characters]"
        },
        {
          "contentType" : "application/elm+json",
          "data" : "[encoded data, 229676 characters]"
        }
      ]
    }