Skip to content

Commit

Permalink
Additional QA from review
Browse files Browse the repository at this point in the history
  • Loading branch information
brynrhodes committed Mar 11, 2020
1 parent 91bcc37 commit 951c50f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 38 deletions.
76 changes: 40 additions & 36 deletions pages/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ Example source: EXM72_FHIR-8.1.0_TJC.cql

```sql
define "Condition of Intravenous or Intra arterial Thrombolytic (tPA) Therapy Prior to Arrival":
Condition: "Intravenous or Intra arterial Thrombolytic (tPA) Therapy Prior to Arrival"] PriorTPA
where clinicalStatus in { 'active', 'recurrence', 'relapse' }
Condition: "Intravenous or Intra arterial Thrombolytic (tPA) Therapy Prior to Arrival"] PriorTPA
where clinicalStatus in { 'active', 'recurrence', 'relapse' }
```

Note that verificationStatus is not being checked due to feedback received that it may be difficult for implementers to retrieve the element.
Expand All @@ -278,9 +278,9 @@ Example source: EXM108_FHIR

```sql
define "VTE Prophylaxis by Medication Administered":
["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"] VTEMedication
where VTEMedication.status = 'completed'
and VTEMedication.dosage.route in "Subcutaneous route"
["MedicationAdministration": medication in "Low Dose Unfractionated Heparin for VTE Prophylaxis"] VTEMedication
where VTEMedication.status = 'completed'
and VTEMedication.dosage.route in "Subcutaneous route"
```

#### 3.4.1 Medications at discharge
Expand All @@ -289,9 +289,9 @@ Example source: EXM104_FHIR-8.1.000_TJC.cql

```sql
define "Antithrombotic Therapy at Discharge":
["MedicationRequest": "Antithrombotic Therapy"] Antithrombotic
where exists (Antithrombotic.category C where FHIRHelpers.ToConcept(C) ~ "Discharge")
and Antithrombotic.intent = 'order'
["MedicationRequest": "Antithrombotic Therapy"] Antithrombotic
where exists (Antithrombotic.category C where FHIRHelpers.ToConcept(C) ~ "Discharge")
and Antithrombotic.intent = 'order'
```

Note that the FHIRHelpers.ToConcept usage is intended to be implicit and will be unnecessary once QUICK is fully supported.
Expand All @@ -300,10 +300,10 @@ Note that the FHIRHelpers.ToConcept usage is intended to be implicit and will be

```sql
define "Antithrombotic Not Given at Discharge":
["MedicationRequest": "Antithrombotic Therapy"] NoAntithromboticDischarge
where NoAntithromboticDischarge.doNotPerform is true
and (singleton from NoAntithromboticDischarge.reasonCode in "Medical Reason"
or singleton from NoAntithromboticDischarge.reasonCode in "Patient Refusal")
["MedicationRequest": "Antithrombotic Therapy"] NoAntithromboticDischarge
where NoAntithromboticDischarge.doNotPerform is true
and (singleton from NoAntithromboticDischarge.reasonCode in "Medical Reason"
or singleton from NoAntithromboticDischarge.reasonCode in "Patient Refusal")
```

#### 3.4.3 Medication not administered
Expand Down Expand Up @@ -335,11 +335,12 @@ Example source: EXM108_FHIR

```sql
define "Intervention Comfort Measures":
(["ServiceRequest": "Comfort Measures"] P
where P.intent = 'order')
union
(["Procedure": "Comfort Measures"] IntervetionPerformed
where IntervetionPerformed.status = 'completed')
(["ServiceRequest": "Comfort Measures"] P
where P.intent = 'order'
)
union (["Procedure": "Comfort Measures"] InterventionPerformed
where InterventionPerformed.status in {'completed', 'in-progress'}
)
```

#### 3.5.1 Device Use
Expand All @@ -348,37 +349,40 @@ Example source: EXM108_FHIR

```sql
define "VTE Prophylaxis by Device Applied":
(
["DeviceUseStatement": code in "Intermittent pneumatic compression devices (IPC)"]
union ["DeviceUseStatement": code in "Venous foot pumps (VFP)"]
union ["DeviceUseStatement": code in "Graduated compression stockings (GCS)"]
) DeviceApplied
where DeviceApplied.status = 'completed'
```
["Procedure": "Device Application"] DeviceApplied
where DeviceApplied.status = 'complete'
and (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"
or DeviceApplied.usedCode in"Venous foot pumps (VFP)"
or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"
)
```

#### 3.5.2 Device Not Used

Example source: EXM108_FHIR

```sql
define "No VTE Prophylaxis Device Applied":
(["DeviceUseStatement": code in "Venous foot pumps (VFP)"]
union ["DeviceUseStatement": code in "Intermittent pneumatic compression devices (IPC)"]
union ["DeviceUseStatement": code in "Graduated compression stockings (GCS)"]
) DeviceApplied
where GetExtension(DeviceApplied.extension, 'http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-deviceusestatement-notDone').value is true
["Procedure": "Device Application"] DeviceApplied
let DeviceNotDoneTiming: Global.GetExtension(DeviceApplied, 'qicore-recorded').value
where (DeviceApplied.usedCode in "Intermittent pneumatic compression devices (IPC)"
or DeviceApplied.usedCode in "Venous foot pumps (VFP)"
or DeviceApplied.usedCode in "Graduated compression stockings (GCS)"
)
and DeviceApplied.status = 'not-done'
return {id: DeviceApplied.id, requestStatusReason: DeviceApplied.statusReason, authoredOn: DeviceNotDoneTiming}
```

#### 3.5.3 Device Not Ordered

Example source: EXM108_FHIR

```sql
define "No VTE Prophylaxis Device Ordered":
["DeviceRequest": code in "Venous foot pumps (VFP)"]
union ["DeviceRequest": code in "Intermittent pneumatic compression devices (IPC)"]
union ["DeviceRequest": code in "Graduated compression stockings (GCS)"]
) DevideOrder
where DevideOrder.intent = 'Order'
and GetExtension(DevideOrder.extension, 'http://hl7.org/fhir/StructureDefinition/request-doNotPerform').value is true
define "No VTE Prophylaxis Device Order":
(["ServiceRequest": "Venous foot pumps (VFP)"]
union ["ServiceRequest": "Intermittent pneumatic compression devices (IPC)"]
union ["ServiceRequest": "Graduated compression stockings (GCS)"]
) DeviceOrder
where DeviceOrder.status = 'completed'
and DeviceOrder.doNotPerform is true
```
4 changes: 2 additions & 2 deletions pages/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ any, and the underlying FHIR resources:
|[QICoreImmunizationEvaluation](StructureDefinition-qicore-immunizationevaluation.html)| |[ImmunizationEvaluation]({{site.data.fhir.path}}immunizationevaluation.html)|
|[QICoreImmunizationNotDone](StructureDefinition-qicore-immunizationnotdone.html)| |[Immunization]({{site.data.fhir.path}}immunization.html)|
|[QICoreImmunizationRecommendation](StructureDefinition-qicore-immunizationrec.html)| |[ImmunizationRecommendation]({{site.data.fhir.path}}immunizationrecommendation.html)|
| | [USCoreImplantableDevice](http://hl7.org/fhir/us/core/StructureDefinition-us-core-implantable-device.html) |[Device]({{site.data.fhir.path}}device.html)|
| | [USCoreImplantableDeviceProfile](http://hl7.org/fhir/us/core/StructureDefinition-us-core-implantable-device.html) |[Device]({{site.data.fhir.path}}device.html)|
|[QICoreLocation](StructureDefinition-qicore-location.html)| [USCoreLocation](http://hl7.org/fhir/us/core/StructureDefinition-us-core-location.html) |[Location]({{site.data.fhir.path}}location.html)|
|[QICoreMedication](StructureDefinition-qicore-medication.html)| [USCoreMedication](http://hl7.org/fhir/us/core/StructureDefinition-us-core-medication.html) |[Medication]({{site.data.fhir.path}}medication.html)|
|[QICoreMedicationAdministration](StructureDefinition-qicore-medicationadministration.html)| |[MedicationAdministration]({{site.data.fhir.path}}medicationadministration.html)|
|[QICoreMedicationAdministrationNotDone](StructureDefinition-qicore-mednotadministered.html)| |[MedicationAdministration]({{site.data.fhir.path}}medicationadministration.html)|
|[QICoreMedicationDispense](StructureDefinition-qicore-medicationdispense.html)| |[MedicationDispense]({{site.data.fhir.path}}medicationdispense.html)|
|[QICoreMedicationNotDispensed](StructureDefinition-qicore-medicationnotdispensed.html)| |[MedicationDispense]({{site.data.fhir.path}}medicationdispense.html)|
|[QICoreMedicationDispenseNotDone](StructureDefinition-qicore-medicationnotdispensed.html)| |[MedicationDispense]({{site.data.fhir.path}}medicationdispense.html)|
|[QICoreMedicationNotRequested](StructureDefinition-qicore-medicationnotrequested.html)| |[MedicationRequest]({{site.data.fhir.path}}medicationrequest.html)|
|[QICoreMedicationRequest](StructureDefinition-qicore-medicationrequest.html)| [USCoreMedicationRequest](http://hl7.org/fhir/us/core/StructureDefinition-us-core-medicationrequest.html) |[MedicationRequest]({{site.data.fhir.path}}medicationrequest.html)|
|[QICoreMedicationStatement](StructureDefinition-qicore-medicationstatement.html)| |[MedicationStatement]({{site.data.fhir.path}}medicationstatement.html)|
Expand Down

0 comments on commit 951c50f

Please sign in to comment.