How to run $apply on Android #309
Replies: 2 comments
-
(copied from Francis post on #fhir slack channel) Prospective CarePlan By default would include workflow steps and guideline recommendations => API to filter out workflow tasks (process steps) CarePlan of Record Intermediate [transient] CarePlan |
Beta Was this translation helpful? Give feedback.
-
More on the CarePlan generation is discussed here From the preliminary research, the CarePlan generation can take two approaches
The result of this operation is a CarePlan resource with a single activity represented by a RequestGroup. The RequestGroup will have actions for each of the applicable actions in the plan based on evaluating the applicability condition in context. More on this operation as currently implemented here |
Beta Was this translation helpful? Give feedback.
-
We would like to explore ways on which we can run the $apply operation natively on Android to be able to dynamically generate:
From either a :
For the above scenarios, we can have the following mechanisms supported from the FHIR spec
A. Operation $apply on ActivityDefinition can be run using the following on server side (HAPI FHIR) :
In Parameters:
Out Parameters:
The result of invoking this operation is a resource of the type specified by the activity definition, with all the definitions resolved as appropriate for the type of resource. Any dynamicValue elements will be evaluated (in the order in which they appear in the resource) and the results applied to the returned resource. If the ActivityDefinition includes library references, those libraries will be available to the evaluated expressions. If those libraries have parameters, those parameters will be bound by name to the parameters given to the operation. In addition, parameters to the $apply operation are available within dynamicValue expressions as context variables, accessible by the name of the parameter, prefixed with a percent (%) symbol. For a more detailed description, refer to the ActivityDefinition resource
B. Operation $apply on PlanDefinition can be run using the following urls on server side (HAPI FHIR):
In Parameters:
Out Parameters:
The result of this operation is a CarePlan resource with a single activity represented by a RequestGroup. The RequestGroup will have actions for each of the applicable actions in the plan based on evaluating the applicability condition in context. For each applicable action, the definition is applied as described in the $apply operation of the ActivityDefinition resource, and the resulting resource is added as an activity to the CarePlan. If the ActivityDefinition includes library references, those libraries will be available to the evaluated expressions. If those libraries have parameters, those parameters will be bound by name to the parameters given to the operation. In addition, parameters to the $apply operation are available within dynamicValue expressions as context variables, accessible by the name of the parameter, prefixed with a percent (%) symbol.
Beta Was this translation helpful? Give feedback.
All reactions