Skip to main content

Lab Tests - Create or Update a Test

Instruction​

This guide describes how to create or update a lab test from your internal system to Inspectorio Quality Risk Management (QRM) system for other stakeholders to review. Based on provided data, a lab test with a Submitted, New, or Draft status will be automatically created on QRM system. The test can then be updated as needed.

Precondition​

Generate an API Key for your organization and use it to authenticate your API requests.

Create a lab test​

  1. If the lab test contains attachments, the files must be uploaded using the following APIs. Then, the obtained fileId can be used in the POST Create Lab Test API request body.

    a. POST File Upload Session API

    b. POST Upload File API

  2. Use the POST Create Lab Test API endpoint to create a lab test with Submitted, New, or Draft status. The lab test status or creation mode is based on provided data. To learn more about the lab test creation modes and data fields, refer to the Lab Test Creation Modes section.

Note: A lab test will be automatically created on QRM; it is not required to create a test using the QRM web UI first. The test statuses based on creation modes are as follows:

  • Submitted: A test created with all required information and complete test results provided.
  • New: A test created with all required lab test form information but without test results, indicating the request has been initiated but execution has not yet started.
  • Draft: A test created with missing required lab test form information, saved as a draft and can later be completed and updated.

Update a lab test​

Use the PUT Upload/Update Pre-Created Lab Test API endpoint for any modification to an existing lab test. Simply update the information/parameters that are changed.

Notes:

  • The originalReportNumber parameter determines the existing lab test to update. If a lab test with the same information already exists, then that lab test will be updated accordingly with the new information.
  • Once the system finds a matched test, the test can only be updated if it meets these conditions:
    • The lab test was created via API
    • Test status is not Completed
    • clientId is a match

Review result on QRM platform​

  1. To view the created or updated lab test, go to the Lab Test Management page and find the lab test with the corresponding information.

  2. Open the lab test to view its details.

Note: The displayed fields depend on the setting of the lab test form specified in the API request. Alt text