Skip to content

Archivability

In most cases in this application, we do not physically delete records (entities) from the database. Instead, we use an archiving mechanism that changes the entity status to “archived” or “inactive”. This allows us to maintain a complete data history, which enables:

  • Recovery of accidentally archived data.
  • Auditing and tracking changes in the system.
  • Ensuring consistency of references between entities.

When editing or “deleting” data, records are not physically removed from the database – instead they are marked as archived. Such data still appears on lists (e.g., in admin panels), allowing them to be viewed and potentially restored. However, in the context of prescription dispensing, archived records are not available – they cannot be selected or associated with a new prescription. This way we maintain data integrity and change history, while preventing the use of outdated information in the prescription dispensing process.