Queries
Pathway elements help you construct a clear picture of where you are in the lifespan of a pathway
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 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.
A pathway consists of the following types of elements:
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.
- graphql
01query GetPathwayElements($pathway_id: String!) {02 pathwayElements(pathway_id: $pathway_id) {03 elements {04 id05 parent_id # id of this element's parent. one of `pathway_id`, `track_id` or `step_id` from the context object below06 name07 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_date11 end_date # for a completed element, this is the completion date of the final action element in it12 stakeholders {13 id14 name15 }16 context {17 instance_id18 pathway_id19 track_id20 step_id21 action_id22 }23 }24 }25}
- json
01{02 "pathway_id": "{{PATIENT_PATHWAY_ID}}"03}