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 produces invalid references #582

Open
rdingwell opened this issue Nov 8, 2024 · 0 comments
Open

$apply produces invalid references #582

rdingwell opened this issue Nov 8, 2024 · 0 comments

Comments

@rdingwell
Copy link

In the resulting CarePlan that is produced from the $apply operation there are potentially a number of contained resources that are produced and included in the CarePlan. These resources may also have a need to reference other contained resources in the CarePlan. Currently, when this occurs invalid references are generated. Below is an example of the output I received in the contained RequestGroup in the CarePlan that was generated from a PlanDefinition. The action makes reference to another contained RequestGroup with the id EN-1-EN-1. This should be #EN-1-EN-1.

Per the fhir specification: When a contained resource references its container or another contained resource within its container, it must always be a local relative reference (i.e. it must be or start with '#')

"action": [
                {
                    "id": "EN-1",
                    "title": "Enrollment",
                    "description": "Initial enrollment visit for patient screening and inclusion",
                    "relatedAction": [
                        {
                            "actionId": "EN-1",
                            "relationship": "concurrent",
                            "offsetDuration": {
                                "value": 0,
                                "system": "http://unitsofmeasure.org",
                                "code": "mo"
                            }
                        }
                    ],
                    "resource": {
                        "reference": "EN-1-EN-1"
                    }
  },

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