FHIR Chat · CodeSystem.$validate-code with invalide url · terminology

Stream: terminology

Topic: CodeSystem.$validate-code with invalide url


view this post on Zulip Yunwei Wang (Jan 30 2018 at 16:12):

When the url parameter is not a valid code system url, what should the server return? Is that 200 with Parameter.name("result").value() = false? Or OoperationOutcome with Error code 4xx?
Example: GET [base]/CodeSystem/$validate-code?code=399211009&url=http://snomed.info/sct-invalid

view this post on Zulip Grahame Grieve (Jan 30 2018 at 16:15):

200 with result = false (the request itself is well formed, and the server validation isn't in error)

view this post on Zulip Peter Jordan (Jan 30 2018 at 16:15):

Unless it's an incorrectly formatted URL, a Terminology Server can only state that it doesn't support/recognise a code system, not that it doesn't exist anywhere.

view this post on Zulip Yunwei Wang (Feb 05 2018 at 20:49):

Talked to different people during last week's WGM. I feel we need clarify this behavior in fhir spec. Here are different use cases for the "invalid url":
UseCase-1: The url is NOT resolvable. Example: GET [base]/CodeSystem/$validate-code?code=399211009&url=http://snomed.info/sctx (extra character 'x' at the end of url)
UseCase-2: The url is resolvable but is not a code system url. Example: GET [base]/CodeSystem/$validate-code?code=399211009&url=http://snomed.info
UseCase-3: The url is resolveable and is a validate code system url but the terminology server doesn't host/support/provide such code system. Example: GET [base]/CodeSystem/$validate-code?code=399211009&url=http://snomed.info/sct but server doesn't provide SNOMED-CT code system.
The first option is to return HTTP 200 with Parameter result=false. This is aligned with other CodeSystem operations such as $lookup.
The second option is to return HTTP 404 (or other 4xx status) since the CodeSystem result referenced by url parameter doesn't exist on terminology server. This is aligned with ValueSet.$validate-code operation.

What's your opinion? Is there any other options other than the two above?

view this post on Zulip Peter Jordan (Feb 05 2018 at 21:53):

CodeSystem.url is a uri, so doesn't have to be resolvable e.g. http://snomed.info/sct. Therefore the only consideration is whether the uri, passed as a search or operation parameter, is recognised by the target server.

view this post on Zulip Yunwei Wang (Feb 05 2018 at 22:59):

After thinking this again (and again, and..), now I understand your point.


Last updated: Apr 12 2022 at 19:14 UTC