diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java index d13d63b9..21a57aa1 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationMainAppServiceImpl.java @@ -22,6 +22,7 @@ import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto; import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto; import com.openhis.web.doctorstation.dto.ReceptionStatisticsDto; import com.openhis.web.doctorstation.mapper.DoctorStationMainAppMapper; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -32,6 +33,7 @@ import java.util.stream.Collectors; /** * 医生站-主页面 应用实现类 */ +//@Slf4j @Service public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppService { @@ -95,6 +97,9 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer ParticipantType.REGISTRATION_DOCTOR.getCode(), ParticipantType.ADMITTER.getCode(), userId, currentUserOrganizationId, pricingFlag, EncounterStatus.PLANNED.getValue(), EncounterActivityStatus.ACTIVE.getValue(), queryWrapper); + //日志输出就诊患者信息,patientInfo +// log.debug("就诊患者信息: 总数={}, 记录数={}, 数据={}", +// patientInfo.getTotal(), patientInfo.getRecords().size(), patientInfo.getRecords()); patientInfo.getRecords().forEach(e -> { // 性别 e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum())); diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java index aebaf579..66886a24 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/dto/PatientInfoDto.java @@ -123,4 +123,8 @@ public class PatientInfoDto { * 病历号 */ private String busNo; + /** + * 就诊卡号 + */ + private String identifierNo; } diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml index b443069f..6a774d94 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationMainAppMapper.xml @@ -23,7 +23,8 @@ T10.reception_time, T10.practitioner_user_id, T10.jz_practitioner_user_id, - T10.bus_no + T10.bus_no, + T10.identifier_no from ( SELECT T1.tenant_id AS tenant_id, @@ -48,7 +49,8 @@ T1.create_time AS register_time, T1.reception_time AS reception_time, T1.organization_id AS org_id, - T8.bus_no AS bus_no + T8.bus_no AS bus_no, + T9.identifier_no AS identifier_no FROM adm_encounter AS T1 LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0' LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0' @@ -67,6 +69,20 @@ LEFT JOIN adm_account AS T6 ON T1.ID = T6.encounter_id AND T6.delete_flag = '0' and T6.encounter_flag = '1' LEFT JOIN fin_contract AS T7 ON T6.contract_no = T7.bus_no AND T7.delete_flag = '0' LEFT JOIN adm_patient AS T8 ON T1.patient_id = T8.ID AND T8.delete_flag = '0' + LEFT JOIN ( + SELECT patient_id, + identifier_no + FROM ( + SELECT patient_id, + identifier_no, + ROW_NUMBER() OVER (PARTITION BY patient_id ORDER BY create_time ASC) AS rn + FROM adm_patient_identifier + WHERE delete_flag = '0' + AND identifier_no IS NOT NULL + AND identifier_no != '' + ) t + WHERE rn = 1 + ) AS T9 ON T8.id = T9.patient_id WHERE T1.delete_flag = '0' diff --git a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue index fb0b137d..f583c811 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue @@ -17,7 +17,7 @@ - + - +
@@ -88,18 +88,18 @@
- +
- +
- +
@@ -115,6 +115,7 @@
+
+
@@ -135,9 +137,11 @@
+ +
- + @@ -164,7 +168,7 @@
请选择执行科室
- +
@@ -248,7 +252,6 @@
-
@@ -458,7 +461,7 @@ const formData = reactive({ applicationId: null, applicationNo: '202511210001', patientName: '', - cardNo: '', + identifierNo: '', feeType: 'self', applicationDate: new Date(), departmentName: '', @@ -579,11 +582,11 @@ const getFilteredItems = (categoryKey) => { // 初始化数据 function initData() { - console.log('检验组件初始化,patientInfo:', props.patientInfo) + // console.log('检验组件初始化,patientInfo:', props.patientInfo) if (props.patientInfo) { queryParams.encounterId = props.patientInfo.encounterId formData.patientName = props.patientInfo.patientName || '' - formData.cardNo = props.patientInfo.cardNo || '' + formData.identifierNo = props.patientInfo.identifierNo || '' formData.departmentName = props.patientInfo.departmentName || '' formData.doctorName = props.patientInfo.doctorName || '' } @@ -597,26 +600,26 @@ function initData() { function getInspectionList() { // 如果没有encounterId,不调用接口 if (!queryParams.encounterId) { - console.warn('【检验】encounterId为空,不调用接口') + // console.warn('【检验】encounterId为空,不调用接口') return } loading.value = true // 调用真实的API,只传递 encounterId 参数 - console.log('【检验】调用API,encounterId:', queryParams.encounterId) + // console.log('【检验】调用API,encounterId:', queryParams.encounterId) getInspectionApplicationList({ encounterId: queryParams.encounterId }).then((res) => { if (res.code === 200) { inspectionList.value = res.data || [] total.value = res.data?.length || 0 - console.log('【检验】获取数据成功,数量:', inspectionList.value.length) + // console.log('【检验】获取数据成功,数量:', inspectionList.value.length) } else { inspectionList.value = [] total.value = 0 ElMessage.error('获取检验申请单列表失败') } }).catch((error) => { - console.error('获取检验申请单列表异常:', error) + // console.error('获取检验申请单列表异常:', error) inspectionList.value = [] total.value = 0 ElMessage.error('获取检验申请单列表异常') @@ -627,7 +630,7 @@ function getInspectionList() { // 新增申请单 function handleNewApplication() { - console.log('点击新增按钮') + // console.log('点击新增按钮') resetForm() // 生成申请单号 formData.applicationNo = generateApplicationNo() @@ -737,7 +740,7 @@ function handleSave() { totalAmount: selectedInspectionItems.value.reduce((sum, item) => sum + item.price + (item.serviceFee || 0), 0) } - console.log('保存检验申请单数据:', saveData) + // console.log('保存检验申请单数据:', saveData) // 调用真实的API保存 saveInspectionApplication(saveData).then((res) => { @@ -751,7 +754,7 @@ function handleSave() { ElMessage.error(res.message || '保存失败') } }).catch((error) => { - console.error('保存检验申请单异常:', error) + // console.error('保存检验申请单异常:', error) ElMessage.error('保存异常') }) } @@ -761,7 +764,7 @@ function handleFormSave() { formRef.value?.validate((valid) => { if (valid) { formData.inspectionItems = selectedInspectionItems.value.map(item => item.id) - console.log('保存检验申请单表单数据:', formData) + // console.log('保存检验申请单表单数据:', formData) ElMessage.success('保存成功') showForm.value = false getInspectionList() @@ -771,7 +774,7 @@ function handleFormSave() { // 查看详情 function handleView(row) { - console.log('点击查看按钮,数据:', row) + // console.log('点击查看按钮,数据:', row) // 加载表单数据 Object.assign(formData, row) @@ -811,7 +814,7 @@ function switchCategory(category) { // 处理搜索 function handleSearch() { // 搜索逻辑已在getFilteredItems中实现,这里可以添加额外的搜索逻辑 - console.log('搜索关键词:', searchKeyword.value) + // console.log('搜索关键词:', searchKeyword.value) } // 处理项目项点击(排除勾选框点击) @@ -866,7 +869,7 @@ function handleSelectionChange(selection) { // 打印申请单 function handlePrint(row) { - console.log('打印申请单:', row) + // console.log('打印申请单:', row) // 切换到申请单TAB leftActiveTab.value = 'application' @@ -949,7 +952,7 @@ function handleDelete(row) { confirmButtonClass: 'el-button--danger' } ).then(() => { - console.log('删除申请单:', row) + // console.log('删除申请单:', row) // 调用真实的API删除 deleteInspectionApplication(row.applicationId).then((res) => { if (res.code === 200) { @@ -960,7 +963,7 @@ function handleDelete(row) { ElMessage.error(res.message || '删除失败') } }).catch((error) => { - console.error('删除检验申请单异常:', error) + // console.error('删除检验申请单异常:', error) ElMessage.error('删除异常') }) }).catch(() => { @@ -987,10 +990,11 @@ watch(() => props.activeTab, (newVal) => { // 监听patientInfo变化,确保encounterId及时更新 watch(() => props.patientInfo, (newVal) => { - console.log('【检验】patientInfo变化:', newVal) + // console.log('【检验】patientInfo变化:', newVal) + console.log('【检验】接收到的完整patientInfo:', JSON.stringify(newVal, null, 2)) if (newVal && newVal.encounterId) { queryParams.encounterId = newVal.encounterId - console.log('【检验】更新encounterId:', queryParams.encounterId) + // console.log('【检验】更新encounterId:', queryParams.encounterId) } }, { deep: true, immediate: true }) diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index 291372c2..0dabf077 100644 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -321,7 +321,10 @@ getPatientList(); function getPatientList() { queryParams.value.statusEnum = 2; getList(queryParams.value).then((res) => { + // console.log('API返回的完整数据:', res); // 添加这行来查看完整返回 + // console.log('API返回的数据记录:', res.data.records); // 查看具体数据记录 patientList.value = res.data.records.map((item) => { + // console.log('处理的单个患者数据:', item); // 查看处理的单个患者数据 return { ...item, active: currentEncounterId.value ? item.encounterId == currentEncounterId.value : false, @@ -431,7 +434,7 @@ function handleClick(tab) { // 查看本次就诊处方单(从医嘱Tab页获取已开立的处方单信息) function getEnPrescription(encounterId) { getEnPrescriptionInfo({ encounterId: encounterId }).then((res) => { - console.log('处方单 res', res); + // console.log('处方单 res', res); let dataArr = res.data.records || []; if (dataArr.length <= 0) { ElMessage({ @@ -461,6 +464,7 @@ function handleCardClick(item, index) { patient.active = patient.encounterId === item.encounterId; }); patientInfo.value = item; + // console.log('patientInfo.value.cardNo:', patientInfo.value.cardNo) // 将患者信息保存到store中,供hospitalizationEmr组件使用 updatePatientInfo(item); activeTab.value = 'hospitalizationEmr';