CPG Example
0.1.0 - CI Build
CPG Example, 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/cpg-example/ and changes regularly. See the Directory of published versions
The activity examples in this implementation guide provide simplified recommendations for each type of activity to support demonstration applications.
A recommendation that a patient should receive an apple a day.
This recommendation is intentionally simplified to support demonstration applications. In particular, the logic considers an active
MedicationRequest for a medication in the Apple
value set to be sufficient to meet the intent of the recommendation. In other words, the logic does not attempt to track medication dispensing or adherence. Demonstration applications can (and should) take the additional step of demonstrating the dispense of a medication.
The DailyAppleRecommendation PlanDefinition applies if the patient is active and does not have an active order for a daily apple, or an active order not to prescribe a daily apple.
The service examples in this implementation guide provide illustrations of the use of PlanDefinition to describe services where the logic is not expressed in a computable and shareable way, only the inputs and outputs of the service are described. For these examples, the PlanDefinition/$apply operation can still be used, but the implementation of the service is not shareable.
A service that returns a set of possible indications, given patient data.
Input: Male 50yo, BMI=35, shortness of breath, chest pain that worsens with deep breathin, impaired kidney function Output: Possible indications will be
$apply:
Parameter | Value | Description |
---|---|---|
subject | Patient/X | A reference to a Patient resource created to provide the age and gender of the patient. This does not necessarily correspond to a Patient on the server or even an actual Patient, it is used to convey the information about the subject and provide a reference for the information provided to the service. |
data | Bundle | Data provided to the service for evaluation. This example uses the single-bundle approach, but prefetch information can be used to specify more granular breakdowns of the input data to the service. |
return | Bundle | Bundle containing a RequestGroup and the resulting propose-diagnosis tasks |
POST [base]/PlanDefinition/GetDiagnoses/$apply
Body
{
"resourceType": "Parameters",
"id": "input",
"parameter": [
{
"name": "subject",
"valueString": "Patient/X"
},
{
"name": "data",
"valueResource": {
"resourceType": "Bundle",
"id": "getdiagnoses-data",
...
}
}
]
}
{
"resourceType": "Parameters",
"id": "output",
"parameter": [
{
"name": "return",
"valueResource": {
"resourceType": "Bundle",
"id": "getdiagnoses-return",
...
}
}
]
}
$apply:
Parameter | Value | Description |
---|---|---|
subject | Patient/X | A reference to a Patient resource created to provide the age and gender of the patient. This does not necessarily correspond to a Patient on the server or even an actual Patient, it is used to convey the information about the subject and provide a reference for the information provided to the service. |
data | Bundle | Data provided to the service for evaluation. This example uses the single-bundle approach, but prefetch information can be used to specify more granular breakdowns of the input data to the service. |
return | Bundle | Bundle containing a RequestGroup and the resulting collect-information task |
POST [base]/PlanDefinition/GetDataToCollect/$apply
Body
{
"resourceType": "Parameters",
"id": "input",
"parameter": [
{
"name": "subject",
"valueString": "Patient/Y"
},
{
"name": "data",
"valueResource": {
"resourceType": "Bundle",
"id": "getdatatocollect-data",
...
}
}
]
}
{
"resourceType": "Parameters",
"id": "output",
"parameter": [
{
"name": "return",
"valueResource": {
"resourceType": "Bundle",
"id": "getdatatocollect-return",
...
}
}
]
}
$apply:
Parameter | Value | Description |
---|---|---|
subject | Patient/X | A reference to a Patient resource created to provide the age and gender of the patient. This does not necessarily correspond to a Patient on the server or even an actual Patient, it is used to convey the information about the subject and provide a reference for the information provided to the service. |
data | Bundle | Data provided to the service for evaluation. This example uses the single-bundle approach, but prefetch information can be used to specify more granular breakdowns of the input data to the service. |
return | Bundle | Bundle containing a RequestGroup and the resulting proposed medications and orders |
POST [base]/PlanDefinition/GetRecommendations/$apply
Body
{
"resourceType": "Parameters",
"id": "input",
"parameter": [
{
"name": "subject",
"valueString": "Patient/X"
},
{
"name": "data",
"valueResource": {
"resourceType": "Bundle",
"id": "getrecommendations-data",
...
}
}
]
}
{
"resourceType": "Parameters",
"id": "output",
"parameter": [
{
"name": "return",
"valueResource": {
"resourceType": "Bundle",
"id": "getrecommendations-return",
...
}
}
]
}