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

Delete a draft referral

DELETE
/api/v1/referrals/:referralId
DELETE
/api/v1/referrals/:referralId
$curl -X DELETE "https://dummy-url-see-smartcms-spec/api/v1/referrals/referralId?institutionIdType=hci&institutionId=institutionId" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
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": "05-12",
11 "postalCode": "169608"
12 },
13 "senderSystem": "HAS",
14 "offering": {
15 "id": "off-9876",
16 "name": "Cardiology Specialist Clinic",
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": "05-12",
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-20",
42 "gender": "Male",
43 "chasStatus": "Orange",
44 "address": {
45 "postalCode": "560123",
46 "block": "45",
47 "streetName": "Ang Mo Kio Avenue 3",
48 "floorNumber": "12",
49 "unitNumber": "12-34"
50 },
51 "residentialStatus": "SC",
52 "nationality": "Singapore"
53 },
54 "referringDoctor": {
55 "mcr": "MCR123456",
56 "idType": "mcr",
57 "name": "Dr. Lim Wei",
58 "email": "weilim@clinic.sg",
59 "contactNumber": "98765432"
60 },
61 "isSubsidised": true,
62 "isUrgent": true,
63 "createdAt": "2024-05-01T08:30:00Z",
64 "updatedAt": "2024-05-01T10:00:00Z",
65 "formResponses": [
66 {
67 "question": "What is the primary reason for referral?",
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-20240430.png",
75 "name": "ecg-report.png"
76 }
77 ],
78 "coreStatus": "draft",
79 "isCancellable": true,
80 "notes": [
81 {
82 "id": "note-001",
83 "content": "Initial referral draft created.",
84 "authorHciCode": "S1234",
85 "authorName": "Dr. Lim Wei",
86 "createdAt": 1682928000,
87 "updatedAt": 1682928000
88 }
89 ],
90 "status": "draft",
91 "submittedAt": "2024-05-01T09:00:00Z",
92 "forms": [
93 {
94 "id": "form-123",
95 "url": "https://refer.health.gov.sg/forms/form-123",
96 "description": "Cardiology referral form",
97 "isFilled": true,
98 "formResponses": [
99 {
100 "question": "Describe symptoms",
101 "id": "f1q1",
102 "answer": "Intermittent chest pain for 2 weeks"
103 }
104 ],
105 "remark": "Please complete all fields",
106 "fields": [
107 {
108 "fieldType": "text",
109 "label": "Symptoms description"
110 }
111 ],
112 "version": 1.1,
113 "migrated": true
114 }
115 ],
116 "url": "https://refer.health.gov.sg/referrals/3fa85f64-5717-4562-b3fc-2c963f66afa6",
117 "clinicLicenseNumber": "CLN-56789",
118 "clinicType": "CHAS-only",
119 "clinicalInfo": "Patient has a history of hypertension and diabetes. Allergic to penicillin.",
120 "timeslotStartAt": "2024-05-10T14:00:00Z",
121 "appointmentLocation": "SGH Cardiology Clinic, 5th Floor"
122}
Was this page helpful?
Previous

Cancel a referral

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

Query parameters

institutionIdTypeenumRequired
The type of institution ID
Allowed values:
institutionIdstringRequired
The institution ID

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.
submittedAtstring

Submitted at (ISO datetime). Absent if the referral is a draft.

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