Module: Practice Management (PM)Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Feature: PM-01 Patient Registration & Demographics
Version: 1.0
Updated: 2026-02-18
Overview
This guide covers permission configuration, role assignments, audit considerations, and data management for the Patient Registration feature (PM-01).Permission Key Reference
| Permission Key | Constant | Description |
|---|---|---|
pm.patients.view | PM_PERMISSIONS.PATIENTS_VIEW | View patient list and detail pages |
pm.patients.create | PM_PERMISSIONS.PATIENTS_CREATE | Register new patients (shows Register button) |
pm.patients.update | PM_PERMISSIONS.PATIENTS_UPDATE | Edit demographics and manage child records |
pm.patients.merge | PM_PERMISSIONS.PATIENTS_MERGE | Merge duplicate patient records (Phase 2 — not yet active) |
Default Role Assignments
These assignments are seeded by the PM-01 database migration (pf_role_permissions):
| System Role | View | Create | Edit | Merge |
|---|---|---|---|---|
org_admin | ✅ | ✅ | ✅ | ✅ |
site_admin | ✅ | ✅ | ✅ | — |
staff | ✅ | ✅ | — | — |
readonly | ✅ | — | — | — |
Note: The org_admin role automatically receives all active permissions via the platform trigger. Custom roles can be configured in Settings > Permissions.
Managing PM Permissions
- Navigate to Settings > Permissions (requires
org_adminrole). - Select the Practice Management module from the module list.
- Assign or revoke permissions per role using the toggle interface.
- Changes take effect immediately for newly issued tokens; existing sessions refresh on next page load.
MPI Duplicate Override Audit
When a staff member overrides a duplicate warning during patient registration:- The override reason is stored in the patient’s
custom_fieldsJSONB column under the keympi_override_reason. - The
created_bycolumn records which user performed the registration. - The
created_attimestamp provides the exact time of registration.
Soft Delete vs. Permanent Delete
Patient records and child records (addresses, contacts, guarantors) use soft deletion — thedeleted_at column is set to the current timestamp, and records are hidden from standard views.
Soft delete behavior:
- Records remain in the database for audit and recovery.
- Application queries filter
deleted_at IS NULL. - RLS policies enforce this at the database level.
Module Settings
Thepm_module_settings table contains organization-specific configuration for the PM module. Currently, the settings UI is not exposed (Phase 3). Direct database edits can be made for:
| Setting | Default | Description |
|---|---|---|
patient_number_prefix | 'MRN-' | Prefix for manually entered MRNs |
duplicate_detection_enabled | true | Enable MPI duplicate check on registration |
Database Tables
| Table | Description |
|---|---|
pm_patients | Core patient demographics (USCDI v3) |
pm_patient_addresses | Patient address records (soft-delete) |
pm_emergency_contacts | Emergency contact records (soft-delete) |
pm_guarantors | Financial guarantor records (soft-delete) |
pm_module_settings | Organization-level PM configuration |
FORCE ROW LEVEL SECURITY. SECURITY DEFINER helpers (pm_has_org_access, pm_can_access_patient, pm_can_modify_patient) prevent RLS recursion.
Related Resources
- User Guide
- PM-01 Specification
- Implementation Log
- Platform Permissions:
src/platform/permissions/constants.ts