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": "12",
7 "streetName": "Outram Road",
8 "buildingName": "Main Building",
9 "floorNumber": "5",
10 "unitNumber": "05-10",
11 "postalCode": "169608"
12 },
13 "senderSystem": "HAS",
14 "offering": {
15 "id": "offering-001",
16 "name": "Gastroenterology Consultation",
17 "institutionHciCode": "S1234",
18 "institution": {
19 "hciCode": "S1234",
20 "name": "Singapore General Hospital",
21 "block": "12",
22 "streetName": "Outram Road",
23 "buildingName": "Main Building",
24 "floorNumber": "5",
25 "unitNumber": "05-10",
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": "Gastroenterology",
35 "nehrCode": "GASTRO123"
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": "123",
47 "streetName": "Jurong West Street 41",
48 "floorNumber": "10",
49 "unitNumber": "10-123"
50 },
51 "residentialStatus": "SC",
52 "nationality": "Singapore",
53 "isHsgEnrolled": true
54 },
55 "referringDoctor": {
56 "mcr": "MCR123456",
57 "idType": "mcr",
58 "name": "Dr. Lim Wei",
59 "email": "weilim@clinic.sg",
60 "contactNumber": "98765432"
61 },
62 "isSubsidised": true,
63 "isUrgent": true,
64 "createdAt": "2024-05-01T00:00:00Z",
65 "updatedAt": "2024-05-01T00:00:00Z",
66 "formResponses": [
67 {
68 "question": "What are the patient's main symptoms?",
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 submission.",
85 "authorHciCode": "S1234",
86 "authorName": "Nurse Lee",
87 "createdAt": 1682899200,
88 "updatedAt": 1682899200
89 }
90 ],
91 "status": "draft",
92 "forms": [
93 {
94 "id": "form-001",
95 "url": "https://refer.health.gov.sg/forms/form-001",
96 "description": "Patient referral form for gastroenterology",
97 "isFilled": true,
98 "formResponses": [
99 {
100 "question": "What are the patient's main symptoms?",
101 "id": "q1",
102 "answer": "Abdominal pain and nausea"
103 }
104 ],
105 "remark": "Please complete all fields",
106 "fields": [
107 {
108 "fieldType": "text",
109 "label": "Symptoms",
110 "required": true
111 }
112 ],
113 "version": 1.1,
114 "migrated": true
115 }
116 ],
117 "url": "https://refer.health.gov.sg/referrals/3fa85f64-5717-4562-b3fc-2c963f66afa6",
118 "clinicLicenseNumber": "CLN-987654",
119 "clinicType": "CHAS-only",
120 "clinicalInfo": "Patient has a history of gastritis and allergic to penicillin.",
121 "timeslotStartAt": "2024-05-10T09:00:00Z",
122 "appointmentLocation": "SGH Outpatient Clinic 5A"
123}
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.
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