Withdraw Discharge Notice

Withdrawing a discharge notice informs the Social Care Team that a discharge is not going to happen as planned, and as such the Local Authority may have to amend/cancel service that have already been commissioned


HTTPS Request

Method:

PUT

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

NOTE: the Withdrawl Notice body will be the original Discharge Notice, with some addiitonal content. As such implementors MUST be able to replicate the original content of the Discharge Notice to be withdrawn

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


Response

Success

SHALL return a HTTP status code 200 OK 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 422 Unprocessable Entity

{
    "resourceType": "OperationOutcome",
    "issue":  [
        {
            "severity": "error",
            "code": "processing",
            "diagnostics": "DischargeNotice type QuestionnaireResponse status 'stopped' is invalid as the Discharge Notice is already withdrawn",
            "location":  [
                "QuestionnaireResponse.status = 'stopped'"
            ]
        }
    ]
}


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 status &#39;stopped&#39; is invalid as the Discharge Notice is already withdrawn" />
        <location value="QuestionnaireResponse.status = &#39;stopped&#39;" />
    </issue>
</OperationOutcome>



Profiles

The Issue Discharge Notice Use Care is supported by the following profiles

StructureDefinition Version
SHD-QuestionnaireResponse-DischargeNotice 0.0.1
Extensions Version
None
ValueSets Version
Assessment/Discharge Notice Carer Consultation Status 0.0.1
Discharge Notice Withdrawal Reason 0.0.1
CodeSystems Version
Assessment/Discharge Notice Carer Consultation Status 0.0.1
Supported Hospital Discharge Referral Cancellation Reason 0.0.1


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
The patient MUST already have been issued an Discharge Notice for the referral
The discharge notice MUST be active (i.e. not have already been withdrawn)

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 Withdraw DN: status=stopped
QuestionnaireResponse.authored 1..1 DateTime The date/time the Discharge Notice (which is being withdrawn) was actually issued/given to the Local Authority (Note: it is not the withdrawal Date/Time)
QuestionnaireResponse.item[withdrawalDate] 1..1 BackboneElement The date and time of withdrawal MUST be provided (i.e. QuestionnaireResponse.status='stopped')
QuestionnaireResponse.item[withdrawalReason] 1..1 BackboneElement The reason for withdrawal MUST be provided (i.e. QuestionnaireResponse.status='stopped')

Binding Discharge Notice Withdrawal Reason

Note: this ValueSet does not include all the codes from Supported Hospital Discharge Referral Cancellation Reason as many of the values would result in a cancelled referral rather than the wihdrawal fo the Discharge Notice (e.g. 08 - Patient has died)
QuestionnaireResponse.item[withdrawalOtherReasonDetail] 1..1 BackboneElement Additional reason text MUST be provided when withdrawl reason='Other' (i.e. QuestionnaireResponse.item[withdrawalReason].answer.valueCoding.code="13")

Examples

Request Body

NOTE: the Withdrawl Notice body will be the original Discharge Notice, with some addiitonal content. As such implementors MUST be able to replicate the original content of the Discharge Notice to be withdrawn

JSON example of a SHD-QuestionnaireResponse-DischargeNotice for a withdrawal

{
    "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": "stopped",
    "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-02-17"
                }
            ]
        },
        {
            "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..."
                }
            ]
        },
        {
            "linkId": "4.1",
            "text": "Date Discharge Notice Withdrawn",
            "answer":  [
                {
                    "valueDateTime": "2019-03-01T10:36:12Z"
                }
            ]
        },
        {
            "linkId": "4.2",
            "text": "Reason for withdrawal",
            "answer":  [
                {
                    "valueCoding": {
                        "system": "https://fhir.nottinghamshire.gov.uk/STU3/codesystem/SHD-CancellationReason",
                        "code": "13",
                        "display": "Other"
                    }
                }
            ]
        },
        {
            "linkId": "4.3",
            "text": "Please specify details for 'Other' reason for withdrawal",
            "answer":  [
                {
                    "valueString": "Other Reason text ........etc."
                }
            ]
        }
    ]
}


XML example of a SHD-QuestionnaireResponse-DischargeNotice for a withdrawal

<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="stopped" />
    <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-02-17" />
        </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..." />
        </answer>
    </item>
    <item>
        <linkId value="4.1" />
        <text value="Date Discharge Notice Withdrawn" />
        <answer>
            <valueDateTime value="2019-03-01T10:36:12Z" />
        </answer>
    </item>
    <item>
        <linkId value="4.2" />
        <text value="Reason for withdrawal" />
        <answer>
            <valueCoding>
                <system value="https://fhir.nottinghamshire.gov.uk/STU3/codesystem/SHD-CancellationReason" />
                <code value="13" />
                <display value="Other" />
            </valueCoding>
        </answer>
    </item>
    <item>
        <linkId value="4.3" />
        <text value="Please specify details for &#39;Other&#39; reason for withdrawal" />
        <answer>
            <valueString value="Other Reason text ........etc." />
        </answer>
    </item>
</QuestionnaireResponse>