IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
204 stars 80 forks source link

Incorrect support of TerminologyCapabilities (FHIR API) #540

Open fmacary opened 1 year ago

fmacary commented 1 year ago

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.

kaicode commented 1 year ago

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.

pgwilliams commented 10 months ago

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