Management of Class-Specific Documents

Overview

athenaNet classifies documents into various classes and sub-classes. Documents in each of the classes may have different workflows and are managed independently. Documents can be added to athenaNet in various ways – they can be faxed, scanned, or manually uploaded.

The following document types are supported for creation and modification via API: 

  • Admin Documents
  • Clinical Documents
  • Encounter Documents
  • Imaging/Diagnostic Results
  • Lab Results
  • Medical Record Documents
  • Phone Messages
  • Physician Authorizations
  • Signed Orders

Creating a Document

When creating documents in athenaNet, only one document can be created per call.  Each class-specific document API has input fields that apply to that specific document class.  PatientID and DepartmentID are fields required for all document classes.

Using the class-specific document endpoints, API users can create documents with additional discrete data elements not available in the general document post (POST /patients/{patientid}/documents). These additional fields allow users to provide more information about the document being uploaded in athenaNet.  Documents can also be created either with or without a file attachment.

Note: It is recommended that attachments be in PDF format since the APIs are not able to accept other formats at this time.

For each of the class-specific document endpoints, there are also a number of other optional fields that can be entered during document creation.  These fields will vary depending on the document class and give the provider more information about the document in athenaNet.  See "API Reference > Documents and Forms" section, for more information about the class-specific input parameters.

Setting the priority to “1” will make the document a high priority item in athenaNet.  A document should only be marked as high priority if it is urgent that the provider review the document.

Document Types can be retrieved using the documenttypes API endpoint.  The documenttypeid further labels the document in athenaNet and makes the document more identifiable in the patient’s chart.  Document types are also referred to as document labels in athenaNet.

 

The API response for a successfully generated document will always indicate Success: True and the document specific ID (e.g. LabResultID) of the newly created document.

Note: Encounter documents are created in a CLOSED status within athenaNet the vast majority of ithe time

Sample API Call:
POST /patients/2100/documents/labresult {additional fields are intentionally omitted here}
 
Sample API Response:
{
"labresultid" : "445553",
"success" : "true"
}

Updating a Document

API users will only be able to update documents that they have created via API.  API users will not be able to update documents created in athenaNet by users or by other API users.  Additionally, API users cannot update deleted documents.  In order to edit a document, API users will need the class-specific documentid of the document. 

The class-specific documentid can be retrieved through class-specific GET calls that can be found under "API Reference" > "Documents and Forms" section

The API response for a successfully edited document will always indicate Success: True and the document specific ID (e.g. LabResultID) of the edited document.

Sample API Response:
{
"labresultid" : "445553",
"success" : "true"
}

Note:  Imaging results and lab results may have interpretation and internal note fields updated via API whether an API user was the original creator of the document or not.  

Note:  Signed orders cannot be updated via API.

Retrieving a Document

Various GET calls exists for API users to retrieve different types of data for a given document class.

The first category of API calls returns a list of class-specific documents associated with a given patient. See "API Reference" > "Documents and Forms" section for more details. Each document is uniquely identified by a class-specific documentid (such as LabResultID).

Sample API Call:

 GET /patients/2100/documents/labresult

Sample API Response:

      {

"createddate" : "03\/06\/2015",

"createddatetime" : "2015-03-06T13:52:02-05:00",

"documentclass" : "LABRESULT",

"documentdescription" : "x-ray, lumbar spine",

"documentroute" : "FAX",

"documentsource" : "MANUAL",

"encounterdate" : "03\/06\/2015",

"encounterid" : "14905",

"facilityid" : "11313984",

"labresultid" : "8543",

"lastmodifieddatetime" : "2015-03-06T13:52:02-05:00",

"priority" : "2",

"status" : "CLOSED",

"tietoorderid" : "8540"

      }

The second category of API calls returns information pertaining to a specific document. See "API Reference" > "Documents and Forms" section for more details.  If the original document is a PDF file, a ‘pages’ subsection with individual pageids is included in the response. 

Sample API Call:

 GET /patients/2100/documents/labresult/8543

Sample API Response displaying page specific info:

{

"createddate" : "03\/06\/2015",

"createddatetime" : "2015-03-06T13:52:02-05:00",

"documentclass" : "LABRESULT",

"documentdescription" : "x-ray, lumbar spine",

"documentroute" : "FAX",

"documentsource" : "MANUAL",

"encounterdate" : "03\/06\/2015",

"encounterid" : "14905",

"facilityid" : "11313984",

"labresultid" : "8543",

"lastmodifieddatetime" : "2015-03-06T13:52:02-05:00",

"pages" : [

{

"contenttype : "image\/png",

"href" : "https:\/\/api.athenahealth.com\/v1\/725\/documents\/labresult\/pages\/265033",

"pageid" : 265033

"pageordering" : 1

},

{

"contenttype" : "image\/png",

"href" : "https:\/\/api.athenahealth.com\/v1\/725\/documents\/labresult\/pages\/265034",

"pageid" : "265034",

"pageordering" : 2

}

],

"priority" : "2",

"status" : "CLOSED",

"tietoorderid" : "8540"

      }

The third category of API calls returns an individual page of a given document. See "API Reference" > "Documents and Forms" section for more details.

Sample API Call:
 GET /patients/2100/documents/labresult/8543/pages/265033

Note: athenaNet stores each page of the PDF document as a .png file and hence API users are recommended to retrieve document pages to a file with .png extension.

 

Deleting a Document

API users will only be able to delete documents that they have created via API.  API users will not be able to delete documents created in athenaNet by users or by other API users.  In order to delete a document, users will need the class-specific documentid of the document.

The class-specific documentid can be retrieved through class-specific GET calls that can be found on the Document Lists by Class page.

The API response for a successfully deleted document will always indicate Success: True and the document specific ID of the deleted document.

Was this information helpful? Yes | No Thank you for your feedback! What went wrong? Incomplete or incorrect information | Irrelevant Content | Others
Submit