Stream: implementers
Topic: Multiple CodeSystem or Valueset for one field
Medi Harsini (Jul 14 2020 at 18:48):
Hi, Can you have multiple different codesystems for one field when you profile a resource? For example for a resource.ReasonCode when the resource.status=New you would expect a codesystem/Newreasoncode and when resource.status=cancelled, you would expect a codesystem/cancelreasoncode and so on so force... How would you suggest managing such use case?
Lloyd McKenzie (Jul 14 2020 at 18:56):
If an element is of type 'code', it can only contain a single code (which must be from the official value set). The only way to convey alternate codes is to use extensions.
Medi Harsini (Jul 14 2020 at 18:59):
Thanks. Can you think of any resource which has a coding element changing based on status? Like StatusReasonCode?
Medi Harsini (Jul 14 2020 at 19:24):
Isnt it a better design to have one fields for reasoncode which gives more flexibiity... for example in Appointment, you have one StatusReasonCode instead of CancellationReason and ReasonCode?
Lloyd McKenzie (Jul 14 2020 at 20:12):
reasonCode is the reason for the appointment existing. It's relevant regardless of status. cancellationReason exists instead of statusReason because the only status they have interest in having a specific status for.
Medi Harsini (Jul 14 2020 at 20:25):
Reasonable.. Thanks
Last updated: Apr 12 2022 at 19:14 UTC