For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Home
    • About the Referral Exchange (RefX)
  • Getting Started
    • API Overview
    • Accessing our APIs
    • Authentication
    • Content Types
    • Request and Response Limits
    • Create and Edit Referrals
    • Print Referrals
    • List Referrals
    • Cancel & Withdraw Referrals
    • Timeline Events
    • Implementation Reference
  • Concepts
    • Referral Lifecycle & Statuses
    • Referral Notes
    • Browser Tab Handling
    • Referral Link
    • NEHR Integration
  • API Reference
      • DELDelete a draft referral
      • POSTCancel a referral
      • POSTConvert a referral to draft
    • Changelog
LogoLogo
API ReferenceUpdating Referrals

Cancel a referral

POST
/api/v1/referrals/:referralId/cancel
POST
/api/v1/referrals/:referralId/cancel
$curl -X POST https://dummy-url-see-smartcms-spec/api/v1/referrals/referralId/cancel \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "cancelNote": "Patient requested cancellation due to scheduling conflict.",
> "institutionIdType": "hci",
> "institutionId": "S1234"
>}'
1{
2 "id": "a3f1c9e2-4b7d-4f8a-9c2e-1d2f3b4a5c6d",
3 "sender": {
4 "hciCode": "S1234",
5 "name": "Singapore General Hospital",
6 "block": "123",
7 "streetName": "Outram Road",
8 "buildingName": "Main Building",
9 "floorNumber": "5",
10 "unitNumber": "12A",
11 "postalCode": "169608"
12 },
13 "senderSystem": "HAS",
14 "offering": {
15 "id": "off-9876",
16 "name": "Cardiology Consultation",
17 "institutionHciCode": "S1234",
18 "institution": {
19 "hciCode": "S1234",
20 "name": "Singapore General Hospital",
21 "block": "123",
22 "streetName": "Outram Road",
23 "buildingName": "Main Building",
24 "floorNumber": "5",
25 "unitNumber": "12A",
26 "postalCode": "169608"
27 },
28 "system": "HAS",
29 "description": "Before proceeding with your referral, please refer to the [guidelines of referrals to this SOC](https://go.gov.sg/refx-nuhs-gastro-guidelines).",
30 "isActive": true,
31 "isSubsidisable": true,
32 "timeslotPolicy": "timeslot-required",
33 "category": "aac",
34 "specialty": "Cardiology",
35 "nehrCode": "NEHR12345"
36 },
37 "patient": {
38 "uin": "S1234567A",
39 "name": "John Tan",
40 "phoneNumber": "91234567",
41 "dob": "1985-07-15",
42 "gender": "Male",
43 "chasStatus": "Orange",
44 "address": {
45 "postalCode": "560123",
46 "block": "45",
47 "streetName": "Bukit Timah Road",
48 "floorNumber": "10",
49 "unitNumber": "1003"
50 },
51 "residentialStatus": "SC",
52 "nationality": "Singapore"
53 },
54 "referringDoctor": {
55 "mcr": "MCR123456",
56 "idType": "mcr",
57 "name": "Dr. Lim Wei",
58 "email": "weilim@exampleclinic.sg",
59 "contactNumber": "98765432"
60 },
61 "isSubsidised": true,
62 "isUrgent": false,
63 "createdAt": "2024-05-01T09:30:00Z",
64 "updatedAt": "2024-05-02T14:45:00Z",
65 "formResponses": [
66 {
67 "question": "What are the patient's symptoms?",
68 "id": "q1",
69 "answer": "Chest pain and shortness of breath"
70 }
71 ],
72 "attachments": [
73 {
74 "url": "https://refer.health.gov.sg/attachments/ecg-report.png",
75 "name": "ecg-report.png"
76 }
77 ],
78 "coreStatus": "cancelled",
79 "isCancellable": false,
80 "notes": [
81 {
82 "id": "note-001",
83 "content": "Referral cancelled by patient due to scheduling conflict.",
84 "authorHciCode": "S1234",
85 "authorName": "Nurse Lee",
86 "createdAt": 1714608000,
87 "updatedAt": 1714608000
88 }
89 ],
90 "status": "cancelled",
91 "forms": [
92 {
93 "id": "form-001",
94 "url": "https://refer.health.gov.sg/forms/form-001",
95 "description": "Cardiology Referral Form",
96 "isFilled": true,
97 "formResponses": [
98 {
99 "question": "What are the patient's symptoms?",
100 "id": "q1",
101 "answer": "Chest pain and shortness of breath"
102 }
103 ],
104 "remark": "Please complete all fields before submission.",
105 "fields": [
106 {}
107 ],
108 "version": 1.1,
109 "migrated": true
110 }
111 ],
112 "url": "https://refer.health.gov.sg/referrals/a3f1c9e2-4b7d-4f8a-9c2e-1d2f3b4a5c6d",
113 "clinicLicenseNumber": "CLN-56789",
114 "clinicType": "CHAS-only",
115 "clinicalInfo": "Patient has a history of hypertension and previous myocardial infarction.",
116 "timeslotStartAt": "2024-05-10T10:00:00Z",
117 "appointmentLocation": "Singapore General Hospital, Cardiology Dept."
118}
Was this page helpful?
Previous

Convert a referral to draft

Next
Built with

Authentication

Authorizationstring

API key to authenticate for external integrations. Use the format: “ApiKey insert-token-here”

Path parameters

referralIdstringRequiredformat: "uuid"
Referral ID

Request

This endpoint expects an object.
cancelNotestringRequired<=8000 characters
Reason for cancelling the referral
institutionIdTypeenumRequired
The type of institution ID
Allowed values:
institutionIdstringRequired
The institution ID
cancelledByUinstringOptional
UIN of the person cancelling the referral, if available
cancelledByNamestringOptional
Name of the person cancelling the referral, if available

Response

idstring
senderobject
senderSystemenum
offeringobject
patientobject
referringDoctorobject
isSubsidisedboolean
isUrgentboolean
createdAtstring

Created at (ISO datetime)

updatedAtstring

Updated at (ISO datetime)

formResponseslist of objects
attachmentslist of objects
coreStatusenum
isCancellableboolean
Whether this referral can be cancelled
noteslist of objects
statusenumDeprecated
Deprecated. Use coreStatus instead.
formslist of objects
List of forms required to complete the referral
urlstring
URL to view the referral
clinicLicenseNumberstring
Clinic license number
clinicTypeenum
Clinic type
Allowed values:
clinicalInfostring
Any clinical information that is relevant to the referral, e.g. medical history, drug allergies, treatment provided, etc.
timeslotStartAtstring

Timeslot start time (ISO datetime)

appointmentLocationstring
Appointment location

Errors

401
Unauthorized Error