Mutations
Start a new care flow for a given patient
Care flows can only be started for patients so you need to create a patient first before you can start a care flow. You can create a new patient with the createPatient
mutation.
When you create a new patient, we will return you an Awell patient ID, which you can use to start a care flow. However, if you have created a patient using your own business identifiers, you can also utilize these identifiers to start a care flow.
To use identifiers, they need to be set up on the tenant level. Learn more about how to set up identifiers.
When starting a care flow, Awell Orchestration automatically chooses the most recent published version of the specified care flow definition.
Improved support for versioning is coming soon, with the ability to select a specific version when starting a new care flow and upgrading started care flows to newer version.
There are two mutations to start a care flow for a patient, they only differ by how to provide information for which patient to start a care flow, via Awell patient ID or via a business identifier.
This mutation allows you to start a care flow for a patient using the Awell patient ID.
Request:
01
Variables:
01
This mutation allows you to start a care flow for a patient using a business identifier.
01
Variables:
01
01
The pathway_definition_id
can be located either by using the publishedPathwayDefinitions query or by checking the URL bar while working in Awell Studio. It's important to remember that your care flow must be published and have an active version set before you can start it.
How to find the care flow definition ID in Awell Studio
You have the ability to pass some initial data when starting a care flow with baseline data points. What data you can pass on care flow start needs to be configured in Awell Studio. When your baseline data points are configured and your care flow is published, you can query the available baseline data points via the publishedPathwayDefinitions
query (see documentation here).
01
Configure baseline data points
There are required
and optional
baseline data points. A care flow will not be started if not all required baseline data points have a value.
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 type | Value type to send | Examples |
---|---|---|
date | ISO8601 string | "2023-01-01" |
number | string | "10" |
string | string | "Awell is great" |