Id: |
USCoreTests |
Version: |
0.1.0 |
Url: |
USCoreTests |
Status: |
draft |
Type: |
code: logic-library
|
Date: |
2024-11-18 00:51:22+0000 |
Publisher: |
Clinical Quality Framework |
Jurisdiction: |
840 |
Related Artifacts: |
Dependencies
|
Parameters: |
Name | Type | Min | Max | In/Out |
Patient | Resource | 0 | 1 | Out |
TestPatient | Resource | 0 | * | Out |
TestAllergyIntolerance | Resource | 0 | * | Out |
TestCarePlan | Resource | 0 | * | Out |
TestCareTeam | Resource | 0 | * | Out |
TestCondition | Resource | 0 | * | Out |
TestDiagnosticReport | Resource | 0 | * | Out |
TestDiagnosticReportNote | Resource | 0 | * | Out |
TestDocumentReference | Resource | 0 | * | Out |
TestEncounter | Resource | 0 | * | Out |
TestGoal | Resource | 0 | * | Out |
TestImmunization | Resource | 0 | * | Out |
TestImplantableDevice | Resource | 0 | * | Out |
TestObservation | Resource | 0 | * | Out |
TestLocation | Resource | 0 | * | Out |
TestMedication | Resource | 0 | * | Out |
TestMedicationRequest | Resource | 0 | * | Out |
TestOrganization | Resource | 0 | * | Out |
TestVitalsPanel | Resource | 0 | * | Out |
TestVitalsPanel2 | Resource | 0 | * | Out |
TestRespRate | Resource | 0 | * | Out |
TestRespRate2 | Resource | 0 | * | Out |
TestHeartRate | Resource | 0 | * | Out |
TestHeartRate2 | Resource | 0 | * | Out |
TestOxygenSat | Resource | 0 | * | Out |
TestOxygenSat2 | Resource | 0 | * | Out |
TestBodyTemp | Resource | 0 | * | Out |
TestBodyTemp2 | Resource | 0 | * | Out |
TestBodyHeight | Resource | 0 | * | Out |
TestBodyHeight2 | Resource | 0 | * | Out |
TestHeadCircum | Resource | 0 | * | Out |
TestHeadCircum2 | Resource | 0 | * | Out |
TestBodyWeight | Resource | 0 | * | Out |
TestBodyWeight2 | Resource | 0 | * | Out |
TestBMI | Resource | 0 | * | Out |
TestBMI2 | Resource | 0 | * | Out |
TestBP | Resource | 0 | * | Out |
TestBP2 | Resource | 0 | * | Out |
TestSmokingStatus | Resource | 0 | * | Out |
TestPulseOximetry | Resource | 0 | * | Out |
TestPediatricBMIForAge | Resource | 0 | * | Out |
TestPediatricWeightForHeight | Resource | 0 | * | Out |
TestPractitioner | Resource | 0 | * | Out |
TestPractitionerRole | Resource | 0 | * | Out |
TestProcedure | Resource | 0 | * | Out |
TestProvenance | Resource | 0 | * | Out |
TestPrimitives | Resource | 0 | 1 | Out |
TestChoice | Resource | 0 | 1 | Out |
TestSlices | Resource | 0 | * | Out |
TestSimpleExtensions | Resource | 0 | 1 | Out |
TestComplexExtensions | Resource | 0 | 1 | Out |
TestComplexFHIRHelpers | CodeableConcept | 0 | * | Out |
|
Data Requirements: |
Type | Profile | MS | Code 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)
|
|