Resolve 5483-update-consent-storage-to-latest-spec (#5484)
* removed the adding of memberIdentifier to the consent * - fixed corresponding test - added changelog
This commit is contained in:
parent
9f827a75c7
commit
d546ce34e5
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
type: add
|
||||||
|
issue: 5480
|
||||||
|
title: "Updated Consent storage in $member-match operation."
|
|
@ -133,7 +133,6 @@ public class MemberMatcherR4Helper {
|
||||||
|
|
||||||
public void updateConsentForMemberMatch(
|
public void updateConsentForMemberMatch(
|
||||||
Consent theConsent, Patient thePatient, Patient theMemberPatient, RequestDetails theRequestDetails) {
|
Consent theConsent, Patient thePatient, Patient theMemberPatient, RequestDetails theRequestDetails) {
|
||||||
addIdentifierToConsent(theConsent, theMemberPatient);
|
|
||||||
updateConsentPatientAndPerformer(theConsent, thePatient);
|
updateConsentPatientAndPerformer(theConsent, thePatient);
|
||||||
myConsentModifier.accept(theConsent);
|
myConsentModifier.accept(theConsent);
|
||||||
|
|
||||||
|
@ -274,13 +273,6 @@ public class MemberMatcherR4Helper {
|
||||||
return policyTypes.equals(CONSENT_POLICY_REGULAR_TYPE) && myRegularFilterSupported;
|
return policyTypes.equals(CONSENT_POLICY_REGULAR_TYPE) && myRegularFilterSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addIdentifierToConsent(Consent theConsent, Patient thePatient) {
|
|
||||||
String consentId = getIdentifier(thePatient).getValue();
|
|
||||||
Identifier consentIdentifier =
|
|
||||||
new Identifier().setSystem(CONSENT_IDENTIFIER_CODE_SYSTEM).setValue(consentId);
|
|
||||||
theConsent.addIdentifier(consentIdentifier);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRegularFilterSupported(boolean theRegularFilterSupported) {
|
public void setRegularFilterSupported(boolean theRegularFilterSupported) {
|
||||||
myRegularFilterSupported = theRegularFilterSupported;
|
myRegularFilterSupported = theRegularFilterSupported;
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,7 +479,7 @@ public class MemberMatcherR4HelperTest {
|
||||||
private ArgumentCaptor<Consent> myDaoCaptor;
|
private ArgumentCaptor<Consent> myDaoCaptor;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void updateConsentForMemberMatch_noProvider_addsIdentifierUpdatePatientButNotExtensionAndSaves() {
|
public void updateConsentForMemberMatch_noProvider_UpdatePatientButNotExtensionAndSaves() {
|
||||||
// setup
|
// setup
|
||||||
Consent consent = getConsent();
|
Consent consent = getConsent();
|
||||||
consent.addPolicy(constructConsentPolicyComponent("#sensitive"));
|
consent.addPolicy(constructConsentPolicyComponent("#sensitive"));
|
||||||
|
@ -493,11 +493,6 @@ public class MemberMatcherR4HelperTest {
|
||||||
|
|
||||||
verify(myConsentDao).create(myDaoCaptor.capture(), same(myRequestDetails));
|
verify(myConsentDao).create(myDaoCaptor.capture(), same(myRequestDetails));
|
||||||
Consent saved = myDaoCaptor.getValue();
|
Consent saved = myDaoCaptor.getValue();
|
||||||
// check consent identifier
|
|
||||||
assertEquals(1, saved.getIdentifier().size());
|
|
||||||
assertEquals(MemberMatcherR4Helper.CONSENT_IDENTIFIER_CODE_SYSTEM, saved.getIdentifier().get(0).getSystem());
|
|
||||||
assertNotNull(saved.getIdentifier().get(0).getValue());
|
|
||||||
assertEquals(saved.getIdentifier().get(0).getValue(), memberPatient.getIdentifier().get(0).getValue());
|
|
||||||
|
|
||||||
// check consent patient info
|
// check consent patient info
|
||||||
String patientRef = patient.getIdElement().toUnqualifiedVersionless().getValue();
|
String patientRef = patient.getIdElement().toUnqualifiedVersionless().getValue();
|
||||||
|
|
Loading…
Reference in New Issue