flowchart TD
classDef terminator fill:#4338ca,stroke:#312e81,stroke-width:2px,color:#fff,font-weight:700;
classDef decision fill:#fef3c7,stroke:#d97706,stroke-width:2.5px,color:#78350f,font-weight:700;
classDef process fill:#ffffff,stroke:#475569,stroke-width:1.5px,color:#0f172a;
classDef processReq fill:#ffffff,stroke:#475569,stroke-width:1.5px,color:#0f172a,font-weight:600;
classDef input fill:#cffafe,stroke:#0891b2,stroke-width:1.8px,color:#164e63;
classDef inputReq fill:#cffafe,stroke:#0891b2,stroke-width:1.8px,color:#164e63,font-weight:600;
classDef decisionReq fill:#fef3c7,stroke:#d97706,stroke-width:2.5px,color:#78350f,font-weight:700;
classDef chOk fill:#dcfce7,stroke:#16a34a,color:#14532d;
classDef chWarn fill:#fef3c7,stroke:#d97706,color:#78350f;
classDef chRisk fill:#fee2e2,stroke:#dc2626,color:#7f1d1d;
linkStyle default stroke:#94a3b8,stroke-width:1.6px;
START(["🟢 문진 시작: 약물알레르기 문진"]):::terminator
RESULT(["🏁 결과 산출"]):::terminator
S587["섹션 1: 기본 정보<br/>(2)"]:::process
START --> S587
S588["섹션 2: 알레르기 과거력<br/>(3)"]:::process
S587 --> S588
S589["섹션 3: 약물 알레르기 상세 이력<br/>(4)"]:::process
S588 --> S589
S590["섹션 4: 주요 증상 평가<br/>(5)"]:::process
S589 --> S590
S591["섹션 5: 중증도 및 경과<br/>(4)"]:::process
S590 --> S591
S592["섹션 6: 가족력 및 기타 질환<br/>(6)"]:::process
S591 --> S592
S593["섹션 7: 기타 위험 요인<br/>(4)"]:::process
S592 --> S593
S593 --> RESULT