Skip to main content
POST/transactional-api/create-encounter

Create Encounter

Creates a finalised encounter (consultation) against a patient record, with one or more topics, each carrying one or more headings. Coded entries are SNOMED CT conceptId + description pairs resolved against the NHS term browser. Optionally, observations, notes, and documents can be filed in the same atomic call: see the observations/notes/documents properties on a heading. Every observation, note, and document filed through this endpoint must be nested under a heading; top-level observations/notes/documents arrays are rejected.

Authorization: Bearer token (JWT). See Authentication.

Request​

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/create-encounter' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "4d59c916-9726-11ec-af3f-0a58a9feac02",
"encounterType": {
"conceptId": "185389009",
"description": "Telephone encounter"
},
"startDate": "2026-01-15",
"startTime": "09:00:00",
"hiddenFromPatientFacingServices": false,
"confidentialFromThirdParties": false,
"topics": [
{
"code": {
"conceptId": "185389009",
"description": "Telephone encounter"
},
"headings": [
{
"code": {
"conceptId": "185389009",
"description": "Telephone encounter"
},
"observations": [
{}
],
"notes": [
{}
],
"documents": [
{}
]
}
]
}
]
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
encounterTypeobjectYesSNOMED CT coded encounter type. Required.
startDatestring<date>NoEncounter start date (YYYY-MM-DD). Defaults to today.
startTimestringNoEncounter start time (HH:MM:SS).
hiddenFromPatientFacingServicesbooleanNoIf true, hidden from Patient Facing Services (IM1) such as the NHS App.
confidentialFromThirdPartiesbooleanNo
topicsarray<object>YesOne or more consultation topics. At least one is required, and each topic must contain at least one heading.

Responses​

200 Encounter created. A heading's observations, notes, and documents are only present when the corresponding request array was non-empty.

Response fields

FieldTypeDescription
idstring<uuid>Identifier of the created encounter.
topics[].idstring<uuid>
topics[].code.conceptIdstring
topics[].code.descriptionstring
topics[].headings[].idstring<uuid>
topics[].headings[].code.conceptIdstring
topics[].headings[].code.descriptionstring
topics[].headings[].observations[].idstring<uuid>
topics[].headings[].notes[].idstring<uuid>
topics[].headings[].documents[].idstring<uuid>
{
"id": "00000000-0000-0000-0000-000000000000",
"topics": [
{
"id": "00000000-0000-0000-0000-000000000000",
"code": {
"conceptId": "185389009",
"description": "Telephone encounter"
},
"headings": [
{
"id": "00000000-0000-0000-0000-000000000000",
"code": {
"conceptId": "185389009",
"description": "Telephone encounter"
},
"observations": [
{
"id": null
}
],
"notes": [
{
"id": null
}
],
"documents": [
{
"id": null
}
]
}
]
}
]
}
400 Validation error.
18 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-codeCould not resolve conceptId into a SNOMED CT code. Check the NHS term browser.a conceptId doesn't resolve to a SNOMED CT code
no-encounter-typeYou must specify an encounter type.encounterType missing
invalid-start-dateThe startDate is not a valid date in Y-m-d format.startDate not a valid date in Y-m-d format
invalid-start-timeThe startTime is not a valid time in H:i:s format.startTime not a valid time in H:i:s format
no-topicsYou must specify at least one topic.topics missing or empty
no-headingsYou must specify at least one heading.a topic's headings missing or empty
no-heading-codeYou must specify a code for the heading.a heading is missing a code
unattached-items-not-allowedObservations, notes, and documents must be nested under a heading; the top-level observations, notes, and documents arrays are not supported on this endpoint.a top-level observations, notes, or documents array is non-empty
no-codeYou must specify a SNOMED CT code for the observation type.an observation is missing observationType
no-code-or-textYou must specify one of code or texta note has neither code nor text
invalid-record-dateThe recordDate is not a valid date in Y-m-d format.an observation, note, or document recordDate is not a valid date in Y-m-d format
invalid-observation-dateThe observationDate is not a valid date in Y-m-d format.an observation observationDate is not a valid date in Y-m-d format
invalid-observation-timeThe observationTime is not a valid time in H:i:s format.an observation observationTime is not a valid time in H:i:s format
invalid-value-dateThe valueDate is not a valid date in Y-m-d format.an observation valueDate is not a valid date in Y-m-d format
invalid-value-date-timeThe valueDateTime is not a valid date/time formatan observation valueDateTime is not a valid date/time format

Response fields

FieldTypeDescription
errors[].codestring
errors[].descriptionstring
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}