-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from cqframework/fix-library-reference-scope-…
…issue Fixed an issue with data requirements processing resulting in a NullP…
- Loading branch information
Showing
11 changed files
with
1,019 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.../test/resources/org/cqframework/cql/elm/requirements/fhir/WithDependencies/BSElements.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Context-independent Data Elements. (e.g., the Retrieves, to be used in more than one context.) */ | ||
|
||
library BSElements version '1.0.000' | ||
|
||
using FHIR version '4.0.1' | ||
|
||
include FHIRCommon version '4.0.1' called FHIRCommon | ||
include FHIRHelpers version '4.0.1' called FHIRHelpers | ||
include CommonConcepts version '1.0.000' called CommonCx | ||
include CommonElements version '1.0.000' called CommonEl | ||
|
||
include Ind2E31A37EB104A7D1 version '1.0.000' called Ind2E31A37EB104A7D1 | ||
|
||
context Patient | ||
|
||
define "4. Biliopancreatic bypass with duodenal switch in patients ages greater than or equal to 18 years with BMI greater than or equal to 50 kg/(meter squared)": | ||
Ind2E31A37EB104A7D1."4. Biliopancreatic bypass with duodenal switch in patients ages greater than or equal to 18 years with BMI greater than or equal to 50 kg/(meter squared)" |
67 changes: 67 additions & 0 deletions
67
...t/resources/org/cqframework/cql/elm/requirements/fhir/WithDependencies/CommonConcepts.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* Common Terminology */ | ||
library CommonConcepts version '1.0.000' | ||
|
||
using FHIR version '4.0.1' | ||
|
||
codesystem "ConditionVerificationStatusCodes": 'http://terminology.hl7.org/CodeSystem/condition-ver-status' | ||
|
||
valueset "Severe Pain Valueset": 'http://example.com/fhir/ValueSet/rc-severePain' | ||
valueset "Functional Disability Valueset": 'http://example.com/fhir/ValueSet/rc_functionalDisabilityDJD' | ||
valueset "Active Condition": 'http://fhir.org/guides/cqf/common/ValueSet/active-condition' | ||
|
||
valueset "ro_bodyMassIndex_kg_per_m2": 'http://example.com/fhir/ValueSet/ro_bodyMassIndex_kg_per_m2' | ||
valueset "ro_weight_kg": 'http://example.com/fhir/ValueSet/ro_weight_kg' | ||
valueset "ro_weight_lb": 'http://example.com/fhir/ValueSet/ro_weight_lb' | ||
valueset "ro_height_in": 'http://example.com/fhir/ValueSet/ro_height_in' | ||
valueset "ro_height_cm": 'http://example.com/fhir/ValueSet/ro_height_cm' | ||
valueset "rc_diabetesMellitusChronic": 'http://example.com/fhir/ValueSet/rc_diabetesMellitusChronic' | ||
valueset "rc_coronaryArteryDisease": 'http://example.com/fhir/ValueSet/rc_coronaryArteryDisease' | ||
valueset "rc_hypertension_cambia": 'http://example.com/fhir/ValueSet/rc_hypertension_cambia' | ||
valueset "rc_obstructiveSleepApnea": 'http://example.com/fhir/ValueSet/rc_obstructiveSleepApnea' | ||
valueset "rc_perforationOfStomach_cambia": 'http://example.com/fhir/ValueSet/rc_perforationOfStomach_cambia' | ||
valueset "rc_gastricMucosalErosion_cambia": 'http://example.com/fhir/ValueSet/rc_gastricMucosalErosion_cambia' | ||
valueset "rp_sleeveGastrectomy_cambia": 'http://example.com/fhir/ValueSet/rp_sleeveGastrectomy_cambia' | ||
valueset "rp_initialAdjustableGastricBanding_cambia": 'http://example.com/fhir/ValueSet/rp_initialAdjustableGastricBanding_cambia' | ||
valueset "rp_initialGastricBypassRouxEnYAnastomosis_cambia": 'http://example.com/fhir/ValueSet/rp_initialGastricBypassRouxEnYAnastomosis_cambia' | ||
valueset "rc_gastricBandComplication_cambia": 'http://example.com/fhir/ValueSet/rc_gastricBandComplication_cambia' | ||
valueset "rp_gastricBandAdjustment_cambia": 'http://example.com/fhir/ValueSet/rp_gastricBandAdjustment_cambia' | ||
valueset "rc_gastricFistula_cambia": 'http://example.com/fhir/ValueSet/rc_gastricFistula_cambia' | ||
valueset "rc_gastricSmallBowelObstructionAcquired_cambia": 'http://example.com/fhir/ValueSet/rc_gastricSmallBowelObstructionAcquired_cambia' | ||
valueset "rc_gastricBandInfection_cambia": 'http://example.com/fhir/ValueSet/rc_gastricBandInfection_cambia' | ||
valueset "rc_esophagitis_cambia": 'http://example.com/fhir/ValueSet/rc_esophagitis_cambia' | ||
valueset "rc_barrettEsophagus": 'http://example.com/fhir/ValueSet/rc_barrettEsophagus' | ||
valueset "rc_gastrojejunalUlcer_cambia": 'http://example.com/fhir/ValueSet/rc_gastrojejunalUlcer_cambia' | ||
valueset "rp_biliopancreaticDiversionWithDuodenalSwitch_cambia": 'http://example.com/fhir/ValueSet/rp_biliopancreaticDiversionWithDuodenalSwitch_cambia' | ||
|
||
/* Duplicates */ | ||
/* | ||
valueset "rp_sleeveGastrectomy_cambia": 'http://example.com/fhir/ValueSet/rp_sleeveGastrectomy_cambia' | ||
valueset "rp_initialAdjustableGastricBanding_cambia": 'http://example.com/fhir/ValueSet/rp_initialAdjustableGastricBanding_cambia' | ||
valueset "rp_initialGastricBypassRouxEnYAnastomosis_cambia": 'http://example.com/fhir/ValueSet/rp_initialGastricBypassRouxEnYAnastomosis_cambia' | ||
valueset "rp_initialGastricBypassRouxEnYAnastomosis_cambia": 'http://example.com/fhir/ValueSet/rp_initialGastricBypassRouxEnYAnastomosis_cambia' | ||
valueset "rp_sleeveGastrectomy_cambia": 'http://example.com/fhir/ValueSet/rp_sleeveGastrectomy_cambia' | ||
valueset "rp_initialAdjustableGastricBanding_cambia": 'http://example.com/fhir/ValueSet/rp_initialAdjustableGastricBanding_cambia' | ||
valueset "rp_initialGastricBypassRouxEnYAnastomosis_cambia": 'http://example.com/fhir/ValueSet/rp_initialGastricBypassRouxEnYAnastomosis_cambia' | ||
*/ | ||
/* End of Duplicates */ | ||
|
||
/* | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
valueset "": 'http://example.com/fhir/ValueSet/' | ||
*/ | ||
|
||
code "condition-confirmed": 'confirmed' from "ConditionVerificationStatusCodes" display 'confirmed' |
22 changes: 22 additions & 0 deletions
22
...t/resources/org/cqframework/cql/elm/requirements/fhir/WithDependencies/CommonElements.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* Context-independent Data Elements. (e.g., the Retrieves, to be used in more than one context.) */ | ||
library CommonElements version '1.0.000' | ||
|
||
using FHIR version '4.0.1' | ||
|
||
include FHIRHelpers version '4.0.1' called FHIRHelpers | ||
include CommonConcepts version '1.0.000' called Cx | ||
|
||
context Patient | ||
|
||
/* Potentially "Common" elements */ | ||
define "sVitalSigns": | ||
[Observation: category in 'vital-sign'] | ||
|
||
define function "Get Active Confirmed Conditions" (value List<Condition>) returns List<Condition>: | ||
value C | ||
where C.clinicalStatus in Cx."Active Condition" | ||
and C.verificationStatus ~ ToConcept(Cx."condition-confirmed") | ||
|
||
define function "Get Qualified Observations" (value List<Observation>) returns List<Observation>: | ||
value O | ||
where O.status in { 'final', 'amended', 'corrected', 'appended' } |
Oops, something went wrong.