|
@@ -789,25 +789,23 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
|
<label style="white-space: nowrap; margin-right: 10px;">所属科室:</label>
|
|
<label style="white-space: nowrap; margin-right: 10px;">所属科室:</label>
|
|
|
- <select id="patientDepartment" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 100px;">
|
|
|
|
|
|
|
+ <select id="patientDepartment" onchange="loadWardsByDepartment(this.value)" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 100px;">
|
|
|
<option value="">全部科室</option>
|
|
<option value="">全部科室</option>
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
|
<label style="white-space: nowrap; margin-right: 10px;">所属病区:</label>
|
|
<label style="white-space: nowrap; margin-right: 10px;">所属病区:</label>
|
|
|
- <select id="patientWard" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 100px;">
|
|
|
|
|
|
|
+ <select id="patientWard" onchange="loadRoomsByWard(this.value)" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 100px;">
|
|
|
<option value="">全部病区</option>
|
|
<option value="">全部病区</option>
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
|
<label style="white-space: nowrap; margin-right: 10px;">住院号:</label>
|
|
<label style="white-space: nowrap; margin-right: 10px;">住院号:</label>
|
|
|
- <select id="patientInpatientNo" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 100px;">
|
|
|
|
|
- <option value="">全部</option>
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ <input type="text" id="patientInpatientNo" placeholder="请输入住院号(模糊查询)" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 100px;">
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex; align-items: center;">
|
|
<div style="display: flex; align-items: center;">
|
|
|
<label style="white-space: nowrap; margin-right: 10px;">房间号:</label>
|
|
<label style="white-space: nowrap; margin-right: 10px;">房间号:</label>
|
|
|
- <select id="patientRoomNo" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 80px;">
|
|
|
|
|
|
|
+ <select id="patientRoomNo" onchange="loadBedsByRoom(this.value)" style="padding: 6px; border: 1px solid #ddd; border-radius: 4px; width: 80px;">
|
|
|
<option value="">全部</option>
|
|
<option value="">全部</option>
|
|
|
</select>
|
|
</select>
|
|
|
</div>
|
|
</div>
|
|
@@ -873,49 +871,369 @@
|
|
|
<h2 style="margin-top: 0;">患者详情</h2>
|
|
<h2 style="margin-top: 0;">患者详情</h2>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="overflow-y: auto; flex: 1; padding: 15px;">
|
|
<div style="overflow-y: auto; flex: 1; padding: 15px;">
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>入院时间:</label>
|
|
|
|
|
- <input type="text" id="modalAdmissionTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>住院号:</label>
|
|
|
|
|
- <input type="text" id="modalInpatientNo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>患者姓名:</label>
|
|
|
|
|
- <input type="text" id="modalName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>性别:</label>
|
|
|
|
|
- <input type="text" id="modalSex" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>年龄:</label>
|
|
|
|
|
- <input type="text" id="modalAge" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>所属科室:</label>
|
|
|
|
|
- <input type="text" id="modalDept" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
|
|
+ <!-- 标签页导航 -->
|
|
|
|
|
+ <div style="margin-bottom: 20px;">
|
|
|
|
|
+ <button class="btn btn-primary" onclick="showPatientTab('basic', this)" style="margin-right: 5px;">基本信息</button>
|
|
|
|
|
+ <button class="btn btn-secondary" onclick="showPatientTab('diagnosis', this)" style="margin-right: 5px;">诊断信息</button>
|
|
|
|
|
+ <button class="btn btn-secondary" onclick="showPatientTab('order', this)" style="margin-right: 5px;">医嘱信息</button>
|
|
|
|
|
+ <button class="btn btn-secondary" onclick="showPatientTab('fee', this)" style="margin-right: 5px;">费用信息</button>
|
|
|
|
|
+ <button class="btn btn-secondary" onclick="showPatientTab('exam', this)" style="margin-right: 5px;">检查检验</button>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>所属病区:</label>
|
|
|
|
|
- <input type="text" id="modalWard" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 基本信息标签页 -->
|
|
|
|
|
+ <div id="patientBasicTab">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>患者姓名:</label>
|
|
|
|
|
+ <input type="text" id="modalName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>性别:</label>
|
|
|
|
|
+ <input type="text" id="modalSex" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>年龄:</label>
|
|
|
|
|
+ <input type="text" id="modalAge" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>医保类型:</label>
|
|
|
|
|
+ <input type="text" id="modalInsuranceType" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>所属科室:</label>
|
|
|
|
|
+ <input type="text" id="modalDept" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>所属病区:</label>
|
|
|
|
|
+ <input type="text" id="modalWard" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>房间号:</label>
|
|
|
|
|
+ <input type="text" id="modalRoomNo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>床位号:</label>
|
|
|
|
|
+ <input type="text" id="modalBedNo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>责任医生:</label>
|
|
|
|
|
+ <input type="text" id="modalDoctor" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>责任护士:</label>
|
|
|
|
|
+ <input type="text" id="modalNurse" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>住院号:</label>
|
|
|
|
|
+ <input type="text" id="modalInpatientNo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>住院流水号:</label>
|
|
|
|
|
+ <input type="text" id="modalSerialNumber" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>入院时间:</label>
|
|
|
|
|
+ <input type="text" id="modalAdmissionTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>入科时间:</label>
|
|
|
|
|
+ <input type="text" id="modalDepartmentTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>出院时间:</label>
|
|
|
|
|
+ <input type="text" id="modalDischargeTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>在院状态:</label>
|
|
|
|
|
+ <input type="text" id="modalInpatientStatus" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>入院诊断:</label>
|
|
|
|
|
+ <input type="text" id="modalAdmissionDiagnosis" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>病情状况:</label>
|
|
|
|
|
+ <input type="text" id="modalMedicalCondition" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>护理级别:</label>
|
|
|
|
|
+ <input type="text" id="modalNurseLevel" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>过敏信息:</label>
|
|
|
|
|
+ <input type="text" id="modalAllergyInfo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>饮食状况:</label>
|
|
|
|
|
+ <input type="text" id="modalDietaryStatus" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>安全防范:</label>
|
|
|
|
|
+ <input type="text" id="modalSafetyPrecautions" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>房间号:</label>
|
|
|
|
|
- <input type="text" id="modalRoomNo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 诊断信息标签页 -->
|
|
|
|
|
+ <div id="patientDiagnosisTab" style="display: none;">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>诊断时间:</label>
|
|
|
|
|
+ <input type="text" id="modalDiagnosisTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>诊断类型:</label>
|
|
|
|
|
+ <input type="text" id="modalDiagnosisType" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>诊断描述:</label>
|
|
|
|
|
+ <textarea id="modalDiagnosisDesc" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>诊断状态:</label>
|
|
|
|
|
+ <input type="text" id="modalDiagnosisStatus" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>诊断医生:</label>
|
|
|
|
|
+ <input type="text" id="modalDiagnosisDoctor" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>备注:</label>
|
|
|
|
|
+ <textarea id="modalDiagnosisRemark" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>床位号:</label>
|
|
|
|
|
- <input type="text" id="modalBedNo" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 医嘱信息标签页 -->
|
|
|
|
|
+ <div id="patientOrderTab" style="display: none;">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>医嘱类型:</label>
|
|
|
|
|
+ <input type="text" id="modalOrderType" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>医嘱名称:</label>
|
|
|
|
|
+ <input type="text" id="modalOrderName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>药物:</label>
|
|
|
|
|
+ <input type="text" id="modalMedication" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>用量:</label>
|
|
|
|
|
+ <input type="text" id="modalDosage" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>单位:</label>
|
|
|
|
|
+ <input type="text" id="modalUnit" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>用药方式:</label>
|
|
|
|
|
+ <input type="text" id="modalAdministrationMethod" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>用药频率:</label>
|
|
|
|
|
+ <input type="text" id="modalFrequency" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>执行状态:</label>
|
|
|
|
|
+ <input type="text" id="modalExecutionStatus" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>开始时间:</label>
|
|
|
|
|
+ <input type="text" id="modalStartTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>结束时间:</label>
|
|
|
|
|
+ <input type="text" id="modalEndTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>开嘱医生:</label>
|
|
|
|
|
+ <input type="text" id="modalPrescribingDoctor" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>开嘱时间:</label>
|
|
|
|
|
+ <input type="text" id="modalPrescriptionTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>停嘱医生:</label>
|
|
|
|
|
+ <input type="text" id="modalStopDoctor" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>停嘱时间:</label>
|
|
|
|
|
+ <input type="text" id="modalStopTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>备注:</label>
|
|
|
|
|
+ <textarea id="modalOrderRemark" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>护理级别:</label>
|
|
|
|
|
- <input type="text" id="modalNurseLevel" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 费用信息标签页 -->
|
|
|
|
|
+ <div id="patientFeeTab" style="display: none;">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>费用产生日期:</label>
|
|
|
|
|
+ <input type="text" id="modalFeeDate" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>项目名称:</label>
|
|
|
|
|
+ <input type="text" id="modalFeeItemName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>金额:</label>
|
|
|
|
|
+ <input type="text" id="modalFeeAmount" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>数量:</label>
|
|
|
|
|
+ <input type="text" id="modalFeeQuantity" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>单位:</label>
|
|
|
|
|
+ <input type="text" id="modalFeeUnit" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>小计:</label>
|
|
|
|
|
+ <input type="text" id="modalFeeSubtotal" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>备注:</label>
|
|
|
|
|
+ <textarea id="modalFeeRemark" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>是否缴费:</label>
|
|
|
|
|
+ <input type="text" id="modalFeePaid" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>缴费时间:</label>
|
|
|
|
|
+ <input type="text" id="modalPaymentTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="form-group">
|
|
|
|
|
- <label>在院状态:</label>
|
|
|
|
|
- <input type="text" id="modalInpatientStatus" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 检查检验标签页 -->
|
|
|
|
|
+ <div id="patientExamTab" style="display: none;">
|
|
|
|
|
+ <!-- 子标签页导航 -->
|
|
|
|
|
+ <div style="margin-bottom: 15px;">
|
|
|
|
|
+ <button class="btn btn-primary" onclick="showExamSubTab('examReport', this)" style="margin-right: 5px;">检查报告</button>
|
|
|
|
|
+ <button class="btn btn-secondary" onclick="showExamSubTab('testReport', this)" style="margin-right: 5px;">检验报告</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 检查报告子标签页 -->
|
|
|
|
|
+ <div id="examReportTab">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检查名称:</label>
|
|
|
|
|
+ <input type="text" id="modalExamName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检查部位:</label>
|
|
|
|
|
+ <input type="text" id="modalExamPart" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检查方式:</label>
|
|
|
|
|
+ <input type="text" id="modalExamMethod" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>光镜观察:</label>
|
|
|
|
|
+ <textarea id="modalExamMicroscope" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>影像所见:</label>
|
|
|
|
|
+ <textarea id="modalExamImage" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>临床诊断:</label>
|
|
|
|
|
+ <input type="text" id="modalExamClinicalDiagnosis" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>影像诊断:</label>
|
|
|
|
|
+ <input type="text" id="modalExamImageDiagnosis" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检查医生:</label>
|
|
|
|
|
+ <input type="text" id="modalExamDoctor" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检查时间:</label>
|
|
|
|
|
+ <input type="text" id="modalExamTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>审核者:</label>
|
|
|
|
|
+ <input type="text" id="modalExamReviewer" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>报告时间:</label>
|
|
|
|
|
+ <input type="text" id="modalExamReportTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>备注:</label>
|
|
|
|
|
+ <textarea id="modalExamRemark" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 检验报告子标签页 -->
|
|
|
|
|
+ <div id="testReportTab" style="display: none;">
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检验名称:</label>
|
|
|
|
|
+ <input type="text" id="modalTestName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>样品名称:</label>
|
|
|
|
|
+ <input type="text" id="modalSampleName" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>样品编号:</label>
|
|
|
|
|
+ <input type="text" id="modalSampleCode" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检验医生:</label>
|
|
|
|
|
+ <input type="text" id="modalTestDoctor" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>检验时间:</label>
|
|
|
|
|
+ <input type="text" id="modalTestTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>审核者:</label>
|
|
|
|
|
+ <input type="text" id="modalTestReviewer" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>报告时间:</label>
|
|
|
|
|
+ <input type="text" id="modalTestReportTime" readonly style="width: 100%; padding: 6px;">
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <label>备注:</label>
|
|
|
|
|
+ <textarea id="modalTestRemark" readonly style="width: 100%; padding: 6px; height: 60px;"></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <button class="btn btn-primary" onclick="showTestDetails()">详情</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 检验报告详情模态框 -->
|
|
|
|
|
+ <div id="testDetailsModal" style="display:none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.4); overflow: auto; padding: 50px 0;">
|
|
|
|
|
+ <div style="background-color: #fff; margin: 0 auto; padding: 0; border: 1px solid #888; width: 80%; max-width: 1200px; border-radius: 5px; max-height: 80%; display: flex; flex-direction: column;">
|
|
|
|
|
+ <div style="padding: 15px; border-bottom: 1px solid #eee; background-color: #007bff; color: white; display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
+ <h3 style="margin: 0;">检验报告详情</h3>
|
|
|
|
|
+ <button class="btn btn-danger" onclick="closeTestDetailsModal()">×</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="overflow-y: auto; flex: 1; padding: 15px;">
|
|
|
|
|
+ <table class="data-table" style="width: 100%;">
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th style="width: 5%; text-align: center;">序号</th>
|
|
|
|
|
+ <th style="width: 15%; text-align: center;">项目名称</th>
|
|
|
|
|
+ <th style="width: 15%; text-align: center;">英文缩写</th>
|
|
|
|
|
+ <th style="width: 10%; text-align: center;">结果值</th>
|
|
|
|
|
+ <th style="width: 10%; text-align: center;">结果提示</th>
|
|
|
|
|
+ <th style="width: 10%; text-align: center;">单位</th>
|
|
|
|
|
+ <th style="width: 15%; text-align: center;">参考范围</th>
|
|
|
|
|
+ <th style="width: 15%; text-align: center;">备注</th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody id="testDetailsTableBody">
|
|
|
|
|
+ <!-- 数据将通过JS动态加载 -->
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div style="padding: 15px; border-top: 1px solid #eee; text-align: right;">
|
|
|
|
|
+ <button class="btn btn-secondary" onclick="closeTestDetailsModal()">关闭</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="padding: 20px; border-top: 1px solid #eee; text-align: right;">
|
|
<div style="padding: 20px; border-top: 1px solid #eee; text-align: right;">
|
|
@@ -930,6 +1248,8 @@
|
|
|
loadPatientDepartmentOptions();
|
|
loadPatientDepartmentOptions();
|
|
|
// 加载病区下拉框数据
|
|
// 加载病区下拉框数据
|
|
|
loadPatientWardOptions();
|
|
loadPatientWardOptions();
|
|
|
|
|
+ // 加载房间号下拉框数据
|
|
|
|
|
+ loadPatientRoomNoOptions();
|
|
|
// 加载患者数据
|
|
// 加载患者数据
|
|
|
loadPatientData();
|
|
loadPatientData();
|
|
|
// 确保页面首次加载时也能显示所有患者数据
|
|
// 确保页面首次加载时也能显示所有患者数据
|
|
@@ -2680,6 +3000,42 @@
|
|
|
});
|
|
});
|
|
|
nurseLevelSelect.value = currentNurseLevelValue;
|
|
nurseLevelSelect.value = currentNurseLevelValue;
|
|
|
|
|
|
|
|
|
|
+ // 获取唯一的病区列表并更新下拉框
|
|
|
|
|
+ const wards = [...new Set(data.map(patient => patient.wardCode).filter(ward => ward))];
|
|
|
|
|
+ const wardSelect = document.getElementById('patientWard');
|
|
|
|
|
+ const currentWardValue = wardSelect.value;
|
|
|
|
|
+
|
|
|
|
|
+ // 保留当前选项,只更新选项列表
|
|
|
|
|
+ const defaultWardOption = wardSelect.options[0];
|
|
|
|
|
+ wardSelect.innerHTML = '';
|
|
|
|
|
+ wardSelect.appendChild(defaultWardOption);
|
|
|
|
|
+
|
|
|
|
|
+ wards.forEach(ward => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = ward;
|
|
|
|
|
+ option.textContent = ward;
|
|
|
|
|
+ wardSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+ wardSelect.value = currentWardValue;
|
|
|
|
|
+
|
|
|
|
|
+ // 获取唯一的房间号列表并更新下拉框
|
|
|
|
|
+ const roomNos = [...new Set(data.map(patient => patient.roomNo).filter(roomNo => roomNo))];
|
|
|
|
|
+ const roomNoSelect = document.getElementById('patientRoomNo');
|
|
|
|
|
+ const currentRoomNoValue = roomNoSelect.value;
|
|
|
|
|
+
|
|
|
|
|
+ // 保留当前选项,只更新选项列表
|
|
|
|
|
+ const defaultRoomNoOption = roomNoSelect.options[0];
|
|
|
|
|
+ roomNoSelect.innerHTML = '';
|
|
|
|
|
+ roomNoSelect.appendChild(defaultRoomNoOption);
|
|
|
|
|
+
|
|
|
|
|
+ roomNos.forEach(roomNo => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = roomNo;
|
|
|
|
|
+ option.textContent = roomNo;
|
|
|
|
|
+ roomNoSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+ roomNoSelect.value = currentRoomNoValue;
|
|
|
|
|
+
|
|
|
// 获取唯一的床位号列表并更新下拉框
|
|
// 获取唯一的床位号列表并更新下拉框
|
|
|
const bedNos = [...new Set(bedData.map(bed => bed.name).filter(bedNo => bedNo))];
|
|
const bedNos = [...new Set(bedData.map(bed => bed.name).filter(bedNo => bedNo))];
|
|
|
const bedNoSelect = document.getElementById('patientBedNo');
|
|
const bedNoSelect = document.getElementById('patientBedNo');
|
|
@@ -3053,12 +3409,13 @@
|
|
|
|
|
|
|
|
url += params.join('&');
|
|
url += params.join('&');
|
|
|
|
|
|
|
|
- // 并行获取患者数据和护理级别选项
|
|
|
|
|
|
|
+ // 并行获取患者数据、护理级别选项和在院状态选项
|
|
|
Promise.all([
|
|
Promise.all([
|
|
|
fetch(url).then(response => response.json()),
|
|
fetch(url).then(response => response.json()),
|
|
|
- fetch('/shixian/api/patients/nurse-levels').then(response => response.json())
|
|
|
|
|
|
|
+ fetch('/shixian/api/patients/nurse-levels').then(response => response.json()),
|
|
|
|
|
+ fetch('/shixian/api/patients/inpatient-statuses').then(response => response.json())
|
|
|
])
|
|
])
|
|
|
- .then(([data, nurseLevels]) => {
|
|
|
|
|
|
|
+ .then(([data, nurseLevels, inpatientStatuses]) => {
|
|
|
const tbody = document.getElementById('patientTableBody');
|
|
const tbody = document.getElementById('patientTableBody');
|
|
|
tbody.innerHTML = '';
|
|
tbody.innerHTML = '';
|
|
|
|
|
|
|
@@ -3080,6 +3437,24 @@
|
|
|
});
|
|
});
|
|
|
nurseLevelSelect.value = currentNurseLevelValue;
|
|
nurseLevelSelect.value = currentNurseLevelValue;
|
|
|
|
|
|
|
|
|
|
+ // 更新在院状态下拉框
|
|
|
|
|
+ const inpatientStatusSelect = document.getElementById('patientStatus');
|
|
|
|
|
+ const currentInpatientStatusValue = inpatientStatusSelect.value;
|
|
|
|
|
+
|
|
|
|
|
+ // 保留默认选项
|
|
|
|
|
+ const defaultInpatientStatusOption = inpatientStatusSelect.options[0];
|
|
|
|
|
+ inpatientStatusSelect.innerHTML = '';
|
|
|
|
|
+ inpatientStatusSelect.appendChild(defaultInpatientStatusOption);
|
|
|
|
|
+
|
|
|
|
|
+ // 添加从数据库获取的真实在院状态选项
|
|
|
|
|
+ inpatientStatuses.forEach(status => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = status;
|
|
|
|
|
+ option.textContent = status;
|
|
|
|
|
+ inpatientStatusSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+ inpatientStatusSelect.value = currentInpatientStatusValue;
|
|
|
|
|
+
|
|
|
// 处理患者数据
|
|
// 处理患者数据
|
|
|
data.forEach(patient => {
|
|
data.forEach(patient => {
|
|
|
const row = document.createElement('tr');
|
|
const row = document.createElement('tr');
|
|
@@ -3130,21 +3505,35 @@
|
|
|
if (data.success) {
|
|
if (data.success) {
|
|
|
const patient = data.data;
|
|
const patient = data.data;
|
|
|
|
|
|
|
|
- // 填充弹窗内容
|
|
|
|
|
- document.getElementById('modalAdmissionTime').value = patient.admissionDateTime || '';
|
|
|
|
|
- document.getElementById('modalInpatientNo').value = patient.inpatientNo || '';
|
|
|
|
|
|
|
+ // 填充弹窗内容 - 基本信息
|
|
|
document.getElementById('modalName').value = patient.name || '';
|
|
document.getElementById('modalName').value = patient.name || '';
|
|
|
document.getElementById('modalSex').value = patient.sex || '';
|
|
document.getElementById('modalSex').value = patient.sex || '';
|
|
|
document.getElementById('modalAge').value = patient.age || '';
|
|
document.getElementById('modalAge').value = patient.age || '';
|
|
|
|
|
+ document.getElementById('modalInsuranceType').value = patient.medicalInsuranceType || '';
|
|
|
document.getElementById('modalDept').value = patient.deptCode || '';
|
|
document.getElementById('modalDept').value = patient.deptCode || '';
|
|
|
document.getElementById('modalWard').value = patient.wardCode || '';
|
|
document.getElementById('modalWard').value = patient.wardCode || '';
|
|
|
document.getElementById('modalRoomNo').value = patient.roomNo || '';
|
|
document.getElementById('modalRoomNo').value = patient.roomNo || '';
|
|
|
document.getElementById('modalBedNo').value = patient.bedNo || '';
|
|
document.getElementById('modalBedNo').value = patient.bedNo || '';
|
|
|
- document.getElementById('modalNurseLevel').value = patient.nurseLevel || '';
|
|
|
|
|
|
|
+ document.getElementById('modalDoctor').value = patient.doctorCode || '';
|
|
|
|
|
+ document.getElementById('modalNurse').value = patient.nurseCode || '';
|
|
|
|
|
+ document.getElementById('modalInpatientNo').value = patient.inpatientNo || '';
|
|
|
|
|
+ document.getElementById('modalSerialNumber').value = patient.inpatientSerialNo || '';
|
|
|
|
|
+ document.getElementById('modalAdmissionTime').value = patient.admissionDateTime || '';
|
|
|
|
|
+ document.getElementById('modalDepartmentTime').value = patient.deptDateTime || '';
|
|
|
|
|
+ document.getElementById('modalDischargeTime').value = patient.dischargedDateTime || '';
|
|
|
document.getElementById('modalInpatientStatus').value = patient.inpatientStatus || '';
|
|
document.getElementById('modalInpatientStatus').value = patient.inpatientStatus || '';
|
|
|
|
|
+ document.getElementById('modalAdmissionDiagnosis').value = patient.diagnose || '';
|
|
|
|
|
+ document.getElementById('modalMedicalCondition').value = patient.conditionStatus || '';
|
|
|
|
|
+ document.getElementById('modalNurseLevel').value = patient.nurseLevel || '';
|
|
|
|
|
+ document.getElementById('modalAllergyInfo').value = patient.allergen || '';
|
|
|
|
|
+ document.getElementById('modalDietaryStatus').value = patient.dietType || '';
|
|
|
|
|
+ document.getElementById('modalSafetyPrecautions').value = patient.notice || '';
|
|
|
|
|
|
|
|
// 显示弹窗
|
|
// 显示弹窗
|
|
|
document.getElementById('patientModal').style.display = 'block';
|
|
document.getElementById('patientModal').style.display = 'block';
|
|
|
|
|
+
|
|
|
|
|
+ // 默认显示基本信息标签页
|
|
|
|
|
+ showPatientTab('basic');
|
|
|
} else {
|
|
} else {
|
|
|
alert('获取患者信息失败: ' + data.message);
|
|
alert('获取患者信息失败: ' + data.message);
|
|
|
}
|
|
}
|
|
@@ -3185,7 +3574,7 @@
|
|
|
|
|
|
|
|
// 加载患者管理病区下拉框数据
|
|
// 加载患者管理病区下拉框数据
|
|
|
function loadPatientWardOptions() {
|
|
function loadPatientWardOptions() {
|
|
|
- fetch('/shixian/api/patients')
|
|
|
|
|
|
|
+ fetch('/shixian/api/wards')
|
|
|
.then(response => response.json())
|
|
.then(response => response.json())
|
|
|
.then(data => {
|
|
.then(data => {
|
|
|
const wardSelect = document.getElementById('patientWard');
|
|
const wardSelect = document.getElementById('patientWard');
|
|
@@ -3193,14 +3582,11 @@
|
|
|
// 清空现有选项
|
|
// 清空现有选项
|
|
|
wardSelect.innerHTML = '<option value="">全部病区</option>';
|
|
wardSelect.innerHTML = '<option value="">全部病区</option>';
|
|
|
|
|
|
|
|
- // 获取唯一的病区列表
|
|
|
|
|
- const wards = [...new Set(data.map(patient => patient.wardCode).filter(ward => ward))];
|
|
|
|
|
-
|
|
|
|
|
// 添加新的选项
|
|
// 添加新的选项
|
|
|
- wards.forEach(ward => {
|
|
|
|
|
|
|
+ data.forEach(ward => {
|
|
|
const option = document.createElement('option');
|
|
const option = document.createElement('option');
|
|
|
- option.value = ward;
|
|
|
|
|
- option.textContent = ward;
|
|
|
|
|
|
|
+ option.value = ward.name;
|
|
|
|
|
+ option.textContent = ward.name;
|
|
|
wardSelect.appendChild(option);
|
|
wardSelect.appendChild(option);
|
|
|
});
|
|
});
|
|
|
})
|
|
})
|
|
@@ -3209,6 +3595,177 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 加载患者管理房间号下拉框数据
|
|
|
|
|
+ function loadPatientRoomNoOptions() {
|
|
|
|
|
+ fetch('/shixian/api/patients')
|
|
|
|
|
+ .then(response => response.json())
|
|
|
|
|
+ .then(data => {
|
|
|
|
|
+ const roomSelect = document.getElementById('patientRoomNo');
|
|
|
|
|
+
|
|
|
|
|
+ // 清空现有选项
|
|
|
|
|
+ roomSelect.innerHTML = '<option value="">全部</option>';
|
|
|
|
|
+
|
|
|
|
|
+ // 添加新的选项
|
|
|
|
|
+ data.forEach(patient => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ if (patient.roomNo) {
|
|
|
|
|
+ option.value = patient.roomNo;
|
|
|
|
|
+ option.textContent = patient.roomNo;
|
|
|
|
|
+ // 避免重复添加相同的房间号
|
|
|
|
|
+ if (!Array.from(roomSelect.options).some(opt => opt.value === patient.roomNo)) {
|
|
|
|
|
+ roomSelect.appendChild(option);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.error('加载房间号下拉框数据失败:', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 根据科室动态加载病区选项
|
|
|
|
|
+ function loadWardsByDepartment(department) {
|
|
|
|
|
+ const wardSelect = document.getElementById('patientWard');
|
|
|
|
|
+
|
|
|
|
|
+ // 保存当前选择的病区值
|
|
|
|
|
+ const currentWardValue = wardSelect.value;
|
|
|
|
|
+
|
|
|
|
|
+ // 清空现有选项,保留默认选项
|
|
|
|
|
+ wardSelect.innerHTML = '<option value="">全部病区</option>';
|
|
|
|
|
+
|
|
|
|
|
+ if (department) {
|
|
|
|
|
+ // 如果选择了科室,则从患者数据中筛选出该科室关联的病区
|
|
|
|
|
+ fetch('/shixian/api/patients')
|
|
|
|
|
+ .then(response => response.json())
|
|
|
|
|
+ .then(data => {
|
|
|
|
|
+ // 过滤出该科室的患者,并提取唯一的病区代码
|
|
|
|
|
+ const wards = [...new Set(data
|
|
|
|
|
+ .filter(patient => patient.deptCode === department)
|
|
|
|
|
+ .map(patient => patient.wardCode)
|
|
|
|
|
+ .filter(ward => ward))];
|
|
|
|
|
+
|
|
|
|
|
+ // 添加选项
|
|
|
|
|
+ wards.forEach(ward => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = ward;
|
|
|
|
|
+ option.textContent = ward;
|
|
|
|
|
+ wardSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 恢复之前的病区选择(如果仍然有效)
|
|
|
|
|
+ wardSelect.value = currentWardValue;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.error('加载病区下拉框数据失败:', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 如果没有选择科室,则从所有患者数据中提取病区
|
|
|
|
|
+ fetch('/shixian/api/patients')
|
|
|
|
|
+ .then(response => response.json())
|
|
|
|
|
+ .then(data => {
|
|
|
|
|
+ // 获取唯一的病区列表
|
|
|
|
|
+ const wards = [...new Set(data.map(patient => patient.wardCode).filter(ward => ward))];
|
|
|
|
|
+
|
|
|
|
|
+ // 添加选项
|
|
|
|
|
+ wards.forEach(ward => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = ward;
|
|
|
|
|
+ option.textContent = ward;
|
|
|
|
|
+ wardSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 恢复之前的病区选择(如果仍然有效)
|
|
|
|
|
+ wardSelect.value = currentWardValue;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.error('加载病区下拉框数据失败:', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 根据房间号动态加载床位号选项
|
|
|
|
|
+ function loadBedsByRoom(room) {
|
|
|
|
|
+ const bedSelect = document.getElementById('patientBedNo');
|
|
|
|
|
+
|
|
|
|
|
+ // 清空现有选项,保留默认选项
|
|
|
|
|
+ bedSelect.innerHTML = '<option value="">全部</option>';
|
|
|
|
|
+
|
|
|
|
|
+ if (room) {
|
|
|
|
|
+ // 如果选择了房间,则从患者数据中筛选出该房间关联的床位号
|
|
|
|
|
+ fetch('/shixian/api/patients')
|
|
|
|
|
+ .then(response => response.json())
|
|
|
|
|
+ .then(data => {
|
|
|
|
|
+ // 过滤出该房间的患者,并提取床位号
|
|
|
|
|
+ const beds = [...new Set(data
|
|
|
|
|
+ .filter(patient => patient.roomNo === room)
|
|
|
|
|
+ .map(patient => patient.bedNo)
|
|
|
|
|
+ .filter(bed => bed))];
|
|
|
|
|
+
|
|
|
|
|
+ // 添加选项
|
|
|
|
|
+ beds.forEach(bed => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = bed;
|
|
|
|
|
+ option.textContent = bed;
|
|
|
|
|
+ bedSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.error('加载床位号下拉框数据失败:', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 根据病区动态加载房间号选项
|
|
|
|
|
+ function loadRoomsByWard(ward) {
|
|
|
|
|
+ const roomSelect = document.getElementById('patientRoomNo');
|
|
|
|
|
+
|
|
|
|
|
+ // 清空现有选项,保留默认选项
|
|
|
|
|
+ roomSelect.innerHTML = '<option value="">全部</option>';
|
|
|
|
|
+
|
|
|
|
|
+ if (ward) {
|
|
|
|
|
+ // 如果选择了病区,则从患者数据中筛选出该病区关联的房间号
|
|
|
|
|
+ fetch('/shixian/api/patients')
|
|
|
|
|
+ .then(response => response.json())
|
|
|
|
|
+ .then(data => {
|
|
|
|
|
+ // 过滤出该病区的患者,并提取房间号
|
|
|
|
|
+ const rooms = [...new Set(data
|
|
|
|
|
+ .filter(patient => patient.wardCode === ward)
|
|
|
|
|
+ .map(patient => patient.roomNo)
|
|
|
|
|
+ .filter(room => room))];
|
|
|
|
|
+
|
|
|
|
|
+ // 添加选项
|
|
|
|
|
+ rooms.forEach(room => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = room;
|
|
|
|
|
+ option.textContent = room;
|
|
|
|
|
+ roomSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.error('加载房间号下拉框数据失败:', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 如果没有选择病区,则从所有患者数据中提取房间号
|
|
|
|
|
+ fetch('/shixian/api/patients')
|
|
|
|
|
+ .then(response => response.json())
|
|
|
|
|
+ .then(data => {
|
|
|
|
|
+ // 获取唯一的房间号列表
|
|
|
|
|
+ const rooms = [...new Set(data.map(patient => patient.roomNo).filter(room => room))];
|
|
|
|
|
+
|
|
|
|
|
+ // 添加选项
|
|
|
|
|
+ rooms.forEach(room => {
|
|
|
|
|
+ const option = document.createElement('option');
|
|
|
|
|
+ option.value = room;
|
|
|
|
|
+ option.textContent = room;
|
|
|
|
|
+ roomSelect.appendChild(option);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(error => {
|
|
|
|
|
+ console.error('加载房间号下拉框数据失败:', error);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 关闭床位代码设置
|
|
// 关闭床位代码设置
|
|
|
function closeBedCodeSetting() {
|
|
function closeBedCodeSetting() {
|
|
|
document.getElementById('bedCodeSettingModal').style.display = 'none';
|
|
document.getElementById('bedCodeSettingModal').style.display = 'none';
|
|
@@ -3628,6 +4185,87 @@
|
|
|
document.getElementById('wardModal').style.display = 'none';
|
|
document.getElementById('wardModal').style.display = 'none';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 患者详情标签页切换
|
|
|
|
|
+ function showPatientTab(tabName, element) {
|
|
|
|
|
+ // 隐藏所有标签页内容
|
|
|
|
|
+ document.getElementById('patientBasicTab').style.display = 'none';
|
|
|
|
|
+ document.getElementById('patientDiagnosisTab').style.display = 'none';
|
|
|
|
|
+ document.getElementById('patientOrderTab').style.display = 'none';
|
|
|
|
|
+ document.getElementById('patientFeeTab').style.display = 'none';
|
|
|
|
|
+ document.getElementById('patientExamTab').style.display = 'none';
|
|
|
|
|
+
|
|
|
|
|
+ // 显示指定的标签页
|
|
|
|
|
+ switch(tabName) {
|
|
|
|
|
+ case 'basic':
|
|
|
|
|
+ document.getElementById('patientBasicTab').style.display = 'block';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'diagnosis':
|
|
|
|
|
+ document.getElementById('patientDiagnosisTab').style.display = 'block';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'order':
|
|
|
|
|
+ document.getElementById('patientOrderTab').style.display = 'block';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'fee':
|
|
|
|
|
+ document.getElementById('patientFeeTab').style.display = 'block';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'exam':
|
|
|
|
|
+ document.getElementById('patientExamTab').style.display = 'block';
|
|
|
|
|
+ // 默认显示检查报告子标签页
|
|
|
|
|
+ showExamSubTab('examReport');
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 更新标签按钮样式
|
|
|
|
|
+ const buttons = document.querySelectorAll('#patientModal .btn');
|
|
|
|
|
+ buttons.forEach(button => {
|
|
|
|
|
+ button.className = 'btn btn-secondary';
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 设置当前激活按钮的样式
|
|
|
|
|
+ if (element) {
|
|
|
|
|
+ element.className = 'btn btn-primary';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 显示检验报告详情
|
|
|
|
|
+ function showTestDetails() {
|
|
|
|
|
+ // 显示模态框
|
|
|
|
|
+ document.getElementById('testDetailsModal').style.display = 'block';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 关闭检验报告详情模态框
|
|
|
|
|
+ function closeTestDetailsModal() {
|
|
|
|
|
+ document.getElementById('testDetailsModal').style.display = 'none';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 检查检验子标签页切换
|
|
|
|
|
+ function showExamSubTab(subTabName, element) {
|
|
|
|
|
+ // 隐藏所有子标签页内容
|
|
|
|
|
+ document.getElementById('examReportTab').style.display = 'none';
|
|
|
|
|
+ document.getElementById('testReportTab').style.display = 'none';
|
|
|
|
|
+
|
|
|
|
|
+ // 显示指定的子标签页
|
|
|
|
|
+ switch(subTabName) {
|
|
|
|
|
+ case 'examReport':
|
|
|
|
|
+ document.getElementById('examReportTab').style.display = 'block';
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'testReport':
|
|
|
|
|
+ document.getElementById('testReportTab').style.display = 'block';
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 更新子标签按钮样式
|
|
|
|
|
+ const examButtons = document.querySelectorAll('#patientExamTab .btn');
|
|
|
|
|
+ examButtons.forEach(button => {
|
|
|
|
|
+ button.className = 'btn btn-secondary';
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ // 设置当前激活按钮的样式
|
|
|
|
|
+ if (element) {
|
|
|
|
|
+ element.className = 'btn btn-primary';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
</body>
|
|
</body>
|
|
|
</html>
|
|
</html>
|