adding changelog
This commit is contained in:
parent
bb1d6f7b7a
commit
405507882b
|
@ -2482,7 +2482,7 @@ public enum Pointcut implements IPointcut {
|
|||
* </ul>
|
||||
*/
|
||||
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>
|
||||
|
|
|
@ -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
|
||||
public MemberMatchR4ResourceProvider memberMatchR4ResourceProvider(
|
||||
FhirContext theFhirContext, IInterceptorBroadcaster theIInterceptorBroadcaster, MemberMatcherR4Helper theMemberMatchR4Helper) {
|
||||
return new MemberMatchR4ResourceProvider(theFhirContext,
|
||||
theMemberMatchR4Helper,
|
||||
theIInterceptorBroadcaster);
|
||||
FhirContext theFhirContext,
|
||||
IInterceptorBroadcaster theIInterceptorBroadcaster,
|
||||
MemberMatcherR4Helper theMemberMatchR4Helper) {
|
||||
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.Patient;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class MemberMatchR4ResourceProvider {
|
||||
|
||||
|
@ -48,10 +48,9 @@ public class MemberMatchR4ResourceProvider {
|
|||
private final IInterceptorBroadcaster myInterceptorBroadcaster;
|
||||
|
||||
public MemberMatchR4ResourceProvider(
|
||||
FhirContext theFhirContext,
|
||||
MemberMatcherR4Helper theMemberMatcherR4Helper,
|
||||
IInterceptorBroadcaster theIInterceptorBroadcaster
|
||||
) {
|
||||
FhirContext theFhirContext,
|
||||
MemberMatcherR4Helper theMemberMatcherR4Helper,
|
||||
IInterceptorBroadcaster theIInterceptorBroadcaster) {
|
||||
myFhirContext = theFhirContext;
|
||||
myMemberMatcherR4Helper = theMemberMatcherR4Helper;
|
||||
myInterceptorBroadcaster = theIInterceptorBroadcaster;
|
||||
|
@ -138,7 +137,8 @@ public class MemberMatchR4ResourceProvider {
|
|||
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();
|
||||
preHookParams.setConsent(theConsent);
|
||||
preHookParams.setPatient(theMemberPatient);
|
||||
|
@ -149,11 +149,7 @@ public class MemberMatchR4ResourceProvider {
|
|||
params.add(MemberMatchPreHookEvent.class, preHookParams);
|
||||
params.add(RequestDetails.class, theRequestDetails);
|
||||
CompositeInterceptorBroadcaster.doCallHooks(
|
||||
myInterceptorBroadcaster,
|
||||
theRequestDetails,
|
||||
Pointcut.P2P_MEMBER_MATCH_PRE_HOOK,
|
||||
params
|
||||
);
|
||||
myInterceptorBroadcaster, theRequestDetails, Pointcut.P2P_MEMBER_MATCH_PRE_HOOK, params);
|
||||
}
|
||||
|
||||
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.Reference;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
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_MEMBER_IDENTIFIER;
|
||||
|
|
Loading…
Reference in New Issue