1. Document
  2. List Documents
GET

/medical/v1/document

x-api-key*
curl --request GET \
     --url https://api.metriport.com/medical/v1/document \
     --header 'x-api-key: AUTH_VALUE'

Query Params

patientIdRequired
string

The ID of the Patient for which to list available Documents.

facilityIdRequired
string

The ID of the Facility where the patient is receiving care.

Response

An array of objects describing the Documents that can be retrieved for the Patient.

documents
DocumentReference[]
import { Metriport } from "@metriport/api";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const documents = await metriportClient.listDocuments(
  "2.16.840.1.113883.3.666.777",
  "2.16.840.1.113883.3.666.5.2004.4.2005"
);
{
  "documents": [
    {
      "id": "1.2.543.1.34.1.34.134",
      "fileName": "CCDA_Diag.xml",
      "location": "https://fhir.metriport.com/oauth/fhir/Binary/2.16.840.1.113883.3.777.666.5.700009.969696",
      "description": "Patient Diagnoses",
      "status": "current",
      "indexed": "2019-09-07T15:50:00.000Z",
      "mimeType": "application/xml",
      "size": "17344007",
      "type": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "62479008",
            "display": "Diagnoses"
          }
        ],
        "text": "Diagnoses"
      }
    }
  ]
}