Closed mmsmits closed 2 months ago
I did see that the base profile is pretty weird, e.g. this structure for EOB.profile looks incomplete:
<element id="ExplanationOfBenefit.meta.profile">
<path value="ExplanationOfBenefit.meta.profile" />
<slicing>
<discriminator>
<type value="pattern" />
<path value="$this" />
</discriminator>
<description value="Slice based on value" />
<ordered value="false" />
<rules value="open" />
</slicing>
<comment value="meta.profile is required as a matter of convenience of receiving systems. The meta.profile should be used by the Server to hint/assert/declare that this instance conforms to one (or more) stated profiles (with business versions). meta.profile does not capture any business logic, processing directives, or semantics (for example, inpatient or outpatient). Clients should not assume that the Server will exhaustively indicate all profiles with all versions that this instance conforms to. Clients can (and should) perform their own validation of conformance to the indicated profile(s) and to any other profiles of interest. CPCDS data element (190)" />
<min value="1" />
</element>
<element id="ExplanationOfBenefit.meta.profile:supportedProfile">
<path value="ExplanationOfBenefit.meta.profile" />
<sliceName value="supportedProfile" />
<min value="1" />
<max value="1" />
</element>
as it declares a slice on $this
, but does not provide an actual pattern[x]
in the slice that follows. This means a sub-profile must override the slice otherwise you will get an error just like the OP of this bug found. It could therefore be that this Carin profile has more of these "incomplete" slices, which would cause errors when the author of a sub-profile forgets to override them. But that's just theory.
For now, I cannot reproduce this issue, but will push it to our repo under branch issue-322
.
@wardweistra FYI
We have an ExplanationOfBenefit profile with the following slice defined:
and it cannot convert this StructureDefinition to ElementSchema. The converter throws: " Failed to convert ElementDefinition at
ExplanationOfBenefit.item.adjudication:adjudicationamounttype
in profile XXX: The pattern discriminator should have a 'fixed[x]', 'pattern[x]' or binding element set on 'Money.value'This is strange, because the discriminator is on 'category' and should not look at Money at all.
See https://firelyteam.slack.com/archives/C011XD1TKL0/p1716221527870179 for the full conversation.