Patient Documents

Create patient document

Changed on

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.

post/patients/{id}/documents

Request

  • Base URL
    https://nexhealth.info
  • Auth
    API key in header Authorization

Path parameters

idinteger required

ID of the patient

Query parameters

subdomainstring required

Used to scope the request to the specified institution

location_idinteger required

Used to scope the request to the specified location

Headers

Nex-Api-Versionstring required

The NexHealth API version

Request body multipart/form-data

filestring binary required

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

document_type_idinteger

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

Response

Successful

codeboolean

Indicates the success or failure of the request

descriptionstring

Additional context on the request to help with debugging.

errorstring[]

Any errors that occur during the execution of the request.

countinteger

Number of total objects, in case of collection.

Example response

{
  "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
}

Changes