Lab Tests - Create/Update a lab test
Instruction
This guide describes how to upload or update a lab test from your internal system to Inspectorio Quality Risk Management (QRM) system for other stakeholders to review. A new lab test will be automatically created on QRM when you upload a lab test. The lab test can then be updated as needed using the same API.
Precondition
Generate an API Key for your organization and use it to authenticate your API requests.
Create a lab test
-
If the lab test contains attachments, the files must be uploaded using the following APIs. Then, the obtained
fileId
can be used in the PUT Create/Update a Lab Test API request body. -
Use the PUT Create/Update a Lab Test API endpoint to create a lab test.
Note: A new lab test will be automatically created on QRM; it is not required to create a test using the QRM web UI first.
Update a lab test
- Use the same PUT Create/Update a Lab Test API endpoint (that is used for uploading a test report) for any modification of the corresponding lab test. Simply update the information/parameters that are changed.
Notes:
- The
originalReportNumber
parameter is used to determine if the request is meant for updating an existing lab test or for creating a new one. 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
-
To view the created or updated lab test using the PUT Create/Update a Lab Test API endpoint, go to the Lab Test Management page and find the lab test with the corresponding information.
-
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. The status of the newly created lab test will be “Submitted.”