Patient Documents

Create patient document

POST
/patients/{id}/documents

This endpoint uploads a document for the given patient; the file's name is used when inserting the document into the EHR's filesystem, while the optional name param is for NexHealth display purposes only.

Authorization

Authorization
Authorization<token>

In: header

Path Parameters

id*integer

ID of the patient

Formatint32

Query Parameters

subdomain*string

Used to scope the request to the specified institution

location_id*integer

Used to scope the request to the specified location

Formatint32

Header Parameters

Nex-Api-Version*string

The NexHealth API version

Default"v3.0.0"

Request Body

multipart/form-data

file*unknown

The file being uploaded. The name of this file will be used when inserting the file into the EHRs filesystem

document_type_id?integer

The ID of the document type to assign to the uploaded document

Formatint32

Response Body

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

application/vnd.Nexhealth+json;version=2

curl -X POST "https://example.com/patients/0/documents?subdomain=string&location_id=0" \  -H "Nex-Api-Version: v3.0.0" \  -F file="null"
{  "code": false,  "description": "Description",  "error": [    "Error message"  ],  "data": {    "id": 18,    "filename": "patient_document.pdf",    "type": "application/pdf",    "url": "/documents/18/download",    "created_at": "2020-06-05T20:16:57.007Z",    "document_type_id": 1  },  "count": 2}