Validator does not catch changing patient reference from base
My derived profile requires a patient reference to the acme r4 core patient, However, that EOB profile is derived from Carin BB EOB profile, which requires the patient reference to be to a Carin BB patient.
Our validator thinks this is fine: https://simplifier.net/validator?scope=project%3APatientReferenceIssue&filepath=MyC4BBExplanationOfBenefitPharmacy.StructureDefinition.json
However this should not be allowed, the java validator picks this up:
Reproduction can be done with the Simplifier project: https://simplifier.net/PatientReferenceIssue/~introduction
Note that in this case the change should not be allowed, since the ACME patient (required by child profile) is a sibling of the Carin BB Patient (required by the parent profile).
If, on the other hand, the ACME Patient would be a child of the Carin BB Patient it should be allowed.
I think I need a bit of live explaination, but luckily we can make that happen ;-)
@ewoutkramer to think about this issue further