Stream: implementers
Topic: Error in Subscription POST method
Prasanth Vijayan (Mar 16 2021 at 14:00):
I am investigating on a method with FHIR to get notified when Observation resource field value changes, patient admit/discharge cases.
For observation, i created a subscription resource and tried a HTTP POST method. But that POST method failed with error:
{
"severity": "error",
"code": "processing",
"diagnostics": "Failed to call access method: java.lang.NullPointerException: The validated object is null"
}
The Subscription resource which i have used is enclosed below:
{
"resourceType": "Subscription",
"status": "active",
"end": "2050-01-01T00:00:00Z",
"reason": "Monitor the admit/discharge of patient",
"criteria": "Observation?status=final",
"channel": {
"type": "rest-hook",
"endpoint": "URL",
"payload": "application/fhir+json",
"header": [
]
}
}
Any help would be really appreciated.
Thanks,
Prasanth
Lloyd McKenzie (Mar 16 2021 at 14:02):
That sounds like a bug in the server. What server were you hitting?
Prasanth Vijayan (Mar 16 2021 at 14:12):
Thanks!
Prasanth
Prasanth Vijayan (Mar 16 2021 at 14:25):
@Lloyd McKenzie I changed the server URL to http://hapi.fhir.org/baseR4. It does not have this issue.
Thanks,
Prasanth
Lloyd McKenzie (Mar 16 2021 at 14:46):
@James Agnew
James Agnew (Mar 16 2021 at 15:06):
That doesn't look like a valid R5 subscription, e.g. there is no "criteria" element in the R5 subscription model.
Note that R5 subscriptions are still a work in progress in HAPI, you have to use a contained resource for your Topic definition and not nearly all features are tested or working yet.
Last updated: Apr 12 2022 at 19:14 UTC