Merge branch 'develop' of https://gitea.gentronhealth.com/Yajentine/his into develop

This commit is contained in:
ljj
2026-01-09 13:28:45 +08:00
15 changed files with 257 additions and 876 deletions

View File

@@ -8,7 +8,6 @@ import com.openhis.web.chargemanage.dto.CurrentDayEncounterDto;
import com.openhis.web.chargemanage.dto.OrgMetadata;
import com.openhis.web.chargemanage.dto.PatientMetadata;
import com.openhis.web.chargemanage.dto.PractitionerMetadata;
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
import com.openhis.web.paymentmanage.dto.CancelRegPaymentDto;
import javax.servlet.http.HttpServletRequest;
@@ -86,12 +85,4 @@ public interface IOutpatientRegistrationAppService {
*/
R<?> cancelRegister(Long encounterId);
/**
* 补打挂号
*
* @param reprintRegistrationDto 补打挂号信息
* @return 结果
*/
R<?> reprintRegistration(ReprintRegistrationDto reprintRegistrationDto);
}

View File

@@ -27,7 +27,6 @@ import com.openhis.web.chargemanage.dto.CurrentDayEncounterDto;
import com.openhis.web.chargemanage.dto.OrgMetadata;
import com.openhis.web.chargemanage.dto.PatientMetadata;
import com.openhis.web.chargemanage.dto.PractitionerMetadata;
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
import com.openhis.web.chargemanage.mapper.OutpatientRegistrationAppMapper;
import com.openhis.web.paymentmanage.appservice.IPaymentRecService;
import com.openhis.web.paymentmanage.dto.CancelPaymentDto;
@@ -284,7 +283,7 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
HttpServletRequest request) {
// 构建查询条件
QueryWrapper<CurrentDayEncounterDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name", "identifier_no")),
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
request);
// 手动处理 statusEnum 参数(用于过滤退号记录)
@@ -331,18 +330,4 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
return R.ok("已取消挂号");
}
/**
* 补打挂号
* 补打挂号不需要修改数据库,只需要返回成功即可,前端已有所有需要的数据用于打印
*
* @param reprintRegistrationDto 补打挂号信息
* @return 结果
*/
@Override
public R<?> reprintRegistration(ReprintRegistrationDto reprintRegistrationDto) {
// 补打挂号只是重新打印,不需要修改数据库
// 可以在这里添加日志记录补打操作
return R.ok(null, "补打挂号成功");
}
}

View File

@@ -8,7 +8,6 @@ import com.openhis.common.enums.PriorityLevel;
import com.openhis.financial.domain.PaymentReconciliation;
import com.openhis.web.chargemanage.appservice.IOutpatientRegistrationAppService;
import com.openhis.web.chargemanage.dto.OutpatientRegistrationInitDto;
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
import com.openhis.web.paymentmanage.appservice.IEleInvoiceService;
import com.openhis.web.paymentmanage.dto.CancelRegPaymentDto;
import lombok.AllArgsConstructor;
@@ -152,15 +151,4 @@ public class OutpatientRegistrationController {
return R.ok(iOutpatientRegistrationAppService.getCurrentDayEncounter(searchKey, pageNo, pageSize, request));
}
/**
* 补打挂号
*
* @param reprintRegistrationDto 补打挂号信息
* @return 结果
*/
@PostMapping(value = "/reprint")
public R<?> reprintRegistration(@RequestBody ReprintRegistrationDto reprintRegistrationDto) {
return iOutpatientRegistrationAppService.reprintRegistration(reprintRegistrationDto);
}
}

View File

@@ -136,9 +136,4 @@ public class CurrentDayEncounterDto {
*/
private String phone;
/**
* 就诊卡号
*/
private String identifierNo;
}

View File

@@ -45,9 +45,9 @@ public interface IPatientInformationService {
/**
* 添加病人信息
*
* @param patientInfoDto 病人信息
* @param patientBaseInfoDto 病人信息
*/
R<?> addPatient(PatientBaseInfoDto patientInfoDto);
R<?> addPatient(PatientBaseInfoDto patientBaseInfoDto);
/**
* 更新患者手机号

View File

@@ -254,31 +254,32 @@ public class PatientInformationServiceImpl implements IPatientInformationService
/**
* 添加病人信息
*
* @param patientInfoDto 病人信息
* @param patientBaseInfoDto 病人信息
*/
@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 (patientInfoDto.getAge() != null) {
idCard = IdCardUtil.generateIdByAge(patientInfoDto.getAge());
patientInfoDto.setIdCard(idCard);
if (patientBaseInfoDto.getAge() != null) {
idCard = IdCardUtil.generateIdByAge(patientBaseInfoDto.getAge());
patientBaseInfoDto.setIdCard(idCard);
}
}
// 身份证号是否存在
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()) {
throw new ServiceException("身份证号:" + patientInfoDto.getIdCard() + "已经存在");
throw new ServiceException("身份证号:" + patientBaseInfoDto.getIdCard() + "已经存在");
}
// 处理患者信息
Patient patient = this.handlePatientInfo(patientInfoDto);
Patient patient = this.handlePatientInfo(patientBaseInfoDto);
// 新增患者身份子表信息
if (patientInfoDto.getPatientIdInfoList() != null) {
List<PatientIdInfoDto> patientIdInfoList = patientInfoDto.getPatientIdInfoList();
if (patientBaseInfoDto.getPatientIdInfoList() != null) {
List<PatientIdInfoDto> patientIdInfoList = patientBaseInfoDto.getPatientIdInfoList();
PatientIdentifier patientIdentifier;
for (PatientIdInfoDto patientIdInfoDto : patientIdInfoList) {
patientIdentifier = new PatientIdentifier();

View File

@@ -38,11 +38,12 @@ public class PatientInformationController {
/**
* 添加病人信息
*
* @param patientInfoDto 病人信息
* @param patientBaseInfoDto 病人信息
*/
@PostMapping("/patient-information")
public R<?> addPatient(@RequestBody PatientBaseInfoDto patientInfoDto) {
return patientInformationService.addPatient(patientInfoDto);
public R<?> addPatient(@RequestBody PatientBaseInfoDto patientBaseInfoDto) {
// log.debug("添加病人信息,patientInfoDto:{}", patientBaseInfoDto);
return patientInformationService.addPatient(patientBaseInfoDto);
}
/**

View File

@@ -65,8 +65,7 @@
T9.charge_item_ids,
T9.payment_id,
T9.picture_url,
T9.birth_date,
T9.identifier_no
T9.birth_date
from (
SELECT T1.tenant_id AS tenant_id,
T1.id AS encounter_id,
@@ -89,8 +88,7 @@
T13.charge_item_ids,
T13.id AS payment_id,
ai.picture_url AS picture_url,
T8.birth_date AS birth_date,
T18.identifier_no AS identifier_no
T8.birth_date AS birth_date
FROM adm_encounter AS T1
LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0'
LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0'
@@ -120,18 +118,6 @@
ON T1.ID = T6.encounter_id AND T6.delete_flag = '0' AND T6.encounter_flag = '1'
LEFT JOIN fin_contract AS T7 ON T6.contract_no = T7.bus_no AND T7.delete_flag = '0'
LEFT JOIN adm_patient AS T8 ON T1.patient_id = T8.ID AND T8.delete_flag = '0'
LEFT JOIN (
SELECT patient_id,
identifier_no
FROM (
SELECT patient_id,
identifier_no,
ROW_NUMBER() OVER (PARTITION BY patient_id ORDER BY create_time ASC) AS rn
FROM adm_patient_identifier
WHERE delete_flag = '0'
) t
WHERE rn = 1
) AS T18 ON T8.id = T18.patient_id
LEFT JOIN adm_charge_item AS T10 ON T1.id = T10.encounter_id AND T10.delete_flag = '0'
LEFT JOIN adm_account AS T11 ON T10.account_id = T11.id AND T11.delete_flag = '0'
LEFT JOIN adm_practitioner AS T12 ON T12.ID = T10.enterer_id AND T12.delete_flag = '0'