You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In the LinuxForHealth "common data model" IG, they use a discriminator type that I don't think we've seen yet: "exists"
The slices are differentiated by the presence or absence of the nominated element. There SHALL be no more than two slices. The slices are differentiated by the fact that one must have a max of 0 and the other must have a min of 1 (or more). The order in which the slices are declared doesn't matter.
currently an "exists" discriminator leads us to generate constraints with a missing antecendent: .exists() implies ...
after the proposed change in #4073 to generate exists and negated exists checks for the path that is given in the slice definition.
for the CDM screenshot above, that now generates constraints like the following:
code.where(coding.exists()).exists() implies (code.where(coding.exists()).count() = 1 and code.where(coding.exists()).all((coding.where(system = 'http://nucc.org/provider-taxonomy').exists() implies (coding.where(system = 'http://nucc.org/provider-taxonomy').count() = 1 and coding.where(system = 'http://nucc.org/provider-taxonomy').all(system = 'http://nucc.org/provider-taxonomy' and code.exists()))) and (coding.where(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/nucc-provider-taxonomy-type').exists() implies (coding.where(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/nucc-provider-taxonomy-type').count() = 1 and coding.where(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/nucc-provider-taxonomy-type').all(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/nucc-provider-taxonomy-type' and code.exists()))) and (coding.where(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/payer-provider-type').exists() implies (coding.where(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/payer-provider-type').count() = 1 and coding.where(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/payer-provider-type').all(system = 'http://linuxforhealth.org/fhir/cdm/CodeSystem/payer-provider-type' and code.exists() and code.all(memberOf('http://linuxforhealth.org/fhir/cdm/ValueSet/practitioner-role-type', 'preferred')))))))
code.where(coding.exists().not()).exists() implies (code.where(coding.exists().not()).count() = 1 and code.where(coding.exists().not()).all(coding.exists().not() and text.exists()))
Activity
issue #4073 - add support for the "exists" discriminator
lmsurpre commentedon Nov 15, 2022
currently an "exists" discriminator leads us to generate constraints with a missing antecendent:
.exists() implies ...after the proposed change in #4073 to generate exists and negated exists checks for the path that is given in the slice definition.
for the CDM screenshot above, that now generates constraints like the following: