EHRGen is an EHR framework based on openEHR that aims to provide a fast way to create and modify openEHR-based EMR applications with minimal effort. It generates the GUI, database schema, and basic business logic from openEHR archetypes and terminology to create customized EMR systems for various specialties and departments while keeping clinical knowledge separate from the application code. Security features include role-based authorization and permission controls at the clinical domain level.