Clinical Quality Framework Common FHIR Assets (US-Based)
0.1.0 - CI Build United States of America (USA)

Clinical Quality Framework Common FHIR Assets (US-Based), published by Clinical Quality Framework. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/cqf-us/ and changes regularly. See the Directory of published versions

Library:

Official URL: http://fhir.org/guides/cqf/us/common/Library/USCoreTests Version: 0.1.0
Draft as of 2024-12-13 Computable Name: USCoreTests
Id: USCoreTests
Version: 0.1.0
Url: USCoreTests
Status: draft
Type:

code: logic-library

Date: 2024-12-13 15:11:39+0000
Publisher: Clinical Quality Framework
Jurisdiction: 840
Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientResource01Out
TestPatientResource0*Out
TestAllergyIntoleranceResource0*Out
TestCarePlanResource0*Out
TestCareTeamResource0*Out
TestConditionResource0*Out
TestDiagnosticReportResource0*Out
TestDiagnosticReportNoteResource0*Out
TestDocumentReferenceResource0*Out
TestEncounterResource0*Out
TestGoalResource0*Out
TestImmunizationResource0*Out
TestImplantableDeviceResource0*Out
TestObservationResource0*Out
TestLocationResource0*Out
TestMedicationResource0*Out
TestMedicationRequestResource0*Out
TestOrganizationResource0*Out
TestVitalsPanelResource0*Out
TestVitalsPanel2Resource0*Out
TestRespRateResource0*Out
TestRespRate2Resource0*Out
TestHeartRateResource0*Out
TestHeartRate2Resource0*Out
TestOxygenSatResource0*Out
TestOxygenSat2Resource0*Out
TestBodyTempResource0*Out
TestBodyTemp2Resource0*Out
TestBodyHeightResource0*Out
TestBodyHeight2Resource0*Out
TestHeadCircumResource0*Out
TestHeadCircum2Resource0*Out
TestBodyWeightResource0*Out
TestBodyWeight2Resource0*Out
TestBMIResource0*Out
TestBMI2Resource0*Out
TestBPResource0*Out
TestBP2Resource0*Out
TestSmokingStatusResource0*Out
TestPulseOximetryResource0*Out
TestPediatricBMIForAgeResource0*Out
TestPediatricWeightForHeightResource0*Out
TestPractitionerResource0*Out
TestPractitionerRoleResource0*Out
TestProcedureResource0*Out
TestProvenanceResource0*Out
TestPrimitivesResource01Out
TestChoiceResource01Out
TestSlicesResource0*Out
TestSimpleExtensionsResource01Out
TestComplexExtensionsResource01Out
TestComplexFHIRHelpersCodeableConcept0*Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
AllergyIntolerance http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance
CarePlan http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan
CareTeam http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam
Condition http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition
DiagnosticReport http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab
DiagnosticReport http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note
DocumentReference http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference
Encounter http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter
Goal http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal
Immunization http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization
Device http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device
Observation http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab
Location http://hl7.org/fhir/us/core/StructureDefinition/us-core-location
Medication http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication
MedicationRequest http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest
Organization http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization
Observation http://hl7.org/fhir/StructureDefinition/vitalspanel
Observation http://hl7.org/fhir/StructureDefinition/vitalspanel
Observation http://hl7.org/fhir/StructureDefinition/resprate
Observation http://hl7.org/fhir/StructureDefinition/resprate
Observation http://hl7.org/fhir/StructureDefinition/heartrate
Observation http://hl7.org/fhir/StructureDefinition/heartrate
Observation http://hl7.org/fhir/StructureDefinition/oxygensat
Observation http://hl7.org/fhir/StructureDefinition/oxygensat
Observation http://hl7.org/fhir/StructureDefinition/bodytemp
Observation http://hl7.org/fhir/StructureDefinition/bodytemp
Observation http://hl7.org/fhir/StructureDefinition/bodyheight
Observation http://hl7.org/fhir/StructureDefinition/bodyheight
Observation http://hl7.org/fhir/StructureDefinition/headcircum
Observation http://hl7.org/fhir/StructureDefinition/headcircum
Observation http://hl7.org/fhir/StructureDefinition/bodyweight
Observation http://hl7.org/fhir/StructureDefinition/bodyweight
Observation http://hl7.org/fhir/StructureDefinition/bmi
Observation http://hl7.org/fhir/StructureDefinition/bmi
Observation http://hl7.org/fhir/StructureDefinition/bp
Observation http://hl7.org/fhir/StructureDefinition/bp
Observation http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus
Observation http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry
Observation http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age
Observation http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height
Practitioner http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner
PractitionerRole http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitionerrole
Procedure http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure
Provenance http://hl7.org/fhir/us/core/StructureDefinition/us-core-provenance
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;;;;;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;
Observation http://hl7.org/fhir/StructureDefinition/bp ;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;
Observation http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age ;
Content: text/cql
/*
@description: This is a testing library used to validate capability of the CQL-to-ELM translator
using the US Core model info. It is not intended as
*/
library USCoreTests version '0.1.0'

using USCore version '3.1.1'

include FHIRHelpers version '4.1.0'

codesystem "Marital Status Codes": 'http://terminology.hl7.org/CodeSystem/v3-MaritalStatus'
codesystem "CDC Race and Ethnicity Codes": 'urn:oid:2.16.840.1.113883.6.238'

valueset "Marital Status": 'http://hl7.org/fhir/ValueSet/marital-status'

code "Marital Status - Married": 'M' from "Marital Status Codes"
code "American Indian or Alaska Native": '1002-5' from "CDC Race and Ethnicity Codes"
code "Alaska Native": '1735-0' from "CDC Race and Ethnicity Codes"

context Patient

define TestPatient: ["PatientProfile"]
define TestAllergyIntolerance: ["AllergyIntolerance"]
define TestCarePlan: ["CarePlanProfile"]
define TestCareTeam: ["CareTeam"]
define TestCondition: ["Condition"]
define TestDiagnosticReport: ["DiagnosticReportProfileLaboratoryReporting"]
define TestDiagnosticReportNote: ["DiagnosticReportProfileNoteExchange"]
define TestDocumentReference: ["DocumentReferenceProfile"]
define TestEncounter: ["EncounterProfile"]
define TestGoal: ["GoalProfile"]
define TestImmunization: ["ImmunizationProfile"]
define TestImplantableDevice: ["ImplantableDeviceProfile"]
define TestObservation: ["LaboratoryResultObservationProfile"]
define TestLocation: ["Location"]
define TestMedication: ["MedicationProfile"]
define TestMedicationRequest: ["MedicationRequestProfile"]
define TestOrganization: ["OrganizationProfile"]
define TestVitalsPanel: ["observation-vitalspanel"]
define TestVitalsPanel2: ["Observation Vital Signs Panel Profile"]
define TestRespRate: ["observation-resprate"]
define TestRespRate2: ["Observation Respiratory Rate Profile"]
define TestHeartRate: ["observation-heartrate"]
define TestHeartRate2: ["Observation Heart Rate Profile"]
define TestOxygenSat: ["observation-oxygensat"]
define TestOxygenSat2: ["Observation Oxygen Saturation Profile"]
define TestBodyTemp: ["observation-bodytemp"]
define TestBodyTemp2: ["Observation Body Temperature Profile"]
define TestBodyHeight: ["observation-bodyheight"]
define TestBodyHeight2: ["Observation Body Height Profile"]
define TestHeadCircum: ["observation-headcircum"]
define TestHeadCircum2: ["Observation Head Circumference Profile"]
define TestBodyWeight: ["observation-bodyweight"]
define TestBodyWeight2: ["Observation Body Weight Profile"]
define TestBMI: ["observation-bmi"]
define TestBMI2: ["Observation Body Mass Index Profile"]

define TestBP: ["observation-bp"]
define TestBP2: ["Observation Blood Pressure Profile"]
define TestSmokingStatus: ["SmokingStatusProfile"]
define TestPulseOximetry: ["PulseOximetryProfile"]
define TestPediatricBMIForAge: ["PediatricBMIforAgeObservationProfile"]
define TestPediatricWeightForHeight: ["PediatricWeightForHeightObservationProfile"]
define TestPractitioner: ["PractitionerProfile"]
define TestPractitionerRole: ["PractitionerRoleProfile"]
define TestProcedure: ["ProcedureProfile"]
define TestProvenance: ["Provenance"]

define TestPrimitives:
  Patient P
    where P.gender = 'male'
      and P.active is true
      and P.birthDate before Today()
      and P.maritalStatus in "Marital Status"
      and P.maritalStatus ~ "Marital Status - Married"

define TestChoice:
  Patient P
    where P.deceased is false
      or P.deceased before Today()

define TestSlices:
  ["observation-bp"] BP
    where BP.SystolicBP.value < 140 'mm[Hg]'
      and BP.DiastolicBP.value < 90 'mm[Hg]'

define TestSimpleExtensions:
  Patient P
    where P.birthsex = 'M'

define TestComplexExtensions:
  Patient P
    where P.race.ombCategory contains "American Indian or Alaska Native"
      and P.race.detailed contains "Alaska Native"

define TestComplexFHIRHelpers:
  ["PediatricBMIforAgeObservationProfile"] PB
    return PB.VSCat
Content: application/elm+xml
Encoded data (89492 characters)
Content: application/elm+json
Encoded data (155828 characters)