firely-net-sdk icon indicating copy to clipboard operation
firely-net-sdk copied to clipboard

Validator does not catch changing patient reference from base

Open MatthijsvdWielen opened this issue 11 months ago • 3 comments

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:

Image

Reproduction can be done with the Simplifier project: https://simplifier.net/PatientReferenceIssue/~introduction

patientreferenceissue.zip

MatthijsvdWielen avatar May 08 '25 13:05 MatthijsvdWielen

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.

wardweistra avatar May 08 '25 15:05 wardweistra

I think I need a bit of live explaination, but luckily we can make that happen ;-)

ewoutkramer avatar May 12 '25 07:05 ewoutkramer

@ewoutkramer to think about this issue further

alexzautke avatar Jun 18 '25 09:06 alexzautke