NHS Digital FHIR Implementation Guide (Retired - 2.1.50)

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.

issueType-to-http-status-code

Url
https://fhir.nhs.uk/ConceptMap/issueType-to-http-status-code
Source CodeSystem Destination CodeSystem
http://hl7.org/fhir/issue-type http://hl7.org/fhir/http-status-code (for reference only, not an actual CodeSystem)

SourceEquivalenceDestinationComment
not-found (Not Found)specializes404 (Not Found)
value (Element value invalid)specializes400 (Bad Request)
business-rule (Business Rule Violation)specializes400 (Bad Request)Should be 422?
invalid (Invalid Content)specializes400 (Bad Request)
invalid (Invalid Content)specializes422 (UNPROCESSABLE_ENTITY)Should be 400?
code-invalid (Invalid Code)specializes400 (BAD REQUEST)Should be 422?
forbidden (Forbidden)specializes403 (Forbidden)
forbidden (Forbidden)specializes401 (CLIENT_UNAUTHORIZED)Wrong issueType - login/unknown better?
forbidden (Forbidden)specializes405 (METHOD_NOT_ALLOWED)Is 405 more suited to wrong http verb being used. This should still be 403
duplicate (Duplicate)specializes422 (UNPROCESSABLE_ENTITY)
structure (Structural Issue)specializes400 (BAD REQUEST)
not-supported (Content not supported)specializes501 (NOT_IMPLEMENTED)
processing (Processing Failure)specializes500 (INTERNAL_ERROR)Mapping is wrong here. processing should be 422
informational (Informational Note)specializes201 (CREATED)
informational (Informational Note)specializes200 (OK)
informational (Informational Note)specializes202 (ACCEPTED)
{
    "resourceType": "ConceptMap",
    "id": "issueType-to-http-status-code",
    "url": "https://fhir.nhs.uk/ConceptMap/issueType-to-http-status-code",
    "version": "1.0.0",
    "name": "issueTypetohttpstatuscode",
    "title": "issueType-to-http-status-code",
    "status": "draft",
    "experimental": true,
    "date": "2020-08-05",
    "publisher": "NHS Digital",
    "description": "issueType-to-http-status-code for illustration only. Mapping extracted from HAPI FHIR",
    "purpose": "NHS Digital Spine",
    "group":  [
        {
            "source": "http://hl7.org/fhir/issue-type",
            "target": "http://hl7.org/fhir/http-status-code",
            "element":  [
                {
                    "code": "not-found",
                    "display": "Not Found",
                    "target":  [
                        {
                            "code": "404",
                            "display": "Not Found",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "value",
                    "display": "Element value invalid",
                    "target":  [
                        {
                            "code": "400",
                            "display": "Bad Request",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "business-rule",
                    "display": "Business Rule Violation",
                    "target":  [
                        {
                            "code": "400",
                            "display": "Bad Request",
                            "equivalence": "specializes",
                            "comment": "Should be 422?"
                        }
                    ]
                },
                {
                    "code": "invalid",
                    "display": "Invalid Content",
                    "target":  [
                        {
                            "code": "400",
                            "display": "Bad Request",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "invalid",
                    "display": "Invalid Content",
                    "target":  [
                        {
                            "code": "422",
                            "display": "UNPROCESSABLE_ENTITY",
                            "equivalence": "specializes",
                            "comment": "Should be 400?"
                        }
                    ]
                },
                {
                    "code": "code-invalid",
                    "display": "Invalid Code",
                    "target":  [
                        {
                            "code": "400",
                            "display": "BAD REQUEST",
                            "equivalence": "specializes",
                            "comment": "Should be 422?"
                        }
                    ]
                },
                {
                    "code": "forbidden",
                    "display": "Forbidden",
                    "target":  [
                        {
                            "code": "403",
                            "display": "Forbidden",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "forbidden",
                    "display": "Forbidden",
                    "target":  [
                        {
                            "code": "401",
                            "display": "CLIENT_UNAUTHORIZED",
                            "equivalence": "specializes",
                            "comment": "Wrong issueType - login/unknown better?"
                        }
                    ]
                },
                {
                    "code": "forbidden",
                    "display": "Forbidden",
                    "target":  [
                        {
                            "code": "405",
                            "display": "METHOD_NOT_ALLOWED",
                            "equivalence": "specializes",
                            "comment": "Is 405 more suited to wrong http verb being used. This should still be 403"
                        }
                    ]
                },
                {
                    "code": "duplicate",
                    "display": "Duplicate",
                    "target":  [
                        {
                            "code": "422",
                            "display": "UNPROCESSABLE_ENTITY",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "structure",
                    "display": "Structural Issue",
                    "target":  [
                        {
                            "code": "400",
                            "display": "BAD REQUEST",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "not-supported",
                    "display": "Content not supported",
                    "target":  [
                        {
                            "code": "501",
                            "display": "NOT_IMPLEMENTED",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "processing",
                    "display": "Processing Failure",
                    "target":  [
                        {
                            "code": "500",
                            "display": "INTERNAL_ERROR",
                            "equivalence": "specializes",
                            "comment": "Mapping is wrong here. processing should be 422"
                        }
                    ]
                },
                {
                    "code": "informational",
                    "display": "Informational Note",
                    "target":  [
                        {
                            "code": "201",
                            "display": "CREATED",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "informational",
                    "display": "Informational Note",
                    "target":  [
                        {
                            "code": "200",
                            "display": "OK",
                            "equivalence": "specializes"
                        }
                    ]
                },
                {
                    "code": "informational",
                    "display": "Informational Note",
                    "target":  [
                        {
                            "code": "202",
                            "display": "ACCEPTED",
                            "equivalence": "specializes"
                        }
                    ]
                }
            ]
        }
    ]
}
<ConceptMap xmlns="http://hl7.org/fhir">
    <id value="issueType-to-http-status-code" />
    <url value="https://fhir.nhs.uk/ConceptMap/issueType-to-http-status-code" />
    <version value="1.0.0" />
    <name value="issueTypetohttpstatuscode" />
    <title value="issueType-to-http-status-code" />
    <status value="draft" />
    <experimental value="true" />
    <date value="2020-08-05" />
    <publisher value="NHS Digital" />
    <description value="issueType-to-http-status-code for illustration only. Mapping extracted from HAPI FHIR" />
    <purpose value="NHS Digital Spine" />
    <group>
        <source value="http://hl7.org/fhir/issue-type" />
        <target value="http://hl7.org/fhir/http-status-code" />
        <element>
            <code value="not-found" />
            <display value="Not Found" />
            <target>
                <code value="404" />
                <display value="Not Found" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="value" />
            <display value="Element value invalid" />
            <target>
                <code value="400" />
                <display value="Bad Request" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="business-rule" />
            <display value="Business Rule Violation" />
            <target>
                <code value="400" />
                <display value="Bad Request" />
                <equivalence value="specializes" />
                <comment value="Should be 422?" />
            </target>
        </element>
        <element>
            <code value="invalid" />
            <display value="Invalid Content" />
            <target>
                <code value="400" />
                <display value="Bad Request" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="invalid" />
            <display value="Invalid Content" />
            <target>
                <code value="422" />
                <display value="UNPROCESSABLE_ENTITY" />
                <equivalence value="specializes" />
                <comment value="Should be 400?" />
            </target>
        </element>
        <element>
            <code value="code-invalid" />
            <display value="Invalid Code" />
            <target>
                <code value="400" />
                <display value="BAD REQUEST" />
                <equivalence value="specializes" />
                <comment value="Should be 422?" />
            </target>
        </element>
        <element>
            <code value="forbidden" />
            <display value="Forbidden" />
            <target>
                <code value="403" />
                <display value="Forbidden" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="forbidden" />
            <display value="Forbidden" />
            <target>
                <code value="401" />
                <display value="CLIENT_UNAUTHORIZED" />
                <equivalence value="specializes" />
                <comment value="Wrong issueType - login/unknown better?" />
            </target>
        </element>
        <element>
            <code value="forbidden" />
            <display value="Forbidden" />
            <target>
                <code value="405" />
                <display value="METHOD_NOT_ALLOWED" />
                <equivalence value="specializes" />
                <comment value="Is 405 more suited to wrong http verb being used. This should still be 403" />
            </target>
        </element>
        <element>
            <code value="duplicate" />
            <display value="Duplicate" />
            <target>
                <code value="422" />
                <display value="UNPROCESSABLE_ENTITY" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="structure" />
            <display value="Structural Issue" />
            <target>
                <code value="400" />
                <display value="BAD REQUEST" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="not-supported" />
            <display value="Content not supported" />
            <target>
                <code value="501" />
                <display value="NOT_IMPLEMENTED" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="processing" />
            <display value="Processing Failure" />
            <target>
                <code value="500" />
                <display value="INTERNAL_ERROR" />
                <equivalence value="specializes" />
                <comment value="Mapping is wrong here. processing should be 422" />
            </target>
        </element>
        <element>
            <code value="informational" />
            <display value="Informational Note" />
            <target>
                <code value="201" />
                <display value="CREATED" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="informational" />
            <display value="Informational Note" />
            <target>
                <code value="200" />
                <display value="OK" />
                <equivalence value="specializes" />
            </target>
        </element>
        <element>
            <code value="informational" />
            <display value="Informational Note" />
            <target>
                <code value="202" />
                <display value="ACCEPTED" />
                <equivalence value="specializes" />
            </target>
        </element>
    </group>
</ConceptMap>

back to top