We have prepared a set of controllable triggers based on the database for each of the system tables. In a separate table, we included tags that permit enabling or disabling the mechanism of collecting data changes. Thanks to the database design, any change to a data record including data deletion, is automatically stored in the historical table. This table contains information about when and who made changes to the data. Thanks to this solution, we minimized the amount of programming work in the application itself and the solution used is scalable efficient, and reliable because it works independently of the medical system and the running module.