-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specify data endpoint when invoking $apply on a PlanDefinition (#1982)
* Specify data endpoint when invoking on a PlanDefinition * Updated test case so that the url does not contain 'localhost'
- Loading branch information
1 parent
c07e7b8
commit 244fedc
Showing
6 changed files
with
172 additions
and
1 deletion.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
...low-testing/src/main/resources/plan-definition/cql-applicability-condition/care_plan.json
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,60 @@ | ||
{ | ||
"resourceType": "CarePlan", | ||
"contained": [ | ||
{ | ||
"resourceType": "RequestGroup", | ||
"id": "Plan-Definition-Example", | ||
"instantiatesCanonical": [ | ||
"http://example.com/PlanDefinition/Plan-Definition-Example" | ||
], | ||
"status": "draft", | ||
"intent": "proposal", | ||
"subject": { | ||
"reference": "Patient/Female-Patient-Example" | ||
}, | ||
"action": [ | ||
{ | ||
"resource": { | ||
"reference": "Task" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"resourceType": "Task", | ||
"id": "Task", | ||
"extension": [ | ||
{ | ||
"url": "http://hl7.org/fhir/aphl/StructureDefinition/condition", | ||
"valueExpression": { | ||
"language": "text/cql.identifier", | ||
"expression": "Patient is Female" | ||
} | ||
} | ||
], | ||
"basedOn": [ | ||
{ | ||
"reference": "#RequestGroup/Plan-Definition-Example", | ||
"type": "RequestGroup" | ||
} | ||
], | ||
"status": "draft", | ||
"description": "Example Task" | ||
} | ||
], | ||
"instantiatesCanonical": [ | ||
"http://example.com/PlanDefinition/Plan-Definition-Example" | ||
], | ||
"status": "draft", | ||
"intent": "proposal", | ||
"subject": { | ||
"reference": "Patient/Female-Patient-Example" | ||
}, | ||
"activity": [ | ||
{ | ||
"reference": { | ||
"reference": "#Plan-Definition-Example" | ||
} | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
...-testing/src/main/resources/plan-definition/cql-applicability-condition/example-1.0.0.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,9 @@ | ||
library example version '1.0.0' | ||
using FHIR version '4.0.1' | ||
include FHIRHelpers version '4.0.1' | ||
|
||
context Patient | ||
|
||
define "Patient is Female": Patient.gender = 'female' | ||
|
||
define "Get Task Description": 'Example Task' |
24 changes: 24 additions & 0 deletions
24
workflow-testing/src/main/resources/plan-definition/cql-applicability-condition/patient.json
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,24 @@ | ||
{ | ||
"resourceType": "Bundle", | ||
"entry": [ | ||
{ | ||
"resource": { | ||
"resourceType": "Patient", | ||
"id": "Female-Patient-Example", | ||
"active": true, | ||
"name": [ | ||
{ | ||
"use": "official", | ||
"family": "Kensington", | ||
"given": [ | ||
"Amelia" | ||
] | ||
} | ||
], | ||
"gender": "female", | ||
"birthDate": "1986-03-18", | ||
"deceasedBoolean": false | ||
} | ||
} | ||
] | ||
} |
54 changes: 54 additions & 0 deletions
54
...sting/src/main/resources/plan-definition/cql-applicability-condition/plan_definition.json
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,54 @@ | ||
{ | ||
"resourceType": "Bundle", | ||
"type": "transaction", | ||
"entry": [ | ||
{ | ||
"resource": { | ||
"resourceType": "ActivityDefinition", | ||
"id": "Activity-Example", | ||
"url": "http://example.com/ActivityDefinition/Activity-Example", | ||
"status": "active", | ||
"kind": "Task", | ||
"library": [ | ||
"http://example.com/Library/example|1.0.0" | ||
], | ||
"dynamicValue": [ | ||
{ | ||
"path": "description", | ||
"expression": { | ||
"language": "text/cql.identifier", | ||
"expression": "Get Task Description" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"resource": { | ||
"resourceType": "PlanDefinition", | ||
"id": "Plan-Definition-Example", | ||
"url" : "http://example.com/PlanDefinition/Plan-Definition-Example", | ||
"status": "active", | ||
"type": "workflow-definition", | ||
"library": [ | ||
"http://example.com/Library/example|1.0.0" | ||
], | ||
"action": [ | ||
{ | ||
"title": "Test for Female Patient", | ||
"definitionCanonical": "http://example.com/ActivityDefinition/Activity-Example", | ||
"condition": [ | ||
{ | ||
"kind": "applicability", | ||
"expression": { | ||
"language": "text/cql.identifier", | ||
"expression": "Patient is Female" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
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