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-7b4d-4f8a-9c2e-123456789abc",
3 "sender": {
4 "hciCode": "S1234",
5 "name": "Sunrise Medical Centre",
6 "block": "123",
7 "streetName": "Health Avenue",
8 "buildingName": "Sunrise Building",
9 "floorNumber": "5",
10 "unitNumber": "05-12",
11 "postalCode": "567890"
12 },
13 "senderSystem": "HAS",
14 "offering": {
15 "id": "off-9876",
16 "name": "General Surgery Consultation",
17 "institutionHciCode": "S1234",
18 "institution": {
19 "hciCode": "S1234",
20 "name": "Sunrise Medical Centre",
21 "block": "123",
22 "streetName": "Health Avenue",
23 "buildingName": "Sunrise Building",
24 "floorNumber": "5",
25 "unitNumber": "05-12",
26 "postalCode": "567890"
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": "General Surgery",
35 "nehrCode": "GS123"
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": "Maple Street",
48 "floorNumber": "12",
49 "unitNumber": "12-34"
50 },
51 "residentialStatus": "SC",
52 "nationality": "Singapore",
53 "isHsgEnrolled": true
54 },
55 "referringDoctor": {
56 "mcr": "MCR123456",
57 "idType": "mcr",
58 "name": "Dr. Sarah Lim",
59 "email": "sarah.lim@clinic.sg",
60 "contactNumber": "98765432"
61 },
62 "isSubsidised": true,
63 "isUrgent": true,
64 "createdAt": "2024-05-01T09:30:00Z",
65 "updatedAt": "2024-05-02T10:00:00Z",
66 "formResponses": [
67 {
68 "question": "What symptoms are you experiencing?",
69 "id": "q1",
70 "answer": "Abdominal pain and nausea"
71 }
72 ],
73 "attachments": [
74 {
75 "url": "https://refer.health.gov.sg/attachments/ecg-report.png",
76 "name": "ecg-report.png"
77 }
78 ],
79 "coreStatus": "draft",
80 "isCancellable": true,
81 "notes": [
82 {
83 "id": "note-001",
84 "content": "Referral created and awaiting confirmation.",
85 "authorHciCode": "S1234",
86 "authorName": "Nurse Lee",
87 "createdAt": 1682923200,
88 "updatedAt": 1682926800
89 }
90 ],
91 "status": "draft",
92 "forms": [
93 {
94 "id": "form-001",
95 "url": "https://refer.health.gov.sg/forms/form-001",
96 "description": "Pre-consultation questionnaire",
97 "isFilled": true,
98 "formResponses": [
99 {
100 "question": "Do you have any allergies?",
101 "id": "q2",
102 "answer": "No known allergies"
103 }
104 ],
105 "remark": "Please complete before appointment",
106 "fields": [
107 {}
108 ],
109 "version": 1.1,
110 "migrated": true
111 }
112 ],
113 "url": "https://refer.health.gov.sg/referrals/a3f1c9e2-7b4d-4f8a-9c2e-123456789abc",
114 "clinicLicenseNumber": "CLN-56789",
115 "clinicType": "CHAS-only",
116 "clinicalInfo": "Patient has a history of hypertension and is currently on medication.",
117 "timeslotStartAt": "2024-05-10T14:00:00Z",
118 "appointmentLocation": "Sunrise Medical Centre, 5th Floor, Consultation Room 3"
119}
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