Skip to main content
POST/transactional-api/create-patient-request

Create Patient Request

Submits a patient request to Medicus on behalf of a patient. Use medical for clinical concerns and admin for administrative matters.

Authorization: Bearer token (JWT). See Authentication.

Request

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/create-patient-request' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"requestType": "medical",
"requester": "patient",
"response": [
{
"question": "healthConcern",
"answer": "Persistent chest pain for three days."
}
],
"isHighPriority": false,
"proxyDetails": {
"firstName": "Jane",
"lastName": "Doe",
"relationshipToPatient": "Mother"
},
"attachments": [
{
"fileName": "ecg-result.jpg",
"contentType": "image/jpeg",
"data": "/9j/4AAQSkZJRgAB..."
}
]
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
requestTypeenumYesType of patient request. One of: medical, admin.
requesterenumYesWho is submitting the request. One of: patient, proxy.
responsearray<object>YesQuestion/answer pairs for the request. Must contain at least one item. The question value must be one of the fixed keys for the given requestType: medical accepts healthConcern and recentContact; admin accepts requestDetails.
isHighPriorityboolean (nullable)NoWhether the request should be flagged as high priority.
proxyDetailsobject (nullable)NoRequired when requester is proxy. All three fields are required: firstName (given name of the proxy), lastName (family name of the proxy), relationshipToPatient (the proxy's relationship to the patient, e.g. Mother, Carer).
attachmentsarray<object> (nullable)NoOptional file attachments. Maximum 5 attachments, each up to 10 MB. Allowed types: JPEG, PNG, DOC, DOCX.

Responses

200 Patient request created.
{
"patientRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
400 Validation error.
13 possible code values
CodeDescriptionWhen
missing-patient-idThe patientId is requiredpatientId missing
invalid-patient-idThe patientId is not validpatientId not a valid UUID
patient-not-foundPatient not found for this patientIdpatientId doesn't exist
invalid-request-typeThe requestType must be medical or adminrequestType is not medical or admin
invalid-requesterThe requester must be patient or proxyrequester is not patient or proxy
missing-proxy-detailsproxyDetails is required when requester is proxyrequester is proxy but proxyDetails is absent
invalid-proxy-detailsproxyDetails must include firstName, lastName, and relationshipToPatientproxyDetails is present but missing firstName, lastName, or relationshipToPatient
too-many-attachmentsA maximum of 5 attachments may be includedmore than 5 attachments supplied
invalid-attachment-contentAttachment content is not valid base64attachment data is not valid base64
attachment-too-largeAttachment exceeds the 10 MB size limitattachment exceeds 10 MB
unsupported-file-typeAttachment content type is not supported. Allowed types: image/jpeg, image/png, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.documentattachment contentType is not jpeg, png, doc, or docx
empty-responseresponse must contain at least one question and answerresponse is an empty array
invalid-questionInvalid question key. Allowed values for medical requests: healthConcern, recentContacta response item uses an unrecognised question key
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}