I’m trying to build the following workflow:
- Define a number of ActivityDefinitions. Primarily defining Tasks, but also potentially Appointments, or ServiceRequests
- Create PlanDefinitions referencing these ActivityDefinitions
- Apply these PlanDefinitions into a CarePlan, with the corresponding resources specified in the ActivityDefinitions created.
When I tested this out, using both the $apply operation, and Apply from the UI I noticed a few assumptions/behaviors that made this work differently than I anticipated:
- A RequestGroup was created rather than a CarePlan
- Only Tasks were created
- The tasks created only contained properties from whatever was specified inline on the PlanDefinition. It wasn’t able to look up properties from the linked ActivityDefinition
Is there a different approach to achieve what I’m after- being able to build Care Plans with a standardized set on Actions? Am I over-complicating things?