$diff operation fails

113 views
Skip to first unread message

christophe spielmann

unread,
May 4, 2021, 11:14:56 AM5/4/21
to HAPI FHIR

Hello,
I would like to use the $diff operation,
in the documentation it is somehow confusing:

I tried among other stuffs:
but got always something like
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[$diff] with parameters [[from, to]]"
}

Is my call wrong ? or  I need to enable it server side ?
X-Powered-By: HAPI FHIR 4.1.0 REST Server (FHIR Server; FHIR 4.0.0/R4)

i will try on a public server....

James Agnew

unread,
May 4, 2021, 11:19:00 AM5/4/21
to christophe spielmann, HAPI FHIR
FWIW: HAPI FHIR 4.1.0 is a really old build, I don't think the $diff operation was added until much later than that. Also, you do need to explicitly register DiffProvider against your server.

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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/f09d9088-852c-46cc-a4e1-610d07708a6dn%40googlegroups.com.

Tauqeer Ahmed

unread,
Nov 29, 2022, 6:31:40 AM11/29/22
to HAPI FHIR
Hi james,

I have a similar query,  Can you please provide some info on how to register DiffProvider against my server?

Thanks.

James Agnew

unread,
Nov 29, 2022, 5:26:35 PM11/29/22
to Tauqeer Ahmed, HAPI FHIR
In a JPA server, you'd need to @Autowire it so that boot gives you an instance (or ask the spring context for an instance of DiffProvider) and then register it against the RestfulServer by calling myRestfulServer.registerProvider(myDiffProvider);

If this isn't already happening in the JPA Starter project, certainly a PR to add it would be welcomed.

Cheers,
James

Tauqeer Ahmed

unread,
Dec 5, 2022, 6:47:34 AM12/5/22
to HAPI FHIR
Thanks james,
It worked for me. But wanted to know if there is anything that can compare multiple entries at a time, without having to provide ID's as such.

Thanks,
Ahmed.

James Agnew

unread,
Dec 5, 2022, 12:58:44 PM12/5/22
to Tauqeer Ahmed, HAPI FHIR
I'm not sure I follow. How would it know what to compare if you don't provide an ID?

Reply all
Reply to author
Forward
0 new messages