feat: implement 4-point demographic synchronization & patient validation

This commit is contained in:
2026-07-15 11:33:48 +05:30
parent ae5a928671
commit 554771abfe
6 changed files with 407 additions and 34 deletions
+7 -3
View File
@@ -12,9 +12,13 @@ class Device(Base):
class Patient(Base):
__tablename__ = "patients"
id = Column(Integer, primary_key=True, index=True)
patient_id = Column(String, unique=True, index=True)
name = Column(String)
id = Column(Integer, primary_key=True, index=True)
patient_id = Column(String, unique=True, index=True) # MRN from monitor PID-3
mrn = Column(String, index=True, nullable=True) # explicit MRN (same as patient_id)
name = Column(String, nullable=True) # full name from PID-5
gender = Column(String, nullable=True) # M/F/U from PID-8
dob = Column(String, nullable=True) # YYYYMMDD from PID-7
bed_id = Column(String, nullable=True) # bed from PV1-3
class VitalReading(Base):
__tablename__ = "vital_readings"