The Patient Clinical Timeline enables care managers to track key clinical information such as conditions, episodes of care, procedures, or medications by providing an at-a-glance view via the calendar control.

It also enables the quick creation of events via the control.

One of the key advantages of this control is the ability to extend it to custom tables within your solution.

In this article, we will explain the basics of the configuration of the patient clinical timeline and how to format your configuration schema file properly.

A screenshot of a computer

Description automatically generated

Configuration Schema File

The behaviour of this control is managed through a web resource called the Timeline Schema. You can check which schema is being used by your control by clicking on the Edit properties of the component within the Form Designer window as shown below.

A screenshot of a computer

Description automatically generated

Microsoft provide their own schema within the Cloud for Healthcare solution, it has the file name of msemr_timelinecustomschema.xml and can be found within the solution package: Healthcare – Foundation > Web Resources > Data.

Now let’s take a look at the schema structure itself.

Schema Structure

The schema allows for the quick creation, and card display of records on the timeline control on both a per App and a per Form basis.

A screenshot of a computer program

Description automatically generated

At the parent level, we have AppModules where we may specify specific Model Driven Apps in which to apply our settings. There is a Default option which will apply to all applications also.

At the next level we have Forms. Here we may specific forms to apply our configuration, they are identified by their FormID.

Within each Form there exists a CustomJson element, that contains the key configuration data for our control. The options provided are:

  • primaryIdField: the primary key (id field) of our table
  • logicalName: the name of our table
  • displayName: the name which is rendered on the control itself
  • descriptionField: alt text form our table
  • startDateField: start range for our record to be displayed on to the calendar
  • endDateField: end range for our record
  • statusField: the status in which may be filtered (below)
  • statusFiltersField: is an exclusive filter of statuses which we do not wish to display
  • regardingField: the key linkage field back to the patient (contact)
  • modalDialogFormId: the quick create form in which is actioned when a button is pressed
  • addToTimelineText: the helpful action label that shows on the UI to guide users when adding to the timeline

In order to add your own custom table to the JSON segment, its best to take a copy of an existing segment and paste. Order is important as it will render in the order in which this is presented. For example:

Tips when Adding a Custom Table to the Schema

When configuring the schema, here are some tips to ensure that all goes smoothly.

  1. Take a copy of the Custom Schema and add to your solution, then repoint the control to the new custom schema. E.g. copy the msemr_timelinecustomschema.xml and give it a new name such as mysolution_timelinecustomschema.xml.
  2. When editing the Custom Schema, be careful to not remove line breaks within the CustomJson (some editors like Notepad will do this, personally I use Notepad++ but you could use VS Code), as it will break the component.
  3. When editing the CustomJson segment with your own custom table parameters, ensure that you have applied it to ALL forms which you intend to use it. You could go around in circles trying to figure out why it does not display for certain users.
  4. When adding the configuration for your custom Table, ensure you have all elements included (especially the statusField and statusFiltersField – the component backend will check for this, and throw errors if they are not present).

This concludes this week’s quick tip on Microsoft Cloud for Healthcare, please let me know if you have any questions or any feedback on this article.