diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index d1b37ccc..a7f0e0a3 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -1429,7 +1429,8 @@ from Archive_Master_Following where 1=1 and following_type='5') as t1 where 1=1 and RowNum = 1 ) f LEFT JOIN ( - select id master_id,patient_id,inp_no,visit_id,name,dept_name,convert(varchar,discharge_date_time,120) discharge_date_time,check_doctor,first_instance,DOCTOR_IN_CHARGE,death_flag,dept_admission_to,convert(varchar,admission_date_time,120) admission_date_time from archive_master where archiveState!='作废' + select id master_id,patient_id,inp_no,visit_id,name,dept_name,convert(varchar,discharge_date_time,120) discharge_date_time,check_doctor,first_instance,DOCTOR_IN_CHARGE,death_flag,dept_admission_to,convert(varchar,admission_date_time,120) admission_date_time + from archive_master where 1=1 and ArchiveState!='作废' and ArchiveState!='已封存' and Is_Valid!=1 ) m on f.master_id=m.master_id LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) c @@ -1437,7 +1438,7 @@ LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) e on m.dept_admission_to=e.code - 1=1 and m.master_id!='' + 1=1 and m.master_id!='' and m.master_id is not null and ISNULL(dbo.f_WorkDay(DATEADD(DAY,1,CONVERT(VARCHAR(10),m.discharge_date_time,23)),f.handle_time) , 0)-#{overdueDays,jdbcType=NCHAR}>=#{overdueDaysTwo,jdbcType=NCHAR} @@ -1519,7 +1520,8 @@ )f2 on f1.master_id=f2.master_id and f1.rowNumb=f2.rowNumb-1 LEFT JOIN ( - select id master_id,patient_id,inp_no,visit_id,name,dept_name,convert(varchar,discharge_date_time,120) discharge_date_time,check_doctor,first_instance,DOCTOR_IN_CHARGE,death_flag,dept_admission_to,convert(varchar,admission_date_time,120) admission_date_time from archive_master where archiveState!='作废' + select id master_id,patient_id,inp_no,visit_id,name,dept_name,convert(varchar,discharge_date_time,120) discharge_date_time,check_doctor,first_instance,DOCTOR_IN_CHARGE,death_flag,dept_admission_to,convert(varchar,admission_date_time,120) admission_date_time + from archive_master where 1=1 and ArchiveState!='作废' and ArchiveState!='已封存' and Is_Valid!=1 ) m on f1.master_id=m.master_id LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) c @@ -1527,7 +1529,7 @@ LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) e on m.dept_admission_to=e.code - 1=1 + 1=1 and m.master_id!='' and m.master_id is not null and ISNULL(dbo.f_WorkDay(DATEADD(DAY,1,CONVERT(VARCHAR(10),f1.handle_time,23)),CONVERT(VARCHAR(10),f2.handle_time,23)) , 0)-#{overdueDays,jdbcType=NCHAR}>=#{overdueDaysTwo,jdbcType=NCHAR} @@ -1699,7 +1701,7 @@ select m.id ,m.inp_no,m.visit_id,m.name,ISNULL(f.name, m.dept_name) dept_name,CONVERT(VARCHAR(20),m.discharge_date_time,120) discharge_date_time,m.ArchiveState,m.sex,m.ID_NO, ISNULL(c.name, m.dept_admission_to) dept_admission_to ,CONVERT(VARCHAR(20),m.admission_date_time,120) admission_date_time,m.DISCHARGE_DISPOSITION,d.handle_time,d.handle_name,d.following_type - from(select * from Archive_Master where ArchiveState!='作废' and Is_Valid!=1) m + from(select * from Archive_Master where ArchiveState!='作废' and Is_Valid!=1 ) m LEFT JOIN( select master_id ,handle_time ,handle_name,following_type from ( select ROW_NUMBER() over(partition by master_id order by handle_time desc) RowNum diff --git a/src/main/resources/mapper/Emr_Fault_DetailMapper.xml b/src/main/resources/mapper/Emr_Fault_DetailMapper.xml index c0af1ee5..d6566338 100644 --- a/src/main/resources/mapper/Emr_Fault_DetailMapper.xml +++ b/src/main/resources/mapper/Emr_Fault_DetailMapper.xml @@ -761,7 +761,7 @@ on a.master_id=m.id LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) d on m.dept_name=d.code - 1=1 + 1=1 and m.ArchiveState!='作废' and m.Is_Valid!=1 and m.ArchiveState!='已封存' and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%' diff --git a/src/main/resources/mapper/Emr_LogMapper.xml b/src/main/resources/mapper/Emr_LogMapper.xml index 2099159c..d848e9e9 100644 --- a/src/main/resources/mapper/Emr_LogMapper.xml +++ b/src/main/resources/mapper/Emr_LogMapper.xml @@ -171,7 +171,7 @@ < ess.create_time and archive_detail_id= ess.archive_detail_id ) and ess.state in('已召回') ) f on l.log_title=f.archive_detail_id - where 1=1 + where 1=1 and m.ArchiveState!='作废' and m.Is_Valid!=1 and m.ArchiveState!='已封存' and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%' diff --git a/src/main/webapp/WEB-INF/views/medicalRecallDateDir/recallDateList.jsp b/src/main/webapp/WEB-INF/views/medicalRecallDateDir/recallDateList.jsp index deb4db82..34c1b822 100644 --- a/src/main/webapp/WEB-INF/views/medicalRecallDateDir/recallDateList.jsp +++ b/src/main/webapp/WEB-INF/views/medicalRecallDateDir/recallDateList.jsp @@ -434,6 +434,8 @@ a = '' + value + ''; } else if (value == "主任退回") { a = '' + value + ''; + }else{ + a = '' + value + ''; } return a; }