Awell Health Developer Hub
Developer Hub

When designing a care flow, you can assign stakeholders to actions. This tells the system who needs to complete what. When orchestrating care flows, you might want to retrieve these stakeholders to answer questions like:

  • Which stakeholders are present in a specific version of a care flow?
  • Which stakeholders are present over all versions of a care flow?
  • Which stakeholder id does map to which stakeholder (label)?

We provide a couple of queries to get the data you need related to stakeholders. Feel free to select the one that works best for your use case.

Queries

stakeholdersByDefinitionIds

Get published stakeholders details by one or more stakeholder definition IDs, useful for swapping definition ids for stakeholder labels.

  • graphql
01query GetStakeholdersByDefinitionIds($stakeholder_definition_ids: [String!]!) {
02 stakeholdersByDefinitionIds(
03 stakeholder_definition_ids: $stakeholder_definition_ids
04 ) {
05 stakeholders {
06 id
07 label {
08 en
09 }
10 release_id
11 clinical_app_role
12 definition_id
13 }
14 }
15}

stakeholdersByPathwayDefinitionIds

Get published stakeholders details by one or more care flow definition IDs, useful for ensuring you have all stakeholders across all versions of a care flow (e.g. if a stakeholder was removed in a newer version of a care flow).

  • graphql
01query GetStakeholdersByPathwayDefinitionIds(
02 $pathway_definition_ids: [String!]!
03) {
04 stakeholdersByPathwayDefinitionIds(
05 pathway_definition_ids: $pathway_definition_ids
06 ) {
07 stakeholders {
08 id
09 label {
10 en
11 }
12 release_id
13 clinical_app_role
14 definition_id
15 }
16 }
17}

stakeholdersByReleaseIds

Get published stakeholders details by one or more release IDs, useful for when you want an overview of all stakeholders for a specific version(s) of a care flow.

  • graphql
01query GetStakeholdersByReleaseIds($release_ids: [String!]!) {
02 stakeholdersByReleaseIds(release_ids: $release_ids) {
03 stakeholders {
04 id
05 label {
06 en
07 }
08 release_id
09 clinical_app_role
10 definition_id
11 }
12 }
13}

filterStakeholders

A query that combines all input fields of the queries above and is useful for filtering. All input fields are optional, if no values are passed it will return all stakeholders in all your published care flows.

  • graphql
01query FindStakeholders(
02 $pathway_definition_ids: [String!]
03 $release_ids: [String!]
04 $stakeholder_definition_ids: [String!]
05) {
06 filterStakeholders(
07 pathway_definition_ids: $pathway_definition_ids
08 release_ids: $release_ids
09 stakeholder_definition_ids: $stakeholder_definition_ids
10 ) {
11 stakeholders {
12 id
13 label {
14 en
15 }
16 release_id
17 clinical_app_role
18 definition_id
19 }
20 }
21}