Open KevinMayfield opened 6 years ago
Is this an issue with the demonstrator? If so could you log in that project?
nhsconnect/gpconnect-demonstrator
What is the correct behaviour for GP connect? I wasn't able to find an equivalent to this NRLS page https://developer.nhs.uk/apis/nrls/development_general_api_guidance.html
Can be closed from HAPI client perspective.
The work around for hapi client is to not use the setEncoding method:
clientGPC.setEncoding(EncodingEnum.XML);
See here:
https://nhsconnect.github.io/gpconnect/development_general_api_guidance.html#content-types
We don’t have universal support for XML from providing systems, so JSON is the preferred format, though some providers do support XML.
What I mean is if you support xml then the supported codes should be as per
https://www.hl7.org/fhir/http.html#mime-type
In particular "For the _format parameter, the values xml, text/xml, application/xml, and application/fhir+xml SHALL be interpreted to mean the XML format, the codes json, application/json and application/fhir+json SHALL be interpreted to mean the JSON format"
HAPI client setEncoding method uses xml or json codes which GP Connect doesn't support.
Hi Kev, noted.
We currently only support the formal MIME types of "application/fhir+xml" and "application/fhir+json".
Will keep this open for a future iteration.
See also https://github.com/nhsconnect/nrls-reference-implementation/issues/4
Core issue is java libraries (HAPI FHIR) is defaulting to _format=xml which causes a 415 error from GP Connect. Have also logged on HAPI FHIR.
xml was supported on older FHIR versions.