Last active
March 25, 2021 02:01
-
-
Save louismullie/23d128c93e4bd0a2ecd8c09d5cf975db to your computer and use it in GitHub Desktop.
coda19-dashboard-requests
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
// Requête no. 1 | |
{ | |
"header": {}, | |
"body": { | |
"selectors": [ | |
{ | |
"resource": "Patient", | |
"filters": [ | |
{ "path": "code", | |
"operator": "matches", | |
"value": { | |
"coding": [{ "system": "http://loinc.org", "code": "94531-1" }] | |
} | |
}, | |
], | |
"fields": [] | |
}], | |
"options": { | |
"measures": { | |
"categorical": [ "count"] | |
} | |
} | |
} | |
} | |
// Requête no. 2 | |
{ | |
"header": {}, | |
"body": { | |
"selectors": [ | |
{ | |
"resource": "Observation", | |
"filters": [ | |
{ "path": "code", | |
"operator": "matches", | |
"value": { | |
"coding": [{ "system": "http://loinc.org", "code": "94531-1" }] | |
} | |
}, | |
{ "path": "interpretation", | |
"operator": "matches", | |
"value": { | |
"interpretation": [{ | |
"coding": [{ "system": "http://snomed.info/sct", "code": "10828004" }] | |
}] | |
} | |
} | |
], | |
"fields": [] | |
}], | |
"options": { | |
"measures": { | |
"categorical": [ "count"] | |
} | |
} | |
} | |
} | |
// Requête no. 3 | |
{ | |
"header": {}, | |
"body": { | |
"selectors": [ | |
{ | |
"resource": "Patient", | |
"filters": [ | |
{ "path": "deceasedBoolean", | |
"operator": "matches", | |
"value": true | |
}, | |
{ "path": "deceasedDateTime", | |
"operator": "on", | |
"value": "YYYY-MM-DD" | |
}, | |
] | |
"fields": [] | |
}], | |
"options": { | |
"measures": { | |
"categorical": [ "count"] | |
} | |
} | |
} | |
} | |
// Requête no. 4.1 (get positive tests) | |
{ | |
"header": {}, | |
"body": { | |
"selectors": [ | |
{ | |
"resource": "Observation", | |
"filters": [ | |
{ "path": "code", | |
"operator": "matches", | |
"value": { | |
"coding": [{ "system": "http://loinc.org", "code": "94531-1" }] | |
} | |
}, | |
{ "path": "interpretation", | |
"operator": "matches", | |
"value": { | |
"interpretation": [{ | |
"coding": [{ "system": "http://snomed.info/sct", "code": "10828004" }] | |
}] | |
} | |
} | |
], | |
"fields": [] | |
}], | |
"options": { | |
"measures": { | |
"categorical": [ "count"] | |
}, | |
"breakdown": { | |
"resource": { | |
"type": "Observation", | |
"field": "issued" | |
}, | |
"slices": { | |
"min": timestamp(period_start), | |
"max": timestamp(period_end), | |
"step": 1209600, | |
"units": "seconds" | |
} | |
} | |
} | |
} | |
} | |
// Requête no. 4.2 (get total tests) | |
// Same as 4.1 but remove positive interpretation condition. | |
// Requête no. 5 | |
// Same as 4.1 | |
// Requête no. 6 | |
{ | |
"header": { }, | |
"body": { | |
"selectors": [ | |
{ | |
"resource": "Encounter", | |
"filters": [ { | |
"path": "period.start", | |
"operator": "after", | |
"value": "YYYY-MM-DDThh:mm:ss+zz:zz", | |
}], | |
"fields": [] | |
} | |
], | |
"joins": [ | |
{ | |
"resource": "Location", | |
"filters": [ { | |
"path": "type", | |
"operator": "matches", | |
"value": { | |
"coding": [ | |
{ | |
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", | |
"code": "ICU" | |
} | |
] | |
], | |
"fields": [] | |
} | |
], | |
"options": { | |
"measures": { | |
"categorical": [ "count"] | |
}, | |
"breakdown": { | |
"resource": { | |
"type": "Encounter", | |
"field": "period.start" | |
}, | |
"slices": { | |
"min": timestamp(period_start), | |
"max": timestamp(period_end), | |
"step": 1209600, | |
"units": "seconds" | |
} | |
} | |
} | |
} | |
} | |
// Requête no. 7 | |
// Denominators are hard-coded per site | |
{ | |
"header": { }, | |
"body": { | |
"selectors": [ | |
{ | |
"resource": "Encounter", | |
"filters": [ { | |
"path": "period.start", | |
"operator": "after", | |
"value": "YYYY-MM-DDThh:mm:ss+zz:zz", | |
}], | |
"fields": [] | |
} | |
], | |
"joins": [ | |
{ | |
"resource": "Location", | |
"filters": [ { | |
"path": "type", | |
"operator": "matches", | |
"value": { | |
"coding": [ | |
{ | |
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", | |
"code": "ICU" | |
} | |
] | |
} ], | |
"fields": [] | |
} | |
], | |
"options": { | |
"measures": { | |
"categorical": [ "count"] | |
} | |
} | |
} | |
} | |
// Requête no. 8 | |
// Same as no. 7, but change Location code to HU (hospital unit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment