Related Events: How to set up fields to pull data from a Related Event Form back into an Event Form
The previous lesson outlined how to set up a Related Event so that one or more events can link together and those forms can even be limited to be entered through that linked event. However, you can also get a lot more technical and specify fields to automatically fill in the event from the related event records.
There are two possible ways that you can set up to link data from the related events to the event they are related to:
1: Set up a field in the related event has the same name as a field in the event and enable the Form Advanced Properties to say "Linked Data PullThrough". When a new related event is entered the field that has exactly the same name will be pre-populated with the results from the event . For this example, the Mechanism of Injury is going to be pushed from the injury/illness event to the related event (Medications event ).
2: Set up a Related Summary Field in the event (with any name) and set it to pull through fields that are exactly the same name back into the event, e.g. medications pulling back into a SOAP table, or medications field. Linked Data Pullthrough would be turned off for this.
Linked Records can be set to pull data from the related events to the record they are linked to, or from the event to the linked record.
To set up data flow FROM the event (e.g. illness/injury record) TO the related events (e.g. medications or screening): on the Injury and Illness Form, enable the "Linked Record Pullthrough"
Double check that the field name (and field type and any possible options) in the Medications form are set up EXACTLY the same as the field that you want to link to. For this example Mechanism of Injury is going to be added to the Medications Form
Now on the application, when the Injury/Illness record is opened and you select to add a new Related Event (e.g. New Medications) the field will automatically update in the related event.
When a new related event form is entered (e.g. New Medications), the field that is the same (e.g. Mechanism of Injury) is automatically completed is already completed based on what was entered in the event.
N.B. The data cannot go FROM the related event back into the event (unless you add in a special type of question field-discussed in the steps below). The data is always pushed from the event (e.g. the injury illness) to the related events that have the exact field name.
For example, if you set up a Medication Given (Yes/No) field in the Medications Form and and entered medication event as a linked record, that Medication GIven won't push back into the Injury/Illness even if the "Linked Form Pullthough is turned off. To pull data from the related events back into the event they are related to you need to add in
You can have multiple related events and they can all have a field name in them that is exactly the same as one in that they link to.
Setting up the data to flow FROM the linked event back INTO the original event can be done when you turn OFF the Linked Record Pullthrough and set up your form correctly to include field types especially designed to do this
The image here shows that data from the related events (Medications and Postural/Musculoskeletal) is pulled back into the SOAP table Summary Field. This is performed by setting up specialised field called a Related Event Summary Field in the actual form (see below). It is NOT done by setting up the field names to be the same between the event and any related events.
To set up the specialised field use the Add Question component on the Form Builder. Add in a field type into the form called "Related Event Summary"
The example here shows that a Related Event Summary Field has been added to the SOAP notes table in the Injury/Illness form. The question has been named Summary (as you can see in the table). It does not matter what you name this field, what matters is calculation name that you specify on the calculation section of the form builder for this field type. For this example, we are going to pull through the results of the Medications prescribed and of all Posture/Musculoskeletal forms as these form have both been selected to be related events. We are going to specify to pull the data from these related events BACK into the Injury/Illness SOAP table. This is shown in the step below.
Now set up the Calculation component of the Related Event Summary Field (added to the SOAP table in the step above) and set up the field name that is going to link back into the Form from the Related Events. Then save the Form
Set up the name of the field that you want to pull data from in the related events. You may already have fields that are set up in the related events that you want to pull data from, but in this example we are going to set up a field in the Medications and Screening event forms that are called Linked. It will be these fields that are pulled back into the Summary field column in the SOAP table of the Injury/Illness record.
Updated the Related Events to ensure the field name is the same as that specified in the calculation field of the Linked Summary Field and that it is pulling through the correct data
For this example, an additional Text Calculation Field was added to the Medications table (to concatenate (Medications, " ", Amount Given, Units, " ", Frequency) which combines all of the fields along the same row in the table. This field will be set to hidden on the actual application. This field was named "Medication and Units"
Then, a Table Text Calculation field (because we are performing a calculation about a table) was set up to "Text Summarise" the field "Medications and Units". This field was named "Linked" and as we have previously set, this field will be the one that pulls back through into the SOAP table of the injury/illness form. This means that the data that is pulled back into the Injury/Illness record will actually be a summary of each rom of Medication, Amount Given, Units and Frequency from a Medications Form table.
Update any other related events and again ensure they are pulling through the correct data.
For the Postural/Screening form here, an additional Linked field was added that is a text calculation that combines (concatenate (Important Summary, " ", Comments)) the Important Summary Field that has been set up to summarise any fields that have been marked as important with the comments section and that field will populate the event SOAP notes table in the Injury/Illness record.
You can add in as many records to be related events to an event form and pull through data from each of those fields as long as the field name is an exact match to the field name that you specified for the "Summary Related Event" field
On the application, the events still appear on the sidebar and underneath the event. Now when you add in a new related event with a Matched Date to the SOAP date and the data will be pulled into the actual record.
The example here shows that in the SOAP table when the dates of the related event records match the SOAP date the Linked field data is pulled back through into the Summary column in the field.
This means that for any related event entered on the system, if the date matches the SOAP Assessment Date the data will be pulled through.
You can also pull data from a related event back into the form without using a table format, but only the first linked record will be pulled through in the event
The example here shows that an additional field called Medications has been set up on the Medications form. It is a Table Calculation that performs a text Summarise for the Medication Column (which means the names of any medications prescribed will be shown in this field). This field was been added so that data from this field can link back into the Injury/Illness form.
On the event (e.g. the Injury/Illness Form) add in a Related Event Summary Field and set the calculation to pull through a Medications field from any related events.
This Related Event Summary Field has been set up to link to any field called Medications. This means that the new field that was added in the Medications event (in the step above) will now be able to be pulled through directly into the injury/illness form. However, instead of pulling through data matched data (as for the SOAP table) it will pull through the first entered record.
Remember that we are still pulling through the field "Linked" into the SOAP table as well.