修复门诊医生站检验申请单的就诊卡号无法获取到对应的值的问题
This commit is contained in:
@@ -22,6 +22,7 @@ import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto;
|
||||
import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto;
|
||||
import com.openhis.web.doctorstation.dto.ReceptionStatisticsDto;
|
||||
import com.openhis.web.doctorstation.mapper.DoctorStationMainAppMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -32,6 +33,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 医生站-主页面 应用实现类
|
||||
*/
|
||||
//@Slf4j
|
||||
@Service
|
||||
public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppService {
|
||||
|
||||
@@ -95,6 +97,9 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
ParticipantType.REGISTRATION_DOCTOR.getCode(), ParticipantType.ADMITTER.getCode(), userId,
|
||||
currentUserOrganizationId, pricingFlag, EncounterStatus.PLANNED.getValue(),
|
||||
EncounterActivityStatus.ACTIVE.getValue(), queryWrapper);
|
||||
//日志输出就诊患者信息,patientInfo
|
||||
// log.debug("就诊患者信息: 总数={}, 记录数={}, 数据={}",
|
||||
// patientInfo.getTotal(), patientInfo.getRecords().size(), patientInfo.getRecords());
|
||||
patientInfo.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
|
||||
@@ -123,4 +123,8 @@ public class PatientInfoDto {
|
||||
* 病历号
|
||||
*/
|
||||
private String busNo;
|
||||
/**
|
||||
* 就诊卡号
|
||||
*/
|
||||
private String identifierNo;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
T10.reception_time,
|
||||
T10.practitioner_user_id,
|
||||
T10.jz_practitioner_user_id,
|
||||
T10.bus_no
|
||||
T10.bus_no,
|
||||
T10.identifier_no
|
||||
from
|
||||
(
|
||||
SELECT T1.tenant_id AS tenant_id,
|
||||
@@ -48,7 +49,8 @@
|
||||
T1.create_time AS register_time,
|
||||
T1.reception_time AS reception_time,
|
||||
T1.organization_id AS org_id,
|
||||
T8.bus_no AS bus_no
|
||||
T8.bus_no AS bus_no,
|
||||
T9.identifier_no AS identifier_no
|
||||
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'
|
||||
@@ -67,6 +69,20 @@
|
||||
LEFT JOIN adm_account AS T6 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'
|
||||
AND identifier_no IS NOT NULL
|
||||
AND identifier_no != ''
|
||||
) t
|
||||
WHERE rn = 1
|
||||
) AS T9 ON T8.id = T9.patient_id
|
||||
WHERE
|
||||
T1.delete_flag = '0'
|
||||
<!-- 当前登录账号ID 和 当前登录账号所属的科室ID 用于控制数据权限 -->
|
||||
|
||||
Reference in New Issue
Block a user