Lab Analytes

API users can add and update lab analyte results through the existing lab result document POST and PUT endpoints for a specified patient.  An analyte is a lab result value, such as glucose, HDL cholesterol, and WBC. 

NOTE: The user's application must be the primary source of the lab analytes added through the lab result API.  The analytes being uploaded into athenaNet will only be a copy of the data available through the user's own application. The user is responsible for contacting/warning a patient’s provider or care team if any analyte result collected from a patient is outside of a reasonable threshold.

Adding Lab Analytes

Using the lab result document endpoint, users can create a lab result document with one or more lab analytes.  The lab analyte value in the POST API is a url-encoded JSON structure.  Each entry contains items related to an analyte.  Example lab analyte value for the POST:

[
  {
    "analytename" : "HGB A1C",
    "units" : "%",
    "abnormalflag" : "ABNORMAL",
    "referencerange" : "1-10",
    "resultstatus" : "Final",
    "value" : "5",
    "note" : "example note"
  },
  {
    "analytename" : "Alpha-1-Globulin",
    "units" : "mg/mol",
    "abnormalflag" : "CRITICAL HIGH",
    "referencerange" : "0.05-0.09",
    "resultstatus" : "Pending",
    "value" : "1.5",
    "note" : "example note"
  }
]

The analytename is required in order to POST a lab analyte.  All other fields are optional.

Updating Lab Analytes

Lab analytes associated with lab result documents can be updated through the lab result PUT endpoint.  You must first get the labresultid of the lab result.  You can get this from the lab result GET API via:

(use GET /patients/{patientid}/documents/labresult?departmentid={departmentid})

After retrieving the labresultid, you will must then get the analyteid of the analyte that you want to update.  The analyteid uniquely identifies that particular analyte result.  You can use the analyteid to update the fields associated with that particular analyte result using the document specific lab result GET API via:

(Use GET /patients/{patientid}/documents/labresult/{labresultid}?departmentid={departmentid})

Sample API Response:

[    {       "createddate" : "05\/11\/2016",       "description" : "lab result",       "documentsource" : "INTERFACE",       "labresultid" : "664739",       "lastmodifieddate" : "05\/11\/2016",       "observations" : [          {             "abnormalflag" : "abnormal",             "analyteid" : "872001",             "analytename" : "HGB A1C",             "note" : "example note",             "referencerange" : "1-10",             "resultstatus" : "final",             "units" : "%",             "value" : "5"          }       ],       "pages" : [],       "priority" : "2",       "status" : "REVIEW"    }

]

Once you have the analyteid(s), you will must add a ‘“analyteid” : “{analyteid}}’ line to all the entries of the analyte(s) you are updating. 

If an entry doesn’t have an analyteid, it will be considered a new analyte instead of an update and added to the lab result document.

Example lab analyte value for the PUT:

[   {     "analytename" : "HGB A1C",     "analyteid" : "123456",     "loinc" : "12773-9",     "units" : "%",     "abnormalflag" : "ABNORMAL",     "referencerange" : "1-10",     "resultstatus" : "Final",     "value" : "12",     "note" : "example note"   },   {     "analytename" : "ACTH, Plasma",     "units" : "mg/mol",     "abnormalflag" : "NORMAL",   } ]

NOTE: The above example would update the HGB A1C analyte since the analyteid was provided and add the ACTH, Plasma analyte to the lab result since the analyteid was NOT provided.

Was this information helpful? Yes | No What went wrong? Incomplete or incorrect information | Irrelevant Content | Others