Replace medical history
Set a patient's allergies, chronic conditions and surgical history from your own system.
Sets a patient's allergies, chronic conditions and surgical history at one of your locations to exactly the lists you send. The result appears in the patient's medical history and in Medos's own screens.
API-key only, gated on devapi_patients_medical_history_create. Send
X-Acting-User-Id to attribute the change to a
staff member. Without it, the change is attributed to the workspace admin.
A replace, not an append
Each call replaces all three lists. To add one allergy, read the history
(with the same addressId), add it to the list, and send the whole thing back. All three lists are
required on every call, and an empty list ([]) clears that list, so nothing
is ever cleared by leaving a field out.
Parameters
Path parameters
patientIdintegerrequiredExample: 4821The Medos patient id, from GET /v1/patients.
Query parameters
addressIdintegerrequiredExample: 1The location whose record you are writing, from GET /v1/addresses.
Headers
x-api-keystringrequiredExample: mk_…Your Developer API key. Server-side only.
X-Acting-User-IdstringExample: MDU_A1B2C3D4E5F6The staff member the call is attributed to, as an MDU_… id. Omit it to attribute the call to the workspace admin.
Content-TypestringrequiredExample: application/jsonThe body is JSON. Anything else is a 415.
Body
allergiesstring[]requiredExample: ["Penicillin","Latex"]Every allergy, replacing what is stored. [] clears them.
chronicConditionsstring[]requiredExample: ["Hypothyroidism"]Every chronic condition, replacing what is stored.
surgicalHistorystring[]requiredExample: []Every past surgery, replacing what is stored.
addressIdis required: the location whose record you are writing, fromGET /v1/addresses. Medos keeps one record per location, so read it back with the sameaddressId.- Use your own ids. Send a
patientIdfromGET /v1/patientsand anaddressIdfromGET /v1/addresses. - The field names are the ones the read returns, so a history you read back can be sent again unchanged.
- Each entry is a non-empty string of up to 200 characters, with at most 100 entries per list. Leading and trailing spaces are trimmed.
- An entry may not contain a comma. Write
Penicillin (severe), notPenicillin, severe: a comma would split one entry into two. - The body is strict. A field this route does not know is a
400naming it.
Responses
The 200 body is what Medos stored, in the same shape as the read. Because the
call sets the lists rather than adding to them, repeating it is always safe.