FHIR Chat · Existing ValueSet/CodeSystem for HTTP Response Codes? · implementers

Stream: implementers

Topic: Existing ValueSet/CodeSystem for HTTP Response Codes?


view this post on Zulip Ken Sinn (Feb 05 2020 at 00:35):

Wondering if there is an existing ValueSet/CodingSystem that captures the HTTP response codes. The closest I found was https://www.hl7.org/fhir/valueset-assert-response-code-types.html, but the intent of these codes isn't quite the same as representing the response codes themselves (and is also incomplete, e.g. 401). Would prefer not to create a new ValueSet/CodeSystem if there is an existing one.

view this post on Zulip Scott Robertson (Feb 05 2020 at 00:46):

wouldn't HTTP response codes be considered an external code set / value set?

view this post on Zulip Ken Sinn (Feb 05 2020 at 00:53):

Is there an established URN for https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml , the same way we have for IETF or ISO codes?

view this post on Zulip Ken Sinn (Feb 05 2020 at 01:04):

Alternately, could someone use "urn:ietf:rfc:7231|403" and "urn:ietf:rfc:7235|401", with the RFC system changing depending on the HTTP response code? More onerous to manage, and it would only handle the codesystem and not the valueset.

view this post on Zulip Grahame Grieve (Feb 05 2020 at 03:22):

what's the use case?

view this post on Zulip Michael Lawley (Feb 05 2020 at 03:49):

I would argue that urn:ietf:rfc:7231 identifies the spec, not the code system (which is why you run into the RFC system changing depending on the code). With this style of approach, then I'd use the urn for the very first description of HTTP response codes as the system, and then use the subsequent rfc's as versions.
However, see https://confluence.hl7.org/display/TA/External+Code+System+Owner+Engagement+Process (being discussed by Vocab and HTA right now as I write this) about how to answer this question

view this post on Zulip Ken Sinn (Feb 05 2020 at 04:03):

Use case is for a composite FHIR service that calls multiple underlying FHIR services. For example, if this front-end FHIR service A calls two other services B and C, I want Service A to be able to return the HTTP response codes from B and C, say in OperationOutcome.issue[0].details.coding.system+code and OperationOutcome.issue[1].details.coding.system+code. Service A itself may have been successful in executing its own procedures, even though B may have been successful with a HTTP-200 while C returned a HTTP-405.

view this post on Zulip Ken Sinn (Feb 05 2020 at 16:11):

So I guess this means that there hasn't been an established URI for the IANA list of http status codes yet.
Wondering if using system="http://www.iana.org/assignments/http-status-codes" would be a reasonable interim solution, as opposed to the ur:ietf:rfc:... above.

view this post on Zulip Michael Lawley (Feb 05 2020 at 22:04):

That would definitely be my starting point

view this post on Zulip John Moehrke (Feb 05 2020 at 22:35):

major defect in that codeSystem is that it is missing 418... :-)

view this post on Zulip Michael Lawley (Feb 05 2020 at 22:39):

Worse, it is listed as unassigned!

view this post on Zulip Lloyd McKenzie (Feb 05 2020 at 22:41):

For Bundle.response.status, we just treat it as a string - because whether you get a code or code + string (and how that's formatted) can vary.


Last updated: Apr 12 2022 at 19:14 UTC