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:
StevenXLi 2022-06-13 14:04:49 -04:00 committed by GitHub
parent 05cb6c241c
commit 9336af4b0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 4 deletions

View File

@ -25,7 +25,7 @@ public final class Msg {
/**
* IMPORTANT: Please update the following comment after you add a new code
* Last code value: 2084
* Last code value: 2086
*/
private Msg() {}

View File

@ -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."

View File

@ -117,7 +117,7 @@ public abstract class BaseSubscriptionsR4Test extends BaseResourceProviderR4Test
protected Subscription createSubscription(String theCriteria, String thePayload, Extension theExtension) {
Subscription subscription = newSubscription(theCriteria, thePayload);
if (theExtension != null) {
subscription.getExtension().add(theExtension);
subscription.getChannel().addExtension(theExtension);
}
MethodOutcome methodOutcome = myClient.create().resource(subscription).execute();

View File

@ -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) {
retVal.setSendDeleteMessages(((BooleanType) extension.getValue()).booleanValue());
}

View File

@ -33,7 +33,7 @@ class SubscriptionCanonicalizerTest {
Extension sendDeleteMessagesExtension = new Extension()
.setUrl(EX_SEND_DELETE_MESSAGES)
.setValue(new BooleanType(true));
subscription.getExtension().add(sendDeleteMessagesExtension);
subscription.getChannel().addExtension(sendDeleteMessagesExtension);
CanonicalSubscription canonicalSubscription = testedSC.canonicalize(subscription);