封存病案逻辑修改

master
linjj 2 years ago
parent 9f69cb040a
commit a233d5b921

@ -876,7 +876,7 @@ public class signListController {
patientIds.add(id);
collectionVo.setPatientIds(patientIds);
collectionVo.setSysCodes(flagNum);
String url="http://192.168.16.63:9295/api/NoViewCollect/generateTaskByPatientIdAndSysCodes";
String url="http://10.6.1.127:9295/api/NoViewCollect/generateTaskByPatientIdAndSysCodes";
JSONObject jsonParam= (JSONObject) JSONObject.toJSON(collectionVo);
JSONObject jsonObject = httpPost(url, jsonParam);
//查询新任务表id

@ -104,6 +104,11 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public List<Archive_Master> selectByCol(Archive_Master_Vo archiveMasterVo) {
List<Archive_Master> list=archiveMasterMapper.selectByCol(archiveMasterVo);
if(list!=null && list.size()>0) {
Emr_Dictionary dic = new Emr_Dictionary();
dic.setEffective(1);
dic.setTypecode("dept_code");
//科室列表
List<Emr_Dictionary> dicList = emrDictionaryService.dicByTypeCode(dic);
JSONArray powerUsers = powerUserService.getPowerUserList("1");
List<JSONObject> powerUserList = JSONArray.parseArray(powerUsers.toJSONString(), JSONObject.class);
if (powerUserList != null) {
@ -127,6 +132,24 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
} else {
archiveMaster.setNurseName(userInfo.getString("name"));
}
//替换科室
for (int k = 0; k < dicList.size(); k++) {
String deptName = archiveMaster.getDeptName();
//入院科室dept_admission_to
String dept2 = archiveMaster.getDeptAdmissionTo();
if ((deptName != null && deptName.equals(dicList.get(k).getCode()))) {
//出院科室
deptName = deptName.replace(deptName, dicList.get(k).getName());
archiveMaster.setDeptName(deptName);
}
if (dept2 != null && dept2.equals(dicList.get(k).getCode())) {
//入院科室
dept2 = dept2.replace(dept2, dicList.get(k).getName());
archiveMaster.setDeptAdmissionTo(dept2);
}
}
}
}
}

@ -170,20 +170,12 @@
</if>
</select>
<select id="selectByCol" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap">
select distinct m.id,m.patient_id,m.inp_no,m.cmt_doctor,m.cmt_nurse,m.visit_id,m.name,m.sex,ISNULL(f.name, m.dept_name) dept_name
select distinct m.id,m.patient_id,m.inp_no,m.cmt_doctor,m.cmt_nurse,m.visit_id,m.name,m.sex,m.dept_name
,CONVERT(varchar(10),m.discharge_date_time, 120) discharge_date_time,m.ArchiveState,CONVERT(varchar(10),m.admission_date_time, 120) admission_date_time
,ISNULL(d.name,m.dept_admission_to) dept_admission_to,m.check_doctor,m.doctor_name,m.nurse_name,m.checked_datetime,m.checked_doctor
,m.dept_admission_to,m.check_doctor,m.doctor_name,m.nurse_name,m.checked_datetime,m.checked_doctor
,m.LockInfo,m.DOCTOR_IN_CHARGE,m.ID_NO,m.DISCHARGE_DISPOSITION,m.dept_code_lend,m.isscaned,m.is_scanning,bed_number
,ISNULL(printTable.num, 0) printNum
,ISNULL(m.print_flag, 0) printNum
from archive_master m
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' ))d
on m.dept_admission_to=d.code
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where
typeCode='dept_code' )) f
on m.dept_name=f.code
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
on m.id=printTable.MasterID
where 1=1
and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%' and m.Is_Valid!=1
<if test="deptAdmissionTo!= null and deptAdmissionTo!= ''">
@ -1749,21 +1741,7 @@
from archive_master where 1=1 and ArchiveState not in('作废','已封存','取消入院') 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
-- on m.dept_name=c.code
--
-- 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
<where> 1=1 and m.master_id!='' and m.master_id is not null
<!--<if test="(overdueDaysTwo != null and overdueDaysTwo != '') ">-->
<!--and-->
<!--DATEDIFF(dd,(SELECT max(b.date)-->
<!--FROM (select top 4 date from emr_holiday_set where date >= CONVERT (-->
<!--VARCHAR (10),-->
<!--m.discharge_date_time,-->
<!--120-->
<!--) and flag= 1 order by date asc) as b), CONVERT(VARCHAR(20),f.handle_time,23)) >=#{overdueDaysTwo,jdbcType=NCHAR}-->
<!--</if>-->
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>

@ -3847,7 +3847,7 @@
var html = "";
if (index != null && index != "") {
if (index.indexOf("select") != -1) {
html = html + '<button type="button" class="btn btn-danger btn-sm selInfo" >查看</button>';// '<a href="javascript:;" class="delete">删除</a>';
html = html + '<button type="button" class="btn btn-danger btn-sm selInfo" onclick="initTable2()">查看</button>';// '<a href="javascript:;" class="delete">删除</a>';
}
if (index.indexOf("first") != -1) {

Loading…
Cancel
Save