Stream: implementers
Topic: Careplan activity.reference example?
May Terry (Feb 06 2020 at 15:19):
Is there a Careplan example which demonstrates the use of Careplan.activity.reference
?
I'm trying to validate a FHIR careplan example where Careplan.activity.reference
will reference a MedicationRequest resource. What I find weirdly circular is that there is an attribute generically called "reference" which also happens to be a Reference(). At least with outcomesReference, it's a different name. This seems to point back to itself. Regardless, when I create an example, it won't validate.
for example:
"activity": [
"reference": {
"reference": {
"MedicationRequest/16885"
},
etc...
The above gives the error: cpl-3: Provide a reference or detail, not both [detail.empty() or reference.empty()
Question: Is the syntax wrong, or is this a validator bug, or should I not be using this attribute at all?
cc: @Lloyd McKenzie since this is related to PCDE examples creation for Guidewell + HIMSS20 showcase.
Lloyd McKenzie (Feb 06 2020 at 19:27):
That fragment doesn't look valid. Should be a {
after the start of the array. Also, what's in the etc...
bit matters very much. You can't have a detail element - only the reference. Can you provide your actual instance?
David Hay (Feb 18 2020 at 02:24):
You might try using shorthand / sushi to generate the examples - it does do basic validation. another example here: https://fhirblog.com/2020/02/10/family-fhir-with-sushi/
May Terry (Feb 21 2020 at 02:17):
@Lloyd McKenzie - Thanks! I'll give that change a try. Otherwise, I'll attach the bundle example to ask for a second review to possibly catch the error.
@David Hay - Yeh...I've been creating examples for our mCODE IG with shorthand, so I'm kinda familiar with it. Shorthand is nice for simple straightforward examples but it falls short for what I need at this time. I'm creating a complex PCDE bundle which I found is more cumbersome to represent in FHIR shorthand with PCDE's dependencies on 2 different IGs (US Core and PAS) as well as the number of entries and references in my example.
Last updated: Apr 12 2022 at 19:14 UTC