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/ExamplePatientAndCoverageInitialExpressions Version: 0.1.0
Draft as of 2024-11-18 Computable Name: ExamplePatientAndCoverageInitialExpressions
Id: ExamplePatientAndCoverageInitialExpressions
Version: 0.1.0
Url: ExamplePatientAndCoverageInitialExpressions
Status: draft
Date: 2024-11-18 00:51:22+0000
Publisher: Clinical Quality Framework
Jurisdiction: 840
Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientResource01Out
Patient Namestring01Out
Date of Birthdate01Out
Birth SexResource01Out
Medical Record Numberstring01Out
Phone Numberstring01Out
Email Addressstring01Out
Addressstring0*Out
Citystring0*Out
Statestring0*Out
Postal Codestring0*Out
Member IDstring01Out
Policy NumberIdentifier01Out
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
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;;
Coverage http://hl7.org/fhir/StructureDefinition/Coverage ;;;;
Coverage http://hl7.org/fhir/StructureDefinition/Coverage ;;;;
Coverage http://hl7.org/fhir/StructureDefinition/Coverage ;;;;
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
Patient http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient ;
Coverage http://hl7.org/fhir/StructureDefinition/Coverage ;;;;
Coverage http://hl7.org/fhir/StructureDefinition/Coverage ;;;;
Content: text/cql
library ExamplePatientAndCoverageInitialExpressions version '0.1.0'

using USCore version '3.1.1'
using FHIR version '4.0.1'

include FHIRHelpers version '4.1.0'
include USCoreCommon version '0.1.0' called UC
include USCoreElements version '0.1.0' called UCE

codesystem "Identifier Type": 'http://terminology.hl7.org/CodeSystem/v2-0203'

code "Member Number": 'MB' from "Identifier Type"
code "Subscriber Number": 'SN' from "Identifier Type"

context Patient

// Patient

define "Patient Name":
  UCE."Name - First Middle(s) Last"

define "Date of Birth":
  Patient.birthDate

define "Birth Sex":
  Patient.birthsex

define "Medical Record Number":
  UCE."Medical Record Number"

define "Phone Number":
  UC.Mobile(Patient.telecom).value

define "Email Address":
  UC.Email(Patient.telecom).value

// TODO: Error: Could not resolve data provider for package 'java.util'.
// define "Address":
//   (singleton from Patient.address).line
define "Address":
  { 'TODO: remove hard-coded address' }

define "City":
  Patient.address.city

define "State":
  Patient.address.state

define "Postal Code":
  Patient.address.postalCode

// Coverage

// TODO DM 20240921: Why doesn't this populate in test results when executing CQL? Member ID=null
// TODO: is there a need to check for coverage period and order? also, do we need to check that the payor organization is the same as the source of the prior auth form?
define "Member ID":
  UCE."Member ID"

// TODO DM 20240921: Why doesn't this populate in test results when executing CQL? Policy Number=null
// TODO: is there a need to check for coverage period and order? also, do we need to check that the payor organization is the same as the source of the prior auth form?
define "Policy Number":
  UCE."Policy Number"
Content: application/elm+xml
Encoded data (27464 characters)
Content: application/elm+json
Encoded data (46056 characters)