Stream: implementers
Topic: multi-value extension vs multiple extensions
Marko Jalonen (Aug 30 2019 at 11:35):
Is there any best practice on whether to use extension with multiple values or just use multiple extensions. I need to include quite many identifier references in the Appointment profile that are not existing (queue number, ticket number, ...). Should I make one extension for them or separate extensions for each? Although I have not figured out how to discriminate between the id's if I use just one, but maybe that is solvable.
Lloyd McKenzie (Aug 30 2019 at 13:22):
You can't have an extension with multiple values. You can have multiple extension repetitions with the same URL. Presumably you need to distinguish between queue number, ticket number, etc. The first thing to ask is "Are all of these things actually identifiers for the Appointment?". If the answer is "yes", then you should be using Appointment.identifier and using the Identifier.system and Identifier.type to distinguish them, falling back on using an extension to differentiate if need-be. If any of them are not identifiers for the Appointment, but are still things that must be tracked on Appointment, then decide whether they're all identifiers of the same "sort" where differentiating by type/system is reasonable or appropriate. If yes, a single extension definition is fine. If not, multiples are fine. Note that in the former case, you may need to sub-slice in your profile to make clear how each kind is sent and what the cardinalities are, so separate extensions might actually be simpler.
Last updated: Apr 12 2022 at 19:14 UTC