Context
One of the advantages of using Smartabase is being able to store and view data from multiple sources in one location. For example, your site may contain information entered by athletes about their wellness, training load data synced automatically from a third party integration and medical updates from their health practitioner.
Dashboards allow us to overlay those sources and apply a more holistic approach to interpreting the data, while linked calculations allow us to display snippets of information from one event form in another event form. A third option is the use of status indicators which is where a field on the Smartabase site is selected to indicate the athletes' availability status. This availability status can be shown in different areas of the main interface when accessed via the web browser.
In the screenshot below, the status of each athlete is indicated by a colored dot beside their name in the sidebar. In this instance, a green dot indicates that the athlete is available while a red dot indicates that the athletes is unavailable. We can see that Jamie Anderson is unavailable to train by the red dot next to his name.
The status indicator is also shown when selecting an athlete during data entry. Note the same color is displayed underneath each athlete card and we can see that Jamie Anderson is unavailable due to the red line under his name.
In our tutorial on creating electronic medical records within Smartabase, we showed you how to collect information about medical incidents and the patients' availability status. This tutorial extends on that workflow by looking at how to determine availability using treatment status and set it as a status indicator to be displayed across your Smartabase site.
Status indicators can be applied to any type of option field including Slider, Single select, Dropdown, Option calculation, Linked option and Table option calculation fields. Each option is assigned a score, which is used to determine the worst current state of the person. Status indicators may be enabled on the original data source or in a summary form that combines multiple data sources. For example, you can enable status indicators on the Status field in the Treatment Notes form that was created in the embedded medical workflow from the previous tutorial. Each time someone is treated by their practitioner, a new Treatment Notes record will be created with their latest availability status. If the status field is set as a status indicator and the appropriate settings are enabled on the site, their latest treatment status will be displayed in the sidebar.
The screenshot below shows what the sidebar looks like when the status indicator is enabled in the Treatment Notes form. Note that there is only a status indicator next to Jamie Anderson- that is because none of the other athletes in this group have received any treatments, so they do not have any records that provide them with a status.
An alternative option is to create an event form that is saved daily and link the status into the form. Saving a record every day ensures that every person has at least one record, even if they haven't received a treatment. This is also a useful approach if you track status in multiple areas and want to combine those into one overall status- for example, you may collect injury status in one form, illness status in another form and self-rated availability in a daily wellness form. Self-rated availability may be used to allow people to report that they’re unavailable before they’ve received treatment for an injury or illness.
The screenshot below shows what the sidebar looks like when the status indicator is enabled in a daily summary form. In this example, we have performed a calculation in the summary form so that if the person has no treatment status, they are assumed to be available. As such, their green status indicates that they are available.
The tutorial will use the second approach to display a status for every person, regardless of whether or not they have a previous treatment record.
Goals
This tutorial will take you through the process of setting up a daily availability form that is automatically generated by Smart saves and Smart flows. You will set up a status indicator using an availability field to indicate someone’s worst status based on any injuries they currently have. You will also create a performance standard for the availability field.
Outcomes
- Create an availability field and set it as a status indicator.
- Set up a performance standard for the availability field.
- Set up a daily Smart save for the availability form.
- Set up a Smart Flow for the availability form.
Outcome 1: Create an availability field and set it as a status indicator
In this tutorial, we’ll be referencing the status of an athlete based on their worst current injury status. We will be referring to the Treatment Notes form created in the tutorial on creating an embedded injury and treatment workflow.
- Ask your Smartabase consultant to adjust the Application details on your site so that the Athlete status setting uses the most recent state.
- Create a new event form named Daily Availability.
- Add a Linked option calculation field named Latest Tx Status.
- Set the options as Available, Modified and Unavailable. If you are using a different event form or field, ensure that the options you set here are the same as those in your status field. The status options must be entered in either ascending or descending order of severity (i.e. best to worst, or worst to best).
- In the advanced field properties, set the Manual update property to False and the Linked update range property to End of current event.
- In the Calculation section of the sidebar, set the following details:
- Form: Treatment Notes
- Field: Status
- Select value: Newest
- Date restriction: All history (include the most recent result)
- Add an Option calculation field named Availability.
- Set the options as Available, Modified and Unavailable.
If you are using a different event form or field in the linked calculation, ensure that the options you set here are the same as those in your linked field. - Assign scores to the options such that the options are ordered from worst to best, where the worst option is scored as 1 and the best option has the highest score. Therefore, score Unavailable as 1, Modified as 2 and Available as 3. Be sure to select Update after assigning scores otherwise they will not be saved.
- In the advanced field properties, set the Best value property as Available and the Status indicator property as Yes.
You can set multiple fields on the site as status indicators but only if it uses the exact same options and scoring. You can check which fields are set up as status indicators in the Data specification tool on the builder interface.
If you are using the Treatment Notes form from the previous tutorial, you would have set the Status field as a status indicator. You can leave it as is for the purpose of this tutorial because we will use the same options and scoring in both fields. - In the Calculation properties, enter the following formula:
if(isempty(Latest Tx Status), “Available”, Latest Tx Status)
This means that if there is no injury record for the athlete, we are assuming that their status is available so they will have a status indicator available to them.
- Set the options as Available, Modified and Unavailable.
- In the form properties, set the Default date to All history (include the most recent result). This means that when you run a report, only the most recent record for each athlete will show by default which can make it easier to view the most recent data.
- In the form save properties:
- Adjust the configurations so that only the Save and close button is enabled. Since this form will be generated via automations, you will only need to assign Read access to the form in roles so technically people will not be able to interact with the save buttons anyway. However, setting the save buttons is good practice.
- Set Save audits to No. This step is necessary to complete Outcome 3.
- In the advanced form properties, set Auto-color to Yes. This ensures that when a performance standard is created in Outcome 2, the option will be colored during data entry according to the performance standard.
- Save the event form.
Outcome 2: Set up a performance standard for the availability field
- Go to the Performance standards tool and create a new performance standard.
- Set the description as the name of the event form (Daily Availability) for easy searchability.
- Set the event as the Daily Availability form.
- Apply the performance standard to the Daily Availability form.
- In the Rules section, select the Availability field to expand the options.
- For each option, click on the colored square beside the option name, enter a custom HEX code value then select the tick icon next to the HEX code. We have used the following HEX codes:
- Available: #00C848
- Modified: #FFAA00
- Unavailable: #FF5630
- Save the performance standard.
Outcome 3: Set up a daily Smart save for the availability form
- In the administration interface, open the Smart saves tool.
- Create a new Smart save and set it up as follows:
- Name: Daily Availability
- Time zone: select your GMT time zone
- Uncheck trigger at end of day
- Target event: Daily Availability
- Date type: Period
- When: Week, then tick all days of the week.
- Start: 12:00am
- Click Save.
- Add monitored groups from your site who should have a Daily Availability record saved each day.
- Click Save.
Outcome 4: Set up a Smart Flow for the availability form
- In the administration interface, open the Smart flows tool.
- Create a new Smart flow and set it up as follows:
- Name: Treatment Notes --> Daily Availability
This terminology has been used to indicate that the Treatment Notes form is flowing into the Daily Availability form, but you can use a different naming convention that makes sense to you. - Trigger criteria: Treatment Notes
- Target events: Daily Availability
- Date type: Point in time
- Interval: 0 hours
- Tick the delete target event(s) option. This means that if the Treatment Note record is deleted for some reason, the Daily Availability record will also be deleted.
- Tick the option to enable for all users so that the Smart flow applies to all users on the site. Alternatively, leave it blank and set monitored groups and athletes after clicking Save.
- Click Save.
Test your workflow
- Ensure that your role has the necessary permissions to edit the Treatment Notes and Daily Availability forms in the main interface.
- Enter a daily record for the Daily Availability form for a handful of days. It may be easiest to generate the data in Excel and import it as a .CSV file.
- Enter some test records for the Treatment Notes form, including records for different people and multiple records for the same person.
- Check that the status indicator next to the person’s name accurately reflects the most recent status.
Troubleshooting status indicators
- Check that you have set appropriate options for the status indicator field.
- If the status indicator field is a calculation, check that the field has appropriate options and that the calculation is working correctly in reports.
- Check that the options for the status indicator field are scored from best to worst, and that the worst option is scored 1.
- Check that you aren’t referencing a status from within a table. If you do this, the status will always default to the status in the first row, not the most recent.
- Make sure no other fields on the site are set as status indicators in the Data specifications tool.