Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log an error when an instance assigns multiple types from the same choice element #1529

Open
cmoesel opened this issue Oct 18, 2024 · 0 comments

Comments

@cmoesel
Copy link
Member

cmoesel commented Oct 18, 2024

FHIR choice elements (e.g., value[x]) are always 0..1 or 1..1. As such, there can never be more than one value for a given choice element. Once an author has assigned a value for one of the types, they cannot also assign a value to a different type.

For example, the following should result in an error and the second value[x] assignment (valueQuantity = 5 'cm') should be ignored:

Instance: MyTwoValuedObservation
InstanceOf: Observation
* status = #final
* code = #foo
* valueBoolean = true
* valueQuantity = 5 'cm'

Currently, SUSHI does not emit and error and exports both values into the instance JSON.

See: https://chat.fhir.org/#narrow/channel/215610-shorthand/topic/instance.20with.20extension.20incl.2E.20multiple.20value.5Bx.5D/near/477466665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant