snowstorm icon indicating copy to clipboard operation
snowstorm copied to clipboard

Incorrect support of TerminologyCapabilities (FHIR API)

Open fmacary opened this issue 1 year ago • 2 comments

Snowtorm does not handle correctly the FHIR request <<GET [base]/metadata?mode=terminology>> Its answer is: "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "processing", "diagnostics": "HAPI-1700: Unknown child name 'format' in element TerminologyCapabilities - Valid names are: [closure, codeSearch, codeSystem, contact, contained, copyright, date, description, expansion, experimental, extension, extension[x], id, implementation, implicitRules, jurisdiction, kind, language, lockedDate, meta, modifierExtension, modifierExtension[x], name, publisher, purpose, software, status, text, title, translation, url, useContext, validateCode, version]" } ] If the intent is not to support TerminologyCapabilities in 4.0.1 (for instance due to its low FMM in 4.0.1) then the answer should convey a clearer issue. It seems that the error lays in the underlying HAPI server.

fmacary avatar Aug 02 '23 12:08 fmacary

Thanks for reporting @fmacary, It looks like Snowstorm is ignoring the mode parameter and returning a CapabilityStatement resource rather than a TerminologyCapabilities resource. We will look into this.

kaicode avatar Aug 02 '23 13:08 kaicode

I had a go at this some time ago and what was happening there was that the HAPI library that we depend on was aggressively caching whatever Capabilities object is requested first, and then continued to return it even if the other parameter is passed. I raised this issue with them back in 2020: https://github.com/hapifhir/hapi-fhir/issues/1681

pgwilliams avatar Nov 09 '23 16:11 pgwilliams