Overview
ThegynecoObstetricHistory service provides methods for managing gynecological and obstetric history records for female patients. Each patient can have one comprehensive gyneco-obstetric record.
Source: src/services/gynecoObstetricService.ts
This service is specifically for female patients and stores reproductive health information including menstrual history, pregnancies, births, and preventive screenings.
Methods
getByPatientId()
Retrieves the gyneco-obstetric history for a specific patient.Patient ID to fetch history for
Promise<GynecoObstetricHistory | null> - Returns null if no record exists
Example:
src/pages/GynecoObstetricHistory.tsx:45
Caching: Results are cached for 5 minutes per patient
create()
Creates a new gyneco-obstetric history record for a patient.Gyneco-obstetric history data including:
patient_id- Patient ID (required)menarca_edad- Age at menarcheritmo_menstrual- Menstrual rhythm (e.g., “28/4”)fecha_ultima_menstruacion- Last menstrual period dategestas- Total pregnanciespartos- Vaginal birthsabortos- Miscarriages/abortionscesareas- Cesarean sectionsmetodo_anticonceptivo- Contraceptive methodpapanicolaou_fecha- Last Pap smear datepapanicolaou_resultado- Pap smear resultmastografia_fecha- Last mammography datemastografia_resultado- Mammography result (BIRADS classification)
Promise<GynecoObstetricHistory>
Example:
gpacfield is automatically calculated asG-P-A-C(Gestas-Partos-Abortos-Cesareas)- Validates that
gestas = partos + abortos + cesareas
src/pages/GynecoObstetricHistory.tsx:167
update()
Updates an existing gyneco-obstetric history record.Record ID to update
Fields to update
Promise<GynecoObstetricHistory>
Example:
src/services/gynecoObstetricService.ts:103
delete()
Deletes a gyneco-obstetric history record (hard delete).Record ID to delete
Promise<void>
Data structure
GynecoObstetricHistory
GPAC calculation
The GPAC (or GTPAL) system documents pregnancy history:- G (Gestas): Total number of pregnancies
- P (Partos): Number of term births
- A (Abortos): Number of miscarriages/abortions before 20 weeks
- C (Cesareas): Number of cesarean deliveries
G = P + A + C
Example: A patient with GPAC “4-2-1-1” has had:
- 4 total pregnancies
- 2 vaginal births
- 1 miscarriage
- 1 cesarean section
src/pages/GynecoObstetricHistory.tsx:97-111 (auto-calculation logic)
Naegele’s Rule (FPP calculation)
The service can calculate Fecha Probable de Parto (FPP) / Expected Delivery Date using Naegele’s Rule: Formula: Last menstrual period date + 280 days (40 weeks) Implementation:src/pages/GynecoObstetricHistory.tsx:100-107
BIRADS classification
For mammography results, the service supports BIRADS (Breast Imaging Reporting and Data System) classification:| BIRADS | Meaning |
|---|---|
| 0 | Incomplete - Need additional imaging |
| 1 | Negative - No abnormality |
| 2 | Benign finding |
| 3 | Probably benign - Follow-up recommended |
| 4 | Suspicious abnormality - Biopsy recommended |
| 5 | Highly suggestive of malignancy |
| 6 | Known biopsy-proven malignancy |
src/pages/GynecoObstetricHistory.tsx:237-243
Integration
This service is used by:- GynecoObstetricHistory page (
src/pages/GynecoObstetricHistory.tsx) - Full form interface - Patient reports - Included in comprehensive patient reports
- Clinical history - Part of complete medical history
Related
- Gyneco-Obstetric History Feature - User guide
- Patient Service - Link to patient records
- Clinical History - Complete medical history