I'm using this hapi-fhir v4.2.0 server with jpa and it's working just fine. I have added a few patients and I'm able to GET/POST requests to my hapi-fhir localhost environment.
I'm also able to create a subscription using this URL: http://localhost:8080/hapi-fhir-jpaserver/fhir/Subscription with this body:
{
"resourceType": "Subscription",
"criteria": "Patient",
"reason": "Give me the patient",
"end": "2021-01-01T00:00:00Z",
"status": "requested",
"channel": {
"type": "rest-hook",
"endpoint": "http://localhost:1337",
"payload": "application/json"
}
}
Whenever I made a POST or PUT to a Patient
, the subscription should be triggered and send a POST request to http://localhost:1337
but nothing happens.
What I have tried:
- Changing
requested
toactive
- Changing criteria from
Patient
toPatient?name=John
- Removing
payload
argument - Reading the documentation
- Changing to
application/fhir+json
And still not working :( what I'm missing here guys?
Edit: My backend is a simple nodejs running with morgan
, so it will log every POST/GET/PUT attempt in the console.