Skip to content

Data Model ​

Thực thể quan trọng nhất không phải Hospital mà là Navigation Case.

Patient ─┬─ MedicalHistory (symptom | diagnosis | medication | treatment | visit | test_result)
         ├─ MedicalDocument (ảnh, hồ sơ — file ở R2)
         └─ Contact (primary ≤ 1, secondary *)

NavigationCase (HT3-000123) ── Patient
         ├─ Recommendation* (engine_version, result_json, chosen_hospital)
         ├─ CaseEvent* (nhật ký: created, updated, document.uploaded, share.viewed, …)
         ├─ FollowUp*
         ├─ CaseShare* ── CaseOpinion*   (hội chẩn từ xa)

Hospital ─┬─ Department ─┬─ Doctor ── Schedule
          │              └─ Schedule
          ├─ HealthcareService (diagnostic | inpatient | family | aftercare | booking | transport)
          ├─ Policy (visitor | documents | fasting | insurance | parking)
          └─ Place (lodging | food | transport_hub | pharmacy | parking)
Navigation Case #HT3-000123
need: checkup              state: pre_hospital
current_location: Nghệ An  preferred_city: Hà Nội
urgency: routine           specialties: ["cardiology"]
needs_human: 0             intake_json: {...}  ← input gốc để chạy lại engine

Trạng thái: intake → pre_hospital → in_hospital → post_discharge → follow_up → closed (+ emergency).

Contact ​

TrườngÝ nghĩa
roleprimary (tối đa 1 / người bệnh — unique index) hoặc secondary
relationshipcon gái, chồng, …
phone, zalo, email
decision_authoritycó quyền quyết định
can_accompanycó thể đi cùng
can_receive_medical_infođược nhận thông tin y tế
is_emergency_contact

Schema đầy đủ: migrations/0001_init.sql.

HOATIEU3 không chẩn đoán và không thay thế bác sĩ. Có dấu hiệu nguy hiểm: đến khoa Cấp cứu gần nhất.