---
title: "Create or update patient medical history items (beta)"
method: POST
path: "/medical_history/patient_items"
tags: ["Medical History"]
---

# Create or update patient medical history items (beta)

`POST /medical_history/patient_items`

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/medical_history/patient_items`
- Auth: API key in header `Authorization`

> 🚧 Beta
>
> Send `Nex-Api-Version: v3.1.0` to use this endpoint. It is still changing, and access is limited to approved partner institutions. Contact NexHealth before you build on it.

Batch creates, updates, or deactivates patient-specific medical history items...

## Query parameters

- `subdomain` string, required
- `location_id` integer, required

## Headers

- `Nex-Api-Version` string, required

## Request body

- PostMedicalHistoryPatientItems: Create or update patient medical history items
  - `patient_id` integer, required: Patient ID
  - `allergies` object[]: Allergy items to create or update
    - `item_id` integer, required: Medical history allergy item ID
    - `note` string: Optional note
    - `active` boolean: Whether the item is active
  - `conditions` object[]: Condition items to create or update
    - `item_id` integer, required: Medical history condition item ID
    - `note` string: Optional note
    - `active` boolean: Whether the item is active
  - `medications` object[]: Medication items to create or update
    - `item_id` integer, required: Medical history medication item ID
    - `note` string: Optional note
    - `active` boolean: Whether the item is active

## Response `201`

Successful

- APIV31EntitiesMedicalHistoryPatientItemCollectionResponse: API_V31_Entities_MedicalHistory_PatientItem_Collection_Response model
  - `code` boolean: Indicates the success or failure of the request
  - `description` string: Additional context on the request to help with debugging.
  - `error` string[]: Any errors that occur during the execution of the request.
  - `data` APIV31EntitiesMedicalHistoryPatientItem[]
    - `id` integer: Patient medical history item ID
    - `item_id` integer: ID of the referenced medical history item
    - `item_name` string: Medical history item name
    - `note` string: Optional note about the patient item
    - `active` boolean: Whether the item is active
  - `count` integer: Number of total objects, in case of collection.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta.md) - [All operations](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/revisions/93cb4af790a5?raw)
