搜索条件日期格式化,修改签约。
This commit is contained in:
parent
b357b669cd
commit
12b0014d8f
@ -60,8 +60,6 @@ public class SysUserController extends BaseController {
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取用户列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
|
||||
@ -224,6 +224,11 @@ public class PatientInfo extends BaseEntity {
|
||||
@ApiModelProperty(value = "出院时间(出院患者)")
|
||||
private LocalDateTime dischargeTime;
|
||||
|
||||
/**
|
||||
* 最新一次预住院患者表主键
|
||||
*/
|
||||
private Long patientPreHospitalizationId;
|
||||
|
||||
/**
|
||||
* 预约治疗组(取值以及枚举未知?)
|
||||
*/
|
||||
|
||||
@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @description: 患者列表查询传输对象
|
||||
@ -64,26 +65,42 @@ public class PatientInfoDto {
|
||||
|
||||
/** 就诊时间开始(门诊患者),时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "就诊时间开始")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate visitDateStart;
|
||||
|
||||
/** 就诊时间结束(门诊患者),时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "就诊时间结束")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate visitDateEnd;
|
||||
|
||||
/** 入院时间开始,时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "入院时间开始")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate admissionTimeStart;
|
||||
|
||||
/** 入院时间结束,时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "入院时间结束")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate admissionTimeEnd;
|
||||
|
||||
/** 出院时间开始,时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "出院时间开始")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate dischargeTimeStart;
|
||||
|
||||
/** 出院时间结束,时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "出院时间结束")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate dischargeTimeEnd;
|
||||
|
||||
/** 预约时间开始(预住院患者),时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "预约时间开始(预住院患者),时间格式:yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate appointmentDateStart;
|
||||
|
||||
/** 预约时间开始(预住院患者),时间格式:yyyy-MM-dd */
|
||||
@ApiModelProperty(value = "预约时间结束(预住院患者),时间格式:yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate appointmentDateEnd;
|
||||
|
||||
/** 预约治疗组(取值以及枚举未知?) */
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package com.xinelu.manage.dto.signpatientrecord;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware;
|
||||
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
|
||||
import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@ -30,15 +30,19 @@ public class SignPatientAddDto {
|
||||
/**
|
||||
* 管理路径
|
||||
*/
|
||||
@ApiModelProperty("管理路径id")
|
||||
@NotNull(message = "请选择管理路径")
|
||||
private Long routeId;
|
||||
|
||||
@ApiModelProperty("管理路径名称")
|
||||
private String routeName;
|
||||
@ApiModelProperty("管理路径")
|
||||
private SignPatientManageRoute route;
|
||||
|
||||
/**
|
||||
* 硬件设备
|
||||
*/
|
||||
@ApiModelProperty("硬件设备列表")
|
||||
private List<SignPatientPackageHardware> devices;
|
||||
|
||||
/**
|
||||
* 签约知情书
|
||||
*/
|
||||
@ApiModelProperty("签约知情书列表")
|
||||
private List<SignPatientInformed> informeds;
|
||||
|
||||
@ApiModelProperty("签约类型,签约:sign, 续约:reSign")
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.xinelu.manage.dto.signpatientrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDate;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @description: 签约患者查询传输对象
|
||||
@ -42,12 +42,14 @@ public class SignPatientListDto {
|
||||
* 加入意向时间(意向签约)
|
||||
*/
|
||||
@ApiModelProperty(value = "加入意向时间开始(意向签约)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate intentionalTimeStart;
|
||||
|
||||
/**
|
||||
* 加入意向时间(意向签约)
|
||||
*/
|
||||
@ApiModelProperty(value = "加入意向时间结束(意向签约)")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate intentionalTimeEnd;
|
||||
|
||||
/**
|
||||
@ -60,9 +62,11 @@ public class SignPatientListDto {
|
||||
* 签约时间,格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "签约时间开始,格式:yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate signTimeStart;
|
||||
|
||||
@ApiModelProperty(value = "签约时间结束,格式:yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate signTimeEnd;
|
||||
/**
|
||||
* 签约时所属医院id
|
||||
@ -101,11 +105,11 @@ public class SignPatientListDto {
|
||||
private String serviceStatus;
|
||||
|
||||
@ApiModelProperty(value = "服务结束时间开始")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate serviceEndTimeStart;
|
||||
|
||||
@ApiModelProperty(value = "服务结束时间结束")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate serviceEndTimeEnd;
|
||||
|
||||
}
|
||||
|
||||
@ -138,6 +138,7 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
||||
@Override
|
||||
@Transactional
|
||||
public int deletePatientInfoByIds(Long[] ids) {
|
||||
int flag = 0;
|
||||
for (Long id : ids) {
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(id);
|
||||
patientVisitRecordService.deletePatientVisitRecordById(patientInfo.getPatientVisitRecordId());
|
||||
@ -154,9 +155,9 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
||||
// 设置patientType
|
||||
patientVisitRecordService.setPatientType(patientInfo, patientVisitRecord);
|
||||
}
|
||||
patientInfoMapper.updatePatientInfo(patientInfo);
|
||||
flag += patientInfoMapper.updatePatientInfo(patientInfo);
|
||||
}
|
||||
return patientInfoMapper.deletePatientInfoByIds(ids);
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -16,6 +16,7 @@ import com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord;
|
||||
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.patientinfo.IPatientInfoService;
|
||||
import com.xinelu.manage.service.patientprehospitalization.IPatientPreHospitalizationService;
|
||||
@ -57,6 +58,9 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
|
||||
@Resource
|
||||
private RegexUtil regexUtil;
|
||||
|
||||
@Resource
|
||||
private PatientInfoMapper patientInfoMapper;
|
||||
|
||||
@Override
|
||||
public int insert(PatientPreHospitalization preHospitalization) {
|
||||
// 根据身份证号+医院id查询是否有患者信息
|
||||
@ -64,9 +68,9 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
|
||||
patientInfoDto.setCardNo(preHospitalization.getCardNo());
|
||||
patientInfoDto.setHospitalAgencyId(preHospitalization.getHospitalAgencyId());
|
||||
List<PatientInfo> patientList = patientInfoService.selectPatientInfoList(patientInfoDto);
|
||||
PatientInfo patientInfo = new PatientInfo();
|
||||
if (CollectionUtils.isEmpty(patientList)) {
|
||||
// 保存患者信息
|
||||
PatientInfo patientInfo = new PatientInfo();
|
||||
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
|
||||
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
|
||||
PatientInfo saveObj = patientInfoService.insertPatientInfo(patientInfo);
|
||||
@ -74,7 +78,7 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
|
||||
preHospitalization.setResidentId(saveObj.getResidentId());
|
||||
} else {
|
||||
// 修改患者信息
|
||||
PatientInfo patientInfo = patientList.get(0);
|
||||
patientInfo = patientList.get(0);
|
||||
BeanUtils.copyBeanProp(patientInfo, preHospitalization);
|
||||
patientInfo.setPatientType(PatientTypeConstants.PRE_HOSPITALIZED_PATIENT);
|
||||
patientInfoService.updatePatientInfo(patientInfo);
|
||||
@ -85,7 +89,10 @@ public class PatientPreHospitalizationServiceImpl implements IPatientPreHospital
|
||||
preHospitalization.setDelFlag(0);
|
||||
preHospitalization.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
preHospitalization.setCreateTime(LocalDateTime.now());
|
||||
return preHospitalizationMapper.insertSelective(preHospitalization);
|
||||
int flag = preHospitalizationMapper.insertSelective(preHospitalization);
|
||||
patientInfo.setPatientPreHospitalizationId(preHospitalization.getId());
|
||||
patientInfoMapper.updatePatientInfo(patientInfo);
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -24,7 +24,7 @@ public interface IPatientVisitRecordService {
|
||||
* @param id 患者就诊记录基本信息主键
|
||||
* @return 患者就诊记录基本信息
|
||||
*/
|
||||
public PatientVisitRecord selectPatientVisitRecordById(Long id);
|
||||
PatientVisitRecord selectPatientVisitRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询患者就诊记录基本信息列表
|
||||
@ -32,7 +32,7 @@ public interface IPatientVisitRecordService {
|
||||
* @param patientVisitRecord 患者就诊记录基本信息
|
||||
* @return 患者就诊记录基本信息集合
|
||||
*/
|
||||
public List<PatientVisitRecord> selectPatientVisitRecordList(PatientVisitRecordDto patientVisitRecord);
|
||||
List<PatientVisitRecord> selectPatientVisitRecordList(PatientVisitRecordDto patientVisitRecord);
|
||||
|
||||
/**
|
||||
* 新增患者就诊记录基本信息
|
||||
@ -40,7 +40,7 @@ public interface IPatientVisitRecordService {
|
||||
* @param patientVisitRecord 患者就诊记录基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public void insertPatientVisitRecord(PatientVisitRecordSaveDto patientVisitRecord);
|
||||
void insertPatientVisitRecord(PatientVisitRecordSaveDto patientVisitRecord);
|
||||
|
||||
/**
|
||||
* 修改患者就诊记录基本信息
|
||||
@ -48,12 +48,12 @@ public interface IPatientVisitRecordService {
|
||||
* @param patientVisitRecord 患者就诊记录基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePatientVisitRecord(PatientVisitRecord patientVisitRecord);
|
||||
int updatePatientVisitRecord(PatientVisitRecord patientVisitRecord);
|
||||
|
||||
/**
|
||||
* 患者配置——就诊信息保存
|
||||
* @param saveDto
|
||||
* @return
|
||||
* @param saveDto 患者配置——就诊信息保存传输对象
|
||||
* @return 结果
|
||||
*/
|
||||
int saveRecord(@RequestBody PatientVisitRecordInfoSaveDto saveDto);
|
||||
|
||||
@ -63,7 +63,7 @@ public interface IPatientVisitRecordService {
|
||||
* @param updDto 患者就诊记录基本信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecord(PatientVisitRecordInfoSaveDto updDto);
|
||||
int updateRecord(PatientVisitRecordInfoSaveDto updDto);
|
||||
|
||||
/**
|
||||
* 批量删除患者就诊记录基本信息
|
||||
@ -71,7 +71,7 @@ public interface IPatientVisitRecordService {
|
||||
* @param ids 需要删除的患者就诊记录基本信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePatientVisitRecordByIds(Long[] ids);
|
||||
int deletePatientVisitRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除患者就诊记录基本信息信息
|
||||
@ -79,7 +79,7 @@ public interface IPatientVisitRecordService {
|
||||
* @param id 患者就诊记录基本信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePatientVisitRecordById(Long id);
|
||||
int deletePatientVisitRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 患者就诊信息导入
|
||||
|
||||
@ -198,6 +198,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
|
||||
PatientInfo patientInfo = patientMapper.selectPatientInfoById(saveDto.getPatientId());
|
||||
BeanUtils.copyBeanProp(patientInfo, patientVisitRecord);
|
||||
patientInfo.setId(saveDto.getPatientId());
|
||||
patientInfo.setPatientPreHospitalizationId(null);
|
||||
// 设置患者类型
|
||||
setPatientType(patientInfo, patientVisitRecord);
|
||||
patientInfo.setPatientVisitRecordId(patientVisitRecord.getId());
|
||||
@ -416,7 +417,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
|
||||
long daysBetween = ChronoUnit.DAYS.between(patientVisitRecord.getAdmissionTime(), patientVisitRecord.getDischargeTime());
|
||||
patientVisitRecord.setHospitalizationDays((int) daysBetween + 1);
|
||||
}
|
||||
patientVisitRecord.setVisitDate(patientVisitRecord.getDischargeTime());
|
||||
patientVisitRecord.setVisitDate(patientVisitRecord.getAdmissionTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,13 +89,14 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
}
|
||||
|
||||
@Override public SignPatientInfoVo getByRecordId(Long id) {
|
||||
// 查询签约信息、签约服务包、签约路径
|
||||
SignPatientInfoVo signPatientInfoVo = signPatientRecordMapper.getByRecordId(id);
|
||||
// 根据签约记录主键查询设备列表
|
||||
SignPatientPackageHardware queryDevice = new SignPatientPackageHardware();
|
||||
queryDevice.setSignPatientRecordId(id);
|
||||
List<SignPatientPackageHardware> devices = signPatientPackageHardwareMapper.selectSignPatientPackageHardwareList(queryDevice);
|
||||
signPatientInfoVo.setSignDevices(devices);
|
||||
|
||||
// 签约知情同意书
|
||||
SignPatientInformed signPatientInformed = new SignPatientInformed();
|
||||
signPatientInformed.setSignPatientRecordId(id);
|
||||
List<SignPatientInformed> informeds = signPatientInformedMapper.selectSignPatientInformedList(signPatientInformed);
|
||||
@ -135,9 +136,10 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
signPatientRecord.setCreateTime(LocalDateTime.now());
|
||||
signPatientRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
// 保存签约记录
|
||||
int flag = 0;
|
||||
if (body.getSignCategory() == "sign") {
|
||||
flag = signPatientRecordMapper.updateByPrimaryKey(signPatientRecord);
|
||||
int flag;
|
||||
if (StringUtils.equals("sign", body.getSignCategory())) { // 签约,修改意向签约记录状态
|
||||
signPatientRecord.setId(patient.getSignPatientRecordId());
|
||||
flag = signPatientRecordMapper.updateByPrimaryKeySelective(signPatientRecord);
|
||||
} else {
|
||||
signPatientRecord.setId(null);
|
||||
flag = signPatientRecordMapper.insert(signPatientRecord);
|
||||
@ -163,11 +165,12 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
signPatientPackageMapper.insertSignPatientPackage(signPatientPackage);
|
||||
|
||||
// 保存管理路径
|
||||
if (body.getRouteId() != null) {
|
||||
SpecialDiseaseRoute specialDiseaseRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(body.getRouteId());
|
||||
SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute();
|
||||
if (body.getRoute() != null) {
|
||||
SignPatientManageRoute signPatientManageRoute = body.getRoute();
|
||||
SpecialDiseaseRoute specialDiseaseRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(signPatientManageRoute.getRouteId());
|
||||
BeanUtils.copyBeanProp(signPatientManageRoute, specialDiseaseRoute);
|
||||
signPatientManageRoute.setSignPatientRecordId(signPatientRecord.getId());
|
||||
signPatientManageRoute.setPatientId(patient.getId());
|
||||
signPatientManageRoute.setId(null);
|
||||
signPatientManageRoute.setRouteId(specialDiseaseRoute.getId());
|
||||
signPatientManageRoute.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
|
||||
@ -176,7 +179,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute);
|
||||
// 保存管理节点
|
||||
SpecialDiseaseNode specialDiseaseNode = new SpecialDiseaseNode();
|
||||
specialDiseaseNode.setRouteId(body.getRouteId());
|
||||
specialDiseaseNode.setRouteId(signPatientManageRoute.getRouteId());
|
||||
List<SpecialDiseaseNode> nodeList = specialDiseaseNodeMapper.selectSpecialDiseaseNodeList(specialDiseaseNode);
|
||||
if (CollectionUtils.isEmpty(nodeList)) {
|
||||
throw new ServiceException("该管理任务没有任务节点");
|
||||
@ -184,7 +187,8 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
List<SignPatientManageRouteNode> manageNodeList = nodeList.stream().map(node -> {
|
||||
SignPatientManageRouteNode manageRouteNode = new SignPatientManageRouteNode();
|
||||
BeanUtils.copyBeanProp(manageRouteNode, node);
|
||||
manageRouteNode.setManageRouteId(body.getRouteId());
|
||||
manageRouteNode.setManageRouteId(signPatientManageRoute.getId());
|
||||
manageRouteNode.setManageRouteName(signPatientManageRoute.getRouteName());
|
||||
manageRouteNode.setId(null);
|
||||
manageRouteNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.name());
|
||||
manageRouteNode.setRouteCheckDate(LocalDateTime.now());
|
||||
@ -198,12 +202,13 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
manageRouteNodeMapper.insertBatch(manageNodeList);
|
||||
// 保存触发条件
|
||||
SpecialDiseaseTriggerCondition triggerConditionQuery = new SpecialDiseaseTriggerCondition();
|
||||
triggerConditionQuery.setRouteId(body.getRouteId());
|
||||
triggerConditionQuery.setRouteId(signPatientManageRoute.getRouteId());
|
||||
List<SpecialDiseaseTriggerCondition> triggerConditions = triggerConditionMapper.selectSpecialDiseaseTriggerConditionList(triggerConditionQuery);
|
||||
List<SignRouteTriggerCondition> routeTriggerConditionList = triggerConditions.stream().map(item->{
|
||||
SignRouteTriggerCondition signRouteTriggerCondition = new SignRouteTriggerCondition();
|
||||
BeanUtils.copyBeanProp(signRouteTriggerCondition, item);
|
||||
signRouteTriggerCondition.setPatientManageRouteId(signPatientManageRoute.getRouteId());
|
||||
signRouteTriggerCondition.setPatientManageRouteId(signPatientManageRoute.getId());
|
||||
signRouteTriggerCondition.setRouteName(signPatientManageRoute.getRouteName());
|
||||
signRouteTriggerCondition.setId(null);
|
||||
return signRouteTriggerCondition;
|
||||
}).collect(Collectors.toList());
|
||||
@ -265,7 +270,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
throw new ServiceException("未找到该居民");
|
||||
}
|
||||
// 查询当前居民签约状态是否已签约
|
||||
if (StringUtils.equals(SignRecordServiceStatusConstants.IN_SIGN, patientInfo.getSignStatus())) {
|
||||
if (StringUtils.equals(SignRecordServiceStatusConstants.SERVICE_CENTER, patientInfo.getServiceStatus())) {
|
||||
throw new ServiceException("该居民已签约!");
|
||||
}
|
||||
|
||||
|
||||
@ -186,12 +186,12 @@ public class SignPatientInfoVo {
|
||||
|
||||
/** 服务开始时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "服务开始时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime serviceStartTime;
|
||||
|
||||
/** 服务结束时间,格式:yyyy-MM-dd HH:mm:ss */
|
||||
@ApiModelProperty(value = "服务结束时间,格式:yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime serviceEndTime;
|
||||
|
||||
/**
|
||||
@ -206,6 +206,20 @@ public class SignPatientInfoVo {
|
||||
@ApiModelProperty(value = "服务包期限单位,年,月,日")
|
||||
private String packageTermUnit;
|
||||
|
||||
/**
|
||||
* 签约患者管理路径id
|
||||
*/
|
||||
private Long signPatientManageRouteId;
|
||||
|
||||
/**
|
||||
* 签约路径信息
|
||||
*/
|
||||
@ApiModelProperty("管理路径id")
|
||||
private Long routeId;
|
||||
|
||||
@ApiModelProperty("管理路径名称")
|
||||
private String routeName;
|
||||
|
||||
@ApiModelProperty(value = "签约硬件设备列表")
|
||||
private List<SignPatientPackageHardware> signDevices;
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
<result property="visitSerialNumber" column="visit_serial_number"/>
|
||||
<result property="admissionTime" column="admission_time"/>
|
||||
<result property="dischargeTime" column="discharge_time"/>
|
||||
<result property="patientPreHospitalizationId" column="patient_pre_hospitalization_id"/>
|
||||
<result property="appointmentTreatmentGroup" column="appointment_treatment_group"/>
|
||||
<result property="registrationNo" column="registration_no"/>
|
||||
<result property="registrationDate" column="registration_date"/>
|
||||
@ -61,12 +62,12 @@
|
||||
sex,
|
||||
address,
|
||||
patient_type,
|
||||
sign_status,
|
||||
sign_status,sign_patient_record_id,
|
||||
sign_time,
|
||||
visit_method, attending_physician_id, attending_physician_name, main_diagnosis,
|
||||
hospital_agency_id, hospital_agency_name, campus_agency_id, campus_agency_name, department_id, department_name, ward_id, ward_name,
|
||||
responsible_nurse, patient_visit_record_id, visit_serial_number,
|
||||
admission_time, discharge_time, appointment_treatment_group,
|
||||
admission_time, patient_pre_hospitalization_id, discharge_time, patient_pre_hospitalization_id, appointment_treatment_group,
|
||||
registration_no, registration_date, appointment_date, in_hospital_number, visit_date, discharge_method,
|
||||
patient_source, surgical_name, del_flag, create_by, create_time, update_by, update_time
|
||||
from patient_info
|
||||
@ -118,22 +119,28 @@
|
||||
and visit_method = #{visitMethod}
|
||||
</if>
|
||||
<if test="visitDateStart != null ">
|
||||
and visit_date >= #{visitDateStart}
|
||||
and date_format(visit_date, '%y%m%d') >= date_format(#{visitDateStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="visitDateEnd != null ">
|
||||
and visit_date <= #{visitDateEnd}
|
||||
and date_format(visit_date, '%y%m%d') <= date_format(#{visitDateEnd}, '%y%m%d')
|
||||
</if>
|
||||
<if test="admissionTimeStart != null ">
|
||||
and admission_time >= #{admissionTimeStart}
|
||||
and date_format(admission_time,'%y%m%d') >= date_format(#{admissionTimeStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="admissionTimeEnd != null ">
|
||||
and admission_time <= #{admissionTimeEnd}
|
||||
and date_format(admission_time,'%y%m%d') <= date_format(#{admissionTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
<if test="dischargeTimeStart != null ">
|
||||
and date_format(discharge_time,'%y%m%d') >= date_format(#{dischargeTimeStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="dischargeTimeEnd != null ">
|
||||
and date_format(discharge_time,'%y%m%d') <= date_format(#{dischargeTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
<if test="appointmentDateStart != null ">
|
||||
and appointment_date >= #{appointmentDateStart}
|
||||
and date_format(appointment_date, '%y%m%d') >= date_format(#{appointmentDateStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="appointmentDateEnd != null ">
|
||||
and appointment_date <= #{appointmentDateEnd}
|
||||
and date_format(appointment_date, '%y%m%d') <= date_format(#{appointmentDateEnd}, '%y%m%d')
|
||||
</if>
|
||||
<if test="appointmentTreatmentGroup != null and appointmentTreatmentGroup != ''">
|
||||
and appointment_treatment_group = #{appointmentTreatmentGroup}
|
||||
@ -238,6 +245,9 @@
|
||||
<if test="dischargeTime != null">
|
||||
discharge_time,
|
||||
</if>
|
||||
<if test="patientPreHospitalizationId != null">
|
||||
patient_pre_hospitalization_id,
|
||||
</if>
|
||||
<if test="appointmentTreatmentGroup != null">appointment_treatment_group,
|
||||
</if>
|
||||
<if test="registrationNo != null">registration_no,
|
||||
@ -328,6 +338,9 @@
|
||||
</if>
|
||||
<if test="dischargeTime != null">#{dischargeTime},
|
||||
</if>
|
||||
<if test="patientPreHospitalizationId != null">
|
||||
#{patientPreHospitalizationId},
|
||||
</if>
|
||||
<if test="appointmentTreatmentGroup != null">#{appointmentTreatmentGroup},
|
||||
</if>
|
||||
<if test="registrationNo != null">#{registrationNo},
|
||||
@ -450,6 +463,9 @@
|
||||
<if test="dischargeTime != null">
|
||||
discharge_time = #{dischargeTime},
|
||||
</if>
|
||||
<if test="patientPreHospitalizationId != null">
|
||||
patient_pre_hospitalization_id = #{patientPreHospitalizationId},
|
||||
</if>
|
||||
<if test="appointmentTreatmentGroup != null">appointment_treatment_group =
|
||||
#{appointmentTreatmentGroup},
|
||||
</if>
|
||||
|
||||
@ -361,10 +361,10 @@
|
||||
and project_id = #{projectId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="measureTimeStart != null">
|
||||
and measure_time >= #{measureTimeStart}
|
||||
and date_format(measure_time,'%y%m%d') >= date_format(#{measureTimeStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="measureTimeEnd != null">
|
||||
and measure_time <= #{measureTimeEnd}
|
||||
and date_format(measure_time,'%y%m%d') <= date_format(#{measureTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -59,10 +59,10 @@
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTimeStart != null">
|
||||
and create_time >= #{createTimeStart}
|
||||
and date_format(create_time, '%y%m%d') >= date_format(createTimeStart, '%y%m%d')
|
||||
</if>
|
||||
<if test="createTimeEnd != null">
|
||||
and create_time <= #{createTimeEnd}
|
||||
and date_format(create_time, '%y%m%d') <= date_format(#{createTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -334,7 +334,7 @@
|
||||
sign.ward_id,sign.ward_name,
|
||||
sign.visit_serial_number,sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis,
|
||||
sign.service_status,sign.sign_status,sign.intentional_source,
|
||||
sign.intentional_time,sign.billing_doctor_name,sign.payment_status,sign.price,
|
||||
sign.intentional_time,sign.billing_doctor_name,sign.payment_status,sign.price,sign.health_manage_id, sign.health_manage_name,
|
||||
p.service_package_id, p.package_name, p.service_end_time, p.package_term, p.package_term_unit
|
||||
from patient_info patient
|
||||
left join sign_patient_record sign on patient.sign_patient_record_id = sign.id
|
||||
@ -354,19 +354,19 @@
|
||||
and sign.patient_phone like concat('%', #{patientPhone}, '%')
|
||||
</if>
|
||||
<if test="intentionalTimeStart != null">
|
||||
and sign.intentional_time >= #{intentionalTimeStart}
|
||||
and date_format(sign.intentional_time, '%y%m%d') >= date_format(#{intentionalTimeStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="intentionalTimeEnd != null">
|
||||
and sign.intentional_time <= #{intentionalTimeEnd}
|
||||
and date_format(sign.intentional_time, '%y%m%d') <= date_format(#{intentionalTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
<if test="intentionalSource != null">
|
||||
and sign.intentional_source = #{intentionalSource}
|
||||
</if>
|
||||
<if test="signTimeStart != null">
|
||||
and sign.sign_time >= #{signTimeStart}
|
||||
and date_format(sign.sign_time, '%y%m%d') >= date_format(#{signTimeStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="signTimeEnd != null">
|
||||
and sign.sign_time <= #{signTimeEnd}
|
||||
and date_format(sign.sign_time, '%y%m%d') <= date_format(#{signTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
<if test="hospitalAgencyId != null ">
|
||||
and sign.hospital_agency_id = #{hospitalAgencyId}
|
||||
@ -387,10 +387,10 @@
|
||||
and sign.sign_status = #{signStatus}
|
||||
</if>
|
||||
<if test="serviceEndTimeStart != null">
|
||||
and p.service_end_time >= #{serviceEndTimeStart}
|
||||
and date_format(p.service_end_time, '%y%m%d') >= date_format(#{serviceEndTimeStart}, '%y%m%d')
|
||||
</if>
|
||||
<if test="serviceEndTimeEnd != null">
|
||||
and p.service_end_time <= #{serviceEndTimeEnd}
|
||||
and date_format(p.service_end_time, '%y%m%d') <= date_format(#{serviceEndTimeEnd}, '%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
@ -405,7 +405,7 @@
|
||||
sign.visit_serial_number, sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis,
|
||||
sign.service_status,sign.sign_status,sign.payment_status,sign.price,sign.health_manage_id,sign.health_manage_name,
|
||||
p.service_package_id, p.package_name, p.package_payment_status, p.package_price, p.service_start_time, p.service_end_time,
|
||||
p.package_term, p.package_term_unit, route.route_id, route.route_name
|
||||
p.package_term, p.package_term_unit, route.id as signPatientManageRouteId, route.route_id, route.route_name
|
||||
from sign_patient_record sign
|
||||
left join sign_patient_package p on p.sign_patient_record_id = sign.id
|
||||
left join sign_patient_manage_route route on route.sign_patient_record_id = sign.id
|
||||
|
||||
@ -174,14 +174,14 @@
|
||||
insert into sign_route_trigger_condition(id,patient_manage_route_id,route_name,
|
||||
trigger_condition_code,trigger_condition_name,trigger_condition_operator,
|
||||
trigger_condition_value,trigger_condition_sort,trigger_condition_remark,
|
||||
search_value,create_by,create_time,
|
||||
create_by,create_time,
|
||||
update_by,update_time)
|
||||
values
|
||||
<foreach collection="signRouteTriggerConditionCollection" item="item" separator=",">
|
||||
(#{item.id,jdbcType=NUMERIC},#{item.patientManageRouteId,jdbcType=NUMERIC},#{item.routeName,jdbcType=VARCHAR},
|
||||
#{item.triggerConditionCode,jdbcType=VARCHAR},#{item.triggerConditionName,jdbcType=VARCHAR},#{item.triggerConditionOperator,jdbcType=VARCHAR},
|
||||
#{item.triggerConditionValue,jdbcType=VARCHAR},#{item.triggerConditionSort,jdbcType=NUMERIC},#{item.triggerConditionRemark,jdbcType=VARCHAR},
|
||||
#{item.searchValue,jdbcType=VARCHAR},#{item.createBy,jdbcType=VARCHAR},#{item.createTime},
|
||||
#{item.createBy,jdbcType=VARCHAR},#{item.createTime},
|
||||
#{item.updateBy,jdbcType=VARCHAR},#{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user