Issue Discharge Notice

The discharge notice is a key status in the Supported Hospital Discharge to Social Care process – it identifies that the Patient is ready for discharge (i.e. medically fit AND all other activies either completed or on track) and confirms the date that the hospital is working to re discharge.


HTTPS Request

Method:

PUT (conditional update).

Alternatively, the first time the QuestionnaireResponse is shared a conditional create can be used using the POST Method

Request URL:

The request URL will consist of 'https://'+'{Host}'+'{BaseURL}'+'?'+'{QueryString}'

Host Environments:

The Host URLs will determined by the service provider, for example the host URLs for the Nottinghamshire County Council Social Care Data Service are:

Environment Host
Test health-interoperability-test.nottscc.gov.uk
Live health-interoperability.nottscc.gov.uk

Base URL:

/ReferralService/v3/QuestionnaireResponse

Query String /Parameters:

Name Value
based-on ReferralRequest/{Referral ID}

Note: Absolute or Relative referencing is supported, however Parameter Value MUST be the same as the QuestionnaireResponse.basedOn.reference value in the request body

Example Request Url:

https://health-interoperability-test.nottscc.gov.uk/ReferralService/v3/QuestionnaireResponse?based-on=ReferralRequest/11284224



Request Body:

The Request body should be in either json or xml format

The primary base FHIR resource is a SHD-QuestionnaireResponse-DischargeNotice

See Examples for an illustration of the Request body of a typical Referral to Social Care for a Supported Hospital Discharge.


Response

Success

PUT SHALL return a HTTP status code 200 OK on successful execution of the request

Where a POST method used, SHALL return a HTTP status code 201 Created on successful execution of the request

Error

An Error SHALL return one of the following HTTP Status Codes and an OperationOutcome with details of the issue:

HTTP Code Display Description
400 Bad Request Poor Syntax or breaks a core FHIR constraint
401 Unauthorized User is not authorised to perform the request.
403 Forbidden The request is forbidden, authorization will not help.
409 Conflict User has requested to create a resource that already exists.
422 Unprocessable Entity The syntax is valid, but cannot be processed, e.g. breaks a business rule.
500 Internal Error The server encountered an unexpected condition which prevented it from fulfilling the request.

JSON example of an OperationOutcome for a Unprocessable Entity

{
    "resourceType": "OperationOutcome",
    "issue":  [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "DischargeNotice type QuestionnaireResponse create or update operation is invalid when there is no existing Assessment Notice",
            "location":  [
                "DischargeNotice type QuestionnaireResponse"
            ]
        }
    ]
}


XML example of an OperationOutcome for a 422 Unprocessable Entity

<OperationOutcome xmlns="http://hl7.org/fhir">
    <issue>
        <severity value="error" />
        <code value="processing" />
        <diagnostics value="DischargeNotice type QuestionnaireResponse create or update operation is invalid when there is no existing Assessment Notice" />
        <location value="DischargeNotice type QuestionnaireResponse" />
    </issue>
</OperationOutcome>



Rules and Mappings

The generic business context data mappings for the 'Madatory' and 'Must Support' elements are detailed in the Profiles section, however the section below deatils any specific rules or contrains that apply to this use case.

Pre-requisites

The patient MUST have an Active Referral Request
The patient MUST already have been issued an Assessment Notice for the referral

Data Mappings

SHD-QuestionnaireResponse-DischargeNotice

FHIR Element Card. Type Description/Business Context
QuestionnaireResponse.basedOn 1..1 Reference (CareConnect-SHD-ReferralRequest-1) Reference to the ReferralRequest the Assessment Notice relates to SHALL be provided when sent after the ReferralRequest.

Note: Absolute or Relative referencing is supported
QuestionnaireResponse.status 1..1 code Create DN: status=completed
Date Withdrawn & Withdrawal Reason should not be present

Update existing DN (implicit withdrawal & reissue): status=amended
Date Withdrawn & Withdrawal Reason must not be present

Re-issue DN after withdrawal: status=amended
Date Withdrawn & Withdrawal Reason must not be present
QuestionnaireResponse.authored 1..1 DateTime The date/time the Discharge Notice was actually issued/given to the Local Authority
QuestionnaireResponse.item[withdrawalDate] 0..0 BackboneElement Not Allowed on Create/Update/Re-issue a Discharge Notice
QuestionnaireResponse.item[withdrawalReason 0..0 BackboneElement Not Allowed on Create/Update/Re-issue a Discharge Notice
QuestionnaireResponse.item[withdrawalOtherReasonDetail] 0..0 BackboneElement Not Allowed on Create/Update/Re-issue a Discharge Notice

Examples

Request Body

JSON example of a SHD-QuestionnaireResponse-DischargeNotice

{
    "resourceType": "QuestionnaireResponse",
    "meta": {
        "profile":  [
            "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/SHD-QuestionnaireResponse-DischargeNotice"
        ]
    },
    "basedOn":  [
        {
            "reference": "ReferralRequest/123456"
        }
    ],
    "questionnaire": {
        "reference": "https://fhir.nottinghamshire.gov.uk/STU3/Questionnaire/SHD-Questionnaire-DischargeNotice"
    },
    "status": "completed",
    "authored": "2019-02-15T11:46:32Z",
    "item":  [
        {
            "linkId": "1.1",
            "text": "Name of person who completed the Discharge/Withdrawal Notice",
            "answer":  [
                {
                    "valueString": "DN Nurse"
                }
            ]
        },
        {
            "linkId": "1.2",
            "text": "Proposed Discharge Date",
            "answer":  [
                {
                    "valueDate": "2019-03-11"
                }
            ]
        },
        {
            "linkId": "2.1",
            "text": "Has the patient been consulted regarding the proposed discharge date?",
            "answer":  [
                {
                    "valueBoolean": true
                }
            ]
        },
        {
            "linkId": "2.2",
            "text": "Has the patient's carer (if applicable) been consulted regarding the proposed discharge date?",
            "answer":  [
                {
                    "valueCoding": {
                        "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/SHD-CarerConsultation",
                        "code": "N",
                        "display": "No"
                    }
                }
            ]
        },
        {
            "linkId": "3.1",
            "text": "Have all health action required for discharge been agreed and/or completed?",
            "answer":  [
                {
                    "valueBoolean": true
                }
            ]
        },
        {
            "linkId": "3.2",
            "text": "Details of health actions completed and any outstanding arrangements that the discharge is dependent upon",
            "answer":  [
                {
                    "valueString": "This and that stuff..."
                }
            ]
        }
    ]
}


XML example of a SHD-QuestionnaireResponse-DischargeNotice

<QuestionnaireResponse xmlns="http://hl7.org/fhir">
    <meta>
        <profile value="https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/SHD-QuestionnaireResponse-DischargeNotice" />
    </meta>
    <basedOn>
        <reference value="ReferralRequest/123456" />
    </basedOn>
    <questionnaire>
        <reference value="https://fhir.nottinghamshire.gov.uk/STU3/Questionnaire/SHD-Questionnaire-DischargeNotice" />
    </questionnaire>
    <status value="completed" />
    <authored value="2019-02-15T11:46:32Z" />
    <item>
        <linkId value="1.1" />
        <text value="Name of person who completed the Discharge/Withdrawal Notice" />
        <answer>
            <valueString value="DN Nurse" />
        </answer>
    </item>
    <item>
        <linkId value="1.2" />
        <text value="Proposed Discharge Date" />
        <answer>
            <valueDate value="2019-03-11" />
        </answer>
    </item>
    <item>
        <linkId value="2.1" />
        <text value="Has the patient been consulted regarding the proposed discharge date?" />
        <answer>
            <valueBoolean value="true" />
        </answer>
    </item>
    <item>
        <linkId value="2.2" />
        <text value="Has the patient&#39;s carer (if applicable) been consulted regarding the proposed discharge date?" />
        <answer>
            <valueCoding>
                <system value="https://fhir.nottinghamshire.gov.uk/STU3/codesystem/SHD-CarerConsultation" />
                <code value="N" />
                <display value="No" />
            </valueCoding>
        </answer>
    </item>
    <item>
        <linkId value="3.1" />
        <text value="Have all health action required for discharge been agreed and/or completed?" />
        <answer>
            <valueBoolean value="true" />
        </answer>
    </item>
    <item>
        <linkId value="3.2" />
        <text value="Details of health actions completed and any outstanding arrangements that the discharge is dependent upon" />
        <answer>
            <valueString value="This and that stuff..." />
        </answer>
    </item>
</QuestionnaireResponse>