提交merge1.3
This commit is contained in:
@@ -35,11 +35,7 @@ import com.openhis.web.inhospitalcharge.appservice.IInHospitalRegisterAppService
|
||||
import com.openhis.web.inhospitalcharge.dto.*;
|
||||
import com.openhis.web.inhospitalcharge.mapper.InHospitalRegisterAppMapper;
|
||||
import com.openhis.web.patientmanage.appservice.IPatientInformationService;
|
||||
<<<<<<< HEAD
|
||||
import com.openhis.web.patientmanage.dto.PatientInformationDto;
|
||||
=======
|
||||
import com.openhis.web.patientmanage.dto.PatientBaseInfoDto;
|
||||
>>>>>>> v1.3
|
||||
import com.openhis.yb.service.YbManager;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -160,7 +156,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
iEncounterLocationService.save(zYEncounterLocation);
|
||||
}
|
||||
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"住院申请"}));
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"住院申请"}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,16 +172,16 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
*/
|
||||
@Override
|
||||
public IPage<InHospitalRegisterQueryDto> getRegisterInfo(InHospitalRegisterQueryDto inHospitalRegisterQueryDto,
|
||||
String searchKey, String registeredFlag, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
String searchKey, String registeredFlag, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
Integer encounterStatus = EncounterZyStatus.TO_BE_REGISTERED.getValue(); // 待登记
|
||||
// 构建查询条件
|
||||
QueryWrapper<InHospitalRegisterQueryDto> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey,
|
||||
new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name")), request);
|
||||
QueryWrapper<InHospitalRegisterQueryDto> queryWrapper
|
||||
= HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey,
|
||||
new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name")), request);
|
||||
|
||||
IPage<InHospitalRegisterQueryDto> inHospitalRegisterInfo = inHospitalRegisterAppMapper
|
||||
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
||||
registeredFlag, LocationForm.WARD.getValue(), queryWrapper);
|
||||
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
||||
registeredFlag, LocationForm.WARD.getValue(), queryWrapper);
|
||||
inHospitalRegisterInfo.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
@@ -207,13 +203,13 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
InHospitalPatientInfoDto patientInfo = inHospitalRegisterAppMapper.getPatientInfo(patientId);
|
||||
// 性别
|
||||
patientInfo
|
||||
.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, patientInfo.getGenderEnum()));
|
||||
.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, patientInfo.getGenderEnum()));
|
||||
// 计算年龄
|
||||
patientInfo
|
||||
.setAge(patientInfo.getBirthDate() != null ? AgeCalculatorUtil.getAge(patientInfo.getBirthDate()) : "");
|
||||
.setAge(patientInfo.getBirthDate() != null ? AgeCalculatorUtil.getAge(patientInfo.getBirthDate()) : "");
|
||||
// 婚姻状态
|
||||
patientInfo.setMaritalStatusEnum_enumText(
|
||||
EnumUtils.getInfoByValue(MaritalStatus.class, patientInfo.getMaritalStatusEnum()));
|
||||
EnumUtils.getInfoByValue(MaritalStatus.class, patientInfo.getMaritalStatusEnum()));
|
||||
// 职业
|
||||
patientInfo.setPrfsEnum_enumText(EnumUtils.getInfoByValue(OccupationType.class, patientInfo.getPrfsEnum()));
|
||||
return patientInfo;
|
||||
@@ -228,20 +224,20 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
@Override
|
||||
public InHospitalInfoDto getInHospitalInfo(Long encounterId) {
|
||||
InHospitalInfoDto inHospitalInfo = inHospitalRegisterAppMapper.getInHospitalInfo(encounterId,
|
||||
LocationForm.WARD.getValue(), Whether.YES.getValue(), ParticipantType.ADMITTER.getCode(),
|
||||
PublicationStatus.ACTIVE.getValue(), AccountType.PERSONAL_CASH_ACCOUNT.getCode());
|
||||
LocationForm.WARD.getValue(), Whether.YES.getValue(), ParticipantType.ADMITTER.getCode(),
|
||||
PublicationStatus.ACTIVE.getValue(), AccountType.PERSONAL_CASH_ACCOUNT.getCode());
|
||||
// 优先级(患者病情)
|
||||
inHospitalInfo
|
||||
.setPriorityEnum_enumText(EnumUtils.getInfoByValue(PriorityLevel.class, inHospitalInfo.getPriorityEnum()));
|
||||
.setPriorityEnum_enumText(EnumUtils.getInfoByValue(PriorityLevel.class, inHospitalInfo.getPriorityEnum()));
|
||||
// 病区号
|
||||
String wardBusNo = inHospitalInfo.getWardBusNo();
|
||||
if (!StringUtils.isEmpty(wardBusNo)) {
|
||||
// 计算床位数
|
||||
Integer totalBedsNum = inHospitalRegisterAppMapper.getTotalBedsNum(LocationForm.BED.getValue(),
|
||||
LocationStatus.INACTIVE.getValue(), wardBusNo);
|
||||
LocationStatus.INACTIVE.getValue(), wardBusNo);
|
||||
inHospitalInfo.setTotalBedsNum(totalBedsNum); // 当前病区总床位数
|
||||
Integer idleBedsNum = inHospitalRegisterAppMapper.getIdleBedsNum(LocationForm.BED.getValue(),
|
||||
LocationStatus.IDLE.getValue(), wardBusNo);
|
||||
LocationStatus.IDLE.getValue(), wardBusNo);
|
||||
inHospitalInfo.setIdleBedsNum(idleBedsNum); // 当前病区空闲床位数
|
||||
}
|
||||
return inHospitalInfo;
|
||||
@@ -258,10 +254,10 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
HashMap<String, Integer> resMap = new HashMap<>();
|
||||
// 当前病区总床位数
|
||||
Integer totalBedsNum = inHospitalRegisterAppMapper.getTotalBedsNum(LocationForm.BED.getValue(),
|
||||
LocationStatus.INACTIVE.getValue(), wardBusNo);
|
||||
LocationStatus.INACTIVE.getValue(), wardBusNo);
|
||||
// // 当前病区空闲床位数
|
||||
Integer idleBedsNum = inHospitalRegisterAppMapper.getIdleBedsNum(LocationForm.BED.getValue(),
|
||||
LocationStatus.IDLE.getValue(), wardBusNo);
|
||||
LocationStatus.IDLE.getValue(), wardBusNo);
|
||||
resMap.put("totalBedsNum", totalBedsNum);
|
||||
resMap.put("idleBedsNum", idleBedsNum);
|
||||
return resMap;
|
||||
@@ -286,7 +282,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
patient.setIdCard(patientUpdateDto.getIdCard()); // 身份证号
|
||||
|
||||
iPatientService.saveOrUpdate(patient);
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"患者信息"}));
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"患者信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -298,7 +294,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
@Override
|
||||
public R<?> registerByCashier(InHospitalInfoDto inHospitalInfoDto) {
|
||||
this.handleRegister(inHospitalInfoDto, null); // 处理入院登记信息
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"住院登记"}));
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"住院登记"}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -314,7 +310,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
// 新增患者
|
||||
R<?> r = patientInformationService.addPatient(patientInformation);
|
||||
if (r.getCode() == 200) {
|
||||
Patient patient = (Patient)r.getData();
|
||||
Patient patient = (Patient) r.getData();
|
||||
// 住院信息
|
||||
InHospitalInfoDto inHospitalInfoDto = noFilesRegisterDto.getInHospitalInfo();
|
||||
this.handleRegister(inHospitalInfoDto, patient); // 处理入院登记信息
|
||||
@@ -322,7 +318,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||
}
|
||||
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"无档登记"}));
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"无档登记"}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -355,7 +351,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
@Override
|
||||
public List<LocationDto> getWardList(Long orgId) {
|
||||
List<Location> wardList = inHospitalRegisterAppMapper.selectWardList(orgId, LocationForm.WARD.getValue(),
|
||||
LocationStatus.ACTIVE.getValue());
|
||||
LocationStatus.ACTIVE.getValue());
|
||||
|
||||
// 2. 转换为 LocationDto(逻辑与原代码完全一致)
|
||||
List<LocationDto> locationDtoList = new ArrayList<>();
|
||||
@@ -399,8 +395,8 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
|
||||
// 先查询当前就诊是否已经分配了病区
|
||||
EncounterLocation encounterLocation = iEncounterLocationService.getOne(
|
||||
new LambdaQueryWrapper<EncounterLocation>().eq(EncounterLocation::getEncounterId, encounterReg.getId())
|
||||
.eq(EncounterLocation::getFormEnum, LocationForm.WARD.getValue()));
|
||||
new LambdaQueryWrapper<EncounterLocation>().eq(EncounterLocation::getEncounterId, encounterReg.getId())
|
||||
.eq(EncounterLocation::getFormEnum, LocationForm.WARD.getValue()));
|
||||
// 处理病区信息
|
||||
EncounterLocation encounterLocationReg = new EncounterLocation();
|
||||
if (encounterLocation != null) {
|
||||
@@ -419,7 +415,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
Account accountPersonalCash = new Account();
|
||||
accountPersonalCash.setTypeCode(AccountType.PERSONAL_CASH_ACCOUNT.getCode()); // 账户类型
|
||||
accountPersonalCash.setPatientId(
|
||||
inHospitalInfoDto.getPatientId() != null ? inHospitalInfoDto.getPatientId() : patient.getId()); // 患者id
|
||||
inHospitalInfoDto.getPatientId() != null ? inHospitalInfoDto.getPatientId() : patient.getId()); // 患者id
|
||||
accountPersonalCash.setEncounterId(encounterReg.getId()); // 住院就诊id
|
||||
accountPersonalCash.setBalanceAmount(inHospitalInfoDto.getBalanceAmount()); // 账户余额
|
||||
// 自费
|
||||
@@ -430,7 +426,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
Account accountNoSelfFunded = new Account();
|
||||
accountNoSelfFunded.setTypeCode(inHospitalInfoDto.getTypeCoce()); // 账户类型
|
||||
accountNoSelfFunded.setPatientId(
|
||||
inHospitalInfoDto.getPatientId() != null ? inHospitalInfoDto.getPatientId() : patient.getId()); // 患者id
|
||||
inHospitalInfoDto.getPatientId() != null ? inHospitalInfoDto.getPatientId() : patient.getId()); // 患者id
|
||||
accountNoSelfFunded.setEncounterId(encounterReg.getId()); // 住院就诊id
|
||||
accountNoSelfFunded.setContractNo(contractNo); // 合同编码
|
||||
accountNoSelfFunded.setEncounterFlag(Whether.YES.getValue());
|
||||
|
||||
Reference in New Issue
Block a user