Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -2,7 +2,9 @@ package com.core.common.utils;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.Period;
|
import java.time.Period;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据出生日期算年龄
|
* 根据出生日期算年龄
|
||||||
@@ -15,7 +17,9 @@ public final class AgeCalculatorUtil {
|
|||||||
/**
|
/**
|
||||||
* 当前年龄取得(床位列表表示年龄用)
|
* 当前年龄取得(床位列表表示年龄用)
|
||||||
*/
|
*/
|
||||||
public static String getAge(LocalDateTime dateTime) {
|
public static String getAge(Date date) {
|
||||||
|
// 将 Date 转换为 LocalDateTime
|
||||||
|
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
int years = now.getYear() - dateTime.getYear();
|
int years = now.getYear() - dateTime.getYear();
|
||||||
if (years > 2) {
|
if (years > 2) {
|
||||||
@@ -78,5 +82,4 @@ public final class AgeCalculatorUtil {
|
|||||||
private static boolean isLeapYear(int year) {
|
private static boolean isLeapYear(int year) {
|
||||||
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.framework.aspectj;
|
package com.core.framework.aspectj;
|
||||||
|
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
|
||||||
import org.aspectj.lang.annotation.Before;
|
|
||||||
import org.aspectj.lang.annotation.AfterReturning;
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
import org.aspectj.lang.annotation.AfterThrowing;
|
import org.aspectj.lang.annotation.AfterThrowing;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.annotation.Before;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
import org.springframework.transaction.TransactionStatus;
|
import org.springframework.transaction.TransactionStatus;
|
||||||
@@ -17,7 +17,7 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
|
|||||||
public class TransactionAspect {
|
public class TransactionAspect {
|
||||||
|
|
||||||
private final PlatformTransactionManager transactionManager;
|
private final PlatformTransactionManager transactionManager;
|
||||||
private TransactionStatus transactionStatus;
|
private final ThreadLocal<TransactionStatus> transactionStatus = new ThreadLocal<>();
|
||||||
|
|
||||||
public TransactionAspect(PlatformTransactionManager transactionManager) {
|
public TransactionAspect(PlatformTransactionManager transactionManager) {
|
||||||
this.transactionManager = transactionManager;
|
this.transactionManager = transactionManager;
|
||||||
@@ -28,7 +28,8 @@ public class TransactionAspect {
|
|||||||
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
||||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
||||||
public void beginTransaction() {
|
public void beginTransaction() {
|
||||||
transactionStatus = transactionManager.getTransaction(new DefaultTransactionDefinition());
|
TransactionStatus status = transactionManager.getTransaction(new DefaultTransactionDefinition());
|
||||||
|
transactionStatus.set(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterReturning("@annotation(org.springframework.web.bind.annotation.PostMapping) || " +
|
@AfterReturning("@annotation(org.springframework.web.bind.annotation.PostMapping) || " +
|
||||||
@@ -36,8 +37,10 @@ public class TransactionAspect {
|
|||||||
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
"@annotation(org.springframework.web.bind.annotation.PutMapping) || " +
|
||||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
|
||||||
public void commitTransaction() {
|
public void commitTransaction() {
|
||||||
if (transactionStatus != null && !transactionStatus.isCompleted()) {
|
TransactionStatus status = transactionStatus.get();
|
||||||
transactionManager.commit(transactionStatus);
|
if (status != null && !status.isCompleted()) {
|
||||||
|
transactionManager.commit(status);
|
||||||
|
transactionStatus.remove(); // 清除 ThreadLocal 中的状态
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,8 +50,10 @@ public class TransactionAspect {
|
|||||||
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)",
|
"@annotation(org.springframework.web.bind.annotation.DeleteMapping)",
|
||||||
throwing = "ex")
|
throwing = "ex")
|
||||||
public void rollbackTransaction(Exception ex) {
|
public void rollbackTransaction(Exception ex) {
|
||||||
if (transactionStatus != null && !transactionStatus.isCompleted()) {
|
TransactionStatus status = transactionStatus.get();
|
||||||
transactionManager.rollback(transactionStatus);
|
if (status != null && !status.isCompleted()) {
|
||||||
|
transactionManager.rollback(status);
|
||||||
|
transactionStatus.remove(); // 清除 ThreadLocal 中的状态
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.openhis.web.basedatamanage.appservice;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Organization 应该服务类
|
||||||
|
*/
|
||||||
|
public interface IOrganizationAppService {
|
||||||
|
// 查询机构树
|
||||||
|
Page<OrganizationQueryDto> getOrganizationTree(Integer pageNo, Integer pageSize);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.openhis.web.basedatamanage.appservice.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.administration.domain.Organization;
|
||||||
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
|
import com.openhis.web.basedatamanage.appservice.IOrganizationAppService;
|
||||||
|
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class IOrganizationAppServiceImpl implements IOrganizationAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
IOrganizationService organizationService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<OrganizationQueryDto> getOrganizationTree(Integer pageNo, Integer pageSize) {
|
||||||
|
// 查询机构列表
|
||||||
|
Page<Organization> page = organizationService.page(new Page<>(pageNo, pageSize));
|
||||||
|
List<Organization> organizationList = page.getRecords();
|
||||||
|
// 将机构列表转为树结构
|
||||||
|
List<OrganizationQueryDto> orgTree = buildTree(organizationList);
|
||||||
|
Page<OrganizationQueryDto> orgQueryDtoPage = new Page<>(pageNo, pageSize, page.getTotal());
|
||||||
|
orgQueryDtoPage.setRecords(orgTree);
|
||||||
|
return orgQueryDtoPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将机构列表转换为树结构
|
||||||
|
*
|
||||||
|
* @param records 机构列表
|
||||||
|
* @return tree
|
||||||
|
*/
|
||||||
|
private List<OrganizationQueryDto> buildTree(List<Organization> records) {
|
||||||
|
// 按b_no的层级排序,确保父节点先处理
|
||||||
|
List<Organization> sortedRecords = records.stream()
|
||||||
|
.sorted(Comparator.comparingInt(r -> r.getBusNo().split("\\.").length)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<String, OrganizationQueryDto> nodeMap = new HashMap<>();
|
||||||
|
List<OrganizationQueryDto> tree = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Organization record : sortedRecords) {
|
||||||
|
String bNo = record.getBusNo();
|
||||||
|
String[] parts = bNo.split("\\.");
|
||||||
|
OrganizationQueryDto node = new OrganizationQueryDto();
|
||||||
|
BeanUtils.copyProperties(record, node);
|
||||||
|
// 将当前节点加入映射
|
||||||
|
nodeMap.put(bNo, node);
|
||||||
|
|
||||||
|
if (parts.length == 1) {
|
||||||
|
// 根节点
|
||||||
|
tree.add(node);
|
||||||
|
} else {
|
||||||
|
// 获取父节点的b_no(去掉最后一部分)
|
||||||
|
String parentBNo = String.join(".", Arrays.copyOf(parts, parts.length - 1));
|
||||||
|
OrganizationQueryDto parent = nodeMap.get(parentBNo);
|
||||||
|
|
||||||
|
if (parent != null) {
|
||||||
|
parent.getChildren().add(node);
|
||||||
|
} else {
|
||||||
|
// 处理父节点不存在的情况(例如数据缺失)
|
||||||
|
// 可根据需求调整为将节点加入根或抛出异常
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tree;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,16 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.basedatamanage.controller;
|
package com.openhis.web.basedatamanage.controller;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.AssignSeqUtil;
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
@@ -22,12 +12,18 @@ import com.openhis.administration.mapper.OrganizationMapper;
|
|||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.OrganizationType;
|
import com.openhis.common.enums.OrganizationType;
|
||||||
import com.openhis.web.basedatamanage.dto.OrgQueryParam;
|
import com.openhis.web.basedatamanage.appservice.IOrganizationAppService;
|
||||||
import com.openhis.web.basedatamanage.dto.OrganizationInitDto;
|
import com.openhis.web.basedatamanage.dto.OrganizationInitDto;
|
||||||
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理controller
|
* 机构管理controller
|
||||||
@@ -42,6 +38,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
public class OrganizationController {
|
public class OrganizationController {
|
||||||
|
|
||||||
private final IOrganizationService organizationService;
|
private final IOrganizationService organizationService;
|
||||||
|
private final IOrganizationAppService iOrganizationAppService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrganizationMapper organizationMapper;
|
private OrganizationMapper organizationMapper;
|
||||||
@@ -63,38 +60,17 @@ public class OrganizationController {
|
|||||||
/**
|
/**
|
||||||
* 机构分页列表
|
* 机构分页列表
|
||||||
*
|
*
|
||||||
* @param orgQueryParam 查询字段
|
* @param pageNo 当前页码
|
||||||
* @param searchKey 模糊查询关键字
|
|
||||||
* @param pageNo 当前页码
|
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @param request 请求数据
|
|
||||||
* @return 机构分页列表
|
* @return 机构分页列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/organization")
|
@GetMapping(value = "/organization")
|
||||||
public R<?> getOrganizationPage(OrgQueryParam orgQueryParam,
|
public R<?> getOrganizationPage(
|
||||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
Page<OrganizationQueryDto> organizationTree = iOrganizationAppService.getOrganizationTree(pageNo, pageSize);
|
||||||
|
return R.ok(organizationTree,
|
||||||
// // 构建查询条件
|
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[]{"机构信息"}));
|
||||||
// QueryWrapper<Organization> queryWrapper = HisQueryUtils.buildQueryWrapper(orgQueryParam, searchKey,
|
|
||||||
// new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
|
||||||
//
|
|
||||||
// // 设置排序
|
|
||||||
// queryWrapper.orderByDesc("create_time");
|
|
||||||
// // 执行分页查询并转换为 orgQueryDtoPage
|
|
||||||
// Page<OrganizationQueryDto> orgQueryDtoPage =
|
|
||||||
// HisPageUtils.selectPage(organizationMapper, queryWrapper, pageNo, pageSize, OrganizationQueryDto.class);
|
|
||||||
// 查询机构列表
|
|
||||||
Page<Organization> page = organizationService.page(new Page<>(pageNo, pageSize));
|
|
||||||
List<Organization> organizationList = page.getRecords();
|
|
||||||
// 将机构列表转为树结构
|
|
||||||
List<OrganizationQueryDto> orgTree = buildTree(organizationList);
|
|
||||||
Page<OrganizationQueryDto> orgQueryDtoPage = new Page<>(pageNo, pageSize, page.getTotal());
|
|
||||||
orgQueryDtoPage.setRecords(orgTree);
|
|
||||||
|
|
||||||
return R.ok(orgQueryDtoPage,
|
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -116,8 +92,8 @@ public class OrganizationController {
|
|||||||
boolean saveOrgSuccess = organizationService.save(organization);
|
boolean saveOrgSuccess = organizationService.save(organization);
|
||||||
|
|
||||||
return saveOrgSuccess
|
return saveOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"机构信息"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,7 +105,7 @@ public class OrganizationController {
|
|||||||
public R<?> getOrganizationById(@Validated @RequestParam Long orgId) {
|
public R<?> getOrganizationById(@Validated @RequestParam Long orgId) {
|
||||||
|
|
||||||
Organization organization = organizationService.getById(orgId);
|
Organization organization = organizationService.getById(orgId);
|
||||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,8 +121,8 @@ public class OrganizationController {
|
|||||||
|
|
||||||
boolean updateOrgSuccess = organizationService.updateById(organization);
|
boolean updateOrgSuccess = organizationService.updateById(organization);
|
||||||
return updateOrgSuccess
|
return updateOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,8 +142,8 @@ public class OrganizationController {
|
|||||||
boolean deleteOrgSuccess = organizationService.removeByIds(orgIdList);
|
boolean deleteOrgSuccess = organizationService.removeByIds(orgIdList);
|
||||||
|
|
||||||
return deleteOrgSuccess
|
return deleteOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[]{"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[]{"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,8 +157,8 @@ public class OrganizationController {
|
|||||||
boolean activeSuccess = organizationService.activeChange(orgId);
|
boolean activeSuccess = organizationService.activeChange(orgId);
|
||||||
|
|
||||||
return activeSuccess
|
return activeSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"启用"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"启用"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"启用"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[]{"启用"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -196,49 +172,9 @@ public class OrganizationController {
|
|||||||
boolean inActiveSuccess = organizationService.activeChange(orgId);
|
boolean inActiveSuccess = organizationService.activeChange(orgId);
|
||||||
|
|
||||||
return inActiveSuccess
|
return inActiveSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"停用"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"停用"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"停用"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[]{"停用"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 将机构列表转换为树结构
|
|
||||||
*
|
|
||||||
* @param records 机构列表
|
|
||||||
* @return tree
|
|
||||||
*/
|
|
||||||
private List<OrganizationQueryDto> buildTree(List<Organization> records) {
|
|
||||||
// 按b_no的层级排序,确保父节点先处理
|
|
||||||
List<Organization> sortedRecords = records.stream()
|
|
||||||
.sorted(Comparator.comparingInt(r -> r.getBusNo().split("\\.").length)).collect(Collectors.toList());
|
|
||||||
|
|
||||||
Map<String, OrganizationQueryDto> nodeMap = new HashMap<>();
|
|
||||||
List<OrganizationQueryDto> tree = new ArrayList<>();
|
|
||||||
|
|
||||||
for (Organization record : sortedRecords) {
|
|
||||||
String bNo = record.getBusNo();
|
|
||||||
String[] parts = bNo.split("\\.");
|
|
||||||
OrganizationQueryDto node = new OrganizationQueryDto();
|
|
||||||
BeanUtils.copyProperties(record, node);
|
|
||||||
// 将当前节点加入映射
|
|
||||||
nodeMap.put(bNo, node);
|
|
||||||
|
|
||||||
if (parts.length == 1) {
|
|
||||||
// 根节点
|
|
||||||
tree.add(node);
|
|
||||||
} else {
|
|
||||||
// 获取父节点的b_no(去掉最后一部分)
|
|
||||||
String parentBNo = String.join(".", Arrays.copyOf(parts, parts.length - 1));
|
|
||||||
OrganizationQueryDto parent = nodeMap.get(parentBNo);
|
|
||||||
|
|
||||||
if (parent != null) {
|
|
||||||
parent.getChildren().add(node);
|
|
||||||
} else {
|
|
||||||
// 处理父节点不存在的情况(例如数据缺失)
|
|
||||||
// 可根据需求调整为将节点加入根或抛出异常
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return tree;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.enums.OrganizationClass;
|
import com.openhis.common.enums.OrganizationClass;
|
||||||
import com.openhis.common.enums.OrganizationType;
|
import com.openhis.common.enums.OrganizationType;
|
||||||
|
|
||||||
@@ -24,6 +26,7 @@ public class OrganizationQueryDto {
|
|||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||||
import com.openhis.administration.domain.HealthcareService;
|
import com.openhis.administration.domain.HealthcareService;
|
||||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||||
@@ -19,9 +20,7 @@ import com.openhis.common.enums.AccountStatus;
|
|||||||
import com.openhis.common.enums.WhetherContainUnknown;
|
import com.openhis.common.enums.WhetherContainUnknown;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.web.basicservice.dto.HealthcareServiceAddOrUpdateParam;
|
import com.openhis.web.basicservice.dto.*;
|
||||||
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
|
||||||
import com.openhis.web.basicservice.dto.HealthcareServiceInitDto;
|
|
||||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -29,6 +28,7 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -74,13 +74,17 @@ public class HealthcareServiceController {
|
|||||||
@PostMapping(value = "/healthcare-service")
|
@PostMapping(value = "/healthcare-service")
|
||||||
public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
||||||
// 服务管理-表单数据
|
// 服务管理-表单数据
|
||||||
HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
HealthcareServiceFormData healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
||||||
// 费用定价-表单数据
|
// 费用定价-表单数据
|
||||||
ChargeItemDefinition chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData();
|
ChargeItemDefinitionFormData chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData();
|
||||||
// 服务管理-新增
|
// 服务管理-新增
|
||||||
HealthcareService healthcareService = iHealthcareServiceService.addHealthcareService(healthcareServiceFormData);
|
HealthcareService healthcareService = new HealthcareService();
|
||||||
|
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
||||||
|
HealthcareService healthcareServiceAfterAdd = iHealthcareServiceService.addHealthcareService(healthcareService);
|
||||||
// 同时保存费用定价
|
// 同时保存费用定价
|
||||||
boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareService, chargeItemDefinitionFormData);
|
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||||
|
BeanUtils.copyProperties(chargeItemDefinitionFormData, chargeItemDefinition);
|
||||||
|
boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareServiceAfterAdd, chargeItemDefinition);
|
||||||
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"服务管理"})) :
|
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"服务管理"})) :
|
||||||
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||||
}
|
}
|
||||||
@@ -105,13 +109,38 @@ public class HealthcareServiceController {
|
|||||||
new HashSet<>(Arrays.asList("name", "charge_name")), request);
|
new HashSet<>(Arrays.asList("name", "charge_name")), request);
|
||||||
IPage<HealthcareServiceDto> healthcareServicePage = healthcareServiceBizMapper.getHealthcareServicePage(
|
IPage<HealthcareServiceDto> healthcareServicePage = healthcareServiceBizMapper.getHealthcareServicePage(
|
||||||
new Page<>(pageNo, pageSize), CommonConstants.TableName.ADM_HEALTHCARE_SERVICE, queryWrapper);
|
new Page<>(pageNo, pageSize), CommonConstants.TableName.ADM_HEALTHCARE_SERVICE, queryWrapper);
|
||||||
// 活动标记-枚举类回显赋值
|
healthcareServicePage.getRecords().forEach(e -> {
|
||||||
healthcareServicePage.getRecords().forEach(e ->
|
// 活动标记-枚举类回显赋值
|
||||||
e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()))
|
e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()));
|
||||||
|
// 预约要求-枚举类回显赋值
|
||||||
|
e.setAppointmentRequiredFlag_enumText(EnumUtils.getInfoByValue(WhetherContainUnknown.class, e.getAppointmentRequiredFlag()));
|
||||||
|
}
|
||||||
);
|
);
|
||||||
return R.ok(healthcareServicePage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
return R.ok(healthcareServicePage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务管理 详情
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 详情
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/healthcare-service-detail/{id}")
|
||||||
|
public R<?> getHealthcareServiceDetail(@PathVariable("id") Long id) {
|
||||||
|
HealthcareServiceDto healthcareServiceDto = new HealthcareServiceDto();
|
||||||
|
healthcareServiceDto.setId(id);
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<HealthcareServiceDto> queryWrapper = HisQueryUtils.buildQueryWrapper(healthcareServiceDto, null,
|
||||||
|
null, null);
|
||||||
|
IPage<HealthcareServiceDto> healthcareServicePage = healthcareServiceBizMapper.getHealthcareServicePage(
|
||||||
|
new Page<>(1, 1), CommonConstants.TableName.ADM_HEALTHCARE_SERVICE, queryWrapper);
|
||||||
|
HealthcareServiceDto healthcareServiceDtoDetail = healthcareServicePage.getRecords().get(0);
|
||||||
|
// 枚举赋值
|
||||||
|
healthcareServiceDtoDetail.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, healthcareServiceDtoDetail.getActiveFlag()))
|
||||||
|
.setAppointmentRequiredFlag_enumText(EnumUtils.getInfoByValue(WhetherContainUnknown.class, healthcareServiceDtoDetail.getAppointmentRequiredFlag()));
|
||||||
|
return R.ok(healthcareServiceDtoDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务管理 编辑
|
* 服务管理 编辑
|
||||||
@@ -122,8 +151,10 @@ public class HealthcareServiceController {
|
|||||||
@PutMapping(value = "/healthcare-service")
|
@PutMapping(value = "/healthcare-service")
|
||||||
public R<?> edit(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
public R<?> edit(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) {
|
||||||
// 服务管理-表单数据
|
// 服务管理-表单数据
|
||||||
HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
HealthcareServiceFormData healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
||||||
boolean res = iHealthcareServiceService.updateHealthcareService(healthcareServiceFormData);
|
HealthcareService healthcareService = new HealthcareService();
|
||||||
|
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
||||||
|
boolean res = iHealthcareServiceService.updateHealthcareService(healthcareService);
|
||||||
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"服务管理"})) :
|
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"服务管理"})) :
|
||||||
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||||
}
|
}
|
||||||
@@ -131,17 +162,23 @@ public class HealthcareServiceController {
|
|||||||
/**
|
/**
|
||||||
* 服务管理 删除
|
* 服务管理 删除
|
||||||
*
|
*
|
||||||
* @param id ID
|
* @param ids ID
|
||||||
* @return 删除结果
|
* @return 删除结果
|
||||||
*/
|
*/
|
||||||
@DeleteMapping(value = "/healthcare-service")
|
@DeleteMapping(value = "/healthcare-service")
|
||||||
public R<?> delete(@RequestParam Long id) {
|
public R<?> delete(@RequestParam String ids) {
|
||||||
boolean res = iHealthcareServiceService.removeById(id);
|
List<Long> idsList = new ArrayList<>();
|
||||||
|
if (ids != null) {
|
||||||
|
idsList = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
boolean res = iHealthcareServiceService.removeByIds(idsList);
|
||||||
// 同时删除非同定价
|
// 同时删除非同定价
|
||||||
LambdaQueryWrapper<ChargeItemDefinition> QueryWrapper = new LambdaQueryWrapper<>();
|
for (Long id : idsList) {
|
||||||
QueryWrapper.eq(ChargeItemDefinition::getInstanceId, id).
|
LambdaQueryWrapper<ChargeItemDefinition> QueryWrapper = new LambdaQueryWrapper<>();
|
||||||
eq(ChargeItemDefinition::getInstanceTable, CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
QueryWrapper.eq(ChargeItemDefinition::getInstanceId, id).
|
||||||
iChargeItemDefinitionService.remove(QueryWrapper);
|
eq(ChargeItemDefinition::getInstanceTable, CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||||
|
iChargeItemDefinitionService.remove(QueryWrapper);
|
||||||
|
}
|
||||||
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[]{"服务管理"})) :
|
return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[]{"服务管理"})) :
|
||||||
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
|
R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用定价管理表单数据
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-02-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ChargeItemDefinitionFormData {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "名称不能为空")
|
||||||
|
private String chargeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private PublicationStatus statusEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构ID
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "机构ID不能为空")
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "描述不能为空")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代码
|
||||||
|
*/
|
||||||
|
private String instanceTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联项目
|
||||||
|
*/
|
||||||
|
private Long instanceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效时间开始
|
||||||
|
*/
|
||||||
|
private Date effectiveStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效时间结束
|
||||||
|
*/
|
||||||
|
private Date effectiveEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务类别
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "财务类别不能为空")
|
||||||
|
private String typeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保类别
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "医保类别不能为空")
|
||||||
|
private String ybType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否使用详细价格规则
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否使用详细价格规则不能为空")
|
||||||
|
private Integer conditionFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础价格
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "基础价格不能为空")
|
||||||
|
private BigDecimal price;
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.openhis.web.basicservice.dto;
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
|
||||||
import com.openhis.administration.domain.HealthcareService;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,15 +9,15 @@ import lombok.Data;
|
|||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class HealthcareServiceAddOrUpdateParam{
|
public class HealthcareServiceAddOrUpdateParam {
|
||||||
/**
|
/**
|
||||||
* 服务管理
|
* 服务管理
|
||||||
*/
|
*/
|
||||||
private HealthcareService healthcareServiceFormData;
|
private HealthcareServiceFormData healthcareServiceFormData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 费用定价
|
* 费用定价
|
||||||
*/
|
*/
|
||||||
private ChargeItemDefinition chargeItemDefinitionFormData;
|
private ChargeItemDefinitionFormData chargeItemDefinitionFormData;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.openhis.web.basicservice.dto;
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.openhis.common.annotation.Dict;
|
import com.openhis.common.annotation.Dict;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -15,6 +17,7 @@ public class HealthcareServiceDto {
|
|||||||
/**
|
/**
|
||||||
* ID
|
* ID
|
||||||
*/
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,6 +30,7 @@ public class HealthcareServiceDto {
|
|||||||
* 提供部门ID
|
* 提供部门ID
|
||||||
*/
|
*/
|
||||||
@Dict(dictTable = "adm_organization",dictCode = "id",dictText = "name")
|
@Dict(dictTable = "adm_organization",dictCode = "id",dictText = "name")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long offeredOrgId;
|
private Long offeredOrgId;
|
||||||
private String offeredOrgId_dictText;
|
private String offeredOrgId_dictText;
|
||||||
|
|
||||||
@@ -55,6 +59,7 @@ public class HealthcareServiceDto {
|
|||||||
* 地点
|
* 地点
|
||||||
*/
|
*/
|
||||||
@Dict(dictTable = "adm_location",dictCode = "id",dictText = "name")
|
@Dict(dictTable = "adm_location",dictCode = "id",dictText = "name")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long locationId;
|
private Long locationId;
|
||||||
private String locationId_dictText;
|
private String locationId_dictText;
|
||||||
|
|
||||||
@@ -82,6 +87,7 @@ public class HealthcareServiceDto {
|
|||||||
* 预约要求
|
* 预约要求
|
||||||
*/
|
*/
|
||||||
private Integer appointmentRequiredFlag;
|
private Integer appointmentRequiredFlag;
|
||||||
|
private String appointmentRequiredFlag_enumText;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 名称
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.openhis.web.basicservice.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务项目管理表单数据
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @date 2025-02-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class HealthcareServiceFormData {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动标记
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "活动标记不能为空")
|
||||||
|
private Integer activeFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供部门ID
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "提供部门ID不能为空")
|
||||||
|
private Long offeredOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务分类
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务分类不能为空")
|
||||||
|
private String categoryCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务类型不能为空")
|
||||||
|
private String typeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务专业
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务专业不能为空")
|
||||||
|
private String specialtyCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地点
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "地点不能为空")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "服务名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 额外细节
|
||||||
|
*/
|
||||||
|
private String extraDetails;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系方式
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "联系方式不能为空")
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预约要求
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "预约要求不能为空")
|
||||||
|
private Integer appointmentRequiredFlag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.openhis.web.outpatientservice.appservice;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.openhis.web.outpatientservice.dto.PatientMetadata;
|
||||||
|
|
||||||
|
public interface IOutpatientRegistrationAppService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 - 查询患者信息
|
||||||
|
*
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页多少条
|
||||||
|
* @return 患者信息
|
||||||
|
*/
|
||||||
|
Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize);
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.openhis.web.outpatientservice.appservice.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.utils.AgeCalculatorUtil;
|
||||||
|
import com.openhis.administration.domain.Patient;
|
||||||
|
import com.openhis.administration.mapper.PatientMapper;
|
||||||
|
import com.openhis.common.enums.AdministrativeGender;
|
||||||
|
import com.openhis.common.utils.EnumUtils;
|
||||||
|
import com.openhis.common.utils.HisPageUtils;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
||||||
|
import com.openhis.web.outpatientservice.dto.PatientMetadata;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 实现类
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class IOutpatientRegistrationAppServiceImpl implements IOutpatientRegistrationAppService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PatientMapper patientMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 - 查询患者信息
|
||||||
|
*
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页多少条
|
||||||
|
* @return 患者信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null,
|
||||||
|
searchKey, new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), null
|
||||||
|
);
|
||||||
|
// 设置排序
|
||||||
|
queryWrapper.orderByDesc("update_time");
|
||||||
|
// 患者信息
|
||||||
|
Page<PatientMetadata> patientMetadataPage = HisPageUtils.selectPage(patientMapper,
|
||||||
|
queryWrapper, pageNo, pageSize, PatientMetadata.class);
|
||||||
|
|
||||||
|
patientMetadataPage.getRecords().forEach(e -> {
|
||||||
|
// 性别枚举
|
||||||
|
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||||
|
// 计算年龄
|
||||||
|
e.setAge(AgeCalculatorUtil.getAge(e.getBirthDate()));
|
||||||
|
});
|
||||||
|
return patientMetadataPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.outpatientservice.controller;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.common.enums.PriorityLevel;
|
||||||
|
import com.openhis.web.basedatamanage.appservice.IOrganizationAppService;
|
||||||
|
import com.openhis.web.outpatientservice.appservice.IOutpatientRegistrationAppService;
|
||||||
|
import com.openhis.web.outpatientservice.dto.OutpatientRegistrationInitDto;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
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 java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 controller
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/outpatient-service/register")
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class OutpatientRegistrationController {
|
||||||
|
|
||||||
|
private final IOutpatientRegistrationAppService iOutpatientRegistrationAppService;
|
||||||
|
private final IOrganizationAppService iOrganizationAppService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 - 基础数据初始化
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public R<?> init() {
|
||||||
|
OutpatientRegistrationInitDto outpatientRegistrationInitDto = new OutpatientRegistrationInitDto();
|
||||||
|
// 优先级
|
||||||
|
List<OutpatientRegistrationInitDto.priorityLevelOption> priorityLevelOptionOptions = Stream.of(PriorityLevel.values())
|
||||||
|
.map(e -> new OutpatientRegistrationInitDto.priorityLevelOption(e.getValue(), e.getInfo()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
outpatientRegistrationInitDto.setPriorityLevelOptionOptions(priorityLevelOptionOptions);
|
||||||
|
return R.ok(outpatientRegistrationInitDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 - 查询患者信息
|
||||||
|
*
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页多少条
|
||||||
|
* @return 患者信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/patient-metadata")
|
||||||
|
public R<?> getPatientMetadata(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
return R.ok(iOutpatientRegistrationAppService.getPatientMetadataBySearchKey(searchKey, pageNo, pageSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 - 查询机构树
|
||||||
|
*
|
||||||
|
* @param pageNo 当前页码
|
||||||
|
* @param pageSize 查询条数
|
||||||
|
* @return 机构分页列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/organization-tree")
|
||||||
|
public R<?> getOrganizationTree(
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
return R.ok(iOrganizationAppService.getOrganizationTree(pageNo, pageSize));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.openhis.web.outpatientservice.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 新增数据
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientRegistrationAddParam {
|
||||||
|
|
||||||
|
// 就诊管理-表单数据
|
||||||
|
|
||||||
|
// 就诊诊断管理-表单数据
|
||||||
|
|
||||||
|
// 就诊位置管理-表单数据
|
||||||
|
|
||||||
|
// 就诊参数者管理-表单数据
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.openhis.web.outpatientservice.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊挂号 init基础数据
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientRegistrationInitDto {
|
||||||
|
|
||||||
|
private List<priorityLevelOption> priorityLevelOptionOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先级
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class priorityLevelOption {
|
||||||
|
private Integer value;
|
||||||
|
private String label;
|
||||||
|
|
||||||
|
public priorityLevelOption(Integer value, String label) {
|
||||||
|
this.value = value;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.openhis.web.outpatientservice.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者信息 元数据
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class PatientMetadata {
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别编码
|
||||||
|
*/
|
||||||
|
private Integer genderEnum;
|
||||||
|
private String genderEnum_enumText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号
|
||||||
|
*/
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生日
|
||||||
|
*/
|
||||||
|
|
||||||
|
private Date birthDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年龄
|
||||||
|
*/
|
||||||
|
private String age;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.openhis.web.patientmanage.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.openhis.common.enums.AdministrativeGender;
|
||||||
|
import com.openhis.common.enums.EncounterSubjectStatus;
|
||||||
|
import com.openhis.common.utils.EnumUtils;
|
||||||
|
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
||||||
|
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
||||||
|
import com.openhis.web.patientmanage.mapper.PatientManageMapper;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊记录
|
||||||
|
*
|
||||||
|
* @author liuhr
|
||||||
|
* @date 2025/2/28
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/patientmanage/records")
|
||||||
|
@Slf4j
|
||||||
|
public class OutpatientRecordController {
|
||||||
|
|
||||||
|
@Autowired(required = false)
|
||||||
|
PatientManageMapper patientManageMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生名字列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list-doctornames")
|
||||||
|
public R<?> getDoctorNames() {
|
||||||
|
// 获取医生名字列表
|
||||||
|
List<String> listDoctorNames = patientManageMapper.getDoctorNames();
|
||||||
|
|
||||||
|
return R.ok(listDoctorNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询门诊记录,可选条件
|
||||||
|
*
|
||||||
|
* @param outpatientRecordSearchParam 查询条件
|
||||||
|
* @param pageNo 页码(默认为1)
|
||||||
|
* @param pageSize 每页大小(默认为10)
|
||||||
|
*/
|
||||||
|
@GetMapping("/outpatient-record-page")
|
||||||
|
public R<?> getPatient(OutpatientRecordSearchParam outpatientRecordSearchParam,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
|
||||||
|
System.out.println("doctorName"+outpatientRecordSearchParam.getDoctorName());
|
||||||
|
System.out.println("phone"+outpatientRecordSearchParam.getPhone());
|
||||||
|
System.out.println("searchKey"+outpatientRecordSearchParam.getSearchKey());
|
||||||
|
|
||||||
|
// 跳过的记录数
|
||||||
|
Integer offset = (pageNo - 1) * pageSize;
|
||||||
|
// 连表查询患者信息
|
||||||
|
List<OutpatientRecordDto> listOutpatientRecords =
|
||||||
|
patientManageMapper.getOutpatientRecord(outpatientRecordSearchParam, pageSize, offset);
|
||||||
|
// 查询总记录数
|
||||||
|
long total = patientManageMapper.countOutpatientRecords(outpatientRecordSearchParam);
|
||||||
|
// 创建Page对象并设置属性
|
||||||
|
Page<OutpatientRecordDto> outpatientRecordPage = new Page<>(pageNo, pageSize, total);
|
||||||
|
outpatientRecordPage.setRecords(listOutpatientRecords);
|
||||||
|
outpatientRecordPage.getRecords().forEach(e -> {
|
||||||
|
// 性别枚举类回显赋值
|
||||||
|
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||||
|
// 就诊对象状态枚举类回显赋值
|
||||||
|
e.setSubjectStatusEnum_enumText(
|
||||||
|
EnumUtils.getInfoByValue(EncounterSubjectStatus.class, e.getSubjectStatusEnum()));
|
||||||
|
});
|
||||||
|
|
||||||
|
return R.ok(outpatientRecordPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.core.common.utils.*;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -12,6 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.enums.AssignSeqEnum;
|
import com.core.common.enums.AssignSeqEnum;
|
||||||
|
import com.core.common.utils.*;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
import com.openhis.administration.service.IPatientService;
|
import com.openhis.administration.service.IPatientService;
|
||||||
@@ -181,8 +181,8 @@ public class PatientInformationController {
|
|||||||
patient.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(patient.getName()));
|
patient.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(patient.getName()));
|
||||||
// 设置五笔首拼
|
// 设置五笔首拼
|
||||||
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
||||||
//设置死亡时间
|
// 设置死亡时间
|
||||||
if(patientService.isFuture(patientInformationDto.getDeceasedDate())){
|
if (patientService.isFuture(patientInformationDto.getDeceasedDate())) {
|
||||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"死亡时间未来时"}));
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"死亡时间未来时"}));
|
||||||
}
|
}
|
||||||
patient.setDeceasedDate(DateUtils.parseDate(patientInformationDto.getDeceasedDate()));
|
patient.setDeceasedDate(DateUtils.parseDate(patientInformationDto.getDeceasedDate()));
|
||||||
@@ -213,8 +213,8 @@ public class PatientInformationController {
|
|||||||
patient.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(patient.getName()));
|
patient.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(patient.getName()));
|
||||||
// 设置五笔首拼
|
// 设置五笔首拼
|
||||||
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
||||||
//设置死亡时间
|
// 设置死亡时间
|
||||||
if(patientService.isFuture(patientInformationDto.getDeceasedDate())){
|
if (patientService.isFuture(patientInformationDto.getDeceasedDate())) {
|
||||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"死亡时间未来时"}));
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"死亡时间未来时"}));
|
||||||
}
|
}
|
||||||
patient.setDeceasedDate(DateUtils.parseDate(patientInformationDto.getDeceasedDate()));
|
patient.setDeceasedDate(DateUtils.parseDate(patientInformationDto.getDeceasedDate()));
|
||||||
@@ -256,11 +256,12 @@ public class PatientInformationController {
|
|||||||
// 职业编码枚举类回显赋值
|
// 职业编码枚举类回显赋值
|
||||||
e.setPrfsEnum_enumText(EnumUtils.getInfoByValue(OccupationType.class, e.getPrfsEnum()));
|
e.setPrfsEnum_enumText(EnumUtils.getInfoByValue(OccupationType.class, e.getPrfsEnum()));
|
||||||
// 血型ABO枚举类回显赋值
|
// 血型ABO枚举类回显赋值
|
||||||
e.setBloodAbo_text(EnumUtils.getInfoByValue(BloodTypeABO.class, e.getBloodAbo()));
|
e.setBloodAbo_enumText(EnumUtils.getInfoByValue(BloodTypeABO.class, e.getBloodAbo()));
|
||||||
// 血型RH枚举类回显赋值
|
// 血型RH枚举类回显赋值
|
||||||
e.setBloodRh_enumText(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh()));
|
e.setBloodRh_enumText(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh()));
|
||||||
// 家庭关系枚举类回显赋值
|
// 家庭关系枚举类回显赋值
|
||||||
e.setLinkRelationCode_enumText(EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode()));
|
e.setLinkRelationCode_enumText(
|
||||||
|
EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode()));
|
||||||
});
|
});
|
||||||
return R.ok(patientInformationPage);
|
return R.ok(patientInformationPage);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.openhis.web.patientmanage.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊记录Dto
|
||||||
|
*
|
||||||
|
* @author liuhr
|
||||||
|
* @date 2025/2/28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OutpatientRecordDto {
|
||||||
|
|
||||||
|
/** 患者姓名 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 身份证号 */
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
/** 疾病与诊断描述 */
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 患者院内编码/病历号 */
|
||||||
|
private String patientBusNo;
|
||||||
|
|
||||||
|
/** 就诊号 */
|
||||||
|
private String encounterBusNo;
|
||||||
|
|
||||||
|
/** 性别编码 */
|
||||||
|
private Integer genderEnum;
|
||||||
|
private String genderEnum_enumText;
|
||||||
|
|
||||||
|
/** 就诊时间 */
|
||||||
|
private Date encounterTime;
|
||||||
|
|
||||||
|
/** 就诊对象状态 */
|
||||||
|
private Integer subjectStatusEnum;
|
||||||
|
private String subjectStatusEnum_enumText;
|
||||||
|
|
||||||
|
/** 机构名称/接诊医院 */
|
||||||
|
private String organizationName;
|
||||||
|
|
||||||
|
/** 接诊医生姓名 */
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.openhis.web.patientmanage.dto;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊记录查询参数
|
||||||
|
*
|
||||||
|
* @author liuhr
|
||||||
|
* @date 2025/2/28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OutpatientRecordSearchParam {
|
||||||
|
|
||||||
|
/** 身份证号/病人ID/门诊号/病人姓名 */
|
||||||
|
private String searchKey;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 医生姓名 */
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
|
/** 筛选开始时间 */
|
||||||
|
private String beginTime;
|
||||||
|
|
||||||
|
/** 筛选结束时间 */
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -101,7 +101,7 @@ public class PatientInformationDto {
|
|||||||
|
|
||||||
/** 血型ABO */
|
/** 血型ABO */
|
||||||
private Integer bloodAbo;
|
private Integer bloodAbo;
|
||||||
private String bloodAbo_text;
|
private String bloodAbo_enumText;
|
||||||
|
|
||||||
/** 血型RH */
|
/** 血型RH */
|
||||||
private Integer bloodRh;
|
private Integer bloodRh;
|
||||||
|
|||||||
@@ -7,12 +7,14 @@ import org.springframework.stereotype.Repository;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
|
import com.openhis.web.patientmanage.dto.OutpatientRecordDto;
|
||||||
|
import com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam;
|
||||||
import com.openhis.web.patientmanage.dto.PatientInformationDto;
|
import com.openhis.web.patientmanage.dto.PatientInformationDto;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人信息管理
|
* 病人信息管理
|
||||||
*
|
*
|
||||||
* @author Wuser
|
* @author liuhr
|
||||||
* @date 2025/2/25
|
* @date 2025/2/25
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
@@ -31,7 +33,7 @@ public interface PatientManageMapper extends BaseMapper<Patient> {
|
|||||||
@Param("pageSize") Integer pageSize, @Param("offset") Integer offset);
|
@Param("pageSize") Integer pageSize, @Param("offset") Integer offset);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计总记录数的方法
|
* 统计病人信息总记录数的方法
|
||||||
*
|
*
|
||||||
* @param busNo 病人ID
|
* @param busNo 病人ID
|
||||||
* @param name 病人姓名
|
* @param name 病人姓名
|
||||||
@@ -39,4 +41,32 @@ public interface PatientManageMapper extends BaseMapper<Patient> {
|
|||||||
*/
|
*/
|
||||||
long countPatients(@Param("busNo") String busNo, @Param("name") String name);
|
long countPatients(@Param("busNo") String busNo, @Param("name") String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊信息分页查询
|
||||||
|
*
|
||||||
|
* @param outpatientRecordSearchParam 门诊查询参数
|
||||||
|
* @param pageSize 页面大小
|
||||||
|
* @param offset 跳过条数
|
||||||
|
* @return 分页查询
|
||||||
|
*/
|
||||||
|
List<OutpatientRecordDto> getOutpatientRecord(
|
||||||
|
@Param("OutpatientRecordSearchParam") OutpatientRecordSearchParam outpatientRecordSearchParam,
|
||||||
|
@Param("pageSize") Integer pageSize, @Param("offset") Integer offset);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计门诊总记录数的方法
|
||||||
|
*
|
||||||
|
* @param outpatientRecordSearchParam 门诊查询参数
|
||||||
|
* @return 分页查询
|
||||||
|
*/
|
||||||
|
long countOutpatientRecords(
|
||||||
|
@Param("OutpatientRecordSearchParam") OutpatientRecordSearchParam outpatientRecordSearchParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取医生名字列表
|
||||||
|
*
|
||||||
|
* @return 医生名字列表
|
||||||
|
*/
|
||||||
|
List<String> getDoctorNames();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
adm_healthcare_service AS T1
|
adm_healthcare_service AS T1
|
||||||
LEFT JOIN adm_charge_item_definition AS T2 ON T2.instance_id = T1.ID
|
LEFT JOIN adm_charge_item_definition AS T2 ON T2.instance_id = T1.ID
|
||||||
AND T2.instance_table = #{tableName}
|
AND T2.instance_table = #{tableName}
|
||||||
|
AND T1.delete_flag = '0'
|
||||||
|
WHERE T1.delete_flag = '0'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
T1.create_time DESC
|
T1.create_time DESC
|
||||||
) AS T3
|
) AS T3
|
||||||
|
|||||||
@@ -38,8 +38,7 @@
|
|||||||
pt.organization_id,
|
pt.organization_id,
|
||||||
pt.create_time
|
pt.create_time
|
||||||
FROM adm_patient pt
|
FROM adm_patient pt
|
||||||
<!-- 类型不一致,把organization_id转换成字符串类型-->
|
LEFT JOIN adm_organization ogt ON pt.organization_id = ogt.id
|
||||||
LEFT JOIN adm_organization ogt ON CAST(pt.organization_id AS VARCHAR) = ogt.bus_no
|
|
||||||
<where>
|
<where>
|
||||||
<!-- 如果传入busNo参数,且不为空 -->
|
<!-- 如果传入busNo参数,且不为空 -->
|
||||||
<if test="busNo != null and busNo != ''">
|
<if test="busNo != null and busNo != ''">
|
||||||
@@ -72,7 +71,7 @@
|
|||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM adm_patient pt
|
FROM adm_patient pt
|
||||||
<!-- 类型不一致,把organization_id转换成字符串类型-->
|
<!-- 类型不一致,把organization_id转换成字符串类型-->
|
||||||
LEFT JOIN adm_organization ogt ON CAST(pt.organization_id AS VARCHAR) = ogt.bus_no
|
LEFT JOIN adm_organization ogt ON pt.organization_id = ogt.id
|
||||||
<where>
|
<where>
|
||||||
<!-- 如果传入busNo参数,且不为空 -->
|
<!-- 如果传入busNo参数,且不为空 -->
|
||||||
<if test="busNo != null and busNo != ''">
|
<if test="busNo != null and busNo != ''">
|
||||||
@@ -99,6 +98,117 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- 门诊记录相关查询-->
|
<!-- 门诊记录相关查询-->
|
||||||
|
<select id="getOutpatientRecord" parameterType="com.openhis.web.patientmanage.dto.OutpatientRecordSearchParam"
|
||||||
|
resultType="com.openhis.web.patientmanage.dto.OutpatientRecordDto">
|
||||||
|
SELECT
|
||||||
|
pt.name,
|
||||||
|
pt.id_card,
|
||||||
|
c.description,
|
||||||
|
pt.bus_no as patientBusNo,
|
||||||
|
e.bus_no as encounterBusNo,
|
||||||
|
pt.gender_enum,
|
||||||
|
e.start_time as encounterTime,
|
||||||
|
e.subject_status_enum,
|
||||||
|
ogt.name as organizationName,
|
||||||
|
p.name as doctorName,
|
||||||
|
pt.phone
|
||||||
|
FROM
|
||||||
|
adm_encounter e
|
||||||
|
LEFT JOIN
|
||||||
|
adm_organization ogt ON e.organization_id = ogt.id
|
||||||
|
LEFT JOIN
|
||||||
|
adm_patient pt ON e.patient_id = pt.id
|
||||||
|
LEFT JOIN
|
||||||
|
cli_condition c ON e.patient_id = c.patient_id
|
||||||
|
LEFT JOIN
|
||||||
|
adm_encounter_participant ep ON ep.encounter_id = e.id
|
||||||
|
LEFT JOIN
|
||||||
|
adm_practitioner p ON p.id = ep.practitioner_id
|
||||||
|
<where>
|
||||||
|
<!-- 参与者类型是首诊医生 -->
|
||||||
|
ep.type_code = '1'
|
||||||
|
<!-- 如果传入searchKey参数,且不为空 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.searchKey != null and OutpatientRecordSearchParam.searchKey != ''">
|
||||||
|
AND pt.id_card LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
OR pt.bus_no LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
OR e.bus_no LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
OR pt.name LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 如果传入phone参数,且不为空 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
|
||||||
|
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 时间筛选 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
|
||||||
|
AND e.start_time BETWEEN
|
||||||
|
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
|
||||||
|
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 如果传入doctorName参数,且不为空 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.doctorName != null and OutpatientRecordSearchParam.doctorName != null">
|
||||||
|
AND p.name = #{OutpatientRecordSearchParam.doctorName}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY pt.bus_no,e.bus_no,ep.practitioner_id
|
||||||
|
LIMIT #{pageSize} OFFSET #{offset}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="countOutpatientRecords" resultType="long">
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM
|
||||||
|
adm_encounter e
|
||||||
|
LEFT JOIN
|
||||||
|
adm_organization ogt ON e.organization_id = ogt.id
|
||||||
|
LEFT JOIN
|
||||||
|
adm_patient pt ON e.patient_id = pt.id
|
||||||
|
LEFT JOIN
|
||||||
|
cli_condition c ON e.patient_id = c.patient_id
|
||||||
|
LEFT JOIN
|
||||||
|
adm_encounter_participant ep ON ep.encounter_id = e.id
|
||||||
|
LEFT JOIN
|
||||||
|
adm_practitioner p ON p.id = ep.practitioner_id
|
||||||
|
<where>
|
||||||
|
<!-- 参与者类型是首诊医生 -->
|
||||||
|
ep.type_code = '1'
|
||||||
|
<!-- 如果传入searchKey参数,且不为空 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.searchKey != null and OutpatientRecordSearchParam.searchKey != ''">
|
||||||
|
AND pt.id_card LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
OR pt.bus_no LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
OR e.bus_no LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
OR pt.name LIKE CONCAT('%',#{OutpatientRecordSearchParam.searchKey}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 如果传入phone参数,且不为空 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
|
||||||
|
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 时间筛选 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
|
||||||
|
AND e.start_time BETWEEN
|
||||||
|
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
|
||||||
|
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
<!-- 如果传入doctorName参数,且不为空 -->
|
||||||
|
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.doctorName != null and OutpatientRecordSearchParam.doctorName != null">
|
||||||
|
AND p.name = #{OutpatientRecordSearchParam.doctorName}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询医生名字列表-->
|
||||||
|
<select id="getDoctorNames" resultType="java.lang.String">
|
||||||
|
SELECT MIN(p.name) AS practitioner_name
|
||||||
|
FROM adm_encounter_participant ep
|
||||||
|
LEFT JOIN adm_practitioner p ON ep.practitioner_id = p.id
|
||||||
|
WHERE ep.type_code = '1'
|
||||||
|
GROUP BY ep.practitioner_id;
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
package com.openhis.common.enums;
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊类型
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum EncounterClass {
|
public enum EncounterClass implements HisEnumInterface {
|
||||||
IMP(1, "IMP", "住院"),
|
IMP(1, "IMP", "住院"),
|
||||||
|
|
||||||
AMB(2, "AMB", "门诊"),
|
AMB(2, "AMB", "门诊"),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum EncounterStatus {
|
public enum EncounterStatus implements HisEnumInterface {
|
||||||
PLANNED(1, "draft", "已安排"),
|
PLANNED(1, "draft", "已安排"),
|
||||||
|
|
||||||
IN_PROGRESS(2, "in-progress", "进行中"),
|
IN_PROGRESS(2, "in-progress", "进行中"),
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊对象状态
|
||||||
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum EncounterSubjectStatus {
|
public enum EncounterSubjectStatus implements HisEnumInterface {
|
||||||
PLANNED(1, "arrived", "已到达"),
|
PLANNED(1, "arrived", "已到达"),
|
||||||
|
|
||||||
TRIAGED(2, "triaged", "已分诊"),
|
TRIAGED(2, "triaged", "已分诊"),
|
||||||
|
|||||||
@@ -3,38 +3,12 @@ import com.baomidou.mybatisplus.annotation.EnumValue;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
/*代码值 代码名称 对应7.28医疗类别med_type 在2203接口用到此信息
|
/**
|
||||||
25 异地住院
|
* 医保类别
|
||||||
26 单病种住院
|
*/
|
||||||
27 自主就医
|
|
||||||
81 意外伤害门诊
|
|
||||||
15 特药
|
|
||||||
28 日间手术
|
|
||||||
61 照护保险
|
|
||||||
11 普通门诊
|
|
||||||
12 门诊挂号
|
|
||||||
13 急诊
|
|
||||||
14 门诊慢特病
|
|
||||||
990404 门诊特检特治(限吉林市)
|
|
||||||
21 普通住院
|
|
||||||
22 外伤住院
|
|
||||||
23 转外诊治住院
|
|
||||||
24 急诊转住院
|
|
||||||
41 定点药店购药
|
|
||||||
51 生育门诊
|
|
||||||
52 生育住院
|
|
||||||
5212 生育新生儿费用
|
|
||||||
16 中医特色门诊
|
|
||||||
29 起付线治疗
|
|
||||||
9107 体检
|
|
||||||
3101 低自付住院
|
|
||||||
3102 低自付门诊
|
|
||||||
140104 门诊慢病
|
|
||||||
140201 门诊特病
|
|
||||||
2114 舒缓疗护住院*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum EncounterYbClass {
|
public enum EncounterYbClass implements HisEnumInterface {
|
||||||
// 住院服务
|
// 住院服务
|
||||||
ORDINARY_HOSPITALIZATION(21, "21" , "普通住院"),
|
ORDINARY_HOSPITALIZATION(21, "21" , "普通住院"),
|
||||||
FOREIGN_HOSPITALIZATION(25,"25", "异地住院"),
|
FOREIGN_HOSPITALIZATION(25,"25", "异地住院"),
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门诊分类
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum OutpatientClass implements HisEnumInterface {
|
||||||
|
|
||||||
|
GENERAL_OUTPATIENT_SERVICE(1, "GOS", "普通门诊"),
|
||||||
|
EMERGENCY_TREATMENT(2, "ET", "急诊"),
|
||||||
|
HEALTH_COUNSELING(3, "HC", "健康咨询"),
|
||||||
|
SPECIALIZED_OUTPATIENT_DEPARTMENT(4, "SOD", "专科门诊"),
|
||||||
|
VIP_CLINIC(5, "VC", "特需门诊"),
|
||||||
|
SPECIALIZED_DISEASE_DEPARTMENT(6, "SOD", "专病门诊"),
|
||||||
|
APPOINTMENT_FOR_REGISTRATION(7, "AFR", "预约挂号"),
|
||||||
|
WESTERN_MEDICINE(11, "WM", "西医"),
|
||||||
|
TRADITIONAL_CHINESE_MEDICAL_SCIENCE(12, "TCMS", "中医"),
|
||||||
|
WESTERN_MEDICINE_EMERGENCY_DEPARTMENT(21, "WMED", "西医急诊"),
|
||||||
|
TRADITIONAL_CHINESE_MEDICINE_EMERGENCY(22, "TCME", "中医急诊"),
|
||||||
|
PHYSICAL_EXAMINATION(31, "PE", "体检"),
|
||||||
|
PREVENTIVE_MEDICAL_EXAMINATION(32, "PME", "预防体检"),
|
||||||
|
MATERNAL_AND_CHILD_HEALTH_CARE(33, "MACHC", "孕产保健"),
|
||||||
|
OTHER(99, "OT", "其他");
|
||||||
|
|
||||||
|
@EnumValue
|
||||||
|
private final Integer value;
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.openhis.common.enums;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先级
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PriorityLevel implements HisEnumInterface {
|
||||||
|
|
||||||
|
EMERGENCY(1, "EM", "紧急"),
|
||||||
|
PRIORITY(2, "PR", "优先"),
|
||||||
|
ORDINARY(3, "OR", "普通"),
|
||||||
|
NOT_URGENT(4, "NU", "不紧急");
|
||||||
|
|
||||||
|
@EnumValue
|
||||||
|
private final Integer value;
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
package com.openhis.administration.domain;
|
package com.openhis.administration.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
import com.openhis.common.enums.*;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 就诊管理Entity实体
|
* 就诊管理Entity实体
|
||||||
*
|
*
|
||||||
@@ -23,53 +23,86 @@ import lombok.experimental.Accessors;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class Encounter extends HisBaseEntity {
|
public class Encounter extends HisBaseEntity {
|
||||||
|
|
||||||
/** ID */
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 患者ID */
|
/**
|
||||||
|
* 患者ID
|
||||||
|
*/
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
/** 群组ID */
|
/**
|
||||||
|
* 群组ID
|
||||||
|
*/
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
/** 就诊编码 */
|
/**
|
||||||
|
* 就诊编码
|
||||||
|
*/
|
||||||
private String busNo;
|
private String busNo;
|
||||||
|
|
||||||
/** 状态编码 */
|
/**
|
||||||
private EncounterStatus statusEnum;
|
* 状态编码
|
||||||
|
*/
|
||||||
|
private Integer statusEnum;
|
||||||
|
|
||||||
/** 类别编码 */
|
/**
|
||||||
private EncounterClass classEnum;
|
* 类别编码
|
||||||
|
*/
|
||||||
|
private Integer classEnum;
|
||||||
|
|
||||||
/** 类别医保编码 */
|
/**
|
||||||
|
* 类别医保编码
|
||||||
|
*/
|
||||||
private Integer ybClassEnum;
|
private Integer ybClassEnum;
|
||||||
|
|
||||||
/** 类别编码补充 */
|
/**
|
||||||
|
* 类别编码补充
|
||||||
|
*/
|
||||||
private String classJson;
|
private String classJson;
|
||||||
|
|
||||||
/** 优先级编码 */
|
/**
|
||||||
private ActPriority priorityEnum;
|
* 优先级编码
|
||||||
|
*/
|
||||||
|
private Integer priorityEnum;
|
||||||
|
|
||||||
/** 分类编码 */
|
/**
|
||||||
private EncounterType typeEnum;
|
* 分类编码
|
||||||
|
*/
|
||||||
|
private Integer typeEnum;
|
||||||
|
|
||||||
/** 服务ID */
|
/**
|
||||||
|
* 服务ID
|
||||||
|
*/
|
||||||
private Long serviceTypeId;
|
private Long serviceTypeId;
|
||||||
|
|
||||||
/** 就诊对象状态 */
|
/**
|
||||||
private EncounterSubjectStatus subjectStatusEnum;
|
* 就诊对象状态
|
||||||
|
*/
|
||||||
|
private Integer subjectStatusEnum;
|
||||||
|
|
||||||
/** 开始时间 */
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
||||||
/** 结束时间 */
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
/** 机构id */
|
/**
|
||||||
|
* 机构id
|
||||||
|
*/
|
||||||
private Long organizationId;
|
private Long organizationId;
|
||||||
|
|
||||||
/** 就诊序号 */
|
/**
|
||||||
|
* 就诊序号
|
||||||
|
*/
|
||||||
private Integer displayOrder;
|
private Integer displayOrder;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -22,6 +24,7 @@ public class HealthcareService extends HisBaseEntity {
|
|||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 活动标记 */
|
/** 活动标记 */
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package com.openhis.administration.service;
|
package com.openhis.administration.service;
|
||||||
|
|
||||||
import java.util.Date;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者管理Service接口
|
* 患者管理Service接口
|
||||||
*
|
*
|
||||||
@@ -15,7 +16,7 @@ public interface IPatientService extends IService<Patient> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 从身份证号码中提取生日
|
* 从身份证号码中提取生日
|
||||||
*
|
*
|
||||||
* @param idCard 身份证号
|
* @param idCard 身份证号
|
||||||
* @return 出生日
|
* @return 出生日
|
||||||
*/
|
*/
|
||||||
@@ -27,5 +28,7 @@ public interface IPatientService extends IService<Patient> {
|
|||||||
* @param date 字符串日期
|
* @param date 字符串日期
|
||||||
* @return 是/否
|
* @return 是/否
|
||||||
*/
|
*/
|
||||||
boolean isFuture(String date);
|
boolean isFuture(String date);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,21 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import java.time.ZoneId;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.openhis.administration.domain.Patient;
|
||||||
import com.openhis.administration.mapper.PatientMapper;
|
import com.openhis.administration.mapper.PatientMapper;
|
||||||
import com.openhis.administration.service.IPatientService;
|
import com.openhis.administration.service.IPatientService;
|
||||||
|
import com.openhis.common.utils.HisPageUtils;
|
||||||
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 患者管理Service业务层处理
|
* 患者管理Service业务层处理
|
||||||
@@ -62,4 +67,5 @@ public class PatientServiceImpl extends ServiceImpl<PatientMapper, Patient> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -82,6 +82,9 @@ public class ServiceRequest extends HisBaseEntity {
|
|||||||
/** 执行人 */
|
/** 执行人 */
|
||||||
private Long performerId;
|
private Long performerId;
|
||||||
|
|
||||||
|
/** 核对人 */
|
||||||
|
private Long performerCheckId;
|
||||||
|
|
||||||
/** 执行位置 */
|
/** 执行位置 */
|
||||||
private Long locationId;
|
private Long locationId;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { parseStrEmpty } from "@/utils/openhis";
|
import { parseStrEmpty } from "@/utils/openhis";
|
||||||
|
|
||||||
// 查询病种目录列表
|
// 查询厂商列表
|
||||||
export function getSupplierList(query) {
|
export function getSupplierList(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data-dictionary/supplier/get-supplier-list',
|
url: '/data-dictionary/supplier/get-supplier-list',
|
||||||
@@ -10,7 +10,7 @@ export function getSupplierList(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询病种目录详细
|
// 查询厂商详细
|
||||||
export function getSupplierOne(id) {
|
export function getSupplierOne(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data-dictionary/supplier/get-supplier-detail/' + parseStrEmpty(id),
|
url: '/data-dictionary/supplier/get-supplier-detail/' + parseStrEmpty(id),
|
||||||
@@ -18,7 +18,7 @@ export function getSupplierOne(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增病种目录
|
// 新增厂商
|
||||||
export function addSupplier(data) {
|
export function addSupplier(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data-dictionary/supplier/add-supplier',
|
url: '/data-dictionary/supplier/add-supplier',
|
||||||
@@ -27,7 +27,7 @@ export function addSupplier(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改病种目录
|
// 修改厂商
|
||||||
export function editSupplier(data) {
|
export function editSupplier(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data-dictionary/supplier/edit-supplier',
|
url: '/data-dictionary/supplier/edit-supplier',
|
||||||
@@ -36,7 +36,7 @@ export function editSupplier(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 删除病种目录
|
// // 删除厂商
|
||||||
// export function delUser(userId) {
|
// export function delUser(userId) {
|
||||||
// return request({
|
// return request({
|
||||||
// url: '/system/user/' + userId,
|
// url: '/system/user/' + userId,
|
||||||
@@ -44,7 +44,7 @@ export function editSupplier(data) {
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 停用病种目录
|
// 停用厂商
|
||||||
export function stopSupplier(ids) {
|
export function stopSupplier(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data-dictionary/supplier/information-stop',
|
url: '/data-dictionary/supplier/information-stop',
|
||||||
@@ -53,7 +53,7 @@ export function stopSupplier(ids) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 启用病种目录
|
// 启用厂商
|
||||||
export function startSupplier(ids) {
|
export function startSupplier(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data-dictionary/supplier/information-start',
|
url: '/data-dictionary/supplier/information-start',
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import { parseStrEmpty } from "@/utils/openhis";
|
||||||
|
|
||||||
|
// 查询服务管理列表
|
||||||
|
export function getRegistrationfeeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/basic-service/healthcare/healthcare-service-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询服务管理详细
|
||||||
|
export function getRegistrationfeeOne(id) {
|
||||||
|
return request({
|
||||||
|
url: '/basic-service/healthcare/healthcare-service-detail/' + parseStrEmpty(id),
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增服务管理
|
||||||
|
export function addRegistrationfee(data) {
|
||||||
|
return request({
|
||||||
|
url: '/basic-service/healthcare/healthcare-service',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改服务管理
|
||||||
|
export function editRegistrationfee(data) {
|
||||||
|
return request({
|
||||||
|
url: '/basic-service/healthcare/healthcare-service',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询厂商类型
|
||||||
|
export function getInit() {
|
||||||
|
return request({
|
||||||
|
url: '/basic-service/healthcare/init',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询部门树形数据
|
||||||
|
export function deptTreeSelect(queryParams) {
|
||||||
|
return request({
|
||||||
|
url: '/basedatamanage/organization/organization',
|
||||||
|
method: 'get',
|
||||||
|
param: queryParams
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询地点树形数据
|
||||||
|
export function locationTreeSelect(queryParams) {
|
||||||
|
return request({
|
||||||
|
url: '/basedatamanage/organization/organization',
|
||||||
|
method: 'get',
|
||||||
|
param: queryParams
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除收费挂号项目
|
||||||
|
export function delRegistrationfee(param) {
|
||||||
|
console.log(param,'aaaa')
|
||||||
|
return request({
|
||||||
|
url: '/basic-service/healthcare/healthcare-service',
|
||||||
|
method: 'delete',
|
||||||
|
params: param
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -0,0 +1,835 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="90px"
|
||||||
|
>
|
||||||
|
<el-form-item label="服务名称:" prop="searchKey">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.searchKey"
|
||||||
|
placeholder="服务名称"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="是否需要预约:"
|
||||||
|
prop="appointmentRequiredFlag"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.appointmentRequiredFlag"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in appointmentRequiredFlagOptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动标记:" prop="activeFlag">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.activeFlag"
|
||||||
|
placeholder=""
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in activeFlagOptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:user:add']"
|
||||||
|
>添加</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Remove"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleClose"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>停用</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="CirclePlus"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleStart"
|
||||||
|
v-hasPermi="['system:user:remove']"
|
||||||
|
>启用</el-button
|
||||||
|
>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['monitor:job:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Search"
|
||||||
|
@click="getList"
|
||||||
|
v-hasPermi="['system:user:import']"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="CircleClose"
|
||||||
|
@click="handleClear"
|
||||||
|
v-hasPermi="['system:user:export']"
|
||||||
|
>清空条件</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="registrationfeeList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column label="服务名称" align="center" key="name" prop="name" />
|
||||||
|
<el-table-column
|
||||||
|
label="活动标记"
|
||||||
|
align="center"
|
||||||
|
key="activeFlag_enumText"
|
||||||
|
prop="activeFlag_enumText"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="提供部门"
|
||||||
|
align="center"
|
||||||
|
key="offeredOrgId_dictText"
|
||||||
|
prop="offeredOrgId_dictText"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="服务分类"
|
||||||
|
align="center"
|
||||||
|
key="categoryCode_dictText"
|
||||||
|
prop="categoryCode_dictText"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="服务类型 "
|
||||||
|
align="center"
|
||||||
|
key="typeCode_dictText"
|
||||||
|
prop="typeCode_dictText"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="服务专业"
|
||||||
|
align="center"
|
||||||
|
key="specialtyCode_dictText"
|
||||||
|
prop="specialtyCode_dictText"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="地点"
|
||||||
|
align="center"
|
||||||
|
key="locationId_dictText"
|
||||||
|
prop="locationId_dictText"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="说明"
|
||||||
|
align="center"
|
||||||
|
key="comment"
|
||||||
|
prop="comment"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="额外细节"
|
||||||
|
align="center"
|
||||||
|
key="extraDetails"
|
||||||
|
prop="extraDetails"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="联系方式"
|
||||||
|
align="center"
|
||||||
|
key="contact"
|
||||||
|
prop="contact"
|
||||||
|
width="120"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="预约要求"
|
||||||
|
align="center"
|
||||||
|
key="appointmentRequiredFlag_enumText"
|
||||||
|
prop="appointmentRequiredFlag_enumText"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
align="center"
|
||||||
|
key="chargeName"
|
||||||
|
prop="chargeName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="基础价格"
|
||||||
|
align="center"
|
||||||
|
key="price"
|
||||||
|
prop="price"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="140"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="View"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['system:user:remove']"
|
||||||
|
>查看</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改服务管理对话框 -->
|
||||||
|
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
ref="registrationfeeRef"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<div class="title">服务管理</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="服务名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="form.name"
|
||||||
|
placeholder="请输入服务名称"
|
||||||
|
maxlength="30"
|
||||||
|
:disabled="form.id != undefined"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="服务分类" prop="categoryCode">
|
||||||
|
<el-select v-model="form.categoryCode" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in category_code"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="服务类型" prop="fwTypeCode">
|
||||||
|
<el-select v-model="form.fwTypeCode" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in service_type_code"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="服务专业" prop="specialtyCode">
|
||||||
|
<el-select v-model="form.specialtyCode" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in specialty_code"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="地点" prop="locationId">
|
||||||
|
<el-tree-select
|
||||||
|
v-model="form.locationId"
|
||||||
|
:data="deptOptions"
|
||||||
|
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择地点"
|
||||||
|
check-strictly
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="提供部门" prop="offeredOrgId">
|
||||||
|
<el-tree-select
|
||||||
|
v-model="form.offeredOrgId"
|
||||||
|
:data="deptOptions"
|
||||||
|
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择提供部门"
|
||||||
|
check-strictly
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="活动标记" prop="activeFlag">
|
||||||
|
<el-select v-model="form.activeFlag" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in activeFlagOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="额外细节" prop="extraDetails;">
|
||||||
|
<el-input v-model="form.extraDetails" maxlength="11" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系方式" prop="contact">
|
||||||
|
<el-input v-model="form.contact" maxlength="11" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="预约要求" prop="appointmentRequiredFlag">
|
||||||
|
<el-select
|
||||||
|
v-model="form.appointmentRequiredFlag"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in appointmentRequiredFlagOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-form-item label="服务说明" prop="description">
|
||||||
|
<el-input
|
||||||
|
v-model="form.description"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||||
|
type="textarea"
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="title">费用管理</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="名称" prop="chargeName;">
|
||||||
|
<el-input
|
||||||
|
v-model="form.chargeName"
|
||||||
|
:disabled="form.id != undefined"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="基础价格" prop="price">
|
||||||
|
<el-input v-model="form.price" :disabled="form.id != undefined" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.id == undefined">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="收费项目标题" prop="title">
|
||||||
|
<el-input v-model="form.title" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="医保类别" prop="ybType">
|
||||||
|
<el-select
|
||||||
|
v-model="form.ybType"
|
||||||
|
placeholder="医保类别"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in med_chrgitm_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="form.id == undefined">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="财务类型" prop="cwTypeCode">
|
||||||
|
<el-select v-model="form.cwTypeCode" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in financial_type_code"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="24" v-if="form.id == undefined">
|
||||||
|
<el-col :span="16">
|
||||||
|
<el-form-item label="收费说明" prop="comment">
|
||||||
|
<el-input
|
||||||
|
v-model="form.comment"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||||
|
type="textarea"
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer v-if="title != '查看'">
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Registrationfee">
|
||||||
|
import {
|
||||||
|
getRegistrationfeeList,
|
||||||
|
editRegistrationfee,
|
||||||
|
addRegistrationfee,
|
||||||
|
getRegistrationfeeOne,
|
||||||
|
getInit,
|
||||||
|
deptTreeSelect,
|
||||||
|
locationTreeSelect,
|
||||||
|
delRegistrationfee,
|
||||||
|
} from "./components/registrationfee";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const {
|
||||||
|
adm_location,
|
||||||
|
category_code,
|
||||||
|
service_type_code,
|
||||||
|
specialty_code,
|
||||||
|
med_chrgitm_type,
|
||||||
|
financial_type_code,
|
||||||
|
} = proxy.useDict(
|
||||||
|
"adm_location",
|
||||||
|
"category_code",
|
||||||
|
"service_type_code",
|
||||||
|
"specialty_code",
|
||||||
|
"med_chrgitm_type",
|
||||||
|
"financial_type_code"
|
||||||
|
);
|
||||||
|
|
||||||
|
const registrationfeeList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
const activeFlagOptions = ref(undefined);
|
||||||
|
const appointmentRequiredFlagOptions = ref(undefined);
|
||||||
|
const deptOptions = ref(undefined); // 部门树选项
|
||||||
|
const locationOptions = ref(undefined); // 地点树选项
|
||||||
|
|
||||||
|
// 是否停用
|
||||||
|
const statusFlagOptions = ref(undefined);
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
searchKey: undefined, // 供应商名称
|
||||||
|
busNo: undefined, // 编码
|
||||||
|
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||||
|
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
offeredOrgId: [
|
||||||
|
{ required: true, message: "提供部门不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
categoryCode: [
|
||||||
|
{ required: true, message: "服务分类不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
fwTypeCode: [
|
||||||
|
{ required: true, message: "服务类型不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
specialtyCode: [
|
||||||
|
{ required: true, message: "服务专业不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||||
|
name: [{ required: true, message: "服务名称不能为空", trigger: "blur" }],
|
||||||
|
contact: [
|
||||||
|
{ required: true, message: "联系人电话不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
appointmentRequiredFlag: [
|
||||||
|
{ required: true, message: "预约要求不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
activeFlag: [
|
||||||
|
{ required: true, message: "活动标识不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
chargeName: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||||
|
description: [{ required: true, message: "描述不能为空", trigger: "blur" }],
|
||||||
|
cwTypeCode: [
|
||||||
|
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
ybType: [{ required: true, message: "医保类别不能为空", trigger: "blur" }],
|
||||||
|
price: [{ required: true, message: "基础价格不能为空", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 挂号收费查询下拉树结构 */
|
||||||
|
function getregistrationfeeTypeList() {
|
||||||
|
getInit().then((response) => {
|
||||||
|
console.log(response, "response");
|
||||||
|
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
|
||||||
|
appointmentRequiredFlagOptions.value =
|
||||||
|
response.data.appointmentRequiredFlagOptions; // 预约必填标记
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询部门下拉树结构 */
|
||||||
|
function getDeptTree() {
|
||||||
|
deptTreeSelect().then((response) => {
|
||||||
|
console.log(response, "response查询部门下拉树结构");
|
||||||
|
|
||||||
|
deptOptions.value = response.data.records;
|
||||||
|
console.log(deptOptions.value, "部门下拉树结构");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询地点下拉树结构 */
|
||||||
|
function getLocationTree() {
|
||||||
|
locationTreeSelect().then((response) => {
|
||||||
|
console.log(response, "response查询部门下拉树结构");
|
||||||
|
locationOptions.value = response.data.records;
|
||||||
|
console.log(locationOptions.value, "部门下拉树结构");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 查询挂号收费项目列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||||
|
console.log(queryParams.value, "queryParams.value");
|
||||||
|
getRegistrationfeeList(queryParams.value).then((res) => {
|
||||||
|
loading.value = false;
|
||||||
|
console.log(res, "res");
|
||||||
|
registrationfeeList.value = res.data.records;
|
||||||
|
total.value = res.data.total;
|
||||||
|
console.log(total.value, "total.value");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 清空条件按钮操作 */
|
||||||
|
function handleClear() {
|
||||||
|
// 清空查询条件
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 选择条数 */
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
console.log(selection, "selection");
|
||||||
|
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||||
|
ids.value = selection.map((item) => item.id);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 重置操作表单 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
categoryCode: undefined,
|
||||||
|
cwTypeCode: undefined,
|
||||||
|
fwTypeCode: undefined,
|
||||||
|
specialtyCode: undefined,
|
||||||
|
locationId: 1,
|
||||||
|
offeredOrgId: undefined,
|
||||||
|
activeFlag: undefined,
|
||||||
|
extraDetails: undefined,
|
||||||
|
contact: undefined,
|
||||||
|
appointmentRequiredFlag: undefined,
|
||||||
|
chargeName: undefined,
|
||||||
|
price: undefined,
|
||||||
|
description: undefined,
|
||||||
|
ybType: undefined,
|
||||||
|
title: undefined,
|
||||||
|
};
|
||||||
|
proxy.resetForm("registrationfeeRef");
|
||||||
|
}
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
// 恢复规则
|
||||||
|
rules.value.cwTypeCode = [
|
||||||
|
{ required: true, message: "财务类别不能为空", trigger: "blur" },
|
||||||
|
];
|
||||||
|
rules.value.ybType = [
|
||||||
|
{ required: true, message: "医保类别不能为空", trigger: "blur" },
|
||||||
|
];
|
||||||
|
rules.value.price = [
|
||||||
|
{ required: true, message: "基础价格不能为空", trigger: "blur" },
|
||||||
|
];
|
||||||
|
|
||||||
|
rules.value.chargeName = [
|
||||||
|
{ required: true, message: "名称不能为空", trigger: "blur" },
|
||||||
|
];
|
||||||
|
rules.value.description = [
|
||||||
|
{ required: true, message: "描述不能为空", trigger: "blur" },
|
||||||
|
];
|
||||||
|
|
||||||
|
open.value = true;
|
||||||
|
title.value = "新增";
|
||||||
|
}
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
// 移除规则
|
||||||
|
rules.value.chargeName = [];
|
||||||
|
rules.value.description = [];
|
||||||
|
rules.value.cwTypeCode = [];
|
||||||
|
rules.value.ybType = [];
|
||||||
|
rules.value.price = [];
|
||||||
|
console.log(row, "row");
|
||||||
|
form.value = JSON.parse(JSON.stringify(row));
|
||||||
|
form.value.fwTypeCode = form.value.typeCode;
|
||||||
|
open.value = true;
|
||||||
|
title.value = "编辑";
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["registrationfeeRef"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.id != undefined) {
|
||||||
|
// 调用转换函数
|
||||||
|
const transformFormEditParam = transformFormEditData(form);
|
||||||
|
console.log(transformFormEditData, "transformFormEditData");
|
||||||
|
console.log(form.value, "editRegistrationfee", form.value.statusEnum);
|
||||||
|
editRegistrationfee(transformFormEditParam).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 调用转换函数
|
||||||
|
const transformedData = transformFormData(form);
|
||||||
|
console.log(transformedData, "transformedData");
|
||||||
|
addRegistrationfee(transformedData).then((response) => {
|
||||||
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
|
open.value = false;
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 详细按钮操作 */
|
||||||
|
function handleView(row) {
|
||||||
|
reset();
|
||||||
|
title.value = "查看";
|
||||||
|
open.value = true;
|
||||||
|
getRegistrationfeeOne(row.id).then((response) => {
|
||||||
|
console.log(response, "responsebbbb", row.id);
|
||||||
|
form.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
const delId = row.id || ids.value;
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确认删除以上数据?")
|
||||||
|
.then(function () {
|
||||||
|
return delRegistrationfee({ ids: delId.join(",") });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
// 转换insert参数函数
|
||||||
|
const transformFormData = (form) => {
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
categoryCode,
|
||||||
|
// typeCode,
|
||||||
|
cwTypeCode,
|
||||||
|
fwTypeCode,
|
||||||
|
specialtyCode,
|
||||||
|
locationId,
|
||||||
|
offeredOrgId,
|
||||||
|
activeFlag,
|
||||||
|
extraDetails,
|
||||||
|
contact,
|
||||||
|
appointmentRequiredFlag,
|
||||||
|
chargeName,
|
||||||
|
price,
|
||||||
|
description,
|
||||||
|
ybType,
|
||||||
|
title,
|
||||||
|
} = form.value;
|
||||||
|
|
||||||
|
return {
|
||||||
|
healthcareServiceFormData: {
|
||||||
|
id,
|
||||||
|
activeFlag,
|
||||||
|
offeredOrgId,
|
||||||
|
categoryCode,
|
||||||
|
typeCode: fwTypeCode,
|
||||||
|
specialtyCode,
|
||||||
|
locationId,
|
||||||
|
name,
|
||||||
|
contact,
|
||||||
|
appointmentRequiredFlag,
|
||||||
|
extraDetails,
|
||||||
|
},
|
||||||
|
chargeItemDefinitionFormData: {
|
||||||
|
id,
|
||||||
|
chargeName,
|
||||||
|
title,
|
||||||
|
orgId: offeredOrgId,
|
||||||
|
description,
|
||||||
|
typeCode: cwTypeCode,
|
||||||
|
ybType,
|
||||||
|
price,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// 转换insert参数函数
|
||||||
|
const transformFormEditData = (form) => {
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
categoryCode,
|
||||||
|
// typeCode,
|
||||||
|
cwTypeCode,
|
||||||
|
fwTypeCode,
|
||||||
|
specialtyCode,
|
||||||
|
locationId,
|
||||||
|
offeredOrgId,
|
||||||
|
activeFlag,
|
||||||
|
extraDetails,
|
||||||
|
contact,
|
||||||
|
appointmentRequiredFlag,
|
||||||
|
chargeName,
|
||||||
|
price,
|
||||||
|
description,
|
||||||
|
ybType,
|
||||||
|
title,
|
||||||
|
} = form.value;
|
||||||
|
|
||||||
|
return {
|
||||||
|
healthcareServiceFormData: {
|
||||||
|
id,
|
||||||
|
activeFlag,
|
||||||
|
offeredOrgId,
|
||||||
|
categoryCode,
|
||||||
|
typeCode: fwTypeCode,
|
||||||
|
specialtyCode,
|
||||||
|
locationId,
|
||||||
|
name,
|
||||||
|
contact,
|
||||||
|
appointmentRequiredFlag,
|
||||||
|
extraDetails,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
getregistrationfeeTypeList();
|
||||||
|
getDeptTree();
|
||||||
|
getList();
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.custom-tree-node {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: large;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function listOutpatienRecords(query) {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/records/outpatient-record-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function listDoctorNames() {
|
||||||
|
return request({
|
||||||
|
url: '/patientmanage/records/list-doctornames',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
<el-form-item label="查询内容" prop="searchKey">
|
||||||
|
<el-input v-model="queryParams.searchKey" placeholder="身份证号/病人ID/门诊号/姓名" clearable style="width: 210px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电话" prop="phone">
|
||||||
|
<el-input v-model="queryParams.phone" placeholder="请输入联系方式" clearable style="width: 200px"
|
||||||
|
@keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="起始时间">
|
||||||
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
|
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="医生" prop="doctorName">
|
||||||
|
<el-select v-model="queryParams.doctorName" placeholder="请选择医生" clearable @keyup.enter="handleQuery"
|
||||||
|
style="width: 160px">
|
||||||
|
<el-option v-for="item in doctorOptions" :key="item.value" :label="item.label"
|
||||||
|
:value="item.label" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="outpatienRecordsList" border style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="患者" width="180" />
|
||||||
|
<el-table-column prop="idCard" label="身份证" width="180" />
|
||||||
|
<el-table-column prop="description" label="疾病" width="180" />
|
||||||
|
<el-table-column prop="patientBusNo" label="病人ID" width="180" />
|
||||||
|
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||||
|
<el-table-column prop="phone" label="电话" width="120" />
|
||||||
|
<el-table-column prop="encounterTime" label="就诊时间" width="180" />
|
||||||
|
<el-table-column prop="subjectStatusEnum_enumText" label="状态" width="120" />
|
||||||
|
<el-table-column prop="organizationName" label="接诊医院" width="180" />
|
||||||
|
<el-table-column prop="doctorName" label="接诊医生" width="180" />
|
||||||
|
<!-- <el-table-column prop="address" label="会诊医院" width="180" />
|
||||||
|
<el-table-column prop="workCompany" label="会诊医生工作单位" width="180" />
|
||||||
|
<el-table-column prop="organizationName" label="协同服务" width="180" /> -->
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||||
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="outpatienRecords">
|
||||||
|
import { ref, computed } from 'vue';
|
||||||
|
import { listOutpatienRecords, listDoctorNames } from "./component/api"
|
||||||
|
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const outpatienRecordsList = ref([]);
|
||||||
|
const doctorList = ref([]);
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
doctorName: undefined,
|
||||||
|
searchKey: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
patientid: undefined
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
const doctorOptions = computed(() => {
|
||||||
|
return doctorList.value.map((name, index) => ({
|
||||||
|
value: index, // 使用索引作为 value
|
||||||
|
label: name // 使用名字作为 label
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 查询门诊记录列表 */
|
||||||
|
function getList() {
|
||||||
|
listOutpatienRecords(queryParams.value).then(response => {
|
||||||
|
console.log(response);
|
||||||
|
outpatienRecordsList.value = response.data.records;
|
||||||
|
total.value = response.data.total;
|
||||||
|
});
|
||||||
|
listDoctorNames().then(response => {
|
||||||
|
doctorList.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.beginTime = dateRange.value[0];
|
||||||
|
queryParams.value.endTime = dateRange.value[1];
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
console.log("123",queryParams.value,typeof queryParams.value.beginTime)
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
|
||||||
|
</script>
|
||||||
@@ -26,18 +26,18 @@
|
|||||||
<el-table-column prop="idCard" label="身份证号" width="180" />
|
<el-table-column prop="idCard" label="身份证号" width="180" />
|
||||||
<el-table-column prop="busNo" label="病人ID" width="180" />
|
<el-table-column prop="busNo" label="病人ID" width="180" />
|
||||||
<el-table-column prop="name" label="病人名称" width="180" />
|
<el-table-column prop="name" label="病人名称" width="180" />
|
||||||
<el-table-column prop="genderEnum_text" label="性别" width="180" />
|
<el-table-column prop="genderEnum_enumText" label="性别" width="180" />
|
||||||
<el-table-column prop="maritalStatusEnum_text" label="婚姻状况" width="180" /><!--:formatter="formatMaritalStatus"-->
|
<el-table-column prop="maritalStatusEnum_enumText" label="婚姻状况" width="180" /><!--:formatter="formatMaritalStatus"-->
|
||||||
<el-table-column prop="nationalityCode" label="民族" width="180" />
|
<el-table-column prop="nationalityCode" label="民族" width="180" />
|
||||||
<el-table-column prop="birthDate" label="生日" width="160" />
|
<el-table-column prop="birthDate" label="生日" width="160" />
|
||||||
<el-table-column prop="phone" label="电话" width="140" />
|
<el-table-column prop="phone" label="电话" width="140" />
|
||||||
<el-table-column prop="bloodAbo_text" label="血型ABO" width="140" />
|
<el-table-column prop="bloodAbo_text" label="血型ABO" width="140" />
|
||||||
<el-table-column prop="bloodRh_text" label="血型RH" width="140" />
|
<el-table-column prop="bloodRh_enumText" label="血型RH" width="140" />
|
||||||
<el-table-column prop="linkName" label="联系人" width="180" />
|
<el-table-column prop="linkName" label="联系人" width="180" />
|
||||||
<el-table-column prop="linkTelcom" label="联系人电话" width="180" />
|
<el-table-column prop="linkTelcom" label="联系人电话" width="180" />
|
||||||
<el-table-column prop="linkRelationCode_text" label="联系人关系" width="180" />
|
<el-table-column prop="linkRelationCode_enumText" label="联系人关系" width="180" />
|
||||||
<el-table-column prop="address" label="家庭地址" width="180" />
|
<el-table-column prop="address" label="家庭地址" width="180" />
|
||||||
<el-table-column prop="prfsEnum_text" label="职业" width="180" />
|
<el-table-column prop="prfsEnum_enumText" label="职业" width="180" />
|
||||||
<el-table-column prop="workCompany" label="工作单位" width="180" />
|
<el-table-column prop="workCompany" label="工作单位" width="180" />
|
||||||
<el-table-column prop="organizationName" label="登记医院" width="180" />
|
<el-table-column prop="organizationName" label="登记医院" width="180" />
|
||||||
<el-table-column prop="deceasedDate" label="死亡时间" width="180" />
|
<el-table-column prop="deceasedDate" label="死亡时间" width="180" />
|
||||||
@@ -238,7 +238,7 @@ const administrativegenderList = ref([]) //性别
|
|||||||
const bloodtypeaboList = ref([]) //血型abo
|
const bloodtypeaboList = ref([]) //血型abo
|
||||||
const bloodtypearhList = ref([]) //血型RH
|
const bloodtypearhList = ref([]) //血型RH
|
||||||
const familyrelationshiptypeList = ref([]) //家庭关系
|
const familyrelationshiptypeList = ref([]) //家庭关系
|
||||||
const addressCom = ref("");
|
const addressCom = ref(""); //地址
|
||||||
|
|
||||||
const options = ref(pcas); // 地区数据
|
const options = ref(pcas); // 地区数据
|
||||||
const selectedOptions = ref([]); // v-model 绑定的选中值
|
const selectedOptions = ref([]); // v-model 绑定的选中值
|
||||||
@@ -295,7 +295,6 @@ const findNodeByCode = (data, code) => {
|
|||||||
/** 查询菜单列表 */
|
/** 查询菜单列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
listPatient(queryParams.value).then(response => {
|
listPatient(queryParams.value).then(response => {
|
||||||
console.log("res",response,queryParams.value)
|
|
||||||
patientList.value = response.data.records
|
patientList.value = response.data.records
|
||||||
total.value = response.data.total;
|
total.value = response.data.total;
|
||||||
});
|
});
|
||||||
@@ -386,7 +385,6 @@ function handleUpdate(row) {
|
|||||||
const codes = convertAddressToCodes(selectedOptions1.value);
|
const codes = convertAddressToCodes(selectedOptions1.value);
|
||||||
selectedOptions.value = codes.filter(code => code !== null);
|
selectedOptions.value = codes.filter(code => code !== null);
|
||||||
isViewMode.value = false;
|
isViewMode.value = false;
|
||||||
console.log("form.value12",form.value)
|
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "修改菜单";
|
title.value = "修改菜单";
|
||||||
}
|
}
|
||||||
@@ -422,25 +420,18 @@ function submitForm() {
|
|||||||
if (form.value.busNo != undefined) {
|
if (form.value.busNo != undefined) {
|
||||||
const newAddress = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
|
const newAddress = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
|
||||||
if (addressCom.value !== newAddress) {
|
if (addressCom.value !== newAddress) {
|
||||||
console.log("6666666666", form.value.address,addressCom.value);
|
|
||||||
// 如果不一致,清空并重新赋值
|
|
||||||
form.value.address = newAddress;
|
form.value.address = newAddress;
|
||||||
console.log("地址已更新为:", form.value.address);
|
}
|
||||||
}
|
|
||||||
console.log("form.value.up",form.value)
|
|
||||||
updatePatient(form.value).then(response => {
|
updatePatient(form.value).then(response => {
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
open.value = false;
|
open.value = false;
|
||||||
reset()
|
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
form.value.address = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
|
form.value.address = form.value.addressProvince+form.value.addressCity + form.value.addressDistrict + form.value.addressStreet + form.value.address
|
||||||
console.log("form.value",form.value)
|
|
||||||
addPatient(form.value).then(response => {
|
addPatient(form.value).then(response => {
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
proxy.$modal.msgSuccess("新增成功");
|
||||||
open.value = false;
|
open.value = false;
|
||||||
reset()
|
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export default defineConfig (({mode, command}) => {
|
|||||||
},
|
},
|
||||||
// vite 相关配置
|
// vite 相关配置
|
||||||
server: {
|
server: {
|
||||||
port: 80,
|
port: 81,
|
||||||
host: true,
|
host: true,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
|
|||||||
Reference in New Issue
Block a user