From 3f278c3cb4d452d756b20a916f660a45b7b502fb Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Thu, 29 Feb 2024 11:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E7=BA=A6=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 4 +- .../common/config/SystemBusinessConfig.java | 9 + .../com/xinelu/common/constant/Constants.java | 10 + .../constant/PaymentStatusConstants.java | 18 + .../SignRecordServiceStatusConstants.java | 44 ++ .../common/utils/file/FileUploadUtils.java | 73 ++- .../PatientBlacklistController.java | 55 +-- .../controller/PatientInfoController.java | 40 +- .../SignPatientInformedController.java | 48 +- .../SignPatientPackageHardwareController.java | 10 +- .../SignPatientRecordController.java | 90 ++++ .../manage/domain/PatientBlacklist.java | 4 + .../com/xinelu/manage/domain/PatientInfo.java | 23 +- .../manage/domain/SignPatientInformed.java | 48 ++ .../manage/domain/SignPatientPackage.java | 5 + .../domain/SignPatientPackageHardware.java | 60 +-- .../manage/domain/SignPatientRecord.java | 185 ++++++++ .../com/xinelu/manage/dto/ManageTestDTO.java | 14 - .../manage/dto/PatientBlacklistDto.java | 46 ++ .../com/xinelu/manage/dto/PatientInfoDto.java | 111 +++++ .../xinelu/manage/dto/PatientSignAddDto.java | 28 ++ .../manage/dto/PatientSignStatusDto.java | 27 ++ .../xinelu/manage/dto/SignPatientListDto.java | 101 +++++ .../manage/mapper/PatientBlacklistMapper.java | 7 +- .../manage/mapper/PatientInfoMapper.java | 6 +- .../mapper/SignPatientInformedMapper.java | 2 +- .../SignPatientPackageHardwareMapper.java | 2 +- .../mapper/SignPatientRecordMapper.java | 36 ++ .../service/IPatientBlacklistService.java | 7 +- .../manage/service/IPatientInfoService.java | 6 +- .../service/ISignPatientInformedService.java | 12 +- .../service/ISignPatientRecordService.java | 37 ++ .../impl/PatientBlacklistServiceImpl.java | 26 +- .../service/impl/PatientInfoServiceImpl.java | 12 +- .../impl/SignPatientInformedServiceImpl.java | 39 +- .../impl/SignPatientRecordServiceImpl.java | 117 +++++ .../xinelu/manage/vo/PatientBlacklistVo.java | 81 ++++ .../xinelu/manage/vo/PatientSignInfoVo.java | 152 +++++++ .../xinelu/manage/vo/PatientSignRecordVo.java | 49 ++ .../xinelu/manage/vo/SignPatientListVo.java | 137 ++++++ .../mapper/manage/PatientBlacklistMapper.xml | 51 ++- .../mapper/manage/PatientInfoMapper.xml | 82 ++-- .../manage/SignPatientInformedMapper.xml | 119 ++--- .../SignPatientPackageHardwareMapper.xml | 219 ++++----- .../manage/SignPatientPackageMapper.xml | 190 ++++---- .../mapper/manage/SignPatientRecordMapper.xml | 418 ++++++++++++++++++ 46 files changed, 2412 insertions(+), 448 deletions(-) create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/constant/PaymentStatusConstants.java create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/constant/SignRecordServiceStatusConstants.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientRecordController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientInformed.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientRecord.java delete mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/ManageTestDTO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientBlacklistDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientInfoDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignAddDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignStatusDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/SignPatientListDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientRecordMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientRecordService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientRecordServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientBlacklistVo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignInfoVo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignRecordVo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/SignPatientListVo.java create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/SignPatientRecordMapper.xml diff --git a/postdischarge-admin/src/main/resources/application.yml b/postdischarge-admin/src/main/resources/application.yml index 4ed37c19..2fbc1ebf 100644 --- a/postdischarge-admin/src/main/resources/application.yml +++ b/postdischarge-admin/src/main/resources/application.yml @@ -10,6 +10,8 @@ xinelu: demoEnabled: true # 文件路径 示例( Windows配置D:/postdischarge/uploadPath,Linux配置 /home/postdischarge/uploadPath) profile: D:/postdischarge/uploadPath + # 签约知情书上传 + sign-informed-file-url: /signInformed # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数组计算 char 字符验证 @@ -68,7 +70,7 @@ spring: # 数据库索引 database: 6 # 密码 - password: xinelu@6990 + password: # 连接超时时间 timeout: 10s lettuce: diff --git a/postdischarge-common/src/main/java/com/xinelu/common/config/SystemBusinessConfig.java b/postdischarge-common/src/main/java/com/xinelu/common/config/SystemBusinessConfig.java index 0b6559f5..e306ff85 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/config/SystemBusinessConfig.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/config/SystemBusinessConfig.java @@ -46,6 +46,11 @@ public class SystemBusinessConfig { */ private static String captchaType; + /** + * 签约知情书地址 + */ + private String signInformedFileUrl; + public String getName() { return name; } @@ -129,4 +134,8 @@ public class SystemBusinessConfig { public static String getUploadPath() { return getProfile() + "/upload"; } + + public String getSignInformedFileUrl() { + return signInformedFileUrl; + } } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java index 0be737ca..f8c1f07a 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java @@ -133,4 +133,14 @@ public class Constants { */ public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.xinelu.common.utils.file"}; + + /** + * 图片上传文件带.的 + */ + public static final String FILE_NAME_SPOT = "."; + + /** + * 字符串空格标识 + */ + public static final String EMPTY = " "; } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/PaymentStatusConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/PaymentStatusConstants.java new file mode 100644 index 00000000..2f051afa --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/PaymentStatusConstants.java @@ -0,0 +1,18 @@ +package com.xinelu.common.constant; + +/** + * @description: 缴费状态 + * @author: haown + * @create: 2024-02-29 09:59 + **/ +public class PaymentStatusConstants { + /** + * 已缴费 + */ + public static final String PAID = "PAID"; + + /** + * 未交费 + */ + public static final String UNPAID_FEES = "UNPAID_FEES"; +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/SignRecordServiceStatusConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/SignRecordServiceStatusConstants.java new file mode 100644 index 00000000..2e0c7a5f --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/SignRecordServiceStatusConstants.java @@ -0,0 +1,44 @@ +package com.xinelu.common.constant; + +/** + * @description: 签约记录服务状态 + * @author: haown + * @create: 2024-02-29 09:56 + **/ +public class SignRecordServiceStatusConstants { + /** + * 意向签约 + */ + public static final String INTENTIONAL_SIGNING = "INTENTIONAL_SIGNING"; + + /** + * 服务中 + */ + public static final String SERVICE_CENTER = "SERVICE_CENTER"; + + /** + * 服务结束 + */ + public static final String SERVICE_END = "SERVICE_END"; + + /** + * 在签 + */ + public static final String IN_SIGN = "IN_SIGN"; + + /** + * 忽略 + */ + public static final String IGNORE_SIGN = "IGNORE_SIGN"; + + /** + * 解约 + */ + public static final String SEPARATE_SIGN = "SEPARATE_SIGN"; + + /** + * 续约 + */ + public static final String CONTINUOUS_SIGN = "CONTINUOUS_SIGN"; + +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java b/postdischarge-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java index a9ad55e7..27723893 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java @@ -2,19 +2,20 @@ package com.xinelu.common.utils.file; import com.xinelu.common.config.SystemBusinessConfig; import com.xinelu.common.constant.Constants; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.file.FileNameLengthLimitExceededException; import com.xinelu.common.exception.file.FileSizeLimitExceededException; import com.xinelu.common.exception.file.InvalidExtensionException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.uuid.Seq; -import org.apache.commons.io.FilenameUtils; -import org.springframework.web.multipart.MultipartFile; - +import com.xinelu.common.utils.uuid.UUID; import java.io.File; import java.io.IOException; import java.nio.file.Paths; import java.util.Objects; +import org.apache.commons.io.FilenameUtils; +import org.springframework.web.multipart.MultipartFile; /** * 文件上传工具类 @@ -195,4 +196,70 @@ public class FileUploadUtils { } return extension; } + + /** + * 文件上传 + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @param allowedExtension 上传文件类型 + * @return 返回上传成功的文件名 + * @throws FileSizeLimitExceededException 如果超出最大大小 + * @throws FileNameLengthLimitExceededException 文件名太长 + * @throws IOException 比如读写文件出错时 + * @throws InvalidExtensionException 文件校验异常 + */ + public static String uploadSystemBusinessPath(String baseDir, MultipartFile file, String[] allowedExtension) + throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, + InvalidExtensionException { + int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length(); + if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { + throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); + } + //校验文件大小 + assertAllowed(file, allowedExtension); + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String substring = uuid.substring(uuid.length() - 10); + //编码文件名 + String fileName = extractFilenames(file); + if (StringUtils.isBlank(fileName)) { + throw new ServiceException("文件名称不能为空!"); + } + //获取文件路径 + String newFileName = ""; + if (fileName.contains(Constants.FILE_NAME_SPOT)) { + String firstFileName = fileName.substring(0, fileName.indexOf(".")) + substring; + String lastFileName = fileName.substring(fileName.indexOf(".")); + newFileName = firstFileName + lastFileName; + } + if (StringUtils.isBlank(newFileName)) { + throw new ServiceException("文件名称不能为空!"); + } + String absPath = getAbsoluteFile(baseDir, newFileName).getAbsolutePath(); + file.transferTo(Paths.get(absPath)); + return getSystemPathFileName(baseDir, newFileName); + } + + /** + * 编码文件名 + */ + public static String extractFilenames(MultipartFile file) { + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String substring = uuid.substring(uuid.length() - 10); + return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(), + FilenameUtils.getBaseName(substring), Seq.getId(Seq.uploadSeqType), getExtension(file)); + } + + /** + * 获取文件名称 + * + * @param uploadDir 上传路径 + * @param fileName 文件名称 + * @return 文件路径 + */ + public static String getSystemPathFileName(String uploadDir, String fileName) { + int dirLastIndex = SystemBusinessConfig.getProfile().length() + 1; + String currentDir = StringUtils.substring(uploadDir, dirLastIndex); + return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientBlacklistController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientBlacklistController.java index d9aca70c..beee3694 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientBlacklistController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientBlacklistController.java @@ -1,26 +1,27 @@ package com.xinelu.manage.controller; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.access.prepost.PreAuthorize; -import javax.annotation.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.xinelu.common.annotation.Log; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; -import com.xinelu.common.enums.BusinessType; -import com.xinelu.manage.domain.PatientBlacklist; -import com.xinelu.manage.service.IPatientBlacklistService; -import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.PatientBlacklist; +import com.xinelu.manage.dto.PatientBlacklistDto; +import com.xinelu.manage.service.IPatientBlacklistService; +import com.xinelu.manage.vo.PatientBlacklistVo; +import java.util.List; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 患者-黑明单关系Controller @@ -34,14 +35,14 @@ public class PatientBlacklistController extends BaseController { @Resource private IPatientBlacklistService patientBlacklistService; -/** - * 查询患者-黑明单关系列表 - */ -@PreAuthorize("@ss.hasPermi('manage:blacklist:list')") -@GetMapping("/list") - public TableDataInfo list(PatientBlacklist patientBlacklist) { + /** + * 查询患者-黑明单关系列表 + */ + @PreAuthorize("@ss.hasPermi('manage:blacklist:list')") + @GetMapping("/list") + public TableDataInfo list(PatientBlacklistDto patientBlacklist) { startPage(); - List list = patientBlacklistService.selectPatientBlacklistList(patientBlacklist); + List list = patientBlacklistService.selectPatientBlacklistList(patientBlacklist); return getDataTable(list); } @@ -51,9 +52,9 @@ public class PatientBlacklistController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:blacklist:export')") @Log(title = "患者-黑明单关系", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, PatientBlacklist patientBlacklist) { - List list = patientBlacklistService.selectPatientBlacklistList(patientBlacklist); - ExcelUtil util = new ExcelUtil(PatientBlacklist. class); + public void export(HttpServletResponse response, PatientBlacklistDto patientBlacklist) { + List list = patientBlacklistService.selectPatientBlacklistList(patientBlacklist); + ExcelUtil util = new ExcelUtil(PatientBlacklistVo. class); util.exportExcel(response, list, "患者-黑明单关系数据"); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientInfoController.java index 831b9b54..22a8ce46 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/PatientInfoController.java @@ -1,27 +1,27 @@ package com.xinelu.manage.controller; -import io.swagger.annotations.Api; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.access.prepost.PreAuthorize; -import javax.annotation.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.xinelu.common.annotation.Log; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; -import com.xinelu.common.enums.BusinessType; -import com.xinelu.manage.domain.PatientInfo; -import com.xinelu.manage.service.IPatientInfoService; -import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.PatientInfo; +import com.xinelu.manage.dto.PatientInfoDto; +import com.xinelu.manage.service.IPatientInfoService; +import io.swagger.annotations.Api; +import java.util.List; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 患者信息Controller @@ -41,7 +41,7 @@ public class PatientInfoController extends BaseController { */ @PreAuthorize("@ss.hasPermi('manage:patientInfo:list')") @GetMapping("/list") - public TableDataInfo list(PatientInfo patientInfo) { + public TableDataInfo list(PatientInfoDto patientInfo) { startPage(); List list = patientInfoService.selectPatientInfoList(patientInfo); return getDataTable(list); @@ -53,7 +53,7 @@ public class PatientInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:patientInfo:export')") @Log(title = "患者信息", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, PatientInfo patientInfo) { + public void export(HttpServletResponse response, PatientInfoDto patientInfo) { List list = patientInfoService.selectPatientInfoList(patientInfo); ExcelUtil util = new ExcelUtil(PatientInfo. class); util.exportExcel(response, list, "患者信息数据"); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientInformedController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientInformedController.java index dd937c3c..89885abb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientInformedController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientInformedController.java @@ -1,26 +1,30 @@ package com.xinelu.manage.controller; -import java.util.List; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.access.prepost.PreAuthorize; -import javax.annotation.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.xinelu.common.annotation.Log; +import com.xinelu.common.constant.Constants; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.SignPatientInformed; import com.xinelu.manage.service.ISignPatientInformedService; -import com.xinelu.common.utils.poi.ExcelUtil; -import com.xinelu.common.core.page.TableDataInfo; +import java.util.List; +import java.util.Objects; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; /** * 签约知情同意书信息Controller @@ -95,4 +99,18 @@ public class SignPatientInformedController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(signPatientInformedService.deleteSignPatientInformedByIds(ids)); } + + /** + * 问诊聊天上传文件接口 + */ + @PostMapping("/uploadFile") + public AjaxResult uploadFile(@RequestParam("file") MultipartFile multipartFile) throws Exception { + if (Objects.isNull(multipartFile) || StringUtils.isBlank(multipartFile.getOriginalFilename())) { + return AjaxResult.error("当前文件不存在,无法上传!"); + } + if (multipartFile.getOriginalFilename().contains(Constants.EMPTY)) { + return AjaxResult.error("当前文件名含有空格,请先去除空格在上传!"); + } + return signPatientInformedService.uploadFile(multipartFile); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientPackageHardwareController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientPackageHardwareController.java index 716a28cd..17b413f2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientPackageHardwareController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientPackageHardwareController.java @@ -34,11 +34,11 @@ public class SignPatientPackageHardwareController extends BaseController { @Resource private ISignPatientPackageHardwareService signPatientPackageHardwareService; -/** - * 查询签约患者服务包硬件信息列表 - */ -@PreAuthorize("@ss.hasPermi('manage:signHardware:list')") -@GetMapping("/list") + /** + * 查询签约患者服务包硬件信息列表 + */ + @PreAuthorize("@ss.hasPermi('manage:signHardware:list')") + @GetMapping("/list") public TableDataInfo list(SignPatientPackageHardware signPatientPackageHardware) { startPage(); List list = signPatientPackageHardwareService.selectSignPatientPackageHardwareList(signPatientPackageHardware); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientRecordController.java new file mode 100644 index 00000000..23a4c0b1 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/SignPatientRecordController.java @@ -0,0 +1,90 @@ +package com.xinelu.manage.controller; + +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.manage.dto.PatientSignStatusDto; +import com.xinelu.manage.dto.PatientSignAddDto; +import com.xinelu.manage.dto.SignPatientListDto; +import com.xinelu.manage.service.ISignPatientRecordService; +import com.xinelu.manage.vo.PatientSignInfoVo; +import com.xinelu.manage.vo.PatientSignRecordVo; +import com.xinelu.manage.vo.SignPatientListVo; +import io.swagger.annotations.ApiOperation; +import java.util.List; +import javax.annotation.Resource; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @description: 患者签约记录Controller + * @author: haown + * @create: 2024-02-28 16:03 + **/ +@RestController +@RequestMapping("/manage/signRecord") +public class SignPatientRecordController extends BaseController { + + @Resource + private ISignPatientRecordService signPatientRecordService; + + /** + * 查询签约患者列表 + */ + @ApiOperation("查询签约患者列表") + @PreAuthorize("@ss.hasPermi('manage:signRecord:list')") + @GetMapping("/list") + public TableDataInfo list(SignPatientListDto signPatientRecord) { + startPage(); + List list = signPatientRecordService.selectList(signPatientRecord); + return getDataTable(list); + } + + /** + * 签约 + */ + @ApiOperation("签约") + @PreAuthorize("@ss.hasPermi('manage:signRecord:add')") + @PostMapping("/sign") + public AjaxResult sign(@RequestBody PatientSignAddDto body) { + return toAjax(signPatientRecordService.add(body)); + } + + /** + * 根据患者主键查询签约记录 + */ + @ApiOperation("根据患者主键查询签约记录") + @PreAuthorize("@ss.hasPermi('manage:signRecord:list')") + @GetMapping("/getByPatient/{patientId}") + public AjaxResult getByPatient(@PathVariable("patientId") Long patientId) { + List list = signPatientRecordService.getByPatient(patientId); + return AjaxResult.success(list); + } + + /** + * 根据签约记录表主键查询签约详情 + */ + @ApiOperation("根据签约记录表主键查询签约详情") + @PreAuthorize("@ss.hasPermi('manage:signRecord:list')") + @GetMapping("/getByRecordId/{patientSignRecordId}") + public AjaxResult getByRecordId(@PathVariable("patientSignRecordId") Long patientSignRecordId) { + PatientSignInfoVo signInfo = signPatientRecordService.getByRecordId(patientSignRecordId); + return AjaxResult.success(signInfo); + } + + /** + * 解约 + */ + @ApiOperation("解约") + @PreAuthorize("@ss.hasPermi('manage:signRecord:edit')") + @PostMapping("/updateSignStatus") + public AjaxResult updateSignStatus(@RequestBody PatientSignStatusDto updateSignStatus) { + int flag = signPatientRecordService.updateSignStatus(updateSignStatus); + return flag < 0 ? AjaxResult.error() : AjaxResult.success(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientBlacklist.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientBlacklist.java index 4716b3d3..c56829ba 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientBlacklist.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientBlacklist.java @@ -55,4 +55,8 @@ public class PatientBlacklist extends BaseEntity { @ApiModelProperty(value = "来源(CALL_DETECTION:通话检测,MANUAL_BLACKOUT:手动拉黑,MANUAL_ADDITION:手动添加,HIS_CONNECT:HIS对接)") @Excel(name = "来源(CALL_DETECTION:通话检测,MANUAL_BLACKOUT:手动拉黑,MANUAL_ADDITION:手动添加,HIS_CONNECT:HIS对接)") private String blacklistSource; + + /** 删除标识,0:未删除,1:已删除 */ + @ApiModelProperty(value = "删除标识,0:未删除,1:已删除") + private Integer delFlag; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientInfo.java index 707e5768..d98b34cb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientInfo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/PatientInfo.java @@ -40,13 +40,16 @@ public class PatientInfo extends BaseEntity { private String patientPhone; /** 家属电话 */ + @ApiModelProperty(value = "家属电话") private String familyMemberPhone; /** 出生日期,格式:yyyy-MM-dd */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") private Date birthDate; /** 身份证号 */ + @ApiModelProperty(value = "身份证号") private String cardNo; /** 性别,男:MALE,女:FEMALE */ @@ -61,6 +64,7 @@ public class PatientInfo extends BaseEntity { /** 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT, 签约患者:CONTRACTED_PATIENT */ + @ApiModelProperty(value = "患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,签约患者:CONTRACTED_PATIENT") private String patientType; /** 签约状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN */ @@ -85,6 +89,7 @@ public class PatientInfo extends BaseEntity { private String visitMethod; /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") private String mainDiagnosis; /** 主治医生 */ @@ -93,6 +98,7 @@ public class PatientInfo extends BaseEntity { private String attendingPhysician; /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") private Long hospitalAgencyId; /** 所属医院名称 */ @@ -101,6 +107,7 @@ public class PatientInfo extends BaseEntity { private String hospitalAgencyName; /** 所属院区id */ + @ApiModelProperty(value = "所属院区id") private Long campusAgencyId; /** 所属院区名称 */ @@ -109,6 +116,7 @@ public class PatientInfo extends BaseEntity { private String campusAgencyName; /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") private Long departmentId; /** 所属科室名称 */ @@ -117,6 +125,7 @@ public class PatientInfo extends BaseEntity { private String departmentName; /** 所属病区id */ + @ApiModelProperty(value = "所属病区id") private Long wardId; /** 所属病区名称 */ @@ -130,33 +139,43 @@ public class PatientInfo extends BaseEntity { private String admissionNumber; /** 责任护士 */ + @ApiModelProperty(value = "责任护士") private String responsibleNurse; /** 就诊流水号 */ + @ApiModelProperty(value = "就诊流水号") private String visitSerialNumber; /** 手术名称 */ + @ApiModelProperty(value = "手术名称") private String surgicalName; /** 入院时间,时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "入院时间") private Date admissionDate; /** 出院时间(出院患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "出院时间(出院患者)") private Date dischargeDate; /** 病历内容 */ + @ApiModelProperty(value = "病历内容") private String medicalRecordContent; - /** 预约资料组(取值以及枚举未知?) */ + /** 预约治疗组(取值以及枚举未知?) */ + @ApiModelProperty(value = "预约治疗组(取值以及枚举未知?)") private String appointmentTreatmentGroup; /** 登记号(预住院患者) */ + @ApiModelProperty(value = "登记号(预住院患者)") private String registrationNo; /** 登记日期(预住院患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "登记日期(预住院患者),时间格式:yyyy-MM-dd") private Date registrationDate; /** 预约时间(预住院患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "预约时间(预住院患者),时间格式:yyyy-MM-dd") private Date appointmentDate; /** 门诊号(门诊患者) */ @@ -175,9 +194,11 @@ public class PatientInfo extends BaseEntity { private String dischargeMethod; /** 微信openid,微信小程序唯一标识 */ + @ApiModelProperty(value = "微信openid,微信小程序唯一标识") private String openId; /** 微信unionid,微信小程序和微信公众号统一标识 */ + @ApiModelProperty(value = "微信unionid,微信小程序和微信公众号统一标识 ") private String unionId; /** 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientInformed.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientInformed.java new file mode 100644 index 00000000..f0473517 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientInformed.java @@ -0,0 +1,48 @@ +package com.xinelu.manage.domain; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 签约知情同意书信息对象 sign_patient_informed + * + * @author haown + * @date 2024-02-27 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "签约知情同意书信息对象", description = "sign_patient_informed") +public class SignPatientInformed extends BaseEntity { + + private static final long serialVersionUID=1L; + + /** 主键id */ + private Long id; + + /** 患者签约记录表id */ + @ApiModelProperty(value = "患者签约记录表id") + @Excel(name = "患者签约记录表id") + private Long signPatientRecordId; + + /** 患者id */ + @ApiModelProperty(value = "患者id") + private Long patientId; + + /** 知情书文件名称 */ + @ApiModelProperty(value = "知情书文件名称") + private String informedFileName; + + /** 知情书文件存放路径 */ + @ApiModelProperty(value = "知情书文件存放路径") + private String informedFilePath; + + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackage.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackage.java index 96e6bf8e..1a3efb81 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackage.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackage.java @@ -35,6 +35,11 @@ public class SignPatientPackage extends BaseEntity { @Excel(name = "患者信息表id") private Long patientId; + /** 患者签约记录表id */ + @ApiModelProperty(value = "患者签约记录表id") + @Excel(name = "患者签约记录表id") + private Long signPatientRecordId; + /** 服务包表id */ @ApiModelProperty(value = "服务包表id") @Excel(name = "服务包表id") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackageHardware.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackageHardware.java index 188acf7e..4b975143 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackageHardware.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientPackageHardware.java @@ -9,8 +9,6 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; /** * 签约患者服务包硬件信息对象 sign_patient_package_hardware @@ -23,64 +21,52 @@ import org.apache.commons.lang3.builder.ToStringStyle; @NoArgsConstructor @EqualsAndHashCode(callSuper = true) @ApiModel(value = "签约患者服务包硬件信息对象", description = "sign_patient_package_hardware") -public class SignPatientPackageHardware extends BaseEntity - { -private static final long serialVersionUID=1L; +public class SignPatientPackageHardware extends BaseEntity { + + private static final long serialVersionUID=1L; /** 主键id */ private Long id; + /** 患者签约记录表id */ + @ApiModelProperty(value = "患者签约记录表id") + @Excel(name = "患者签约记录表id") + private Long signPatientRecordId; + /** 签约患者服务包表id */ - @ApiModelProperty(value = "签约患者服务包表id") - @Excel(name = "签约患者服务包表id") + @ApiModelProperty(value = "签约患者服务包表id") + @Excel(name = "签约患者服务包表id") private Long signPatientPackageId; /** 硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA */ - @ApiModelProperty(value = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") - @Excel(name = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") + @ApiModelProperty(value = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") + @Excel(name = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") private String hardwareType; /** SN码 */ - @ApiModelProperty(value = "SN码") - @Excel(name = "SN码") + @ApiModelProperty(value = "SN码") + @Excel(name = "SN码") private String snCode; /** 硬件金额 */ - @ApiModelProperty(value = "硬件金额") - @Excel(name = "硬件金额") + @ApiModelProperty(value = "硬件金额") + @Excel(name = "硬件金额") private BigDecimal hardwarePrice; /** 硬件状态 */ - @ApiModelProperty(value = "硬件状态") - @Excel(name = "硬件状态") + @ApiModelProperty(value = "硬件状态") + @Excel(name = "硬件状态") private String hardwareStatus; /** 硬件厂商 */ - @ApiModelProperty(value = "硬件厂商") - @Excel(name = "硬件厂商") + @ApiModelProperty(value = "硬件厂商") + @Excel(name = "硬件厂商") private String hardwareManufacturer; /** 硬件使用说明 */ - @ApiModelProperty(value = "硬件使用说明") - @Excel(name = "硬件使用说明") + @ApiModelProperty(value = "硬件使用说明") + @Excel(name = "硬件使用说明") private String hardwareIntroduce; -@Override -public String toString(){ - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id",getId()) - .append("signPatientPackageId",getSignPatientPackageId()) - .append("hardwareType",getHardwareType()) - .append("snCode",getSnCode()) - .append("hardwarePrice",getHardwarePrice()) - .append("hardwareStatus",getHardwareStatus()) - .append("hardwareManufacturer",getHardwareManufacturer()) - .append("hardwareIntroduce",getHardwareIntroduce()) - .append("createBy",getCreateBy()) - .append("createTime",getCreateTime()) - .append("updateBy",getUpdateBy()) - .append("updateTime",getUpdateTime()) - .toString(); - } - } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientRecord.java new file mode 100644 index 00000000..12658b37 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/SignPatientRecord.java @@ -0,0 +1,185 @@ +package com.xinelu.manage.domain; + +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * 患者签约记录表 + * @TableName sign_patient_record + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "患者签约记录表", description = "sign_patient_record") +public class SignPatientRecord extends BaseEntity { + + private static final long serialVersionUID=1L; + /** + * 主键id + */ + @ApiModelProperty(value = "主键id") + private Long id; + + /** + * 患者信息表id + */ + @ApiModelProperty(value = "患者信息表id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** + * 签约时间,格式:yyyy-MM-dd HH:mm:ss + */ + @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") + private Date signTime; + + /** + * 签约时所属医院id + */ + @ApiModelProperty(value = "签约时所属医院id") + private Long hospitalAgencyId; + + /** + * 签约时所属医院名称 + */ + @ApiModelProperty(value = "签约时所属医院名称") + private String hospitalAgencyName; + + /** + * 签约时所属院区id + */ + @ApiModelProperty(value = "签约时所属院区id") + private Long campusAgencyId; + + /** + * 签约时所属院区名称 + */ + @ApiModelProperty(value = "签约时所属院区名称") + private String campusAgencyName; + + /** + * 签约时所属科室id + */ + @ApiModelProperty(value = "签约时所属科室id") + private Long departmentId; + + /** + * 签约时所属科室名称 + */ + @ApiModelProperty(value = "签约时所属科室名称") + private String departmentName; + + /** + * 签约时所属病区id + */ + @ApiModelProperty(value = "签约时所属病区id") + private Long wardId; + + /** + * 签约时所属病区名称 + */ + @ApiModelProperty(value = "签约时所属病区名称") + private String wardName; + + /** + * 就诊流水号 + */ + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + /** + * 签约时诊断 + */ + @ApiModelProperty(value = "签约时诊断") + private String signDiagnosis; + + /** + * 审核后诊断 + */ + @ApiModelProperty(value = "审核后诊断") + private String reviewDiagnosis; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; + + /** + * 签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN + */ + @ApiModelProperty(value = "签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN") + private String signStatus; + + /** + * 意向来源(意向签约,字典枚举) + */ + @ApiModelProperty(value = "意向来源(意向签约,字典枚举)") + private String intentionalSource; + + /** + * 加入意向时间(意向签约) + */ + @ApiModelProperty(value = "加入意向时间(意向签约)") + private Date intentionalTime; + + /** + * 开单医生id(意向签约) + */ + @ApiModelProperty(value = "开单医生id(意向签约)") + private Long billingDoctorId; + + /** + * 开单医生姓名(意向签约) + */ + @ApiModelProperty(value = "开单医生姓名(意向签约)") + private String billingDoctorName; + + /** + * 金额 + */ + @ApiModelProperty(value = "金额") + private BigDecimal price; + + /** + * 缴费状态,已缴费:PAID,未交费:UNPAID_FEES + */ + @ApiModelProperty(value = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES") + private String paymentStatus; + + /** + * 删除标识,0:未删除,1:已删除 + */ + @ApiModelProperty(value = "删除标识,0:未删除,1:已删除") + private Integer delFlag; + +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/ManageTestDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/ManageTestDTO.java deleted file mode 100644 index 0677832c..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/ManageTestDTO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xinelu.manage.dto; - -import lombok.Data; - -/** - * @Description 测试 - * @Author 纪寒 - * @Date 2024-02-18 16:31:10 - * @Version 1.0 - */ -@Data -public class ManageTestDTO { - private Long id; -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientBlacklistDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientBlacklistDto.java new file mode 100644 index 00000000..5794fd5b --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientBlacklistDto.java @@ -0,0 +1,46 @@ +package com.xinelu.manage.dto; + +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 黑名单列表传输对象 + * @author: haown + * @create: 2024-02-28 13:15 + **/ +@Data +public class PatientBlacklistDto { + /** 患者姓名 */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "患者姓名") + private String patientName; + + /** 患者电话 */ + @ApiModelProperty(value = "患者电话") + @Excel(name = "患者电话") + private String patientPhone; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 异常原因字典表id */ + @ApiModelProperty(value = "异常原因字典表id") + private Long abnormalCauseId; + + /** 异常原因字典表值 */ + @ApiModelProperty(value = "异常原因字典表值") + private String abnormalCauseValue; + + @ApiModelProperty(value = "来源(CALL_DETECTION:通话检测,MANUAL_BLACKOUT:手动拉黑,MANUAL_ADDITION:手动添加,HIS_CONNECT:HIS对接)") + private String blacklistSource; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientInfoDto.java new file mode 100644 index 00000000..20498c75 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientInfoDto.java @@ -0,0 +1,111 @@ +package com.xinelu.manage.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** + * @description: 患者列表查询传输对象 + * @author: haown + * @create: 2024-02-27 16:20 + **/ +@ApiModel("患者列表查询传输对象") +@Data +public class PatientInfoDto { + + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** 患者电话 */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") + private String mainDiagnosis; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + /** 所属院区id */ + @ApiModelProperty(value = "所属院区id") + private Long campusAgencyId; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 所属病区id */ + @ApiModelProperty(value = "所属病区id") + private Long wardId; + + /** 患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT, + 签约患者:CONTRACTED_PATIENT */ + @ApiModelProperty(value = "患者类型,预住院患者:PRE_HOSPITALIZED_PATIENT,在院患者:IN_HOSPITAL_PATIENT,门诊患者:OUTPATIENT,出院患者:DISCHARGED_PATIENT,签约患者:CONTRACTED_PATIENT") + private String patientType; + + /** 主治医生 */ + @ApiModelProperty(value = "主治医生") + private String attendingPhysician; + + /** 患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END */ + @ApiModelProperty(value = "患者来源,微信小程序:WE_CHAT_APPLET,微信公众号:WE_CHAT_OFFICIAL_ACCOUNT,管理端:MANAGE_END") + private String patientSource; + + /** 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL */ + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + /** 就诊时间开始(门诊患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "就诊时间开始") + private Date visitTimeStart; + + /** 就诊时间结束(门诊患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "就诊时间结束") + private Date visitTimeEnd; + + /** 入院时间开始,时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "入院时间开始") + private Date admissionDateStart; + + /** 入院时间结束,时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "入院时间结束") + private Date admissionDateEnd; + + /** 预约时间开始(预住院患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "预约时间开始(预住院患者),时间格式:yyyy-MM-dd") + private Date appointmentDateStart; + + /** 预约时间开始(预住院患者),时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "预约时间结束(预住院患者),时间格式:yyyy-MM-dd") + private Date appointmentDateEnd; + + /** 预约治疗组(取值以及枚举未知?) */ + @ApiModelProperty(value = "预约治疗组(取值以及枚举未知?)") + private String appointmentTreatmentGroup; + + /** 开证医生(预住院患者) */ + @ApiModelProperty(value = "开证医生") + private String certificateIssuingDoctor; + + /** 登记号(预住院患者) */ + @ApiModelProperty(value = "登记号(预住院患者)") + private String registrationNo; + + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + /** 责任护士 */ + @ApiModelProperty(value = "责任护士") + private String responsibleNurse; + + /** 手术名称 */ + @ApiModelProperty(value = "手术名称") + private String surgicalName; + + /** 年龄 */ + @ApiModelProperty(value = "年龄") + private Integer age; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignAddDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignAddDto.java new file mode 100644 index 00000000..0a8243e3 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignAddDto.java @@ -0,0 +1,28 @@ +package com.xinelu.manage.dto; + +import com.xinelu.manage.domain.SignPatientInformed; +import com.xinelu.manage.domain.SignPatientPackage; +import com.xinelu.manage.domain.SignPatientPackageHardware; +import com.xinelu.manage.domain.SignPatientRecord; +import io.swagger.annotations.ApiModel; +import java.util.List; +import lombok.Data; + +/** + * @description: 患者签约传输对象 + * @author: haown + * @create: 2024-02-29 09:26 + **/ +@ApiModel("患者签约传输对象") +@Data +public class PatientSignAddDto { + + private SignPatientRecord record; + + private SignPatientPackage signPackage; + + private List devices; + + private SignPatientInformed signPatientInformed; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignStatusDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignStatusDto.java new file mode 100644 index 00000000..1c200ef4 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/PatientSignStatusDto.java @@ -0,0 +1,27 @@ +package com.xinelu.manage.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 修改签约记录状态传输对象 + * @author: haown + * @create: 2024-02-29 10:29 + **/ +@Data +public class PatientSignStatusDto { + + private Long id; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; + + /** + * 签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN + */ + @ApiModelProperty(value = "签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN") + private String signStatus; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/SignPatientListDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/SignPatientListDto.java new file mode 100644 index 00000000..af805fd5 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/SignPatientListDto.java @@ -0,0 +1,101 @@ +package com.xinelu.manage.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** + * @description: 签约患者查询传输对象 + * @author: haown + * @create: 2024-02-28 17:16 + **/ +@ApiModel("签约患者查询传输对象") +@Data +public class SignPatientListDto { + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** + * 就诊流水号 + */ + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + /** + * 加入意向时间(意向签约) + */ + @ApiModelProperty(value = "加入意向时间开始(意向签约)") + private Date intentionalTimeStart; + + /** + * 加入意向时间(意向签约) + */ + @ApiModelProperty(value = "加入意向时间结束(意向签约)") + private Date intentionalTimeEnd; + + /** + * 意向来源(意向签约,字典枚举) + */ + @ApiModelProperty(value = "意向来源(意向签约,字典枚举)") + private String intentionalSource; + + /** + * 签约时间,格式:yyyy-MM-dd + */ + @ApiModelProperty(value = "签约时间开始,格式:yyyy-MM-dd") + private Date signTimeStart; + + @ApiModelProperty(value = "签约时间结束,格式:yyyy-MM-dd") + private Date signTimeEnd; + /** + * 签约时所属医院id + */ + @ApiModelProperty(value = "签约时所属医院id") + private Long hospitalAgencyId; + + /** + * 签约时所属院区id + */ + @ApiModelProperty(value = "签约时所属院区id") + private Long campusAgencyId; + + /** + * 签约时所属科室id + */ + @ApiModelProperty(value = "签约时所属科室id") + private Long departmentId; + + /** + * 签约时所属病区id + */ + @ApiModelProperty(value = "签约时所属病区id") + private Long wardId; + + /** + * 签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN + */ + @ApiModelProperty(value = "签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN") + private String signStatus; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientBlacklistMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientBlacklistMapper.java index fa00ca85..31447435 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientBlacklistMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientBlacklistMapper.java @@ -1,8 +1,9 @@ package com.xinelu.manage.mapper; -import java.util.List; - import com.xinelu.manage.domain.PatientBlacklist; +import com.xinelu.manage.dto.PatientBlacklistDto; +import com.xinelu.manage.vo.PatientBlacklistVo; +import java.util.List; /** * 患者-黑明单关系Mapper接口 @@ -25,7 +26,7 @@ public interface PatientBlacklistMapper { * @param patientBlacklist 患者-黑明单关系 * @return 患者-黑明单关系集合 */ - public List selectPatientBlacklistList(PatientBlacklist patientBlacklist); + public List selectPatientBlacklistList(PatientBlacklistDto patientBlacklist); /** * 新增患者-黑明单关系 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientInfoMapper.java index e3e1ce11..0e111164 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/PatientInfoMapper.java @@ -1,8 +1,8 @@ package com.xinelu.manage.mapper; -import java.util.List; - import com.xinelu.manage.domain.PatientInfo; +import com.xinelu.manage.dto.PatientInfoDto; +import java.util.List; /** * 患者信息Mapper接口 @@ -25,7 +25,7 @@ public interface PatientInfoMapper { * @param patientInfo 患者信息 * @return 患者信息集合 */ - List selectPatientInfoList(PatientInfo patientInfo); + List selectPatientInfoList(PatientInfoDto patientInfo); /** * 新增患者信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientInformedMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientInformedMapper.java index e9e1d4b2..090fefe2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientInformedMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientInformedMapper.java @@ -7,7 +7,7 @@ import com.xinelu.manage.domain.SignPatientInformed; /** * 签约知情同意书信息Mapper接口 * - * @author haown + * @author xinelu * @date 2024-02-27 */ public interface SignPatientInformedMapper { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientPackageHardwareMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientPackageHardwareMapper.java index 943e0e1d..47a829d7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientPackageHardwareMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientPackageHardwareMapper.java @@ -7,7 +7,7 @@ import com.xinelu.manage.domain.SignPatientPackageHardware; /** * 签约患者服务包硬件信息Mapper接口 * - * @author xinelu + * @author haown * @date 2024-02-27 */ public interface SignPatientPackageHardwareMapper { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientRecordMapper.java new file mode 100644 index 00000000..774a5ac9 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/SignPatientRecordMapper.java @@ -0,0 +1,36 @@ +package com.xinelu.manage.mapper; + +import com.xinelu.manage.domain.SignPatientRecord; +import com.xinelu.manage.dto.SignPatientListDto; +import com.xinelu.manage.vo.PatientSignInfoVo; +import com.xinelu.manage.vo.PatientSignRecordVo; +import com.xinelu.manage.vo.SignPatientListVo; +import java.util.List; + +/** +* @author haown +* @description 针对表【sign_patient_record(签约记录表)】的数据库操作Mapper +* @createDate 2024-02-28 15:05:17 +* @Entity com.xinelu.manage.domain.SignPatientRecord +*/ +public interface SignPatientRecordMapper { + + int deleteByPrimaryKey(Long id); + + int insert(SignPatientRecord record); + + int insertSelective(SignPatientRecord record); + + SignPatientRecord selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(SignPatientRecord record); + + int updateByPrimaryKey(SignPatientRecord record); + + List selectList(SignPatientListDto signPatientRecord); + + PatientSignInfoVo getByRecordId(Long patientSignRecordId); + + List getByPatient(Long patientId); + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientBlacklistService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientBlacklistService.java index 4f5e553f..923f1d0a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientBlacklistService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientBlacklistService.java @@ -1,8 +1,9 @@ package com.xinelu.manage.service; -import java.util.List; - import com.xinelu.manage.domain.PatientBlacklist; +import com.xinelu.manage.dto.PatientBlacklistDto; +import com.xinelu.manage.vo.PatientBlacklistVo; +import java.util.List; /** * 患者-黑明单关系Service接口 @@ -25,7 +26,7 @@ public interface IPatientBlacklistService { * @param patientBlacklist 患者-黑明单关系 * @return 患者-黑明单关系集合 */ - public List selectPatientBlacklistList(PatientBlacklist patientBlacklist); + public List selectPatientBlacklistList(PatientBlacklistDto patientBlacklist); /** * 新增患者-黑明单关系 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientInfoService.java index 62030806..4c91d01e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/IPatientInfoService.java @@ -1,8 +1,8 @@ package com.xinelu.manage.service; -import java.util.List; - import com.xinelu.manage.domain.PatientInfo; +import com.xinelu.manage.dto.PatientInfoDto; +import java.util.List; /** * 患者信息Service接口 @@ -25,7 +25,7 @@ public interface IPatientInfoService { * @param patientInfo 患者信息 * @return 患者信息集合 */ - public List selectPatientInfoList(PatientInfo patientInfo); + public List selectPatientInfoList(PatientInfoDto patientInfo); /** * 新增患者信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientInformedService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientInformedService.java index 4bdc47a6..0bb29abd 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientInformedService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientInformedService.java @@ -1,13 +1,16 @@ package com.xinelu.manage.service; -import java.util.List; - +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.exception.file.InvalidExtensionException; import com.xinelu.manage.domain.SignPatientInformed; +import java.io.IOException; +import java.util.List; +import org.springframework.web.multipart.MultipartFile; /** * 签约知情同意书信息Service接口 * - * @author haown + * @author xinelu * @date 2024-02-27 */ public interface ISignPatientInformedService { @@ -58,4 +61,7 @@ public interface ISignPatientInformedService { * @return 结果 */ public int deleteSignPatientInformedById(Long id); + + AjaxResult uploadFile(MultipartFile multipartFile) throws IOException, InvalidExtensionException; + } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientRecordService.java new file mode 100644 index 00000000..7751a815 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/ISignPatientRecordService.java @@ -0,0 +1,37 @@ +package com.xinelu.manage.service; + +import com.xinelu.manage.dto.PatientSignStatusDto; +import com.xinelu.manage.dto.PatientSignAddDto; +import com.xinelu.manage.dto.SignPatientListDto; +import com.xinelu.manage.vo.PatientSignInfoVo; +import com.xinelu.manage.vo.PatientSignRecordVo; +import com.xinelu.manage.vo.SignPatientListVo; +import java.util.List; + +/** +* @author haown +* @description 针对表【sign_patient_record(签约记录表)】的数据库操作Service +* @createDate 2024-02-28 15:05:02 +*/ +public interface ISignPatientRecordService { + + List selectList(SignPatientListDto signPatientRecord); + + /** + * 根据签约编号查询居民签约信息 + * @param patientSignRecordId + * @return + */ + PatientSignInfoVo getByRecordId(Long patientSignRecordId); + + /** + * 根据患者主键查询患者签约记录列表 + * @param patientId + * @return + */ + List getByPatient(Long patientId); + + int add(PatientSignAddDto body); + + int updateSignStatus(PatientSignStatusDto patientCancelSignDto); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientBlacklistServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientBlacklistServiceImpl.java index 872dd4c5..e7337b85 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientBlacklistServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientBlacklistServiceImpl.java @@ -1,12 +1,15 @@ package com.xinelu.manage.service.impl; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.manage.domain.PatientBlacklist; +import com.xinelu.manage.dto.PatientBlacklistDto; +import com.xinelu.manage.mapper.PatientBlacklistMapper; +import com.xinelu.manage.service.IPatientBlacklistService; +import com.xinelu.manage.vo.PatientBlacklistVo; +import java.util.Date; import java.util.List; - import com.xinelu.common.utils.DateUtils; import javax.annotation.Resource; import org.springframework.stereotype.Service; -import com.xinelu.manage.mapper.PatientBlacklistMapper; -import com.xinelu.manage.domain.PatientBlacklist; -import com.xinelu.manage.service.IPatientBlacklistService; /** * 患者-黑明单关系Service业务层处理 @@ -37,7 +40,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService { * @return 患者-黑明单关系 */ @Override - public List selectPatientBlacklistList(PatientBlacklist patientBlacklist) { + public List selectPatientBlacklistList(PatientBlacklistDto patientBlacklist) { return patientBlacklistMapper.selectPatientBlacklistList(patientBlacklist); } @@ -49,8 +52,9 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService { */ @Override public int insertPatientBlacklist(PatientBlacklist patientBlacklist) { - patientBlacklist.setCreateTime(DateUtils.getNowDate()); - return patientBlacklistMapper.insertPatientBlacklist(patientBlacklist); + patientBlacklist.setDelFlag(0); + patientBlacklist.setCreateTime(DateUtils.getNowDate()); + return patientBlacklistMapper.insertPatientBlacklist(patientBlacklist); } /** @@ -61,7 +65,7 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService { */ @Override public int updatePatientBlacklist(PatientBlacklist patientBlacklist) { - patientBlacklist.setUpdateTime(DateUtils.getNowDate()); + patientBlacklist.setUpdateTime(DateUtils.getNowDate()); return patientBlacklistMapper.updatePatientBlacklist(patientBlacklist); } @@ -84,6 +88,10 @@ public class PatientBlacklistServiceImpl implements IPatientBlacklistService { */ @Override public int deletePatientBlacklistById(Long id) { - return patientBlacklistMapper.deletePatientBlacklistById(id); + PatientBlacklist patientBlacklist = new PatientBlacklist(); + patientBlacklist.setId(id); + patientBlacklist.setDelFlag(1); + patientBlacklist.setUpdateTime(new Date()); + return patientBlacklistMapper.updatePatientBlacklist(patientBlacklist); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientInfoServiceImpl.java index c17bbb71..8a14ba0a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/PatientInfoServiceImpl.java @@ -1,12 +1,13 @@ package com.xinelu.manage.service.impl; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.manage.domain.PatientInfo; +import com.xinelu.manage.dto.PatientInfoDto; +import com.xinelu.manage.mapper.PatientInfoMapper; +import com.xinelu.manage.service.IPatientInfoService; import java.util.List; - import com.xinelu.common.utils.DateUtils; import javax.annotation.Resource; import org.springframework.stereotype.Service; -import com.xinelu.manage.mapper.PatientInfoMapper; -import com.xinelu.manage.domain.PatientInfo; -import com.xinelu.manage.service.IPatientInfoService; /** * 患者信息Service业务层处理 @@ -38,7 +39,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService { * @return 患者信息 */ @Override - public List selectPatientInfoList(PatientInfo patientInfo) { + public List selectPatientInfoList(PatientInfoDto patientInfo) { return patientInfoMapper.selectPatientInfoList(patientInfo); } @@ -51,6 +52,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService { @Override public int insertPatientInfo(PatientInfo patientInfo) { patientInfo.setCreateTime(DateUtils.getNowDate()); + patientInfo.setDelFlag(0); return patientInfoMapper.insertPatientInfo(patientInfo); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientInformedServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientInformedServiceImpl.java index 9dd45b1a..da0a08dd 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientInformedServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientInformedServiceImpl.java @@ -1,23 +1,34 @@ package com.xinelu.manage.service.impl; -import java.util.List; - import com.xinelu.common.utils.DateUtils; -import javax.annotation.Resource; -import org.springframework.stereotype.Service; -import com.xinelu.manage.mapper.SignPatientInformedMapper; +import com.xinelu.common.config.SystemBusinessConfig; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.exception.file.InvalidExtensionException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.file.FileUploadUtils; +import com.xinelu.common.utils.file.MimeTypeUtils; import com.xinelu.manage.domain.SignPatientInformed; +import com.xinelu.manage.mapper.SignPatientInformedMapper; import com.xinelu.manage.service.ISignPatientInformedService; +import java.io.IOException; +import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; /** * 签约知情同意书信息Service业务层处理 * - * @author haown + * @author xinelu * @date 2024-02-27 */ @Service public class SignPatientInformedServiceImpl implements ISignPatientInformedService { @Resource private SignPatientInformedMapper signPatientInformedMapper; + @Resource + private SystemBusinessConfig systemBusinessConfig; /** * 查询签约知情同意书信息 @@ -86,4 +97,20 @@ public class SignPatientInformedServiceImpl implements ISignPatientInformedServi public int deleteSignPatientInformedById(Long id) { return signPatientInformedMapper.deleteSignPatientInformedById(id); } + + @Override public AjaxResult uploadFile(MultipartFile multipartFile) throws IOException, InvalidExtensionException { + //获取不同的文件路径 + String uploadPathUrl = SystemBusinessConfig.getProfile() + systemBusinessConfig.getSignInformedFileUrl(); + if (StringUtils.isBlank(uploadPathUrl)) { + return AjaxResult.success(); + } + //上传 + String pictureName = FileUploadUtils.uploadSystemBusinessPath(uploadPathUrl, multipartFile, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); + if (StringUtils.isBlank(pictureName)) { + throw new ServiceException("文件上传失败,请联系管理员!"); + } + AjaxResult ajax = AjaxResult.success("上传成功!"); + ajax.put("fileUrl", pictureName); + return ajax; + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientRecordServiceImpl.java new file mode 100644 index 00000000..8eed282d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/SignPatientRecordServiceImpl.java @@ -0,0 +1,117 @@ +package com.xinelu.manage.service.impl; + +import com.xinelu.common.constant.PaymentStatusConstants; +import com.xinelu.common.constant.SignRecordServiceStatusConstants; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.manage.domain.SignPatientInformed; +import com.xinelu.manage.domain.SignPatientPackage; +import com.xinelu.manage.domain.SignPatientPackageHardware; +import com.xinelu.manage.domain.SignPatientRecord; +import com.xinelu.manage.dto.PatientSignStatusDto; +import com.xinelu.manage.dto.PatientSignAddDto; +import com.xinelu.manage.dto.SignPatientListDto; +import com.xinelu.manage.mapper.SignPatientInformedMapper; +import com.xinelu.manage.mapper.SignPatientPackageHardwareMapper; +import com.xinelu.manage.mapper.SignPatientPackageMapper; +import com.xinelu.manage.mapper.SignPatientRecordMapper; +import com.xinelu.manage.service.ISignPatientRecordService; +import com.xinelu.manage.vo.PatientSignInfoVo; +import com.xinelu.manage.vo.PatientSignRecordVo; +import com.xinelu.manage.vo.SignPatientListVo; +import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +/** +* @author haown +* @description 针对表【sign_patient_record(签约记录表)】的数据库操作Service实现 +* @createDate 2024-02-28 15:05:02 +*/ +@Service +public class SignPatientRecordServiceImpl implements ISignPatientRecordService { + + @Resource + private SignPatientRecordMapper signPatientRecordMapper; + + @Resource + private SignPatientPackageMapper signPatientPackageMapper; + @Resource + private SignPatientPackageHardwareMapper hardwareMapper; + @Resource + private SignPatientInformedMapper informedMapper; + + @Override public List selectList(SignPatientListDto signPatientRecord) { + return signPatientRecordMapper.selectList(signPatientRecord); + } + + @Override public PatientSignInfoVo getByRecordId(Long patientSignRecordId) { + return signPatientRecordMapper.getByRecordId(patientSignRecordId); + } + + @Override public List getByPatient(Long patientId) { + return signPatientRecordMapper.getByPatient(patientId); + } + + @Override public int add(PatientSignAddDto body) { + SignPatientPackage signPatientPackage = body.getSignPackage(); + if (ObjectUtils.isNotEmpty(body.getRecord())) { + SignPatientRecord signPatientRecord = body.getRecord(); + if (signPatientRecord.getPatientId() == null) { + throw new ServiceException("数据错误"); + } + signPatientRecord.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); + signPatientRecord.setDelFlag(0); + signPatientRecord.setPaymentStatus(PaymentStatusConstants.UNPAID_FEES); + signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); + + if (signPatientPackage != null) { + signPatientRecord.setPrice(signPatientPackage.getPackagePrice()); + } else { + throw new ServiceException("请选择服务包"); + } + + // 保存签约记录 + int flag = signPatientRecordMapper.insert(signPatientRecord); + if (flag > 0) { + // 保存签约服务包信息 + if (signPatientPackage != null) { + signPatientPackage.setSignPatientRecordId(signPatientRecord.getId()); + signPatientPackage.setPatientId(signPatientRecord.getPatientId()); + signPatientPackage.setPackagePaymentStatus(PaymentStatusConstants.UNPAID_FEES); + signPatientPackageMapper.insertSignPatientPackage(signPatientPackage); + // 保存硬件 + if (!CollectionUtils.isEmpty(body.getDevices())) { + for(SignPatientPackageHardware hardware : body.getDevices()) { + hardware.setSignPatientRecordId(signPatientRecord.getId()); + hardwareMapper.insertSignPatientPackageHardware(hardware); + } + } + } + + // 保存告知书 + if (body.getSignPatientInformed() != null) { + SignPatientInformed informed = new SignPatientInformed(); + informed.setSignPatientRecordId(signPatientRecord.getId()); + informed.setPatientId(signPatientRecord.getPatientId()); + informedMapper.insertSignPatientInformed(informed); + } + } + return flag; + } + return 0; + } + + @Override public int updateSignStatus(PatientSignStatusDto patientCancelSignDto) { + // 修改签约记录状态 + SignPatientRecord signRecord = new SignPatientRecord(); + signRecord.setId(patientCancelSignDto.getId()); + signRecord.setSignStatus(patientCancelSignDto.getSignStatus()); + signRecord.setServiceStatus(patientCancelSignDto.getServiceStatus()); + signRecord.setUpdateTime(DateUtils.getNowDate()); + int flag = signPatientRecordMapper.updateByPrimaryKeySelective(signRecord); + return flag; + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientBlacklistVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientBlacklistVo.java new file mode 100644 index 00000000..dea38c56 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientBlacklistVo.java @@ -0,0 +1,81 @@ +package com.xinelu.manage.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** + * @description: 黑名单列表查询返回视图类 + * @author: haown + * @create: 2024-02-28 13:44 + **/ +@Data +@ApiModel("黑名单列表查询返回视图类") +public class PatientBlacklistVo { + + /** 主键id */ + @ApiModelProperty(value = "黑名单列表主键") + private Long id; + + /** 患者姓名 */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** 患者电话 */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + private Long hospitalAgencyId; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + private String hospitalAgencyName; + + /** 所属院区id */ + @ApiModelProperty(value = "所属院区id") + private Long campusAgencyId; + + /** 所属院区名称 */ + @ApiModelProperty(value = "所属院区名称") + private String campusAgencyName; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + private String departmentName; + + /** 患者id */ + @ApiModelProperty(value = "患者表主键") + private Long patientId; + + /** 异常原因字典表id */ + @ApiModelProperty(value = "异常原因字典表id") + private Long abnormalCauseId; + + /** 异常原因字典表值 */ + @ApiModelProperty(value = "异常原因字典表值") + private String abnormalCauseValue; + + /** + * 来源(CALL_DETECTION:通话检测,MANUAL_BLACKOUT:手动拉黑, MANUAL_ADDITION:手动添加,HIS_CONNECT:HIS对接) + */ + @ApiModelProperty(value = "来源(CALL_DETECTION:通话检测,MANUAL_BLACKOUT:手动拉黑,MANUAL_ADDITION:手动添加,HIS_CONNECT:HIS对接)") + private String blacklistSource; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignInfoVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignInfoVo.java new file mode 100644 index 00000000..9744c0a2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignInfoVo.java @@ -0,0 +1,152 @@ +package com.xinelu.manage.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.domain.SignPatientPackageHardware; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import lombok.Data; + +/** + * @description: 患者签约信息查询返回视图类 + * @author: haown + * @create: 2024-02-28 16:17 + **/ +@ApiModel("患者签约信息查询返回视图类") +@Data +public class PatientSignInfoVo { + /** + * 主键id + */ + @ApiModelProperty(value = "签约记录主键id") + private Long id; + + /** + * 患者信息表id + */ + @ApiModelProperty(value = "患者信息表id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** + * 签约时间,格式:yyyy-MM-dd HH:mm:ss + */ + @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") + private Date signTime; + + /** + * 签约时所属医院名称 + */ + @ApiModelProperty(value = "签约时所属医院名称") + private String hospitalAgencyName; + + /** + * 签约时所属院区名称 + */ + @ApiModelProperty(value = "签约时所属院区名称") + private String campusAgencyName; + + /** + * 签约时所属科室名称 + */ + @ApiModelProperty(value = "签约时所属科室名称") + private String departmentName; + + /** + * 签约时所属病区名称 + */ + @ApiModelProperty(value = "签约时所属病区名称") + private String wardName; + + /** + * 就诊流水号 + */ + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + /** + * 签约时诊断 + */ + @ApiModelProperty(value = "签约时诊断") + private String signDiagnosis; + + /** + * 审核后诊断 + */ + @ApiModelProperty(value = "审核后诊断") + private String reviewDiagnosis; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; + + /** + * 签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN + */ + @ApiModelProperty(value = "签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN,过期:EXPIRE_SIGN") + private String signStatus; + + @ApiModelProperty(value = "患者签约记录表id") + @Excel(name = "患者签约记录表id") + private Long signPatientRecordId; + + /** 服务包表id */ + @ApiModelProperty(value = "服务包表id") + private Long servicePackageId; + + /** 服务包名称 */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** 服务包缴费状态,已缴费:PAID,未交费:UNPAID_FEES */ + @ApiModelProperty(value = "服务包缴费状态,已缴费:PAID,未交费:UNPAID_FEES") + private String packagePaymentStatus; + + /** 服务包价格,小数点后两位 */ + @ApiModelProperty(value = "服务包价格,小数点后两位") + private BigDecimal packagePrice; + + /** 服务开始时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "服务开始时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date serviceStartTime; + + /** 服务结束时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "服务结束时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date serviceEndTime; + + /** 服务周期,单位是月 */ + @ApiModelProperty(value = "服务周期,单位是月") + private Integer serviceCycle; + + @ApiModelProperty(value = "签约硬件设备列表") + private List signDevices; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignRecordVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignRecordVo.java new file mode 100644 index 00000000..985af9e2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/PatientSignRecordVo.java @@ -0,0 +1,49 @@ +package com.xinelu.manage.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** + * @description: 查询患者签约记录返回视图类 + * @author: haown + * @create: 2024-02-29 09:09 + **/ +@ApiModel("查询患者签约记录返回视图类") +@Data +public class PatientSignRecordVo { + + /** + * 主键id + */ + @ApiModelProperty(value = "签约记录主键id") + private Long id; + + /** + * 患者信息表id + */ + @ApiModelProperty(value = "患者信息表id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date signTime; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; + + /** 服务包名称 */ + @ApiModelProperty(value = "服务包名称") + private String packageName; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/SignPatientListVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/SignPatientListVo.java new file mode 100644 index 00000000..d5aa314e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/SignPatientListVo.java @@ -0,0 +1,137 @@ +package com.xinelu.manage.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; + +/** + * @description: 签约患者列表查询返回视图类 + * @author: haown + * @create: 2024-02-28 17:10 + **/ +@ApiModel("签约患者列表查询返回视图类") +@Data +public class SignPatientListVo { + + /** + * 主键id + */ + @ApiModelProperty(value = "主键id") + private Long id; + + /** + * 患者信息表id + */ + @ApiModelProperty(value = "患者信息表id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + private String patientPhone; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** + * 签约时间,格式:yyyy-MM-dd HH:mm:ss + */ + @ApiModelProperty(value = "签约时间,格式:yyyy-MM-dd HH:mm:ss") + private Date signTime; + + /** + * 签约时所属医院名称 + */ + @ApiModelProperty(value = "签约时所属医院名称") + private String hospitalAgencyName; + + /** + * 签约时所属院区名称 + */ + @ApiModelProperty(value = "签约时所属院区名称") + private String campusAgencyName; + + /** + * 签约时所属科室名称 + */ + @ApiModelProperty(value = "签约时所属科室名称") + private String departmentName; + + /** + * 签约时所属病区名称 + */ + @ApiModelProperty(value = "签约时所属病区名称") + private String wardName; + + /** + * 就诊流水号 + */ + @ApiModelProperty(value = "就诊流水号") + private String visitSerialNumber; + + /** + * 就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL + */ + @ApiModelProperty(value = "就诊方式,门诊:OUTPATIENT_SERVICE,住院:BE_IN_HOSPITAL") + private String visitMethod; + + /** + * 服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END + */ + @ApiModelProperty(value = "服务状态,意向签约:INTENTIONAL_SIGNING,服务中:SERVICE_CENTER,服务结束:SERVICE_END") + private String serviceStatus; + + /** + * 签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN + */ + @ApiModelProperty(value = "签约状态,在签:IN_SIGN,忽略:IGNORE_SIGN,解约:SEPARATE_SIGN,续约:CONTINUOUS_SIGN") + private String signStatus; + + /** + * 意向来源(意向签约,字典枚举) + */ + @ApiModelProperty(value = "意向来源(意向签约,字典枚举)") + private String intentionalSource; + + /** + * 加入意向时间(意向签约) + */ + @ApiModelProperty(value = "加入意向时间(意向签约)") + private Date intentionalTime; + + /** + * 开单医生姓名(意向签约) + */ + @ApiModelProperty(value = "开单医生姓名(意向签约)") + private String billingDoctorName; + + /** + * 金额 + */ + @ApiModelProperty(value = "金额") + private BigDecimal price; + + /** + * 缴费状态,已缴费:PAID,未交费:UNPAID_FEES + */ + @ApiModelProperty(value = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES") + private String paymentStatus; + + /** 服务包名称 */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** 服务周期,单位是月 */ + @ApiModelProperty(value = "服务周期,单位是月") + private Integer serviceCycle; +} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/PatientBlacklistMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/PatientBlacklistMapper.xml index e1645303..7e22025c 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/PatientBlacklistMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/PatientBlacklistMapper.xml @@ -13,6 +13,7 @@ + @@ -20,21 +21,36 @@ - select id, patient_id, abnormal_cause_id, abnormal_cause_value, supplement_illustrate_id, supplement_illustrate_value, function_limitation, blacklist_source, create_by, create_time, update_by, update_time from patient_blacklist + select id, patient_id, abnormal_cause_id, abnormal_cause_value, supplement_illustrate_id, supplement_illustrate_value, + function_limitation, blacklist_source, del_flag, create_by, create_time, update_by, update_time from patient_blacklist - + select b.id, b.patient_id, b.abnormal_cause_id, b.abnormal_cause_value, b.supplement_illustrate_id, + b.supplement_illustrate_value, b.function_limitation, b.blacklist_source, + b.create_time, p.patient_name, + p.patient_phone, p.card_no, p.hospital_agency_id, p.hospital_agency_name, p.campus_agency_id, p.campus_agency_name, + p.department_id, p.department_name from patient_blacklist b left join patient_info p on b.patient_id = p.id - - and abnormal_cause_id = #{abnormalCauseId} - - - and abnormal_cause_value = #{abnormalCauseValue} - - - and blacklist_source = #{blacklistSource} - + b.del_flag = 0 + + and p.patient_name like concat('%', #{patientName}, '%') + + + and p.patient_phone like concat('%', #{patientPhone}, '%') + + + and p.hospital_agency_id = #{hospitalAgencyId} + + + and p.department_id = #{departmentId} + + + and b.abnormal_cause_value like concat('%', #{abnormalCauseValue}, '%') + + + and b.blacklist_source = #{blacklistSource} + @@ -62,6 +78,9 @@ blacklist_source, + + del_flag, + create_by, create_time, @@ -86,6 +105,9 @@ #{blacklistSource}, + + #{delFlag}, + #{createBy}, #{createTime}, @@ -121,6 +143,9 @@ blacklist_source = #{blacklistSource}, + del_flag = + #{delFlag}, + create_by = #{createBy}, @@ -142,7 +167,7 @@ - delete from patient_blacklist where id in + update patient_blacklist set del_flag = 1 where id in #{id} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/PatientInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/PatientInfoMapper.xml index e9397510..fa1cea58 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/PatientInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/PatientInfoMapper.xml @@ -72,29 +72,28 @@ from patient_info - + del_flag = 0 and patient_name like concat('%', #{patientName}, '%') and patient_phone like concat('%', #{patientPhone}, '%') - - and birth_date = #{birthDate} - - and patient_type = #{patientType} - - - and visit_method = #{visitMethod} + + + and (patient_type = 'OUTPATIENT' or patient_type = 'DISCHARGED_PATIENT') + + + and patient_type = #{patientType} + + - and main_diagnosis = #{mainDiagnosis} - - - and attending_physician = #{attendingPhysician} + and main_diagnosis like concat('%', #{mainDiagnosis}, '%') and hospital_agency_id = #{hospitalAgencyId} @@ -108,20 +107,48 @@ and ward_id = #{wardId} + + and attending_physician = #{attendingPhysician} + + + and visit_method = #{visitMethod} + + and surgical_name like concat('%', #{surgicalName}, '%') - - - and outpatient_number = #{outpatientNumber} + + and visit_time >= #{visitTimeStart} - - and visit_time = #{visitTime} + + and visit_time <= #{visitTimeEnd} - - and discharge_method = #{dischargeMethod} + + and admission_date >= #{admissionDateStart} + + + and admission_date <= #{admissionDateEnd} + + + and appointment_date >= #{appointmentDateStart} + + + and appointment_date <= #{appointmentDateEnd} + + + and appointment_treatment_group = #{appointmentTreatmentGroup} + + + and certificate_issuing_doctor = #{certificateIssuingDoctor} + + + and registration_no = #{registrationNo} + + + and visit_serial_number = #{visitSerialNumber} + + + and responsible_nurse = #{responsibleNurse} and patient_source = #{patientSource} @@ -464,16 +491,15 @@ where id = #{id} - - delete - from patient_info + + update patient_info set del_flag = 1 where id = #{id} - + - - delete from patient_info where id in + + update patient_info set del_flag = 1 where id in #{id} - + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientInformedMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientInformedMapper.xml index 84da29ef..882c9b52 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientInformedMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientInformedMapper.xml @@ -6,6 +6,7 @@ + @@ -16,15 +17,18 @@ - select id, patient_id, informed_file_name, informed_file_path, create_by, create_time, update_by, update_time from sign_patient_informed + select id, sign_patient_record_id, patient_id, informed_file_name, informed_file_path, create_by, create_time, update_by, update_time from sign_patient_informed @@ -38,63 +42,72 @@ keyProperty="id"> insert into sign_patient_informed - patient_id, - - informed_file_name, - - informed_file_path, - - create_by, - - create_time, - - update_by, - - update_time, - + + sign_patient_record_id, + + patient_id, + + informed_file_name, + + informed_file_path, + + create_by, + + create_time, + + update_by, + + update_time, + - #{patientId}, - - #{informedFileName}, - - #{informedFilePath}, - - #{createBy}, - - #{createTime}, - - #{updateBy}, - - #{updateTime}, - + + #{signPatientRecordId}, + + #{patientId}, + + #{informedFileName}, + + #{informedFilePath}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + update sign_patient_informed - patient_id = - #{patientId}, - - informed_file_name = - #{informedFileName}, - - informed_file_path = - #{informedFilePath}, - - create_by = - #{createBy}, - - create_time = - #{createTime}, - - update_by = - #{updateBy}, - - update_time = - #{updateTime}, - + + sign_patient_record_id = #{signPatientRecordId}, + + patient_id = + #{patientId}, + + informed_file_name = + #{informedFileName}, + + informed_file_path = + #{informedFilePath}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + where id = #{id} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageHardwareMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageHardwareMapper.xml index ba8295c4..6305b938 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageHardwareMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageHardwareMapper.xml @@ -6,6 +6,7 @@ + @@ -20,131 +21,139 @@ - select id, sign_patient_package_id, hardware_type, sn_code, hardware_price, hardware_status, hardware_manufacturer, hardware_introduce, create_by, create_time, update_by, update_time from sign_patient_package_hardware + select id, sign_patient_record_id, sign_patient_package_id, hardware_type, sn_code, hardware_price, hardware_status, hardware_manufacturer, hardware_introduce, create_by, create_time, update_by, update_time from sign_patient_package_hardware - + + where id = #{id} - + insert into sign_patient_package_hardware - sign_patient_package_id, - - hardware_type, - - sn_code, - - hardware_price, - - hardware_status, - - hardware_manufacturer, - - hardware_introduce, - - create_by, - - create_time, - - update_by, - - update_time, - + sign_patient_record_id, + + sign_patient_package_id, + + hardware_type, + + sn_code, + + hardware_price, + + hardware_status, + + hardware_manufacturer, + + hardware_introduce, + + create_by, + + create_time, + + update_by, + + update_time, + - #{signPatientPackageId}, - - #{hardwareType}, - - #{snCode}, - - #{hardwarePrice}, - - #{hardwareStatus}, - - #{hardwareManufacturer}, - - #{hardwareIntroduce}, - - #{createBy}, - - #{createTime}, - - #{updateBy}, - - #{updateTime}, - + #{signPatientRecordId}, + + #{signPatientPackageId}, + + #{hardwareType}, + + #{snCode}, + + #{hardwarePrice}, + + #{hardwareStatus}, + + #{hardwareManufacturer}, + + #{hardwareIntroduce}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + update sign_patient_package_hardware - sign_patient_package_id = - #{signPatientPackageId}, - - hardware_type = - #{hardwareType}, - - sn_code = - #{snCode}, - - hardware_price = - #{hardwarePrice}, - - hardware_status = - #{hardwareStatus}, - - hardware_manufacturer = - #{hardwareManufacturer}, - - hardware_introduce = - #{hardwareIntroduce}, - - create_by = - #{createBy}, - - create_time = - #{createTime}, - - update_by = - #{updateBy}, - - update_time = - #{updateTime}, - + + sign_patient_record_id = #{signPatientRecordId}, + + sign_patient_package_id = + #{signPatientPackageId}, + + hardware_type = + #{hardwareType}, + + sn_code = + #{snCode}, + + hardware_price = + #{hardwarePrice}, + + hardware_status = + #{hardwareStatus}, + + hardware_manufacturer = + #{hardwareManufacturer}, + + hardware_introduce = + #{hardwareIntroduce}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + where id = #{id} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageMapper.xml index 29967e14..e6ea3ef5 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientPackageMapper.xml @@ -7,6 +7,7 @@ + @@ -21,43 +22,45 @@ - select id, patient_id, service_package_id, package_name, package_payment_status, package_price, service_start_time, service_end_time, service_cycle, create_by, create_time, update_by, update_time from sign_patient_package + select id, patient_id, sign_patient_record_id, service_package_id, package_name, package_payment_status, package_price, service_start_time, service_end_time, service_cycle, create_by, create_time, update_by, update_time from sign_patient_package - + + where id = #{id} patient_id, + + sign_patient_record_id, + service_package_id, package_name, @@ -90,72 +96,78 @@ - #{patientId}, - - #{servicePackageId}, - - #{packageName}, - - #{packagePaymentStatus}, - - #{packagePrice}, - - #{serviceStartTime}, - - #{serviceEndTime}, - - #{serviceCycle}, - - #{createBy}, - - #{createTime}, - - #{updateBy}, - - #{updateTime}, - + #{patientId}, + + + #{signPatientRecordId}, + + #{servicePackageId}, + + #{packageName}, + + #{packagePaymentStatus}, + + #{packagePrice}, + + #{serviceStartTime}, + + #{serviceEndTime}, + + #{serviceCycle}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + update sign_patient_package - patient_id = - #{patientId}, - - service_package_id = - #{servicePackageId}, - - package_name = - #{packageName}, - - package_payment_status = - #{packagePaymentStatus}, - - package_price = - #{packagePrice}, - - service_start_time = - #{serviceStartTime}, - - service_end_time = - #{serviceEndTime}, - - service_cycle = - #{serviceCycle}, - - create_by = - #{createBy}, - - create_time = - #{createTime}, - - update_by = - #{updateBy}, - - update_time = - #{updateTime}, - + patient_id = + #{patientId}, + + sign_patient_record_id = + #{signPatientRecordId}, + + service_package_id = + #{servicePackageId}, + + package_name = + #{packageName}, + + package_payment_status = + #{packagePaymentStatus}, + + package_price = + #{packagePrice}, + + service_start_time = + #{serviceStartTime}, + + service_end_time = + #{serviceEndTime}, + + service_cycle = + #{serviceCycle}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + where id = #{id} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/SignPatientRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientRecordMapper.xml new file mode 100644 index 00000000..2bf4036c --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/SignPatientRecordMapper.xml @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id,patient_id,patient_name, + patient_phone,card_no,sign_time, + hospital_agency_id,hospital_agency_name,campus_agency_id, + campus_agency_name,department_id,department_name, + ward_id,ward_name,visit_serial_number, + visit_method,sign_diagnosis,review_diagnosis, + service_status,sign_status,intentional_source, + intentional_time,billing_doctor_id,billing_doctor_name, + price,payment_status,del_flag, + create_by,create_time,update_by, + update_time + + + + + + delete from sign_patient_record + where id = #{id,jdbcType=BIGINT} + + + insert into sign_patient_record + ( id,patient_id,patient_name + ,patient_phone,card_no,sign_time + ,hospital_agency_id,hospital_agency_name,campus_agency_id + ,campus_agency_name,department_id,department_name + ,ward_id,ward_name,visit_serial_number + ,visit_method,sign_diagnosis,review_diagnosis + ,service_status,sign_status,intentional_source + ,intentional_time,billing_doctor_id,billing_doctor_name + ,price,payment_status,del_flag + ,create_by,create_time,update_by + ,update_time) + values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} + ,#{patientPhone,jdbcType=VARCHAR},#{cardNo,jdbcType=VARCHAR},#{signTime,jdbcType=TIMESTAMP} + ,#{hospitalAgencyId,jdbcType=BIGINT},#{hospitalAgencyName,jdbcType=VARCHAR},#{campusAgencyId,jdbcType=BIGINT} + ,#{campusAgencyName,jdbcType=VARCHAR},#{departmentId,jdbcType=BIGINT},#{departmentName,jdbcType=VARCHAR} + ,#{wardId,jdbcType=BIGINT},#{wardName,jdbcType=VARCHAR},#{visitSerialNumber,jdbcType=VARCHAR} + ,#{visitMethod,jdbcType=VARCHAR},#{signDiagnosis,jdbcType=VARCHAR},#{reviewDiagnosis,jdbcType=VARCHAR} + ,#{serviceStatus,jdbcType=VARCHAR},#{signStatus,jdbcType=VARCHAR},#{intentionalSource,jdbcType=VARCHAR} + ,#{intentionalTime,jdbcType=TIMESTAMP},#{billingDoctorId,jdbcType=BIGINT},#{billingDoctorName,jdbcType=VARCHAR} + ,#{price,jdbcType=DECIMAL},#{paymentStatus,jdbcType=VARCHAR},#{delFlag,jdbcType=TINYINT} + ,#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR} + ,#{updateTime,jdbcType=TIMESTAMP}) + + + insert into sign_patient_record + + id, + patient_id, + patient_name, + patient_phone, + card_no, + sign_time, + hospital_agency_id, + hospital_agency_name, + campus_agency_id, + campus_agency_name, + department_id, + department_name, + ward_id, + ward_name, + visit_serial_number, + visit_method, + sign_diagnosis, + review_diagnosis, + service_status, + sign_status, + intentional_source, + intentional_time, + billing_doctor_id, + billing_doctor_name, + price, + payment_status, + del_flag, + create_by, + create_time, + update_by, + update_time, + + + #{id,jdbcType=BIGINT}, + #{patientId,jdbcType=BIGINT}, + #{patientName,jdbcType=VARCHAR}, + #{patientPhone,jdbcType=VARCHAR}, + #{cardNo,jdbcType=VARCHAR}, + #{signTime,jdbcType=TIMESTAMP}, + #{hospitalAgencyId,jdbcType=BIGINT}, + #{hospitalAgencyName,jdbcType=VARCHAR}, + #{campusAgencyId,jdbcType=BIGINT}, + #{campusAgencyName,jdbcType=VARCHAR}, + #{departmentId,jdbcType=BIGINT}, + #{departmentName,jdbcType=VARCHAR}, + #{wardId,jdbcType=BIGINT}, + #{wardName,jdbcType=VARCHAR}, + #{visitSerialNumber,jdbcType=VARCHAR}, + #{visitMethod,jdbcType=VARCHAR}, + #{signDiagnosis,jdbcType=VARCHAR}, + #{reviewDiagnosis,jdbcType=VARCHAR}, + #{serviceStatus,jdbcType=VARCHAR}, + #{signStatus,jdbcType=VARCHAR}, + #{intentionalSource,jdbcType=VARCHAR}, + #{intentionalTime,jdbcType=TIMESTAMP}, + #{billingDoctorId,jdbcType=BIGINT}, + #{billingDoctorName,jdbcType=VARCHAR}, + #{price,jdbcType=DECIMAL}, + #{paymentStatus,jdbcType=VARCHAR}, + #{delFlag,jdbcType=TINYINT}, + #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + + + + update sign_patient_record + + + patient_id = #{patientId,jdbcType=BIGINT}, + + + patient_name = #{patientName,jdbcType=VARCHAR}, + + + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + + + card_no = #{cardNo,jdbcType=VARCHAR}, + + + sign_time = #{signTime,jdbcType=TIMESTAMP}, + + + hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, + + + hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, + + + campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, + + + campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, + + + department_id = #{departmentId,jdbcType=BIGINT}, + + + department_name = #{departmentName,jdbcType=VARCHAR}, + + + ward_id = #{wardId,jdbcType=BIGINT}, + + + ward_name = #{wardName,jdbcType=VARCHAR}, + + + visit_serial_number = #{visitSerialNumber,jdbcType=VARCHAR}, + + + visit_method = #{visitMethod,jdbcType=VARCHAR}, + + + sign_diagnosis = #{signDiagnosis,jdbcType=VARCHAR}, + + + review_diagnosis = #{reviewDiagnosis,jdbcType=VARCHAR}, + + + service_status = #{serviceStatus,jdbcType=VARCHAR}, + + + sign_status = #{signStatus,jdbcType=VARCHAR}, + + + intentional_source = #{intentionalSource,jdbcType=VARCHAR}, + + + intentional_time = #{intentionalTime,jdbcType=TIMESTAMP}, + + + billing_doctor_id = #{billingDoctorId,jdbcType=BIGINT}, + + + billing_doctor_name = #{billingDoctorName,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=DECIMAL}, + + + payment_status = #{paymentStatus,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=TINYINT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + update sign_patient_record + set + patient_id = #{patientId,jdbcType=BIGINT}, + patient_name = #{patientName,jdbcType=VARCHAR}, + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + card_no = #{cardNo,jdbcType=VARCHAR}, + sign_time = #{signTime,jdbcType=TIMESTAMP}, + hospital_agency_id = #{hospitalAgencyId,jdbcType=BIGINT}, + hospital_agency_name = #{hospitalAgencyName,jdbcType=VARCHAR}, + campus_agency_id = #{campusAgencyId,jdbcType=BIGINT}, + campus_agency_name = #{campusAgencyName,jdbcType=VARCHAR}, + department_id = #{departmentId,jdbcType=BIGINT}, + department_name = #{departmentName,jdbcType=VARCHAR}, + ward_id = #{wardId,jdbcType=BIGINT}, + ward_name = #{wardName,jdbcType=VARCHAR}, + visit_serial_number = #{visitSerialNumber,jdbcType=VARCHAR}, + visit_method = #{visitMethod,jdbcType=VARCHAR}, + sign_diagnosis = #{signDiagnosis,jdbcType=VARCHAR}, + review_diagnosis = #{reviewDiagnosis,jdbcType=VARCHAR}, + service_status = #{serviceStatus,jdbcType=VARCHAR}, + sign_status = #{signStatus,jdbcType=VARCHAR}, + intentional_source = #{intentionalSource,jdbcType=VARCHAR}, + intentional_time = #{intentionalTime,jdbcType=TIMESTAMP}, + billing_doctor_id = #{billingDoctorId,jdbcType=BIGINT}, + billing_doctor_name = #{billingDoctorName,jdbcType=VARCHAR}, + price = #{price,jdbcType=DECIMAL}, + payment_status = #{paymentStatus,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=TINYINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + + + + +