Skip to content

oni96/prescribe

Repository files navigation

Prescription Generator (Next.js)

A simple, local-first prescription generator app built with Next.js. Manage lists of medicines, tests/exams, and chief complaints; create a prescription with patient details and dosages; preview and print to PDF with clean print styles.

Features

  • Local lists: medicines, exams, chief complaints (editable in Settings)
  • Manual dosage entry per medicine (e.g., "3 ml", "1 tablet", "1 spray", "4 puffs")
  • Patient details: name, age, weight, sex
  • Add recommended tests/exams and chief complaints to each prescription
  • Preview page with print-ready layout and one-click Print (use browser “Save as PDF”)
  • All data stored in localStorage (no backend required)

Getting Started

  1. Install dependencies
    • Ensure Node.js 18+ is installed
    • Run: npm install
  2. Start the dev server
    • npm run dev
  3. Open the app
    • Visit http://localhost:3000

Usage

  • Go to Settings to customize the lists of Medicines, Exams, and Complaints.
  • Use the Prescription page to:
    • Enter patient details
    • Select complaints and exams (and add new ones inline if needed)
    • Add medicines; pick from your list or type a new one; enter dosage and optional instructions
    • Click Preview & Print to open the printable view, then click Print and choose "Save as PDF".

Notes

  • The app is local-first: your lists and the last built prescription are saved in the browser’s localStorage.
  • The printable view uses browser printing; no external PDF library is required.
  • You can change the header (doctor/clinic info) in components/PrintablePrescription.tsx as desired.

Project Structure

  • app/ — Next.js app directory routes
    • / — Prescription builder
    • /settings — Manage lists
    • /print — Printable view
  • components/ — Reusable UI pieces
  • lib/storage.ts — Local storage helpers and data types
  • styles/globals.css — App and print styles

Customization Tips

  • Add your clinic header and signature line in PrintablePrescription component.
  • Adjust print margins via .print-page in globals.css.
  • Seed lists are in lib/storage.ts under DEFAULTS.

Built with Next.js 14 + React 18.

About

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors