Common CQL Artifacts for FHIR (US-Based)
1.0.0 - Informative 1

Common CQL Artifacts for FHIR (US-Based) - Downloaded Version null See the Directory of published versions

## Library: US Core Tests (Experimental)

Official URL: http://hl7.org/fhir/us/cql/Library/USCoreTests | Version: 1.0.0
Standards status: Informative | Maturity Level: 3 | Computable Name: USCoreTests

This is a testing library used to validate capability of the CQL-to-ELM translator using the US Core model info.

Metadata
Title | US Core Tests
Version | 1.0.0
Experimental | true
Jurisdiction | United States of America
Topic | FHIR
Topic | CQL
Topic | Unit Tests
Steward (Publisher) | HL7 International / Clinical Decision Support
Description | This is a testing library used to validate capability of the CQL-to-ELM translator using the US Core model info.
Type | logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency | Description: Library FHIRHelpers Resource: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1 Canonical URL: `http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1`
Dependency | Description: Code System Marital Status Codes Resource: MaritalStatus Canonical URL: `http://terminology.hl7.org/CodeSystem/v3-MaritalStatus`
Dependency | Description: Code System CDC Race and Ethnicity Codes Resource: CDC Race and Ethnicity Canonical URL: `urn:oid:2.16.840.1.113883.6.238`
Dependency | Description: Value Set Marital Status Resource: MaritalStatus Canonical URL: `http://hl7.org/fhir/ValueSet/marital-status`
Data Requirement | Type: AllergyIntolerance Profile(s): US Core AllergyIntolerance Profile
Data Requirement | Type: Observation Profile(s): US Core BMI Profile
Data Requirement | Type: Observation Profile(s): US Core Blood Pressure Profile
Data Requirement | Type: Observation Profile(s): US Core Body Height Profile
Data Requirement | Type: Observation Profile(s): US Core Body Temperature Profile
Data Requirement | Type: Observation Profile(s): US Core Body Weight Profile
Data Requirement | Type: CarePlan Profile(s): US Core CarePlan Profile
Data Requirement | Type: CareTeam Profile(s): US Core CareTeam Profile
Data Requirement | Type: Condition Profile(s): US Core Condition Encounter Diagnosis Profile
Data Requirement | Type: Condition Profile(s): US Core Condition Problems and Health Concerns Profile
Data Requirement | Type: Coverage Profile(s): US Core Coverage Profile
Data Requirement | Type: DiagnosticReport Profile(s): US Core DiagnosticReport Profile for Laboratory Results Reporting
Data Requirement | Type: DiagnosticReport Profile(s): US Core DiagnosticReport Profile for Report and Note Exchange
Data Requirement | Type: DocumentReference Profile(s): US Core DocumentReference Profile
Data Requirement | Type: Encounter Profile(s): US Core Encounter Profile
Data Requirement | Type: Goal Profile(s): US Core Goal Profile
Data Requirement | Type: Observation Profile(s): US Core Head Circumference Profile
Data Requirement | Type: Observation Profile(s): US Core Heart Rate Profile
Data Requirement | Type: Immunization Profile(s): US Core Immunization Profile
Data Requirement | Type: Device Profile(s): US Core Implantable Device Profile
Data Requirement | Type: Observation Profile(s): US Core Laboratory Result Observation Profile
Data Requirement | Type: Location Profile(s): US Core Location Profile
Data Requirement | Type: Medication Profile(s): US Core Medication Profile
Data Requirement | Type: MedicationDispense Profile(s): US Core MedicationDispense Profile
Data Requirement | Type: MedicationRequest Profile(s): US Core MedicationRequest Profile
Data Requirement | Type: Observation Profile(s): US Core Observation Clinical Result Profile
Data Requirement | Type: Observation Profile(s): US Core Observation Occupation Profile
Data Requirement | Type: Observation Profile(s): US Core Observation Pregnancy Intent Profile
Data Requirement | Type: Observation Profile(s): US Core Observation Pregnancy Status Profile
Data Requirement | Type: Observation Profile(s): US Core Observation Screening Assessment Profile
Data Requirement | Type: Observation Profile(s): US Core Observation Sexual Orientation Profile
Data Requirement | Type: Organization Profile(s): US Core Organization Profile
Data Requirement | Type: Patient Profile(s): US Core Patient Profile
Data Requirement | Type: Observation Profile(s): US Core Pediatric BMI for Age Observation Profile
Data Requirement | Type: Observation Profile(s): US Core Pediatric Head Occipital Frontal Circumference Percentile Profile
Data Requirement | Type: Observation Profile(s): US Core Pediatric Weight for Height Observation Profile
Data Requirement | Type: Practitioner Profile(s): US Core Practitioner Profile
Data Requirement | Type: PractitionerRole Profile(s): US Core PractitionerRole Profile
Data Requirement | Type: Procedure Profile(s): US Core Procedure Profile
Data Requirement | Type: Provenance Profile(s): US Core Provenance Profile
Data Requirement | Type: Observation Profile(s): US Core Pulse Oximetry Profile
Data Requirement | Type: QuestionnaireResponse Profile(s): US Core QuestionnaireResponse Profile
Data Requirement | Type: RelatedPerson Profile(s): US Core RelatedPerson Profile
Data Requirement | Type: Observation Profile(s): US Core Respiratory Rate Profile
Data Requirement | Type: ServiceRequest Profile(s): US Core ServiceRequest Profile
Data Requirement | Type: Observation Profile(s): US Core Simple Observation Profile
Data Requirement | Type: Observation Profile(s): US Core Smoking Status Observation Profile
Data Requirement | Type: Specimen Profile(s): US Core Specimen Profile
Data Requirement | Type: Observation Profile(s): US Core Vital Signs Profile
Parameters
Name | Use | Card. | Type | Documentation
Patient | Out | 0..1 | Patient |
Test AllergyIntolerance Profile | Out | 0..* | Resource |
Test BMI Profile | Out | 0..* | Resource |
Test Blood Pressure Profile | Out | 0..* | Resource |
Test Body Height Profile | Out | 0..* | Resource |
Test Body Temperature Profile | Out | 0..* | Resource |
Test Body Weight Profile | Out | 0..* | Resource |
Test CarePlan Profile | Out | 0..* | Resource |
Test CareTeam Profile | Out | 0..* | Resource |
Test Condition Encounter Diagnosis Profile | Out | 0..* | Resource |
Test Condition Problems and Health Concerns Profile | Out | 0..* | Resource |
Test Coverage Profile | Out | 0..* | Resource |
Test DiagnosticReport Profile for Laboratory Results Reporting | Out | 0..* | Resource |
Test DiagnosticReport Profile for Report and Note Exchange | Out | 0..* | Resource |
Test DocumentReference Profile | Out | 0..* | Resource |
Test Encounter Profile | Out | 0..* | Resource |
Test Goal Profile | Out | 0..* | Resource |
Test Head Circumference Profile | Out | 0..* | Resource |
Test Heart Rate Profile | Out | 0..* | Resource |
Test Immunization Profile | Out | 0..* | Resource |
Test Implantable Device Profile | Out | 0..* | Resource |
Test Laboratory Result Observation Profile | Out | 0..* | Resource |
Test Location Profile | Out | 0..* | Resource |
Test Medication Profile | Out | 0..* | Resource |
Test MedicationDispense Profile | Out | 0..* | Resource |
Test MedicationRequest Profile | Out | 0..* | Resource |
Test Observation Clinical Result Profile | Out | 0..* | Resource |
Test Observation Occupation Profile | Out | 0..* | Resource |
Test Observation Pregnancy Intent Profile | Out | 0..* | Resource |
Test Observation Pregnancy Status Profile | Out | 0..* | Resource |
Test Observation Screening Assessment Profile | Out | 0..* | Resource |
Test Observation Sexual Orientation Profile | Out | 0..* | Resource |
Test Organization Profile | Out | 0..* | Resource |
Test Patient Profile | Out | 0..* | Resource |
Test Pediatric BMI for Age Observation Profile | Out | 0..* | Resource |
Test Pediatric Head Occipital Frontal Circumference Percentile Profile | Out | 0..* | Resource |
Test Pediatric Weight for Height Observation Profile | Out | 0..* | Resource |
Test Practitioner Profile | Out | 0..* | Resource |
Test PractitionerRole Profile | Out | 0..* | Resource |
Test Procedure Profile | Out | 0..* | Resource |
Test Provenance Profile | Out | 0..* | Resource |
Test Pulse Oximetry Profile | Out | 0..* | Resource |
Test QuestionnaireResponse Profile | Out | 0..* | Resource |
Test RelatedPerson Profile | Out | 0..* | Resource |
Test Respiratory Rate Profile | Out | 0..* | Resource |
Test ServiceRequest Profile | Out | 0..* | Resource |
Test Simple Observation Profile | Out | 0..* | Resource |
Test Smoking Status Observation Profile | Out | 0..* | Resource |
Test Specimen Profile | Out | 0..* | Resource |
Test Vital Signs Profile | Out | 0..* | Resource |
TestPrimitives | Out | 0..1 | Patient |
TestChoice | Out | 0..1 | Patient |
Library Content
CQL Content |
    /*
    @description: This is a testing library used to validate capability of the CQL-to-ELM translator
    using the US Core model info.
    */
    library USCoreTests

    using FHIR version '4.0.1'
    using USCore version '7.0.0'

    include hl7.fhir.uv.cql.FHIRHelpers version '4.0.1' called FHIRHelpers

    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 "Test AllergyIntolerance Profile": ["AllergyIntolerance Profile"]
    define "Test BMI Profile": ["BMI Profile"]
    define "Test Blood Pressure Profile": ["Blood Pressure Profile"]
    define "Test Body Height Profile": ["Body Height Profile"]
    define "Test Body Temperature Profile": ["Body Temperature Profile"]
    define "Test Body Weight Profile": ["Body Weight Profile"]
    define "Test CarePlan Profile": ["CarePlan Profile"]
    define "Test CareTeam Profile": ["CareTeam Profile"]
    define "Test Condition Encounter Diagnosis Profile": ["Condition Encounter Diagnosis Profile"]
    define "Test Condition Problems and Health Concerns Profile": ["Condition Problems and Health Concerns Profile"]
    define "Test Coverage Profile": ["Coverage Profile"]
    define "Test DiagnosticReport Profile for Laboratory Results Reporting": ["DiagnosticReport Profile for Laboratory Results Reporting"]
    define "Test DiagnosticReport Profile for Report and Note Exchange": ["DiagnosticReport Profile for Report and Note Exchange"]
    define "Test DocumentReference Profile": ["DocumentReference Profile"]
    define "Test Encounter Profile": ["Encounter Profile"]
    define "Test Goal Profile": ["Goal Profile"]
    define "Test Head Circumference Profile": ["Head Circumference Profile"]
    define "Test Heart Rate Profile": ["Heart Rate Profile"]
    define "Test Immunization Profile": ["Immunization Profile"]
    define "Test Implantable Device Profile": ["Implantable Device Profile"]
    define "Test Laboratory Result Observation Profile": ["Laboratory Result Observation Profile"]
    define "Test Location Profile": ["Location Profile"]
    define "Test Medication Profile": ["Medication Profile"]
    define "Test MedicationDispense Profile": ["MedicationDispense Profile"]
    define "Test MedicationRequest Profile": ["MedicationRequest Profile"]
    define "Test Observation Clinical Result Profile": ["Observation Clinical Result Profile"]
    define "Test Observation Occupation Profile": ["Observation Occupation Profile"]
    define "Test Observation Pregnancy Intent Profile": ["Observation Pregnancy Intent Profile"]
    define "Test Observation Pregnancy Status Profile": ["Observation Pregnancy Status Profile"]
    define "Test Observation Screening Assessment Profile": ["Observation Screening Assessment Profile"]
    define "Test Observation Sexual Orientation Profile": ["Observation Sexual Orientation Profile"]
    define "Test Organization Profile": ["Organization Profile"]
    define "Test Patient Profile": ["Patient Profile"]
    define "Test Pediatric BMI for Age Observation Profile": ["Pediatric BMI for Age Observation Profile"]
    define "Test Pediatric Head Occipital Frontal Circumference Percentile Profile": ["Pediatric Head Occipital Frontal Circumference Percentile Profile"]
    define "Test Pediatric Weight for Height Observation Profile": ["Pediatric Weight for Height Observation Profile"]
    define "Test Practitioner Profile": ["Practitioner Profile"]
    define "Test PractitionerRole Profile": ["PractitionerRole Profile"]
    define "Test Procedure Profile": ["Procedure Profile"]
    define "Test Provenance Profile": ["Provenance Profile"]
    define "Test Pulse Oximetry Profile": ["Pulse Oximetry Profile"]
    define "Test QuestionnaireResponse Profile": ["QuestionnaireResponse Profile"]
    define "Test RelatedPerson Profile": ["RelatedPerson Profile"]
    define "Test Respiratory Rate Profile": ["Respiratory Rate Profile"]
    define "Test ServiceRequest Profile": ["ServiceRequest Profile"]
    define "Test Simple Observation Profile": ["Simple Observation Profile"]
    define "Test Smoking Status Observation Profile": ["Smoking Status Observation Profile"]
    define "Test Specimen Profile": ["Specimen Profile"]
    define "Test Vital Signs Profile": ["Vital Signs Profile"]

    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()
ELM XML Content |
    Encoded data
ELM JSON Content |
    Encoded data
Generated using version 0.5.3-cibuild of the sample-content-ig Liquid templates