Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Subscriptions correctly interpreting the payload #1357
Currently the subscription framework in HAPI-FHIR does not correctly interpret the meaning of the Subscription.channel.payload property. The payload property is described by the FHIR spec as:
Right now, HAPI-FHIR simply sends the raw text value of the Subscription.channel.payload property, rather than using the value of the payload property to determine how (or whether) to serialize the resource that triggered the subscription in the body of the notification (whether that be a rest-hook subscription or an email subscription).
This changes make it so that it HAPI tests the value of the Subscription.channel.payload and serializes the resource that triggered the subscription in the body of the notification, which should align with the FHIR specification's intent.
Aug 14, 2019
FYI- This unfortunately seems to have caused a bunch of downstream regressions in other projects that were depending on the serialized resource being in the delivery message (i.e. the one in the queue, in ResourceDeliveryMessage) even if no payload type was specified. I'm going to see if I can tweak this to keep the right behaviour without dropping that functionality.