Test Result APIs

You can manage infectious disease test results through the following APIs. (Note: do not use these APIs for PGx or other non-infectious disease test types.)


Get a Test Result

Use this API to get details about workflow test results for a sample.

HTTP Request

GET   /api/v3/workflow_sample_results/{Id}

Request Body

Key Required Description
Id yes The internal identifier of the workflow test results for a sample. Get this value from the sampleTestResults field in the payload for the webhooks described here and here or from the Get Workflow API.

Response Body

{
    "workflowSampleResult": {
        "requisition": {
            "identifier": "a requisition identifier",
            "customAttributes": {
                 ...
                 },
            "testPanels": [
                "a test panel name",
                  ...
            ],
            "medications": [
                ...
                ],
            "diagnosis": [
                ...
                ],
            "sample": {
                "identifier": "some sample identifier",
                "collectionDate": "2023-10-01T00:00:00.000Z",
                ...
            },
            "providerAccount": {
                "name": "ABC Clinic",
                "number": "12345",
                ...
            },
            "patient": {
                "firstName": null,
                "lastName": null,
                ...              
            }
        },
        "testResults": [
            {
                "assayName": "an assay name",
                "targetName": "a target name"
                ...
                "infectiousDisease": {
                   "organism": "an organism name",
                   "ctValue": 20.0
                   ...
                   }
            }
        ]
    }
}
Field name Description
requisition Information about the requisition as an abbreviated version of the requisition object returned by the Requisition API
See here for details.
testResults This is an array of results generated by the workflow for the sample.
testResults.assayName The test name as configured by the test gene configuration
testResults.targetName The test code as configured by the test gene configuration
testResults.panelName The panel name as configured by the test panel configuration
testResults.panelCode The panel code as configured by the test panel configuration
testResults.result The result from the workflow, if it exists
Note: if you are using replicates, this will only include the result for one of them; instead rely on testResults.computedResult in that case
testResults.computedResult The computed result as configured by the test gene configuration.

Possible values:
    Positive
    Negative
    Detected
    Not Detected
testResults.displayName The display name as configured by the test gene configuration
testResults.inRequestedPanel Whether this test was ordered on the requisition form
testResults.description The description of the test, either from the test gene configuration or the resistance gene configuration
testResults.isAssayControl Whether this is a control
testResults.infectiousDisease This object contains details about testing for infectious disease. Other kinds of testing will not have this object
testResults.infectiousDisease.organism The organism name, if it exists, either from the workflow or calculated according to configuration
testResults.infectiousDisease.ctValue The number of threshold cycles from the qPCR-result activity in the workflow
testResults.infectiousDisease.ctMean The threshold cycle mean (average), either from the qPCR-result activity in the workflow or calculated according to the configuration
testResults.infectiousDisease.ampScore The amplification score from the qPCR-result activity in the workflow
testResults.infectiousDisease.ampStatus Amplification status from the qPCR-result activity in the workflow
testResults.infectiousDisease.cqConfidence The threshold cycle confidence from the qPCR-result activity in the workflow
testResults.infectiousDisease.load The load from the qPCR-result activity in the workflow
testResults.infectiousDisease.computedLoad The computed load from the test gene configuration
testResults.infectiousDisease.unit The unit of load from the test gene configuration
testResults.infectiousDisease.resistance The same as testResults.targetName when that is a resistance gene
testResults.infectiousDisease.antibioticClass The antibiotic class of the resistance gene
testResults.infectiousDisease.pathogens An array of antibiotic resistances from the configuration of the resistance gene
testResults.infectiousDisease.qualitative The qualitative results from the qPCR-result activity in the workflow
testResults.infectiousDisease.computedQualitative The computed qualitative results, calculated according to the test gene configuration
testResults.infectiousDisease.quantitative The quantitative results from the qPCR-result activity in the workflow
testResults.infectiousDisease.computedQuantitative The computed quantitative results from the test gene configuration
testResults.infectiousDisease.percentage The load percentage results, calculated according to the workflow configuration
testResults.infectiousDisease.computedPercentage The load computed percentage results, calculated according to the workflow configuration

Response

Response code Response body
200 Indicating the resource was successfully created JSON describing the requested workflow result; refer to the description of the inbound payload above 
401 Indicating an authentication error  

Get Test Results

Use this API to get details about workflow results for a selected set of samples.

HTTP Request

GET /v3/workflow_sample_results

Query Parameters

Key Required Description
workflowSampleResultIds yes Comma-separated list of workflow sample result IDs. Get these values from the  sampleTestResults field in the payload for the webhooks described here and here or from the Get Workflow API.

Response Body

This API returns an array of sample results, each of which follows the format documented above.

{
    "workflowSampleResult": [
        {
             "requisition": {
              ...
        },
        {
             "requisition": {
              ...
        }
       ...
}

Response

Response code Response body
200 to indicate success JSON describing the requested provider accounts
401 to indicate an authentication error

Create a Test Result

Use this API to upload test results for a compatible workflow type. A compatible workflow type must only contain the following activities:

  1. batch-creation
  2. qpcr-results
  3. quality-checks

HTTP Request

POST /api/v3/test_panel_results/import

Request Body

{
  "organizationId": 1,
  "workflowType": "a_workflow_type",
  "sampleIdentifiers": [
    "sample_identifier_1"
  ],
  "fileContent": "the contents of the file matching the format configured in the workflow (CSV/TSV/etc)",
  "resourceLabel": "analysis"
}
Key Required Description
organizationId yes The organization's internal identifier. (It's the 123 here: https://lab.ovation.io/orgs/123/dashboard.)
workflowType yes The workflow type that is configured.
sampleIdentifiers yes An array containing the sample identifiers to which these results apply
fileContent yes The content of the test results in the same format that is configured in the workflow. Example:
"Well,Well Position,Sample Name,Target Name,Task,Reporter,Quencher,Crt,Crt Mean,Crt SD,Amp Score,Cq Conf,Amp Status,ROX Signal,Result
\nA01,A01,med1,blalMP,Something,123,123,10,21,123,111,444,Amp,123,Detected\n"<br>
resourceLabel no The import resource label configured in the qpcr-result activity, this defaults to analysis if none is provided.

Response

Response code Response body
201 Indicating the resource was successfully created
401 Indicating an authentication error
422 Indicating an error with the request contents

The validation error(s) found


For example: "the sample is not queued for the specified workflow" or the workflow type is not compatible

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.