# HIPPOHMS MASTER SPECIFICATION

**Product:** HippoHMS – Hippo Hospital Management System  
**Product Owner:** Hippo CloudApps Ltd  
**Document:** Master Product & Technical Specification  
**Version:** 1.0  
**Status:** Initial Baseline  
**Date:** 21 November 2026

---

# 1. INTRODUCTION

## 1.1 Product Overview

HippoHMS (Hippo Hospital Management System) is an integrated, modular Hospital Management Information System developed by Hippo CloudApps Ltd.

The system is intended to digitise, integrate and streamline hospital operations, clinical processes, financial management and patient care.

HippoHMS will provide a centralised platform through which healthcare organisations can manage their facilities, patients, healthcare professionals, clinical activities, diagnostics, pharmacy operations, billing, inventory and administration.

The product will be developed as a commercial enterprise-grade application supporting:

- Small clinics and medical centres.
- Medium-sized hospitals.
- Large hospitals.
- Specialist healthcare facilities.
- Multi-branch hospital organisations.
- Healthcare groups operating multiple facilities.

HippoHMS will be modular, configurable, multi-tenant and scalable.

Hospitals should be able to activate the modules relevant to their operations without requiring every module to be deployed or used.

## 1.2 Product Ownership

HippoHMS is owned and developed by Hippo CloudApps Ltd.

It forms part of the wider Hippo CloudApps integrated business application ecosystem.

HippoHMS must therefore follow the shared architectural, security, identity, organisation and integration standards established by Hippo CloudApps.

## 1.3 Product Vision

To provide healthcare organisations with a unified digital platform that improves patient care, operational efficiency, financial control, accountability and access to reliable healthcare information.

## 1.4 Product Mission

To simplify healthcare administration and management through an integrated, accessible and scalable hospital management platform.

## 1.5 Product Positioning

HippoHMS is positioned as an integrated healthcare management platform rather than a standalone hospital billing or patient registration application.

Its core value proposition is the integration of clinical, administrative, operational and financial processes within one platform.

---

# 2. PRODUCT OBJECTIVES

HippoHMS must achieve the following objectives:

1. Establish a centralised patient information management system.
2. Digitise patient registration and healthcare delivery workflows.
3. Improve coordination between clinical departments.
4. Integrate laboratory, radiology and pharmacy operations.
5. Improve hospital billing, collections and financial accountability.
6. Support outpatient and inpatient healthcare operations.
7. Improve hospital resource and inventory management.
8. Provide management with timely operational and financial information.
9. Support multi-facility healthcare organisations.
10. Provide secure, role-based access to information.
11. Enable integration with external healthcare systems and service providers.
12. Support different healthcare business models and deployment arrangements.

---

# 3. TARGET MARKET

HippoHMS will serve three broad market segments.

## 3.1 Small Healthcare Facilities

Examples:
- Medical clinics.
- General practitioners.
- Specialist clinics.
- Diagnostic centres.
- Small maternity facilities.

Typical requirements:
- Patient registration.
- Appointments.
- Consultations.
- Prescriptions.
- Pharmacy.
- Laboratory.
- Billing.
- Basic reporting.

## 3.2 Medium-Sized Hospitals

Typical requirements:
- Full outpatient management.
- Inpatient management.
- Electronic medical records.
- Nursing.
- Laboratory.
- Radiology.
- Pharmacy.
- Theatre.
- Insurance.
- Billing and cashier.
- Procurement.
- Inventory.
- Management reporting.

## 3.3 Large Hospitals and Healthcare Groups

Typical requirements:
- Multiple hospitals and facilities.
- Centralised administration.
- Advanced clinical workflows.
- Multiple departments.
- Advanced financial management.
- Insurance integrations.
- Enterprise reporting.
- Inter-facility patient management.
- Advanced security and auditing.
- Integration with external healthcare systems.

---

# 4. PRODUCT ARCHITECTURE

## 4.1 Architectural Philosophy

HippoHMS will use an integrated core with independently configurable modules.

The application must not be developed as a collection of disconnected applications.

Shared functionality should be developed once and reused across all modules.

Each functional module should have defined responsibilities and communicate through established application services.

## 4.2 Architectural Layers

The application will follow a layered architecture.

| Layer | Responsibility |
|---|---|
| Presentation | User interface, dashboards, forms and navigation |
| HTTP | Routing, controllers, middleware and request handling |
| Application | Use cases, workflows and application services |
| Domain | Business rules, entities and domain services |
| Infrastructure | Database, external integrations and technical services |
| Shared Platform | Common CloudApps identity, tenancy and infrastructure |

## 4.3 Shared Platform Integration

HippoHMS must reuse the existing Hippo CloudApps platform wherever appropriate.

Shared services include:

- Identity management.
- Authentication.
- User management.
- Organisation management.
- People management.
- Tenancy.
- Access control.
- Role and permission management.
- Application registration.
- Subscription management.
- Notifications.
- Document management.
- Workflow management.
- Audit logging.
- Partner and reseller services.

Do not duplicate existing platform services inside HippoHMS.

HippoHMS will maintain its own application-specific business logic, clinical records, hospital configurations and operational data.

## 4.4 Multi-Tenant Architecture

The application must support multiple independent healthcare organisations.

Each tenant must have isolated operational data.

A tenant may operate:

- One clinic.
- One hospital.
- Multiple hospitals.
- Multiple medical centres.
- Multiple specialist facilities.

The architecture must prevent unauthorised cross-tenant data access.

Tenant identification and context resolution must be handled through the shared platform tenancy services.

## 4.5 Multi-Facility Architecture

An organisation may have multiple facilities.

The system must support:

- Main hospitals.
- Satellite hospitals.
- Clinics.
- Diagnostic centres.
- Specialist facilities.
- Other healthcare service locations.

Each facility may have its own departments, users, service points, inventory and operational configuration.

Where permitted, selected resources and information may be shared across facilities.

---

# 5. TECHNOLOGY STACK AND DEVELOPMENT STANDARDS

## 5.1 Approved Technology

| Component | Standard |
|---|---|
| Backend | PHP 8.4 |
| Database | MySQL 5.7.44 |
| Database engine | InnoDB |
| Database access | PDO |
| Frontend | HTML5, CSS3, JavaScript |
| UI framework | Bootstrap 5 |
| Icons | Bootstrap Icons |
| Charts | Chart.js |
| AJAX | Fetch API |
| Email | PHPMailer |
| Excel | PhpSpreadsheet |
| PDF | mPDF 8 |
| Dependency management | Composer |

## 5.2 Database Standards

All database structures must be compatible with MySQL 5.7.44.

Standards:

- Use InnoDB.
- Use appropriate indexes.
- Use utf8mb4-compatible character sets and MySQL 5.7-supported collations.
- Use prepared statements.
- Use transactions for multi-step operations.
- Avoid unnecessary duplication.
- Use consistent naming conventions.
- Avoid foreign keys by default.
- Enforce referential integrity through application services and appropriate database constraints.
- Document relationships between tables.

Do not use MySQL 8-only SQL functionality.

## 5.3 Naming Conventions

Shared platform tables:

`platform_`

HippoHMS application tables:

`hms_`

Examples:

- hms_patients
- hms_encounters
- hms_departments
- hms_facilities
- hms_admissions
- hms_prescriptions
- hms_lab_requests
- hms_invoices

Follow existing CloudApps conventions for UUIDs, tenant identifiers, organisation identifiers and audit fields.

---

# 6. SHARED APPLICATION FOUNDATION

The shared foundation is the first development priority.

No hospital-specific module should be developed before the foundation is completed and tested.

## 6.1 Authentication

The system must support:

- User login.
- User logout.
- Password management.
- Password reset.
- Account activation.
- Account suspension.
- Session management.
- Login history.
- Failed login tracking.
- Account locking.
- Optional multi-factor authentication.
- Single Sign-On through Hippo CloudApps Identity.

## 6.2 User Management

Support:

- User creation.
- User profiles.
- User activation and deactivation.
- User suspension.
- Multiple role assignments.
- Multiple facility assignments.
- Department assignments.
- User access history.
- Password administration.

Users should be linked to shared platform identity and people records where appropriate.

## 6.3 Role-Based Access Control

Implement configurable roles.

Example standard roles:

- System Administrator.
- Hospital Administrator.
- Medical Superintendent.
- Doctor.
- Nurse.
- Receptionist.
- Cashier.
- Accountant.
- Pharmacist.
- Laboratory Technician.
- Laboratory Manager.
- Radiologist.
- Radiographer.
- Ward Administrator.
- Procurement Officer.
- Storekeeper.
- HR Officer.
- Auditor.

These roles are templates, not hardcoded restrictions.

A user may have multiple roles.

## 6.4 Permissions

Implement granular permissions.

Examples:

- hms.patients.view
- hms.patients.create
- hms.patients.edit
- hms.encounters.view
- hms.encounters.create
- hms.prescriptions.create
- hms.pharmacy.dispense
- hms.lab.results.verify
- hms.billing.approve
- hms.billing.refund

Permissions must be enforced at the server and service layers.

## 6.5 Module Access

A user may access multiple modules.

Module access must be determined by:

- Organisation subscription.
- Module availability.
- User roles.
- User permissions.
- Facility assignment.
- Data access scope.

## 6.6 Menu Management

Provide a configurable menu administration system.

Features:

- Parent menus.
- Child menus.
- Menu ordering.
- Icons.
- URLs.
- Module associations.
- Permission associations.
- Menu activation and deactivation.

Navigation must be dynamically generated based on user access.

## 6.7 Dashboard

Provide role-aware dashboards.

Each user should see relevant information based on their responsibilities.

## 6.8 Application Switching

Provide a Hippo CloudApps application switcher.

Users should be able to navigate between authorised Hippo applications without maintaining separate credentials.

Use shared identity and SSO architecture.

---

# 7. FUNCTIONAL MODULE CATALOGUE

HippoHMS will comprise the following major functional areas.

## 7.1 Patient Management

Purpose: Maintain a centralised patient information system.

Functional components:

- Patient registration.
- Patient identification.
- Patient demographics.
- Patient contacts.
- Emergency contacts.
- Next of kin.
- Patient documents.
- Patient medical history.
- Allergies.
- Patient appointments.
- Patient queues.
- Patient referrals.
- Patient feedback.
- Patient portal.

Each patient must have a unique identifier within the healthcare organisation.

The system must support duplicate detection and patient record reconciliation.

Patient records should be shared across authorised facilities belonging to the same organisation.

## 7.2 Clinical Management

Purpose: Support clinical consultations and patient care.

Functional components:

- Outpatient department.
- Emergency department.
- Doctor consultations.
- Clinical notes.
- Medical history.
- Vital signs.
- Diagnosis.
- Treatment plans.
- Prescriptions.
- Medical procedures.
- Referrals.
- Clinical reviews.
- Discharge summaries.

Clinical encounters must be properly linked to patient records.

Clinical records should have controlled amendment and verification workflows.

## 7.3 Electronic Medical Records

Purpose: Maintain a longitudinal patient medical record.

Functional components:

- Patient medical history.
- Previous encounters.
- Diagnoses.
- Allergies.
- Medication history.
- Laboratory results.
- Radiology reports.
- Procedures.
- Admissions.
- Discharge summaries.
- Clinical documents.

Support structured and narrative clinical information.

Maintain provenance and audit history.

## 7.4 Laboratory Management

Purpose: Manage diagnostic laboratory operations.

Functional components:

- Test catalogue.
- Test panels.
- Test requests.
- Sample collection.
- Sample identification.
- Sample tracking.
- Sample processing.
- Result entry.
- Result verification.
- Result publishing.
- Laboratory reports.
- Laboratory inventory.
- Equipment integration.

Support configurable reference ranges and critical-result alerts.

## 7.5 Radiology and Imaging

Purpose: Manage diagnostic imaging services.

Functional components:

- Imaging catalogue.
- Imaging requests.
- Scheduling.
- Patient preparation.
- Imaging procedures.
- Image management.
- Radiology reporting.
- Report verification.
- Image retrieval.
- PACS integration.

Support DICOM-compatible integrations.

## 7.6 Pharmacy Management

Purpose: Manage pharmaceutical products and dispensing.

Functional components:

- Medicine catalogue.
- Generic and brand medicines.
- Formulations.
- Strengths.
- Units of measure.
- Prescriptions.
- Dispensing.
- Batch tracking.
- Expiry management.
- Stock management.
- Stock transfers.
- Supplier management.
- Purchase requests.
- Returns.
- Controlled medicine registers.

Dispensing must be linked to valid prescriptions and appropriate billing workflows.

## 7.7 Billing and Financial Management

Purpose: Manage hospital charges, collections and financial accountability.

Functional components:

- Service catalogue.
- Pricing.
- Patient billing.
- Invoices.
- Cashier operations.
- Payment collection.
- Receipts.
- Deposits.
- Refunds.
- Credit management.
- Corporate billing.
- Insurance billing.
- Claims.
- Reconciliation.
- Revenue reports.

All departments must use a centralised billing engine.

Billable activities from clinical, laboratory, radiology, pharmacy and other departments should flow into the central billing system.

Financial integration with HippoBooks should be supported.

## 7.8 Inpatient Management

Purpose: Manage patients admitted to hospital.

Functional components:

- Admission.
- Bed allocation.
- Ward management.
- Patient transfers.
- Nursing charts.
- Doctor rounds.
- Medication administration.
- Clinical observations.
- Procedures.
- Discharge planning.
- Discharge summaries.
- Bed occupancy.

Support:

- General wards.
- Private wards.
- Maternity.
- Paediatrics.
- ICU.
- HDU.
- Other specialist units.

## 7.9 Nursing Management

Purpose: Support nursing workflows.

Functional components:

- Nursing assessments.
- Vital signs.
- Nursing notes.
- Care plans.
- Medication administration records.
- Patient observations.
- Nursing handovers.
- Wound care.
- Fluid balance.
- Patient monitoring.

## 7.10 Theatre Management

Purpose: Manage surgical and theatre operations.

Functional components:

- Theatre scheduling.
- Surgical requests.
- Preoperative assessments.
- Theatre allocation.
- Surgical team assignments.
- Anaesthesia records.
- Surgical documentation.
- Postoperative recovery.
- Theatre consumables.
- Theatre reporting.

## 7.11 Insurance Management

Purpose: Manage healthcare financing through insurance providers.

Functional components:

- Insurance providers.
- Member registration.
- Policy information.
- Eligibility verification.
- Benefit limits.
- Pre-authorisation.
- Claim preparation.
- Claim submission.
- Claim tracking.
- Rejections.
- Resubmissions.
- Reconciliation.

Support configurable integrations with local and international healthcare financing providers.

## 7.12 Procurement and Inventory

Purpose: Manage procurement, stores and hospital inventory.

Functional components:

- Suppliers.
- Purchase requisitions.
- Purchase orders.
- Goods receiving.
- Central stores.
- Departmental stores.
- Stock issuance.
- Stock transfers.
- Stock adjustments.
- Stock audits.
- Reorder levels.
- Asset management.

Where HippoProcure and HippoAssets are available, integrate with those applications instead of duplicating their complete functionality.

## 7.13 Human Resources and Staff Administration

Purpose: Support hospital workforce administration.

Functional components:

- Staff records.
- Department assignments.
- Designations.
- Duty rosters.
- Shift management.
- Leave integration.
- Attendance integration.
- Professional qualifications.
- Licence tracking.
- Staff performance.

Where HippoHRM and HippoPayroll are available, integrate with those applications.

## 7.14 Hospital Operations

Functional components:

- Ambulance management.
- Blood bank.
- Mortuary.
- Equipment management.
- Facilities maintenance.
- Housekeeping.
- Kitchen and catering.
- Patient meal management.
- Transport.
- Utilities and facilities.

## 7.15 Reporting and Analytics

Provide:

- Executive dashboards.
- Patient statistics.
- Outpatient reports.
- Inpatient reports.
- Bed occupancy.
- Doctor workload.
- Nursing workload.
- Laboratory reports.
- Pharmacy reports.
- Revenue reports.
- Insurance reports.
- Inventory reports.
- Departmental reports.
- Operational performance reports.

Reports must respect user permissions and facility access.

---

# 8. PATIENT-CENTRIC DATA MODEL

The patient is the central entity in HippoHMS.

The application must use a patient-centric architecture.

A patient may have:

- Multiple appointments.
- Multiple clinical encounters.
- Multiple admissions.
- Multiple prescriptions.
- Multiple laboratory requests.
- Multiple imaging requests.
- Multiple invoices.
- Multiple payments.
- Multiple referrals.
- Multiple clinical documents.

These records must be linked to the central patient identity.

## 8.1 Encounter-Based Clinical Architecture

Clinical activity must be organised around encounters.

Examples:

- Outpatient encounter.
- Emergency encounter.
- Specialist consultation.
- Inpatient encounter.
- Follow-up encounter.

An encounter should contain or reference:

- Patient.
- Facility.
- Department.
- Attending clinician.
- Encounter type.
- Encounter date and time.
- Clinical observations.
- Diagnoses.
- Treatment plans.
- Clinical orders.
- Encounter status.

## 8.2 Medical Record Integrity

Clinical information must not be silently overwritten.

Support:

- Record author.
- Record creation time.
- Record amendment history.
- Verification.
- Approval where applicable.
- Clinical record locking.
- Controlled correction procedures.

---

# 9. CENTRAL BILLING ARCHITECTURE

Billing must be treated as a shared hospital service.

Individual modules must not independently implement disconnected billing logic.

The central billing engine should receive charge requests from:

- Consultations.
- Procedures.
- Laboratory.
- Radiology.
- Pharmacy.
- Theatre.
- Admissions.
- Bed charges.
- Other hospital services.

It must support:

- Configurable pricing.
- Price lists.
- Facility-specific pricing.
- Corporate rates.
- Insurance tariffs.
- Patient responsibility.
- Discounts and approvals.
- Deposits.
- Payments.
- Refunds.
- Reversals.
- Financial reconciliation.

All financial transactions must be traceable.

Integration with HippoBooks should support proper accounting workflows.

---

# 10. WORKFLOW AND APPROVAL MANAGEMENT

HippoHMS must support configurable business workflows.

Examples:

- Prescription verification.
- Laboratory result verification.
- Radiology report approval.
- Refund approval.
- Stock adjustment approval.
- Purchase order approval.
- Patient discharge approval.
- Clinical record amendment approval.

Workflows should be reusable services rather than independently coded approval mechanisms in each module.

Support:

- Workflow definitions.
- Workflow stages.
- Approval rules.
- Assigned approvers.
- Delegation.
- Escalation.
- Rejection.
- Reassignment.
- Workflow history.

Clinical and financial workflows should support appropriate separation of duties.

---

# 11. NOTIFICATION MANAGEMENT

Provide a reusable notification service.

Supported channels:

- Email.
- SMS through HippoConnect.
- In-application notifications.
- Other approved integrations.

Examples:

- Appointment reminders.
- Password reset notifications.
- Account activation.
- Pending approvals.
- Critical laboratory results.
- Prescription notifications.
- Stock alerts.
- Expiring medicines.
- Insurance claim updates.

Use PHPMailer for email delivery.

Use HippoConnect for SMS where available.

Notifications must support templates and configurable delivery preferences.

---

# 12. SECURITY AND DATA PROTECTION

Healthcare information is highly sensitive.

Security must be a fundamental architectural requirement.

## 12.1 Authentication Security

Implement:

- Secure password hashing.
- Session security.
- CSRF protection.
- Login throttling.
- MFA support.
- Secure password reset.
- Session timeout.
- Account locking.

## 12.2 Authorisation

Implement:

- Role-based access control.
- Granular permissions.
- Facility restrictions.
- Department restrictions.
- Data access scopes.
- Subscription-aware access.
- Server-side route protection.

## 12.3 Clinical Data Protection

Support:

- Clinical access auditing.
- Record amendment history.
- Controlled emergency access.
- Sensitive data restrictions.
- Secure document access.
- Access revocation.
- Patient information confidentiality.

Emergency access must require justification and generate an audit event.

## 12.4 Audit Trail

Record important actions, including:

- Login attempts.
- User creation.
- Role changes.
- Permission changes.
- Patient registration.
- Clinical record creation.
- Clinical record amendments.
- Clinical record viewing.
- Prescription creation.
- Prescription dispensing.
- Laboratory result verification.
- Invoice creation.
- Payment collection.
- Refunds.
- Data exports.
- Administrative changes.

Audit records must be protected against ordinary application-level alteration.

## 12.5 Regulatory Compliance

The system must be configurable to support applicable data protection and healthcare regulations in each deployment country.

For Kenya, the architecture should account for:

- Data Protection Act, 2019.
- Applicable health information management requirements.
- Applicable digital health regulations.
- SHA-related healthcare financing workflows.
- Applicable professional and facility requirements.

Compliance must be assessed against current legislation and regulatory guidance before production deployment.

---

# 13. INTEROPERABILITY AND INTEGRATIONS

HippoHMS should be designed for interoperability.

Standards to consider:

| Standard | Application |
|---|---|
| HL7 FHIR | Healthcare data exchange |
| HL7 v2 | Healthcare messaging |
| ICD-10 | Disease classification |
| SNOMED CT | Clinical terminology |
| LOINC | Laboratory observations and tests |
| DICOM | Medical imaging |

Integrations should be implemented through controlled interfaces and reusable integration services.

Potential integrations:

- Laboratory analysers.
- Imaging equipment.
- PACS systems.
- Insurance providers.
- SHA-related services.
- Payment providers.
- SMS providers.
- External healthcare systems.
- HippoBooks.
- HippoHRM.
- HippoPayroll.
- HippoProcure.
- HippoAssets.
- HippoConnect.

Do not assume that every integration will be available in every country or deployment.

---

# 14. MULTI-COUNTRY CONFIGURATION

HippoHMS must not be hardcoded exclusively for Kenya.

Support configurable:

- Countries.
- Currencies.
- Languages.
- Time zones.
- Date formats.
- Number formats.
- Tax settings.
- Healthcare financing providers.
- Regulatory configurations.
- Payment methods.
- Insurance workflows.
- Reporting requirements.

Country-specific requirements must be implemented through configuration and extensible country-specific services.

---

# 15. SUBSCRIPTION AND COMMERCIAL MODEL

HippoHMS will support subscription-based SaaS and dedicated enterprise deployments.

The platform must support:

- Subscription plans.
- Module entitlements.
- User limits.
- Facility limits.
- Subscription activation.
- Subscription expiry.
- Renewals.
- Upgrade and downgrade.
- Module activation and deactivation.
- Enterprise customisation.

A hospital should be able to subscribe to selected modules.

The system must distinguish between:

1. What the organisation has purchased.
2. What the organisation has configured.
3. What an individual user is authorised to access.

A subscription entitlement does not automatically grant every user access to the relevant functionality.

Dedicated enterprise installations must retain the same core architecture.

---

# 16. USER EXPERIENCE AND DESIGN SYSTEM

HippoHMS must follow the Hippo CloudApps corporate design language.

## 16.1 Brand

Primary colour:

`#820F93`

Use neutral backgrounds and restrained accent colours.

## 16.2 Design Principles

- Professional enterprise interface.
- Clean layouts.
- Responsive navigation.
- Consistent typography.
- Intuitive forms.
- Data-rich but uncluttered dashboards.
- Accessible colour contrast.
- Consistent iconography.
- Reusable components.
- Responsive tables.
- Clear validation messages.
- Meaningful empty states.
- Loading indicators.
- Error feedback.

## 16.3 Common Interface Components

Develop reusable components for:

- Application header.
- Sidebar navigation.
- Application switcher.
- Breadcrumbs.
- Dashboard cards.
- Data tables.
- Search and filters.
- Pagination.
- Forms.
- Modals.
- Alerts.
- Status indicators.
- Confirmation dialogs.
- Notifications.
- User profile menu.

Individual modules must reuse the common layout and design system.

---

# 17. FILE MANAGEMENT AND DOCUMENT GENERATION

Develop reusable document services.

## 17.1 File Management

Support:

- Patient documents.
- Clinical documents.
- Laboratory reports.
- Radiology reports.
- Administrative documents.
- Scanned records.
- Attachments.

Files must be stored securely and accessed through authorised application services.

Do not expose sensitive documents through publicly accessible directories.

## 17.2 PDF Generation

Use mPDF 8.

Support:

- Patient reports.
- Medical reports.
- Prescriptions.
- Laboratory reports.
- Radiology reports.
- Invoices.
- Receipts.
- Discharge summaries.
- Administrative reports.

## 17.3 Excel Processing

Use PhpSpreadsheet.

Support:

- Excel exports.
- Bulk imports.
- Data templates.
- Reporting.
- Data validation.
- Import error reports.

## 17.4 Email

Use PHPMailer.

Support reusable email templates and configurable SMTP delivery.

---

# 18. REPORTING AND MANAGEMENT INFORMATION

HippoHMS must provide different reporting perspectives.

## 18.1 Clinical Reporting

- Patient visits.
- Diagnoses.
- Clinical activity.
- Admissions.
- Discharges.
- Referrals.
- Clinical outcomes where supported.

## 18.2 Operational Reporting

- Department performance.
- Doctor workload.
- Nursing workload.
- Bed occupancy.
- Theatre utilisation.
- Laboratory turnaround times.
- Pharmacy activity.

## 18.3 Financial Reporting

- Revenue.
- Collections.
- Outstanding invoices.
- Insurance receivables.
- Departmental revenue.
- Service profitability.
- Refunds.
- Payment reconciliation.

## 18.4 Inventory Reporting

- Stock on hand.
- Stock movement.
- Expiring stock.
- Stock valuation.
- Reorder levels.
- Consumption.
- Stock adjustments.

All reports must support appropriate filters, including:

- Date range.
- Facility.
- Department.
- User.
- Service.
- Status.

Access to sensitive reports must be permission-controlled.

---

# 19. NON-FUNCTIONAL REQUIREMENTS

## 19.1 Performance

The system should support multiple concurrent users and efficient processing of hospital transactions.

Use:

- Database indexing.
- Pagination.
- Query optimisation.
- Caching.
- Efficient file storage.
- Background processing for suitable long-running operations.

## 19.2 Scalability

Support growth in:

- Number of tenants.
- Number of facilities.
- Number of patients.
- Number of users.
- Number of clinical encounters.
- Number of transactions.
- Document storage.

## 19.3 Availability

Provide reliable application operation with appropriate:

- Backups.
- Monitoring.
- Error logging.
- Recovery procedures.
- Database maintenance.
- Disaster recovery planning.

## 19.4 Maintainability

Use:

- Reusable services.
- Consistent naming.
- Documented APIs.
- Modular business logic.
- Database migrations.
- Automated tests.
- Version-controlled changes.

## 19.5 Data Integrity

Critical patient, clinical and financial operations must use appropriate transaction management and validation.

Avoid silent data loss and uncontrolled record modification.

---

# 20. DEVELOPMENT ROADMAP

Development must follow the sequence below.

## PHASE 1 – APPLICATION FOUNDATION

- Application bootstrap.
- Configuration.
- Database connectivity.
- Routing.
- Error handling.
- Logging.
- Common layouts.
- Design system.

## PHASE 2 – AUTHENTICATION AND ACCESS CONTROL

- Authentication.
- User management.
- Role management.
- Permission management.
- Multiple roles per user.
- Multiple module access.
- Facility assignments.
- Department assignments.
- Dynamic menu management.
- Dashboard.
- Application switcher.
- Security auditing.

**Acceptance gate:** All common user and access workflows must be tested successfully.

## PHASE 3 – HOSPITAL CONFIGURATION

- Organisation configuration.
- Facility management.
- Department management.
- Clinical units.
- Service points.
- Hospital settings.
- Service catalogue foundation.
- Country configuration.

## PHASE 4 – PATIENT MANAGEMENT

- Patient registration.
- Patient profiles.
- Patient identification.
- Patient history.
- Appointments.
- Patient queues.
- Patient documents.

## PHASE 5 – OUTPATIENT AND CLINICAL MANAGEMENT

- OPD.
- Consultations.
- Clinical notes.
- Vital signs.
- Diagnoses.
- Treatment plans.
- Prescriptions.
- Referrals.

## PHASE 6 – BILLING FOUNDATION

- Service catalogue.
- Pricing.
- Patient billing.
- Invoices.
- Payments.
- Cashier.
- Receipts.
- Deposits.
- Refund workflows.

## PHASE 7 – LABORATORY

- Test catalogue.
- Test requests.
- Sample collection.
- Sample processing.
- Result entry.
- Verification.
- Reporting.

## PHASE 8 – PHARMACY

- Drug catalogue.
- Pharmacy inventory.
- Prescription queue.
- Dispensing.
- Batch tracking.
- Expiry tracking.
- Pharmacy reporting.

## PHASE 9 – RADIOLOGY

- Imaging requests.
- Scheduling.
- Imaging procedures.
- Reporting.
- PACS integration.

## PHASE 10 – INPATIENT MANAGEMENT

- Admissions.
- Beds.
- Wards.
- Nursing.
- Doctor rounds.
- Medication administration.
- Transfers.
- Discharge.

## PHASE 11 – ADVANCED HOSPITAL OPERATIONS

- Theatre.
- Blood bank.
- Mortuary.
- Ambulance.
- Equipment.
- Maintenance.
- Housekeeping.
- Catering.

## PHASE 12 – ENTERPRISE INTEGRATIONS

- Insurance integrations.
- Healthcare information exchange.
- HippoBooks.
- HippoHRM.
- HippoPayroll.
- HippoProcure.
- HippoAssets.
- HippoConnect.

## PHASE 13 – DIGITAL HEALTHCARE

- Patient portal.
- Mobile applications.
- Telemedicine.
- Advanced analytics.
- Clinical decision support.
- AI-assisted workflows.

Every phase must have its own design, implementation and testing milestones.

Do not proceed to the next phase until the previous phase has passed its acceptance criteria.

---

# 21. QUALITY ASSURANCE AND TESTING

All functionality must be tested before release.

Testing categories:

- Unit testing.
- Integration testing.
- Functional testing.
- Database testing.
- Authentication testing.
- Authorisation testing.
- Tenant isolation testing.
- Facility access testing.
- Security testing.
- Performance testing.
- User acceptance testing.

Particular attention must be paid to:

1. Patient record integrity.
2. Clinical record confidentiality.
3. Financial transaction integrity.
4. Prescription and dispensing accuracy.
5. Laboratory result verification.
6. Insurance claim integrity.
7. Tenant isolation.
8. Facility-level access.
9. Audit history.
10. Application switching and SSO.

Maintain a documented test report for every major development phase.

---

# 22. PROJECT GOVERNANCE AND DEVELOPMENT RULES

## 22.1 Architectural Consistency

All developers and AI models must follow this specification.

Do not introduce alternative architectures without documenting and approving the proposed change.

## 22.2 Incremental Development

Development must be undertaken in manageable milestones.

For each milestone:

1. Define requirements.
2. Review architecture.
3. Identify database changes.
4. Identify affected files.
5. Implement.
6. Test.
7. Document.
8. Obtain acceptance.

## 22.3 Database Change Management

Use versioned database migrations.

Do not make undocumented production database changes.

Every migration must be compatible with MySQL 5.7.44.

## 22.4 Code Quality

All code must be:

- Secure.
- Maintainable.
- Reusable.
- Consistently named.
- Properly structured.
- Documented where necessary.
- Compatible with the approved technology stack.

## 22.5 AI-Assisted Development

AI models working on HippoHMS must:

- Read this specification before undertaking development.
- Follow the approved development phase.
- Preserve existing architecture.
- Avoid generating disconnected code.
- Avoid unnecessary duplication.
- Request existing file contents before modifying established functionality.
- Provide complete implementation files where requested.
- Explain database and architectural changes.
- Include test instructions.
- Maintain development documentation.

The AI model must not independently skip development phases or redefine the product architecture.

---

# 23. PROJECT DOCUMENTATION

Maintain the following project documents.

| Document | Purpose |
|---|---|
| HIPPOHMS_MASTER_SPECIFICATION.md | Overall product and technical requirements |
| HIPPOHMS_DATABASE_DICTIONARY.md | Database structure and field definitions |
| HIPPOHMS_ARCHITECTURE.md | Application architecture |
| HIPPOHMS_ACCESS_CONTROL.md | Users, roles, permissions and access rules |
| HIPPOHMS_MODULE_CATALOGUE.md | Functional module definitions |
| HIPPOHMS_API_SPECIFICATION.md | Application API documentation |
| HIPPOHMS_INTEGRATION_SPECIFICATION.md | External and CloudApps integrations |
| HIPPOHMS_SECURITY_SPECIFICATION.md | Security and data protection requirements |
| HIPPOHMS_TEST_PLAN.md | Testing standards and scenarios |
| HIPPOHMS_DEVELOPMENT_LOG.md | Development progress and decisions |
| HIPPOHMS_DEPLOYMENT_GUIDE.md | Installation and deployment instructions |

These documents must be updated as the project evolves.

---

# 24. INITIAL DEVELOPMENT PRIORITY

The immediate priority is to establish a stable shared application foundation.

The first implementation milestone is:

**Authentication, User Management, Role Management, Permission Management, Module Access, Menu Management, Dashboard and Application Switching.**

This milestone must be completed and tested before developing hospital-specific functional modules.

The initial demonstration must prove that:

- Users can log in securely.
- Users can be assigned multiple roles.
- Users can access multiple authorised modules.
- Users can be assigned multiple facilities.
- Permissions are correctly enforced.
- Menus are dynamically generated.
- Dashboards reflect user responsibilities.
- Application switching works.
- Unauthorised access is denied.
- Audit records are generated correctly.

Only after successful acceptance should development proceed to hospital configuration and patient management.

---

# 25. PRODUCT SUCCESS CRITERIA

HippoHMS will be considered a successful product when it provides:

1. A unified patient management platform.
2. Integrated clinical and administrative workflows.
3. Reliable hospital financial management.
4. Secure and configurable access control.
5. Multi-tenant and multi-facility support.
6. Modular subscription-based deployment.
7. Interoperability with healthcare systems.
8. Comprehensive operational reporting.
9. A professional and intuitive user experience.
10. A maintainable and scalable technical architecture.

The ultimate objective is to establish HippoHMS as a commercially viable, enterprise-grade hospital management platform within the Hippo CloudApps product ecosystem.

---

**END OF MASTER SPECIFICATION**

**Document Owner:** Hippo CloudApps Ltd  
**Product:** HippoHMS  
**Version:** 1.0