Stream: implementers
Topic: IG QA Invariant warning on claim.careTeam.sequence
Debra Mangum (Jan 11 2022 at 19:10):
Hi - Using sushi 2.2.3, FHIR v4.0.1.
Added invariant rule on Claim profile as expression "careTeam.sequence = item.careTeamSequence".
Example instance includes (code snippet):
* careTeam.sequence = 1
* careTeam.provider = Reference(DrKelly)
.....
* item.sequence = 1
* item.careTeamSequence = 1
.....
QA error is:
image.png
Any ideas why the QA warning occurs?
Lloyd McKenzie (Jan 11 2022 at 21:21):
Presuming that you're declaring this at the base of Claim, what you'll get is two collections = the full set of careTeam.sequences and the full set of item.careTeamSequence values. If the two collections aren't identical, the warning will fire.
Lloyd McKenzie (Jan 11 2022 at 21:21):
What are you trying to actually enforce? That the item.careTeamSequence is one of the defined careTeam.sequence values?
Lloyd McKenzie (Jan 11 2022 at 21:22):
If so, then your context should be in item.careTeamSequence and it should be %resource.careTeam[sequence=$this].exists()
- I think :)
Last updated: Apr 12 2022 at 19:14 UTC