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

Create Observation

Records a finalised observation against a patient record. observationType (a SNOMED CT coded entry) is required; supply at most one of the value* properties to carry the observation result. Coded entries are conceptId + description pairs resolved against the NHS term browser.

Authorization: Bearer token (JWT). See Authentication.

Request

curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/create-observation' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"observationType": {
"conceptId": "string",
"description": "string"
},
"bodySite": {
"conceptId": "string",
"description": "string"
},
"interpretation": {
"conceptId": "string",
"description": "string"
},
"recordDate": "2024-07-29",
"observationDate": "2024-07-29",
"observationTime": "string",
"valueCode": {
"conceptId": "string",
"description": "string"
},
"valueString": "string",
"valueDate": "2024-07-29",
"valueDateTime": "2024-07-29T15:51:28.071Z",
"valueQuantity": {
"value": 0,
"unit": {
"conceptId": "string",
"description": "string"
}
},
"valueBloodPressure": {
"systolic": 0,
"diastolic": 0
},
"additionalInformation": "string",
"consultationTopicHeadingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"hiddenFromPatientFacingServices": false,
"confidentialFromThirdParties": false
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
observationTypeobjectYesSNOMED CT coded observation type. Required.
bodySiteobjectNoOptional SNOMED CT coded body site.
interpretationobjectNoOptional SNOMED CT coded interpretation.
recordDatestring<date>NoRecord date (YYYY-MM-DD). Defaults to today.
observationDatestring<date>NoObservation date (YYYY-MM-DD). Defaults to recordDate.
observationTimestringNoObservation time (HH:MM:SS).
valueCodeobjectNoCoded result value (SNOMED CT).
valueStringstringNoFree-text result value.
valueDatestring<date>NoDate result value (YYYY-MM-DD).
valueDateTimestring<date-time>NoDate/time result value (ISO 8601 / ATOM).
valueQuantityobjectNoNumeric result value with an optional SNOMED CT coded unit.
valueBloodPressureobjectNoBlood pressure result value.
additionalInformationstringNoFree-text additional information.
consultationTopicHeadingIdstring<uuid>NoOptional heading to attach the observation to.
hiddenFromPatientFacingServicesbooleanNoIf true, hidden from Patient Facing Services (IM1) such as the NHS App.
confidentialFromThirdPartiesbooleanNo

Responses

200 Observation created.
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
400 Validation error.
12 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 (observationType, bodySite, interpretation, valueCode, or unit)
no-codeYou must specify a SNOMED CT code for the observation type.observationType missing
invalid-record-dateThe recordDate is not a valid date in Y-m-d format.recordDate not a valid date in Y-m-d format
invalid-observation-dateThe observationDate is not a valid date in Y-m-d format.observationDate not a valid date in Y-m-d format
invalid-observation-timeThe observationTime is not a valid time in H:i:s format.observationTime not a valid time in H:i:s format
invalid-value-dateThe valueDate is not a valid date in Y-m-d format.valueDate not a valid date in Y-m-d format
invalid-value-date-timeThe valueDateTime is not a valid date/time formatvalueDateTime not a valid date/time format
invalid-consultation-topic-heading-idThe consultationTopicHeadingId is not a UUIDconsultationTopicHeadingId not a UUID
consultation-topic-heading-not-foundConsultation topic heading not found for this consultationTopicHeadingIdconsultationTopicHeadingId doesn't exist
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}