Stream: shorthand
Topic: Constraints Manipulation
saran (Nov 09 2021 at 15:53):
Is there a way in SUSHI to edit Constraints section in the profile. We trying to reference the US Core Profile structure.
What was generated
image.png
Our Desired output is
Jean Duteau (Nov 09 2021 at 16:58):
That's not SUSHI but the Publisher and specifically the template. There is discussion about how to choose which constraints to include but it currently includes all constraints from the profiles all the way to the base resource type.
saran (Nov 09 2021 at 17:42):
@Jean Duteau can you please provide me the link to discussion
Jean Duteau (Nov 09 2021 at 17:44):
yes, searching for invariants and constraints shows it is here: https://chat.fhir.org/#narrow/stream/196008-ig-publishing.20requirements/topic/Invariants
Chris Moesel (Nov 09 2021 at 19:14):
We trying to reference the US Core Profile structure.
I'll add that I don't think you can really reference invariant constraints from another structure. The best you can do is declare that structure as a parent and then you inherit the constraints.
If you want the same constraints as a structure that is not in your inheritance tree, I think you'll have to redefine them in your own structure. You do this by defining the invariant and then applying it via an obeys rule.
Because of the way FSH works, you can define an invariant once in FSH and apply it in multiple places -- but this isn't really the way standard FHIR works since invariants are inlined in the StructureDefinition.
Last updated: Apr 12 2022 at 19:14 UTC