From 5453f84b0b95e84085fa56ed616629d0a4715ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E8=8F=B2?= <12704587+yvwen@user.noreply.gitee.com> Date: Fri, 7 Mar 2025 18:00:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=97=A8=E8=AF=8A=E7=9A=AE=E8=AF=95?= =?UTF-8?q?=EF=BC=8C=E7=97=85=E4=BA=BA=E4=BF=A1=E6=81=AF=EF=BC=8C=E7=97=85?= =?UTF-8?q?=E4=BA=BA=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skinRecord/component/api.js | 9 + .../clinicManagement/skinRecord/index.vue | 284 ++++++++++++++++++ .../outpatienRecords/index.vue | 1 + .../patientManagement/index.vue | 19 +- 4 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 openhis-ui-vue3/src/views/clinicManagement/skinRecord/component/api.js create mode 100644 openhis-ui-vue3/src/views/clinicManagement/skinRecord/index.vue diff --git a/openhis-ui-vue3/src/views/clinicManagement/skinRecord/component/api.js b/openhis-ui-vue3/src/views/clinicManagement/skinRecord/component/api.js new file mode 100644 index 00000000..d5a76fca --- /dev/null +++ b/openhis-ui-vue3/src/views/clinicManagement/skinRecord/component/api.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function listSkinRecord(query) { + return request({ + url: '/patientmanage/records/outpatient-record-page', + method: 'get', + params: query + }) + } \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/clinicManagement/skinRecord/index.vue b/openhis-ui-vue3/src/views/clinicManagement/skinRecord/index.vue new file mode 100644 index 00000000..9dee2074 --- /dev/null +++ b/openhis-ui-vue3/src/views/clinicManagement/skinRecord/index.vue @@ -0,0 +1,284 @@ + + + \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue b/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue index 77818af0..f9f7f5cc 100644 --- a/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue +++ b/openhis-ui-vue3/src/views/patientManagement/outpatienRecords/index.vue @@ -31,6 +31,7 @@ + diff --git a/openhis-ui-vue3/src/views/patientManagement/patientManagement/index.vue b/openhis-ui-vue3/src/views/patientManagement/patientManagement/index.vue index e389b0a0..eb8544f8 100644 --- a/openhis-ui-vue3/src/views/patientManagement/patientManagement/index.vue +++ b/openhis-ui-vue3/src/views/patientManagement/patientManagement/index.vue @@ -413,6 +413,20 @@ function cancel() { open.value = false; reset(); } +// 获取完整地址字符串 +function getAddress(form) { + const addressParts = [ + form.value.addressProvince, + form.value.addressCity, + form.value.addressDistrict, + form.value.addressStreet, + form.value.address, + ]; + // 使用 reduce 方法拼接地址 + return addressParts.reduce((acc, part) => { + return part ? acc + part : acc; + }, ""); +} /** 提交按钮 */ function submitForm() { proxy.$refs["patientRef"].validate(valid => { @@ -420,7 +434,7 @@ function submitForm() { if (form.value.busNo != undefined) { const newAddress = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address if (addressCom.value !== newAddress) { - form.value.address = newAddress; + form.value.address = getAddress(form); } updatePatient(form.value).then(response => { proxy.$modal.msgSuccess("修改成功"); @@ -428,7 +442,8 @@ function submitForm() { getList(); }); } else { - form.value.address = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address + form.value.address = getAddress(form); + // form.value.address = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address addPatient(form.value).then(response => { proxy.$modal.msgSuccess("新增成功"); open.value = false; From dcfd2792c1e4ee2d1369c1b7a8e3e80c0f996382 Mon Sep 17 00:00:00 2001 From: "Wang.Huan" Date: Sat, 8 Mar 2025 15:18:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=BD=93=E6=97=A5?= =?UTF-8?q?=E5=B0=B1=E8=AF=8A=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IOutpatientRegistrationAppService.java | 10 ++ ...IOutpatientRegistrationAppServiceImpl.java | 30 +++++- .../OutpatientRegistrationController.java | 19 +++- .../dto/CurrentDayEncounterDto.java | 92 +++++++++++++++++++ .../OutpatientRegistrationAppMapper.java | 11 +++ .../OutpatientRegistrationAppMapper.xml | 45 +++++++++ 6 files changed, 203 insertions(+), 4 deletions(-) create mode 100644 openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/dto/CurrentDayEncounterDto.java diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/IOutpatientRegistrationAppService.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/IOutpatientRegistrationAppService.java index 4531d1ae..5b27cd47 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/IOutpatientRegistrationAppService.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/IOutpatientRegistrationAppService.java @@ -73,4 +73,14 @@ public interface IOutpatientRegistrationAppService { */ R saveRegister(OutpatientRegistrationAddParam outpatientRegistrationAddParam); + /** + * 查询当日就诊数据 + * + * @param searchKey 模糊查询关键字 + * @param pageNo 当前页 + * @param pageSize 每页多少条 + * @return 当日就诊数据 + */ + IPage getCurrentDayEncounter(String searchKey, Integer pageNo, Integer pageSize); + } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/impl/IOutpatientRegistrationAppServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/impl/IOutpatientRegistrationAppServiceImpl.java index a87546f2..25e27e38 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/impl/IOutpatientRegistrationAppServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/appservice/impl/IOutpatientRegistrationAppServiceImpl.java @@ -7,8 +7,6 @@ import java.util.stream.Collectors; import javax.annotation.Resource; -import com.openhis.common.enums.*; -import com.openhis.common.enums.PractitionerRole; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -26,6 +24,8 @@ import com.openhis.clinical.domain.ConditionDefinition; import com.openhis.clinical.mapper.ConditionDefinitionMapper; import com.openhis.common.constant.CommonConstants; import com.openhis.common.constant.PromptMsgConstant; +import com.openhis.common.enums.*; +import com.openhis.common.enums.PractitionerRole; import com.openhis.common.utils.EnumUtils; import com.openhis.common.utils.HisPageUtils; import com.openhis.common.utils.HisQueryUtils; @@ -268,4 +268,30 @@ public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistr return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"挂号"})); } + /** + * 查询当日就诊数据 + * + * @param searchKey 模糊查询关键字 + * @param pageNo 当前页 + * @param pageSize 每页多少条 + * @return 当日就诊数据 + */ + @Override + public IPage getCurrentDayEncounter(String searchKey, Integer pageNo, Integer pageSize) { + // 构建查询条件 + QueryWrapper queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey, + new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")), + null); + + IPage currentDayEncounter = + outpatientRegistrationAppMapper.getCurrentDayEncounter(new Page<>(pageNo, pageSize), queryWrapper); + currentDayEncounter.getRecords().forEach(e -> { + // 性别 + e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum())); + // 就诊状态 + e.setStatusEnum_enumText(EnumUtils.getInfoByValue(EncounterStatus.class, e.getStatusEnum())); + }); + return currentDayEncounter; + } + } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/controller/OutpatientRegistrationController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/controller/OutpatientRegistrationController.java index 9465c5f1..9340f01b 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/controller/OutpatientRegistrationController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/controller/OutpatientRegistrationController.java @@ -7,6 +7,8 @@ import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; +import javax.validation.Valid; + import org.springframework.web.bind.annotation.*; import com.core.common.core.domain.R; @@ -20,8 +22,6 @@ import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import javax.validation.Valid; - /** * 门诊挂号 controller */ @@ -134,4 +134,19 @@ public class OutpatientRegistrationController { return iOutpatientRegistrationAppService.saveRegister(outpatientRegistrationAddParam); } + /** + * 查询当日就诊数据 + * + * @param searchKey 模糊查询关键字 + * @param pageNo 当前页 + * @param pageSize 每页多少条 + * @return 当日就诊数据 + */ + @GetMapping(value = "/current-day-encounter") + public R getCurrentDayEncounter(@RequestParam(value = "searchKey", defaultValue = "") String searchKey, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { + return R.ok(iOutpatientRegistrationAppService.getCurrentDayEncounter(searchKey, pageNo, pageSize)); + } + } diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/dto/CurrentDayEncounterDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/dto/CurrentDayEncounterDto.java new file mode 100644 index 00000000..995a3a65 --- /dev/null +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/dto/CurrentDayEncounterDto.java @@ -0,0 +1,92 @@ +package com.openhis.web.outpatientservice.dto; + +import java.util.Date; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * 当天就诊信息 + */ +@Data +@Accessors(chain = true) +public class CurrentDayEncounterDto { + + /** 租户ID */ + private Integer tenantId; + + /** + * 就诊ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long encounterId; + + /** + * 科室ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long organizationId; + + /** + * 科室名称 + */ + private String organizationName; + + /** + * 挂号类型 + */ + private String healthcareName; + + /** + * 专家账号id + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long practitionerUserId; + + /** + * 专家 + */ + private String practitionerName; + + /** + * 费用性质 + */ + private String contractName; + + /** + * 患者id + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long patientId; + + /** + * 患者姓名 + */ + private String patientName; + + /** + * 患者性别 + */ + private Integer genderEnum; + private String genderEnum_enumText; + + /** + * 证件号 + */ + private String idCard; + + /** + * 就诊状态 + */ + private Integer statusEnum; + private String statusEnum_enumText; + + /** + * 挂号日期/时间 + */ + private Date registerTime; + +} diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/mapper/OutpatientRegistrationAppMapper.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/mapper/OutpatientRegistrationAppMapper.java index 45e08e2b..deb9f5b4 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/mapper/OutpatientRegistrationAppMapper.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientservice/mapper/OutpatientRegistrationAppMapper.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.openhis.web.outpatientservice.dto.CurrentDayEncounterDto; import com.openhis.web.outpatientservice.dto.PractitionerMetadata; /** @@ -27,4 +28,14 @@ public interface OutpatientRegistrationAppMapper { Integer getNumByPatientIdAndOrganizationId(@Param("patientId") Long patientId, @Param("serviceTypeId") Long serviceTypeId); + /** + * 查询当日就诊数据 + * + * @param page 分页参数 + * @param queryWrapper 查询条件 + * @return 当日就诊数据 + */ + IPage getCurrentDayEncounter(@Param("page") Page page, + @Param(Constants.WRAPPER) QueryWrapper queryWrapper); + } diff --git a/openhis-server/openhis-application/src/main/resources/mapper/outpatientservice/OutpatientRegistrationAppMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/outpatientservice/OutpatientRegistrationAppMapper.xml index 80c4a97a..a0072820 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/outpatientservice/OutpatientRegistrationAppMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/outpatientservice/OutpatientRegistrationAppMapper.xml @@ -39,4 +39,49 @@ AND create_time > CURRENT_DATE + + \ No newline at end of file