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 CommonTests - JSON Representation

Active as of 2025-10-02

Raw json | Download

    {
      "resourceType" : "Library",
      "id" : "USQualityCoreCommonTests",
      "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 CommonTests</td>\n        </tr>\n        \n\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">USQualityCoreCommonTests</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-USQualityCoreCommonTests.html\">US Quality Core CommonTests</a></td>\n        </tr>\n        \n\n        \n\n        \n\n        \n\n        \n        <tr>\n            <th scope=\"row\"><b>Experimental: </b></th>\n            <td style=\"padding-left: 4px;\">true</td>\n        </tr>\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>Tests for the US Quality Core Common library</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=\"Library-USQualityCoreCommon.html\">US Quality Core Common</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/v3/MaritalStatus/cs.html\">v3 Code System MaritalStatus</a></li>\n                  \n                    <li><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-CDCREC.html\">CDC Race and Ethnicity</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/codesystem-communication-category.html\">CommunicationCategory</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/codesystem-snomedct.html\">SNOMED CT (all versions)</a></li>\n                  \n                    <li><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-CVX.html\">Vaccine Administered Code Set (CVX)</a></li>\n                  \n                    <li><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-v3-loinc.html\">Logical Observation Identifiers, Names and Codes (LOINC)</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/codesystem-task-code.html\">Task Codes</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/valueset-marital-status.html\">MaritalStatus</a></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/valueset-communication-category.html\">CommunicationCategory</a></li>\n                  \n                    <li><code>http://example.org/fhir/ValueSet/device-codes</code></li>\n                  \n                    <li><code>http://example.org/fhir/ValueSet/immunization-codes</code></li>\n                  \n                    <li><code>http://example.org/fhir/ValueSet/medication-codes</code></li>\n                  \n                    <li><code>http://example.org/fhir/ValueSet/observation-codes</code></li>\n                  \n                    <li><code>http://example.org/fhir/ValueSet/procedure-codes</code></li>\n                  \n                    <li><a href=\"http://hl7.org/fhir/R4/valueset-task-code.html\">Task Codes</a></li>\n                  \n                    <li><a href=\"ValueSet-us-quality-core-negation-reason.html\">USQualityCore Negation Reason Codes</a></li>\n                  \n                </ul>\n                \n                \n                \n                \n                \n            </td>\n        </tr>\n        \n\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\">library USQualityCoreCommonTests version '0.5.0'\n\nusing USQualityCore version '0.5.0'\nusing USCore version '6.1.0-derived'\nusing FHIR version '4.0.1'\n\ninclude FHIRHelpers version '4.0.1'\ninclude USQualityCoreCommon\n\ncodesystem &quot;Marital Status Codes&quot;: 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus'\ncodesystem &quot;CDC Race and Ethnicity Codes&quot;: 'urn:oid:2.16.840.1.113883.6.238'\ncodesystem &quot;CommunicationCategoryCodeSystem&quot;: 'http://terminology.hl7.org/CodeSystem/communication-category'\ncodesystem &quot;SNOMED-CT&quot;: 'http://snomed.info/sct'\ncodesystem &quot;CVX&quot;: 'http://hl7.org/fhir/sid/cvx'\ncodesystem &quot;LOINC&quot;: 'http://loinc.org'\ncodesystem &quot;TaskCodeSystem&quot;: 'http://hl7.org/fhir/CodeSystem/task-code'\n\nvalueset &quot;Marital Status&quot;: 'http://hl7.org/fhir/ValueSet/marital-status'\nvalueset &quot;CommunicationCodes&quot;: 'http://hl7.org/fhir/ValueSet/communication-category'\nvalueset &quot;DeviceCodes&quot;: 'http://example.org/fhir/ValueSet/device-codes' // Random set of device codes from 'http://hl7.org/fhir/ValueSet/device-type'\nvalueset &quot;ImmunizationCodes&quot;: 'http://example.org/fhir/ValueSet/immunization-codes' // Random set of immunization codes from 'http://hl7.org/fhir/us/core/ValueSet/us-core-vaccines-cvx'\nvalueset &quot;MedicationCodes&quot;: 'http://example.org/fhir/ValueSet/medication-codes' // Random set of medication codes from 'http://hl7.org/fhir/ValueSet/medication-codes'\nvalueset &quot;ObservationCodes&quot;: 'http://example.org/fhir/ValueSet/observation-codes' // Random set of observation codes from 'http://hl7.org/fhir/ValueSet/observation-codes'\nvalueset &quot;ProcedureCodes&quot;: 'http://example.org/fhir/ValueSet/procedure-codes' // Random set of procedure codes from 'http://hl7.org/fhir/us/core/ValueSet/us-core-procedure-code'\nvalueset &quot;TaskCodes&quot;: 'http://hl7.org/fhir/ValueSet/task-code'\nvalueset &quot;NegationReasonCodes&quot;: 'http://fhir.org/guides/onc/us-quality-core/ValueSet/us-quality-core-negation-reason'\n\ncode &quot;Marital Status - Married&quot;: 'M' from &quot;Marital Status Codes&quot;\ncode &quot;American Indian or Alaska Native&quot;: '1002-5' from &quot;CDC Race and Ethnicity Codes&quot;\ncode &quot;Alaska Native&quot;: '1735-0' from &quot;CDC Race and Ethnicity Codes&quot;\ncode &quot;CommunicationCode&quot;: 'alert' from &quot;CommunicationCategoryCodeSystem&quot; display 'Alert'\ncode &quot;DeviceCode&quot;: '156009' from &quot;SNOMED-CT&quot; display 'Spine board'\ncode &quot;ImmunizationCode&quot;: '01' from &quot;CVX&quot; display 'diphtheria, tetanus toxoids and pertussis vaccine'\ncode &quot;MedicationCode&quot;: '26100' from &quot;SNOMED-CT&quot; display 'Codeine phosphate'\ncode &quot;ObservationCode&quot;: '1-8' from &quot;LOINC&quot; display 'Acyclovir [Susceptibility]'\ncode &quot;ProcedureCode&quot;: '7138802' from &quot;SNOMED-CT&quot; display 'Procedure'\ncode &quot;TaskCode&quot;: 'approve' from &quot;TaskCodeSystem&quot; display 'Activate/approve the focal resource'\n\ncontext Patient\n\ndefine TestAdverseEvent: [&quot;AdverseEvent&quot;]\ndefine TestAllergyIntolerance: [&quot;AllergyIntolerance&quot;]\ndefine TestBodyStructure: [&quot;BodyStructure&quot;]\ndefine TestCarePlan: [&quot;CarePlan&quot;]\ndefine TestCareTeam: [&quot;CareTeam&quot;]\ndefine TestClaim: [&quot;Claim&quot;]\ndefine TestClaimResponse: [&quot;ClaimResponse&quot;]\ndefine TestCommunication: [&quot;Communication&quot;]\ndefine TestCommunicationNotDone: [&quot;CommunicationNotDone&quot;]\ndefine TestCommunicationRequest: [&quot;CommunicationRequest&quot;]\ndefine TestConditionEncounterDiagnosis: [&quot;ConditionEncounterDiagnosis&quot;]\ndefine TestConditionProblemsHealthConcerns: [&quot;ConditionProblemsHealthConcerns&quot;]\ndefine TestCoverage: [&quot;Coverage&quot;]\ndefine TestDevice: [&quot;Device&quot;]\ndefine TestDeviceNotRequested: [&quot;DeviceNotRequested&quot;]\ndefine TestDeviceRequest: [&quot;DeviceRequest&quot;]\ndefine TestDeviceUseStatement: [&quot;DeviceUseStatement&quot;]\ndefine TestDiagnosticReportLab: [&quot;DiagnosticReportLab&quot;]\ndefine TestDiagnosticReportNote: [&quot;DiagnosticReportNote&quot;]\ndefine TestEncounter: [&quot;Encounter&quot;]\ndefine TestFamilyMemberHistory: [&quot;FamilyMemberHistory&quot;]\ndefine TestFlag: [&quot;Flag&quot;]\ndefine TestGoal: [&quot;Goal&quot;]\ndefine TestImagingStudy: [&quot;ImagingStudy&quot;]\ndefine TestImmunization: [&quot;Immunization&quot;]\ndefine TestImmunizationEvaluation: [&quot;ImmunizationEvaluation&quot;]\ndefine TestImmunizationNotDone: [&quot;ImmunizationNotDone&quot;]\ndefine TestImmunizationRecommendation: [&quot;ImmunizationRecommendation&quot;]\ndefine TestLaboratoryResultObservation: [&quot;LaboratoryResultObservation&quot;]\ndefine TestLocation: [&quot;Location&quot;]\ndefine TestMedication: [&quot;Medication&quot;]\ndefine TestMedicationAdministration: [&quot;MedicationAdministration&quot;]\ndefine TestMedicationAdministrationNotDone: [&quot;MedicationAdministrationNotDone&quot;]\ndefine TestMedicationDispense: [&quot;MedicationDispense&quot;]\ndefine TestMedicationDispenseDeclined: [&quot;MedicationDispenseDeclined&quot;]\ndefine TestMedicationNotRequested: [&quot;MedicationNotRequested&quot;]\ndefine TestMedicationRequest: [&quot;MedicationRequest&quot;]\ndefine TestMedicationStatement: [&quot;MedicationStatement&quot;]\ndefine TestObservation: [&quot;SimpleObservation&quot;]\ndefine TestObservationCancelled: [&quot;ObservationCancelled&quot;]\ndefine TestObservationClinicalTestResult: [&quot;ObservationClinicalResult&quot;]\ndefine TestObservationImagingResult: [&quot;NonPatientObservation&quot;]\ndefine TestObservationSurvey: [&quot;ObservationScreeningAssessment&quot;]\ndefine TestOrganization: [&quot;Organization&quot;]\ndefine TestPatient: [&quot;Patient&quot;]\ndefine TestVitalsPanel: [USCore.VitalSignsProfile]\ndefine TestRespRate: [USCore.RespiratoryRateProfile]\ndefine TestHeartRate: [USCore.HeartRateProfile]\ndefine TestBodyTemp: [USCore.BodyTemperatureProfile]\ndefine TestBodyHeight: [USCore.BodyHeightProfile]\ndefine TestHeadCircum: [USCore.HeadCircumferenceProfile]\ndefine TestBodyWeight: [USCore.BodyWeightProfile]\ndefine TestBMI: [USCore.BMIProfile]\ndefine TestBP: [USCore.BloodPressureProfile]\ndefine TestPractitioner: [&quot;Practitioner&quot;]\ndefine TestPractitionerRole: [&quot;PractitionerRole&quot;]\ndefine TestProcedure: [&quot;Procedure&quot;]\ndefine TestProcedureNotDone: [&quot;ProcedureNotDone&quot;]\ndefine TestRelatedPerson: [&quot;RelatedPerson&quot;]\ndefine TestServiceNotRequested: [&quot;ServiceNotRequested&quot;]\ndefine TestServiceRequest: [&quot;ServiceRequest&quot;]\ndefine TestSpecimen: [&quot;Specimen&quot;]\ndefine TestSubstance: [&quot;Substance&quot;]\ndefine TestTask: [&quot;Task&quot;]\ndefine TestTaskRejected: [&quot;TaskRejected&quot;]\ndefine TestUSCoreImplantableDevice: [USCore.ImplantableDeviceProfile]\ndefine TestUSCoreSmokingStatus: [USCore.SmokingStatusProfile]\ndefine TestUSCorePulseOximetry: [USCore.PulseOximetryProfile]\ndefine TestUSCorePediatricBMIForAge: [USCore.PediatricBMIforAgeObservationProfile]\ndefine TestUSCorePediatricWeightForHeight: [USCore.PediatricWeightForHeightObservationProfile]\ndefine TestUSCorePediatricHeadOccipitalFrontalCircumferencePercentileProfile: [USCore.PediatricHeadOccipitalFrontalCircumferencePercentileProfile]\n//define TestUSCoreObservationSDOHAssessment: [USCore.ObservationSDOHAssessment]\n//define TestUSCoreObservationSocialHistoryProfile: [USCore.ObservationSocialHistoryProfile]\ndefine TestUSCoreObservationSexualOrientationProfile: [USCore.ObservationSexualOrientationProfile]\n\n// Validate Encounter.diagnosis cardinality\ndefine TestEncounterDiagnosisCardinality:\n  exists (First([Encounter]).diagnosis)\n\n// Validate ProcedureNotDone elements\ndefine TestProcedureNotDoneElements:\n  [ProcedureNotDone] P\n    where P.recorded() on or before day of Today()\n      and exists (P.identifier)\n      and P.status = 'not-done'\n      and P.statusReason is not null\n      and P.category is not null\n      and P.code is not null\n      and P.performed is null\n\n// Validate NotDone...\n\n// CommunicationNotDone\ndefine TestSpecificCommunicationNotDone:\n  [&quot;CommunicationNotDone&quot;: CommunicationCode]\n\n// TODO: Support this case, need to introduce a terminology contains operator\n// This operator is introduced in CQL R2\n//define TestSpecificCommunicationNotDoneActual:\n//    [&quot;CommunicationNotDone&quot;: topic ~ CommunicationCode]\n//      union [&quot;CommunicationNotDone&quot;: topic ~contains CommunicationCode]\n\ndefine TestSpecificCommunicationNotDoneExplicit:\n  [&quot;CommunicationNotDone&quot;] C\n    where C.topic() ~ CommunicationCode\n      or CommunicationCode in C.topic()\n\ndefine TestGeneralCommunicationNotDone:\n  [&quot;CommunicationNotDone&quot;: CommunicationCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralCommunicationNotDoneActual:\n  [&quot;CommunicationNotDone&quot;: topic in CommunicationCodes]\n    union [&quot;CommunicationNotDone&quot;: topic ~ CommunicationCodes]\n\ndefine TestGeneralCommunicationNotDoneExplicit:\n  [&quot;CommunicationNotDone&quot;] C\n    where C.topic() in CommunicationCodes\n      or C.topic() ~ CommunicationCodes\n\n// DeviceNotRequested\ndefine TestSpecificDeviceNotRequested:\n  [&quot;DeviceNotRequested&quot;: DeviceCode]\n\n// TODO: Support this use case\n//define TestSpecificDeviceNotRequestedActual:\n//    [&quot;DeviceNotRequested&quot;: code ~ DeviceCode]\n//      union [&quot;DeviceNotRequested&quot;: code ~contains DeviceCode]\n\ndefine TestSpecificDeviceNotRequestedExplicit:\n  [DeviceNotRequested] D\n    where D.code() ~ DeviceCode\n      or DeviceCode in D.code()\n\ndefine TestGeneralDeviceNotRequested:\n  [&quot;DeviceNotRequested&quot;: DeviceCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralDeviceNotRequestedActual:\n  [&quot;DeviceNotRequested&quot;: code in DeviceCodes]\n    union [&quot;DeviceNotRequested&quot;: code ~ DeviceCodes]\n\ndefine TestGeneralDeviceNotRequestedExplicit:\n  [&quot;DeviceNotRequested&quot;] D\n    where D.code() in DeviceCodes\n      or D.code() ~ DeviceCodes\n\ndefine TestGeneralDeviceNotRequestedCodeExplicit:\n  [&quot;DeviceNotRequested&quot;] D\n    where D.code() in DeviceCodes\n\ndefine TestGeneralDeviceNotRequestedValueSetExplicit:\n  [&quot;DeviceNotRequested&quot;] D\n    where D.code() ~ DeviceCodes\n\n// ImmunizationNotDone\ndefine TestSpecificImmunizationNotDone:\n  [&quot;ImmunizationNotDone&quot;: ImmunizationCode]\n\n// TODO: Support this use case\n//define TestSpecificImmunizationNotDoneActual:\n//    [&quot;ImmunizationNotDone&quot;: vaccineCode ~ ImmunizationCode]\n//      union [&quot;ImmunizationNotDone&quot;: vaccineCode ~contains ImmunizationCode]\n\ndefine TestSpecificImmunizationNotDoneExplicit:\n  [&quot;ImmunizationNotDone&quot;] I\n    where I.vaccineCode() ~ ImmunizationCode\n      or ImmunizationCode in I.vaccineCode()\n\ndefine TestGeneralImmunizationNotDone:\n  [&quot;ImmunizationNotDone&quot;: ImmunizationCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralImmunizationNotDoneActual:\n  [&quot;ImmunizationNotDone&quot;: vaccineCode in ImmunizationCodes]\n    union [&quot;ImmunizationNotDone&quot;: vaccineCode ~ ImmunizationCodes]\n\ndefine TestGeneralImmunizationNotDoneExplicit:\n  [&quot;ImmunizationNotDone&quot;] I\n    where I.vaccineCode() in ImmunizationCodes\n      or I.vaccineCode() ~ ImmunizationCodes\n\n// MedicationAdministrationNotDone\ndefine TestSpecificMedicationAdministrationNotDone:\n  [&quot;MedicationAdministrationNotDone&quot;: MedicationCode]\n\n// TODO: Support this use case\n//define TestSpecificMedicationAdministrationNotDoneActual:\n//    [&quot;MedicationAdministrationNotDone&quot;: medication ~ MedicationCode]\n//      union [&quot;MedicationAdministrationNotDone&quot;: medication ~contains MedicationCode]\n\ndefine TestSpecificMedicationAdministrationNotDoneExplicit:\n  [&quot;MedicationAdministrationNotDone&quot;] I\n    where I.medication() ~ MedicationCode\n      or MedicationCode in I.medication()\n\ndefine TestGeneralMedicationAdministrationNotDone:\n  [&quot;MedicationAdministrationNotDone&quot;: MedicationCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralMedicationAdministrationNotDoneActual:\n  [&quot;MedicationAdministrationNotDone&quot;: medication in MedicationCodes]\n    union [&quot;MedicationAdministrationNotDone&quot;: medication ~ MedicationCodes]\n\ndefine TestGeneralMedicationAdministrationNotDoneExplicit:\n  [&quot;MedicationAdministrationNotDone&quot;] I\n    where I.medication() in MedicationCodes\n      or I.medication() ~ MedicationCodes\n\n// MedicationDispenseDeclined\ndefine TestSpecificMedicationDispenseDeclined:\n  [&quot;MedicationDispenseDeclined&quot;: MedicationCode]\n\n// TODO: Support this use case\n//define TestSpecificMedicationDispenseDeclinedActual:\n//    [&quot;MedicationDispenseDeclined&quot;: medication ~ MedicationCode]\n//      union [&quot;MedicationDispenseDeclined&quot;: medication ~contains MedicationCode]\n\ndefine TestSpecificMedicationDispenseDeclinedExplicit:\n  [&quot;MedicationDispenseDeclined&quot;] I\n    where I.medication() ~ MedicationCode\n      or MedicationCode in I.medication()\n\ndefine TestGeneralMedicationDispenseDeclined:\n  [&quot;MedicationDispenseDeclined&quot;: MedicationCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralMedicationDispenseDeclinedActual:\n  [&quot;MedicationDispenseDeclined&quot;: medication in MedicationCodes]\n    union [&quot;MedicationDispenseDeclined&quot;: medication ~ MedicationCodes]\n\ndefine TestGeneralMedicationDispenseDeclinedExplicit:\n  [&quot;MedicationDispenseDeclined&quot;] I\n    where I.medication() in MedicationCodes\n      or I.medication() ~ MedicationCodes\n\n// MedicationNotRequested\ndefine TestSpecificMedicationNotRequested:\n  [&quot;MedicationNotRequested&quot;: MedicationCode]\n\n// TODO: Support this use case\n//define TestSpecificMedicationNotRequestedActual:\n//    [&quot;MedicationNotRequested&quot;: medication ~ MedicationCode]\n//      union [&quot;MedicationNotRequested&quot;: medication ~contains MedicationCode]\n\ndefine TestSpecificMedicationNotRequestedExplicit:\n  [&quot;MedicationNotRequested&quot;] I\n    where I.medication() ~ MedicationCode\n      or MedicationCode in I.medication()\n\ndefine TestGeneralMedicationNotRequested:\n  [&quot;MedicationNotRequested&quot;: MedicationCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralMedicationNotRequestedActual:\n  [&quot;MedicationNotRequested&quot;: medication in MedicationCodes]\n    union [&quot;MedicationNotRequested&quot;: medication ~ MedicationCodes]\n\ndefine TestGeneralMedicationNotRequestedExplicit:\n  [&quot;MedicationNotRequested&quot;] I\n    where I.medication() in MedicationCodes\n      or I.medication() ~ MedicationCodes\n\n// ObservationCancelled\ndefine TestSpecificObservationCancelled:\n  [&quot;ObservationCancelled&quot;: ObservationCode]\n\n// TODO: Support this use case\n//define TestSpecificObservationCancelledActual:\n//    [&quot;ObservationCancelled&quot;: code ~ ObservationCode]\n//      union [&quot;ObservationCancelled&quot;: code contains ObservationCode]\n\ndefine TestSpecificObservationCancelledExplicit:\n  [&quot;ObservationCancelled&quot;] I\n    where I.code() ~ ObservationCode\n      or ObservationCode in I.code()\n\ndefine TestGeneralObservationCancelled:\n  [&quot;ObservationCancelled&quot;: ObservationCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralObservationCancelledActual:\n  [&quot;ObservationCancelled&quot;: code in ObservationCodes]\n    union [&quot;ObservationCancelled&quot;: code ~ ObservationCodes]\n\ndefine TestGeneralObservationCancelledExplicit:\n  [&quot;ObservationCancelled&quot;] I\n    where I.code() in ObservationCodes\n      or I.code() ~ ObservationCodes\n\n// ProcedureNotDone\ndefine TestSpecificProcedureNotDone:\n  [&quot;ProcedureNotDone&quot;: ProcedureCode]\n\n// TODO: Support this use case\n//define TestSpecificProcedureNotDoneActual:\n//    [&quot;ProcedureNotDone&quot;: code ~ ProcedureCode]\n//      union [&quot;ProcedureNotDone&quot;: code ~contains ProcedureCode]\n\ndefine TestSpecificProcedureNotDoneExplicit:\n  [&quot;ProcedureNotDone&quot;] I\n    where I.code() ~ ProcedureCode\n      or ProcedureCode in I.code()\n\ndefine TestGeneralProcedureNotDone:\n  [&quot;ProcedureNotDone&quot;: ProcedureCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralProcedureNotDoneActual:\n  [&quot;ProcedureNotDone&quot;: code in ProcedureCodes]\n    union [&quot;ProcedureNotDone&quot;: code ~ ProcedureCodes]\n\ndefine TestGeneralProcedureNotDoneExplicit:\n  [&quot;ProcedureNotDone&quot;] I\n    where I.code() in ProcedureCodes\n      or I.code() ~ ProcedureCodes\n\n// ServiceNotRequested\ndefine TestSpecificServiceNotRequested:\n  [&quot;ServiceNotRequested&quot;: ProcedureCode]\n\n// TODO: Support this use case\n//define TestSpecificServiceNotRequestedActual:\n//    [&quot;ServiceNotRequested&quot;: code ~ ProcedureCode]\n//      union [&quot;ServiceNotRequested&quot;: code ~contains ProcedureCode]\n\ndefine TestSpecificServiceNotRequestedExplicit:\n  [&quot;ServiceNotRequested&quot;] I\n    where I.code() ~ ProcedureCode\n      or ProcedureCode in I.code()\n\ndefine TestGeneralServiceNotRequested:\n  [&quot;ServiceNotRequested&quot;: ProcedureCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralServiceNotRequestedActual:\n  [&quot;ServiceNotRequested&quot;: code in ProcedureCodes]\n    union [&quot;ServiceNotRequested&quot;: code ~ ProcedureCodes]\n\ndefine TestGeneralServiceNotRequestedExplicit:\n  [&quot;ServiceNotRequested&quot;] I\n    where I.code() in ProcedureCodes\n      or I.code() ~ ProcedureCodes\n\n// TaskRejected\ndefine TestSpecificTaskRejected:\n  [&quot;TaskRejected&quot;: TaskCode]\n\n// TODO: Support this use case\n//define TestSpecificTaskRejectedActual:\n//    [&quot;TaskRejected&quot;: code ~ TaskCode]\n//      union [&quot;TaskRejected&quot;: code contains TaskCode]\n\ndefine TestSpecificTaskNotDoneExplicit:\n  [&quot;TaskRejected&quot;] I\n    where I.code() ~ TaskCode\n      or TaskCode in I.code()\n\ndefine TestGeneralTaskRejected:\n  [&quot;TaskRejected&quot;: TaskCodes]\n\n// NOTE: This warning should not be happening, logged a translator issue to investigate: https://github.com/cqframework/clinical_quality_language/issues/1714\ndefine TestGeneralTaskRejectedActual:\n  [&quot;TaskRejected&quot;: code in TaskCodes]\n    union [&quot;TaskRejected&quot;: code ~ TaskCodes]\n\ndefine TestGeneralTaskRejectedExplicit:\n  [&quot;TaskRejected&quot;] I\n    where I.code() in TaskCodes\n      or I.code() ~ TaskCodes\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 (316708 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 (593504 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/USQualityCoreCommonTests",
      "version" : "0.5.0",
      "name" : "USQualityCoreCommonTests",
      "title" : "US Quality Core CommonTests",
      "status" : "active",
      "experimental" : true,
      "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" : "Tests for the US Quality Core Common library",
      "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 USQualityCoreCommon",
          "resource" : "http://fhir.org/guides/onc/us-quality-core/Library/USQualityCoreCommon"
        },
        {
          "type" : "depends-on",
          "display" : "Code System Marital Status Codes",
          "resource" : "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus"
        },
        {
          "type" : "depends-on",
          "display" : "Code System CDC Race and Ethnicity Codes",
          "resource" : "urn:oid:2.16.840.1.113883.6.238"
        },
        {
          "type" : "depends-on",
          "display" : "Code System CommunicationCategoryCodeSystem",
          "resource" : "http://terminology.hl7.org/CodeSystem/communication-category"
        },
        {
          "type" : "depends-on",
          "display" : "Code System SNOMED-CT",
          "resource" : "http://snomed.info/sct"
        },
        {
          "type" : "depends-on",
          "display" : "Code System CVX",
          "resource" : "http://hl7.org/fhir/sid/cvx"
        },
        {
          "type" : "depends-on",
          "display" : "Code System LOINC",
          "resource" : "http://loinc.org"
        },
        {
          "type" : "depends-on",
          "display" : "Code System TaskCodeSystem",
          "resource" : "http://hl7.org/fhir/CodeSystem/task-code"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set Marital Status",
          "resource" : "http://hl7.org/fhir/ValueSet/marital-status"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set CommunicationCodes",
          "resource" : "http://hl7.org/fhir/ValueSet/communication-category"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set DeviceCodes",
          "resource" : "http://example.org/fhir/ValueSet/device-codes"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set ImmunizationCodes",
          "resource" : "http://example.org/fhir/ValueSet/immunization-codes"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set MedicationCodes",
          "resource" : "http://example.org/fhir/ValueSet/medication-codes"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set ObservationCodes",
          "resource" : "http://example.org/fhir/ValueSet/observation-codes"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set ProcedureCodes",
          "resource" : "http://example.org/fhir/ValueSet/procedure-codes"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set TaskCodes",
          "resource" : "http://hl7.org/fhir/ValueSet/task-code"
        },
        {
          "type" : "depends-on",
          "display" : "Value Set NegationReasonCodes",
          "resource" : "http://fhir.org/guides/onc/us-quality-core/ValueSet/us-quality-core-negation-reason"
        }
      ],
      "content" : [
        {
          "contentType" : "text/cql",
          "data" : "[encoded data, 23844 characters]"
        },
        {
          "contentType" : "application/elm+xml",
          "data" : "[encoded data, 316708 characters]"
        },
        {
          "contentType" : "application/elm+json",
          "data" : "[encoded data, 593504 characters]"
        }
      ]
    }