obgyn-expert
v1.0.0-lite
Published
Lite version of ObGynExpert SDK - Basic medically verified OBGYN calculations.
Downloads
20
Maintainers
Readme
ObGynExpert SDK 🤰
ObGynExpert is a medically verified JavaScript/TypeScript SDK designed for modern Obstetrics and Gynecology software. It bridges the gap between complex medical logic, regional clinical protocols, and premium user experience.
💎 The Dual-Release Strategy (Lite vs. Pro)
To ensure sustainable development and brand integrity, the SDK is available in two versions:
| Feature | Lite (Public npm) | Pro (Private Bundle) | | :--- | :---: | :---: | | Basic EDD Calculation (LMP-based with Cycle correction) | ✅ | ✅ | | Gestational Age (GA) Engine | ✅ | ✅ | | FHIR Interoperability | ✅ | ✅ | | Clinical 7-Day Rule (Ultrasound Redating) | ❌ | ✅ | | Regional Protocols (International Standards) | ❌ | ✅ | | Interactive Mini-App (HTML Generator) | ❌ | ✅ | | Multi-language Support (SL, EN, DE, HR) | ❌ | ✅ |
🚀 Key Technical Modules
- Core Logic: Implements precision EDD and GA calculations using medically verified algorithms (Naegele's Rule, Hadlock, etc.).
- i18n Module (Pro): Manages regional date formats and translations, ensuring the app feels native in Slovenia 🇸🇮, Croatia 🇭🇷, Germany 🇩🇪, or the US 🇺🇸.
- Exporter Module (Pro): Transforms raw medical data into a premium, interactive HTML application or a professional PDF report.
- FHIR Module: Ensures all pregnancy data can be exported as standard HL7 FHIR Observation resources for hospital systems.
- Security: The Pro version is bundled into a single, minified, and obfuscated
.min.jsfile to protect intellectual property and clinical know-how.
🌍 Regional Compliance & Localization (Pro)
The Pro SDK automatically adapts milestones, advice, and date formats based on the selected locale:
- 🇸🇮 Slovenia: Clinical protocols according to the Official Gazette of the Republic of Slovenia.
- 🇭🇷 Croatia: Localized pregnancy advice and milestones.
- 🇩🇪 Germany: Regional date formatting and terminology.
- 🇺🇸 Global: Standardized English medical terminology.
📦 Installation (Lite Version)
npm install obgyn-expert⚡ Quick Start
import { calculateEDD } from 'obgyn-expert';
// 1. Calculate EDD (LMP + Cycle Adjustment)
const lmp = "2026-01-15";
const options = { cycleLength: 28 };
// In Lite version, options might be limited
const result = calculateEDD(lmp, options);
console.log(`Due Date: ${result.formattedEDD}`);
// 2. Get current Gestational Age
const ga = result.ui; // { currentWeek: 14, days: 3 ... }
console.log(`Status: ${ga.currentWeek} weeks`);🏥 Hospital Interoperability (FHIR)
This SDK is designed to meet the requirements of modern medical infrastructure. By exporting data as FHIR Observation Resources, your application can communicate directly with:
- Slovenia: Central Register of Patient Data (CRPP / e-Zdravje).
- Global: Any Hospital Information System (HIS) using the HL7 FHIR standard.
🎨 Pro Features: Interactive Reports
The Pro version includes the prepareProfessionalReport function, which generates a complete, standalone mobile app for the patient:
- Trimester View: Visual progress cards with checkmarks for completed exams.
- Calendar Grid: A 42-week snapshot featuring all medical milestones (Nuchal Scan, Morphology, etc.).
- Daily Inspiration: Personalized affirmations and fetal development facts.
📄 License & Access
- Lite Version: Licensed under the MIT License. Free for personal and commercial use.
- Pro Version: To access full clinical protocols, automated reporting, and the interactive mini-app, please contact us for a Commercial License and private repository access.
