Skip to content

Add support for update (PUT method) for QuestionnaireResponse resource #303

@teseshadri

Description

@teseshadri

We want to sync the QuestionnaireResponse resource back to FHIR server. However it reports error

Query tried

curl -X PUT -H "Content-Type: application/fhir+json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -d @queryresponse.json http://:/fhir/QuestionnaireResponse?subject=

querresponse.json used

{
"resourceType": "QuestionnaireResponse",
"status": "in-progress",
"subject": {"reference": "Patient/f48b2d13-f82e-44e5-84d0-1299480a63a6"},
"questionnaire":"c7f1b4f8-5d30-4968-b8c8-4aca4a618891"
}

FHIR Info G/W validates our requests and forwards to Healthcare API and emits the logs as:

15:22:41.654 [http-nio-8080-exec-2] ERROR com.google.fhir.gateway.HttpFhirClient [HttpFhirClient.java:155] Error in FHIR resource PUT https://healthcare.googleapis.com/v1/projects//fhir/QuestionnaireResponse?subject=f48b2d13-f82e-44e5-84d0-1299480a63a6 HTTP/1.1 method PUT; status HTTP/1.1 400 Bad Request

Final response as :

"issue": [
{
"code": "value",
"details": {
"text": "invalid_query"
},
"diagnostics": "only identifier is allowed as search parameter",
"severity": "error"
}
],
"resourceType": "OperationOutcome"

We understand QuestionnaireResponse supports only search params based requests. However after FHIR Info Gateway validates, it forwards the request with search params instead of replacing it with id based.

Please help us with a solution

Metadata

Metadata

Assignees

Labels

P1:mustAs issue that definitely needs to be implemented in near future.bugSomething isn't working

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions