API Reference

Creating a Patient Profile

To upload a patient's laboratory tests for recognition and interpretation, a Doctor-Patient connection between your account and the patient's account is necessary.

📘

Currently, automatic creation of the Doctor-Patient connection is only supported when creating a new patient account.

To create a patient account:

  1. Send a POST request to create a patient profile.
  2. Replace {pid_or_email} with the patient's email address or PID.

📘

When creating user profiles, it is necessary to include their gender and birthdate in the request body to obtain the accurate reference ranges for their biomarkers.

The request body should contain the following data:

{
    "sex": "M",
    "connectType": "HEALER",
    "birthday": 605863553
}

Here, HEALER means the connection type between patient and doctor that allows the doctor to read and write the data, M means male, and 605863553 is the Unix timestamp.

As a result, an Ornament account and profile will be created for your patient, and a Doctor-Patient connection will be established, allowing you to upload analyses to the patient's profile.

📘

If a user with such an email already exists, the request will return an error, and the connection will not be created.

If the request is successful, you will receive the PID and SSO ID of the created account (linkedPid and profileSsoId respectively), which you must save in your database for future use.

{
    "linkedPid": "8eb48125-5822-46b2-9c9c-891a3449fb78",
    "profileSsoId": "db7eb07f-b159-4b40-8c16-421c42beea35"
}

📘

PID (linkedPid) is a unique identifier of the patient's profile. SSO ID (profileSsoId) is a unique identifier of their account, used universally throughout the Ornament system.