I am using custom profiles for validating bundle resource of type document. While using reference to other resources within bundle , I am getting the below error :
"Bundle.entry[0].resource.ofType(Composition).subject Unable to find matching profile for Patient/1 among choices: http://example.com/fhir/r4/StructureDefinition/Patient".
This error is only coming on HAPI Version 5.x
and not coming on HAPI Version 4.2.0
I am using FHIR version R4 v4.0.1
.
It doesn't seem to be problem with code , as code is same for both HAPI versions mentioned above.
Is it Bug in Hapi ? or am i missing some point regarding referencing.