Queries
Retrieve the data dictionary for a pathway
For any given care flow/pathway a patient is included in, you might want to know what data points are captured in that pathway (i.e a data dictionary). Via the pathwayDataPointDefinitions
query, you're able to retrieve all data points definitions for a given pathway version.
Every patient enrolled in a pathway is included in the last version of the pathway at the moment of pathway start. Because care flows/pathways can evolve over time, it might be that the oldest version of your pathway has a totally different data dictionary compared to the most recent version.
Therefore, to query all the data point definitions for a given pathway version, you need to specify the release_id
as an input parameter for this query.
The version
of a pathway is an auto-incremented and human-readable numerical value (eg: version 5). However, every version also has a unique identifier which is called the release_id
. The version
and release_id
are returned in all pathway related queries.
Example:
All patients included in version 5 of the pathway have the same release_id
.
- graphql
01query GetPathwayDataPointDefinitions(02 $release_id: String!03 $category: [String!]04 $value_type: [String!]05) {06 pathwayDataPointDefinitions(07 filters: { category: { in: $category }, value_type: { in: $value_type } }08 release_id: $release_id09 ) {10 data_point_definitions {11 id12 title13 key14 category15 valueType16 possibleValues {17 value18 label19 }20 range {21 min22 max23 }24 unit25 optional26 pii27 data_point_metadata {28 key29 value30 }31 }32 }33}
The data_point_metadata
field can be used to retrieve additional information about a data point definition. This additional information can be configured in the Data Catalog section of Awell Studio, and a guide can be found in the Awell knowledge base.
A release_id
needs to be specified in order to retrieve the data dictionary for a pathway.
- json
01{02 "release_id": "{{ RELEASE_ID }}"03}
The filter is optional: if you don't provide one, all data points with the specified release_id
will be returned.
- graphql
01query GetPathwayDataPointDefinitions($release_id: String!) {02 pathwayDataPointDefinitions(release_id: $release_id) {03 data_point_definitions {04 ...DataPointDefinition05 }06 }07}
All in
filter type accepts a list of values and results in an is any of
search criteria.
When specifying multiple filters, the resulting criteria is the conjuction of all filters.
01{02 "release_id": "{{ RELEASE_ID }}",03 "category": [04 "CALCULATION",05 "FORM",06 "PATIENT_PROFILE",07 "PATHWAY",08 "TRACK",09 "STEP"10 ],11 "value_type": ["BOOLEAN", "DATE", "NUMBER", "NUMBERS_ARRAY", "STRING"]12}
There is no pagination or sorting available for this query. All matching patient pathways will be returned.