12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package thyyxxk.webserver.dao.his.zhuyuanyisheng;
- import org.apache.ibatis.annotations.*;
- import thyyxxk.webserver.entity.criticalValue.CriticalValue;
- import thyyxxk.webserver.entity.criticalValue.SimpleEmployee;
- import thyyxxk.webserver.entity.dictionary.CodeName;
- import java.util.List;
- import java.util.Map;
- public interface PatientCriticalValuesDao {
- @Insert("insert into t_critical_message (pat_no,msg_id,msg_type,source_code,source_name," +
- "target_dept_code,target_dept_name,content,create_time,patient_type,inspection_type) " +
- "values (#{patNo},#{msgId},#{msgType},#{sourceCode},#{sourceName},#{targetDeptCode}," +
- "#{targetDeptName},#{content},#{createTime},#{patientType},#{inspectionType})")
- @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
- void insertCriticalValue(CriticalValue criticalValue);
- @Select("select isnull(zk_ward,small_dept) zkWard,refer_physician,consult_physician,dept_director " +
- "from zy_actpatient WITH(NOLOCK) where inpatient_no=#{inpatientNo}")
- Map<String,String> selectZkWardByInpatientNo(String inpatientNo);
- @Select("select rtrim(code) as code, rtrim(code_rs) as codeRs from a_employee_mi " +
- "where dept_code=#{dept} and isnull(del_flag,'0')!='1'")
- List<SimpleEmployee> selectEmployeesByDept(String dept);
- @Select("<script>" +
- "select rtrim(code) as code,rtrim(code_rs) as codeRs from a_employee_mi " +
- "where code in " +
- "<foreach collection='codeList' item='code' index='index' open='(' close=')' separator=','>" +
- "#{code}" +
- "</foreach>" +
- "</script>")
- List<SimpleEmployee> selectEmployeesByCodeList(List<String> codeList);
- @Select("select rtrim(dept) as dept from zd_dept_all where small_dept=#{dept}")
- List<String> selectWardListBySmallDept(String dept);
- @Update("update t_critical_message set state='BEEN_SENT',send_time=getdate() where id=#{id}")
- void updateSentState(int id);
- @Select("select code,name from zd_unit_code where code=" +
- "(select isnull(ward,admiss_ward) from zy_actpatient where inpatient_no=#{patNo})")
- CodeName selectTargetDept(String patNo);
- @Select("select code,name from zd_unit_code where code=#{code}")
- CodeName selectTargetDeptByCode(String code);
- @Select("select top 1 code,name from zd_unit_code where name=#{name}")
- CodeName selectTargetDeptByName(String name);
- }
|