forked from cqframework/cqf-exercises
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Exercises08.cql
38 lines (28 loc) · 1.11 KB
/
Exercises08.cql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
Advanced Queries
Multi-Source Queries
Let Clauses
*/
library Exercises08
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
codesystem "LOINC": 'http://loinc.org'
codesystem "ActCode": 'http://terminology.hl7.org/CodeSystem/v3-ActCode'
codesystem "MedicationRequestCategory": 'http://terminology.hl7.org/CodeSystem/medicationrequest-category'
codesystem "ObservationCategory": 'http://terminology.hl7.org/CodeSystem/observation-category'
valueset "Community Medication": 'http://example.org/fhir/ValueSet/community-medication'
valueset "Vital Sign": 'http://example.org/fhir/ValueSet/vital-sign'
valueset "Laboratory": 'http://example.org/fhir/ValueSet/laboratory'
code "Blood Glucose": '2339-0' from "LOINC" display 'Glucose Bld-mCnc'
// Act Codes
code "Inpatient Encounter": 'IMP' from "ActCode" display 'Inpatient Encounter'
/*
Write a query to return the greatest absolute difference between any pair of blood glucose results
*/
/*
Write a query to return the difference between pairs of quantitative results
for the same test
*/
/*
Write a query to return the average quantitative result for the same test
*/