CarePlan with conditions
# support
d
Hello, does someone have some example data for creating careplans with conditional actions? Like only require an action if previous action has a defined value or something like that? I cannot find any example data for more complex careplans and would like to know what is the best practice to create these.
r
@alexkg is very knowledgable!
a
@denniscod We never did any CarePlans with conditional Actions in the CarePlan. We left those in the PlanDefinition + ActivityDefinition. E.g. PD/AD says Patient should be screened for Cancer if patient is 55-80 years old and a smoker Then AD template used to add Screening to CarePlan PD/AD represents next steps depending on which condition is met The CarePlan is ONLY updated with the expected action
You could extend CarePlan for your use case, or use PD/AD to represent the activities in a UI. We had plans to provide UI views that would show the plan and the recommendations in a single UI despite the custom plan being derived from the CarePlan and the possible steps getting represented in the PD/AD
r
@denniscod I will also point you to the RequestGroup resource (https://hl7.org/fhir/R4/requestgroup.html) The
RequestGroup.action
can be used to define groups of actions that have timing, mutex, or other dependencies. You can express complex dependencies here, at the expense of complex data definitions. This
RequestGroup
can be then used as a
CarePlan.activity
.
However, my knowledge on this is mainly theoretical. I'll let @alexkg comment on his real-world experience with
RequestGroup
a
Rahul's right, but we never did that in practice. We only used the RequestGroup as a container for the returned activity that's recommended based on the decision support artifact - the PlanDefinition + ActivityDefinitions
d
Thanks all, I will dig into this. How are you creating this Plan Definitions and Activity Defintions. Did you make a UI for that or are you creating them all by hand in JSON format, or with the Medplum UI that is provided. We would like to create a UI builder for these Care Plan / Definitions, so you can easily build such a Definition
r
@denniscod we have a simple builder UI component: https://storybook.medplum.com/?path=/story/medplum-plandefinitionbuilder--basic However, it doesn't capture the range of complexity that is possible with PlanDefinitions