Tross
Demo dataBook a demo
ATHENA

Fetch patient medications

Read active or historical medication events from one Athena preview chart.

POSThttps://preview.ontross.com/api/integrations/athena/fetch-patient-medications
Request Fields
input.org_id
integer
required
Athena practice ID for the saved authentication.
Example
64200
input.department_id
integer
required
Department containing the patient's chart.
Example
12
input.patient_id
integer
required
Practice patient ID, not the chart or enterprise ID.
Example
842701
input.category
string
required
Select Athena's active or historical medication source; not inferred from event status.
Example
"active"
Accepted values
activehistorical
input.limit
integer
required
Maximum medication groups returned from this source response.
Example
1
input.offset
integer
Local offset; each request refetches the source, so pages are not a stable snapshot.
Example
0
Default
0
auth_id
string
required
Saved connection to run this operation through, from the Authentication page. It decides which practice and login the call uses.
Example
"00000000-0000-4000-8000-000000000000"
Output Fields
patient_id
string
Practice patient ID used for this read.
Example
"842701"
chart_id
string
Resolved Athena chart ID.
Example
"920415"
category
string
Athena medication source selected by the caller.
Example
"active"
limit
integer
Local page size requested by the caller.
Example
1
offset
integer
Local offset requested by the caller.
Example
0
total_in_category
integer
Medication groups in this fetched category response before local paging.
Example
2
has_more
boolean
Whether this fetched response has groups after the returned slice.
Example
true
next_offset
integer
Next local offset when has_more is true; otherwise null.
Example
1
medications
array
Medication groups in this local page.
medications[].primary_source_id
string
Source identifier of the first event in this medication group.
Example
"655201"
medications[].events
array
Medication events in Athena's original order.
medications[].events[].source_id
string
Source event identifier; multiple events may share it.
Example
"655201"
medications[].events[].id_source
string
Athena namespace for the source identifier.
Example
"PATIENTMEDICATION"
medications[].events[].source
string
Source label for the medication event, when supplied.
Example
"chart"
medications[].events[].event_type
string
Source event type, such as ENTER or FILL, when supplied.
Example
"ENTER"
medications[].events[].event_date
string
Source event date in YYYY-MM-DD format, when supplied.
Example
"2026-03-10"
medications[].events[].end_date
string
Source end date in YYYY-MM-DD format, when supplied.
Example
"2026-04-10"
medications[].events[].source_status
string
Event status exactly as supplied by Athena.
Example
"SUBMIT"
medications[].events[].medication_id
string
Source medication identifier, when supplied.
Example
"77421"
medications[].events[].medication_id_type
string
Namespace for the medication identifier, when supplied.
Example
"local"
medications[].events[].name
string
Medication name supplied by Athena.
Example
"metformin"
medications[].events[].display_name
string
Formatted medication name, when supplied.
Example
"metformin 500 mg tablet"
medications[].events[].strength_value
string
Medication strength value, when supplied.
Example
"500"
medications[].events[].strength_unit
string
Medication strength unit, when supplied.
Example
"mg"
medications[].events[].dosage_form
string
Medication dosage form, when supplied.
Example
"tablet"
medications[].events[].sig
string
Source dosing instructions, when supplied.
Example
"Take one tablet by mouth with breakfast"
medications[].events[].encounter_id
string
Associated encounter identifier, when supplied.
Example
"42018"
medications[].events[].clinical_prescription_id
string
Associated prescription identifier, when supplied.
Example
"55091"
Code
curl --request POST \
  --url https://preview.ontross.com/api/integrations/athena/fetch-patient-medications \
  --header 'X-API-Key: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"input":{"category":"active","department_id":12,"limit":1,"offset":0,"org_id":64200,"patient_id":842701},"auth_id":"auth_uuid_here"}'
Request BODY
{
  "input": {
    "category": "active",
    "department_id": 12,
    "limit": 1,
    "offset": 0,
    "org_id": 64200,
    "patient_id": 842701
  },
  "auth_id": "auth_uuid_here"
}
Response BODY
{
  "id": "string",
  "workflow_id": "string",
  "auth_id": "string",
  "status": "string",
  "input": {},
  "output": {
    "category": "active",
    "chart_id": "920415",
    "has_more": true,
    "limit": 1,
    "medications": [
      {
        "events": [
          {
            "display_name": "metformin 500 mg tablet",
            "dosage_form": "tablet",
            "event_date": "2026-03-10",
            "event_type": "ENTER",
            "id_source": "PATIENTMEDICATION",
            "medication_id": "77421",
            "medication_id_type": "local",
            "name": "metformin",
            "sig": "Take one tablet by mouth with breakfast",
            "source": "chart",
            "source_id": "655201",
            "source_status": "SUBMIT",
            "strength_unit": "mg",
            "strength_value": "500"
          }
        ],
        "primary_source_id": "655201"
      }
    ],
    "next_offset": 1,
    "offset": 0,
    "patient_id": "842701",
    "total_in_category": 2
  },
  "files": null,
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z"
}