修复了在新建患者信息时就诊卡号无法录入的问题,并且修改了前端页面添加中医诊断表单宽度过大的问题。
This commit is contained in:
@@ -45,9 +45,9 @@ public interface IPatientInformationService {
|
|||||||
/**
|
/**
|
||||||
* 添加病人信息
|
* 添加病人信息
|
||||||
*
|
*
|
||||||
* @param patientInfoDto 病人信息
|
* @param patientBaseInfoDto 病人信息
|
||||||
*/
|
*/
|
||||||
R<?> addPatient(PatientBaseInfoDto patientInfoDto);
|
R<?> addPatient(PatientBaseInfoDto patientBaseInfoDto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新患者手机号
|
* 更新患者手机号
|
||||||
|
|||||||
@@ -254,31 +254,32 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
|||||||
/**
|
/**
|
||||||
* 添加病人信息
|
* 添加病人信息
|
||||||
*
|
*
|
||||||
* @param patientInfoDto 病人信息
|
* @param patientBaseInfoDto 病人信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> addPatient(PatientBaseInfoDto patientInfoDto) {
|
public R<?> addPatient(PatientBaseInfoDto patientBaseInfoDto) {
|
||||||
|
// log.debug("添加病人信息,patientInfoDto:{}", patientBaseInfoDto);
|
||||||
// 如果患者没有输入身份证号则根据年龄自动生成
|
// 如果患者没有输入身份证号则根据年龄自动生成
|
||||||
String idCard = patientInfoDto.getIdCard();
|
String idCard = patientBaseInfoDto.getIdCard();
|
||||||
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
if (idCard == null || CommonConstants.Common.AREA_CODE.equals(idCard.substring(0, 6))) {
|
||||||
if (patientInfoDto.getAge() != null) {
|
if (patientBaseInfoDto.getAge() != null) {
|
||||||
idCard = IdCardUtil.generateIdByAge(patientInfoDto.getAge());
|
idCard = IdCardUtil.generateIdByAge(patientBaseInfoDto.getAge());
|
||||||
patientInfoDto.setIdCard(idCard);
|
patientBaseInfoDto.setIdCard(idCard);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 身份证号是否存在
|
// 身份证号是否存在
|
||||||
List<Patient> idCardList
|
List<Patient> idCardList
|
||||||
= patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientInfoDto.getIdCard()));
|
= patientService.list(new LambdaQueryWrapper<Patient>().eq(Patient::getIdCard, patientBaseInfoDto.getIdCard()));
|
||||||
if (!idCardList.isEmpty()) {
|
if (!idCardList.isEmpty()) {
|
||||||
throw new ServiceException("身份证号:" + patientInfoDto.getIdCard() + "已经存在");
|
throw new ServiceException("身份证号:" + patientBaseInfoDto.getIdCard() + "已经存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理患者信息
|
// 处理患者信息
|
||||||
Patient patient = this.handlePatientInfo(patientInfoDto);
|
Patient patient = this.handlePatientInfo(patientBaseInfoDto);
|
||||||
|
|
||||||
// 新增患者身份子表信息
|
// 新增患者身份子表信息
|
||||||
if (patientInfoDto.getPatientIdInfoList() != null) {
|
if (patientBaseInfoDto.getPatientIdInfoList() != null) {
|
||||||
List<PatientIdInfoDto> patientIdInfoList = patientInfoDto.getPatientIdInfoList();
|
List<PatientIdInfoDto> patientIdInfoList = patientBaseInfoDto.getPatientIdInfoList();
|
||||||
PatientIdentifier patientIdentifier;
|
PatientIdentifier patientIdentifier;
|
||||||
for (PatientIdInfoDto patientIdInfoDto : patientIdInfoList) {
|
for (PatientIdInfoDto patientIdInfoDto : patientIdInfoList) {
|
||||||
patientIdentifier = new PatientIdentifier();
|
patientIdentifier = new PatientIdentifier();
|
||||||
|
|||||||
@@ -38,11 +38,12 @@ public class PatientInformationController {
|
|||||||
/**
|
/**
|
||||||
* 添加病人信息
|
* 添加病人信息
|
||||||
*
|
*
|
||||||
* @param patientInfoDto 病人信息
|
* @param patientBaseInfoDto 病人信息
|
||||||
*/
|
*/
|
||||||
@PostMapping("/patient-information")
|
@PostMapping("/patient-information")
|
||||||
public R<?> addPatient(@RequestBody PatientBaseInfoDto patientInfoDto) {
|
public R<?> addPatient(@RequestBody PatientBaseInfoDto patientBaseInfoDto) {
|
||||||
return patientInformationService.addPatient(patientInfoDto);
|
// log.debug("添加病人信息,patientInfoDto:{}", patientBaseInfoDto);
|
||||||
|
return patientInformationService.addPatient(patientBaseInfoDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1201,6 +1201,7 @@ function submitForm() {
|
|||||||
form.value.patientIdInfoList = [
|
form.value.patientIdInfoList = [
|
||||||
{
|
{
|
||||||
typeCode: form.value.typeCode,
|
typeCode: form.value.typeCode,
|
||||||
|
identifierNo: form.value.identifierNo,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
if (form.value.idCard) {
|
if (form.value.idCard) {
|
||||||
@@ -1235,6 +1236,8 @@ function submitForm() {
|
|||||||
emits('submit', 'update');
|
emits('submit', 'update');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
// console.log('患者就诊卡号:', form.value.identifierNo)
|
||||||
|
// console.log('患者就诊信息:', form.value.patientIdInfoList)
|
||||||
// 新增患者
|
// 新增患者
|
||||||
addPatient(form.value).then((response) => {
|
addPatient(form.value).then((response) => {
|
||||||
proxy.$modal.msgSuccess('新增成功');
|
proxy.$modal.msgSuccess('新增成功');
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
title="添加中医诊断"
|
title="添加中医诊断"
|
||||||
v-model="props.openAddDiagnosisDialog"
|
v-model="props.openAddDiagnosisDialog"
|
||||||
width="1500px"
|
width="1300px"
|
||||||
append-to-body
|
append-to-body
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
@open="handleOpen"
|
@open="handleOpen"
|
||||||
|
|||||||
Reference in New Issue
Block a user