Stream: hapi
Topic: Change min/max cardinalities
Oleg S. (Nov 23 2020 at 17:46):
Hello, How do I make field a required field? For example, Patient has "text" and "identifier", but default cardinality is 0..1. I would like to change that to 1..* in my own instances of Patient.
Would this be done using Extensions?
Eric Haas (Nov 24 2020 at 02:39):
(deleted)
Eric Haas (Nov 24 2020 at 02:41):
(deleted)
Frank Oemig (Nov 24 2020 at 07:19):
That's done by profiles...
René Spronk (Nov 24 2020 at 07:42):
..which are documented at http://build.fhir.org/conformance-module.html
Marc Sandberg (Nov 24 2020 at 08:39):
Oleg S. said:
Hello, How do I make field a required field? For example, Patient has "text" and "identifier", but default cardinality is 0..1. I would like to change that to 1..* in my own instances of Patient.
Would this be done using Extensions?
If your goal is to expand the cardinality an Extension is the way to go. Any profiling should stay within the limits of the base definition. e.g. 0..1 can only be changed to 1..1 or 0..0 while 0..* can be set to 1..*, 1..2, 0..1, and so forth, 1..1 can not be changed into anything else. The reason to this is that all FHIR messages (either with a profile or not) should still conform to the FHIR specification. If you would have more than one text element in any resource this would not validate against the base specification.
Frank Oemig (Nov 24 2020 at 09:02):
Good catch, the initial question was about making a field required. That should be done within the given ranges. Profiles are the means of choice.
Extending max cardinality should be questioned...
Last updated: Apr 12 2022 at 19:14 UTC