346 患者列表:修改患者信息时,必填项“就诊卡号”数据未回填/显示为空

This commit is contained in:
2026-04-10 13:51:09 +08:00
parent 64ad5cb676
commit 09e0691feb
2 changed files with 88 additions and 73 deletions

View File

@@ -3,80 +3,90 @@
<mapper namespace="com.openhis.web.patientmanage.mapper.PatientManageMapper">
<!-- 病人信息相关查询-->
<select id="getPatientPage" resultType="com.openhis.web.patientmanage.dto.PatientBaseInfoDto">
SELECT T1.tenant_id,
T1.id,
T1.active_flag,
T1.temp_flag,
T1.name,
T1.name_json,
T1.bus_no,
T1.gender_enum,
T1.birth_date,
T1.deceased_date,
T1.marital_status_enum,
T1.prfs_enum,
T1.phone,
T1.address,
T1.address_province,
T1.address_city,
T1.address_district,
T1.address_street,
T1.address_json,
T1.nationality_code,
T1.id_card,
T1.py_str,
T1.wb_str,
T1.blood_abo,
T1.blood_rh,
T1.work_company,
T1.native_place,
T1.country_code,
T1.link_name,
T1.link_relation_code,
T1.link_telcom,
T1.link_jsons,
T1.organization_id,
T1.create_time
SELECT
pt.identifier_no,
pt.tenant_id,
pt.id,
pt.active_flag,
pt.temp_flag,
pt.name,
pt.name_json,
pt.bus_no,
pt.gender_enum,
pt.birth_date,
pt.deceased_date,
pt.marital_status_enum,
pt.prfs_enum,
pt.phone,
pt.address,
pt.address_province,
pt.address_city,
pt.address_district,
pt.address_street,
pt.address_json,
pt.nationality_code,
pt.id_card,
pt.py_str,
pt.wb_str,
pt.blood_abo,
pt.blood_rh,
pt.work_company,
pt.native_place,
pt.country_code,
pt.link_name,
pt.link_relation_code,
pt.link_telcom,
pt.link_jsons,
pt.organization_id,
pt.create_time
FROM (
SELECT pt.tenant_id,
pt.id,
pt.active_flag,
pt.temp_flag,
pt.name,
pt.name_json,
pt.bus_no,
pt.gender_enum,
pt.birth_date,
pt.deceased_date,
pt.marital_status_enum,
pt.prfs_enum,
pt.phone,
pt.address,
pt.address_province,
pt.address_city,
pt.address_district,
pt.address_street,
pt.address_json,
pt.nationality_code,
pt.id_card,
pt.py_str,
pt.wb_str,
pt.blood_abo,
pt.blood_rh,
pt.work_company,
pt.native_place,
pt.country_code,
pt.link_name,
pt.link_relation_code,
pt.link_telcom,
pt.link_jsons,
pt.organization_id,
pt.create_time
FROM adm_patient pt
where pt.delete_flag = '0'
ORDER BY pt.bus_no DESC
) AS T1
SELECT
(
SELECT api.identifier_no
FROM adm_patient_identifier api
WHERE api.tenant_id = p.tenant_id
AND api.patient_id = p.id
LIMIT 1
) AS identifier_no,
p.tenant_id,
p.id,
p.active_flag,
p.temp_flag,
p.name,
p.name_json,
p.bus_no,
p.gender_enum,
p.birth_date,
p.deceased_date,
p.marital_status_enum,
p.prfs_enum,
p.phone,
p.address,
p.address_province,
p.address_city,
p.address_district,
p.address_street,
p.address_json,
p.nationality_code,
p.id_card,
p.py_str,
p.wb_str,
p.blood_abo,
p.blood_rh,
p.work_company,
p.native_place,
p.country_code,
p.link_name,
p.link_relation_code,
p.link_telcom,
p.link_jsons,
p.organization_id,
p.create_time
FROM adm_patient p
where p.delete_flag = '0'
) AS pt
${ew.customSqlSegment}
ORDER BY pt.bus_no DESC
</select>
<select id="getPatientIdInfo" resultType="com.openhis.web.patientmanage.dto.PatientIdInfoDto">