Thermocare

Thermocare sample reports page

The brief

The client wanted to create a brand new system that would replace their previous one entirely, help automate some processes, and provide added benefits to their own clients.

Some of the features required were:

  • Add users with different user roles and access.
  • An admin area where their clients could download/upload documents, add contacts who could access the admin area, and monitor their systems.
  • Monitor the temperatures of systems at their clients site, and send out notifications if they fell outside given parameters.
  • Create sample reports for updating their clients on the condition of their systems, and generate a PDF document which would be stored on the system and sent out in an email to their clients once published.

The approach

I ended up creating this project as a TALL (Tailwind, Alpine, Laravel & Livewire) stack application, using several additional packages to help with some of the functionality.

To handle the monitoring of systems I set up a scheduled task which loops through all the systems in the database, sends out an api request for the systems sensor data, and then checks to see whether the latest sensor readings are within the set range of parameters. If not then I used Laravel’s notifcation system to send an alert out to the client. I also output this sensor data on the admin area so the it could be monitored from there.

Thermocare 24/7 monitoring system dashboard

For the sample reports feature the client wanted to move their processes from their previous setup, which involved working on several pieces of software, to this one system. The thing they wanted was a dashboard where they could check up on what stage their reports were at within a certain time frame, and have an overview of sample reports. I managed this by adding a status field which would be updated when a certain section of the sample report form was completed (see next section). Then I selected all the sample reports within a time frame and created aggregates of the different status’s.

Thermocare 24/7 monitoring system dashboard

The client also wanted a form which had multiple sections with each section being accessible to certain user roles only. I used the status field as mentioned above to check whether a section of form was editable or not, and then once that section was complete I updated the status of the sample report. After all sections had been filled in the client could then publish the sample report which generated a PDF document that was both stored on the server and sent to the company that sample report belonged to.

Thermocare 24/7 monitoring system dashboard

They also wanted to automate the creation of sample reports so that they didn’t need to create one everytime they needed one. I accomplished this by adding a frequency field to the company systems (e.g., weekly, monthly, yearly), and when a sample report had a certain field set it would create a scheduled sample report in the database. A scheduled task would then check these every day to see if any needed creating, and if so then it would create a new entry in the sample reports table.