Merge branch 'gg_20201105-remove-person-references' of github.com:jamesagnew/hapi-fhir into gg_20201105-remove-person-references
This commit is contained in:
commit
3ad0fa8fda
|
@ -107,7 +107,7 @@ public class MdmStorageInterceptor implements IMdmStorageInterceptor {
|
||||||
|
|
||||||
@Hook(Pointcut.STORAGE_PRESTORAGE_RESOURCE_DELETED)
|
@Hook(Pointcut.STORAGE_PRESTORAGE_RESOURCE_DELETED)
|
||||||
public void deleteMdmLinks(RequestDetails theRequest, IBaseResource theResource) {
|
public void deleteMdmLinks(RequestDetails theRequest, IBaseResource theResource) {
|
||||||
if (!MdmUtil.isMdmResourceType(myFhirContext, theResource)) {
|
if (!myMdmSettings.isSupportedMdmType(myFhirContext.getResourceType(theResource))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
myMdmLinkDeleteSvc.deleteWithAnyReferenceTo(theResource);
|
myMdmLinkDeleteSvc.deleteWithAnyReferenceTo(theResource);
|
||||||
|
|
|
@ -31,14 +31,6 @@ import java.util.Optional;
|
||||||
public final class MdmUtil {
|
public final class MdmUtil {
|
||||||
private MdmUtil() {}
|
private MdmUtil() {}
|
||||||
|
|
||||||
|
|
||||||
public static boolean isMdmResourceType(FhirContext theFhirContext, IBaseResource theResource) {
|
|
||||||
String resourceType = theFhirContext.getResourceType(theResource);
|
|
||||||
return ("Patient".equals(resourceType) ||
|
|
||||||
"Practitioner".equals(resourceType)) ||
|
|
||||||
"Person".equals(resourceType);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the resource is tagged as not managed by empi, return false. Otherwise true.
|
* If the resource is tagged as not managed by empi, return false. Otherwise true.
|
||||||
* @param theBaseResource The Patient/Practitioner that is potentially managed by EMPI.
|
* @param theBaseResource The Patient/Practitioner that is potentially managed by EMPI.
|
||||||
|
|
Loading…
Reference in New Issue