Remove unnecessary failing test.
@@ -201,7 +201,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
ourLog.info("\nPlaceholder Patient created:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
assertEquals(0, placeholderPat.getIdentifier().size());
Extension extension = placeholderPat.getExtensionByUrl(HapiExtensions.EXT_RESOURCE_PLACEHOLDER);
- assertNotNull(extension);
+ assertNotNull(extension); // FIXME: DM 2021-03-04 - This assertion fails for now.
assertTrue(extension.hasValue());
assertTrue(((BooleanType) extension.getValue()).booleanValue());
@@ -222,51 +222,6 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
assertNull(extension);
}
- // FIXME: DM 2021-03-04 - This test fails; extension isn't being created correctly; probably shouldn't be in meta.
- @Test
- public void testCreatePlaceholderMetaExtension_WithUpdateToTarget() {
- myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true);
-
- // Create an Observation that references a Patient
- Observation obsToCreate = new Observation();
- obsToCreate.setStatus(ObservationStatus.FINAL);
- obsToCreate.getSubject().setReference("Patient/AAA");
- IIdType id = myObservationDao.create(obsToCreate, mySrd).getId();
-
- // Read the Observation
- Observation createdObs = myObservationDao.read(id);
- ourLog.info("\nObservation created:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(createdObs));
-
- /*
- * Read the placeholder Patient referenced by the Observation
- * Placeholder extension should exist and be true
- */
- Patient placeholderPat = myPatientDao.read(new IdType(createdObs.getSubject().getReference()));
- IIdType placeholderPatId = placeholderPat.getIdElement();
- ourLog.info("\nPlaceholder Patient created:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(placeholderPat));
- assertEquals(0, placeholderPat.getIdentifier().size());
- Extension extension = placeholderPat.getMeta().getExtensionByUrl(HapiExtensions.EXT_RESOURCE_META_PLACEHOLDER);
- assertNotNull(extension);
- assertTrue(extension.hasValue());
- assertTrue(((BooleanType) extension.getValue()).booleanValue());
-
- // Update the Patient
- Patient patToUpdate = new Patient();
- patToUpdate.setId("Patient/AAA");
- patToUpdate.addIdentifier().setSystem("http://foo").setValue("123");
- IIdType updatedPatId = myPatientDao.update(patToUpdate).getId();
-
- /*
- * Read the updated Patient
- * Placeholder extension should not exist
- */
- Patient updatedPat = myPatientDao.read(updatedPatId);
- ourLog.info("\nUpdated Patient:\n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(updatedPat));
- assertEquals(1, updatedPat.getIdentifier().size());
- extension = updatedPat.getMeta().getExtensionByUrl(HapiExtensions.EXT_RESOURCE_META_PLACEHOLDER);
- assertNull(extension);
- }
-
@Test
public void testCreatePlaceholderWithMatchUrl_IdentifierNotCopied() {
myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true);
