Open KostiantynBondarenko opened 2 years ago
Hey thanks for reporting this, I'll have a look
Hey @KostiantynBondarenko , I just checked this out in test, and it seems to be working fine. Can you provide some replication steps? Here is a sample test you can run, if you paste it into the MdmMatchLinkSvcTest.java class.
@Test
public void testInternalEidIsAssignedAndIspropagated() {
Patient janePatient = createPatient(buildJanePatient());
IAnyResource goldenResource = myGoldenResourceHelper.createGoldenResourceFromMdmSourceResource(janePatient, new MdmTransactionContext(MdmTransactionContext.OperationType.CREATE_RESOURCE));
myMdmLinkSvc.updateLink(goldenResource, janePatient, MdmMatchOutcome.NEW_GOLDEN_RESOURCE_MATCH, MdmLinkSourceEnum.AUTO, createContextForCreate("Patient"));
assertTrue(janePatient.getIdentifier().stream().anyMatch(id -> id.getSystem().equalsIgnoreCase(HAPI_ENTERPRISE_IDENTIFIER_SYSTEM)));
assertTrue(((Patient)goldenResource).getIdentifier().stream().anyMatch(id -> id.getSystem().equalsIgnoreCase(HAPI_ENTERPRISE_IDENTIFIER_SYSTEM)));
}
Issue: According to the scheme https://hapifhir.io/hapi-fhir/docs/images/empi-create-2.svg in hapi documentation the generated EID should be assigned to the new resource, but the resource does not change.
To Reproduce Steps to reproduce the behavior:
Environment:
Expected:![empi-create-2](https://user-images.githubusercontent.com/25262132/160346037-1f248edc-494e-41f4-bc09-2e4509f7ff9c.svg)
Actual:![empi-create-2-svg (1)](https://user-images.githubusercontent.com/25262132/160347345-26f740b8-2f1e-427f-80d7-a9ec91e341e4.svg)