Back
Ruby on RailsReactPostgreSQLMulti-Location
Case Study

Automated Inventory Management System for Pharmacy Chain

Pharmacy & Inventory Management
8 weeks of development

Farmacias Moscovich is a chain of 3 pharmacies located in the western area of Greater Buenos Aires, with over 25 years of experience. They serve an average of 800 customers daily combined, managing an inventory of over 3,500 pharmaceutical products including OTC medications, prescription drugs, personal care and cosmetics.

Their main challenge was the time the manager spent managing orders manually. Each lab requires orders on specific days of the week, and coordinating this across 3 locations consumed more than 15 hours weekly. Stockouts caused lost daily sales, while lack of centralized visibility resulted in excess stock at some locations and critical shortages at others.

The Challenge
  • Frequent stockouts at locations, losing daily sales due to lack of medications

  • Manager spent 15+ hours weekly manually checking stock and preparing lab orders

  • Difficulty coordinating inventory across 3 locations, creating surpluses in some and shortages in others

  • Unplanned ordering: each lab requires orders on specific days of the week

  • Lack of real-time visibility into the total inventory of the pharmacy network

The Solution

Real-Time Stock Monitoring

Centralized dashboard showing current inventory of all 3 locations in real time. Each pharmacy updates its stock and the system automatically detects products below minimum.

Configurable Business Rules

Per-product rule system: minimum stock, reorder point, optimal order quantity, rotation priority and seasonality. Adapts orders based on historical demand.

Scheduled Jobs per Lab

System configures the day of the week each lab requires orders. Automatic jobs run on the correct day, consolidating needs from all 3 locations and generating purchase orders.

Intelligent Cross-Location Redistribution

Before ordering from the lab, the system checks if another location has excess of the product and suggests internal redistribution, saving costs and time.

Automatic Purchase Order Generation

System automatically generates optimized purchase orders for each lab in a compatible format, ready to send by email or API on the scheduled day.

Technologies Used
Ruby on Rails (Backend)React + TypeScript (Frontend)PostgreSQL (Database)Redis (Cache & Jobs)Sidekiq (Background Jobs)Chart.js (Data visualization)REST APIWebSockets (Real-time updates)
Project Timeline
1

Week 1

Analysis of current processes, mapping of per-product business rules and system architecture design

2

Weeks 2-4

Backend development with Ruby on Rails, database modeling, business rules system and scheduled jobs

3

Weeks 5-6

Frontend development with React, inventory dashboards, location management and per-lab order day configuration

4

Week 7

Testing with all 3 locations, business rule adjustments and per-lab job configuration

5

Week 8

Final rollout, manager and team training, monitoring of first automated orders

This system completely changed my work routine. I used to spend over 15 hours a week manually checking stock and preparing orders for each lab on their respective days. Now the system automatically schedules the jobs per lab, consolidates the needs of all 3 locations and generates the purchase orders ready to send. I got all that time back to focus on improving customer service and growing the business. Stockouts were reduced by 92% and inventory is perfectly balanced across locations.

Kevin Sabo

General Manager

Farmacias Moscovich

Results Achieved
92%

Reduction in stockouts

15h

Weekly hours saved for manager on orders

40%

Reduction in excess inventory

3

Locations synchronized in real time

100%

Automated orders on scheduled day

35%

Savings in shipping costs through consolidation

Do you have a pharmacy or retail chain?

Contact us and we'll design an inventory management system tailored to your operation