feat: 환자 처방 내역 조회 기능 추가

- 환자 목록에 처방 횟수 표시 (배지)
- 환자별 처방 내역 조회 버튼 추가
- 환자 처방 내역 모달 추가 (통계 + 상세 내역)
  - 총 처방 횟수, 최근 방문일, 총 제수, 총 처방비
  - 전체 처방 내역 테이블 (조제일, 처방명, 상태 등)
  - 각 처방의 상세 보기 기능 연동
- 환자 개별 조회 API 엔드포인트 추가 (GET /api/patients/<id>)
- 환자 편집 버튼 UI 추가 (기능 준비)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-15 12:45:21 +00:00
parent 724af5000a
commit 45672a125f
3 changed files with 265 additions and 16 deletions

View File

@@ -205,8 +205,9 @@
<th>전화번호</th>
<th>성별</th>
<th>생년월일</th>
<th width="80">처방 횟수</th>
<th>메모</th>
<th>작업</th>
<th width="180">작업</th>
</tr>
</thead>
<tbody id="patientsList">
@@ -1024,6 +1025,97 @@
</div>
</div>
<!-- 환자 처방 내역 모달 -->
<div class="modal fade" id="patientCompoundsModal" tabindex="-1">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header bg-primary text-white">
<h5 class="modal-title">
<i class="bi bi-person-circle"></i>
<span id="patientCompoundsName">환자명</span>의 처방 내역
</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<!-- 환자 기본 정보 -->
<div class="card mb-3">
<div class="card-body">
<div class="row">
<div class="col-md-3">
<strong>환자명:</strong> <span id="patientInfoName"></span>
</div>
<div class="col-md-3">
<strong>전화번호:</strong> <span id="patientInfoPhone"></span>
</div>
<div class="col-md-3">
<strong>성별:</strong> <span id="patientInfoGender"></span>
</div>
<div class="col-md-3">
<strong>생년월일:</strong> <span id="patientInfoBirth"></span>
</div>
</div>
</div>
</div>
<!-- 처방 통계 -->
<div class="row mb-3">
<div class="col-md-3">
<div class="stat-card bg-primary text-white">
<h6>총 처방 횟수</h6>
<h4 id="patientTotalCompounds">0회</h4>
</div>
</div>
<div class="col-md-3">
<div class="stat-card bg-success text-white">
<h6>최근 방문</h6>
<h4 id="patientLastVisit">-</h4>
</div>
</div>
<div class="col-md-3">
<div class="stat-card bg-info text-white">
<h6>총 제수</h6>
<h4 id="patientTotalJe">0제</h4>
</div>
</div>
<div class="col-md-3">
<div class="stat-card bg-warning text-white">
<h6>총 처방비</h6>
<h4 id="patientTotalAmount">₩0</h4>
</div>
</div>
</div>
<!-- 처방 내역 테이블 -->
<h6><i class="bi bi-list-ul"></i> 처방 내역</h6>
<div class="table-responsive">
<table class="table table-sm table-hover">
<thead class="table-dark">
<tr>
<th width="100">조제일</th>
<th>처방명</th>
<th width="60">제수</th>
<th width="60">첩수</th>
<th width="80">파우치</th>
<th width="100">원가</th>
<th width="100">판매가</th>
<th width="80">상태</th>
<th width="100">처방전번호</th>
<th width="100">작업</th>
</tr>
</thead>
<tbody id="patientCompoundsList">
<!-- Dynamic content -->
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
</div>
</div>
</div>
</div>
<!-- Formula Modal -->
<div class="modal fade" id="formulaModal" tabindex="-1">
<div class="modal-dialog modal-lg">