Closed RichardTON closed 2 years ago
The solution is to remove the aggregation rule from Medication Request Pharmaceutical Benefits Scheme - Medication and MedicationRequest can be contained in the ExplanationOfBenefit resource.
Need to check however if the contained is forcing Medication to be contained in MedicationRequest or if a contained resource reference is sufficient where both resources MedicationRequest and Medication are contained in ExplanationOfBenefit.
This is not an error, the behaviour is as desired, references are to contained resources - it does not force nested contains.
Prerequisites
The bug
In Explanation of Benefit Medicare the elements referral and prescription are required to refer to contained resources.
This assertion was made due to a misunderstanding of contained resources and prevents using this resource as intended.
The most serious problem is that it is impossible to validly include a prescription in Explanation of Benefit Medicare. This is because the element prescription is a contained reference to Medication Request Pharmaceutical Benefits Scheme; it has a required element, medicationReference, which is also a contained reference, and contained resources cannot be nested.
What I expected to happen
Redesign with business owners a solution with less or no containment. Relax requirements for containment.
Workarounds
Do not validate against the profile.