integrated-hospital-erp-system@intoiit:~/case-study
Healthcare IT 14 months 2017-2018

Integrated Hospital ERP System

@ Intoiit — Software Engineer

Transforming hospital operations with an integrated ERP system covering patient care, billing, pharmacy, and laboratory management

60% Faster Processing
95% Billing Accuracy
15+ Hospital Deployments

$ cat PROBLEM.md

Paper-Based Processes Slowing Patient Care

Hospitals in Bangladesh were largely using paper-based systems or disconnected software for different departments. Patient records were scattered, billing was error-prone, and pharmacy/lab workflows required manual coordination. Doctors couldn't quickly access patient history during consultations.

Key Challenges:

  • 🔴 Patient records maintained in paper files — retrieval took 10+ minutes
  • 🔴 Billing errors due to manual entry of services and medications
  • 🔴 Pharmacy had no visibility into prescriptions until paper arrived
  • 🔴 Lab results delivered by hand, often delayed or lost

$ cat SOLUTION.md

Integrated Hospital Management Platform

We built a comprehensive ERP system that integrates all hospital operations into a single platform, with role-based access for different departments and real-time information flow.

Technical Approach:

1
Electronic Medical Records

Digital patient records with complete history accessible to authorized staff. Doctors see allergies, past visits, and ongoing treatments instantly.

2
Automated Billing Integration

Every service, medication, and lab test automatically added to patient bill. Integration with insurance for direct claim processing.

3
Pharmacy Workflow

Prescriptions flow directly from doctor to pharmacy. Stock management, expiry tracking, and reorder alerts included.

4
Lab Information System

Test orders placed electronically, results entered directly, and automatically visible to ordering physician.

$ cat tech-stack.json

🚀 Core Technologies

Spring Boot

Backend framework and REST APIs

Why: Enterprise-grade Java framework with excellent security features

PostgreSQL

Patient and operational data

Why: Reliable ACID transactions for healthcare data

Angular

Web application frontend

Why: Enterprise-ready framework with strong typing

🔧 Supporting Technologies

Hibernate Spring Security Jasper Reports

☁️ Infrastructure

Linux (CentOS) Docker Nginx

$ cat ARCHITECTURE.md

The ERP follows a modular monolith architecture:

1
2
3
4
5
6
7
8
9
Web UI → Angular → Spring Boot Backend → PostgreSQL
          ┌─────────────┼─────────────┐
          ↓             ↓             ↓
     Patient      Pharmacy        Lab
     Module        Module       Module
          ↓             ↓             ↓
       EMR        Inventory      Results
      Billing      Stock        Workflow

System Components:

Patient Module

Registration, appointments, EMR, and billing

Pharmacy Module

Prescription processing, inventory, and dispensing

Laboratory Module

Test orders, sample tracking, and results entry

Reporting Module

Operational reports, financial statements, and analytics

$ man implementation-details

Electronic Medical Records Design

The EMR system had to balance accessibility with security:

Data Model:

  • Patient — Demographics, insurance, emergency contacts
  • Encounter — Each visit with chief complaint, vitals, notes
  • Diagnosis — ICD-10 coded diagnoses
  • Prescription — Medications with dosage, duration
  • Lab Order — Tests with results and reference ranges

Security Implementation:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
@Entity
public class PatientRecord {
    @Id
    private Long id;
    
    // Encrypted at rest
    @Column(columnDefinition = "bytea")
    @Convert(converter = EncryptedStringConverter.class)
    private String ssn;
    
    // All access logged
    @PreUpdate
    @PrePersist
    public void logAccess() {
        AuditService.log(
            getCurrentUser(),
            this.id,
            "PATIENT_RECORD_ACCESS"
        );
    }
}

Role-Based Access:

  • Doctors: Full access to assigned patients
  • Nurses: Vitals and nursing notes
  • Billing: Demographics and charges only
  • Pharmacy: Prescriptions and dispensing

Integrated Billing System

Billing automatically captures charges from all departments:

Charge Capture Flow:

  1. Doctor orders lab test → charge added
  2. Pharmacy dispenses medication → charge added
  3. Nursing records procedure → charge added
  4. All charges flow to patient invoice

Implementation:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@Service
public class BillingService {
    
    @EventListener
    public void handleLabOrder(LabOrderEvent event) {
        BillItem item = BillItem.builder()
            .patient(event.getPatient())
            .service(event.getTest())
            .price(pricingService.getPrice(event.getTest()))
            .orderedBy(event.getDoctor())
            .timestamp(Instant.now())
            .build();
        
        billRepository.addItem(item);
    }
    
    @EventListener
    public void handleMedicationDispense(DispenseEvent event) {
        BillItem item = BillItem.builder()
            .patient(event.getPatient())
            .medication(event.getMedication())
            .quantity(event.getQuantity())
            .price(event.getMedication().getPrice() * event.getQuantity())
            .timestamp(Instant.now())
            .build();
        
        billRepository.addItem(item);
    }
}

Insurance Integration:

  • Eligibility verification before service
  • Claim generation in standard format
  • Rejection tracking and resubmission

$ echo $RESULTS

60% Improvement in Patient Processing Time

60% Faster Processing From registration to treatment
95% Billing Accuracy Automated charge capture
15+ Hospital Deployments Across Bangladesh
2min Record Retrieval Down from 10+ minutes

Additional Outcomes:

  • Doctors report faster, more informed patient consultations
  • Billing disputes reduced significantly
  • Pharmacy efficiency improved with electronic prescriptions

$ cat LESSONS_LEARNED.md

Healthcare Has Unique Data Sensitivity

We implemented strict audit logging from day one. Every access to patient data is logged with timestamp and user. Essential for compliance and trust.

Training is as Important as Software

Early deployments struggled with adoption. We developed a training program and on-site support that became as valuable as the software itself.

Offline Capability is Essential

Power outages and internet issues are common. We added offline mode with automatic sync, critical for uninterrupted patient care.

$ cat README.md

Want Similar Results?

Let's discuss how I can help solve your engineering challenges.