Fhir Subscription logic implemented in hapi or needs to be implemented?

477 views
Skip to first unread message

Thormgrim

unread,
Apr 4, 2018, 7:16:02 AM4/4/18
to HAPI FHIR
Hello there,
I'd like to use the Subscription Resource to notify my process of created questionnaire responses that have certain subjects and questionnaire refs.

I have read through the Javadoc and Github of Hapi Fhir but couldnt ascertain if the logic behind the subscription is already implemented ( especially the "checking created resources for critera" part ). 
So that is my question, is that logic already implemented inside hapifhir ?

The next question would be how would I define a criteria such as the questionnaireResponse having a specific patient ref, specific questionnaire and/or a specific identifier ?

Thanks for any help or insights in advance.

James Agnew

unread,
Apr 4, 2018, 8:13:43 AM4/4/18
to Thormgrim, HAPI FHIR
Hi,

Subscriptions are implemented, although not for every single delivery type. Have a look at SubscriptionRestHookInterceptor for an example. If you register this interceptor, your JPA server will begin processing REST HOOK subscriptions.

The unit tests for that class would be an ok starting point if you wanted to see how it works.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/09d7fa8f-c8e9-4597-92c6-ba13093f32db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thormgrim

unread,
Apr 4, 2018, 8:46:27 AM4/4/18
to HAPI FHIR
Okay thanks for the quick info. 
Will this work for the normal Hapi fhir Server aswell or is there a seperate interceptor for that one?

Thanks.

Am Mittwoch, 4. April 2018 14:13:43 UTC+2 schrieb James Agnew:
Hi,

Subscriptions are implemented, although not for every single delivery type. Have a look at SubscriptionRestHookInterceptor for an example. If you register this interceptor, your JPA server will begin processing REST HOOK subscriptions.

The unit tests for that class would be an ok starting point if you wanted to see how it works.

Cheers,
James
On Wed, Apr 4, 2018 at 7:16 AM, Thormgrim <fl...@gmx.net> wrote:
Hello there,
I'd like to use the Subscription Resource to notify my process of created questionnaire responses that have certain subjects and questionnaire refs.

I have read through the Javadoc and Github of Hapi Fhir but couldnt ascertain if the logic behind the subscription is already implemented ( especially the "checking created resources for critera" part ). 
So that is my question, is that logic already implemented inside hapifhir ?

The next question would be how would I define a criteria such as the questionnaireResponse having a specific patient ref, specific questionnaire and/or a specific identifier ?

Thanks for any help or insights in advance.

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

James Agnew

unread,
Apr 4, 2018, 8:52:13 AM4/4/18
to Thormgrim, HAPI FHIR
For the regular server, there is no equivalent. Subscriptions are pretty low-level stuff, I don't know that it would be possible to do it in a generic way and have it be useful. Unfortunately you'd have to implement from the ground up. The JPA code might be a useful guide though.

Cheers,
James

To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

Thormgrim

unread,
Apr 9, 2018, 3:12:23 AM4/9/18
to HAPI FHIR
Okay thanks, I'll consider that. 

Thanks again for all the info.

Anusha

unread,
May 3, 2018, 6:02:24 AM5/3/18
to HAPI FHIR

Hi All,

 

Iam working on Subscription with Resthook channel type of hapi-fhir V3.2.0, where iam getting error log as "Failure to handle Subscription payload" and
at the subscriber side Iam receiving that " No mapping found for HTTP request with URI [/hapi-fhir-jpaserver-example/Patient/102] in DispatcherServlet with name 'spring'".
Can anyone help me out with the issue.


Thank You. 

James Agnew

unread,
May 3, 2018, 6:09:12 AM5/3/18
to Anusha, HAPI FHIR
This probably means your endpoint in the Subscription definition is wrong.

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

Anusha

unread,
May 3, 2018, 6:56:06 AM5/3/18
to HAPI FHIR
Thank you james,but i have given the correct end point url,
and my doubt is whether we  need to configure any other things explicitly to create a channel to receive endpoints.

Anusha

unread,
May 3, 2018, 7:01:41 AM5/3/18
to HAPI FHIR
Hi james,

My subscription resource is
{
  "resourceType": "Subscription",
  
  "status": "requested",
  "contact": [
    {
      "system": "phone",
      "value": "ext 4123"
    }
  ],
  "end": "2021-01-01T00:00:00Z",
  "reason": "Monitor new neonatal function",
  "criteria": "Observation?category=social-history",
  "channel": {
    "type": "rest-hook",
    "endpoint": "http://ipaddress:port/hapi-fhir-jpaserver-example",
    "payload": "application/fhir+json"
  }
}

James Agnew

unread,
May 3, 2018, 8:07:05 AM5/3/18
to Anusha, HAPI FHIR
Again, this looks like your endpoint is wrong.

sent from my phone.

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages