Stream: IG creation
Topic: Sushi fails to resolve CDS SDs
Richard Braman (FLY.HEALTH) (Nov 16 2021 at 15:12):
I am trying to create an example CDSHooksServicePlanDefinition as defined here https://www.hl7.org/fhir/cdshooksserviceplandefinition.html
Sushi reports an error:
Sushi: error InstanceOf CDSHooksServicePlanDefinition not found for T2D-PlanDefinition
How do I import the SDs for CDSHooks?
I also need this one: http://hl7.org/fhir/R4/cdshooksrequestgroup.html
Richard Braman (FLY.HEALTH) (Nov 16 2021 at 15:21):
@Matt Jenks
Matt Jenks (Nov 16 2021 at 15:49):
I profiled requestgroup in fsh using the Parent: directive and pointing it to the SD. For instance:
Profile: NBARequestGroup
Parent: http://hl7.org/fhir/StructureDefinition/cdshooksrequestgroup
You can see my full profile (still in development) here: https://github.com/GigaTech-net/hh-nba-ig/blob/development/input/fsh/profiles/requestgroup-nba.fsh#L4
and you can see my RequestGroup inline example used within a CarePlan, here: https://github.com/GigaTech-net/hh-nba-ig/blob/development/input/fsh/examples/careplan-nba.fsh#L23
So you should be able to just use,
Parent: https://www.hl7.org/fhir/cdshooksserviceplandefinition.html
Chris Moesel (Nov 16 2021 at 17:08):
What @Matt Jenks suggested above should work, but without the .html
at the end.
To provide some more detail on how SUSHI looks up items... Generally, you can refer to items by their name
, id
, or url
. Sometimes you need to look at a definition's JSON/XML to see what the actual name
, id
, and url
are (as they're not always surfaced well in the documentation). Looking at the CDSHooksServicePlanDefinition JSON, we see these three values:
"id" : "cdshooksserviceplandefinition",
"url" : "http://hl7.org/fhir/StructureDefinition/cdshooksserviceplandefinition",
"name" : "CDS Hooks Service PlanDefinition",
Note that CDSHooksServicePlanDefinition
is neither the name
, nor id
, nor url
. This is why it did not work when you tried to use it in SUSHI.
Now... there is one more wrinkle in this particular case -- and that is that the specified name
("CDS Hooks Service PlanDefinition"
) contains spaces, which FHIR says should not be used in names (see StructureDefinition.name). For this reason, we actually can't use the name
in this case. But either the id
or url
should work.
cc: @Bryn Rhodes regarding incorrect naming format on CDS Hooks Service PlanDefinition.
Richard Braman (FLY.HEALTH) (Nov 16 2021 at 17:16):
Thank you Gentlemen.
Matt Jenks (Nov 16 2021 at 17:17):
yeah, the .html was copy/paste error on my part. Thanks for pointing that our @Chris Moesel !
Chris Moesel (Nov 16 2021 at 18:17):
NP. Actually, as I look at it, I see that more than the .html
was wrong. These darn doc URLs and canonical URLs are just close enough to each other to be confusing! @Richard Braman (FLY.HEALTH) -- if you go for the URL approach, make sure you use http://hl7.org/fhir/StructureDefinition/cdshooksserviceplandefinition
.
Bryn Rhodes (Nov 16 2021 at 19:20):
Submitted a JIRA ticket to fix the profile name:
Bryn Rhodes (Nov 16 2021 at 19:20):
https://jira.hl7.org/browse/FHIR-34323
Chris Moesel (Nov 16 2021 at 19:23):
Thanks, @Bryn Rhodes!
Last updated: Apr 12 2022 at 19:14 UTC