adding changelog
This commit is contained in:
parent
bb1d6f7b7a
commit
405507882b
|
@ -2482,7 +2482,7 @@ public enum Pointcut implements IPointcut {
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
P2P_MEMBER_MATCH_PRE_HOOK(
|
P2P_MEMBER_MATCH_PRE_HOOK(
|
||||||
void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.jpa.model.MemberMatchPreHookEvent"),
|
void.class, "ca.uhn.fhir.rest.api.server.RequestDetails", "ca.uhn.fhir.jpa.model.MemberMatchPreHookEvent"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <b>JPA Hook:</b>
|
* <b>JPA Hook:</b>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
type: add
|
||||||
|
issue: 5478
|
||||||
|
title: "Added a pointcut (P2P_MEMBER_MATCH_PRE_HOOK) that is invoked
|
||||||
|
after basic parameter validation, but before persisted member-match
|
||||||
|
operations have occurred.
|
||||||
|
This pointcut takes RequestDetails and a MemberMatchPreHookEvent
|
||||||
|
(which contains the patient, coverages, and consent resources)
|
||||||
|
object.
|
||||||
|
"
|
|
@ -119,9 +119,9 @@ public class JpaR4Config {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public MemberMatchR4ResourceProvider memberMatchR4ResourceProvider(
|
public MemberMatchR4ResourceProvider memberMatchR4ResourceProvider(
|
||||||
FhirContext theFhirContext, IInterceptorBroadcaster theIInterceptorBroadcaster, MemberMatcherR4Helper theMemberMatchR4Helper) {
|
FhirContext theFhirContext,
|
||||||
return new MemberMatchR4ResourceProvider(theFhirContext,
|
IInterceptorBroadcaster theIInterceptorBroadcaster,
|
||||||
theMemberMatchR4Helper,
|
MemberMatcherR4Helper theMemberMatchR4Helper) {
|
||||||
theIInterceptorBroadcaster);
|
return new MemberMatchR4ResourceProvider(theFhirContext, theMemberMatchR4Helper, theIInterceptorBroadcaster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@ import org.hl7.fhir.r4.model.Coverage;
|
||||||
import org.hl7.fhir.r4.model.Parameters;
|
import org.hl7.fhir.r4.model.Parameters;
|
||||||
import org.hl7.fhir.r4.model.Patient;
|
import org.hl7.fhir.r4.model.Patient;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class MemberMatchR4ResourceProvider {
|
public class MemberMatchR4ResourceProvider {
|
||||||
|
|
||||||
|
@ -48,10 +48,9 @@ public class MemberMatchR4ResourceProvider {
|
||||||
private final IInterceptorBroadcaster myInterceptorBroadcaster;
|
private final IInterceptorBroadcaster myInterceptorBroadcaster;
|
||||||
|
|
||||||
public MemberMatchR4ResourceProvider(
|
public MemberMatchR4ResourceProvider(
|
||||||
FhirContext theFhirContext,
|
FhirContext theFhirContext,
|
||||||
MemberMatcherR4Helper theMemberMatcherR4Helper,
|
MemberMatcherR4Helper theMemberMatcherR4Helper,
|
||||||
IInterceptorBroadcaster theIInterceptorBroadcaster
|
IInterceptorBroadcaster theIInterceptorBroadcaster) {
|
||||||
) {
|
|
||||||
myFhirContext = theFhirContext;
|
myFhirContext = theFhirContext;
|
||||||
myMemberMatcherR4Helper = theMemberMatcherR4Helper;
|
myMemberMatcherR4Helper = theMemberMatcherR4Helper;
|
||||||
myInterceptorBroadcaster = theIInterceptorBroadcaster;
|
myInterceptorBroadcaster = theIInterceptorBroadcaster;
|
||||||
|
@ -138,7 +137,8 @@ public class MemberMatchR4ResourceProvider {
|
||||||
throw new UnprocessableEntityException(Msg.code(2147) + i18nMessage);
|
throw new UnprocessableEntityException(Msg.code(2147) + i18nMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CompositeInterceptorBroadcaster.hasHooks(Pointcut.P2P_MEMBER_MATCH_PRE_HOOK, myInterceptorBroadcaster, theRequestDetails)) {
|
if (CompositeInterceptorBroadcaster.hasHooks(
|
||||||
|
Pointcut.P2P_MEMBER_MATCH_PRE_HOOK, myInterceptorBroadcaster, theRequestDetails)) {
|
||||||
MemberMatchPreHookEvent preHookParams = new MemberMatchPreHookEvent();
|
MemberMatchPreHookEvent preHookParams = new MemberMatchPreHookEvent();
|
||||||
preHookParams.setConsent(theConsent);
|
preHookParams.setConsent(theConsent);
|
||||||
preHookParams.setPatient(theMemberPatient);
|
preHookParams.setPatient(theMemberPatient);
|
||||||
|
@ -149,11 +149,7 @@ public class MemberMatchR4ResourceProvider {
|
||||||
params.add(MemberMatchPreHookEvent.class, preHookParams);
|
params.add(MemberMatchPreHookEvent.class, preHookParams);
|
||||||
params.add(RequestDetails.class, theRequestDetails);
|
params.add(RequestDetails.class, theRequestDetails);
|
||||||
CompositeInterceptorBroadcaster.doCallHooks(
|
CompositeInterceptorBroadcaster.doCallHooks(
|
||||||
myInterceptorBroadcaster,
|
myInterceptorBroadcaster, theRequestDetails, Pointcut.P2P_MEMBER_MATCH_PRE_HOOK, params);
|
||||||
theRequestDetails,
|
|
||||||
Pointcut.P2P_MEMBER_MATCH_PRE_HOOK,
|
|
||||||
params
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
myMemberMatcherR4Helper.addMemberIdentifierToMemberPatient(theMemberPatient, patient.getIdentifierFirstRep());
|
myMemberMatcherR4Helper.addMemberIdentifierToMemberPatient(theMemberPatient, patient.getIdentifierFirstRep());
|
||||||
|
|
|
@ -46,10 +46,10 @@ import org.hl7.fhir.r4.model.Parameters;
|
||||||
import org.hl7.fhir.r4.model.Patient;
|
import org.hl7.fhir.r4.model.Patient;
|
||||||
import org.hl7.fhir.r4.model.Reference;
|
import org.hl7.fhir.r4.model.Reference;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import static ca.uhn.fhir.rest.api.Constants.PARAM_CONSENT;
|
import static ca.uhn.fhir.rest.api.Constants.PARAM_CONSENT;
|
||||||
import static ca.uhn.fhir.rest.api.Constants.PARAM_MEMBER_IDENTIFIER;
|
import static ca.uhn.fhir.rest.api.Constants.PARAM_MEMBER_IDENTIFIER;
|
||||||
|
|
Loading…
Reference in New Issue