Awell Health Developer Hub
Developer Hub

Where pathway activities represent every granular activity related to the operation or orchestration of a pathway, Elements are the building blocks of a pathway represented by their logical (e.g. this step belongs to a parent track) and chronological (e.g. this step's completion date depends on when all its child actions are completed) dependencies.

Elements of a pathway

Elements allow us to reflect a pathway's overall shape. This means we can generate a clear picture of not just when we are (as with activities), but where we are in the lifespan of an orchestrated pathway. This makes them perfect for constructing Gantt or Timeline-style views that give users high-level or granular views of a patient's progress through a care flow.

Element types

A pathway consists of the following types of elements:

  • Pathway
  • Tracks
  • Steps
  • Actions
  • Triggers (not yet supported in the query)

There is hierarchy to elements. An action's parent is a Step. A Step's parent is a Track. A Track's parent is a Pathway. In other words, Pathway -> Track -> Step -> Action. Pathways, being the largest unit of pathway definition themselves, do not have parents.

Request

Query

  • graphql
01query GetPathwayElements($pathway_id: String!) {
02 pathwayElements(pathway_id: $pathway_id) {
03 elements {
04 id
05 parent_id # id of this element's parent. one of `pathway_id`, `track_id` or `step_id` from the context object below
06 name
07 status # one of 'active', 'done' or 'scheduled'
08 type # one of 'pathway', 'track', 'step', 'action' or 'trigger'
09 activity_type # one of 'api_call', 'calculation', 'checklist', 'form', 'message' or 'push_to_emr'
10 start_date
11 end_date # for a completed element, this is the completion date of the final action element in it
12 stakeholders {
13 id
14 name
15 }
16 context {
17 instance_id
18 pathway_id
19 track_id
20 step_id
21 action_id
22 }
23 }
24 }
25}

Variables

  • json
01{
02 "pathway_id": "{{PATIENT_PATHWAY_ID}}"
03}

How to use