Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$apply does not produce output for ActivityDefinitions #581

Open
rdingwell opened this issue Nov 8, 2024 · 1 comment
Open

$apply does not produce output for ActivityDefinitions #581

rdingwell opened this issue Nov 8, 2024 · 1 comment

Comments

@rdingwell
Copy link

I have a PlanDefinition resource that utilizes ActivityDefinition and other PlanDefinition resources in the actions. The ActivityDefinitions are targeted to create ServiceRequest resources. The PlanDefinitions seem to process ok , but the ActivityDefinitions do not appear to produce any output in the CarePlan RequestGroup.

Here is an example of the output for an action in the RequestGroup --
{
"id": "ENACT-5",
"title": "ACT-3",
"description": "Cognition Assessment",
"resource": {
"reference": "ENACT-5-ACT-3"
}
}

While there is a reference to I would expect to be the ServiceRequest generated by the ActivityDefinition, there are no ServiceRequest resources generated or other resources with that id. I also question whether references based solely on an id are valid. I would assume that references to other contained resources in the same parent context, the CarePlan in this case, would need to follow the #{resourceType}/{resourceId} semantics, but I will add that as a different issue.

@rdingwell
Copy link
Author

Upon further testing it appears that this is an issue related to a PlanDefinition relying on other PlanDefinition resources for actions. For example, we have a PlanDefinition that looks somewhat like the following.

PlanDefinition -> TopLevel
action -> PlanDefinition A
action -> PlanDefinition B
action -> PlanDefinition C

If we execute the $apply operation directly on PlanDefinitions A-C we see the ServiceRequests being generated and returned in contained resources for the resulting CarePlan. However when we execute the $apply operation on the TopLevel we see a RequestGroup for the TopLevel PlanDefinition along with the resulting RequestGroup resources from PlanDefinitions A-C, but we do not see the ServiceRequests that should be generated from A-C. So this seems like it is an issue with migrating all of the generated resources up the chain to the higher level results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant