From 94f57c59da8840e6c0e7f040bd0d9553f9c51602 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 13:44:31 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=BE=93=E6=B6=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datadictionary/dto/DiagnosisTreatmentUpDto.java | 2 +- .../appservice/IOutpatientInfusionRecordService.java | 3 ++- .../impl/OutpatientInfusionRecordServiceImpl.java | 12 ++++++++---- .../OutpatientInfusionRecordController.java | 7 ++++--- .../dto/OutpatientInfusionPatientDto.java | 1 + 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java index 5425e648..3eafc386 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/dto/DiagnosisTreatmentUpDto.java @@ -28,7 +28,7 @@ public class DiagnosisTreatmentUpDto { private Long id; /** 目录类别 */ - @NotNull(message = "目录类别不能为空") + @NotBlank(message = "目录类别不能为空") private String categoryCode; /** 编码 */ diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java index 11f5850e..3c15dcb1 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/IOutpatientInfusionRecordService.java @@ -55,9 +55,10 @@ public interface IOutpatientInfusionRecordService { /** * 门诊输液执行历史记录查询 * + * @param patientId 患者ID * @param historyFlag 查询的是否为执行履历 * @return 门诊输液记录列表 */ - List getPatientInfusionPerformRecord(HttpServletRequest request, boolean historyFlag); + List getPatientInfusionPerformRecord(Long patientId,HttpServletRequest request, boolean historyFlag); } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java index 29e71f4f..184d4691 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java @@ -114,7 +114,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 构建查询条件 QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(new OutpatientInfusionPatientDto(), null, null, request); + HisQueryUtils.buildQueryWrapper(null, null, null, request); queryWrapper.eq(CommonConstants.FieldName.PatientId, outpatientInfusionPatientDto.getPatientId()); // based_on_id 是为空的 @@ -239,7 +239,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR public List checkServiceRequestIsCompleted() { //获取全部执行输液记录 - List patientInfusionList =getPatientInfusionPerformRecord(null,false); + List patientInfusionList =getPatientInfusionPerformRecord(null,null,false); // 按 serviceId 分组 Map> servicePatientInfusionList = patientInfusionList.stream() .collect(Collectors.groupingBy(OutpatientInfusionRecordDto::getServiceId)); @@ -334,16 +334,17 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR /** * 显示门诊输液执行记录查询 * + * @param patientId 患者输液信息 * @param historyFlag 查询的是否为执行履历 * @return 返回门诊输液执行记录查询 */ @Override - public List getPatientInfusionPerformRecord(HttpServletRequest request, + public List getPatientInfusionPerformRecord(Long patientId,HttpServletRequest request, boolean historyFlag) { // 构建查询条件 QueryWrapper queryWrapper = - HisQueryUtils.buildQueryWrapper(new OutpatientInfusionRecordDto(), null, null, request); + HisQueryUtils.buildQueryWrapper(null, null, null, request); // 执行历史查询的条件 if (historyFlag) { @@ -351,6 +352,8 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR queryWrapper.isNotNull(CommonConstants.FieldName.BasedOnId); // 状态是已完成 queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.COMPLETED.getValue()); + //筛选当前ID的患者历史执行记录 + queryWrapper.eq(CommonConstants.FieldName.PatientId,patientId); List infusionPerformList = editRecords(queryWrapper); List medicationIds = checkServiceRequestIsCompleted(infusionPerformList); @@ -365,6 +368,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 门诊输液待执行记录查询 } else { + // based_on_id 为空,此条件筛选控制不显示执行履历 queryWrapper.isNull(CommonConstants.FieldName.BasedOnId); // 状态是进行中 diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java index 9f7f3e7d..99c45ea5 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java @@ -103,18 +103,19 @@ public class OutpatientInfusionRecordController { @GetMapping(value = "/infusion-wait-perform-record") public R getPatientInfusionRecords(HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(request, false)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(null,request, false)); } /** * 门诊输液执行历史记录查询 * + * @param patientId 患者ID * @return 门诊输液执行历史记录列表 */ @GetMapping(value = "/infusion-perform-record") - public R getPatientInfusionPerformRecord(HttpServletRequest request) { + public R getPatientInfusionPerformRecord(@RequestParam Long patientId,HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(request, true)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId,request, true)); } } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java index 4fc0a2aa..a1e917e6 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java @@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import lombok.experimental.Accessors; +import javax.validation.constraints.NotNull; import java.util.Date; /** From b7fb7c3746f53b86848459990dbdc45a37ef0ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E8=8F=B2?= <12704587+yvwen@user.noreply.gitee.com> Date: Sun, 30 Mar 2025 14:36:18 +0800 Subject: [PATCH 02/11] =?UTF-8?q?=E5=8F=91=E8=8D=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IWesternMedicineDispenseAppServiceImpl.java | 4 ++-- .../openhis/web/pharmacymanage/dto/EncounterInfoPageDto.java | 3 +++ .../web/pharmacymanage/dto/EncounterInfoSearchParam.java | 2 +- .../web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java | 2 +- .../web/pharmacymanage/dto/PrescriptionPatientInfoDto.java | 2 +- .../mapper/pharmacymanage/WesternMedicineDispenseMapper.xml | 5 +++-- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java index 2ba9374b..1652f1aa 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java @@ -125,7 +125,7 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD PrescriptionPatientInfoDto prescriptionPatientInfoDto = westernMedicineDispenseMapper. selectPrescriptionPatientInfo(encounterId); // 年龄 - prescriptionPatientInfoDto.setAge(AgeCalculatorUtil.getAge(prescriptionPatientInfoDto.getBirth_date())); + prescriptionPatientInfoDto.setAge(AgeCalculatorUtil.getAge(prescriptionPatientInfoDto.getBirthDate())); // 性别 prescriptionPatientInfoDto.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, prescriptionPatientInfoDto.getGenderEnum())); @@ -141,7 +141,7 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD if(!prescriptionMedicineInfoList.isEmpty()) { BigDecimal totalPrice = new BigDecimal(0); for (PrescriptionMedicineInfoDto item : prescriptionMedicineInfoList) { - totalPrice.add(item.getTotal_price()); + totalPrice.add(item.getTotalPrice()); } prescriptionPatientInfoDto.setTotalPrice(totalPrice); } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoPageDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoPageDto.java index dc1eeed6..374b4f56 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoPageDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoPageDto.java @@ -5,6 +5,8 @@ package com.openhis.web.pharmacymanage.dto; import java.io.Serializable; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import lombok.experimental.Accessors; @@ -21,6 +23,7 @@ public class EncounterInfoPageDto implements Serializable { private static final long serialVersionUID = 1L; /** 就诊ID */ + @JsonSerialize(using = ToStringSerializer.class) private Long encounterId; /** 科室 */ diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoSearchParam.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoSearchParam.java index d46515c4..76c6b31f 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoSearchParam.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/EncounterInfoSearchParam.java @@ -19,7 +19,7 @@ import lombok.experimental.Accessors; public class EncounterInfoSearchParam implements Serializable { /** 科室 */ - private long departmentId; + private Long departmentId; /** 患者姓名或者证件号 */ private String condition; diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java index a694d4b8..a7d59ad3 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java @@ -76,5 +76,5 @@ public class PrescriptionMedicineInfoDto implements Serializable { private BigDecimal unitPrice; /** 金额 */ - private BigDecimal total_price; + private BigDecimal totalPrice; } \ No newline at end of file diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java index 3ee74c4e..a6c83812 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java @@ -30,7 +30,7 @@ public class PrescriptionPatientInfoDto implements Serializable { private String genderEnum_enumText; /** 生日 */ - private Date birth_date; + private Date birthDate; /** 年龄 */ private String age; diff --git a/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml index 4dd1a866..001b61c2 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml @@ -8,16 +8,17 @@ patient_name, gender_enum, encounter_date, - organization_id, + department_id, id_card, start_time FROM ( SELECT + T1.tenant_id, T1.id AS encounter_id, T1.start_time, TO_CHAR(T1.start_time,'YYYY-MM-DD') AS encounter_date, - T1.organization_id, + T1.organization_id AS department_id, T2.gender_enum, T2.name AS patient_name, T2.id_card, From a8f9643da7a196d16646820175b30257ec8f4a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E8=8F=B2?= <12704587+yvwen@user.noreply.gitee.com> Date: Sun, 30 Mar 2025 14:36:57 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=8F=91=E8=8D=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../westernmedicine/index.vue | 88 +++++++++++++------ 1 file changed, 59 insertions(+), 29 deletions(-) diff --git a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue index 5b151109..de0b83a3 100644 --- a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue +++ b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue @@ -7,8 +7,8 @@ @keyup.enter="handleQuery" /> - + - + - + @@ -45,28 +45,28 @@
- 姓名: - 性别: - 年龄: - 合同类型: - 证件号: + 姓名:{{ personInfo.patientName }} + 性别:{{ personInfo.genderEnum_enumText }} + 年龄:{{ personInfo.age }} + 合同类型:{{ personInfo.categoryEnum_enumText }} + 证件号:{{ personInfo.idCard }}
- 就诊科室: - 就诊日期: - 门诊诊断:{{ medicineInfoList.a }} + 就诊科室:{{ personInfo.organizationName }} + 就诊日期:{{ personInfo.encounterDate }} + 门诊诊断:{{ personInfo.patientName }}
- 总金额:{{ price ? price.toFixed(2) : '0.00' }}元 + 总金额:{{ totalPrice ? totalPrice.toFixed(2) : '0.00' }}元
- - - + + + @@ -76,7 +76,7 @@ - + @@ -93,7 +93,7 @@ --> - + @@ -137,6 +137,7 @@ const backReason = ref([]); const selectedPrescriptionNo = ref(''); const showDialog = ref(false); const notPerformedReasonEnum = ref(); +const currentRow = ref(null); const { proxy } = getCurrentInstance(); @@ -153,6 +154,14 @@ const data = reactive({ const { queryParams } = toRefs(data); function getList() { + const currentDate = new Date(); + const year = currentDate.getFullYear(); + const month = String(currentDate.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1 + const day = String(currentDate.getDate()).padStart(2, '0'); + const formattedDateTime = `${year}-${month}-${day}`; + queryParams.value.startTimeSTime = formattedDateTime + " 00:00:00"; + queryParams.value.startTimeETime = formattedDateTime + " 23:59:59"; + console.log("222",queryParams.value) listPatient(queryParams.value).then((response) => { console.log("Full response1:", response); @@ -172,14 +181,19 @@ function getList() { /** 搜索按钮操作 */ function handleQuery() { if (dateRange.value) { - queryParams.value.startTimeSTime = dateRange.value[0]; - queryParams.value.startTimeETime = dateRange.value[1]; + queryParams.value.startTimeSTime = dateRange.value[0] + " 00:00:00"; + queryParams.value.startTimeETime = dateRange.value[1] + " 23:59:59"; } else { queryParams.value.startTimeSTime = null; queryParams.value.startTimeETime = null; } queryParams.value.pageNo = 1; - getList(); + console.log("222",queryParams.value) + listPatient(queryParams.value).then((response) => { + console.log("Full response1:", response); + patientList.value = response.data.records; + total.value = response.data.total; + }); } function countGroupRows(data) { @@ -192,6 +206,7 @@ function countGroupRows(data) { groupInfo.count++; groupInfo.indices.push(index); }); + console.log("F*******:", groupCounts); return groupCounts; } @@ -216,6 +231,7 @@ function getRowMarkers(groupCounts, data) { markers[indices[indices.length - 1]] = "┗ "; } }); + console.log("F*******:", markers); return markers; } @@ -229,17 +245,29 @@ function handleSelectionChange(selection) { } } -// 行合并逻辑 function spanMethod({ row, column, rowIndex, columnIndex }) { - if (columnIndex === 6) { // 假设药品名称在第7列(索引为6) - const medicineName = row.genderEnum_enumText; - const count = medicineInfoList.value.filter(item => item.genderEnum_enumText === medicineName).length; - if (rowIndex % count === 0) { - return [count, 1]; + // 定义需要合并的列范围(前6列,包括selection列) + const columnsToMerge = [0, 1, 2, 3, 4, 5]; // 假设selection列是第0列,其他列依次是1, 2, 3, 4, 5 + + // 检查当前列是否在需要合并的列范围内 + if (columnsToMerge.includes(columnIndex)) { + const prescriptionNo = row.prescriptionNo; + + // 查找当前处方号在列表中第一次出现的索引 + const firstRowIndex = medicineInfoList.value.findIndex(item => item.prescriptionNo === prescriptionNo); + + // 如果当前行是该处方号的首行,则合并count行 + if (rowIndex === firstRowIndex) { + // 计算该处方号的总行数 + const count = medicineInfoList.value.filter(item => item.prescriptionNo === prescriptionNo).length; + return [count, 1]; // 合并count行,1列 } else { - return [0, 0]; + return [0, 0]; // 其他行不显示 } } + + // 其他列不进行合并 + return [1, 1]; } function formatPrice(row, column, cellValue) { @@ -253,7 +281,9 @@ function handleCurrentChange(row) { currentRow.value = row; // 更新当前选中行的数据 console.log("当前选中行的数据:", currentRow.value); listWesternmedicine(currentRow.value).then((response) => { - medicineInfoList.value = response.data; + console.log("121212",response) + personInfo.value = response.data.prescriptionPatientInfoDto; + medicineInfoList.value = response.data.prescriptionMedicineInfoDtoList; // 统计每个 groupId 的行数 const groupCounts = countGroupRows(medicineInfoList.value); // 设置每行的标记 From 9346a0ace1f9b2ab7df07b2b399531b8d270fcd0 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 14:58:04 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E7=96=BE=E7=97=85=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/IDiseaseManageAppService.java | 80 +++++++ .../impl/DiseaseManageAppServiceImpl.java | 205 ++++++++++++++++++ .../controller/DiseaseManageController.java | 99 ++------- 3 files changed, 299 insertions(+), 85 deletions(-) create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/IDiseaseManageAppService.java create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DiseaseManageAppServiceImpl.java diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/IDiseaseManageAppService.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/IDiseaseManageAppService.java new file mode 100644 index 00000000..ccaa4bda --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/IDiseaseManageAppService.java @@ -0,0 +1,80 @@ +package com.openhis.web.datadictionary.appservice; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.web.bind.annotation.GetMapping; + +import com.core.common.core.domain.R; +import com.openhis.web.datadictionary.dto.DiseaseManageSelParam; +import com.openhis.web.datadictionary.dto.DiseaseManageUpDto; + +/** + * 病种目录 + * + * @author liuhr + * @date 2025/3/30 + */ +public interface IDiseaseManageAppService { + + /** + * 病种目录初始化 + * + * @return + */ + R getDiseaseInit(); + + /** + * 查询病种目录分页列表 + * + * @param diseaseManageSelParam 查询条件 + * @param searchKey 查询条件-模糊查询 + * @param pageNo 当前页码 + * @param pageSize 查询条数 + * @return + */ + R getDiseaseList(DiseaseManageSelParam diseaseManageSelParam, String searchKey, Integer pageNo, Integer pageSize, + HttpServletRequest request); + + /** + * 根据id查询疾病详情 + * + * @param id 疾病ID + * @return + */ + R getDiseaseOne(Long id); + + /** + * 病种目录编辑 + * + * @param diseaseManageDto 病种目录列表 + * @return + */ + R editDisease(DiseaseManageUpDto diseaseManageDto); + + /** + * 病种目录停用 + * + * @param ids 病种目录ID列表 + * @return + */ + R editDiseaseStop(List ids); + + /** + * 病种目录启用 + * + * @param ids 病种目录ID列表 + * @return + */ + R editDiseaseStart(List ids); + + /** + * 新增外来病种目录 + * + * @param diseaseManageUpDto 病种目录 + * @return + */ + R addDisease(DiseaseManageUpDto diseaseManageUpDto); + +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DiseaseManageAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DiseaseManageAppServiceImpl.java new file mode 100644 index 00000000..36922f1f --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/appservice/impl/DiseaseManageAppServiceImpl.java @@ -0,0 +1,205 @@ +package com.openhis.web.datadictionary.appservice.impl; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import javax.servlet.http.HttpServletRequest; + +import com.core.common.utils.ChineseConvertUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.core.domain.R; +import com.core.common.utils.MessageUtils; +import com.core.common.utils.bean.BeanUtils; +import com.openhis.clinical.domain.ConditionDefinition; +import com.openhis.clinical.mapper.ConditionDefinitionMapper; +import com.openhis.clinical.service.IConditionDefinitionService; +import com.openhis.common.constant.PromptMsgConstant; +import com.openhis.common.enums.ConditionDefinitionSource; +import com.openhis.common.enums.PublicationStatus; +import com.openhis.common.enums.Whether; +import com.openhis.common.utils.EnumUtils; +import com.openhis.common.utils.HisPageUtils; +import com.openhis.common.utils.HisQueryUtils; +import com.openhis.web.datadictionary.appservice.IDiseaseManageAppService; +import com.openhis.web.datadictionary.dto.DiseaseManageDto; +import com.openhis.web.datadictionary.dto.DiseaseManageInitDto; +import com.openhis.web.datadictionary.dto.DiseaseManageSelParam; +import com.openhis.web.datadictionary.dto.DiseaseManageUpDto; + +/** + * 病种目录 实现 + * + * @author liuhr + * @date 2025/3/30 + */ +@Service +public class DiseaseManageAppServiceImpl implements IDiseaseManageAppService { + + @Autowired + private ConditionDefinitionMapper conditionDefinitionMapper; + @Autowired + private IConditionDefinitionService ConditionDefinitionService; + + /** + * 病种目录初始化 + * + * @return + */ + @Override + public R getDiseaseInit() { + + DiseaseManageInitDto diseaseManageInitDto = new DiseaseManageInitDto(); + // 获取疾病目录种类 + List diseaseCategoryList = Stream.of(ConditionDefinitionSource.values()) + .map(status -> new DiseaseManageInitDto.diseaseCategory(status.getValue(), status.getInfo())) + .collect(Collectors.toList()); + diseaseManageInitDto.setDiseaseCategoryList(diseaseCategoryList); + // 获取状态 + List statusEnumOptions = Stream.of(PublicationStatus.values()) + .map(status -> new DiseaseManageInitDto.statusEnumOption(status.getValue(), status.getInfo())) + .collect(Collectors.toList()); + diseaseManageInitDto.setStatusFlagOptions(statusEnumOptions); + + return R.ok(diseaseManageInitDto); + } + + /** + * 查询病种目录分页列表 + * + * @param diseaseManageSelParam 查询条件 + * @param searchKey 查询条件-模糊查询 + * @param pageNo 当前页码 + * @param pageSize 查询条数 + * @return + */ + public R getDiseaseList(DiseaseManageSelParam diseaseManageSelParam, String searchKey, Integer pageNo, + Integer pageSize, HttpServletRequest request) { + + // 构建查询条件 + QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(diseaseManageSelParam, + searchKey, new HashSet<>(Arrays.asList("condition_code", "name", "py_str", "wb_str")), request); + // 设置排序 + queryWrapper.orderByAsc("condition_code"); + // 分页查询 + Page diseasePage = + HisPageUtils.selectPage(conditionDefinitionMapper, queryWrapper, pageNo, pageSize, DiseaseManageDto.class); + + diseasePage.getRecords().forEach(e -> { + // 医保对码枚举类回显赋值 + e.setYbMatchFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getYbMatchFlag())); + // 状态 + e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum())); + }); + + // 返回【病种目录列表DTO】分页 + return R.ok(diseasePage); + } + + /** + * 根据id查询疾病详情 + * + * @param id 疾病ID + * @return + */ + public R getDiseaseOne(Long id) { + DiseaseManageDto diseaseManageDto = new DiseaseManageDto(); + // 根据ID查询【病种目录】 + ConditionDefinition conditionDefinition = ConditionDefinitionService.getById(id); + BeanUtils.copyProperties(conditionDefinition, diseaseManageDto); + return R.ok(diseaseManageDto); + } + + /** + * 病种目录编辑 + * + * @param diseaseManageDto 病种目录列表 + * @return + */ + public R editDisease(DiseaseManageUpDto diseaseManageDto) { + + ConditionDefinition conditionDefinition = new ConditionDefinition(); + BeanUtils.copyProperties(diseaseManageDto, conditionDefinition); + // 拼音码 + conditionDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(conditionDefinition.getName())); + // 五笔码 + conditionDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(conditionDefinition.getName())); + + // 更新病种信息 + return ConditionDefinitionService.updateById(conditionDefinition) + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); + } + + /** + * 病种目录停用 + * + * @param ids 病种目录ID列表 + * @return + */ + public R editDiseaseStop(List ids) { + List conditionDefinitionList = new CopyOnWriteArrayList<>(); + + // 取得更新值 + for (Long detail : ids) { + ConditionDefinition conditionDefinition = new ConditionDefinition(); + conditionDefinition.setId(detail); + conditionDefinition.setStatusEnum(PublicationStatus.RETIRED.getValue()); + conditionDefinitionList.add(conditionDefinition); + } + // 更新病种信息 + return ConditionDefinitionService.updateBatchById(conditionDefinitionList) + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); + } + + /** + * 病种目录启用 + * + * @param ids 病种目录ID列表 + * @return + */ + public R editDiseaseStart(List ids) { + List conditionDefinitionList = new CopyOnWriteArrayList<>(); + + // 取得更新值 + for (Long detail : ids) { + ConditionDefinition conditionDefinition = new ConditionDefinition(); + conditionDefinition.setId(detail); + conditionDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue()); + conditionDefinitionList.add(conditionDefinition); + } + // 更新病种信息 + return ConditionDefinitionService.updateBatchById(conditionDefinitionList) + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); + } + + /** + * 新增外来病种目录 + * + * @param diseaseManageUpDto 病种目录 + * @return + */ + public R addDisease(DiseaseManageUpDto diseaseManageUpDto) { + ConditionDefinition conditionDefinition = new ConditionDefinition(); + BeanUtils.copyProperties(diseaseManageUpDto, conditionDefinition); + // 新增外来病种目录 + conditionDefinition.setStatusEnum(PublicationStatus.DRAFT.getValue()); + // 拼音码 + conditionDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(conditionDefinition.getName())); + // 五笔码 + conditionDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(conditionDefinition.getName())); + return ConditionDefinitionService.addDisease(conditionDefinition) + ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) + : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null)); + } + +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java index 1e51a619..ce946140 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/datadictionary/controller/DiseaseManageController.java @@ -1,32 +1,18 @@ package com.openhis.web.datadictionary.controller; -import java.util.Arrays; -import java.util.HashSet; import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.stream.Collectors; -import java.util.stream.Stream; import javax.servlet.http.HttpServletRequest; -import com.openhis.common.enums.*; -import com.openhis.common.utils.EnumUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; -import com.core.common.utils.MessageUtils; import com.core.common.utils.bean.BeanUtils; import com.openhis.clinical.domain.ConditionDefinition; -import com.openhis.clinical.mapper.ConditionDefinitionMapper; -import com.openhis.clinical.service.IConditionDefinitionService; -import com.openhis.common.constant.PromptMsgConstant; -import com.openhis.common.utils.HisPageUtils; -import com.openhis.common.utils.HisQueryUtils; +import com.openhis.web.datadictionary.appservice.IDiseaseManageAppService; import com.openhis.web.datadictionary.dto.DiseaseManageDto; -import com.openhis.web.datadictionary.dto.DiseaseManageInitDto; import com.openhis.web.datadictionary.dto.DiseaseManageSelParam; import com.openhis.web.datadictionary.dto.DiseaseManageUpDto; @@ -44,8 +30,9 @@ import lombok.extern.slf4j.Slf4j; @Slf4j @AllArgsConstructor public class DiseaseManageController { - private final IConditionDefinitionService iConditionDefinitionService; - private final ConditionDefinitionMapper conditionDefinitionMapper; + + @Autowired + private IDiseaseManageAppService diseaseManageAppService; /** * 病种目录初始化 @@ -55,19 +42,7 @@ public class DiseaseManageController { @GetMapping("/information-init") public R getDiseaseInit() { - DiseaseManageInitDto diseaseManageInitDto = new DiseaseManageInitDto(); - // 获取疾病目录种类 - List diseaseCategoryList = Stream.of(ConditionDefinitionSource.values()) - .map(status -> new DiseaseManageInitDto.diseaseCategory(status.getValue(), status.getInfo())) - .collect(Collectors.toList()); - diseaseManageInitDto.setDiseaseCategoryList(diseaseCategoryList); - // 获取状态 - List statusEnumOptions = Stream.of(PublicationStatus.values()) - .map(status -> new DiseaseManageInitDto.statusEnumOption(status.getValue(), status.getInfo())) - .collect(Collectors.toList()); - diseaseManageInitDto.setStatusFlagOptions(statusEnumOptions); - - return R.ok(diseaseManageInitDto); + return diseaseManageAppService.getDiseaseInit(); } /** @@ -85,24 +60,8 @@ public class DiseaseManageController { @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { - // 构建查询条件 - QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(diseaseManageSelParam, - searchKey, new HashSet<>(Arrays.asList("condition_code", "name", "py_str", "wb_str")), request); - // 设置排序 - queryWrapper.orderByAsc("condition_code"); - // 分页查询 - Page diseasePage = - HisPageUtils.selectPage(conditionDefinitionMapper, queryWrapper, pageNo, pageSize, DiseaseManageDto.class); - - diseasePage.getRecords().forEach(e -> { - // 医保对码枚举类回显赋值 - e.setYbMatchFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getYbMatchFlag())); - //状态 - e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum())); - }); - // 返回【病种目录列表DTO】分页 - return R.ok(diseasePage); + return diseaseManageAppService.getDiseaseList(diseaseManageSelParam, searchKey, pageNo, pageSize, request); } /** @@ -113,11 +72,9 @@ public class DiseaseManageController { */ @GetMapping("/information-one") public R getDiseaseOne(@RequestParam Long id) { - DiseaseManageDto diseaseManageDto = new DiseaseManageDto(); + // 根据ID查询【病种目录】 - ConditionDefinition conditionDefinition = iConditionDefinitionService.getById(id); - BeanUtils.copyProperties(conditionDefinition, diseaseManageDto); - return R.ok(diseaseManageDto); + return diseaseManageAppService.getDiseaseOne(id); } /** @@ -133,9 +90,7 @@ public class DiseaseManageController { BeanUtils.copyProperties(diseaseManageDto, conditionDefinition); // 更新病种信息 - return iConditionDefinitionService.updateById(conditionDefinition) - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); + return diseaseManageAppService.editDisease(diseaseManageDto); } /** @@ -146,19 +101,8 @@ public class DiseaseManageController { */ @PutMapping("/information-stop") public R editDiseaseStop(@RequestBody List ids) { - List conditionDefinitionList = new CopyOnWriteArrayList<>(); - - // 取得更新值 - for (Long detail : ids) { - ConditionDefinition conditionDefinition = new ConditionDefinition(); - conditionDefinition.setId(detail); - conditionDefinition.setStatusEnum(PublicationStatus.RETIRED.getValue()); - conditionDefinitionList.add(conditionDefinition); - } // 更新病种信息 - return iConditionDefinitionService.updateBatchById(conditionDefinitionList) - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); + return diseaseManageAppService.editDiseaseStop(ids); } /** @@ -169,19 +113,9 @@ public class DiseaseManageController { */ @PutMapping("/information-start") public R editDiseaseStart(@RequestBody List ids) { - List conditionDefinitionList = new CopyOnWriteArrayList<>(); - // 取得更新值 - for (Long detail : ids) { - ConditionDefinition conditionDefinition = new ConditionDefinition(); - conditionDefinition.setId(detail); - conditionDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue()); - conditionDefinitionList.add(conditionDefinition); - } // 更新病种信息 - return iConditionDefinitionService.updateBatchById(conditionDefinitionList) - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); + return diseaseManageAppService.editDiseaseStart(ids); } /** @@ -192,13 +126,8 @@ public class DiseaseManageController { */ @PostMapping("/information") public R addDisease(@Validated @RequestBody DiseaseManageUpDto diseaseManageUpDto) { - ConditionDefinition conditionDefinition = new ConditionDefinition(); - BeanUtils.copyProperties(diseaseManageUpDto, conditionDefinition); - // 新增外来病种目录 - conditionDefinition.setStatusEnum(PublicationStatus.DRAFT.getValue()); - return iConditionDefinitionService.addDisease(conditionDefinition) - ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) - : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null)); + + return diseaseManageAppService.addDisease(diseaseManageUpDto); } /** From 6294e1d2903b94c00757aacb426c0d9730587a59 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 15:36:38 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E8=BE=93=E6=B6=B2=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutpatientInfusionRecordServiceImpl.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java index 184d4691..daf8da50 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java @@ -354,16 +354,17 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.COMPLETED.getValue()); //筛选当前ID的患者历史执行记录 queryWrapper.eq(CommonConstants.FieldName.PatientId,patientId); + //执行次数大于0 + queryWrapper.gt("done_num", 0); - List infusionPerformList = editRecords(queryWrapper); - List medicationIds = checkServiceRequestIsCompleted(infusionPerformList); - // 未产生执行历史 - if (medicationIds == null || medicationIds.isEmpty()) { - return infusionPerformList; - } - // 筛选一下执行的药品 - queryWrapper.in(CommonConstants.FieldName.MedicationId, medicationIds); - +// List infusionPerformList = editRecords(queryWrapper); +// List medicationIds = checkServiceRequestIsCompleted(infusionPerformList); +// // 未产生执行历史 +// if (medicationIds == null || medicationIds.isEmpty()) { +// return infusionPerformList; +// } +// // 筛选一下执行的药品 +// queryWrapper.in(CommonConstants.FieldName.MedicationId, medicationIds); return editRecords(queryWrapper); // 门诊输液待执行记录查询 From 440b4b13ca895b28bf7787f467ba4bb10ab18180 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 16:14:00 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E9=97=A8=E8=AF=8A=E8=BE=93=E6=B6=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutpatientInfusionRecordServiceImpl.java | 2 ++ .../OutpatientInfusionRecordController.java | 29 ++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java index daf8da50..0ee18760 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java @@ -374,6 +374,8 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR queryWrapper.isNull(CommonConstants.FieldName.BasedOnId); // 状态是进行中 queryWrapper.eq(CommonConstants.FieldName.RequestStatus, EventStatus.IN_PROGRESS.getValue()); + //筛选当前ID的患者历史执行记录 + queryWrapper.eq(CommonConstants.FieldName.PatientId,patientId); return editRecords(queryWrapper); } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java index 99c45ea5..f0b8e580 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java @@ -50,18 +50,18 @@ public class OutpatientInfusionRecordController { .ok(outpatientInfusionRecordService.getOutpatientInfusionPatientList(searchKey, pageNo, pageSize, request)); } - /** - * 点击患者,查询该患者的输液记录 - * - * @param outpatientInfusionPatientDto 患者输液信息 - * @return 当前患者门诊输液待执行列表 - */ - @GetMapping(value = "/patient-infusion-record") - public R getPatientInfusionRecord(OutpatientInfusionPatientDto outpatientInfusionPatientDto, - HttpServletRequest request) { - - return R.ok(outpatientInfusionRecordService.getPatientInfusionRecord(outpatientInfusionPatientDto, request)); - } +// /** +// * 点击患者,查询该患者的输液记录 +// * +// * @param outpatientInfusionPatientDto 患者输液信息 +// * @return 当前患者门诊输液待执行列表 +// */ +// @GetMapping(value = "/patient-infusion-record") +// public R getPatientInfusionRecord(OutpatientInfusionPatientDto outpatientInfusionPatientDto, +// HttpServletRequest request) { +// +// return R.ok(outpatientInfusionRecordService.getPatientInfusionRecord(outpatientInfusionPatientDto, request)); +// } /** * 批量执行患者门诊输液 @@ -98,12 +98,13 @@ public class OutpatientInfusionRecordController { /** * 门诊输液待执行记录查询 * + * @param patientId 患者ID * @return 门诊输液待执行记录列表 */ @GetMapping(value = "/infusion-wait-perform-record") - public R getPatientInfusionRecords(HttpServletRequest request) { + public R getPatientInfusionRecords(@RequestParam Long patientId,HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(null,request, false)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId,request, false)); } /** From 820596e5a166ff60644bbf4a34971ef841907698 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 16:45:00 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E8=BE=93=E6=B6=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clinicmanagement/infusionrecord/index.vue | 106 +++--------------- 1 file changed, 16 insertions(+), 90 deletions(-) diff --git a/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue b/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue index b6ef881c..8184ee5e 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue @@ -64,25 +64,7 @@ :inline="true" v-show="showSearch" > - - - - 搜索 - 重置 确认执行 @@ -237,7 +219,6 @@ import { updateInfusionRecord, listInfusionRecord, editPatientInfusionTime, - listPatientInfusionRecord, listPatientInfusionPerformRecord, } from "./component/api"; @@ -274,21 +255,6 @@ const { queryParams } = toRefs(data); /** 查询门诊输液列表 */ function getList() { - listInfusionRecord(queryParams.value).then((response) => { - console.log("Full response1:", response); - infusionList.value = response.data; - // 为每个 groupId 分配固定颜色 - response.data.forEach((item) => { - const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引 - item.color = groupColors[colorIndex]; - }); - // 更新表格行的样式 - updateTableRowStyles(); - // 统计每个 groupId 的行数 - const groupCounts = countGroupRows(infusionList.value); - // 设置每行的标记 - markers.value = getRowMarkers(groupCounts, infusionList.value); - }); listPatients().then((response) => { patientList.value = response.data.records; }); @@ -317,54 +283,13 @@ function handleQuery() { patientList.value = response.data.records; }); } -/** 右边搜索按钮操作 */ -function handleQueryRight() { - const createTimeSTime = dateRangeRight.value[0]; - const createTimeETime = dateRangeRight.value[1]; - timeRightStart.value = createTimeSTime; - timeRightEnd.value = createTimeETime; - listInfusionRecord(createTimeSTime, createTimeETime).then((response) => { - infusionList.value = response.data; - }); - listPatientInfusionPerformRecord(createTimeSTime, createTimeETime).then((response) => { - historyRecordsList.value = response.data; - } - ); -} /** 重置按钮操作 */ function resetQuery() { dateRange.value = []; proxy.resetForm("queryRef"); getList(); - listPatientInfusionPerformRecord().then((response) => { - historyRecordsList.value = response.data; - }); } -/** 右边重置按钮操作 */ -function resetQueryRight() { - if (historyRecordsList.value.length > 0) { - dateRangeRight.value = []; - listInfusionRecord().then((response) => { - infusionList.value = response.data; - }); - listPatientInfusionPerformRecord().then((response) => { - historyRecordsList.value = response.data; - }); - } else { - // 清空选中状态 - selectedItems.value.clear(); - selectedGroupIds.value.clear(); - dateRangeRight.value = []; - // 取消表格所有行的选中状态 - infusionList.value.forEach((row) => { - tableRef.value.toggleRowSelection(row, false); - }); - listPatientInfusionRecord(currentRow.value).then((response) => { - infusionList.value = response.data; - }); - } -} function getRowMarkers(groupCounts, data) { const markers = new Array(data.length).fill(""); @@ -463,19 +388,11 @@ function handleSelectionChange(selection) { }); } function clearSelections() { - dateRangeRight.value = []; - if (!currentRow.value) { - const createTimeSTime = timeRightStart.value || null; - const createTimeETime = timeRightEnd.value || null; - listInfusionRecord(createTimeSTime, createTimeETime).then((response) => { + currentRow.value.patientId= Number(currentRow.value.patientId) + listInfusionRecord(currentRow.value.patientId).then((response) => { infusionList.value = response.data; }); - } else { - listPatientInfusionRecord(currentRow.value).then((response) => { - infusionList.value = response.data; - }); - } - listPatientInfusionPerformRecord().then((response) => { + listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => { historyRecordsList.value = response.data; }); } @@ -494,15 +411,24 @@ function handleUpdateTime(row) { function handleCurrentChange(row) { currentRow.value = row; // 更新当前选中行的数据 - console.log("当前选中行的数据:", currentRow.value); - listPatientInfusionRecord(currentRow.value).then((response) => { + currentRow.value.patientId= Number(currentRow.value.patientId) + console.log("当前选中行的数据:", currentRow.value.patientId,typeof currentRow.value.patientId); + listInfusionRecord(currentRow.value.patientId).then((response) => { + console.log("Full response1:", response); infusionList.value = response.data; - // 统计每个 groupId 的行数 + // 为每个 groupId 分配固定颜色 + response.data.forEach((item) => { + const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引 + item.color = groupColors[colorIndex]; + }); + // 更新表格行的样式 + updateTableRowStyles(); + // 统计每个 groupId 的行数 const groupCounts = countGroupRows(infusionList.value); // 设置每行的标记 markers.value = getRowMarkers(groupCounts, infusionList.value); }); - listPatientInfusionPerformRecord(currentRow.value).then((response) => { + listPatientInfusionPerformRecord(Number(currentRow.value.patientId)).then((response) => { historyRecordsList.value = response.data; }); } From 6e90aef657150944651e4c9c3214d4f5d772093f Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Sun, 30 Mar 2025 17:01:08 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E8=BE=93=E6=B6=B2=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutpatientInfusionRecordController.java | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java index f0b8e580..95543e1a 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/controller/OutpatientInfusionRecordController.java @@ -12,7 +12,6 @@ import com.core.common.core.domain.R; import com.core.common.utils.MessageUtils; import com.openhis.common.constant.PromptMsgConstant; import com.openhis.web.outpatientmanage.appservice.IOutpatientInfusionRecordService; -import com.openhis.web.outpatientmanage.dto.OutpatientInfusionPatientDto; import com.openhis.web.outpatientmanage.dto.OutpatientInfusionRecordDto; import lombok.AllArgsConstructor; @@ -50,18 +49,18 @@ public class OutpatientInfusionRecordController { .ok(outpatientInfusionRecordService.getOutpatientInfusionPatientList(searchKey, pageNo, pageSize, request)); } -// /** -// * 点击患者,查询该患者的输液记录 -// * -// * @param outpatientInfusionPatientDto 患者输液信息 -// * @return 当前患者门诊输液待执行列表 -// */ -// @GetMapping(value = "/patient-infusion-record") -// public R getPatientInfusionRecord(OutpatientInfusionPatientDto outpatientInfusionPatientDto, -// HttpServletRequest request) { -// -// return R.ok(outpatientInfusionRecordService.getPatientInfusionRecord(outpatientInfusionPatientDto, request)); -// } + // /** + // * 点击患者,查询该患者的输液记录 + // * + // * @param outpatientInfusionPatientDto 患者输液信息 + // * @return 当前患者门诊输液待执行列表 + // */ + // @GetMapping(value = "/patient-infusion-record") + // public R getPatientInfusionRecord(OutpatientInfusionPatientDto outpatientInfusionPatientDto, + // HttpServletRequest request) { + // + // return R.ok(outpatientInfusionRecordService.getPatientInfusionRecord(outpatientInfusionPatientDto, request)); + // } /** * 批量执行患者门诊输液 @@ -102,9 +101,10 @@ public class OutpatientInfusionRecordController { * @return 门诊输液待执行记录列表 */ @GetMapping(value = "/infusion-wait-perform-record") - public R getPatientInfusionRecords(@RequestParam Long patientId,HttpServletRequest request) { + public R getPatientInfusionRecords(@RequestParam(value = "patientId", required = false) Long patientId, + HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId,request, false)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId, request, false)); } /** @@ -114,9 +114,10 @@ public class OutpatientInfusionRecordController { * @return 门诊输液执行历史记录列表 */ @GetMapping(value = "/infusion-perform-record") - public R getPatientInfusionPerformRecord(@RequestParam Long patientId,HttpServletRequest request) { + public R getPatientInfusionPerformRecord(@RequestParam(value = "patientId", required = false) Long patientId, + HttpServletRequest request) { - return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId,request, true)); + return R.ok(outpatientInfusionRecordService.getPatientInfusionPerformRecord(patientId, request, true)); } } From f9fd55c4f2f02106adff0c264d47cb0a2099c5b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E8=8F=B2?= <12704587+yvwen@user.noreply.gitee.com> Date: Sun, 30 Mar 2025 18:24:39 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E8=A5=BF=E8=8D=AF=E5=8F=91=E8=8D=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clinicmanagement/infusionrecord/index.vue | 106 ++++++++++++--- .../westernmedicine/components/api.js | 14 +- .../westernmedicine/index.vue | 126 +++++++++++++----- 3 files changed, 190 insertions(+), 56 deletions(-) diff --git a/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue b/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue index 8184ee5e..b6ef881c 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue @@ -64,7 +64,25 @@ :inline="true" v-show="showSearch" > + + + + 搜索 + 重置 确认执行 @@ -219,6 +237,7 @@ import { updateInfusionRecord, listInfusionRecord, editPatientInfusionTime, + listPatientInfusionRecord, listPatientInfusionPerformRecord, } from "./component/api"; @@ -255,6 +274,21 @@ const { queryParams } = toRefs(data); /** 查询门诊输液列表 */ function getList() { + listInfusionRecord(queryParams.value).then((response) => { + console.log("Full response1:", response); + infusionList.value = response.data; + // 为每个 groupId 分配固定颜色 + response.data.forEach((item) => { + const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引 + item.color = groupColors[colorIndex]; + }); + // 更新表格行的样式 + updateTableRowStyles(); + // 统计每个 groupId 的行数 + const groupCounts = countGroupRows(infusionList.value); + // 设置每行的标记 + markers.value = getRowMarkers(groupCounts, infusionList.value); + }); listPatients().then((response) => { patientList.value = response.data.records; }); @@ -283,13 +317,54 @@ function handleQuery() { patientList.value = response.data.records; }); } +/** 右边搜索按钮操作 */ +function handleQueryRight() { + const createTimeSTime = dateRangeRight.value[0]; + const createTimeETime = dateRangeRight.value[1]; + timeRightStart.value = createTimeSTime; + timeRightEnd.value = createTimeETime; + listInfusionRecord(createTimeSTime, createTimeETime).then((response) => { + infusionList.value = response.data; + }); + listPatientInfusionPerformRecord(createTimeSTime, createTimeETime).then((response) => { + historyRecordsList.value = response.data; + } + ); +} /** 重置按钮操作 */ function resetQuery() { dateRange.value = []; proxy.resetForm("queryRef"); getList(); + listPatientInfusionPerformRecord().then((response) => { + historyRecordsList.value = response.data; + }); } +/** 右边重置按钮操作 */ +function resetQueryRight() { + if (historyRecordsList.value.length > 0) { + dateRangeRight.value = []; + listInfusionRecord().then((response) => { + infusionList.value = response.data; + }); + listPatientInfusionPerformRecord().then((response) => { + historyRecordsList.value = response.data; + }); + } else { + // 清空选中状态 + selectedItems.value.clear(); + selectedGroupIds.value.clear(); + dateRangeRight.value = []; + // 取消表格所有行的选中状态 + infusionList.value.forEach((row) => { + tableRef.value.toggleRowSelection(row, false); + }); + listPatientInfusionRecord(currentRow.value).then((response) => { + infusionList.value = response.data; + }); + } +} function getRowMarkers(groupCounts, data) { const markers = new Array(data.length).fill(""); @@ -388,11 +463,19 @@ function handleSelectionChange(selection) { }); } function clearSelections() { - currentRow.value.patientId= Number(currentRow.value.patientId) - listInfusionRecord(currentRow.value.patientId).then((response) => { + dateRangeRight.value = []; + if (!currentRow.value) { + const createTimeSTime = timeRightStart.value || null; + const createTimeETime = timeRightEnd.value || null; + listInfusionRecord(createTimeSTime, createTimeETime).then((response) => { infusionList.value = response.data; }); - listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => { + } else { + listPatientInfusionRecord(currentRow.value).then((response) => { + infusionList.value = response.data; + }); + } + listPatientInfusionPerformRecord().then((response) => { historyRecordsList.value = response.data; }); } @@ -411,24 +494,15 @@ function handleUpdateTime(row) { function handleCurrentChange(row) { currentRow.value = row; // 更新当前选中行的数据 - currentRow.value.patientId= Number(currentRow.value.patientId) - console.log("当前选中行的数据:", currentRow.value.patientId,typeof currentRow.value.patientId); - listInfusionRecord(currentRow.value.patientId).then((response) => { - console.log("Full response1:", response); + console.log("当前选中行的数据:", currentRow.value); + listPatientInfusionRecord(currentRow.value).then((response) => { infusionList.value = response.data; - // 为每个 groupId 分配固定颜色 - response.data.forEach((item) => { - const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引 - item.color = groupColors[colorIndex]; - }); - // 更新表格行的样式 - updateTableRowStyles(); - // 统计每个 groupId 的行数 + // 统计每个 groupId 的行数 const groupCounts = countGroupRows(infusionList.value); // 设置每行的标记 markers.value = getRowMarkers(groupCounts, infusionList.value); }); - listPatientInfusionPerformRecord(Number(currentRow.value.patientId)).then((response) => { + listPatientInfusionPerformRecord(currentRow.value).then((response) => { historyRecordsList.value = response.data; }); } diff --git a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js index 605267cf..8a3f4367 100644 --- a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js +++ b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js @@ -24,20 +24,24 @@ export function listWesternmedicine(query) { }) } - -export function updateMedicion(data) { +export function updateMedicion(prescriptionNo) { return request({ url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense', method: 'put', - data: data + params: { + prescriptionNo: prescriptionNo + } }) } - export function backMedicion(data) { + export function backMedicion(prescriptionNo,notPerformedReasonEnum) { return request({ url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel', method: 'put', - data: data + params: { + prescriptionNo: prescriptionNo, + notPerformedReasonEnum:notPerformedReasonEnum + } }) } \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue index de0b83a3..3950cb57 100644 --- a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue +++ b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue @@ -38,10 +38,8 @@

患者基本信息

- 发药 - 作废 - 打印 + +
@@ -49,25 +47,31 @@ 性别:{{ personInfo.genderEnum_enumText }} 年龄:{{ personInfo.age }} 合同类型:{{ personInfo.categoryEnum_enumText }} - 证件号:{{ personInfo.idCard }}
- 就诊科室:{{ personInfo.organizationName }} + 就诊科室:{{ personInfo.organizationName }} 就诊日期:{{ personInfo.encounterDate }} - 门诊诊断:{{ personInfo.patientName }} + 证件号:{{ personInfo.idCard }} + +
- 总金额:{{ totalPrice ? totalPrice.toFixed(2) : '0.00' }}元 + 总金额:{{ personInfo.totalPrice ? personInfo.totalPrice.toFixed(2) : '0.00' }}元
- + + + - + From c65d1dcdc78bb3c4a278abe0d7295e864b0e5f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E8=8F=B2?= <12704587+yvwen@user.noreply.gitee.com> Date: Sun, 30 Mar 2025 18:25:29 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E8=A5=BF=E8=8D=AF=E5=8F=91=E8=8D=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...WesternMedicineDispenseAppServiceImpl.java | 22 ++++++++++++++----- .../WesternMedicineDispenseController.java | 14 +++++------- .../web/pharmacymanage/dto/PageInitDto.java | 3 +++ .../dto/PrescriptionMedicineInfoDto.java | 7 ++++-- .../dto/PrescriptionPatientInfoDto.java | 2 +- .../WesternMedicineDispenseMapper.xml | 17 +++++++++----- 6 files changed, 42 insertions(+), 23 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java index 1652f1aa..bfcda523 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/appservice/impl/IWesternMedicineDispenseAppServiceImpl.java @@ -95,11 +95,15 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD // 查询条件设定 String condition = encounterInfoSearchParam.getCondition(); + encounterInfoSearchParam.setCondition(null); if (StringUtils.isNotEmpty(condition)){ Pattern pattern = Pattern.compile(".*\\d.*"); - Matcher matcher = pattern.matcher(encounterInfoSearchParam.getCondition()); - encounterInfoSearchParam.setIdCard(matcher.find() ? condition:""); - encounterInfoSearchParam.setPatientName(!matcher.find() ? condition:""); + Matcher matcher = pattern.matcher(condition); + if (matcher.find()){ + encounterInfoSearchParam.setIdCard(condition); + } else{ + encounterInfoSearchParam.setPatientName(condition); + } } // 构建查询条件 @@ -110,6 +114,12 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD Page encounterInfoPageDto = westernMedicineDispenseMapper.selectEncounterInfoListPage( new Page<>(pageNo, pageSize), queryWrapper); + // 个别项目设定 + encounterInfoPageDto.getRecords().forEach(prescriptionPatientInfoDto -> { + // 性别 + prescriptionPatientInfoDto.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, + prescriptionPatientInfoDto.getGenderEnum())); + }); return R.ok(encounterInfoPageDto); } @@ -130,7 +140,7 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD prescriptionPatientInfoDto.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, prescriptionPatientInfoDto.getGenderEnum())); // 合同类型 - if (StringUtils.isNull(prescriptionPatientInfoDto.getCategoryEnum())){ + if (StringUtils.isNotNull(prescriptionPatientInfoDto.getCategoryEnum())){ prescriptionPatientInfoDto.setCategoryEnum_enumText(EnumUtils.getInfoByValue(FinCategory.class, prescriptionPatientInfoDto.getCategoryEnum())); } @@ -139,9 +149,9 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD selectPrescriptionMedicineInfoList(encounterId); // 计算合计金额 if(!prescriptionMedicineInfoList.isEmpty()) { - BigDecimal totalPrice = new BigDecimal(0); + double totalPrice = 0d; for (PrescriptionMedicineInfoDto item : prescriptionMedicineInfoList) { - totalPrice.add(item.getTotalPrice()); + totalPrice += item.getTotalPrice().doubleValue(); } prescriptionPatientInfoDto.setTotalPrice(totalPrice); } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/controller/WesternMedicineDispenseController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/controller/WesternMedicineDispenseController.java index db9063ac..d49aa2e8 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/controller/WesternMedicineDispenseController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/controller/WesternMedicineDispenseController.java @@ -3,10 +3,7 @@ package com.openhis.web.pharmacymanage.controller; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import com.core.common.core.domain.R; import com.openhis.web.pharmacymanage.appservice.IWesternMedicineDispenseAppService; @@ -74,7 +71,7 @@ public class WesternMedicineDispenseController { * * @param prescriptionNo 处方号 */ - @GetMapping("/medicine-dispense") + @PutMapping("/medicine-dispense") public R medicineDispense(@RequestParam(value = "prescriptionNo") String prescriptionNo) { return iWesternMedicineDispenseService.medicineDispense(prescriptionNo); } @@ -85,9 +82,10 @@ public class WesternMedicineDispenseController { * @param prescriptionNo 处方号 * @param notPerformedReasonEnum 未发药原因 */ - @GetMapping("/medicine-cancel") + @PutMapping("/medicine-cancel") public R medicineCancel(@RequestParam(value = "prescriptionNo") String prescriptionNo, - @RequestParam(value = "prescriptionNo") Integer notPerformedReasonEnum) { - return iWesternMedicineDispenseService.medicineCancel(prescriptionNo, notPerformedReasonEnum); + @RequestParam(value = "notPerformedReasonEnum") Integer notPerformedReasonEnum) { + //return iWesternMedicineDispenseService.medicineCancel(prescriptionNo, notPerformedReasonEnum); + return R.ok(); } } \ No newline at end of file diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PageInitDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PageInitDto.java index d5dd601a..5d47ceb3 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PageInitDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PageInitDto.java @@ -5,6 +5,8 @@ package com.openhis.web.pharmacymanage.dto; import java.util.List; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import lombok.Data; import lombok.experimental.Accessors; @@ -26,6 +28,7 @@ public class PageInitDto { @Data public static class DepartmentOption { + @JsonSerialize(using = ToStringSerializer.class) private Long value; private String label; diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java index a7d59ad3..c0d03d42 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionMedicineInfoDto.java @@ -24,11 +24,14 @@ public class PrescriptionMedicineInfoDto implements Serializable { /** 科室 */ private String departmentName; + /** 开单医生 */ + private String doctorName; + /** 项目类型 */ private String itemType; - /** 开单医生 */ - private String doctorName; + /** 诊断名称 */ + private String conditionName; /** 处方号 */ private String prescriptionNo; diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java index a6c83812..f21bfa4a 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/pharmacymanage/dto/PrescriptionPatientInfoDto.java @@ -49,5 +49,5 @@ public class PrescriptionPatientInfoDto implements Serializable { private String encounterDate; /** 总金额 */ - private BigDecimal totalPrice; + private double totalPrice; } \ No newline at end of file diff --git a/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml index 001b61c2..e3539018 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/pharmacymanage/WesternMedicineDispenseMapper.xml @@ -75,8 +75,10 @@