diff --git a/postdischarge-admin/src/main/resources/template/出院患者信息导入表.xlsx b/postdischarge-admin/src/main/resources/template/出院患者信息导入表.xlsx new file mode 100644 index 00000000..b1213419 Binary files /dev/null and b/postdischarge-admin/src/main/resources/template/出院患者信息导入表.xlsx differ diff --git a/postdischarge-admin/src/main/resources/template/在院患者信息导入表.xlsx b/postdischarge-admin/src/main/resources/template/在院患者信息导入表.xlsx new file mode 100644 index 00000000..b068f26f Binary files /dev/null and b/postdischarge-admin/src/main/resources/template/在院患者信息导入表.xlsx differ diff --git a/postdischarge-admin/src/main/resources/template/门诊患者信息导入表.xlsx b/postdischarge-admin/src/main/resources/template/门诊患者信息导入表.xlsx new file mode 100644 index 00000000..68b0cfbb Binary files /dev/null and b/postdischarge-admin/src/main/resources/template/门诊患者信息导入表.xlsx differ diff --git a/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx b/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx new file mode 100644 index 00000000..708660df Binary files /dev/null and b/postdischarge-admin/src/main/resources/template/预住院患者信息导入表.xlsx differ 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 f1ab143d..d41889f7 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 @@ -188,4 +188,24 @@ public class Constants { * 服务方式编码 */ public static final String TASK_PARTITION_CODE = "TPC"; + + /** + * 门诊患者 + */ + public static final String OUTPATIENT = "outpatient"; + + /** + * 预住院 + */ + public static final String PRE_HOSPITALIZED = "prehospitalized"; + + /** + * 在院 + */ + public static final String IN_HOSPITAL = "inhospital"; + + /** + * 出院 + */ + public static final String DISCHARGED = "discharged"; } diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/DeviceStatusConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/DeviceStatusConstants.java new file mode 100644 index 00000000..c3246f60 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/DeviceStatusConstants.java @@ -0,0 +1,19 @@ +package com.xinelu.common.constant; + +/** + * @description: 设备状态常量 + * @author: haown + * @create: 2024-03-13 10:46 + **/ +public class DeviceStatusConstants { + + /** + * 绑定 + */ + public static final String BIND = "BIND"; + + /** + * 解绑 + */ + public static final String UN_BIND = "UN_BIND"; +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/NodeTypeConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/NodeTypeConstants.java new file mode 100644 index 00000000..bfae58fd --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/NodeTypeConstants.java @@ -0,0 +1,46 @@ +package com.xinelu.common.constant; + +/** + * @description: 节点类型常量 + * @author: haown + * @create: 2024-03-11 10:17 + **/ +public class NodeTypeConstants { + + /** + * 卫健委 + */ + public static final String HEALTH_COMMISSION = "HEALTH_COMMISSION"; + /** + * 医保局 + */ + public static final String MEDICAL_INSURANCE_BUREAU = "MEDICAL_INSURANCE_BUREAU"; + /** + * 医院 + */ + public static final String HOSPITAL = "HOSPITAL"; + /** + * 院区 + */ + public static final String CAMPUS = "CAMPUS"; + /** + * 药店 + */ + public static final String PHARMACY = "PHARMACY"; + /** + * 科室 + */ + public static final String DEPARTMENT = "DEPARTMENT"; + /** + * 病区 + */ + public static final String WARD = "WARD"; + /** + * 中国 + */ + public static final String CHINA = "CHINA"; + /** + * 省份 + */ + public static final String PROVINCE = "PROVINCE"; +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/PatientTypeConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/PatientTypeConstants.java new file mode 100644 index 00000000..6c7de5bc --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/PatientTypeConstants.java @@ -0,0 +1,29 @@ +package com.xinelu.common.constant; + +/** + * @description: 患者类型常量 + * @author: haown + * @create: 2024-03-07 15:40 + **/ +public class PatientTypeConstants { + + /** + * 预住院患者 + */ + public static final String PRE_HOSPITALIZED_PATIENT = "PRE_HOSPITALIZED_PATIENT"; + + /** + * 在院患者 + */ + public static final String IN_HOSPITAL_PATIENT = "IN_HOSPITAL_PATIENT"; + + /** + * 门诊患者 + */ + public static final String OUTPATIENT = "OUTPATIENT"; + + /** + * 出院患者 + */ + public static final String DISCHARGED_PATIENT = "DISCHARGED_PATIENT"; +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitTypeConstants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitTypeConstants.java new file mode 100644 index 00000000..f60b8d78 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/VisitTypeConstants.java @@ -0,0 +1,19 @@ +package com.xinelu.common.constant; + +/** + * @description: 就诊类型常量 + * @author: haown + * @create: 2024-03-07 15:45 + **/ +public class VisitTypeConstants { + + /** + * 门诊 + */ + public static final String OUTPATIENT_SERVICE = "OUTPATIENT_SERVICE"; + + /** + * 住院 + */ + public static final String BE_HOSPITALIZED = "BE_HOSPITALIZED"; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java index 49471a17..3f72aab4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/importdownload/ImportDownloadController.java @@ -2,6 +2,13 @@ package com.xinelu.manage.controller.importdownload; import com.xinelu.common.constant.Constants; import com.xinelu.common.exception.ServiceException; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import java.io.File; +import java.io.IOException; +import java.util.Objects; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.util.ResourceUtils; @@ -9,12 +16,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.Objects; - /** * 导入与下载Controller * @@ -22,6 +23,7 @@ import java.util.Objects; * @date 2024-02-26 */ +@Api(tags = "导入与下载控制器") @RestController @RequestMapping("/system/importDownload") public class ImportDownloadController { @@ -32,18 +34,34 @@ public class ImportDownloadController { * @param fileType 文件类型 * @param res http请求 **/ + @ApiOperation(value = "下载导入模板", notes = "fileType:agency:机构信息模板,department:科室信息模板," + + "outpatient:门诊患者模板,prehospitalized:预住院患者模板,inhospital:在院患者模板,discharged:出院患者模板") @RequestMapping("downloadTemplate") public void download(@RequestParam(value = "fileType") String fileType, HttpServletResponse res) throws IOException { if (StringUtils.isBlank(fileType)) { throw new ServiceException("请选择文件类型!"); } File file = null; - if (fileType.equals(Constants.AGENCY)) { - file = ResourceUtils.getFile("classpath:template/机构信息导入表.xlsx"); - } - if (fileType.equals(Constants.DEPARTMENT)) { - file = ResourceUtils.getFile("classpath:template/科室信息导入表.xlsx"); - } + switch (fileType) { + case Constants.AGENCY: + file = ResourceUtils.getFile("classpath:template/机构信息导入表.xlsx"); + break; + case Constants.DEPARTMENT: + file = ResourceUtils.getFile("classpath:template/科室信息导入表.xlsx"); + break; + case Constants.PRE_HOSPITALIZED: // 预住院患者 + file = ResourceUtils.getFile("classpath:template/预住院患者信息导入表.xlsx"); + break; + case Constants.IN_HOSPITAL: // 在院患者 + file = ResourceUtils.getFile("classpath:template/在院患者信息导入表.xlsx"); + break; + case Constants.DISCHARGED: // 出院患者 + file = ResourceUtils.getFile("classpath:template/出院患者信息导入表.xlsx"); + break; + case Constants.OUTPATIENT: // 门诊患者 + file = ResourceUtils.getFile("classpath:template/门诊患者信息导入表.xlsx"); + break; + } if (Objects.isNull(file)) { throw new ServiceException("下载导入模板文件失败,请联系管理员!"); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientprehospitalization/PatientPreHospitalizationController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientprehospitalization/PatientPreHospitalizationController.java new file mode 100644 index 00000000..36c390da --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientprehospitalization/PatientPreHospitalizationController.java @@ -0,0 +1,121 @@ +package com.xinelu.manage.controller.patientprehospitalization; + +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.domain.R; +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.patientprehospitalization.PatientPreHospitalization; +import com.xinelu.manage.dto.patientinfo.PatientInfoDto; +import com.xinelu.manage.service.patientprehospitalization.IPatientPreHospitalizationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import java.util.List; +import java.util.Objects; +import javax.annotation.Resource; +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.RestController; +import org.springframework.web.multipart.MultipartFile; + +/** + * @description: 预住院患者信息控制器 + * @author: haown + * @create: 2024-03-08 10:40 + **/ +@RestController +@RequestMapping("/manage/preHospital") +@Api(tags = "预住院患者信息控制器") +public class PatientPreHospitalizationController extends BaseController { + + @Resource + private IPatientPreHospitalizationService preHospitalizationService; + + /** + * 新增预住院患者信息 + */ + @ApiOperation("新增预住院患者信息") + @PreAuthorize("@ss.hasPermi('manage:patientInfo:add')") + @Log(title = "预住院患者信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody PatientPreHospitalization preHospitalization) { + return toAjax(preHospitalizationService.insert(preHospitalization)); + } + + /** + * 查询预住院患者信息列表 + */ + @ApiOperation("查询预住院患者信息列表") + @PreAuthorize("@ss.hasPermi('manage:patientInfo:list')") + @GetMapping("/list") + public TableDataInfo list(PatientInfoDto patientInfo) { + startPage(); + List list = preHospitalizationService.selectList(patientInfo); + return getDataTable(list); + } + + /** + * 获取住院患者信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('manage:patientInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(preHospitalizationService.getById(id)); + } + + /** + * 修改预住院患者信息 + */ + @PreAuthorize("@ss.hasPermi('manage:patientInfo:edit')") + @Log(title = "预住院患者", businessType = BusinessType.UPDATE) + @PutMapping + public R edit(@RequestBody PatientPreHospitalization preHospitalization) { + int flag = preHospitalizationService.update(preHospitalization); + return flag < 0 ? R.fail() : R.ok(); + } + + /** + * 删除预住院患者信息 + */ + @PreAuthorize("@ss.hasPermi('manage:patientInfo:remove')") + @Log(title = "患者信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(preHospitalizationService.deleteByIds(ids)); + } + + /** + * 导入预住院患者信息 + * + * @param file 模板文件 + * @return 导入结果 + * @throws Exception 异常信息 + */ + @ApiOperation("导入预住院患者信息") + @Log(title = "导入预住院患者信息", businessType = BusinessType.IMPORT) + @PostMapping("/importInfo") + public AjaxResult importPatientList(MultipartFile file) throws Exception { + // 判断excel里面是否有数据/文件格式 + if (Objects.isNull(file) || StringUtils.isBlank(file.getOriginalFilename())) { + return AjaxResult.error("请选择需要导入的文件!"); + } + // 获取文件名 + String orgName = file.getOriginalFilename(); + if (!orgName.endsWith(Constants.XLSX) && !orgName.endsWith(Constants.XLS)) { + return AjaxResult.error("导入文件格式不正确,请导入xlsx或xls格式的文件!"); + } + ExcelUtil util = new ExcelUtil<>(PatientPreHospitalization.class); + List list = util.importExcel(file.getInputStream()); + return preHospitalizationService.importList(list); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java index 4cc69d59..35a9076d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/patientvisitrecord/PatientVisitRecordController.java @@ -1,20 +1,27 @@ package com.xinelu.manage.controller.patientvisitrecord; 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.domain.R; 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.patientvisitrecord.PatientVisitRecord; import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordImportDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordSaveDto; import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; 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.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -22,7 +29,9 @@ 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 @@ -91,13 +100,26 @@ public class PatientVisitRecordController extends BaseController { return toAjax(patientVisitRecordService.insertPatientVisitRecord(patientVisitRecord)); } - /** + /** + * 患者配置——就诊信息保存 + */ + @ApiOperation("患者配置——就诊信息保存") + @PreAuthorize("@ss.hasPermi('manage:visit:add')") + @Log(title = "患者就诊记录基本信息", businessType = BusinessType.INSERT) + @PostMapping("saveRecord") + public R saveRecord(@Validated @RequestBody PatientVisitRecordSaveDto saveDto) { + patientVisitRecordService.saveRecord(saveDto); + return R.ok(); + } + + + /** * 修改患者就诊记录基本信息 */ @PreAuthorize("@ss.hasPermi('manage:visit:edit')") @Log(title = "患者就诊记录基本信息", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody PatientVisitRecord patientVisitRecord) { + public AjaxResult edit(@RequestBody PatientVisitRecordSaveDto patientVisitRecord) { return toAjax(patientVisitRecordService.updatePatientVisitRecord(patientVisitRecord)); } @@ -110,4 +132,29 @@ public class PatientVisitRecordController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(patientVisitRecordService.deletePatientVisitRecordByIds(ids)); } + + /** + * 导入患者信息 + * + * @param file 模板文件 + * @return 导入结果 + * @throws Exception 异常信息 + */ + @ApiOperation(value = "导入患者就诊记录", notes = "patientType: outpatient:门诊患者,inhospital:在院患者,discharged:出院患者") + @Log(title = "导入患者就诊信息", businessType = BusinessType.IMPORT) + @PostMapping("/importPatientInfo") + public AjaxResult importPatientList(MultipartFile file, @RequestParam(value = "patientType") String patientType) throws Exception { + // 判断excel里面是否有数据/文件格式 + if (Objects.isNull(file) || StringUtils.isBlank(file.getOriginalFilename())) { + return AjaxResult.error("请选择需要导入的文件!"); + } + // 获取文件名 + String orgName = file.getOriginalFilename(); + if (!orgName.endsWith(Constants.XLSX) && !orgName.endsWith(Constants.XLS)) { + return AjaxResult.error("导入文件格式不正确,请导入xlsx或xls格式的文件!"); + } + ExcelUtil util = new ExcelUtil<>(PatientVisitRecordImportDto.class); + List list = util.importExcel(file.getInputStream()); + return patientVisitRecordService.importPatientList(list, patientType); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/project/ProjectController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/project/ProjectController.java new file mode 100644 index 00000000..a52e1265 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/project/ProjectController.java @@ -0,0 +1,105 @@ +package com.xinelu.manage.controller.project; + +import com.xinelu.common.annotation.Log; +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.project.Project; +import com.xinelu.manage.service.project.IProjectService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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 + * + * @author haown + * @date 2024-03-11 + */ +@Api(tags = "检测项目控制器") +@RestController +@RequestMapping("/manage/project") +public class ProjectController extends BaseController { + @Resource + private IProjectService projectService; + + /** + * 查询检测项目列表 + */ + @ApiOperation("分页查询检测项目列表") + @PreAuthorize("@ss.hasPermi('manage:project:list')") + @GetMapping("/list") + public TableDataInfo list(Project project) { + startPage(); + List list = projectService.selectProjectList(project); + return getDataTable(list); + } + + /** + * 导出检测项目列表 + */ + @PreAuthorize("@ss.hasPermi('manage:project:export')") + @Log(title = "检测项目", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Project project) { + List list = projectService.selectProjectList(project); + ExcelUtil util = new ExcelUtil(Project. class); + util.exportExcel(response, list, "检测项目数据"); + } + + /** + * 获取检测项目详细信息 + */ + @ApiOperation("根据id获取检测项目详细信息") + @PreAuthorize("@ss.hasPermi('manage:project:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(projectService.selectProjectById(id)); + } + + /** + * 新增检测项目 + */ + @ApiOperation("新增检测项目") + @PreAuthorize("@ss.hasPermi('manage:project:add')") + @Log(title = "检测项目", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Project project) { + return toAjax(projectService.insertProject(project)); + } + + /** + * 修改检测项目 + */ + @ApiOperation("修改检测项目") + @PreAuthorize("@ss.hasPermi('manage:project:edit')") + @Log(title = "检测项目", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Project project) { + return toAjax(projectService.updateProject(project)); + } + + /** + * 删除检测项目 + */ + @ApiOperation("批量删除检测项目") + @PreAuthorize("@ss.hasPermi('manage:project:remove')") + @Log(title = "检测项目", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(projectService.deleteProjectByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectdevice/ProjectDeviceController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectdevice/ProjectDeviceController.java new file mode 100644 index 00000000..0dd7fbfe --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectdevice/ProjectDeviceController.java @@ -0,0 +1,97 @@ +package com.xinelu.manage.controller.projectdevice; + +import com.xinelu.common.annotation.Log; +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.projectdevice.ProjectDevice; +import com.xinelu.manage.service.projectdevice.IProjectDeviceService; +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 + * + * @author haown + * @date 2024-03-11 + */ +@RestController +@RequestMapping("/manage/projectdevice") +public class ProjectDeviceController extends BaseController { + @Resource + private IProjectDeviceService projectDeviceService; + + /** + * 查询检测项目设备列表 + */ + @PreAuthorize("@ss.hasPermi('manage:projectdevice:list')") + @GetMapping("/list") + public TableDataInfo list(ProjectDevice projectDevice) { + startPage(); + List list = projectDeviceService.selectProjectDeviceList(projectDevice); + return getDataTable(list); + } + + /** + * 导出检测项目设备列表 + */ + @PreAuthorize("@ss.hasPermi('manage:projectdevice:export')") + @Log(title = "检测项目设备", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProjectDevice projectDevice) { + List list = projectDeviceService.selectProjectDeviceList(projectDevice); + ExcelUtil util = new ExcelUtil(ProjectDevice. class); + util.exportExcel(response, list, "检测项目设备数据"); + } + + /** + * 获取检测项目设备详细信息 + */ + @PreAuthorize("@ss.hasPermi('manage:projectdevice:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(projectDeviceService.selectProjectDeviceById(id)); + } + + /** + * 新增检测项目设备 + */ + @PreAuthorize("@ss.hasPermi('manage:projectdevice:add')") + @Log(title = "检测项目设备", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProjectDevice projectDevice) { + return toAjax(projectDeviceService.insertProjectDevice(projectDevice)); + } + + /** + * 修改检测项目设备 + */ + @PreAuthorize("@ss.hasPermi('manage:projectdevice:edit')") + @Log(title = "检测项目设备", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProjectDevice projectDevice) { + return toAjax(projectDeviceService.updateProjectDevice(projectDevice)); + } + + /** + * 删除检测项目设备 + */ + @PreAuthorize("@ss.hasPermi('manage:projectdevice:remove')") + @Log(title = "检测项目设备", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(projectDeviceService.deleteProjectDeviceByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectgroup/ProjectGroupController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectgroup/ProjectGroupController.java new file mode 100644 index 00000000..7b79f5fb --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectgroup/ProjectGroupController.java @@ -0,0 +1,130 @@ +package com.xinelu.manage.controller.projectgroup; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; +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.projectgroup.ProjectGroup; +import com.xinelu.manage.dto.projectgroup.ProjectGroupSaveListDto; +import com.xinelu.manage.service.projectgroup.IProjectGroupService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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 + * + * @author haown + * @date 2024-03-11 + */ +@Api(tags = "检测项目分组控制器") +@RestController +@RequestMapping("/manage/projectgroup") +public class ProjectGroupController extends BaseController { + @Resource + private IProjectGroupService projectGroupService; + + /** + * 查询检测项目分组列表 + */ + @ApiOperation("分页查询检测项目分组列表") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:list')") + @GetMapping("/list") + public TableDataInfo list(ProjectGroup projectGroup) { + startPage(); + List list = projectGroupService.selectProjectGroupList(projectGroup); + return getDataTable(list); + } + + /** + * 查询检测项目分组列表 + */ + @ApiOperation("查询检测项目分组列表") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:list')") + @GetMapping("/getList") + public R> getList(ProjectGroup projectGroup) { + List list = projectGroupService.selectProjectGroupList(projectGroup); + return R.ok(list); + } + + /** + * 导出检测项目分组列表 + */ + @PreAuthorize("@ss.hasPermi('manage:projectgroup:export')") + @Log(title = "检测项目分组", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProjectGroup projectGroup) { + List list = projectGroupService.selectProjectGroupList(projectGroup); + ExcelUtil util = new ExcelUtil(ProjectGroup. class); + util.exportExcel(response, list, "检测项目分组数据"); + } + + /** + * 获取检测项目分组详细信息 + */ + @ApiOperation("根据id获取检测项目分组详细信息") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(projectGroupService.selectProjectGroupById(id)); + } + + /** + * 新增检测项目分组 + */ + @ApiOperation("新增检测项目分组") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:add')") + @Log(title = "检测项目分组", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProjectGroup projectGroup) { + return toAjax(projectGroupService.insertProjectGroup(projectGroup)); + } + + /** + * 新增检测项目分组 + */ + @ApiOperation("批量新增检测项目分组") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:add')") + @Log(title = "检测项目分组", businessType = BusinessType.INSERT) + @PostMapping("addList") + public R addList(@RequestBody ProjectGroupSaveListDto saveDto) { + int flag = projectGroupService.insertList(saveDto); + return flag > 0 ? R.ok() : R.fail(); + } + + /** + * 修改检测项目分组 + */ + @ApiOperation("修改检测项目分组") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:edit')") + @Log(title = "检测项目分组", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProjectGroup projectGroup) { + return toAjax(projectGroupService.updateProjectGroup(projectGroup)); + } + + /** + * 删除检测项目分组 + */ + @ApiOperation("删除检测项目分组") + @PreAuthorize("@ss.hasPermi('manage:projectgroup:remove')") + @Log(title = "检测项目分组", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(projectGroupService.deleteProjectGroupByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectrecord/ProjectRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectrecord/ProjectRecordController.java deleted file mode 100644 index 378cc845..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectrecord/ProjectRecordController.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xinelu.manage.controller.projectrecord; - -import com.xinelu.common.core.controller.BaseController; -import io.swagger.annotations.Api; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @description: 检测项目数据记录控制器 - * @author: haown - * @create: 2024-02-29 15:45 - **/ -@Api(tags = "检测项目数据记录控制器") -@RestController -@RequestMapping("/manage/projectRecord") -public class ProjectRecordController extends BaseController { - - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectresult/ProjectResultController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectresult/ProjectResultController.java new file mode 100644 index 00000000..3f053824 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/projectresult/ProjectResultController.java @@ -0,0 +1,113 @@ +package com.xinelu.manage.controller.projectresult; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; +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.projectresult.ProjectResult; +import com.xinelu.manage.dto.projectresult.ProjectResultStatisticDto; +import com.xinelu.manage.service.projectresult.IProjectResultService; +import com.xinelu.manage.vo.projectresult.ProjectResultStatisticVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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; + +/** + * @description: 检测项目结果控制器 + * @author: haown + * @create: 2024-03-06 11:20 + **/ +@Api(tags = "检测项目结果控制器") +@RestController +@RequestMapping("/manage/projectResult") +public class ProjectResultController extends BaseController { + + @Resource + private IProjectResultService projectResultService; + /** + * 查询检测项目结果列表 + */ + @ApiOperation("查询检测项目结果列表") + @PreAuthorize("@ss.hasPermi('manage:projectresult:list')") + @GetMapping("/list") + public TableDataInfo list(ProjectResult projectResult) { + startPage(); + List list = projectResultService.selectProjectResultList(projectResult); + return getDataTable(list); + } + + /** + * 导出检测项目结果列表 + */ + @PreAuthorize("@ss.hasPermi('manage:projectresult:export')") + @Log(title = "检测项目结果", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProjectResult projectResult) { + List list = projectResultService.selectProjectResultList(projectResult); + ExcelUtil util = new ExcelUtil(ProjectResult. class); + util.exportExcel(response, list, "检测项目结果数据"); + } + + /** + * 获取检测项目结果详细信息 + */ + @ApiOperation("根据id获取检测项目结果详细信息") + @PreAuthorize("@ss.hasPermi('manage:projectresult:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(projectResultService.selectProjectResultById(id)); + } + + /** + * 新增检测项目结果 + */ + @PreAuthorize("@ss.hasPermi('manage:projectresult:add')") + @Log(title = "检测项目结果", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProjectResult projectResult) { + return toAjax(projectResultService.insertProjectResult(projectResult)); + } + + /** + * 修改检测项目结果 + */ + @PreAuthorize("@ss.hasPermi('manage:projectresult:edit')") + @Log(title = "检测项目结果", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProjectResult projectResult) { + return toAjax(projectResultService.updateProjectResult(projectResult)); + } + + /** + * 删除检测项目结果 + */ + @PreAuthorize("@ss.hasPermi('manage:projectresult:remove')") + @Log(title = "检测项目结果", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(projectResultService.deleteProjectResultByIds(ids)); + } + /** + * 查询检测检测项目结果曲线统计 + */ + @ApiOperation("查询检测项目结果曲线统计") + @GetMapping("/curveStatistics") + public R curveStatistics(ProjectResultStatisticDto projectResultStatisticDto) { + return R.ok(projectResultService.curveStatistics(projectResultStatisticDto)); + } + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java new file mode 100644 index 00000000..8315c9d5 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientprehospitalization/PatientPreHospitalization.java @@ -0,0 +1,148 @@ +package com.xinelu.manage.domain.patientprehospitalization; + +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** +* 预住院患者表 +* @TableName patient_pre_hospitalization +*/ +@ApiModel("预住院患者表") +@Data +public class PatientPreHospitalization extends BaseEntity { + + /** + * 主键Id + */ + @ApiModelProperty("主键Id") + private Long id; + /** + * 患者表id + */ + @ApiModelProperty("患者表id") + private Long patientId; + /** + * 姓名 + */ + @ApiModelProperty("姓名") + private String patientName; + /** + * 患者电话 + */ + @ApiModelProperty("患者电话") + private String patientPhone; + /** + * 身份证号 + */ + @ApiModelProperty("身份证号") + private String cardNo; + /** + * 性别,男:MALE,女:FEMALE + */ + @ApiModelProperty("性别,男:MALE,女:FEMALE") + private String sex; + /** + * 出生日期,格式:yyyy-MM-dd + */ + @ApiModelProperty("出生日期,格式:yyyy-MM-dd") + private Date birthDate; + /** + * 家属电话 + */ + @ApiModelProperty("家属电话") + private String familyMemberPhone; + /** + * 住址 + */ + @ApiModelProperty("住址") + private String address; + /** + * 主要诊断 + */ + @ApiModelProperty("主要诊断") + private String mainDiagnosis; + /** + * 所属医院id + */ + @ApiModelProperty("所属医院id") + private Long hospitalAgencyId; + /** + * 所属医院名称 + */ + @ApiModelProperty("所属医院名称") + private String hospitalAgencyName; + /** + * 所属院区id + */ + @ApiModelProperty("所属院区id") + private Long campusAgencyId; + /** + * 所属院区名称 + */ + @ApiModelProperty("所属院区名称") + private String campusAgencyName; + /** + * 所属科室id + */ + @ApiModelProperty("所属科室id") + private Long departmentId; + /** + * 所属科室名称 + */ + @ApiModelProperty("所属科室名称") + private String departmentName; + /** + * 所属病区id + */ + @ApiModelProperty("所属病区id") + private Long wardId; + /** + * 所属病区名称 + */ + @ApiModelProperty("所属病区名称") + private String wardName; + /** + * 预约治疗组(取值以及枚举未知?) + */ + @ApiModelProperty("预约治疗组(取值以及枚举未知?)") + private String appointmentTreatmentGroup; + /** + * 登记号(预住院患者) + */ + @ApiModelProperty("登记号(预住院患者)") + private String registrationNo; + /** + * 登记日期(预住院患者),时间格式:yyyy-MM-dd + */ + @ApiModelProperty("登记日期(预住院患者),时间格式:yyyy-MM-dd") + private Date registrationDate; + /** + * 预约时间(预住院患者),时间格式:yyyy-MM-dd + */ + @ApiModelProperty("预约时间(预住院患者),时间格式:yyyy-MM-dd") + private Date appointmentDate; + /** + * 开证医生id + */ + @ApiModelProperty("开证医生id") + private Long certificateIssuingDoctorId; + /** + * 开证医生姓名 + */ + @ApiModelProperty("开证医生姓名") + private String certificateIssuingDoctorName; + /** + * 责任护士 + */ + @ApiModelProperty("责任护士") + private String responsibleNurse; + /** + * 删除标识,0:未删除,1:已删除 + */ + @ApiModelProperty("删除标识,0:未删除,1:已删除") + private Integer delFlag; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java index 9ca5d642..a7d2ee8f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/patientvisitrecord/PatientVisitRecord.java @@ -15,7 +15,7 @@ import lombok.NoArgsConstructor; * 患者就诊记录基本信息对象 patient_visit_record * * @author haown - * @date 2024-02-26 + * @date 2024-03-11 */ @Data @AllArgsConstructor @@ -23,7 +23,6 @@ import lombok.NoArgsConstructor; @EqualsAndHashCode(callSuper = true) @ApiModel(value = "患者就诊记录基本信息对象", description = "patient_visit_record") public class PatientVisitRecord extends BaseEntity { - private static final long serialVersionUID=1L; /** 主键Id */ @@ -34,42 +33,42 @@ public class PatientVisitRecord extends BaseEntity { @Excel(name = "患者表id") private Long patientId; - /** 就诊科室 */ - @ApiModelProperty(value = "就诊科室") - @Excel(name = "就诊科室") - private String visitDept; - - /** 就诊名称 */ - @ApiModelProperty(value = "就诊名称") - @Excel(name = "就诊名称") - private String visitName; - - /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ - @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "就诊时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") - private Date visitDate; - - /** 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED */ - @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") - @Excel(name = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") - private String visitType; + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + @Excel(name = "身份证号") + private String cardNo; /** 姓名 */ @ApiModelProperty(value = "姓名") @Excel(name = "姓名") private String patientName; - /** 出生地 */ - @ApiModelProperty(value = "出生地") - @Excel(name = "出生地") - private String birthplace; + /** 患者电话 */ + @ApiModelProperty(value = "患者电话") + @Excel(name = "患者电话") + private String patientPhone; + + /** 家属电话 */ + @ApiModelProperty(value = "家属电话") + @Excel(name = "家属电话") + private String familyMemberPhone; + + /** 地址 */ + @ApiModelProperty(value = "地址") + @Excel(name = "地址") + private String address; /** 性别,男:MALE,女:FEMALE */ @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") @Excel(name = "性别,男:MALE,女:FEMALE") private String sex; + /** 出生日期,格式:yyyy-MM-dd */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出生日期,格式:yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd") + private Date birthDate; + /** 年龄 */ @ApiModelProperty(value = "年龄") @Excel(name = "年龄") @@ -80,6 +79,77 @@ public class PatientVisitRecord extends BaseEntity { @Excel(name = "民族") private String nation; + /** 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED */ + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") + @Excel(name = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") + private String visitType; + + /** 就诊时间,格式:yyyy-MM-dd HH:mm:ss */ + @ApiModelProperty(value = "就诊时间,格式:yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "就诊时间,格式:yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd") + private Date visitDate; + + /** 就诊名称 */ + @ApiModelProperty(value = "就诊名称") + @Excel(name = "就诊名称") + private String visitName; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + @Excel(name = "所属医院id") + private Long hospitalAgencyId; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "所属医院名称") + private String hospitalAgencyName; + + /** 所属院区id */ + @ApiModelProperty(value = "所属院区id") + @Excel(name = "所属院区id") + private Long campusAgencyId; + + /** 所属院区名称 */ + @ApiModelProperty(value = "所属院区名称") + @Excel(name = "所属院区名称") + private String campusAgencyName; + + /** 所属科室id */ + @ApiModelProperty(value = "所属科室id") + @Excel(name = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "所属科室名称") + private String departmentName; + + /** 所属病区id */ + @ApiModelProperty(value = "所属病区id") + @Excel(name = "所属病区id") + private Long wardId; + + /** 所属病区名称 */ + @ApiModelProperty(value = "所属病区名称") + @Excel(name = "所属病区名称") + private String wardName; + + /** 主治医生id */ + @ApiModelProperty(value = "主治医生id") + @Excel(name = "主治医生id") + private Long attendingPhysicianId; + + /** 主治医生姓名 */ + @ApiModelProperty(value = "主治医生姓名") + @Excel(name = "主治医生姓名") + private String attendingPhysicianName; + + /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") + @Excel(name = "主要诊断") + private String mainDiagnosis; + /** 婚姻,已婚:MARRIED,未婚:UNMARRIED,丧偶:BEREAVE */ @ApiModelProperty(value = "婚姻,已婚:MARRIED,未婚:UNMARRIED,丧偶:BEREAVE") @Excel(name = "婚姻,已婚:MARRIED,未婚:UNMARRIED,丧偶:BEREAVE") @@ -107,9 +177,9 @@ public class PatientVisitRecord extends BaseEntity { @Excel(name = "_记录时间", readConverterExp = "入=院记录") private Date recordTime; - /** 门诊就诊信息(就诊类型) */ - @ApiModelProperty(value = "门诊就诊信息") - @Excel(name = "门诊就诊信息", readConverterExp = "就=诊类型") + /** 门诊记录信息(就诊记录-门诊记录) */ + @ApiModelProperty(value = "门诊记录信息") + @Excel(name = "门诊记录信息", readConverterExp = "就=诊记录-门诊记录") private String outpatientVisitInfo; /** 住院天数(出院记录),单位为:天 */ @@ -117,5 +187,34 @@ public class PatientVisitRecord extends BaseEntity { @Excel(name = "住院天数", readConverterExp = "出=院记录") private Integer hospitalizationDays; + /** 入院病历信息,存储患者入院的整个病历信息 */ + @ApiModelProperty(value = "入院病历信息,存储患者入院的整个病历信息") + @Excel(name = "入院病历信息,存储患者入院的整个病历信息") + private String inHospitalInfo; + + /** 出院病历信息,存储患者出院的整个病历信息 */ + @ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息") + @Excel(name = "出院病历信息,存储患者出院的整个病历信息") + private String outHospitalInfo; + + /** 就诊流水号 */ + @ApiModelProperty(value = "就诊流水号") + @Excel(name = "就诊流水号") + private String visitSerialNumber; + + /** 门诊/住院号 */ + @ApiModelProperty(value = "门诊/住院号") + @Excel(name = "门诊/住院号") + private String inHospitalNumber; + + /** 责任护士 */ + @ApiModelProperty(value = "责任护士") + @Excel(name = "责任护士") + private String responsibleNurse; + + /** 手术名称 */ + @ApiModelProperty(value = "手术名称") + @Excel(name = "手术名称") + private String surgicalName; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/project/Project.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/project/Project.java index 67050ea9..9e2c4b13 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/project/Project.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/project/Project.java @@ -1,107 +1,104 @@ package com.xinelu.manage.domain.project; +import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; /** - * 检测项目表 - * @TableName project + * 检测项目对象 project + * + * @author haown + * @date 2024-03-11 */ -@ApiModel("检测项目表") @Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "检测项目对象", description = "project") public class Project extends BaseEntity { - /** - * 主键id - */ - @ApiModelProperty("主键id") + private static final long serialVersionUID=1L; + + /** 主键id */ private Long id; - /** - * 所属分组id - */ - @ApiModelProperty("所属分组id") + /** 所属分组id */ + @ApiModelProperty(value = "所属分组id") + @Excel(name = "所属分组id") private Long groupId; - /** - * 分组名称 - */ - @ApiModelProperty("分组名称") + /** 分组名称 */ + @ApiModelProperty(value = "分组名称") + @Excel(name = "分组名称") private String groupName; - /** - * 项目名称 - */ - @ApiModelProperty("项目名称") + /** 项目名称 */ + @ApiModelProperty(value = "项目名称") + @Excel(name = "项目名称") private String projectName; - /** - * 项目编码 - */ - @ApiModelProperty("项目编码") + /** 项目编码 */ + @ApiModelProperty(value = "项目编码") + @Excel(name = "项目编码") private String projectCode; - /** - * 项目别名 - */ - @ApiModelProperty("项目别名") + /** 项目别名 */ + @ApiModelProperty(value = "项目别名") + @Excel(name = "项目别名") private String projectAlias; - /** - * 是否启用,0:是,1:否 - */ - @ApiModelProperty("是否启用,0:是,1:否") + /** 是否启用,0:否,1:是 */ + @ApiModelProperty(value = "是否启用,0:否,1:是") + @Excel(name = "是否启用,0:否,1:是") private Integer enableStatus; - /** - * 判断模式,定量:QUANTIFY,定性:QUALITATIVE - */ - @ApiModelProperty("判断模式,定量:QUANTIFY,定性:QUALITATIVE") + /** 判断模式,定量:QUANTIFY,定性:QUALITATIVE */ + @ApiModelProperty(value = "判断模式,定量:QUANTIFY,定性:QUALITATIVE") + @Excel(name = "判断模式,定量:QUANTIFY,定性:QUALITATIVE") private String judgeMode; - /** - * 项目指标最大值 - */ - @ApiModelProperty("项目指标最大值") - private Integer maxValue; + /** 项目指标最大值 */ + @ApiModelProperty(value = "项目指标最大值") + @Excel(name = "项目指标最大值") + private BigDecimal maxValue; - /** - * 项目指标最小值 - */ - @ApiModelProperty("项目指标最小值") - private Integer minValue; + /** 项目指标最小值 */ + @ApiModelProperty(value = "项目指标最小值") + @Excel(name = "项目指标最小值") + private BigDecimal minValue; - /** - * 项目指标默认值 - */ - @ApiModelProperty("项目指标默认值") + /** 项目指标默认值 */ + @ApiModelProperty(value = "项目指标默认值") + @Excel(name = "项目指标默认值") private String defaultValue; - /** - * LIS对照 - */ - @ApiModelProperty("LIS对照") + /** LIS对照 */ + @ApiModelProperty(value = "LIS对照") + @Excel(name = "LIS对照") private String lisCompare; - /** - * 排序 - */ - @ApiModelProperty("排序") + /** 计量单位 */ + @ApiModelProperty(value = "计量单位") + @Excel(name = "计量单位") + private String projectUnit; + + /** 排序 */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") private Integer projectSort; - /** - * 备注信息 - */ - @ApiModelProperty("备注信息") + /** 备注信息 */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") private String projectRemark; - /** - * 删除标识,0:未删除,1:已删除 - */ - @ApiModelProperty("删除标识,0:未删除,1:已删除") + /** 删除标识,0:未删除,1:已删除 */ private Integer delFlag; - private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java new file mode 100644 index 00000000..6ecf5942 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectbatch/ProjectBatch.java @@ -0,0 +1,83 @@ +package com.xinelu.manage.domain.projectbatch; + +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** +* 指标检测批次信息表 +* @TableName project_batch +*/ +@ApiModel("指标检测批次信息表") +@Data +public class ProjectBatch extends BaseEntity { + + /** + * 主键id + */ + @ApiModelProperty("主键id") + private Long id; + /** + * 患者id + */ + @ApiModelProperty("患者id") + private Long patientId; + /** + * 患者姓名 + */ + @ApiModelProperty("患者姓名") + private String patientName; + /** + * 患者电话 + */ + @ApiModelProperty("患者电话") + private String patientPhone; + /** + * 出生日期,格式:yyyy-MM-dd + */ + @ApiModelProperty("出生日期,格式:yyyy-MM-dd") + private Date birthDate; + /** + * 身份证号 + */ + @ApiModelProperty("身份证号") + private String cardNo; + /** + * 性别,男:MALE,女:FEMALE + */ + @ApiModelProperty("性别,男:MALE,女:FEMALE") + private String sex; + /** + * 批次名称 + */ + @ApiModelProperty("批次名称") + private String batchName; + /** + * 批次编号 + */ + @ApiModelProperty("批次编号") + private String batchCode; + /** + * 排序 + */ + @ApiModelProperty("排序") + private Integer batchSort; + /** + * 备注信息 + */ + @ApiModelProperty("备注信息") + private String batchRemark; + /** + * 批次创建时间,格式:yyyy-MM-dd HH:mm:ss + */ + @ApiModelProperty("批次创建时间,格式:yyyy-MM-dd HH:mm:ss") + private Date batchDate; + /** + * 删除标识,0:否,1:是 + */ + @ApiModelProperty("删除标识,0:否,1:是") + private Integer delFlag; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectdevice/ProjectDevice.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectdevice/ProjectDevice.java index 9ed1bb3d..8a35d1a5 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectdevice/ProjectDevice.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectdevice/ProjectDevice.java @@ -1,82 +1,85 @@ package com.xinelu.manage.domain.projectdevice; +import com.fasterxml.jackson.annotation.JsonFormat; import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.util.Date; import lombok.Data; /** - * 检测项目设备表 - * @TableName project_device - */ +* 检测项目设备表 +* @TableName project_device +*/ @ApiModel("检测项目设备表") @Data public class ProjectDevice extends BaseEntity { + /** - * 主键id - */ + * 主键id + */ + @ApiModelProperty("主键id") private Long id; - /** - * 患者id - */ + * 患者id + */ + @ApiModelProperty("患者id") private Long patientId; - /** - * 患者姓名 - */ + * 患者姓名 + */ + @ApiModelProperty("患者姓名") private String patientName; - /** - * 身份证号 - */ + * 身份证号 + */ + @ApiModelProperty("身份证号") private String cardNo; - /** - * 设备类型,血糖仪:GLUCOSE_METER,血压计:BLOOD_PRESSURE_DEVICE - */ + * 设备类型,血糖仪:GLUCOSE_METER,血压计:BLOOD_PRESSURE_DEVICE + */ + @ApiModelProperty("设备类型,血糖仪:GLUCOSE_METER,血压计:BLOOD_PRESSURE_DEVICE") private String deviceType; - /** - * 设备名称 - */ + * 设备名称 + */ + @ApiModelProperty("设备名称") private String deviceName; - /** - * 设备编码 - */ + * 设备编码 + */ + @ApiModelProperty("设备编码") private String deviceCode; - /** - * 设备状态 - */ + * 设备状态,绑定:BIND,解绑:UN_BIND + */ + @ApiModelProperty("设备状态,绑定:BIND,解绑:UN_BIND") private String deviceStatus; - /** - * 备注信息 - */ + * 备注信息 + */ + @ApiModelProperty("备注信息") private String deviceRemark; - /** - * 设备绑定时间 - */ + * 设备绑定时间 + */ + @ApiModelProperty("设备绑定时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date deviceBindTime; - /** - * 设备解绑时间 - */ + * 设备解绑时间 + */ + @ApiModelProperty("设备解绑时间") private Date deviceUnbindTime; - /** - * 设备IP地址 - */ + * 设备IP地址 + */ + @ApiModelProperty("设备IP地址") private String deviceIp; - /** - * 设备端口 - */ + * 设备端口 + */ + @ApiModelProperty("设备端口") private Integer devicePort; - private static final long serialVersionUID = 1L; - -} \ No newline at end of file +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectgroup/ProjectGroup.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectgroup/ProjectGroup.java index 61fb6477..15889922 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectgroup/ProjectGroup.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectgroup/ProjectGroup.java @@ -2,55 +2,56 @@ package com.xinelu.manage.domain.projectgroup; import com.xinelu.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** - * 检测项目分组表 - * @TableName project_group - */ +* 检测项目分组表 +* @TableName project_group +*/ @ApiModel("检测项目分组表") @Data public class ProjectGroup extends BaseEntity { + /** - * 主键id - */ + * 主键id + */ + @ApiModelProperty("主键id") private Long id; - /** - * 上级分组id - */ + * 上级分组id + */ + @ApiModelProperty("上级分组id") private Long parentId; - /** - * 分组名称 - */ + * 分组名称 + */ + @ApiModelProperty("分组名称") private String groupName; - /** - * 分组编码 - */ + * 分组编码 + */ + @ApiModelProperty("分组编码") private String groupCode; - /** - * 是否启用,0:是,1:否 - */ + * 是否启用,0:是,1:否 + */ + @ApiModelProperty("是否启用,0:否,1:是") private Integer enableStatus; - /** - * 排序 - */ + * 排序 + */ + @ApiModelProperty("排序") private Integer groupSort; - /** - * 备注信息 - */ + * 备注信息 + */ + @ApiModelProperty("备注信息") private String groupRemark; - /** - * 删除标识,0:未删除,1:已删除 - */ + * 删除标识,0:未删除,1:已删除 + */ + @ApiModelProperty("删除标识,0:未删除,1:已删除") private Integer delFlag; - private static final long serialVersionUID = 1L; - -} \ No newline at end of file +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastrecord/ProjectLastRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastrecord/ProjectLastRecord.java deleted file mode 100644 index 1b31ec66..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastrecord/ProjectLastRecord.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.xinelu.manage.domain.projectlastrecord; - -import com.xinelu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import java.util.Date; -import lombok.Data; - -/** - * 最近一次检测项目数据记录表 - * @TableName project_last_record - */ -@ApiModel("最近一次检测项目数据记录表") -@Data -public class ProjectLastRecord extends BaseEntity { - /** - * 主键id - */ - private Long id; - - /** - * 患者id - */ - private Long patientId; - - /** - * 患者姓名 - */ - private String patientName; - - /** - * 患者身份证号 - */ - private String cardNo; - - /** - * 分组id - */ - private Long groupId; - - /** - * 分组名称 - */ - private String groupName; - - /** - * 项目id - */ - private Long projectId; - - /** - * 项目名称 - */ - private String projectName; - - /** - * 检测设备id - */ - private Long deviceId; - - /** - * 检测设备名称 - */ - private String deviceName; - - /** - * 项目别名 - */ - private String projectAlias; - - /** - * 判断模式,定量:QUANTIFY,定性:QUALITATIVE - */ - private String judgeMode; - - /** - * 检测结果,数字或文字描述 - */ - private String measureResult; - - /** - * 项目指标最大值 - */ - private Integer maxValue; - - /** - * 项目指标最小值 - */ - private Integer minValue; - - /** - * 项目指标默认值 - */ - private String defaultValue; - - /** - * LIS对照 - */ - private String lisCompare; - - /** - * 检测时间 - */ - private Date measureTime; - - /** - * 检测人姓名,自动上传时为空,手动上传为上传人姓名 - */ - private String measureName; - - /** - * 备注信息 - */ - private String recordRemark; - - /** - * 合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED - */ - private String qualifiedSign; - - private static final long serialVersionUID = 1L; - -} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java new file mode 100644 index 00000000..2f3ecfcc --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectlastresult/ProjectLastResult.java @@ -0,0 +1,144 @@ +package com.xinelu.manage.domain.projectlastresult; + +import com.xinelu.common.annotation.Excel; +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.Data; + +/** +* 最近一次检测项目结果表 +* @TableName project_last_result +*/ +@ApiModel("最近一次检测项目结果表") +@Data +public class ProjectLastResult extends BaseEntity { + + /** + * 主键id + */ + @ApiModelProperty("主键id") + private Long id; + /** + * 患者id + */ + @ApiModelProperty("患者id") + private Long patientId; + /** + * 患者姓名 + */ + @ApiModelProperty("患者姓名") + private String patientName; + /** + * 患者身份证号 + */ + @ApiModelProperty("患者身份证号") + private String cardNo; + /** + * 批次表id + */ + @ApiModelProperty("批次表id") + private Long batchId; + /** + * 批次名称 + */ + @ApiModelProperty("批次名称") + private String batchName; + /** + * 分组id + */ + @ApiModelProperty("分组id") + private Long groupId; + /** + * 分组名称 + */ + @ApiModelProperty("分组名称") + private String groupName; + /** + * 项目id + */ + @ApiModelProperty("项目id") + private Long projectId; + /** + * 项目名称 + */ + @ApiModelProperty("项目名称") + private String projectName; + /** + * 检测设备id + */ + @ApiModelProperty("检测设备id") + private Long deviceId; + /** + * 检测设备名称 + */ + @ApiModelProperty("检测设备名称") + private String deviceName; + /** + * 项目别名 + */ + @ApiModelProperty("项目别名") + private String projectAlias; + /** + * 判断模式,定量:QUANTIFY,定性:QUALITATIVE + */ + @ApiModelProperty("判断模式,定量:QUANTIFY,定性:QUALITATIVE") + private String judgeMode; + /** + * 检测结果,数字或文字描述 + */ + @ApiModelProperty("检测结果,数字或文字描述") + private String measureResult; + /** + * 项目指标最大值 + */ + @ApiModelProperty("项目指标最大值") + private BigDecimal maxValue; + /** + * 项目指标最小值 + */ + @ApiModelProperty("项目指标最小值") + private BigDecimal minValue; + /** + * 项目指标默认值 + */ + @ApiModelProperty("项目指标默认值") + private String defaultValue; + /** + * LIS对照 + */ + @ApiModelProperty("LIS对照") + private String lisCompare; + /** + * 检测时间 + */ + @ApiModelProperty("检测时间") + private Date measureTime; + /** + * 检测人姓名,自动上传时为空,手动上传为上传人姓名 + */ + @ApiModelProperty("检测人姓名,自动上传时为空,手动上传为上传人姓名") + private String measureName; + /** + * 备注信息 + */ + @ApiModelProperty("备注信息") + private String recordRemark; + /** + * 合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED + */ + @ApiModelProperty("合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED") + private String qualifiedSign; + + /** 检测结果附件路径 */ + @ApiModelProperty(value = "检测结果附件路径") + @Excel(name = "检测结果附件路径") + private String measureResultPath; + + /** 计量单位 */ + @ApiModelProperty(value = "计量单位") + @Excel(name = "计量单位") + private String projectUnit; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectrecord/ProjectRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectrecord/ProjectRecord.java deleted file mode 100644 index 3f1f4591..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectrecord/ProjectRecord.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.xinelu.manage.domain.projectrecord; - -import com.xinelu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import java.util.Date; -import lombok.Data; - -/** - * 检测项目数据记录表 - * @TableName project_record - */ -@ApiModel("检测项目数据记录表") -@Data -public class ProjectRecord extends BaseEntity { - /** - * 主键id - */ - private Long id; - - /** - * 患者id - */ - private Long patientId; - - /** - * 患者姓名 - */ - private String patientName; - - /** - * 患者身份证号 - */ - private String cardNo; - - /** - * 分组id - */ - private Long groupId; - - /** - * 分组名称 - */ - private String groupName; - - /** - * 项目id - */ - private Long projectId; - - /** - * 项目名称 - */ - private String projectName; - - /** - * 检测设备id - */ - private Long deviceId; - - /** - * 检测设备名称 - */ - private String deviceName; - - /** - * 项目别名 - */ - private String projectAlias; - - /** - * 判断模式,定量:QUANTIFY,定性:QUALITATIVE - */ - private String judgeMode; - - /** - * 检测结果,数字或文字描述 - */ - private String measureResult; - - /** - * 项目指标最大值 - */ - private Integer maxValue; - - /** - * 项目指标最小值 - */ - private Integer minValue; - - /** - * 项目指标默认值 - */ - private String defaultValue; - - /** - * LIS对照 - */ - private String lisCompare; - - /** - * 检测时间 - */ - private Date measureTime; - - /** - * 检测人姓名,自动上传时为空,手动上传为上传人姓名 - */ - private String measureName; - - /** - * 备注信息 - */ - private String recordRemark; - - /** - * 合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED - */ - private String qualifiedSign; - - private static final long serialVersionUID = 1L; - -} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectrecordfile/ProjectRecordFile.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectrecordfile/ProjectRecordFile.java deleted file mode 100644 index 5e52355d..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectrecordfile/ProjectRecordFile.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.xinelu.manage.domain.projectrecordfile; - -import com.xinelu.common.core.domain.BaseEntity; -import java.util.Date; -import lombok.Data; - -/** - * 检测项目数据记录附件表(存储检测结果既含有报告又含有指标数据的检测项) - * @TableName project_record_file - */ -@Data -public class ProjectRecordFile extends BaseEntity { - /** - * 主键id - */ - private Long id; - - /** - * 患者id - */ - private Long patientId; - - /** - * 患者姓名 - */ - private String patientName; - - /** - * 患者身份证号 - */ - private String cardNo; - - /** - * 分组id - */ - private Long groupId; - - /** - * 分组名称 - */ - private String groupName; - - /** - * 项目id - */ - private Long projectId; - - /** - * 项目名称 - */ - private String projectName; - - /** - * 检测设备id - */ - private Long deviceId; - - /** - * 检测设备名称 - */ - private String deviceName; - - /** - * 项目别名 - */ - private String projectAlias; - - /** - * 检测结果附件路径 - */ - private String filePath; - - /** - * 检测时间 - */ - private Date measureTime; - - /** - * 检测人姓名,自动上传时为空,手动上传为上传人姓名 - */ - private String measureName; - - /** - * 项目指标最大值 - */ - private Integer maxValue; - - /** - * 项目指标最小值 - */ - private Integer minValue; - - /** - * 项目指标默认值 - */ - private String defaultValue; - - /** - * 合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED - */ - private String qualifiedSign; - - - /** - * 修改时间 - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - -} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java new file mode 100644 index 00000000..73ad82cf --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/projectresult/ProjectResult.java @@ -0,0 +1,154 @@ +package com.xinelu.manage.domain.projectresult; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +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; + +/** + * 检测项目结果对象 project_result + * + * @author haown + * @date 2024-03-11 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "检测项目结果对象", description = "project_result") +public class ProjectResult extends BaseEntity + { +private static final long serialVersionUID=1L; + + /** 主键id */ + private Long id; + + /** 患者id */ + @ApiModelProperty(value = "患者id") + @Excel(name = "患者id") + private Long patientId; + + /** 患者姓名 */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "患者姓名") + private String patientName; + + /** 患者身份证号 */ + @ApiModelProperty(value = "患者身份证号") + @Excel(name = "患者身份证号") + private String cardNo; + + /** 批次表id */ + @ApiModelProperty(value = "批次表id") + @Excel(name = "批次表id") + private Long batchId; + + /** 批次名称 */ + @ApiModelProperty(value = "批次名称") + @Excel(name = "批次名称") + private String batchName; + + /** 分组id */ + @ApiModelProperty(value = "分组id") + @Excel(name = "分组id") + private Long groupId; + + /** 分组名称 */ + @ApiModelProperty(value = "分组名称") + @Excel(name = "分组名称") + private String groupName; + + /** 项目id */ + @ApiModelProperty(value = "项目id") + @Excel(name = "项目id") + private Long projectId; + + /** 项目名称 */ + @ApiModelProperty(value = "项目名称") + @Excel(name = "项目名称") + private String projectName; + + /** 检测设备id */ + @ApiModelProperty(value = "检测设备id") + @Excel(name = "检测设备id") + private Long deviceId; + + /** 检测设备名称 */ + @ApiModelProperty(value = "检测设备名称") + @Excel(name = "检测设备名称") + private String deviceName; + + /** 项目别名 */ + @ApiModelProperty(value = "项目别名") + @Excel(name = "项目别名") + private String projectAlias; + + /** 判断模式,定量:QUANTIFY,定性:QUALITATIVE */ + @ApiModelProperty(value = "判断模式,定量:QUANTIFY,定性:QUALITATIVE") + @Excel(name = "判断模式,定量:QUANTIFY,定性:QUALITATIVE") + private String judgeMode; + + /** 检测结果,数字或文字描述 */ + @ApiModelProperty(value = "检测结果,数字或文字描述") + @Excel(name = "检测结果,数字或文字描述") + private String measureResult; + + /** 项目指标最大值 */ + @ApiModelProperty(value = "项目指标最大值") + @Excel(name = "项目指标最大值") + private BigDecimal maxValue; + + /** 项目指标最小值 */ + @ApiModelProperty(value = "项目指标最小值") + @Excel(name = "项目指标最小值") + private BigDecimal minValue; + + /** 项目指标默认值 */ + @ApiModelProperty(value = "项目指标默认值") + @Excel(name = "项目指标默认值") + private String defaultValue; + + /** LIS对照 */ + @ApiModelProperty(value = "LIS对照") + @Excel(name = "LIS对照") + private String lisCompare; + + /** 检测时间 */ + @ApiModelProperty(value = "检测时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检测时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date measureTime; + + /** 检测人姓名,自动上传时为空,手动上传为上传人姓名 */ + @ApiModelProperty(value = "检测人姓名,自动上传时为空,手动上传为上传人姓名") + @Excel(name = "检测人姓名,自动上传时为空,手动上传为上传人姓名") + private String measureName; + + /** 备注信息 */ + @ApiModelProperty(value = "备注信息") + @Excel(name = "备注信息") + private String recordRemark; + + /** 合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED */ + @ApiModelProperty(value = "合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED") + @Excel(name = "合格标识,合格:QUALIFIED,不合格:NOT_QUALIFIED") + private String qualifiedSign; + + /** 检测结果附件路径 */ + @ApiModelProperty(value = "检测结果附件路径") + @Excel(name = "检测结果附件路径") + private String measureResultPath; + + /** 计量单位 */ + @ApiModelProperty(value = "计量单位") + @Excel(name = "计量单位") + private String projectUnit; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java index 3bb7a867..ade18bd6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientrecord/SignPatientRecord.java @@ -201,7 +201,19 @@ public class SignPatientRecord extends BaseEntity { @ApiModelProperty(value = "解约原因") private String separateReason; - /** + /** + * 健康管理师id + */ + @ApiModelProperty(value = "健康管理师id") + private Long healthManageId; + + /** + * 健康管理师姓名 + */ + @ApiModelProperty(value = "健康管理师姓名") + private String healthManageName; + + /** * 删除标识,0:未删除,1:已删除 */ @ApiModelProperty(value = "删除标识,0:未删除,1:已删除") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java index b7e39149..94761bff 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordDto.java @@ -17,6 +17,15 @@ public class PatientVisitRecordDto { @ApiModelProperty(value = "患者表id") private Long patientId; + /** + * 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED + */ + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") + private String visitType; + + @ApiModelProperty(value = "住院/门诊号") + private String inHospitalNumber; + @ApiModelProperty(value = "就诊时间开始") @JsonFormat(pattern = "yyyy-MM-dd") private Date visitDateStart; diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java new file mode 100644 index 00000000..70ecb3cf --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordImportDto.java @@ -0,0 +1,124 @@ +package com.xinelu.manage.dto.patientvisitrecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import lombok.Data; + +/** + * @description: 患者导入传输对象 + * @author: haown + * @create: 2024-03-07 11:24 + **/ +@ApiModel("患者导入传输对象") +@Data +public class PatientVisitRecordImportDto { + + /** 患者姓名 */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "姓名") + private String patientName; + + /** 患者电话 */ + @ApiModelProperty(value = "患者电话") + @Excel(name = "电话") + private String patientPhone; + + /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") + @Excel(name = "诊断") + private String mainDiagnosis; + + + /** 入院时间,时间格式:yyyy-MM-dd */ + @ApiModelProperty(value = "入院时间") + @Excel(name = "入院时间") + private Date admissionDate; + + /** 身份证号 */ + @ApiModelProperty(value = "身份证号") + @Excel(name = "身份证号") + private String cardNo; + + /** 出生日期,格式:yyyy-MM-dd */ + @ApiModelProperty(value = "出生日期,格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出生日期") + private Date birthDate; + + /** 性别,男:MALE,女:FEMALE */ + + @ApiModelProperty(value = "性别,男:MALE,女:FEMALE") + @Excel(name = "性别",readConverterExp = "男=MALE,女=FEMALE") + private String sex; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "医院") + private String hospitalAgencyName; + + /** 所属院区名称 */ + @ApiModelProperty(value = "所属院区名称") + @Excel(name = "院区") + private String campusAgencyName; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + @Excel(name = "科室名称") + private String departmentName; + + /** 所属病区名称 */ + @ApiModelProperty(value = "所属病区名称") + @Excel(name = "病区名称") + private String wardName; + + /** 主治医生 */ + @ApiModelProperty(value = "主治医生") + @Excel(name = "主治医生") + private String attendingPhysician; + + @ApiModelProperty(value = "住院/门诊号") + @Excel(name = "住院号") + private String inHospitalNumber; + + @ApiModelProperty(value = "门诊号") + @Excel(name = "门诊号") + private String outpatientNumber; + + /** 责任护士 */ + @ApiModelProperty(value = "责任护士") + @Excel(name = "责任护士") + private String responsibleNurse; + + /** 家属电话 */ + @ApiModelProperty(value = "家属电话") + @Excel(name = "家属电话") + private String familyMemberPhone; + + /** 就诊流水号 */ + @ApiModelProperty(value = "就诊流水号") + @Excel(name = "就诊流水号") + private String visitSerialNumber; + + /** 入院病历 */ + @ApiModelProperty(value = "入院病历") + @Excel(name = "入院病历信息") + private String inHospitalInfo; + + /** 门诊记录信息(就诊记录-门诊记录) */ + @ApiModelProperty(value = "门诊记录信息") + @Excel(name = "门诊病历信息") + private String outpatientVisitInfo; + + /** 出院病历信息,存储患者出院的整个病历信息 */ + @ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息") + @Excel(name = "出院病历信息") + private String outHospitalInfo; + + /** 手术名称 */ + @ApiModelProperty(value = "手术名称") + @Excel(name = "手术名称") + private String surgicalName; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java new file mode 100644 index 00000000..5f8a47f2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/patientvisitrecord/PatientVisitRecordSaveDto.java @@ -0,0 +1,110 @@ +package com.xinelu.manage.dto.patientvisitrecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; +import javax.validation.constraints.NotBlank; +import lombok.Data; + +/** + * @description: 患者配置——就诊信息保存传输对象 + * @author: haown + * @create: 2024-03-13 14:46 + **/ +@ApiModel("患者配置——就诊信息保存传输对象") +@Data +public class PatientVisitRecordSaveDto { + + /** 患者表id */ + @ApiModelProperty(value = "患者表id") + @NotBlank(message = "患者数据不能为空") + private Long patientId; + + /** + * 就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED + */ + @ApiModelProperty(value = "就诊类型,门诊:OUTPATIENT_SERVICE,住院:BE_HOSPITALIZED") + @NotBlank(message = "就诊类型不能为空") + private String visitType; + + /** 主要诊断 */ + @ApiModelProperty(value = "主要诊断") + @NotBlank(message = "主要诊断不能为空") + private String mainDiagnosis; + + /** 就诊流水号 */ + @ApiModelProperty(value = "就诊流水号") + @NotBlank(message = "就诊流水号不能为空") + private String visitSerialNumber; + + /** 主治医生id */ + @ApiModelProperty(value = "主治医生id") + @NotBlank(message = "主治医生不能为空") + private Long attendingPhysicianId; + + /** 主治医生姓名 */ + @ApiModelProperty(value = "主治医生姓名") + private String attendingPhysicianName; + + /** 所属医院id */ + @ApiModelProperty(value = "所属医院id") + @Excel(name = "所属医院id") + private Long hospitalAgencyId; + + /** 所属医院名称 */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "所属医院名称") + private String hospitalAgencyName; + + /** 所属院区id */ + @ApiModelProperty(value = "所属院区id") + @Excel(name = "所属院区id") + private Long campusAgencyId; + + /** 所属院区名称 */ + @ApiModelProperty(value = "所属院区名称") + @Excel(name = "所属院区名称") + private String campusAgencyName; + + /** 所属科室id */ + @NotBlank(message = "科室不能为空") + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** 所属科室名称 */ + @ApiModelProperty(value = "所属科室名称") + private String departmentName; + + /** 入院时间 */ + @ApiModelProperty(value = "入院时间") + @NotBlank(message = "入院时间不能为空") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date admissionTime; + + /** 出院时间 */ + @ApiModelProperty(value = "出院时间") + @NotBlank(message = "出院时间不能为空") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date dischargeTime; + + @ApiModelProperty(value = "住院/门诊号") + private String inHospitalNumber; + + /** 入院病历信息,存储患者入院的整个病历信息 */ + @ApiModelProperty(value = "入院病历信息,存储患者入院的整个病历信息") + @NotBlank(message = "入院病历不能为空") + private String inHospitalInfo; + + /** 出院病历信息,存储患者出院的整个病历信息 */ + @ApiModelProperty(value = "出院病历信息,存储患者出院的整个病历信息") + @NotBlank(message = "出院病历不能为空") + private String outHospitalInfo; + + /** 门诊记录信息(就诊记录-门诊记录) */ + @ApiModelProperty(value = "门诊记录信息") + @NotBlank(message = "门诊记录信息不能为空") + private String outpatientVisitInfo; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectgroup/ProjectGroupSaveListDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectgroup/ProjectGroupSaveListDto.java new file mode 100644 index 00000000..b858c8eb --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectgroup/ProjectGroupSaveListDto.java @@ -0,0 +1,16 @@ +package com.xinelu.manage.dto.projectgroup; + +import com.xinelu.manage.domain.projectgroup.ProjectGroup; +import java.util.List; +import lombok.Data; + +/** + * @description: 检测项目组批量保存传输对象 + * @author: haown + * @create: 2024-03-12 09:27 + **/ +@Data +public class ProjectGroupSaveListDto { + + private List list; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java new file mode 100644 index 00000000..46d22553 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/projectresult/ProjectResultStatisticDto.java @@ -0,0 +1,58 @@ +package com.xinelu.manage.dto.projectresult; + +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-03-06 13:09 + **/ +@ApiModel("项目检测统计查询传输对象") +@Data +public class ProjectResultStatisticDto { + + @ApiModelProperty("患者id") + private Long patientId; + + /** + * 分组编码 + */ + @ApiModelProperty("分组编码,血压:bp,血糖:bg,运动:sport") + private String groupCode; + + /** + * 分组id + */ + @ApiModelProperty("分组id") + private Long groupId; + /** + * 项目编码 + */ + @ApiModelProperty("项目编码") + private String projectCode; + + /** + * 项目id + */ + @ApiModelProperty("项目id") + private Long projectId; + + /** + * 检测时间开始 + */ + @ApiModelProperty("检测时间开始") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date measureTimeStart; + + /** + * 检测时间结束 + */ + @ApiModelProperty("检测时间结束") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date measureTimeEnd; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientprehospitalization/PatientPreHospitalizationMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientprehospitalization/PatientPreHospitalizationMapper.java new file mode 100644 index 00000000..49df6d7a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientprehospitalization/PatientPreHospitalizationMapper.java @@ -0,0 +1,42 @@ +package com.xinelu.manage.mapper.patientprehospitalization; + +import com.xinelu.manage.domain.patientprehospitalization.PatientPreHospitalization; +import com.xinelu.manage.dto.patientinfo.PatientInfoDto; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +/** +* @author Administrator +* @description 针对表【patient_pre_hospitalization(预住院患者表)】的数据库操作Mapper +* @createDate 2024-03-08 10:26:02 +* @Entity com.xinelu.manage.domain.patientprehospitalization.PatientPreHospitalization +*/ +public interface PatientPreHospitalizationMapper { + + int deleteByPrimaryKey(Long id); + + int insert(PatientPreHospitalization record); + + int insertBatch(@Param("recordList") List recordList); + + int insertSelective(PatientPreHospitalization record); + + PatientPreHospitalization selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(PatientPreHospitalization record); + + int updateByPrimaryKey(PatientPreHospitalization record); + + List selectList(PatientInfoDto patientInfo); + + List selectApplyList(PatientPreHospitalization preHospitalizationQuery); + + /** + * 批量删除患者信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteByIds(Long[] ids); + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java index 8d866ee5..3a1ffea2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/patientvisitrecord/PatientVisitRecordMapper.java @@ -1,9 +1,10 @@ package com.xinelu.manage.mapper.patientvisitrecord; - -import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; -import java.util.List; +import org.apache.ibatis.annotations.Param; +import java.util.Collection; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; +import java.util.List; /** * 患者就诊记录基本信息Mapper接口 @@ -36,6 +37,7 @@ public interface PatientVisitRecordMapper { */ public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord); + int insertBatch(@Param("patientVisitRecordList") Collection patientVisitRecordList); /** * 修改患者就诊记录基本信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/project/ProjectMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/project/ProjectMapper.java index 76e3d275..638232c9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/project/ProjectMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/project/ProjectMapper.java @@ -1,25 +1,63 @@ package com.xinelu.manage.mapper.project; import com.xinelu.manage.domain.project.Project; +import java.util.List; +import org.apache.ibatis.annotations.Param; /** -* @author haown -* @description 针对表【project(检测项目表)】的数据库操作Mapper -* @createDate 2024-03-05 16:33:33 -* @Entity com.xinelu.manage.domain.project.Project -*/ + * 检测项目Mapper接口 + * + * @author haown + * @date 2024-03-11 + */ public interface ProjectMapper { + /** + * 查询检测项目 + * + * @param id 检测项目主键 + * @return 检测项目 + */ + public Project selectProjectById(Long id); - int deleteByPrimaryKey(Long id); + /** + * 查询检测项目列表 + * + * @param project 检测项目 + * @return 检测项目集合 + */ + public List selectProjectList(Project project); - int insert(Project record); + /** + * 新增检测项目 + * + * @param project 检测项目 + * @return 结果 + */ + public int insertProject(Project project); - int insertSelective(Project record); + /** + * 修改检测项目 + * + * @param project 检测项目 + * @return 结果 + */ + public int updateProject(Project project); - Project selectByPrimaryKey(Long id); + /** + * 删除检测项目 + * + * @param id 检测项目主键 + * @return 结果 + */ + public int deleteProjectById(Long id); - int updateByPrimaryKeySelective(Project record); - - int updateByPrimaryKey(Project record); + /** + * 批量删除检测项目 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProjectByIds(Long[] ids); + List hasSameCodeProject(@Param("id")Long id, @Param("groupId")Long groupId, @Param("projectCode")String projectCode); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectbatch/ProjectBatchMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectbatch/ProjectBatchMapper.java new file mode 100644 index 00000000..55498038 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectbatch/ProjectBatchMapper.java @@ -0,0 +1,25 @@ +package com.xinelu.manage.mapper.projectbatch; + +import com.xinelu.manage.domain.projectbatch.ProjectBatch; + +/** +* @author Administrator +* @description 针对表【project_batch(指标检测批次信息表)】的数据库操作Mapper +* @createDate 2024-03-06 10:12:52 +* @Entity com.xinelu.manage.domain.projectbatch.ProjectBatch +*/ +public interface ProjectBatchMapper { + + int deleteByPrimaryKey(Long id); + + int insert(ProjectBatch record); + + int insertSelective(ProjectBatch record); + + ProjectBatch selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(ProjectBatch record); + + int updateByPrimaryKey(ProjectBatch record); + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectdevice/ProjectDeviceMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectdevice/ProjectDeviceMapper.java index 226ab16a..80809dae 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectdevice/ProjectDeviceMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectdevice/ProjectDeviceMapper.java @@ -1,25 +1,61 @@ package com.xinelu.manage.mapper.projectdevice; import com.xinelu.manage.domain.projectdevice.ProjectDevice; +import java.util.List; + /** -* @author haown -* @description 针对表【project_device(检测项目设备表)】的数据库操作Mapper -* @createDate 2024-03-05 17:14:06 -* @Entity com.xinelu.manage.domain.projectdevice.ProjectDevice -*/ + * 检测项目设备Mapper接口 + * + * @author haown + * @date 2024-03-11 + */ public interface ProjectDeviceMapper { + /** + * 查询检测项目设备 + * + * @param id 检测项目设备主键 + * @return 检测项目设备 + */ + public ProjectDevice selectProjectDeviceById(Long id); - int deleteByPrimaryKey(Long id); + /** + * 查询检测项目设备列表 + * + * @param projectDevice 检测项目设备 + * @return 检测项目设备集合 + */ + public List selectProjectDeviceList(ProjectDevice projectDevice); - int insert(ProjectDevice record); + /** + * 新增检测项目设备 + * + * @param projectDevice 检测项目设备 + * @return 结果 + */ + public int insertProjectDevice(ProjectDevice projectDevice); - int insertSelective(ProjectDevice record); + /** + * 修改检测项目设备 + * + * @param projectDevice 检测项目设备 + * @return 结果 + */ + public int updateProjectDevice(ProjectDevice projectDevice); - ProjectDevice selectByPrimaryKey(Long id); - - int updateByPrimaryKeySelective(ProjectDevice record); - - int updateByPrimaryKey(ProjectDevice record); + /** + * 删除检测项目设备 + * + * @param id 检测项目设备主键 + * @return 结果 + */ + public int deleteProjectDeviceById(Long id); + /** + * 批量删除检测项目设备 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProjectDeviceByIds(Long[] ids); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectgroup/ProjectGroupMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectgroup/ProjectGroupMapper.java index 3b2cd63a..b1cd7e55 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectgroup/ProjectGroupMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectgroup/ProjectGroupMapper.java @@ -1,25 +1,67 @@ package com.xinelu.manage.mapper.projectgroup; +import org.apache.ibatis.annotations.Param; +import java.util.Collection; import com.xinelu.manage.domain.projectgroup.ProjectGroup; +import java.util.List; + /** -* @author haown -* @description 针对表【project_group(检测项目分组表)】的数据库操作Mapper -* @createDate 2024-03-05 16:34:58 -* @Entity com.xinelu.manage.domain.projectgroup.ProjectGroup -*/ + * 检测项目分组Mapper接口 + * + * @author haown + * @date 2024-03-11 + */ public interface ProjectGroupMapper { + /** + * 查询检测项目分组 + * + * @param id 检测项目分组主键 + * @return 检测项目分组 + */ + public ProjectGroup selectProjectGroupById(Long id); - int deleteByPrimaryKey(Long id); + /** + * 查询检测项目分组列表 + * + * @param projectGroup 检测项目分组 + * @return 检测项目分组集合 + */ + public List selectProjectGroupList(ProjectGroup projectGroup); - int insert(ProjectGroup record); + /** + * 新增检测项目分组 + * + * @param projectGroup 检测项目分组 + * @return 结果 + */ + public int insertProjectGroup(ProjectGroup projectGroup); - int insertSelective(ProjectGroup record); + int insertBatch(@Param("projectGroupList") Collection projectGroupList); - ProjectGroup selectByPrimaryKey(Long id); + /** + * 修改检测项目分组 + * + * @param projectGroup 检测项目分组 + * @return 结果 + */ + public int updateProjectGroup(ProjectGroup projectGroup); - int updateByPrimaryKeySelective(ProjectGroup record); + /** + * 删除检测项目分组 + * + * @param id 检测项目分组主键 + * @return 结果 + */ + public int deleteProjectGroupById(Long id); - int updateByPrimaryKey(ProjectGroup record); + /** + * 批量删除检测项目分组 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProjectGroupByIds(Long[] ids); + List hasSameCodeGroup(@Param("id")Long id, @Param("groupCode")String groupCode); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectlastrecord/ProjectLastRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectlastrecord/ProjectLastRecordMapper.java deleted file mode 100644 index 757d6a91..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectlastrecord/ProjectLastRecordMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xinelu.manage.mapper.projectlastrecord; - -import com.xinelu.manage.domain.projectlastrecord.ProjectLastRecord; - -/** -* @author haown -* @description 针对表【project_last_record(最近一次检测项目数据记录表)】的数据库操作Mapper -* @createDate 2024-03-05 17:09:28 -* @Entity com.xinelu.manage.domain.projectlastrecord.ProjectLastRecord -*/ -public interface ProjectLastRecordMapper { - - int deleteByPrimaryKey(Long id); - - int insert(ProjectLastRecord record); - - int insertSelective(ProjectLastRecord record); - - ProjectLastRecord selectByPrimaryKey(Long id); - - int updateByPrimaryKeySelective(ProjectLastRecord record); - - int updateByPrimaryKey(ProjectLastRecord record); - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectlastresult/ProjectLastResultMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectlastresult/ProjectLastResultMapper.java new file mode 100644 index 00000000..5766e1c1 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectlastresult/ProjectLastResultMapper.java @@ -0,0 +1,25 @@ +package com.xinelu.manage.mapper.projectlastresult; + +import com.xinelu.manage.domain.projectlastresult.ProjectLastResult; + +/** +* @author haown +* @description 针对表【project_last_result(最近一次检测项目结果表)】的数据库操作Mapper +* @createDate 2024-03-06 10:49:43 +* @Entity com.xinelu.manage.domain.projectlastresult.ProjectLastResult +*/ +public interface ProjectLastResultMapper { + + int deleteByPrimaryKey(Long id); + + int insert(ProjectLastResult record); + + int insertSelective(ProjectLastResult record); + + ProjectLastResult selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(ProjectLastResult record); + + int updateByPrimaryKey(ProjectLastResult record); + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectrecord/ProjectRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectrecord/ProjectRecordMapper.java deleted file mode 100644 index 987b9252..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectrecord/ProjectRecordMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xinelu.manage.mapper.projectrecord; - -import com.xinelu.manage.domain.projectrecord.ProjectRecord; - -/** -* @author haown -* @description 针对表【project_record(检测项目数据记录表)】的数据库操作Mapper -* @createDate 2024-03-05 17:09:04 -* @Entity com.xinelu.manage.domain.projectrecord.ProjectRecord -*/ -public interface ProjectRecordMapper { - - int deleteByPrimaryKey(Long id); - - int insert(ProjectRecord record); - - int insertSelective(ProjectRecord record); - - ProjectRecord selectByPrimaryKey(Long id); - - int updateByPrimaryKeySelective(ProjectRecord record); - - int updateByPrimaryKey(ProjectRecord record); - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectrecordfile/ProjectRecordFileMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectrecordfile/ProjectRecordFileMapper.java deleted file mode 100644 index b3831d6c..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectrecordfile/ProjectRecordFileMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xinelu.manage.mapper.projectrecordfile; - -import com.xinelu.manage.domain.projectrecordfile.ProjectRecordFile; - -/** -* @author haown -* @description 针对表【project_record_file(检测项目数据记录附件表(存储检测结果既含有报告又含有指标数据的检测项))】的数据库操作Mapper -* @createDate 2024-03-05 16:36:32 -* @Entity com.xinelu.manage.domain.projectrecordfile.ProjectRecordFile -*/ -public interface ProjectRecordFileMapper { - - int deleteByPrimaryKey(Long id); - - int insert(ProjectRecordFile record); - - int insertSelective(ProjectRecordFile record); - - ProjectRecordFile selectByPrimaryKey(Long id); - - int updateByPrimaryKeySelective(ProjectRecordFile record); - - int updateByPrimaryKey(ProjectRecordFile record); - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectresult/ProjectResultMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectresult/ProjectResultMapper.java new file mode 100644 index 00000000..1764786e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/projectresult/ProjectResultMapper.java @@ -0,0 +1,66 @@ +package com.xinelu.manage.mapper.projectresult; + +import com.xinelu.manage.domain.projectresult.ProjectResult; +import com.xinelu.manage.dto.projectresult.ProjectResultStatisticDto; +import com.xinelu.manage.vo.projectresult.ProjectResultVo; +import java.util.List; + +/** +* @author haown +* @description 针对表【project_result(检测项目结果表)】的数据库操作Mapper +* @createDate 2024-03-06 10:41:36 +* @Entity com.xinelu.manage.domain.projectresult.ProjectResult +*/ +public interface ProjectResultMapper { + + /** + * 查询检测项目结果 + * + * @param id 检测项目结果主键 + * @return 检测项目结果 + */ + public ProjectResult selectProjectResultById(Long id); + + /** + * 查询检测项目结果列表 + * + * @param projectResult 检测项目结果 + * @return 检测项目结果集合 + */ + public List selectProjectResultList(ProjectResult projectResult); + + /** + * 新增检测项目结果 + * + * @param projectResult 检测项目结果 + * @return 结果 + */ + public int insertProjectResult(ProjectResult projectResult); + + /** + * 修改检测项目结果 + * + * @param projectResult 检测项目结果 + * @return 结果 + */ + public int updateProjectResult(ProjectResult projectResult); + + /** + * 删除检测项目结果 + * + * @param id 检测项目结果主键 + * @return 结果 + */ + public int deleteProjectResultById(Long id); + + /** + * 批量删除检测项目结果 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProjectResultByIds(Long[] ids); + + List selectList(ProjectResultStatisticDto projectResultStatisticDto); + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/IPatientPreHospitalizationService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/IPatientPreHospitalizationService.java new file mode 100644 index 00000000..f036587a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/IPatientPreHospitalizationService.java @@ -0,0 +1,38 @@ +package com.xinelu.manage.service.patientprehospitalization; + +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.manage.domain.patientprehospitalization.PatientPreHospitalization; +import com.xinelu.manage.dto.patientinfo.PatientInfoDto; +import java.util.List; + +/** +* @author haown +* @description 针对表【patient_pre_hospitalization(预住院患者表)】的数据库操作Service +* @createDate 2024-03-08 10:25:39 +*/ +public interface IPatientPreHospitalizationService { + + int insert(PatientPreHospitalization preHospitalization); + + List selectList(PatientInfoDto patientInfo); + + int update(PatientPreHospitalization preHospitalization); + + /** + * 批量删除 + * + * @param ids 需要删除的预住院患者信息主键集合 + * @return 结果 + */ + int deleteByIds(Long[] ids); + + PatientPreHospitalization getById(Long id); + + /** + * 预住院患者导入 + * + * @param patientList 患者就诊信息 + * @return int + **/ + AjaxResult importList(List patientList); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java new file mode 100644 index 00000000..89c7fdb8 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientprehospitalization/impl/PatientPreHospitalizationServiceImpl.java @@ -0,0 +1,221 @@ +package com.xinelu.manage.service.patientprehospitalization.impl; + +import com.xinelu.common.constant.NodeTypeConstants; +import com.xinelu.common.constant.PatientTypeConstants; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.regex.RegexUtil; +import com.xinelu.manage.domain.agency.Agency; +import com.xinelu.manage.domain.department.Department; +import com.xinelu.manage.domain.patientinfo.PatientInfo; +import com.xinelu.manage.domain.patientprehospitalization.PatientPreHospitalization; +import com.xinelu.manage.dto.patientinfo.PatientInfoDto; +import com.xinelu.manage.mapper.agency.AgencyMapper; +import com.xinelu.manage.mapper.department.DepartmentMapper; +import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; +import com.xinelu.manage.mapper.patientprehospitalization.PatientPreHospitalizationMapper; +import com.xinelu.manage.service.patientprehospitalization.IPatientPreHospitalizationService; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; + +/** +* @author haown +* @description 针对表【patient_pre_hospitalization(预住院患者表)】的数据库操作Service实现 +* @createDate 2024-03-08 10:25:39 +*/ +@Service +public class PatientPreHospitalizationServiceImpl implements IPatientPreHospitalizationService { + + @Resource + private PatientPreHospitalizationMapper preHospitalizationMapper; + + @Resource + private PatientInfoMapper patientInfoMapper; + + @Resource + private AgencyMapper agencyMapper; + + @Resource + private DepartmentMapper departmentMapper; + + @Resource + private RegexUtil regexUtil; + + @Override public int insert(PatientPreHospitalization preHospitalization) { + // 根据身份证号查询是否有患者信息 + PatientInfoDto patientInfoDto = new PatientInfoDto(); + patientInfoDto.setCardNo(preHospitalization.getCardNo()); + List patientList = patientInfoMapper.selectPatientInfoList(patientInfoDto); + if (CollectionUtils.isEmpty(patientList)) { + // 保存患者信息 + PatientInfo patientInfo = new PatientInfo(); + BeanUtils.copyBeanProp(patientInfo, preHospitalization); + patientInfo.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientInfo.setCreateTime(DateUtils.getNowDate()); + patientInfo.setDelFlag(0); + patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT); + patientInfoMapper.insertPatientInfo(patientInfo); + preHospitalization.setPatientId(patientInfo.getId()); + } else { + // 修改患者信息 + PatientInfo patientInfo = patientList.get(0); + BeanUtils.copyBeanProp(patientInfo, preHospitalization); + patientInfo.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientInfo.setUpdateTime(DateUtils.getNowDate()); + patientInfo.setDelFlag(0); + patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT); + patientInfoMapper.updatePatientInfo(patientInfo); + preHospitalization.setPatientId(patientList.get(0).getId()); + } + // 保存预住院信息 + preHospitalization.setDelFlag(0); + preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + preHospitalization.setCreateTime(DateUtils.getNowDate()); + return preHospitalizationMapper.insertSelective(preHospitalization); + } + + @Override public List selectList(PatientInfoDto patientInfo) { + return preHospitalizationMapper.selectList(patientInfo); + } + + @Override public int update(PatientPreHospitalization preHospitalization) { + // 修改患者信息 + PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(preHospitalization.getPatientId()); + Long patientId = patientInfo.getId(); + BeanUtils.copyBeanProp(patientInfo, preHospitalization); + patientInfo.setId(patientId); + int flag = patientInfoMapper.updatePatientInfo(patientInfo); + if (flag >= 0) { + return preHospitalizationMapper.updateByPrimaryKeySelective(preHospitalization); + } + return -1; + } + + + @Override public int deleteByIds(Long[] ids) { + return preHospitalizationMapper.deleteByIds(ids); + } + + @Override public PatientPreHospitalization getById(Long id) { + return preHospitalizationMapper.selectByPrimaryKey(id); + } + + @Override public AjaxResult importList(List patientList) { + //判断添加的数据是否为空 + if (CollectionUtils.isEmpty(patientList)) { + return AjaxResult.error("请添加预住院患者导入信息!"); + } + // 根据患者身份证号做去重处理 + List importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList()); + // 校验联系电话格式是否正确 + PatientPreHospitalization patient = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPatientPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPatientPhone()))).findFirst().orElse(new PatientPreHospitalization()); + if (StringUtils.isNotBlank(patient.getPatientPhone())) { + return AjaxResult.error("当前患者联系电话:" + patient.getPatientPhone() + " 格式不正确,请重新录入!"); + } + List saveList = new ArrayList<>(); + for (PatientPreHospitalization item : importDataList) { + PatientPreHospitalization preHospitalization = new PatientPreHospitalization(); + BeanUtils.copyProperties(item, preHospitalization); + // 根据医院名称查询医院id + Agency agency = new Agency(); + if (StringUtils.isNotBlank(item.getHospitalAgencyName())) { + agency.setAgencyName(item.getHospitalAgencyName()); + agency.setNodeType(NodeTypeConstants.HOSPITAL); + List agencyList = agencyMapper.selectAgencyList(agency); + if (CollectionUtils.isNotEmpty(agencyList)) { + preHospitalization.setHospitalAgencyId(agencyList.get(0).getId()); + } + } else { + preHospitalization.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId()); + Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId()); + if (ObjectUtils.isNotEmpty(agencyData)) { + preHospitalization.setHospitalAgencyName(agencyData.getAgencyName()); + } + } + // 查询院区id + if (StringUtils.isNotBlank(item.getCampusAgencyName())) { + agency.setAgencyName(item.getWardName()); + agency.setNodeType(NodeTypeConstants.CAMPUS); + List campusList = agencyMapper.selectAgencyList(agency); + if (CollectionUtils.isNotEmpty(campusList)) { + preHospitalization.setCampusAgencyId(campusList.get(0).getId()); + } + } + + // 查询科室id + Department department = new Department(); + if (StringUtils.isNotBlank(item.getDepartmentName())) { + department.setAgencyName(item.getHospitalAgencyName()); + department.setDepartmentName(item.getDepartmentName()); + department.setNodeType(NodeTypeConstants.DEPARTMENT); + List deptList = departmentMapper.selectDepartmentList(department); + if (CollectionUtils.isNotEmpty(deptList)) { + preHospitalization.setDepartmentId(deptList.get(0).getId()); + } + } else { + preHospitalization.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId()); + Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId()); + if (ObjectUtils.isNotEmpty(department1)) { + preHospitalization.setDepartmentName(department1.getDepartmentName()); + } + } + // 查询病区 + if (StringUtils.isNotBlank(item.getWardName())) { + department.setAgencyName(item.getHospitalAgencyName()); + department.setDepartmentName(item.getWardName()); + department.setNodeType(NodeTypeConstants.WARD); + List deptList = departmentMapper.selectDepartmentList(department); + if (CollectionUtils.isNotEmpty(deptList)) { + preHospitalization.setWardId(deptList.get(0).getId()); + } + } + + preHospitalization.setCreateTime(DateUtils.getNowDate()); + preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + + // 根据身份证号查询患者信息 + PatientInfoDto patientQuery = new PatientInfoDto(); + patientQuery.setCardNo(item.getCardNo()); + List patientInfoList = patientInfoMapper.selectPatientInfoList(patientQuery); + if (CollectionUtils.isNotEmpty(patientInfoList)) { + // 修改居民信息 + PatientInfo updInfo = patientInfoList.get(0); + BeanUtils.copyBeanProp(updInfo, item); + patientInfoMapper.updatePatientInfo(updInfo); + preHospitalization.setPatientId(patientInfoList.get(0).getId()); + } else { + PatientInfo saveInfo = new PatientInfo(); + // 添加居民 + BeanUtils.copyBeanProp(saveInfo, item); + patientInfoMapper.insertPatientInfo(saveInfo); + preHospitalization.setPatientId(saveInfo.getId()); + } + // 根据患者身份证号和预约时间查询是否有记录 + PatientPreHospitalization preHospitalizationQuery = new PatientPreHospitalization(); + preHospitalizationQuery.setCardNo(item.getCardNo()); + preHospitalizationQuery.setAppointmentDate(item.getAppointmentDate()); + List list = preHospitalizationMapper.selectApplyList(preHospitalizationQuery); + if (CollectionUtils.isEmpty(list)) { + // 新增 + saveList.add(preHospitalization); + } else { + // 有预约信息暂时不导入 + } + } + int insertCount = preHospitalizationMapper.insertBatch(saveList); + if (insertCount <= 0) { + throw new ServiceException("导入预住院信息失败,请联系管理员!"); + } + return AjaxResult.success(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java index afab462d..65c5ad8a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/IPatientVisitRecordService.java @@ -1,9 +1,12 @@ package com.xinelu.manage.service.patientvisitrecord; -import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; -import java.util.List; - +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordImportDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordSaveDto; +import java.util.List; +import org.springframework.web.bind.annotation.RequestBody; /** * 患者就诊记录基本信息Service接口 @@ -36,13 +39,20 @@ public interface IPatientVisitRecordService { */ public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord); + /** + * 患者配置——就诊信息保存 + * @param saveDto + * @return + */ + int saveRecord(@RequestBody PatientVisitRecordSaveDto saveDto); + /** * 修改患者就诊记录基本信息 * - * @param patientVisitRecord 患者就诊记录基本信息 + * @param updDto 患者就诊记录基本信息 * @return 结果 */ - public int updatePatientVisitRecord(PatientVisitRecord patientVisitRecord); + public int updatePatientVisitRecord(PatientVisitRecordSaveDto updDto); /** * 批量删除患者就诊记录基本信息 @@ -59,4 +69,12 @@ public interface IPatientVisitRecordService { * @return 结果 */ public int deletePatientVisitRecordById(Long id); + + /** + * 患者就诊信息导入 + * + * @param patientList 患者就诊信息 + * @return int + **/ + AjaxResult importPatientList(List patientList, String patientType); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java index d5a59f8e..0bee65c1 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java @@ -1,13 +1,39 @@ package com.xinelu.manage.service.patientvisitrecord.impl; -import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; -import java.util.List; +import com.xinelu.common.constant.Constants; +import com.xinelu.common.constant.NodeTypeConstants; +import com.xinelu.common.constant.VisitTypeConstants; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; -import javax.annotation.Resource; -import org.springframework.stereotype.Service; -import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.regex.RegexUtil; +import com.xinelu.manage.domain.agency.Agency; +import com.xinelu.manage.domain.department.Department; +import com.xinelu.manage.domain.patientinfo.PatientInfo; import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord; +import com.xinelu.manage.dto.patientinfo.PatientInfoDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordImportDto; +import com.xinelu.manage.dto.patientvisitrecord.PatientVisitRecordSaveDto; +import com.xinelu.manage.mapper.agency.AgencyMapper; +import com.xinelu.manage.mapper.department.DepartmentMapper; +import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; +import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper; import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; +import java.time.LocalDate; +import java.time.ZoneId; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; /** * 患者就诊记录基本信息Service业务层处理 @@ -19,6 +45,14 @@ import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService { @Resource private PatientVisitRecordMapper patientVisitRecordMapper; + @Resource + private RegexUtil regexUtil; + @Resource + private PatientInfoMapper patientMapper; + @Resource + private AgencyMapper agencyMapper; + @Resource + private DepartmentMapper departmentMapper; /** * 查询患者就诊记录基本信息 @@ -50,19 +84,46 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService */ @Override public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord) { - patientVisitRecord.setCreateTime(DateUtils.getNowDate()); - return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); + patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientVisitRecord.setCreateTime(DateUtils.getNowDate()); + return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); } - /** + @Override public int saveRecord(PatientVisitRecordSaveDto saveDto) { + PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); + // 查询患者信息 + PatientInfo patientInfo = patientMapper.selectPatientInfoById(saveDto.getPatientId()); + BeanUtils.copyBeanProp(patientVisitRecord, patientInfo); + BeanUtils.copyBeanProp(patientVisitRecord, saveDto); + patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientVisitRecord.setCreateTime(DateUtils.getNowDate()); + // 住院时间,出院时间-入院时间 + LocalDate admissionTime = saveDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate dischargeTime = saveDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime); + patientVisitRecord.setHospitalizationDays((int) daysBetween + 1); + patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); + return 0; + } + + /** * 修改患者就诊记录基本信息 * - * @param patientVisitRecord 患者就诊记录基本信息 + * @param updDto 患者就诊记录基本信息 * @return 结果 */ @Override - public int updatePatientVisitRecord(PatientVisitRecord patientVisitRecord) { - patientVisitRecord.setUpdateTime(DateUtils.getNowDate()); + public int updatePatientVisitRecord(PatientVisitRecordSaveDto updDto) { + PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); + BeanUtils.copyBeanProp(patientVisitRecord, updDto); + patientVisitRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + patientVisitRecord.setUpdateTime(DateUtils.getNowDate()); + // 住院时间,出院时间-入院时间 + LocalDate admissionTime = updDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + LocalDate dischargeTime = updDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime); + patientVisitRecord.setHospitalizationDays((int) daysBetween + 1); + patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); return patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); } @@ -87,4 +148,138 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService public int deletePatientVisitRecordById(Long id) { return patientVisitRecordMapper.deletePatientVisitRecordById(id); } + + @Override + public AjaxResult importPatientList(List patientList, String patientType) { + //判断添加的数据是否为空 + if (CollectionUtils.isEmpty(patientList)) { + return AjaxResult.error("请添加就诊信息导入信息!"); + } + // 根据患者身份证号做去除处理 + List importDataList = patientList.stream().filter(item -> StringUtils.isNotBlank(item.getCardNo())).distinct().collect(Collectors.toList()); + // 校验联系电话格式是否正确 + PatientVisitRecordImportDto patient = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPatientPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPatientPhone()))).findFirst().orElse(new PatientVisitRecordImportDto()); + if (StringUtils.isNotBlank(patient.getPatientPhone())) { + return AjaxResult.error("当前患者联系电话:" + patient.getPatientPhone() + " 格式不正确,请重新录入!"); + } + + List saveList = new ArrayList<>(); + for (PatientVisitRecordImportDto item : importDataList) { + PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); + BeanUtils.copyProperties(item, patientVisitRecord); + patientVisitRecord.setCreateTime(DateUtils.getNowDate()); + patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + switch (patientType) { + // 在院患者 + case Constants.IN_HOSPITAL: + case Constants.DISCHARGED: + patientVisitRecord.setVisitType(VisitTypeConstants.BE_HOSPITALIZED); + break; + // 门诊患者 + case Constants.OUTPATIENT: + patientVisitRecord.setVisitType(VisitTypeConstants.OUTPATIENT_SERVICE); + patientVisitRecord.setInHospitalNumber(item.getOutpatientNumber());// 门诊、住院号共用一个字段 + break; + } + // 根据身份证号查询患者信息 + PatientInfoDto patientQuery = new PatientInfoDto(); + patientQuery.setCardNo(item.getCardNo()); + List patientInfoList = patientMapper.selectPatientInfoList(patientQuery); + if (CollectionUtils.isNotEmpty(patientInfoList)) { + // 修改居民信息 + PatientInfo updInfo = patientInfoList.get(0); + BeanUtils.copyBeanProp(updInfo, item); + patientMapper.updatePatientInfo(updInfo); + patientVisitRecord.setPatientId(patientInfoList.get(0).getId()); + } else { + PatientInfo saveInfo = new PatientInfo(); + // 添加居民 + BeanUtils.copyBeanProp(saveInfo, item); + patientMapper.insertPatientInfo(saveInfo); + patientVisitRecord.setPatientId(saveInfo.getId()); + } + // 根据医院名称查询医院id + Agency agency = new Agency(); + if (StringUtils.isNotBlank(item.getHospitalAgencyName())) { + agency.setAgencyName(item.getHospitalAgencyName()); + agency.setNodeType(NodeTypeConstants.HOSPITAL); + List agencyList = agencyMapper.selectAgencyList(agency); + if (CollectionUtils.isNotEmpty(agencyList)) { + patientVisitRecord.setHospitalAgencyId(agencyList.get(0).getId()); + } + } else { + patientVisitRecord.setHospitalAgencyId(SecurityUtils.getLoginUser().getUser().getAgencyId()); + Agency agencyData = agencyMapper.selectAgencyById(SecurityUtils.getLoginUser().getUser().getAgencyId()); + if (ObjectUtils.isNotEmpty(agencyData)) { + patientVisitRecord.setHospitalAgencyName(agencyData.getAgencyName()); + } + } + // 查询院区id + if (StringUtils.isNotBlank(item.getCampusAgencyName())) { + agency.setAgencyName(item.getWardName()); + agency.setNodeType(NodeTypeConstants.CAMPUS); + List campusList = agencyMapper.selectAgencyList(agency); + if (CollectionUtils.isNotEmpty(campusList)) { + patientVisitRecord.setCampusAgencyId(campusList.get(0).getId()); + } + } + + // 查询科室id + Department department = new Department(); + if (StringUtils.isNotBlank(item.getDepartmentName())) { + department.setAgencyName(item.getHospitalAgencyName()); + department.setDepartmentName(item.getDepartmentName()); + department.setNodeType(NodeTypeConstants.DEPARTMENT); + List deptList = departmentMapper.selectDepartmentList(department); + if (CollectionUtils.isNotEmpty(deptList)) { + patientVisitRecord.setDepartmentId(deptList.get(0).getId()); + } + } else { + patientVisitRecord.setDepartmentId(SecurityUtils.getLoginUser().getUser().getDepartmentId()); + Department department1 = departmentMapper.selectDepartmentById(SecurityUtils.getLoginUser().getUser().getDepartmentId()); + if (ObjectUtils.isNotEmpty(department1)) { + patientVisitRecord.setDepartmentName(department1.getDepartmentName()); + } + } + // 查询病区 + if (StringUtils.isNotBlank(item.getWardName())) { + department.setAgencyName(item.getHospitalAgencyName()); + department.setDepartmentName(item.getWardName()); + department.setNodeType(NodeTypeConstants.WARD); + List deptList = departmentMapper.selectDepartmentList(department); + if (CollectionUtils.isNotEmpty(deptList)) { + patientVisitRecord.setWardId(deptList.get(0).getId()); + } + } + // 根据门诊/住院编号查询是否有记录 + PatientVisitRecordDto recordQuery = new PatientVisitRecordDto(); + recordQuery.setVisitType(patientType); + recordQuery.setInHospitalNumber(patientVisitRecord.getInHospitalInfo()); + List patientVisitRecordList = patientVisitRecordMapper.selectPatientVisitRecordList(recordQuery); + if (CollectionUtils.isEmpty(patientVisitRecordList)) { + // 新增 + saveList.add(patientVisitRecord); + } else { + // 修改 + patientVisitRecord.setId(patientVisitRecordList.get(0).getId()); + int flag = patientVisitRecordMapper.updatePatientVisitRecord(patientVisitRecord); + if (flag < 0) { + throw new ServiceException("导入患者就诊信息失败,请联系管理员!"); + } + } + } + int insertCount = patientVisitRecordMapper.insertBatch(saveList); + if (insertCount <= 0) { + throw new ServiceException("导入患者就诊信息失败,请联系管理员!"); + } + return AjaxResult.success(); + } + + public static void main(String[] args) { + LocalDate date1 = LocalDate.of(2020, 1, 1); + LocalDate date2 = LocalDate.of(2020, 1, 2); + + long daysBetween = ChronoUnit.DAYS.between(date1, date2); + System.out.println("Days between: " + daysBetween); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/IProjectService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/IProjectService.java index fb47bbb7..ec9eb361 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/IProjectService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/IProjectService.java @@ -1,10 +1,61 @@ package com.xinelu.manage.service.project; -/** -* @author haown -* @description 针对表【project(检测项目表)】的数据库操作Service -* @createDate 2024-02-29 15:10:38 -*/ -public interface IProjectService { +import com.xinelu.manage.domain.project.Project; +import java.util.List; + +/** + * 检测项目Service接口 + * + * @author haown + * @date 2024-03-11 + */ +public interface IProjectService { + /** + * 查询检测项目 + * + * @param id 检测项目主键 + * @return 检测项目 + */ + public Project selectProjectById(Long id); + + /** + * 查询检测项目列表 + * + * @param project 检测项目 + * @return 检测项目集合 + */ + public List selectProjectList(Project project); + + /** + * 新增检测项目 + * + * @param project 检测项目 + * @return 结果 + */ + public int insertProject(Project project); + + /** + * 修改检测项目 + * + * @param project 检测项目 + * @return 结果 + */ + public int updateProject(Project project); + + /** + * 批量删除检测项目 + * + * @param ids 需要删除的检测项目主键集合 + * @return 结果 + */ + public int deleteProjectByIds(Long[] ids); + + /** + * 删除检测项目信息 + * + * @param id 检测项目主键 + * @return 结果 + */ + public int deleteProjectById(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/impl/ProjectServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/impl/ProjectServiceImpl.java index 1fd2f0f8..436b1708 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/impl/ProjectServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/project/impl/ProjectServiceImpl.java @@ -1,14 +1,112 @@ package com.xinelu.manage.service.project.impl; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.manage.domain.project.Project; +import com.xinelu.manage.mapper.project.ProjectMapper; import com.xinelu.manage.service.project.IProjectService; +import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; /** -* @author haown -* @description 针对表【project(检测项目表)】的数据库操作Service实现 -* @createDate 2024-02-29 15:10:38 -*/ + * 检测项目Service业务层处理 + * + * @author haown + * @date 2024-03-11 + */ @Service public class ProjectServiceImpl implements IProjectService { + @Resource + private ProjectMapper projectMapper; + /** + * 查询检测项目 + * + * @param id 检测项目主键 + * @return 检测项目 + */ + @Override + public Project selectProjectById(Long id) { + return projectMapper.selectProjectById(id); + } + + /** + * 查询检测项目列表 + * + * @param project 检测项目 + * @return 检测项目 + */ + @Override + public List selectProjectList(Project project) { + return projectMapper.selectProjectList(project); + } + + /** + * 新增检测项目 + * + * @param project 检测项目 + * @return 结果 + */ + @Override + public int insertProject(Project project) { + if (StringUtils.isBlank(project.getProjectName())) { + throw new ServiceException("请输入检测项目名称"); + } + if (StringUtils.isBlank(project.getProjectCode())) { + throw new ServiceException("请输入检测项目编码"); + } + // 查询是否有相同code的检测项目 + List projects = projectMapper.hasSameCodeProject(null, project.getGroupId(), project.getProjectCode()); + if (CollectionUtils.isNotEmpty(projects)) { + throw new ServiceException("已存在编码为【"+project.getProjectCode() +"】的检测项目"); + } + project.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + project.setCreateTime(DateUtils.getNowDate()); + project.setDelFlag(0); + return projectMapper.insertProject(project); + } + + /** + * 修改检测项目 + * + * @param project 检测项目 + * @return 结果 + */ + @Override + public int updateProject(Project project) { + // 查询是否有相同code的检测项目 + List projects = projectMapper.hasSameCodeProject(project.getId(), project.getGroupId(), project.getProjectCode()); + if (CollectionUtils.isNotEmpty(projects)) { + throw new ServiceException("已存在编码为【"+project.getProjectCode() +"】的检测项目"); + } + project.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + project.setUpdateTime(DateUtils.getNowDate()); + return projectMapper.updateProject(project); + } + + /** + * 批量删除检测项目 + * + * @param ids 需要删除的检测项目主键 + * @return 结果 + */ + @Override + public int deleteProjectByIds(Long[] ids) { + return projectMapper.deleteProjectByIds(ids); + } + + /** + * 删除检测项目信息 + * + * @param id 检测项目主键 + * @return 结果 + */ + @Override + public int deleteProjectById(Long id) { + return projectMapper.deleteProjectById(id); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/IProjectDeviceService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/IProjectDeviceService.java index 7a5aa2c7..48f224f2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/IProjectDeviceService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/IProjectDeviceService.java @@ -1,10 +1,61 @@ package com.xinelu.manage.service.projectdevice; -/** -* @author haown -* @description 针对表【project_device(检测项目设备表)】的数据库操作Service -* @createDate 2024-02-29 15:15:14 -*/ -public interface IProjectDeviceService { +import com.xinelu.manage.domain.projectdevice.ProjectDevice; +import java.util.List; + +/** + * 检测项目设备Service接口 + * + * @author haown + * @date 2024-03-11 + */ +public interface IProjectDeviceService { + /** + * 查询检测项目设备 + * + * @param id 检测项目设备主键 + * @return 检测项目设备 + */ + public ProjectDevice selectProjectDeviceById(Long id); + + /** + * 查询检测项目设备列表 + * + * @param projectDevice 检测项目设备 + * @return 检测项目设备集合 + */ + public List selectProjectDeviceList(ProjectDevice projectDevice); + + /** + * 新增检测项目设备 + * + * @param projectDevice 检测项目设备 + * @return 结果 + */ + public int insertProjectDevice(ProjectDevice projectDevice); + + /** + * 修改检测项目设备 + * + * @param projectDevice 检测项目设备 + * @return 结果 + */ + public int updateProjectDevice(ProjectDevice projectDevice); + + /** + * 批量删除检测项目设备 + * + * @param ids 需要删除的检测项目设备主键集合 + * @return 结果 + */ + public int deleteProjectDeviceByIds(Long[] ids); + + /** + * 删除检测项目设备信息 + * + * @param id 检测项目设备主键 + * @return 结果 + */ + public int deleteProjectDeviceById(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/impl/ProjectDeviceServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/impl/ProjectDeviceServiceImpl.java index 7d752099..300377a4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/impl/ProjectDeviceServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectdevice/impl/ProjectDeviceServiceImpl.java @@ -1,14 +1,117 @@ package com.xinelu.manage.service.projectdevice.impl; +import com.xinelu.common.constant.DeviceStatusConstants; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.manage.domain.projectdevice.ProjectDevice; +import com.xinelu.manage.mapper.projectdevice.ProjectDeviceMapper; import com.xinelu.manage.service.projectdevice.IProjectDeviceService; +import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; /** -* @author Administrator -* @description 针对表【project_device(检测项目设备表)】的数据库操作Service实现 -* @createDate 2024-02-29 15:15:14 -*/ + * 检测项目设备Service业务层处理 + * + * @author haown + * @date 2024-03-11 + */ @Service public class ProjectDeviceServiceImpl implements IProjectDeviceService { + @Resource + private ProjectDeviceMapper projectDeviceMapper; + /** + * 查询检测项目设备 + * + * @param id 检测项目设备主键 + * @return 检测项目设备 + */ + @Override + public ProjectDevice selectProjectDeviceById(Long id) { + return projectDeviceMapper.selectProjectDeviceById(id); + } + + /** + * 查询检测项目设备列表 + * + * @param projectDevice 检测项目设备 + * @return 检测项目设备 + */ + @Override + public List selectProjectDeviceList(ProjectDevice projectDevice) { + return projectDeviceMapper.selectProjectDeviceList(projectDevice); + } + + /** + * 新增检测项目设备 + * + * @param projectDevice 检测项目设备 + * @return 结果 + */ + @Override + public int insertProjectDevice(ProjectDevice projectDevice) { + // 查询居民是否绑定过相同类型的设备 + if (StringUtils.isBlank(projectDevice.getDeviceType())) { + throw new ServiceException("请选择设备类型"); + } + ProjectDevice query = new ProjectDevice(); + query.setPatientId(projectDevice.getPatientId()); + query.setDeviceType(projectDevice.getDeviceType()); + query.setDeviceStatus(DeviceStatusConstants.BIND); + List deviceList = projectDeviceMapper.selectProjectDeviceList(projectDevice); + if (CollectionUtils.isNotEmpty(deviceList)) { + throw new ServiceException("该居民已绑定过相同设备类型的设备,请解绑后重新绑定"); + } + // 根据设备编码查询是否已被绑定 + query.setPatientId(null); + query.setDeviceCode(projectDevice.getDeviceCode()); + deviceList = projectDeviceMapper.selectProjectDeviceList(projectDevice); + if (CollectionUtils.isNotEmpty(deviceList)) { + throw new ServiceException("该设备已被绑定,请解绑后重新绑定"); + } + projectDevice.setDeviceStatus(DeviceStatusConstants.BIND); + projectDevice.setDeviceBindTime(DateUtils.getNowDate()); + projectDevice.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + projectDevice.setCreateTime(DateUtils.getNowDate()); + return projectDeviceMapper.insertProjectDevice(projectDevice); + } + + /** + * 修改检测项目设备 + * + * @param projectDevice 检测项目设备 + * @return 结果 + */ + @Override + public int updateProjectDevice(ProjectDevice projectDevice) { + projectDevice.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + projectDevice.setUpdateTime(DateUtils.getNowDate()); + return projectDeviceMapper.updateProjectDevice(projectDevice); + } + + /** + * 批量删除检测项目设备 + * + * @param ids 需要删除的检测项目设备主键 + * @return 结果 + */ + @Override + public int deleteProjectDeviceByIds(Long[] ids) { + return projectDeviceMapper.deleteProjectDeviceByIds(ids); + } + + /** + * 删除检测项目设备信息 + * + * @param id 检测项目设备主键 + * @return 结果 + */ + @Override + public int deleteProjectDeviceById(Long id) { + return projectDeviceMapper.deleteProjectDeviceById(id); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/IProjectGroupService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/IProjectGroupService.java index da067932..c6e1c993 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/IProjectGroupService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/IProjectGroupService.java @@ -1,10 +1,64 @@ package com.xinelu.manage.service.projectgroup; -/** -* @author haown -* @description 针对表【project_group(检测项目分组表)】的数据库操作Service -* @createDate 2024-02-29 15:19:16 -*/ -public interface IProjectGroupService { +import com.xinelu.manage.domain.projectgroup.ProjectGroup; +import com.xinelu.manage.dto.projectgroup.ProjectGroupSaveListDto; +import java.util.List; + +/** + * 检测项目分组Service接口 + * + * @author haown + * @date 2024-03-11 + */ +public interface IProjectGroupService { + /** + * 查询检测项目分组 + * + * @param id 检测项目分组主键 + * @return 检测项目分组 + */ + public ProjectGroup selectProjectGroupById(Long id); + + /** + * 查询检测项目分组列表 + * + * @param projectGroup 检测项目分组 + * @return 检测项目分组集合 + */ + public List selectProjectGroupList(ProjectGroup projectGroup); + + /** + * 新增检测项目分组 + * + * @param projectGroup 检测项目分组 + * @return 结果 + */ + public int insertProjectGroup(ProjectGroup projectGroup); + + int insertList(ProjectGroupSaveListDto saveDto); + + /** + * 修改检测项目分组 + * + * @param projectGroup 检测项目分组 + * @return 结果 + */ + public int updateProjectGroup(ProjectGroup projectGroup); + + /** + * 批量删除检测项目分组 + * + * @param ids 需要删除的检测项目分组主键集合 + * @return 结果 + */ + public int deleteProjectGroupByIds(Long[] ids); + + /** + * 删除检测项目分组信息 + * + * @param id 检测项目分组主键 + * @return 结果 + */ + public int deleteProjectGroupById(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/impl/ProjectGroupServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/impl/ProjectGroupServiceImpl.java index 07f790ba..d6bb22af 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/impl/ProjectGroupServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectgroup/impl/ProjectGroupServiceImpl.java @@ -1,14 +1,137 @@ package com.xinelu.manage.service.projectgroup.impl; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.manage.domain.projectgroup.ProjectGroup; +import com.xinelu.manage.dto.projectgroup.ProjectGroupSaveListDto; +import com.xinelu.manage.mapper.projectgroup.ProjectGroupMapper; import com.xinelu.manage.service.projectgroup.IProjectGroupService; +import java.util.List; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; /** -* @author haown -* @description 针对表【project_group(检测项目分组表)】的数据库操作Service实现 -* @createDate 2024-02-29 15:19:16 -*/ + * 检测项目分组Service业务层处理 + * + * @author haown + * @date 2024-03-11 + */ @Service public class ProjectGroupServiceImpl implements IProjectGroupService { + @Resource + private ProjectGroupMapper projectGroupMapper; + /** + * 查询检测项目分组 + * + * @param id 检测项目分组主键 + * @return 检测项目分组 + */ + @Override + public ProjectGroup selectProjectGroupById(Long id) { + return projectGroupMapper.selectProjectGroupById(id); + } + + /** + * 查询检测项目分组列表 + * + * @param projectGroup 检测项目分组 + * @return 检测项目分组 + */ + @Override + public List selectProjectGroupList(ProjectGroup projectGroup) { + return projectGroupMapper.selectProjectGroupList(projectGroup); + } + + /** + * 新增检测项目分组 + * + * @param projectGroup 检测项目分组 + * @return 结果 + */ + @Override + public int insertProjectGroup(ProjectGroup projectGroup) { + if (StringUtils.isBlank(projectGroup.getGroupName())) { + throw new ServiceException("请输入检测项目分组名称"); + } + if (StringUtils.isBlank(projectGroup.getGroupCode())) { + throw new ServiceException("请输入检测项目分组编码"); + } + // 查询是否有相同编码的项目组 + List list = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode()); + if (CollectionUtils.isNotEmpty(list)) { + throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组"); + } + projectGroup.setCreateTime(DateUtils.getNowDate()); + projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + projectGroup.setDelFlag(0); + return projectGroupMapper.insertProjectGroup(projectGroup); + } + + @Override public int insertList(ProjectGroupSaveListDto saveDto) { + if (ObjectUtils.isNotEmpty(saveDto)) { + List list = saveDto.getList(); + if (CollectionUtils.isNotEmpty(list)) { + for (ProjectGroup projectGroup : list) { + // 查询是否有相同编码的项目组 + List groupList = projectGroupMapper.hasSameCodeGroup(null, projectGroup.getGroupCode()); + if (CollectionUtils.isNotEmpty(groupList)) { + throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组"); + } + projectGroup.setCreateTime(DateUtils.getNowDate()); + projectGroup.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + projectGroup.setDelFlag(0); + } + return projectGroupMapper.insertBatch(list); + } else { + throw new ServiceException("传输数据错误"); + } + } else { + throw new ServiceException("传输数据错误"); + } + } + + /** + * 修改检测项目分组 + * + * @param projectGroup 检测项目分组 + * @return 结果 + */ + @Override + public int updateProjectGroup(ProjectGroup projectGroup) { + // 查询是否有相同编码的项目组 + List groupList = projectGroupMapper.hasSameCodeGroup(projectGroup.getId(), projectGroup.getGroupCode()); + if (CollectionUtils.isNotEmpty(groupList)) { + throw new ServiceException("已存在编码为【"+projectGroup.getGroupCode() +"】的分组"); + } + projectGroup.setUpdateTime(DateUtils.getNowDate()); + projectGroup.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName()); + return projectGroupMapper.updateProjectGroup(projectGroup); + } + + /** + * 批量删除检测项目分组 + * + * @param ids 需要删除的检测项目分组主键 + * @return 结果 + */ + @Override + public int deleteProjectGroupByIds(Long[] ids) { + return projectGroupMapper.deleteProjectGroupByIds(ids); + } + + /** + * 删除检测项目分组信息 + * + * @param id 检测项目分组主键 + * @return 结果 + */ + @Override + public int deleteProjectGroupById(Long id) { + return projectGroupMapper.deleteProjectGroupById(id); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastrecord/IProjectLastRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastrecord/IProjectLastRecordService.java deleted file mode 100644 index d87f2d1d..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastrecord/IProjectLastRecordService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.xinelu.manage.service.projectlastrecord; - -/** -* @author haown -* @description 针对表【project_last_record(最近一次检测项目数据记录表)】的数据库操作Service -* @createDate 2024-02-29 15:20:41 -*/ -public interface IProjectLastRecordService { - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastrecord/impl/ProjectLastRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastrecord/impl/ProjectLastRecordServiceImpl.java deleted file mode 100644 index bb9f777e..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastrecord/impl/ProjectLastRecordServiceImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xinelu.manage.service.projectlastrecord.impl; - -import com.xinelu.manage.service.projectlastrecord.IProjectLastRecordService; -import org.springframework.stereotype.Service; - -/** -* @author haown -* @description 针对表【project_last_record(最近一次检测项目数据记录表)】的数据库操作Service实现 -* @createDate 2024-02-29 15:20:41 -*/ -@Service -public class ProjectLastRecordServiceImpl implements IProjectLastRecordService { - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastresult/IProjectLastResultService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastresult/IProjectLastResultService.java new file mode 100644 index 00000000..887e6ad3 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastresult/IProjectLastResultService.java @@ -0,0 +1,10 @@ +package com.xinelu.manage.service.projectlastresult; + +/** +* @author haown +* @description 针对表【project_last_result(最近一次检测项目结果表)】的数据库操作Service +* @createDate 2024-03-06 10:48:45 +*/ +public interface IProjectLastResultService { + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastresult/impl/ProjectLastResultServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastresult/impl/ProjectLastResultServiceImpl.java new file mode 100644 index 00000000..ac6e4fbf --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectlastresult/impl/ProjectLastResultServiceImpl.java @@ -0,0 +1,18 @@ +package com.xinelu.manage.service.projectlastresult.impl; + +import com.xinelu.manage.service.projectlastresult.IProjectLastResultService; +import org.springframework.stereotype.Service; + +/** +* @author haown +* @description 针对表【project_last_result(最近一次检测项目结果表)】的数据库操作Service实现 +* @createDate 2024-03-06 10:48:45 +*/ +@Service +public class ProjectLastResultServiceImpl implements IProjectLastResultService { + +} + + + + diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecord/IProjectRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecord/IProjectRecordService.java deleted file mode 100644 index 85cb8919..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecord/IProjectRecordService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.xinelu.manage.service.projectrecord; - -/** -* @author haown -* @description 针对表【project_record(检测项目数据记录表)】的数据库操作Service -* @createDate 2024-02-29 15:22:15 -*/ -public interface IProjectRecordService { - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecord/impl/ProjectRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecord/impl/ProjectRecordServiceImpl.java deleted file mode 100644 index 0bfa281b..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecord/impl/ProjectRecordServiceImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xinelu.manage.service.projectrecord.impl; - -import com.xinelu.manage.service.projectrecord.IProjectRecordService; -import org.springframework.stereotype.Service; - -/** -* @author haown -* @description 针对表【project_record(检测项目数据记录表)】的数据库操作Service实现 -* @createDate 2024-02-29 15:22:15 -*/ -@Service -public class ProjectRecordServiceImpl implements IProjectRecordService { - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecordfile/IProjectRecordFileService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecordfile/IProjectRecordFileService.java deleted file mode 100644 index cd42f07c..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecordfile/IProjectRecordFileService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.xinelu.manage.service.projectrecordfile; - -/** -* @author haown -* @description 针对表【project_record_file(检测项目数据记录附件表(扩展))】的数据库操作Service -* @createDate 2024-02-29 15:23:25 -*/ -public interface IProjectRecordFileService { - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecordfile/impl/ProjectRecordFileServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecordfile/impl/ProjectRecordFileServiceImpl.java deleted file mode 100644 index c071974f..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectrecordfile/impl/ProjectRecordFileServiceImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xinelu.manage.service.projectrecordfile.impl; - -import com.xinelu.manage.service.projectrecordfile.IProjectRecordFileService; -import org.springframework.stereotype.Service; - -/** -* @author haown -* @description 针对表【project_record_file(检测项目数据记录附件表(扩展))】的数据库操作Service实现 -* @createDate 2024-02-29 15:23:25 -*/ -@Service -public class ProjectRecordFileServiceImpl implements IProjectRecordFileService { - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectresult/IProjectResultService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectresult/IProjectResultService.java new file mode 100644 index 00000000..1ca41b78 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectresult/IProjectResultService.java @@ -0,0 +1,64 @@ +package com.xinelu.manage.service.projectresult; + +import com.xinelu.manage.domain.projectresult.ProjectResult; +import com.xinelu.manage.dto.projectresult.ProjectResultStatisticDto; +import com.xinelu.manage.vo.projectresult.ProjectResultStatisticVo; +import java.util.List; + +/** +* @author haown +* @description 针对表【project_result(检测项目结果表)】的数据库操作Service +* @createDate 2024-03-06 10:40:56 +*/ +public interface IProjectResultService { + + ProjectResultStatisticVo curveStatistics(ProjectResultStatisticDto projectResultStatisticDto); + + /** + * 查询检测项目结果 + * + * @param id 检测项目结果主键 + * @return 检测项目结果 + */ + public ProjectResult selectProjectResultById(Long id); + + /** + * 查询检测项目结果列表 + * + * @param projectResult 检测项目结果 + * @return 检测项目结果集合 + */ + public List selectProjectResultList(ProjectResult projectResult); + + /** + * 新增检测项目结果 + * + * @param projectResult 检测项目结果 + * @return 结果 + */ + public int insertProjectResult(ProjectResult projectResult); + + /** + * 修改检测项目结果 + * + * @param projectResult 检测项目结果 + * @return 结果 + */ + public int updateProjectResult(ProjectResult projectResult); + + /** + * 批量删除检测项目结果 + * + * @param ids 需要删除的检测项目结果主键集合 + * @return 结果 + */ + public int deleteProjectResultByIds(Long[] ids); + + /** + * 删除检测项目结果信息 + * + * @param id 检测项目结果主键 + * @return 结果 + */ + public int deleteProjectResultById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectresult/impl/ProjectResultServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectresult/impl/ProjectResultServiceImpl.java new file mode 100644 index 00000000..7cb99d0e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/projectresult/impl/ProjectResultServiceImpl.java @@ -0,0 +1,148 @@ +package com.xinelu.manage.service.projectresult.impl; + +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.manage.domain.project.Project; +import com.xinelu.manage.domain.projectgroup.ProjectGroup; +import com.xinelu.manage.domain.projectresult.ProjectResult; +import com.xinelu.manage.dto.projectresult.ProjectResultStatisticDto; +import com.xinelu.manage.mapper.project.ProjectMapper; +import com.xinelu.manage.mapper.projectgroup.ProjectGroupMapper; +import com.xinelu.manage.mapper.projectresult.ProjectResultMapper; +import com.xinelu.manage.service.projectresult.IProjectResultService; +import com.xinelu.manage.vo.projectresult.ProjectResultStatisticVo; +import com.xinelu.manage.vo.projectresult.ProjectResultVo; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +/** +* @author haown +* @description 针对表【project_result(检测项目结果表)】的数据库操作Service实现 +* @createDate 2024-03-06 10:40:56 +*/ +@Service +public class ProjectResultServiceImpl implements IProjectResultService { + + @Resource + private ProjectGroupMapper projectGroupMapper; + @Resource + private ProjectMapper projectMapper; + @Resource + private ProjectResultMapper projectResultMapper; + + /** + * 查询检测项目结果 + * + * @param id 检测项目结果主键 + * @return 检测项目结果 + */ + @Override + public ProjectResult selectProjectResultById(Long id) { + return projectResultMapper.selectProjectResultById(id); + } + + /** + * 查询检测项目结果列表 + * + * @param projectResult 检测项目结果 + * @return 检测项目结果 + */ + @Override + public List selectProjectResultList(ProjectResult projectResult) { + return projectResultMapper.selectProjectResultList(projectResult); + } + + /** + * 新增检测项目结果 + * + * @param projectResult 检测项目结果 + * @return 结果 + */ + @Override + public int insertProjectResult(ProjectResult projectResult) { + projectResult.setCreateTime(DateUtils.getNowDate()); + return projectResultMapper.insertProjectResult(projectResult); + } + + /** + * 修改检测项目结果 + * + * @param projectResult 检测项目结果 + * @return 结果 + */ + @Override + public int updateProjectResult(ProjectResult projectResult) { + projectResult.setUpdateTime(DateUtils.getNowDate()); + return projectResultMapper.updateProjectResult(projectResult); + } + + /** + * 批量删除检测项目结果 + * + * @param ids 需要删除的检测项目结果主键 + * @return 结果 + */ + @Override + public int deleteProjectResultByIds(Long[] ids) { + return projectResultMapper.deleteProjectResultByIds(ids); + } + + /** + * 删除检测项目结果信息 + * + * @param id 检测项目结果主键 + * @return 结果 + */ + @Override + public int deleteProjectResultById(Long id) { + return projectResultMapper.deleteProjectResultById(id); + } + + @Override + public ProjectResultStatisticVo curveStatistics(ProjectResultStatisticDto projectResultStatisticDto) { + // 根据groupCode查询groupId + if (StringUtils.isNotBlank(projectResultStatisticDto.getGroupCode())) { + ProjectGroup projectGroup = new ProjectGroup(); + projectGroup.setGroupCode(projectResultStatisticDto.getGroupCode()); + List groupList = projectGroupMapper.selectProjectGroupList(projectGroup); + if (CollectionUtils.isEmpty(groupList)) { + throw new ServiceException("未找到该检测项目"); + } + projectResultStatisticDto.setGroupId(groupList.get(0).getId()); + } + // 根据projectCode查询projectId + if (StringUtils.isNotBlank(projectResultStatisticDto.getProjectCode())) { + Project projectQuery = new Project(); + projectQuery.setProjectCode(projectResultStatisticDto.getProjectCode()); + List projectList = projectMapper.selectProjectList(projectQuery); + if (CollectionUtils.isEmpty(projectList)) { + throw new ServiceException("未找到该检测项目"); + } + projectResultStatisticDto.setProjectId(projectList.get(0).getId()); + } + if (projectResultStatisticDto.getPatientId() == null) { + throw new ServiceException("数据格式错误"); + } + List measureTimeList = new ArrayList<>(); + Map> valueMap = new HashMap<>(); + List resultList = projectResultMapper.selectList(projectResultStatisticDto); + if (!CollectionUtils.isEmpty(resultList)) { + // 根据projectId进行分组 + Map> groupByProject = resultList.stream().collect(Collectors.groupingBy(ProjectResultVo::getProjectName)); + for (String projectName : groupByProject.keySet()) { + List projectResultList = groupByProject.get(projectName); + List valueList = projectResultList.stream().map(ProjectResultVo::getMeasureResult).collect(Collectors.toList()); + measureTimeList = projectResultList.stream().map(ProjectResultVo::getMeasureTimeStr).collect(Collectors.toList()); + valueMap.put(projectName, valueList); + } + } + return ProjectResultStatisticVo.builder().xList(measureTimeList).yList(valueMap).build(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectgroup/ProjectGroupTreeVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectgroup/ProjectGroupTreeVo.java new file mode 100644 index 00000000..aea487b9 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectgroup/ProjectGroupTreeVo.java @@ -0,0 +1,42 @@ +package com.xinelu.manage.vo.projectgroup; + +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: 检测项目分组树形结构查询返回视图类 + * @author: haown + * @create: 2024-03-11 15:30 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectGroupTreeVo { + + /** + * 节点ID + */ + private Long id; + + /** + * 节点名称 + */ + private String label; + + /** + * 节点名称 + */ + private String value; + + /** + * 子节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectresult/ProjectResultStatisticVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectresult/ProjectResultStatisticVo.java new file mode 100644 index 00000000..a91aae87 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectresult/ProjectResultStatisticVo.java @@ -0,0 +1,29 @@ +package com.xinelu.manage.vo.projectresult; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.List; +import java.util.Map; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: 项目检测统计返回视图类 + * @author: haown + * @create: 2024-03-06 11:40 + **/ +@ApiModel("项目检测统计返回视图类") +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProjectResultStatisticVo { + + @ApiModelProperty("横坐标轴列表") + private List xList; + + @ApiModelProperty("纵坐标轴列表") + private Map> yList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectresult/ProjectResultVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectresult/ProjectResultVo.java new file mode 100644 index 00000000..199ffc75 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/projectresult/ProjectResultVo.java @@ -0,0 +1,30 @@ +package com.xinelu.manage.vo.projectresult; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 项目检测结果查询返回视图类 + * @author: haown + * @create: 2024-03-06 15:33 + **/ +@ApiModel("项目检测结果查询返回视图类") +@Data +public class ProjectResultVo { + + @ApiModelProperty("分组id") + private Long groupId; + + @ApiModelProperty("分组名称") + private String groupName; + + @ApiModelProperty("分组id") + private Long projectId; + + private String projectName; + + private String measureResult; + + private String measureTimeStr; +} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientprehospitalization/PatientPreHospitalizationMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientprehospitalization/PatientPreHospitalizationMapper.xml new file mode 100644 index 00000000..cad2d1c9 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientprehospitalization/PatientPreHospitalizationMapper.xml @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id,patient_id,patient_name, + patient_phone,card_no,sex, + birth_date,family_member_phone,address, + main_diagnosis,hospital_agency_id,hospital_agency_name, + campus_agency_id,campus_agency_name,department_id, + department_name,ward_id,ward_name, + appointment_treatment_group,registration_no,registration_date, + appointment_date,certificate_issuing_doctor_id,certificate_issuing_doctor_name, + responsible_nurse,del_flag,create_by, + create_time,update_by,update_time + + + + + + delete from patient_pre_hospitalization + where id = #{id,jdbcType=BIGINT} + + + insert into patient_pre_hospitalization + ( id,patient_id,patient_name + ,patient_phone,card_no,sex + ,birth_date,family_member_phone,address + ,main_diagnosis,hospital_agency_id,hospital_agency_name + ,campus_agency_id,campus_agency_name,department_id + ,department_name,ward_id,ward_name + ,appointment_treatment_group,registration_no,registration_date + ,appointment_date,certificate_issuing_doctor_id,certificate_issuing_doctor_name + ,responsible_nurse,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},#{sex,jdbcType=VARCHAR} + ,#{birthDate,jdbcType=DATE},#{familyMemberPhone,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR} + ,#{mainDiagnosis,jdbcType=VARCHAR},#{hospitalAgencyId,jdbcType=BIGINT},#{hospitalAgencyName,jdbcType=VARCHAR} + ,#{campusAgencyId,jdbcType=BIGINT},#{campusAgencyName,jdbcType=VARCHAR},#{departmentId,jdbcType=BIGINT} + ,#{departmentName,jdbcType=VARCHAR},#{wardId,jdbcType=BIGINT},#{wardName,jdbcType=VARCHAR} + ,#{appointmentTreatmentGroup,jdbcType=VARCHAR},#{registrationNo,jdbcType=VARCHAR},#{registrationDate,jdbcType=DATE} + ,#{appointmentDate,jdbcType=DATE},#{certificateIssuingDoctorId,jdbcType=BIGINT},#{certificateIssuingDoctorName,jdbcType=VARCHAR} + ,#{responsibleNurse,jdbcType=VARCHAR},#{delFlag,jdbcType=TINYINT},#{createBy,jdbcType=VARCHAR} + ,#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP} + ) + + + insert into patient_pre_hospitalization + + id, + patient_id, + patient_name, + patient_phone, + card_no, + sex, + birth_date, + family_member_phone, + address, + main_diagnosis, + hospital_agency_id, + hospital_agency_name, + campus_agency_id, + campus_agency_name, + department_id, + department_name, + ward_id, + ward_name, + appointment_treatment_group, + registration_no, + registration_date, + appointment_date, + certificate_issuing_doctor_id, + certificate_issuing_doctor_name, + responsible_nurse, + 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}, + #{sex,jdbcType=VARCHAR}, + #{birthDate,jdbcType=DATE}, + #{familyMemberPhone,jdbcType=VARCHAR}, + #{address,jdbcType=VARCHAR}, + #{mainDiagnosis,jdbcType=VARCHAR}, + #{hospitalAgencyId,jdbcType=BIGINT}, + #{hospitalAgencyName,jdbcType=VARCHAR}, + #{campusAgencyId,jdbcType=BIGINT}, + #{campusAgencyName,jdbcType=VARCHAR}, + #{departmentId,jdbcType=BIGINT}, + #{departmentName,jdbcType=VARCHAR}, + #{wardId,jdbcType=BIGINT}, + #{wardName,jdbcType=VARCHAR}, + #{appointmentTreatmentGroup,jdbcType=VARCHAR}, + #{registrationNo,jdbcType=VARCHAR}, + #{registrationDate,jdbcType=DATE}, + #{appointmentDate,jdbcType=DATE}, + #{certificateIssuingDoctorId,jdbcType=BIGINT}, + #{certificateIssuingDoctorName,jdbcType=VARCHAR}, + #{responsibleNurse,jdbcType=VARCHAR}, + #{delFlag,jdbcType=TINYINT}, + #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + + + + update patient_pre_hospitalization + + + patient_id = #{patientId,jdbcType=BIGINT}, + + + patient_name = #{patientName,jdbcType=VARCHAR}, + + + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + + + card_no = #{cardNo,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + birth_date = #{birthDate,jdbcType=DATE}, + + + family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, + + + address = #{address,jdbcType=VARCHAR}, + + + main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, + + + 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}, + + + appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, + + + registration_no = #{registrationNo,jdbcType=VARCHAR}, + + + registration_date = #{registrationDate,jdbcType=DATE}, + + + appointment_date = #{appointmentDate,jdbcType=DATE}, + + + certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, + + + certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, + + + responsible_nurse = #{responsibleNurse,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 patient_pre_hospitalization + set + patient_id = #{patientId,jdbcType=BIGINT}, + patient_name = #{patientName,jdbcType=VARCHAR}, + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + card_no = #{cardNo,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + birth_date = #{birthDate,jdbcType=DATE}, + family_member_phone = #{familyMemberPhone,jdbcType=VARCHAR}, + address = #{address,jdbcType=VARCHAR}, + main_diagnosis = #{mainDiagnosis,jdbcType=VARCHAR}, + 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}, + appointment_treatment_group = #{appointmentTreatmentGroup,jdbcType=VARCHAR}, + registration_no = #{registrationNo,jdbcType=VARCHAR}, + registration_date = #{registrationDate,jdbcType=DATE}, + appointment_date = #{appointmentDate,jdbcType=DATE}, + certificate_issuing_doctor_id = #{certificateIssuingDoctorId,jdbcType=BIGINT}, + certificate_issuing_doctor_name = #{certificateIssuingDoctorName,jdbcType=VARCHAR}, + responsible_nurse = #{responsibleNurse,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 patient_pre_hospitalization set del_flag = 1 where id in + + #{id} + + + + insert into patient_pre_hospitalization(id,patient_id,patient_name, + patient_phone,card_no,sex, + birth_date,family_member_phone,address, + main_diagnosis,hospital_agency_id,hospital_agency_name, + campus_agency_id,campus_agency_name,department_id, + department_name,ward_id,ward_name, + appointment_treatment_group,registration_no,registration_date, + appointment_date,certificate_issuing_doctor_id,certificate_issuing_doctor_name, + responsible_nurse,del_flag,search_value, + create_by,create_time,update_by, + update_time,remark,params) + values + + (#{item.id,jdbcType=NUMERIC},#{item.patientId,jdbcType=NUMERIC},#{item.patientName,jdbcType=VARCHAR}, + #{item.patientPhone,jdbcType=VARCHAR},#{item.cardNo,jdbcType=VARCHAR},#{item.sex,jdbcType=VARCHAR}, + #{item.birthDate,jdbcType=TIMESTAMP},#{item.familyMemberPhone,jdbcType=VARCHAR},#{item.address,jdbcType=VARCHAR}, + #{item.mainDiagnosis,jdbcType=VARCHAR},#{item.hospitalAgencyId,jdbcType=NUMERIC},#{item.hospitalAgencyName,jdbcType=VARCHAR}, + #{item.campusAgencyId,jdbcType=NUMERIC},#{item.campusAgencyName,jdbcType=VARCHAR},#{item.departmentId,jdbcType=NUMERIC}, + #{item.departmentName,jdbcType=VARCHAR},#{item.wardId,jdbcType=NUMERIC},#{item.wardName,jdbcType=VARCHAR}, + #{item.appointmentTreatmentGroup,jdbcType=VARCHAR},#{item.registrationNo,jdbcType=VARCHAR},#{item.registrationDate,jdbcType=TIMESTAMP}, + #{item.appointmentDate,jdbcType=TIMESTAMP},#{item.certificateIssuingDoctorId,jdbcType=NUMERIC},#{item.certificateIssuingDoctorName,jdbcType=VARCHAR}, + #{item.responsibleNurse,jdbcType=VARCHAR},#{item.delFlag,jdbcType=NUMERIC},#{item.searchValue,jdbcType=VARCHAR}, + #{item.createBy,jdbcType=VARCHAR},#{item.createTime,jdbcType=TIMESTAMP},#{item.updateBy,jdbcType=VARCHAR}, + #{item.updateTime,jdbcType=TIMESTAMP},#{item.remark,jdbcType=VARCHAR},#{item.params}) + + + diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml index 4961417a..5bfedaf6 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml @@ -5,40 +5,66 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - select id, patient_id, visit_dept, visit_name, visit_date, visit_type, patient_name, birthplace, sex, age, nation, marriage, medical_history_narrator, admission_time, discharge_time, record_time, outpatient_visit_info, hospitalization_days, create_by, create_time, update_by, update_time from patient_visit_record + select id, patient_id, card_no, patient_name, patient_phone, family_member_phone, address, sex, birth_date, age, nation, visit_type, visit_date, visit_name, hospital_agency_id, hospital_agency_name, campus_agency_id, campus_agency_name, department_id, department_name, ward_id, ward_name, attending_physician_id, attending_physician_name, main_diagnosis, marriage, medical_history_narrator, admission_time, discharge_time, record_time, outpatient_visit_info, hospitalization_days, in_hospital_info, out_hospital_info, visit_serial_number, in_hospital_number, responsible_nurse, surgical_name, create_by, create_time, update_by, update_time from patient_visit_record - select - - from project - where id = #{id,jdbcType=BIGINT} + - - delete from project - where id = #{id,jdbcType=BIGINT} - - - insert into project - ( id,group_id,group_name - ,project_name,project_code,project_alias - ,enable_status,judge_mode,max_value - ,min_value,default_value,lis_compare - ,project_sort,project_remark,del_flag - ,create_by,create_time,update_by - ,update_time) - values (#{id,jdbcType=BIGINT},#{groupId,jdbcType=BIGINT},#{groupName,jdbcType=VARCHAR} - ,#{projectName,jdbcType=VARCHAR},#{projectCode,jdbcType=VARCHAR},#{projectAlias,jdbcType=VARCHAR} - ,#{enableStatus,jdbcType=TINYINT},#{judgeMode,jdbcType=VARCHAR},#{maxValue,jdbcType=INTEGER} - ,#{minValue,jdbcType=INTEGER},#{defaultValue,jdbcType=VARCHAR},#{lisCompare,jdbcType=VARCHAR} - ,#{projectSort,jdbcType=INTEGER},#{projectRemark,jdbcType=VARCHAR},#{delFlag,jdbcType=TINYINT} - ,#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR} - ,#{updateTime,jdbcType=TIMESTAMP}) - - + + + insert into project - id, - group_id, - group_name, - project_name, - project_code, - project_alias, - enable_status, - judge_mode, - max_value, - min_value, - default_value, - lis_compare, - project_sort, - project_remark, - del_flag, - create_by, - create_time, - update_by, - update_time, + group_id, + + group_name, + + project_name, + + project_code, + + project_alias, + + enable_status, + + judge_mode, + + max_value, + + min_value, + + default_value, + + lis_compare, + + project_unit, + + project_sort, + + project_remark, + + del_flag, + + create_by, + + create_time, + + update_by, + + update_time, + - #{id,jdbcType=BIGINT}, - #{groupId,jdbcType=BIGINT}, - #{groupName,jdbcType=VARCHAR}, - #{projectName,jdbcType=VARCHAR}, - #{projectCode,jdbcType=VARCHAR}, - #{projectAlias,jdbcType=VARCHAR}, - #{enableStatus,jdbcType=TINYINT}, - #{judgeMode,jdbcType=VARCHAR}, - #{maxValue,jdbcType=INTEGER}, - #{minValue,jdbcType=INTEGER}, - #{defaultValue,jdbcType=VARCHAR}, - #{lisCompare,jdbcType=VARCHAR}, - #{projectSort,jdbcType=INTEGER}, - #{projectRemark,jdbcType=VARCHAR}, - #{delFlag,jdbcType=TINYINT}, - #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, - #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, + #{groupId}, + + #{groupName}, + + #{projectName}, + + #{projectCode}, + + #{projectAlias}, + + #{enableStatus}, + + #{judgeMode}, + + #{maxValue}, + + #{minValue}, + + #{defaultValue}, + + #{lisCompare}, + + #{projectUnit}, + + #{projectSort}, + + #{projectRemark}, + + #{delFlag}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + - + + update project - - - group_id = #{groupId,jdbcType=BIGINT}, - - - group_name = #{groupName,jdbcType=VARCHAR}, - - - project_name = #{projectName,jdbcType=VARCHAR}, - - - project_code = #{projectCode,jdbcType=VARCHAR}, - - - project_alias = #{projectAlias,jdbcType=VARCHAR}, - - - enable_status = #{enableStatus,jdbcType=TINYINT}, - - - judge_mode = #{judgeMode,jdbcType=VARCHAR}, - - - max_value = #{maxValue,jdbcType=INTEGER}, - - - min_value = #{minValue,jdbcType=INTEGER}, - - - default_value = #{defaultValue,jdbcType=VARCHAR}, - - - lis_compare = #{lisCompare,jdbcType=VARCHAR}, - - - project_sort = #{projectSort,jdbcType=INTEGER}, - - - project_remark = #{projectRemark,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} + + group_id = + #{groupId}, + + group_name = + #{groupName}, + + project_name = + #{projectName}, + + project_code = + #{projectCode}, + + project_alias = + #{projectAlias}, + + enable_status = + #{enableStatus}, + + judge_mode = + #{judgeMode}, + + max_value = + #{maxValue}, + + min_value = + #{minValue}, + + default_value = + #{defaultValue}, + + lis_compare = + #{lisCompare}, + + project_unit = + #{projectUnit}, + + project_sort = + #{projectSort}, + + project_remark = + #{projectRemark}, + + del_flag = + #{delFlag}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} - - update project - set - group_id = #{groupId,jdbcType=BIGINT}, - group_name = #{groupName,jdbcType=VARCHAR}, - project_name = #{projectName,jdbcType=VARCHAR}, - project_code = #{projectCode,jdbcType=VARCHAR}, - project_alias = #{projectAlias,jdbcType=VARCHAR}, - enable_status = #{enableStatus,jdbcType=TINYINT}, - judge_mode = #{judgeMode,jdbcType=VARCHAR}, - max_value = #{maxValue,jdbcType=INTEGER}, - min_value = #{minValue,jdbcType=INTEGER}, - default_value = #{defaultValue,jdbcType=VARCHAR}, - lis_compare = #{lisCompare,jdbcType=VARCHAR}, - project_sort = #{projectSort,jdbcType=INTEGER}, - project_remark = #{projectRemark,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 project set del_flag = 1 where id = #{id} - + + + update project set del_flag = 1 where id in + + #{id} + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectbatch/ProjectBatchMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectbatch/ProjectBatchMapper.xml new file mode 100644 index 00000000..5250ef96 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/projectbatch/ProjectBatchMapper.xml @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + id,patient_id,patient_name, + patient_phone,birth_date,card_no, + sex,batch_name,batch_code, + batch_sort,batch_remark,batch_date, + del_flag,create_by,create_time, + update_by,update_time + + + + + + delete from project_batch + where id = #{id,jdbcType=BIGINT} + + + insert into project_batch + ( id,patient_id,patient_name + ,patient_phone,birth_date,card_no + ,sex,batch_name,batch_code + ,batch_sort,batch_remark,batch_date + ,del_flag,create_by,create_time + ,update_by,update_time) + values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} + ,#{patientPhone,jdbcType=VARCHAR},#{birthDate,jdbcType=DATE},#{cardNo,jdbcType=VARCHAR} + ,#{sex,jdbcType=VARCHAR},#{batchName,jdbcType=VARCHAR},#{batchCode,jdbcType=VARCHAR} + ,#{batchSort,jdbcType=INTEGER},#{batchRemark,jdbcType=VARCHAR},#{batchDate,jdbcType=TIMESTAMP} + ,#{delFlag,jdbcType=TINYINT},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP} + ,#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP}) + + + insert into project_batch + + id, + patient_id, + patient_name, + patient_phone, + birth_date, + card_no, + sex, + batch_name, + batch_code, + batch_sort, + batch_remark, + batch_date, + del_flag, + create_by, + create_time, + update_by, + update_time, + + + #{id,jdbcType=BIGINT}, + #{patientId,jdbcType=BIGINT}, + #{patientName,jdbcType=VARCHAR}, + #{patientPhone,jdbcType=VARCHAR}, + #{birthDate,jdbcType=DATE}, + #{cardNo,jdbcType=VARCHAR}, + #{sex,jdbcType=VARCHAR}, + #{batchName,jdbcType=VARCHAR}, + #{batchCode,jdbcType=VARCHAR}, + #{batchSort,jdbcType=INTEGER}, + #{batchRemark,jdbcType=VARCHAR}, + #{batchDate,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=TINYINT}, + #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, + + + + update project_batch + + + patient_id = #{patientId,jdbcType=BIGINT}, + + + patient_name = #{patientName,jdbcType=VARCHAR}, + + + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + + + birth_date = #{birthDate,jdbcType=DATE}, + + + card_no = #{cardNo,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + batch_name = #{batchName,jdbcType=VARCHAR}, + + + batch_code = #{batchCode,jdbcType=VARCHAR}, + + + batch_sort = #{batchSort,jdbcType=INTEGER}, + + + batch_remark = #{batchRemark,jdbcType=VARCHAR}, + + + batch_date = #{batchDate,jdbcType=TIMESTAMP}, + + + 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 project_batch + set + patient_id = #{patientId,jdbcType=BIGINT}, + patient_name = #{patientName,jdbcType=VARCHAR}, + patient_phone = #{patientPhone,jdbcType=VARCHAR}, + birth_date = #{birthDate,jdbcType=DATE}, + card_no = #{cardNo,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + batch_name = #{batchName,jdbcType=VARCHAR}, + batch_code = #{batchCode,jdbcType=VARCHAR}, + batch_sort = #{batchSort,jdbcType=INTEGER}, + batch_remark = #{batchRemark,jdbcType=VARCHAR}, + batch_date = #{batchDate,jdbcType=TIMESTAMP}, + 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} + + diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectdevice/ProjectDeviceMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectdevice/ProjectDeviceMapper.xml index b1b1fef2..1f313d9b 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/projectdevice/ProjectDeviceMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/projectdevice/ProjectDeviceMapper.xml @@ -1,178 +1,219 @@ - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - id,patient_id,patient_name, - card_no,device_type,device_name, - device_code,device_status,device_remark, - device_bind_time,device_unbind_time,device_ip, - device_port,create_by,create_time, - update_by,update_time + + select id, patient_id, patient_name, card_no, device_type, device_name, device_code, device_status, device_remark, device_bind_time, device_unbind_time, device_ip, device_port, create_by, create_time, update_by, update_time from project_device - + + + + and patient_id = #{patientId} + + + and patient_name like concat('%', #{patientName}, '%') + + + and card_no = #{cardNo} + + + and device_type = #{deviceType} + + + and device_name like concat('%', #{deviceName}, '%') + + + and device_code = #{deviceCode} + + + and device_status = #{deviceStatus} + + + and device_remark = #{deviceRemark} + + + and device_bind_time = #{deviceBindTime} + + + and device_unbind_time = #{deviceUnbindTime} + + + and device_ip = #{deviceIp} + + + and device_port = #{devicePort} + + - - delete from project_device - where id = #{id,jdbcType=BIGINT} - - - insert into project_device - ( id,patient_id,patient_name - ,card_no,device_type,device_name - ,device_code,device_status,device_remark - ,device_bind_time,device_unbind_time,device_ip - ,device_port,create_by,create_time - ,update_by,update_time) - values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} - ,#{cardNo,jdbcType=VARCHAR},#{deviceType,jdbcType=VARCHAR},#{deviceName,jdbcType=VARCHAR} - ,#{deviceCode,jdbcType=VARCHAR},#{deviceStatus,jdbcType=VARCHAR},#{deviceRemark,jdbcType=VARCHAR} - ,#{deviceBindTime,jdbcType=TIMESTAMP},#{deviceUnbindTime,jdbcType=TIMESTAMP},#{deviceIp,jdbcType=VARCHAR} - ,#{devicePort,jdbcType=INTEGER},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP} - ,#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP}) - - + + + insert into project_device - id, - patient_id, - patient_name, - card_no, - device_type, - device_name, - device_code, - device_status, - device_remark, - device_bind_time, - device_unbind_time, - device_ip, - device_port, - create_by, - create_time, - update_by, - update_time, + patient_id, + + patient_name, + + card_no, + + device_type, + + device_name, + + device_code, + + device_status, + + device_remark, + + device_bind_time, + + device_unbind_time, + + device_ip, + + device_port, + + create_by, + + create_time, + + update_by, + + update_time, + - #{id,jdbcType=BIGINT}, - #{patientId,jdbcType=BIGINT}, - #{patientName,jdbcType=VARCHAR}, - #{cardNo,jdbcType=VARCHAR}, - #{deviceType,jdbcType=VARCHAR}, - #{deviceName,jdbcType=VARCHAR}, - #{deviceCode,jdbcType=VARCHAR}, - #{deviceStatus,jdbcType=VARCHAR}, - #{deviceRemark,jdbcType=VARCHAR}, - #{deviceBindTime,jdbcType=TIMESTAMP}, - #{deviceUnbindTime,jdbcType=TIMESTAMP}, - #{deviceIp,jdbcType=VARCHAR}, - #{devicePort,jdbcType=INTEGER}, - #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, - #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, + #{patientId}, + + #{patientName}, + + #{cardNo}, + + #{deviceType}, + + #{deviceName}, + + #{deviceCode}, + + #{deviceStatus}, + + #{deviceRemark}, + + #{deviceBindTime}, + + #{deviceUnbindTime}, + + #{deviceIp}, + + #{devicePort}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + - + + update project_device - - - patient_id = #{patientId,jdbcType=BIGINT}, - - - patient_name = #{patientName,jdbcType=VARCHAR}, - - - card_no = #{cardNo,jdbcType=VARCHAR}, - - - device_type = #{deviceType,jdbcType=VARCHAR}, - - - device_name = #{deviceName,jdbcType=VARCHAR}, - - - device_code = #{deviceCode,jdbcType=VARCHAR}, - - - device_status = #{deviceStatus,jdbcType=VARCHAR}, - - - device_remark = #{deviceRemark,jdbcType=VARCHAR}, - - - device_bind_time = #{deviceBindTime,jdbcType=TIMESTAMP}, - - - device_unbind_time = #{deviceUnbindTime,jdbcType=TIMESTAMP}, - - - device_ip = #{deviceIp,jdbcType=VARCHAR}, - - - device_port = #{devicePort,jdbcType=INTEGER}, - - - 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} + + patient_id = + #{patientId}, + + patient_name = + #{patientName}, + + card_no = + #{cardNo}, + + device_type = + #{deviceType}, + + device_name = + #{deviceName}, + + device_code = + #{deviceCode}, + + device_status = + #{deviceStatus}, + + device_remark = + #{deviceRemark}, + + device_bind_time = + #{deviceBindTime}, + + device_unbind_time = + #{deviceUnbindTime}, + + device_ip = + #{deviceIp}, + + device_port = + #{devicePort}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} - - update project_device - set - patient_id = #{patientId,jdbcType=BIGINT}, - patient_name = #{patientName,jdbcType=VARCHAR}, - card_no = #{cardNo,jdbcType=VARCHAR}, - device_type = #{deviceType,jdbcType=VARCHAR}, - device_name = #{deviceName,jdbcType=VARCHAR}, - device_code = #{deviceCode,jdbcType=VARCHAR}, - device_status = #{deviceStatus,jdbcType=VARCHAR}, - device_remark = #{deviceRemark,jdbcType=VARCHAR}, - device_bind_time = #{deviceBindTime,jdbcType=TIMESTAMP}, - device_unbind_time = #{deviceUnbindTime,jdbcType=TIMESTAMP}, - device_ip = #{deviceIp,jdbcType=VARCHAR}, - device_port = #{devicePort,jdbcType=INTEGER}, - 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 project_device set device_status = 'UN_BIND',device_unbind_time = sysdate() + where id = #{id} - + + + update project_device set device_status = 'UN_BIND',device_unbind_time = sysdate() + where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectgroup/ProjectGroupMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectgroup/ProjectGroupMapper.xml index fcd52673..427ef73c 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/projectgroup/ProjectGroupMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/projectgroup/ProjectGroupMapper.xml @@ -1,139 +1,181 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + - - id,parent_id,group_name, - group_code,enable_status,group_sort, - group_remark,del_flag,create_by, - create_time,update_by,update_time + + select id, parent_id, group_name, group_code, enable_status, group_sort, group_remark, del_flag, create_by, create_time, update_by, update_time from project_group - + + + del_flag = 0 + + and parent_id = #{parentId} + + + and group_name like concat('%', #{groupName}, '%') + + + and group_code = #{groupCode} + + + and enable_status = #{enableStatus} + + - - delete from project_group - where id = #{id,jdbcType=BIGINT} - - - insert into project_group - ( id,parent_id,group_name - ,group_code,enable_status,group_sort - ,group_remark,del_flag,create_by - ,create_time,update_by,update_time - ) - values (#{id,jdbcType=BIGINT},#{parentId,jdbcType=BIGINT},#{groupName,jdbcType=VARCHAR} - ,#{groupCode,jdbcType=VARCHAR},#{enableStatus,jdbcType=TINYINT},#{groupSort,jdbcType=INTEGER} - ,#{groupRemark,jdbcType=VARCHAR},#{delFlag,jdbcType=TINYINT},#{createBy,jdbcType=VARCHAR} - ,#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP} - ) - - + + + insert into project_group - id, - parent_id, - group_name, - group_code, - enable_status, - group_sort, - group_remark, - del_flag, - create_by, - create_time, - update_by, - update_time, + parent_id, + + group_name, + + group_code, + + enable_status, + + group_sort, + + group_remark, + + del_flag, + + create_by, + + create_time, + + update_by, + + update_time, + - #{id,jdbcType=BIGINT}, - #{parentId,jdbcType=BIGINT}, - #{groupName,jdbcType=VARCHAR}, - #{groupCode,jdbcType=VARCHAR}, - #{enableStatus,jdbcType=TINYINT}, - #{groupSort,jdbcType=INTEGER}, - #{groupRemark,jdbcType=VARCHAR}, - #{delFlag,jdbcType=TINYINT}, - #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, - #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, + #{parentId}, + + #{groupName}, + + #{groupCode}, + + #{enableStatus}, + + #{groupSort}, + + #{groupRemark}, + + #{delFlag}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + - + + update project_group - - - parent_id = #{parentId,jdbcType=BIGINT}, - - - group_name = #{groupName,jdbcType=VARCHAR}, - - - group_code = #{groupCode,jdbcType=VARCHAR}, - - - enable_status = #{enableStatus,jdbcType=TINYINT}, - - - group_sort = #{groupSort,jdbcType=INTEGER}, - - - group_remark = #{groupRemark,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} + + parent_id = + #{parentId}, + + group_name = + #{groupName}, + + group_code = + #{groupCode}, + + enable_status = + #{enableStatus}, + + group_sort = + #{groupSort}, + + group_remark = + #{groupRemark}, + + del_flag = + #{delFlag}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} - - update project_group - set - parent_id = #{parentId,jdbcType=BIGINT}, - group_name = #{groupName,jdbcType=VARCHAR}, - group_code = #{groupCode,jdbcType=VARCHAR}, - enable_status = #{enableStatus,jdbcType=TINYINT}, - group_sort = #{groupSort,jdbcType=INTEGER}, - group_remark = #{groupRemark,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 project_group set del_flag = 1 where id = #{id} - + + + update project_group set del_flag = 1 where id in + + #{id} + + + + insert into project_group(parent_id,group_name, + group_code,enable_status,group_sort, + group_remark,del_flag, + create_by,create_time,update_by, + update_time) + values + + (#{item.parentId,jdbcType=NUMERIC},#{item.groupName,jdbcType=VARCHAR}, + #{item.groupCode,jdbcType=VARCHAR},#{item.enableStatus,jdbcType=NUMERIC},#{item.groupSort,jdbcType=NUMERIC}, + #{item.groupRemark,jdbcType=VARCHAR},#{item.delFlag,jdbcType=NUMERIC}, + #{item.createBy,jdbcType=VARCHAR},#{item.createTime,jdbcType=TIMESTAMP},#{item.updateBy,jdbcType=VARCHAR}, + #{item.updateTime,jdbcType=TIMESTAMP}) + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectlastrecord/ProjectLastRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectlastresult/ProjectLastResultMapper.xml similarity index 63% rename from postdischarge-manage/src/main/resources/mapper/manage/projectlastrecord/ProjectLastRecordMapper.xml rename to postdischarge-manage/src/main/resources/mapper/manage/projectlastresult/ProjectLastResultMapper.xml index 1dc6dfc7..7ec2f0c1 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/projectlastrecord/ProjectLastRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/projectlastresult/ProjectLastResultMapper.xml @@ -2,87 +2,96 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id,patient_id,patient_name, - card_no,group_id,group_name, - project_id,project_name,device_id, - device_name,project_alias,judge_mode, - measure_result,max_value,min_value, - default_value,lis_compare,measure_time, - measure_name,record_remark,qualified_sign, - create_by,create_time,update_by, - update_time + card_no,batch_id,batch_name, + group_id,group_name,project_id, + project_name,device_id,device_name, + project_alias,judge_mode,measure_result, + max_value,min_value,default_value, + lis_compare,measure_time,measure_name, + record_remark,qualified_sign,measure_result_path,project_unit,create_by, + create_time,update_by,update_time - delete from project_last_record + delete from project_last_result where id = #{id,jdbcType=BIGINT} - - insert into project_last_record + + insert into project_last_result ( id,patient_id,patient_name - ,card_no,group_id,group_name - ,project_id,project_name,device_id - ,device_name,project_alias,judge_mode - ,measure_result,max_value,min_value - ,default_value,lis_compare,measure_time - ,measure_name,record_remark,qualified_sign - ,create_by,create_time,update_by - ,update_time) + ,card_no,batch_id,batch_name + ,group_id,group_name,project_id + ,project_name,device_id,device_name + ,project_alias,judge_mode,measure_result + ,max_value,min_value,default_value + ,lis_compare,measure_time,measure_name + ,record_remark,qualified_sign,measure_result_path,project_unit + ,create_by,create_time,update_by,update_time + ) values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} - ,#{cardNo,jdbcType=VARCHAR},#{groupId,jdbcType=BIGINT},#{groupName,jdbcType=VARCHAR} - ,#{projectId,jdbcType=BIGINT},#{projectName,jdbcType=VARCHAR},#{deviceId,jdbcType=BIGINT} - ,#{deviceName,jdbcType=VARCHAR},#{projectAlias,jdbcType=VARCHAR},#{judgeMode,jdbcType=VARCHAR} - ,#{measureResult,jdbcType=VARCHAR},#{maxValue,jdbcType=INTEGER},#{minValue,jdbcType=INTEGER} - ,#{defaultValue,jdbcType=VARCHAR},#{lisCompare,jdbcType=VARCHAR},#{measureTime,jdbcType=TIMESTAMP} - ,#{measureName,jdbcType=VARCHAR},#{recordRemark,jdbcType=VARCHAR},#{qualifiedSign,jdbcType=VARCHAR} - ,#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR} - ,#{updateTime,jdbcType=TIMESTAMP}) + ,#{cardNo,jdbcType=VARCHAR},#{batchId,jdbcType=BIGINT},#{batchName,jdbcType=VARCHAR} + ,#{groupId,jdbcType=BIGINT},#{groupName,jdbcType=VARCHAR},#{projectId,jdbcType=BIGINT} + ,#{projectName,jdbcType=VARCHAR},#{deviceId,jdbcType=BIGINT},#{deviceName,jdbcType=VARCHAR} + ,#{projectAlias,jdbcType=VARCHAR},#{judgeMode,jdbcType=VARCHAR},#{measureResult,jdbcType=VARCHAR} + ,#{maxValue,jdbcType=INTEGER},#{minValue,jdbcType=INTEGER},#{defaultValue,jdbcType=VARCHAR} + ,#{lisCompare,jdbcType=VARCHAR},#{measureTime,jdbcType=TIMESTAMP},#{measureName,jdbcType=VARCHAR} + ,#{recordRemark,jdbcType=VARCHAR},#{qualifiedSign,jdbcType=VARCHAR} + ,#{measureResultPath,jdbcType=VARCHAR},#{projectUnit,jdbcType=VARCHAR} + ,#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP} + ) - - insert into project_last_record + + insert into project_last_result id, patient_id, patient_name, card_no, + batch_id, + batch_name, group_id, group_name, project_id, @@ -100,6 +109,8 @@ measure_name, record_remark, qualified_sign, + measure_result_path, + project_unit, create_by, create_time, update_by, @@ -110,6 +121,8 @@ #{patientId,jdbcType=BIGINT}, #{patientName,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, + #{batchId,jdbcType=BIGINT}, + #{batchName,jdbcType=VARCHAR}, #{groupId,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, #{projectId,jdbcType=BIGINT}, @@ -127,14 +140,16 @@ #{measureName,jdbcType=VARCHAR}, #{recordRemark,jdbcType=VARCHAR}, #{qualifiedSign,jdbcType=VARCHAR}, + #{measureResultPath,jdbcType=VARCHAR}, + #{projectUnit,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, - - update project_last_record + + update project_last_result patient_id = #{patientId,jdbcType=BIGINT}, @@ -145,6 +160,12 @@ card_no = #{cardNo,jdbcType=VARCHAR}, + + batch_id = #{batchId,jdbcType=BIGINT}, + + + batch_name = #{batchName,jdbcType=VARCHAR}, + group_id = #{groupId,jdbcType=BIGINT}, @@ -196,6 +217,12 @@ qualified_sign = #{qualifiedSign,jdbcType=VARCHAR}, + + measure_result_path = #{measureResultPath,jdbcType=VARCHAR}, + + + project_unit = #{projectUnit,jdbcType=VARCHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, @@ -211,12 +238,14 @@ where id = #{id,jdbcType=BIGINT} - - update project_last_record + + update project_last_result set patient_id = #{patientId,jdbcType=BIGINT}, patient_name = #{patientName,jdbcType=VARCHAR}, card_no = #{cardNo,jdbcType=VARCHAR}, + batch_id = #{batchId,jdbcType=BIGINT}, + batch_name = #{batchName,jdbcType=VARCHAR}, group_id = #{groupId,jdbcType=BIGINT}, group_name = #{groupName,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=BIGINT}, @@ -234,6 +263,8 @@ measure_name = #{measureName,jdbcType=VARCHAR}, record_remark = #{recordRemark,jdbcType=VARCHAR}, qualified_sign = #{qualifiedSign,jdbcType=VARCHAR}, + measure_result_path = #{measureResultPath,jdbcType=VARCHAR}, + project_unit = #{projectUnit,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectrecord/ProjectRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectrecord/ProjectRecordMapper.xml deleted file mode 100644 index 746e88ae..00000000 --- a/postdischarge-manage/src/main/resources/mapper/manage/projectrecord/ProjectRecordMapper.xml +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id,patient_id,patient_name, - card_no,group_id,group_name, - project_id,project_name,device_id, - device_name,project_alias,judge_mode, - measure_result,max_value,min_value, - default_value,lis_compare,measure_time, - measure_name,record_remark,qualified_sign, - create_by,create_time,update_by, - update_time - - - - - - delete from project_record - where id = #{id,jdbcType=BIGINT} - - - insert into project_record - ( id,patient_id,patient_name - ,card_no,group_id,group_name - ,project_id,project_name,device_id - ,device_name,project_alias,judge_mode - ,measure_result,max_value,min_value - ,default_value,lis_compare,measure_time - ,measure_name,record_remark,qualified_sign - ,create_by,create_time,update_by - ,update_time) - values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} - ,#{cardNo,jdbcType=VARCHAR},#{groupId,jdbcType=BIGINT},#{groupName,jdbcType=VARCHAR} - ,#{projectId,jdbcType=BIGINT},#{projectName,jdbcType=VARCHAR},#{deviceId,jdbcType=BIGINT} - ,#{deviceName,jdbcType=VARCHAR},#{projectAlias,jdbcType=VARCHAR},#{judgeMode,jdbcType=VARCHAR} - ,#{measureResult,jdbcType=VARCHAR},#{maxValue,jdbcType=INTEGER},#{minValue,jdbcType=INTEGER} - ,#{defaultValue,jdbcType=VARCHAR},#{lisCompare,jdbcType=VARCHAR},#{measureTime,jdbcType=TIMESTAMP} - ,#{measureName,jdbcType=VARCHAR},#{recordRemark,jdbcType=VARCHAR},#{qualifiedSign,jdbcType=VARCHAR} - ,#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR} - ,#{updateTime,jdbcType=TIMESTAMP}) - - - insert into project_record - - id, - patient_id, - patient_name, - card_no, - group_id, - group_name, - project_id, - project_name, - device_id, - device_name, - project_alias, - judge_mode, - measure_result, - max_value, - min_value, - default_value, - lis_compare, - measure_time, - measure_name, - record_remark, - qualified_sign, - create_by, - create_time, - update_by, - update_time, - - - #{id,jdbcType=BIGINT}, - #{patientId,jdbcType=BIGINT}, - #{patientName,jdbcType=VARCHAR}, - #{cardNo,jdbcType=VARCHAR}, - #{groupId,jdbcType=BIGINT}, - #{groupName,jdbcType=VARCHAR}, - #{projectId,jdbcType=BIGINT}, - #{projectName,jdbcType=VARCHAR}, - #{deviceId,jdbcType=BIGINT}, - #{deviceName,jdbcType=VARCHAR}, - #{projectAlias,jdbcType=VARCHAR}, - #{judgeMode,jdbcType=VARCHAR}, - #{measureResult,jdbcType=VARCHAR}, - #{maxValue,jdbcType=INTEGER}, - #{minValue,jdbcType=INTEGER}, - #{defaultValue,jdbcType=VARCHAR}, - #{lisCompare,jdbcType=VARCHAR}, - #{measureTime,jdbcType=TIMESTAMP}, - #{measureName,jdbcType=VARCHAR}, - #{recordRemark,jdbcType=VARCHAR}, - #{qualifiedSign,jdbcType=VARCHAR}, - #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, - #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, - - - - update project_record - - - patient_id = #{patientId,jdbcType=BIGINT}, - - - patient_name = #{patientName,jdbcType=VARCHAR}, - - - card_no = #{cardNo,jdbcType=VARCHAR}, - - - group_id = #{groupId,jdbcType=BIGINT}, - - - group_name = #{groupName,jdbcType=VARCHAR}, - - - project_id = #{projectId,jdbcType=BIGINT}, - - - project_name = #{projectName,jdbcType=VARCHAR}, - - - device_id = #{deviceId,jdbcType=BIGINT}, - - - device_name = #{deviceName,jdbcType=VARCHAR}, - - - project_alias = #{projectAlias,jdbcType=VARCHAR}, - - - judge_mode = #{judgeMode,jdbcType=VARCHAR}, - - - measure_result = #{measureResult,jdbcType=VARCHAR}, - - - max_value = #{maxValue,jdbcType=INTEGER}, - - - min_value = #{minValue,jdbcType=INTEGER}, - - - default_value = #{defaultValue,jdbcType=VARCHAR}, - - - lis_compare = #{lisCompare,jdbcType=VARCHAR}, - - - measure_time = #{measureTime,jdbcType=TIMESTAMP}, - - - measure_name = #{measureName,jdbcType=VARCHAR}, - - - record_remark = #{recordRemark,jdbcType=VARCHAR}, - - - qualified_sign = #{qualifiedSign,jdbcType=VARCHAR}, - - - 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 project_record - set - patient_id = #{patientId,jdbcType=BIGINT}, - patient_name = #{patientName,jdbcType=VARCHAR}, - card_no = #{cardNo,jdbcType=VARCHAR}, - group_id = #{groupId,jdbcType=BIGINT}, - group_name = #{groupName,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=BIGINT}, - project_name = #{projectName,jdbcType=VARCHAR}, - device_id = #{deviceId,jdbcType=BIGINT}, - device_name = #{deviceName,jdbcType=VARCHAR}, - project_alias = #{projectAlias,jdbcType=VARCHAR}, - judge_mode = #{judgeMode,jdbcType=VARCHAR}, - measure_result = #{measureResult,jdbcType=VARCHAR}, - max_value = #{maxValue,jdbcType=INTEGER}, - min_value = #{minValue,jdbcType=INTEGER}, - default_value = #{defaultValue,jdbcType=VARCHAR}, - lis_compare = #{lisCompare,jdbcType=VARCHAR}, - measure_time = #{measureTime,jdbcType=TIMESTAMP}, - measure_name = #{measureName,jdbcType=VARCHAR}, - record_remark = #{recordRemark,jdbcType=VARCHAR}, - qualified_sign = #{qualifiedSign,jdbcType=VARCHAR}, - 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} - - diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectrecordfile/ProjectRecordFileMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectrecordfile/ProjectRecordFileMapper.xml deleted file mode 100644 index b65108d5..00000000 --- a/postdischarge-manage/src/main/resources/mapper/manage/projectrecordfile/ProjectRecordFileMapper.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id,patient_id,patient_name, - card_no,group_id,group_name, - project_id,project_name,device_id, - device_name,project_alias,file_path, - measure_time,measure_name,max_value, - min_value,default_value,qualified_sign, - create_by,create_time,update_by, - update_time - - - - - - delete from project_record_file - where id = #{id,jdbcType=BIGINT} - - - insert into project_record_file - ( id,patient_id,patient_name - ,card_no,group_id,group_name - ,project_id,project_name,device_id - ,device_name,project_alias,file_path - ,measure_time,measure_name,max_value - ,min_value,default_value,qualified_sign - ,create_by,create_time,update_by - ,update_time) - values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} - ,#{cardNo,jdbcType=VARCHAR},#{groupId,jdbcType=BIGINT},#{groupName,jdbcType=VARCHAR} - ,#{projectId,jdbcType=BIGINT},#{projectName,jdbcType=VARCHAR},#{deviceId,jdbcType=BIGINT} - ,#{deviceName,jdbcType=VARCHAR},#{projectAlias,jdbcType=VARCHAR},#{filePath,jdbcType=VARCHAR} - ,#{measureTime,jdbcType=TIMESTAMP},#{measureName,jdbcType=VARCHAR},#{maxValue,jdbcType=INTEGER} - ,#{minValue,jdbcType=INTEGER},#{defaultValue,jdbcType=VARCHAR},#{qualifiedSign,jdbcType=VARCHAR} - ,#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR} - ,#{updateTime,jdbcType=TIMESTAMP}) - - - insert into project_record_file - - id, - patient_id, - patient_name, - card_no, - group_id, - group_name, - project_id, - project_name, - device_id, - device_name, - project_alias, - file_path, - measure_time, - measure_name, - max_value, - min_value, - default_value, - qualified_sign, - create_by, - create_time, - update_by, - update_time, - - - #{id,jdbcType=BIGINT}, - #{patientId,jdbcType=BIGINT}, - #{patientName,jdbcType=VARCHAR}, - #{cardNo,jdbcType=VARCHAR}, - #{groupId,jdbcType=BIGINT}, - #{groupName,jdbcType=VARCHAR}, - #{projectId,jdbcType=BIGINT}, - #{projectName,jdbcType=VARCHAR}, - #{deviceId,jdbcType=BIGINT}, - #{deviceName,jdbcType=VARCHAR}, - #{projectAlias,jdbcType=VARCHAR}, - #{filePath,jdbcType=VARCHAR}, - #{measureTime,jdbcType=TIMESTAMP}, - #{measureName,jdbcType=VARCHAR}, - #{maxValue,jdbcType=INTEGER}, - #{minValue,jdbcType=INTEGER}, - #{defaultValue,jdbcType=VARCHAR}, - #{qualifiedSign,jdbcType=VARCHAR}, - #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, - #{updateBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, - - - - update project_record_file - - - patient_id = #{patientId,jdbcType=BIGINT}, - - - patient_name = #{patientName,jdbcType=VARCHAR}, - - - card_no = #{cardNo,jdbcType=VARCHAR}, - - - group_id = #{groupId,jdbcType=BIGINT}, - - - group_name = #{groupName,jdbcType=VARCHAR}, - - - project_id = #{projectId,jdbcType=BIGINT}, - - - project_name = #{projectName,jdbcType=VARCHAR}, - - - device_id = #{deviceId,jdbcType=BIGINT}, - - - device_name = #{deviceName,jdbcType=VARCHAR}, - - - project_alias = #{projectAlias,jdbcType=VARCHAR}, - - - file_path = #{filePath,jdbcType=VARCHAR}, - - - measure_time = #{measureTime,jdbcType=TIMESTAMP}, - - - measure_name = #{measureName,jdbcType=VARCHAR}, - - - max_value = #{maxValue,jdbcType=INTEGER}, - - - min_value = #{minValue,jdbcType=INTEGER}, - - - default_value = #{defaultValue,jdbcType=VARCHAR}, - - - qualified_sign = #{qualifiedSign,jdbcType=VARCHAR}, - - - 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 project_record_file - set - patient_id = #{patientId,jdbcType=BIGINT}, - patient_name = #{patientName,jdbcType=VARCHAR}, - card_no = #{cardNo,jdbcType=VARCHAR}, - group_id = #{groupId,jdbcType=BIGINT}, - group_name = #{groupName,jdbcType=VARCHAR}, - project_id = #{projectId,jdbcType=BIGINT}, - project_name = #{projectName,jdbcType=VARCHAR}, - device_id = #{deviceId,jdbcType=BIGINT}, - device_name = #{deviceName,jdbcType=VARCHAR}, - project_alias = #{projectAlias,jdbcType=VARCHAR}, - file_path = #{filePath,jdbcType=VARCHAR}, - measure_time = #{measureTime,jdbcType=TIMESTAMP}, - measure_name = #{measureName,jdbcType=VARCHAR}, - max_value = #{maxValue,jdbcType=INTEGER}, - min_value = #{minValue,jdbcType=INTEGER}, - default_value = #{defaultValue,jdbcType=VARCHAR}, - qualified_sign = #{qualifiedSign,jdbcType=VARCHAR}, - 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} - - diff --git a/postdischarge-manage/src/main/resources/mapper/manage/projectresult/ProjectResultMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/projectresult/ProjectResultMapper.xml new file mode 100644 index 00000000..f8b85862 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/projectresult/ProjectResultMapper.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, patient_id, patient_name, card_no, batch_id, batch_name, group_id, group_name, project_id, project_name, device_id, device_name, project_alias, judge_mode, measure_result, max_value, min_value, default_value, lis_compare, measure_time, measure_name, record_remark, qualified_sign, measure_result_path, project_unit, create_by, create_time, update_by, update_time from project_result + + + + + + + + insert into project_result + + patient_id, + + patient_name, + + card_no, + + batch_id, + + batch_name, + + group_id, + + group_name, + + project_id, + + project_name, + + device_id, + + device_name, + + project_alias, + + judge_mode, + + measure_result, + + max_value, + + min_value, + + default_value, + + lis_compare, + + measure_time, + + measure_name, + + record_remark, + + qualified_sign, + + measure_result_path, + + project_unit, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{patientId}, + + #{patientName}, + + #{cardNo}, + + #{batchId}, + + #{batchName}, + + #{groupId}, + + #{groupName}, + + #{projectId}, + + #{projectName}, + + #{deviceId}, + + #{deviceName}, + + #{projectAlias}, + + #{judgeMode}, + + #{measureResult}, + + #{maxValue}, + + #{minValue}, + + #{defaultValue}, + + #{lisCompare}, + + #{measureTime}, + + #{measureName}, + + #{recordRemark}, + + #{qualifiedSign}, + + #{measureResultPath}, + + #{projectUnit}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update project_result + + patient_id = + #{patientId}, + + patient_name = + #{patientName}, + + card_no = + #{cardNo}, + + batch_id = + #{batchId}, + + batch_name = + #{batchName}, + + group_id = + #{groupId}, + + group_name = + #{groupName}, + + project_id = + #{projectId}, + + project_name = + #{projectName}, + + device_id = + #{deviceId}, + + device_name = + #{deviceName}, + + project_alias = + #{projectAlias}, + + judge_mode = + #{judgeMode}, + + measure_result = + #{measureResult}, + + max_value = + #{maxValue}, + + min_value = + #{minValue}, + + default_value = + #{defaultValue}, + + lis_compare = + #{lisCompare}, + + measure_time = + #{measureTime}, + + measure_name = + #{measureName}, + + record_remark = + #{recordRemark}, + + qualified_sign = + #{qualifiedSign}, + + measure_result_path = + #{measureResultPath}, + + project_unit = + #{projectUnit}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from project_result where id = #{id} + + + + delete from project_result where id in + + #{id} + + + + + diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml index ee08244a..12760267 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml @@ -34,6 +34,8 @@ + + @@ -41,35 +43,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - id,patient_id,patient_name, patient_phone,card_no,sex,birth_date,sign_time, @@ -79,7 +52,7 @@ visit_method,in_hospital_number,sign_diagnosis,review_diagnosis, service_status,sign_status,intentional_source, intentional_time,billing_doctor_id,billing_doctor_name, - price,payment_status,del_flag, + price,payment_status,health_manage_id,health_manage_name,del_flag, create_by,create_time,update_by, update_time @@ -105,7 +78,7 @@ ,visit_method,in_hospital_number,sign_diagnosis,review_diagnosis ,service_status,sign_status,intentional_source ,intentional_time,billing_doctor_id,billing_doctor_name - ,price,payment_status,del_flag + ,price,payment_status,health_manage_id,health_manage_name,del_flag ,create_by,create_time,update_by ,update_time) values (#{id,jdbcType=BIGINT},#{patientId,jdbcType=BIGINT},#{patientName,jdbcType=VARCHAR} @@ -116,8 +89,8 @@ ,#{visitMethod,jdbcType=VARCHAR},#{inHospitalNumber,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} + ,#{price,jdbcType=DECIMAL},#{paymentStatus,jdbcType=VARCHAR},#{healthManageId,jdbcType=BIGINT},#{healthManageName,jdbcType=VARCHAR} + ,#{delFlag,jdbcType=TINYINT},#{createBy,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=VARCHAR} ,#{updateTime,jdbcType=TIMESTAMP}) @@ -152,6 +125,8 @@ billing_doctor_name, price, payment_status, + health_manage_id, + health_manage_name, del_flag, create_by, create_time, @@ -188,6 +163,8 @@ #{billingDoctorName,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{paymentStatus,jdbcType=VARCHAR}, + #{healthManageId,jdbcType=BIGINT}, + #{healthManageName,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, @@ -282,6 +259,12 @@ payment_status = #{paymentStatus,jdbcType=VARCHAR}, + + health_manage_id = #{healthManageId,jdbcType=BIGINT}, + + + health_manage_name = #{healthManageName,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=TINYINT}, @@ -331,6 +314,8 @@ billing_doctor_name = #{billingDoctorName,jdbcType=VARCHAR}, price = #{price,jdbcType=DECIMAL}, payment_status = #{paymentStatus,jdbcType=VARCHAR}, + health_manage_id = #{healthManageId,jdbcType=BIGINT}, + health_manage_name = #{healthManageName,jdbcType=VARCHAR}, del_flag = #{delFlag,jdbcType=TINYINT}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, @@ -408,7 +393,7 @@ - select sign.id,sign.patient_id,sign.patient_name, sign.patient_phone,sign.card_no,sign.sex, sign.birth_date,sign.sign_time,