# TOBE 진료 ERD

```mermaid
erDiagram
    tb_enc["tb_enc<br/>(내원/진료 에피소드)"] {
        string enc_no PK
        string pt_no FK
    }
    tb_dx_mst["tb_dx_mst<br/>(진단 마스터)"] {
        string dx_cd PK
    }
    tb_med_mst["tb_med_mst<br/>(약품 마스터)"] {
        string med_cd PK
    }
    tb_proc_mst["tb_proc_mst<br/>(처치/검사 오더 마스터)"] {
        string proc_cd PK
    }
    tb_vs["tb_vs<br/>(바이탈 사인)"] {
        string enc_no PK
        datetime msr_dtm PK
    }
    tb_note["tb_note<br/>(진료 기록 노트)"] {
        string note_no PK
        string enc_no FK
    }
    tb_enc_dx["tb_enc_dx<br/>(에피소드 진단)"] {
        string enc_no PK
        string dx_cd PK
        string dx_tp_cd PK
    }
    tb_rx_ord["tb_rx_ord<br/>(투약 오더)"] {
        string ord_no PK
        string enc_no FK
        string med_cd FK
    }
    tb_proc_ord["tb_proc_ord<br/>(처치 오더)"] {
        string ord_no PK
        string enc_no FK
        string proc_cd FK
    }

    tb_enc ||--o{ tb_vs : measures
    tb_enc ||--o{ tb_note : notes
    tb_dx_mst ||--o{ tb_enc_dx : diagnoses
    tb_enc ||--o{ tb_enc_dx : has
    tb_med_mst ||--o{ tb_rx_ord : orders
    tb_enc ||--o{ tb_rx_ord : has
    tb_proc_mst ||--o{ tb_proc_ord : orders
    tb_enc ||--o{ tb_proc_ord : has
```
