3684 subscription for delivering delete events formatted wrong (#3685)
* Fixed issue with delivering delete events Subscriptions * Extracted deliverer class name to a constant, now shared across tests and interceptor class * Added change log and doc changes * moved the constant to a more appropriate place Co-authored-by: Steven Li <steven@smilecdr.com>
This commit is contained in:
parent
05cb6c241c
commit
9336af4b0f
|
@ -25,7 +25,7 @@ public final class Msg {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IMPORTANT: Please update the following comment after you add a new code
|
* IMPORTANT: Please update the following comment after you add a new code
|
||||||
* Last code value: 2084
|
* Last code value: 2086
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Msg() {}
|
private Msg() {}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
type: fix
|
||||||
|
issue: 3684
|
||||||
|
jira: SMILE-4398
|
||||||
|
title: "Moved the `http://hapifhir.io/fhir/StructureDefinition/subscription-send-delete-messages` from the Subscription
|
||||||
|
to the Subscription's Channel element."
|
|
@ -117,7 +117,7 @@ public abstract class BaseSubscriptionsR4Test extends BaseResourceProviderR4Test
|
||||||
protected Subscription createSubscription(String theCriteria, String thePayload, Extension theExtension) {
|
protected Subscription createSubscription(String theCriteria, String thePayload, Extension theExtension) {
|
||||||
Subscription subscription = newSubscription(theCriteria, thePayload);
|
Subscription subscription = newSubscription(theCriteria, thePayload);
|
||||||
if (theExtension != null) {
|
if (theExtension != null) {
|
||||||
subscription.getExtension().add(theExtension);
|
subscription.getChannel().addExtension(theExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
MethodOutcome methodOutcome = myClient.create().resource(subscription).execute();
|
MethodOutcome methodOutcome = myClient.create().resource(subscription).execute();
|
||||||
|
|
|
@ -275,7 +275,7 @@ public class SubscriptionCanonicalizer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Extension extension = subscription.getExtensionByUrl(EX_SEND_DELETE_MESSAGES);
|
Extension extension = subscription.getChannel().getExtensionByUrl(EX_SEND_DELETE_MESSAGES);
|
||||||
if (extension != null && extension.hasValue() && extension.getValue() instanceof BooleanType) {
|
if (extension != null && extension.hasValue() && extension.getValue() instanceof BooleanType) {
|
||||||
retVal.setSendDeleteMessages(((BooleanType) extension.getValue()).booleanValue());
|
retVal.setSendDeleteMessages(((BooleanType) extension.getValue()).booleanValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SubscriptionCanonicalizerTest {
|
||||||
Extension sendDeleteMessagesExtension = new Extension()
|
Extension sendDeleteMessagesExtension = new Extension()
|
||||||
.setUrl(EX_SEND_DELETE_MESSAGES)
|
.setUrl(EX_SEND_DELETE_MESSAGES)
|
||||||
.setValue(new BooleanType(true));
|
.setValue(new BooleanType(true));
|
||||||
subscription.getExtension().add(sendDeleteMessagesExtension);
|
subscription.getChannel().addExtension(sendDeleteMessagesExtension);
|
||||||
|
|
||||||
CanonicalSubscription canonicalSubscription = testedSC.canonicalize(subscription);
|
CanonicalSubscription canonicalSubscription = testedSC.canonicalize(subscription);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue