Test Registrations

Test Registrations are the heart of everything. They are the details of the patient and test that are sent to the lab to get results for. Every test requires a Test Registration to work.

The Test Registration model

The Test Registration model contains all the information about the Test Registration.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the Test Registration.

  • Name
    patient_id
    Type
    string
    Description

    Unique identifier for the patient assigned to the Test Registration.

  • Name
    results_ready
    Type
    boolean
    Description

    Whether or not the lab results are ready.

  • Name
    product_ids
    Type
    array
    Description

    Array of product IDs linked to the Test Registration.

  • Name
    product_skus
    Type
    array
    Description

    Array of product SKUs linked to the Test Registration.

  • Name
    email
    Type
    string
    Description

    Patient email address.

  • Name
    date_of_birth
    Type
    string
    Description

    Patient Date of Birth.

  • Name
    first_name
    Type
    string
    Description

    Patient first name.

  • Name
    last_name
    Type
    string
    Description

    Patient last name.

  • Name
    ethnicity
    Type
    enum
    Description

    Patient ethnicity.

  • Name
    gender
    Type
    string
    Description

    Patient gender.

  • Name
    created_at
    Type
    date
    Description

    Date when Test Registration was created.

  • Name
    completed_at
    Type
    date
    Description

    Timestamp of when the Test Registration was completed.

  • Name
    patient_registered_at
    Type
    date
    Description

    Timestamp of when the patient was successfully registered.

  • Name
    uk_address
    Type
    object
    Description

    Patient address

  • Name
    doctors_note
    Type
    text
    Description

    Doctors note for test result

  • Name
    doctors_name
    Type
    string
    Description

    Validating doctors name

  • Name
    download_url
    Type
    string
    Description

    URL to download results PDF

  • Name
    appointment_id
    Type
    string
    Description

    Unique identifier for a linked appointment.

  • Name
    status
    Type
    string
    Description

    Current status of the Test Registration

  • Name
    trf_code
    Type
    string
    Description

    Code a patient uses to register the test

  • Name
    short_code
    Type
    string
    Description

    Returned code for patient to write on Test Request Form if registering online

  • Name
    parent_id
    Type
    string
    Description

    If a retest this will show a link to the original Test Registration


POST/api/test_registration

Create new Test Registraion

This endpoint allows you to create a new test registraion. You will need to have had created a patient previously and have the ID to use

Attributes

  • Name
    patient_id
    Type
    string
    Required
    REQUIRED
    Description

    Patient ID, can be created from Patient API call

  • Name
    product_ids
    Type
    array
    Description

    Array of Product IDs. Note one of product_ids or product_skus needs to be sent

  • Name
    product_skus
    Type
    array
    Description

    Array of Product SKUs. Note one of product_ids or product_skus needs to be sent

  • Name
    appointment_id
    Type
    string
    Description

    If an appointment is linked to this test registration put in the ID here

  • Name
    foreign_id
    Type
    string
    Description

    You can put in your own reference here to use to search in future calls

Returns

Returns the Test Registration object if successful.

Request

POST
/api/test_registration
curl -G https://api.londonmedicallaboratory.com/api/test_registration/ \
  -H "Authorization: Bearer {token}" \
  -d patient_id="02f68959-e7ea-4c54-809d-86af7f4808a5" \
  -d product_ids=["3b38b759-6ac4-4bfd-b1ed-6c3c937ccc6b"] \
  -d foreign_id="InternalID_982"

Response

{
  "id": "317adb14-bc83-40af-9db0-b6a86de56694",
  "patient_id": "02f68959-e7ea-4c54-809d-86af7f4808a5",
  "results_ready": false,
  "product_ids": [
      "3b38b759-6ac4-4bfd-b1ed-6c3c937ccc6b"
  ],
  "product_skus": [
      "AL2"
  ],
  "email": "john_connor@example.com",
  "date_of_birth": "1990-04-04",
  "first_name": "John",
  "last_name": "Connor",
  "ethnicity": "white_british",
  "gender": "male",
  "created_at": "2023-11-09",
  "completed_at": null,
  "patient_registered_at": "2023-11-09",
  "uk_address": null,
  "doctors_note": null,
  "doctors_name": null,
  "download_url": null,
  "appointment_id": null,
  "status": "pending",
  "trf_code": "zawfsek",
  "short_code": "PBNT8MX",
  "parent_id": null
}