Awell Health Developer Hub
Developer Hub

Prerequisites

Care flows or pathways can only be started for patients so you need a patient resource first (more specifically the id of the patient) before you can start a pathway. You can create a new patient resource with the createPatient mutation.

Selecting the version

When starting a pathway, Awell Orchestration automatically chooses the most recent published version of the specified pathway definition.

Improved support for versioning is coming soon, with the ability to select a specific version when starting a new pathway and upgrading started pathways to newer version.

Providing baseline data points

You have the ability to pass some initial data when starting a pathway with baseline data points. What data you can pass on pathway start needs to be configured in Awell Studio.

When your baseline data points are configured and your pathway is published, you can query the available baseline data points via the publishedPathwayDefinitions query (see documentation here).

There are required and optional baseline data points. A pathway will not be started until all required baseline data points have a value.

  • graphql
01query GetPublishedPathwayDefinitions {
02 publishedPathwayDefinitions {
03 publishedPathwayDefinitions {
04 id
05 title
06 dataPointDefinitions {
07 id
08 key
09 valueType
10 optional
11 }
12 }
13 }
14}

Request

Mutation

  • graphql
01mutation StartPathway($input: StartPathwayInput!) {
02 startPathway(input: $input) {
03 pathway_id
04 }
05}

Variables

  • json
01{
02 "input": {
03 "patient_id": "{{PATIENT_ID}}",
04 "pathway_definition_id": "{{PATHWAY_DEFINITION_ID}}"
05 }
06}

Variables - With baseline data points

  • json
01{
02 "input": {
03 "patient_id": "{{PATIENT_ID}}",
04 "pathway_definition_id": "{{PATHWAY_DEFINITION_ID}}",
05 "data_points": [
06 // Repeat for each input data point
07 {
08 "data_point_definition_id": "{{DATA_POINT_DEFINITION_ID}}",
09 "value": "{{DATA_POINT_VALUE}}"
10 }
11 ]
12 }
13}

Serialization

Given data point values are polymorphic, the value for a data point should always be sent as a string. Values are validated and deserialized on the Awell side and we will throw an error if a value does not match the corresponding data point value type.

In table below you can find an overview of all baseline data point types and the value type you should be sending to the Awell API.

Data point value typeValue type to sendExamples
dateISO8601 string"2023-01-01"
numberstring"10"
stringstring"Awell is great"

How to use