|
@@ -19,7 +19,7 @@ import java.util.Map;
|
|
|
@Mapper
|
|
|
public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
@Select("select count(1) from zy_actpatient where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- int selectActCount(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ int selectActCount(String bah, int times);
|
|
|
|
|
|
@Select("select bedNo=rtrim(bed_no),bah=rtrim(inpatient_no),times=rtrim(admiss_times),name=rtrim(name),sex," +
|
|
|
"file_status,doctorCode=rtrim(refer_physician)," +
|
|
@@ -27,7 +27,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"admiss_date from zy_actpatient with(nolock) where charindex('$',inpatient_no)=0 and " +
|
|
|
"(small_dept=#{ward} or ward=#{ward} or zk_ward=#{ward} or zk_dept=#{ward}) " +
|
|
|
"ORDER BY cast(bed_no AS int)")
|
|
|
- List<SheetOverview> getPatientOverview(@Param("ward") String ward);
|
|
|
+ List<SheetOverview> getPatientOverview(String ward);
|
|
|
|
|
|
@Select("select bedNo=rtrim(bed_no),bah=rtrim(inpatient_no),times=rtrim(admiss_times),name=rtrim(name),sex," +
|
|
|
"file_status,doctorCode=rtrim(refer_physician)," +
|
|
@@ -45,19 +45,18 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"unitName=rtrim(employer_name),unitPlace=rtrim(employer_street),unitPhone=rtrim(employer_tel), " +
|
|
|
"unitZipCode=rtrim(employer_zipcode),contactName=rtrim(relation_name),contactRelation=rtrim(relation_code), " +
|
|
|
"contactPhone=(rtrim(relation_tel)) from a_patient_mi with(nolock) where inpatient_no=#{bah}")
|
|
|
- CaseFrontsheetMain getAPatientMi(@Param("bah") String bah);
|
|
|
+ CaseFrontsheetMain getAPatientMi(String bah);
|
|
|
|
|
|
@Select("select top 1 serial_no from t_injury_si_pat_info with(nolock) where pat_no=#{patNo} and times=#{times} order by ledger_sn desc")
|
|
|
- String selectInjurySerialNo(@Param("patNo") String patNo,
|
|
|
- @Param("times") Integer times);
|
|
|
+ String selectInjurySerialNo(String patNo, int times);
|
|
|
|
|
|
@Select("select [dbo].[judge_infant](#{bah}, #{times})")
|
|
|
- int getInfant(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ int getInfant(String bah, int times);
|
|
|
|
|
|
@Select("select max(start_time) from ${table} with(nolock) where inpatient_no=#{bah} " +
|
|
|
"and admiss_times=#{times} and status_flag > '1' and isnull (group_no,'00')='00' " +
|
|
|
"and order_code in ('06025','06026','06027','06053','05973')")
|
|
|
- Date getDismissDateFromYzActOrder(@Param("table") String table, @Param("bah") String bah, @Param("times") int times);
|
|
|
+ Date getDismissDateFromYzActOrder(String table, String bah, int times);
|
|
|
|
|
|
@Select("select " +
|
|
|
"admissTimes=#{times}, " +
|
|
@@ -94,8 +93,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"lendFlag=isnull(lend_flag, 0), " +
|
|
|
"fileStatus=isnull(file_status, 0) " +
|
|
|
"from ${table} with(nolock) where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- CaseFrontsheetMain getZyActPatient(@Param("table") String table, @Param("yzTable") String yzTable,
|
|
|
- @Param("bah") String bah, @Param("times") int times);
|
|
|
+ CaseFrontsheetMain getZyActPatient(String table, String yzTable, String bah, int times);
|
|
|
|
|
|
|
|
|
@Select("select payMethod=rtrim(pay_method),ageDays=rtrim(age_days),newBornWeight=rtrim(new_born_weight)," +
|
|
@@ -103,7 +101,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"nativePlaceName=(select rtrim(name) from zd_district_code with(nolock) where code=jg)," +
|
|
|
"hkPlace=rtrim(hkdz),hkPlaceName=rtrim(hkdz2),contactAddr=rtrim(lxdz),contactAddrName=rtrim(lxdz2)," +
|
|
|
"hkZipCode=rtrim(hkyb) from batj_ba1 with(nolock) where bah=#{bah} and zycs=#{times}")
|
|
|
- CaseFrontsheetMain getBatjBa1(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ CaseFrontsheetMain getBatjBa1(String bah, int times);
|
|
|
|
|
|
@Select("select " +
|
|
|
"blh=rtrim(a.blzd_qph)," +
|
|
@@ -169,7 +167,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"from batj_ba2 a with(nolock), zy_actpatient b with(nolock) where " +
|
|
|
"b.inpatient_no=a.bah and " +
|
|
|
"a.bah=#{bah} and a.zycs=#{times}")
|
|
|
- CaseFrontsheetMain getBatjBa2ForInPatient(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ CaseFrontsheetMain getBatjBa2ForInPatient(String bah, int times);
|
|
|
|
|
|
@Select("select " +
|
|
|
"lateFlag=(select late_flag from t_case_frontsheet_main t where t.bah=#{bah} and t.admiss_times=#{times}), " +
|
|
@@ -238,7 +236,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"from batj_ba2 a with(nolock), zy_inactpatient b with(nolock) where " +
|
|
|
"b.inpatient_no=a.bah and b.admiss_times=a.zycs and " +
|
|
|
"a.bah=#{bah} and a.zycs=#{times}")
|
|
|
- CaseFrontsheetMain getBatjBa2ForOutPatient(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ CaseFrontsheetMain getBatjBa2ForOutPatient(String bah, int times);
|
|
|
|
|
|
@Select("select c.sheet_column as code,sum(a.charge_fee) as name " +
|
|
|
"from zy_detail_charge a,zd_charge_item b,zd_charge_ba_class c " +
|
|
@@ -259,10 +257,10 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"code=rtrim(dis_diag), admissStatus=rtrim(admiss_status), " +
|
|
|
"dismissStatus=rtrim(dis_diag_status) from ba_first_page1 with(nolock) " +
|
|
|
"where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- List<CaseFrontsheetDisdiag> getDisdiags(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ List<CaseFrontsheetDisdiag> getDisdiags(String bah, int times);
|
|
|
|
|
|
@Select("select rtrim(code) as code,rtrim(name) as name from zd_icd_code_new where code=#{code}")
|
|
|
- CaseFrontsheetDisdiag selectDiagInfoByCode(@Param("code") String code);
|
|
|
+ CaseFrontsheetDisdiag selectDiagInfoByCode(String code);
|
|
|
|
|
|
@Select("select no=rtrim(ssxh),name=rtrim(ssmc),date=ssrq, " +
|
|
|
"op_end_date,anst_start_date,anst_end_date,anaesthesiaor=rtrim(mzys), " +
|
|
@@ -274,10 +272,10 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"cut=rtrim(qkjb),heal=rtrim(yhqk),anaesthesia=rtrim(mzff)," +
|
|
|
"anaesthesiaorName=(select rtrim(name) from a_employee_mi with(nolock) where code=mzys) " +
|
|
|
"from batj_ba4 with(nolock) where bah=#{bah} and zycs=#{times}")
|
|
|
- List<CaseFrontsheetSurgery> getSurgeries(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ List<CaseFrontsheetSurgery> getSurgeries(String bah, int times);
|
|
|
|
|
|
@Select("select top 1 rtrim(yb_code) as code,rtrim(yb_name) as name from zd_icd9_cm3 where code=#{code}")
|
|
|
- CaseFrontsheetSurgery selectSurgeryByCode(@Param("code") String code);
|
|
|
+ CaseFrontsheetSurgery selectSurgeryByCode(String code);
|
|
|
|
|
|
@Update("update a_patient_mi set name=#{name}, " +
|
|
|
"sex=#{sex}, " +
|
|
@@ -307,57 +305,45 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
|
|
|
@Update("update a_patient_mi set province_code=#{province},city_code=#{city},district_code=#{district} " +
|
|
|
"where inpatient_no=#{bah}")
|
|
|
- void updateAddressCascader(@Param("bah") String bah,
|
|
|
- @Param("province") Integer province,
|
|
|
- @Param("city") Integer city,
|
|
|
- @Param("district") Integer district);
|
|
|
+ void updateAddressCascader(String bah, Integer province, Integer city, Integer district);
|
|
|
|
|
|
@Update("update zy_actpatient set autopsy_mark=#{autopsy},clinic_diag_str=#{clinicDiagStr}, " +
|
|
|
"diagnose_conform1=#{dc1},diagnose_conform2=#{dc2},diagnose_conform3=#{dc3}," +
|
|
|
"diagnose_conform4=#{dc4}, diagnose_conform5=#{dc5}, operation=#{hasSurgery}," +
|
|
|
"pathology_diag_comment=#{pathologicDiagStr},pathology_diag=#{pathologicDiagCode}, " +
|
|
|
"clinic_diag=#{clinicDiagCode} where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- void updateZyActPatient(@Param("bah") String bah, @Param("times") int times,
|
|
|
- @Param("autopsy") String autopsy,
|
|
|
- @Param("dc1") String dc1, @Param("dc2") String dc2,
|
|
|
- @Param("dc3") String dc3, @Param("dc4") String dc4,
|
|
|
- @Param("dc5") String dc5, @Param("hasSurgery") String hasSurgery,
|
|
|
- @Param("pathologicDiagStr") String pathologicDiagStr,
|
|
|
- @Param("pathologicDiagCode") String pathologicDiagCode,
|
|
|
- @Param("clinicDiagCode") String clinicDiagCode,
|
|
|
- @Param("clinicDiagStr") String clinicDiagStr);
|
|
|
+ void updateZyActPatient(String bah, int times, String autopsy, String dc1, String dc2,
|
|
|
+ String dc3, String dc4, String dc5, String hasSurgery,
|
|
|
+ String pathologicDiagStr, String pathologicDiagCode,
|
|
|
+ String clinicDiagCode, String clinicDiagStr);
|
|
|
|
|
|
@Update("update zy_inactpatient set autopsy_mark=#{autopsy},clinic_diag_str=#{clinicDiagStr}, " +
|
|
|
"diagnose_conform1=#{dc1},diagnose_conform2=#{dc2},diagnose_conform3=#{dc3}," +
|
|
|
"diagnose_conform4=#{dc4}, diagnose_conform5=#{dc5}, operation=#{hasSurgery}," +
|
|
|
"pathology_diag_comment=#{pathologicDiagStr},pathology_diag=#{pathologicDiagCode}, " +
|
|
|
"clinic_diag=#{clinicDiagCode} where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- void updateZyInActPatient(@Param("bah") String bah, @Param("times") int times,
|
|
|
- @Param("autopsy") String autopsy,
|
|
|
- @Param("dc1") String dc1, @Param("dc2") String dc2,
|
|
|
- @Param("dc3") String dc3, @Param("dc4") String dc4,
|
|
|
- @Param("dc5") String dc5, @Param("hasSurgery") String hasSurgery,
|
|
|
- @Param("pathologicDiagStr") String pathologicDiagStr,
|
|
|
- @Param("pathologicDiagCode") String pathologicDiagCode,
|
|
|
- @Param("clinicDiagCode") String clinicDiagCode,
|
|
|
- @Param("clinicDiagStr") String clinicDiagStr);
|
|
|
+ void updateZyInActPatient(String bah, int times, String autopsy, String dc1, String dc2,
|
|
|
+ String dc3, String dc4, String dc5, String hasSurgery,
|
|
|
+ String pathologicDiagStr, String pathologicDiagCode,
|
|
|
+ String clinicDiagCode, String clinicDiagStr);
|
|
|
|
|
|
@Select("select count(1) from batj_ba1 with(nolock) where bah=#{bah} and zycs=#{times}")
|
|
|
- int isBatjBa1Exist(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ int isBatjBa1Exist(String bah, int times);
|
|
|
|
|
|
@Select("select count(1) from batj_ba2 with(nolock) where bah=#{bah} and zycs=#{times}")
|
|
|
- int isBatjBa2Exist(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ int isBatjBa2Exist(String bah, int times);
|
|
|
|
|
|
@Insert("insert into batj_ba1 (bah, zyh, zycs, xm, ryrq, ryks, rybf) values " +
|
|
|
"(#{bah}, #{bah}, #{times}, #{name}, #{ryrq}, " +
|
|
|
"(select code from zd_unit_code with(nolock) where name=#{dept} and isnull(del_flag,'')!='1'), " +
|
|
|
"(select code from zd_unit_code with(nolock) where name=#{ward} and isnull(del_flag,'')!='1'))")
|
|
|
- void createBatjBa1(@Param("bah") String bah, @Param("times") int times,
|
|
|
- @Param("name") String name, @Param("ryrq") Date ryrq,
|
|
|
- @Param("dept") String dept, @Param("ward") String ward);
|
|
|
+ void createBatjBa1(String bah, int times, String name, Date ryrq, String dept, String ward);
|
|
|
|
|
|
@Insert("insert into batj_ba2 (bah, zyh, zycs) values (#{bah}, #{bah}, #{times})")
|
|
|
- void createBatjBa2(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ void createBatjBa2(String bah, int times);
|
|
|
+
|
|
|
+ @Insert("insert into t_frontsheet_supplement (bah, times) values (#{bah}, #{times})")
|
|
|
+ void createSheetSupplement(String bah, int times);
|
|
|
|
|
|
@Update("update batj_ba1 set " +
|
|
|
"pay_method=#{payMethod}," +
|
|
@@ -442,10 +428,10 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
void updateBatjBa2(CaseFrontsheetMain info);
|
|
|
|
|
|
@Delete("delete from ba_first_page1 where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- void deleteOldDisdiag(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ void deleteOldDisdiag(String bah, int times);
|
|
|
|
|
|
@Delete("delete from batj_ba4 where bah=#{bah} and zycs=#{times}")
|
|
|
- void deleteOldSurgeryRecord(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ void deleteOldSurgeryRecord(String bah, int times);
|
|
|
|
|
|
@Insert("insert into ba_first_page1 (inpatient_no, admiss_times, dis_diag_no," +
|
|
|
"dis_diag_comment, dis_diag, admiss_status, dis_diag_status, op_id_code) " +
|
|
@@ -461,40 +447,27 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
|
|
|
@Update("update t_case_frontsheet_main set file_status=0,unsign_date=getdate() " +
|
|
|
"where bah=#{bah} and admiss_times=#{times}")
|
|
|
- void updateSignStateToUnsigned(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ void updateSignStateToUnsigned(String bah, int times);
|
|
|
|
|
|
@Insert("insert into ba_op_log (op_type, op_id, op_time, inpatient_no, admiss_times) values " +
|
|
|
- "(#{opType}, #{staffId}, getDate(), #{bah}, #{admissTimes})")
|
|
|
- void writeBaOpLog(@Param("opType") int opType,
|
|
|
- @Param("staffId") String staffId,
|
|
|
- @Param("bah") String bah,
|
|
|
- @Param("admissTimes") int admissTimes);
|
|
|
+ "(#{opType}, #{staffId}, getDate(), #{bah}, #{times})")
|
|
|
+ void writeBaOpLog(int opType, String staffId, String bah, int times);
|
|
|
|
|
|
@Select("select rtrim(dis_diag_no) no, rtrim(dis_diag) code, " +
|
|
|
"rtrim(dis_diag_comment) name, rtrim(dis_diag_status) cyzg, " +
|
|
|
"rtrim(op_id_code) operId, convert(varchar(19), op_diag_date, 21) opDate, " +
|
|
|
"diagType='13',si_diag_type,bzfx='普通', admiss_cond " +
|
|
|
"from zy_dis_diag_yb with(nolock) where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- List<YiBaoDisdiag> getYbDiags(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ List<YiBaoDisdiag> getYbDiags(String bah, int times);
|
|
|
|
|
|
@Delete("delete from zy_dis_diag_yb where inpatient_no=#{bah} and admiss_times=#{times}")
|
|
|
- void deleteOldYbDiag(@Param("bah") String bah, @Param("times") int times);
|
|
|
+ void deleteOldYbDiag(String bah, int times);
|
|
|
|
|
|
@Insert("insert into zy_dis_diag_yb (inpatient_no, admiss_times, dis_diag_no, dis_diag_type, dis_diag, " +
|
|
|
"dis_diag_comment, op_id_code, op_diag_date, dis_diag_bzfx, dis_diag_status, si_diag_type, admiss_cond) " +
|
|
|
"values (#{bah},#{times},#{no},13,#{code},#{name},#{operId},#{opDate},'普通',#{cyzg},#{siDiagType},#{admissCond}) ")
|
|
|
void insertNewYbDiag(YiBaoDisdiag diag);
|
|
|
|
|
|
- @Select("select count(1) from zy_inactpatient a with(nolock), batj_ba2 b with(nolock) " +
|
|
|
- "where (dis_dept=#{ward} or dis_ward=#{ward}) and " +
|
|
|
- "b.bah=a.inpatient_no and " +
|
|
|
- "b.zycs=a.admiss_times and " +
|
|
|
- "b.blfx>2")
|
|
|
- Integer getCDBlfxCount(@Param("ward") String ward);
|
|
|
-
|
|
|
- @Select("select count(1) from zy_inactpatient with(nolock) where dis_dept=#{ward} or dis_ward=#{ward}")
|
|
|
- Integer getAllDisPatientCount(@Param("ward") String ward);
|
|
|
-
|
|
|
@Select("<script>" +
|
|
|
"select distinct " +
|
|
|
"a.bah,a.admiss_times as times, " +
|
|
@@ -541,87 +514,81 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
List<SheetOverview> advanceSearch(AdvanceSearch param);
|
|
|
|
|
|
@Select("select file_status from t_case_frontsheet_main with(nolock) where bah=#{bah} and admiss_times=#{times}")
|
|
|
- Integer selectFileStatus(@Param("bah") String bah,
|
|
|
- @Param("times") Integer times);
|
|
|
+ Integer selectFileStatus(String bah, int times);
|
|
|
|
|
|
@Select("select late_flag from t_case_frontsheet_main with(nolock) where bah=#{bah} and admiss_times=#{times}")
|
|
|
- Integer selectLateFlag(@Param("bah") String bah,
|
|
|
- @Param("times") Integer times);
|
|
|
+ Integer selectLateFlag(String bah, int times);
|
|
|
|
|
|
@Select("select sign_staff from t_case_frontsheet_main with(nolock) where bah=#{bah} and admiss_times=#{times}")
|
|
|
- String selectSignStaff(@Param("bah") String bah,
|
|
|
- @Param("times") Integer times);
|
|
|
+ String selectSignStaff(String bah, int times);
|
|
|
|
|
|
@Select("select role_id from dj_user_role where user_code=#{code}")
|
|
|
- List<Integer> getUserRoles(@Param("code") String code);
|
|
|
+ List<Integer> getUserRoles(String code);
|
|
|
|
|
|
@Select("select count(1) from t_yb_setl_modify_req where pat_no=#{bah} and times=#{times}")
|
|
|
- Integer selectModified(@Param("bah") String bah, @Param("times") Integer times);
|
|
|
+ Integer selectModified(String bah, int times);
|
|
|
|
|
|
@Select("select top 1 * from t_si_disefamily_diagnose with(nolock) where dise_code=#{code} ")
|
|
|
- DisefamilyGrade selectDisefamilyGrade(@Param("code") String code);
|
|
|
+ DisefamilyGrade selectDisefamilyGrade(String code);
|
|
|
|
|
|
@Select("select yb_code from zd_icd9_cm3 where code in " +
|
|
|
"(select ssbm from ${table} with(nolock) where zyh=#{bah} and zycs=#{times} and isnull(ssbm,'')!='') " +
|
|
|
"union select ssbm from ${table} with(nolock) where zyh=#{bah} and zycs=#{times} and isnull(ssbm,'')!=''")
|
|
|
- List<String> selectPatientSurgeryCodes(@Param("bah") String bah, @Param("times") Integer times, @Param("table") String table);
|
|
|
+ List<String> selectPatientSurgeryCodes(String bah, int times, String table);
|
|
|
|
|
|
@Select("select * from t_si_operation_disefamily with(nolock) where disefamily_code=#{code}")
|
|
|
- List<OprnDisefamilyGrade> selectOperationDisefamilies(@Param("code") String code);
|
|
|
+ List<OprnDisefamilyGrade> selectOperationDisefamilies(String code);
|
|
|
|
|
|
@Update("update zd_icd_code set weight=(weight+1) where code=#{code}")
|
|
|
- void increaseDiagWeight(@Param("code") String code);
|
|
|
+ void increaseDiagWeight(String code);
|
|
|
|
|
|
@Select("select *, " +
|
|
|
"duplicated=(select count(1) from t_case_frontsheet_duplicate where bah=#{bah} and times=#{times})," +
|
|
|
"lendout=(select count(1) from t_case_frontsheet_lendout where bah=#{bah} and times=#{times} and state='LEND_OUT')," +
|
|
|
"closedown=(select count(1) from t_case_frontsheet_closedown where bah=#{bah} and times=#{times}) " +
|
|
|
"from t_case_frontsheet_main where bah=#{bah} and admiss_times=#{times} and file_status=1")
|
|
|
- CaseFrontsheetMain selectStoredSheetMain(@Param("bah") String bah, @Param("times") Integer times);
|
|
|
+ CaseFrontsheetMain selectStoredSheetMain(String bah, int times);
|
|
|
|
|
|
@Select("select * from t_case_frontsheet_disdiag where bah=#{bah} and times=#{times} ")
|
|
|
- List<CaseFrontsheetDisdiag> selectSignedSheetDiags(@Param("bah") String bah, @Param("times") Integer times);
|
|
|
+ List<CaseFrontsheetDisdiag> selectSignedSheetDiags(String bah, int times);
|
|
|
|
|
|
@Select("select * from t_case_frontsheet_surgery where bah=#{bah} and times=#{times} ")
|
|
|
- List<CaseFrontsheetSurgery> selectSignedSheetSurgeries(@Param("bah") String bah, @Param("times") Integer times);
|
|
|
+ List<CaseFrontsheetSurgery> selectSignedSheetSurgeries(String bah, int times);
|
|
|
|
|
|
@Update("update t_case_frontsheet_main set age_days=#{agedays} where bah=#{bah} and admiss_times=#{times}")
|
|
|
- void updateNewBornAge(@Param("bah") String bah, @Param("times") Integer times, @Param("agedays") Integer agedays);
|
|
|
+ void updateNewBornAge(String bah, int times, Integer agedays);
|
|
|
|
|
|
@Select("select rtrim(yb_code) as code, rtrim(yb_name) as name from zd_icd_code_new where code=#{code} and del_flag=0")
|
|
|
- CodeName selectSiDiagByBaDiag(@Param("code") String code);
|
|
|
+ CodeName selectSiDiagByBaDiag(String code);
|
|
|
|
|
|
@Select("select province_code,city_code,district_code," +
|
|
|
"provinceName=(select name from t_region where code=province_code), " +
|
|
|
"cityName=(select name from t_region where code=city_code), " +
|
|
|
"districtName=(select name from t_region where code=district_code) " +
|
|
|
"from a_patient_mi where inpatient_no=#{bah}")
|
|
|
- StandardAddressMember selectStandardAddressMember(@Param("bah") String bah);
|
|
|
+ StandardAddressMember selectStandardAddressMember(String bah);
|
|
|
|
|
|
@Select("select rtrim(social_no) from a_patient_mi where inpatient_no=#{bah}")
|
|
|
- String selectSocialNo(@Param("bah") String bah);
|
|
|
+ String selectSocialNo(String bah);
|
|
|
|
|
|
@Select("select parent_code as code, name=(select t.name from t_region t where t.code=a.parent_code) " +
|
|
|
"from t_region a where code=#{region}")
|
|
|
- Region selectParentRegion(@Param("region") Integer region);
|
|
|
+ Region selectParentRegion(Integer region);
|
|
|
|
|
|
@Select("select name from t_region where code=#{region}")
|
|
|
- String selectRegionName(@Param("region") Integer region);
|
|
|
+ String selectRegionName(Integer region);
|
|
|
|
|
|
@Select("select top 1 med_type from t_si_pat_info where pat_no=#{patNo} and times=#{times} order by " +
|
|
|
"ledger_sn desc")
|
|
|
- String selectMedType(@Param("patNo") String patNo,
|
|
|
- @Param("times") int times);
|
|
|
+ String selectMedType(String patNo, int times);
|
|
|
|
|
|
@Select("select provinceName=(select name from t_region where code=#{province}), " +
|
|
|
"cityName=(select name from t_region where code=#{city}), " +
|
|
|
"districtName=(select name from t_region where code=#{district}) ")
|
|
|
- StandardAddressMember selectStandardAddressMember2(@Param("province") int province,
|
|
|
- @Param("city") int city,
|
|
|
- @Param("district") int district);
|
|
|
+ StandardAddressMember selectStandardAddressMember2(int province, int city, int district);
|
|
|
|
|
|
@Select("select audit_flag from t_yb_setl_modify_req where pat_no=#{patNo} and times=#{times} ")
|
|
|
- Integer qualityPass(@Param("patNo") String patNo, @Param("times") Integer times);
|
|
|
+ Integer qualityPass(String patNo, int times);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
"select rtrim(yb_code) as code,rtrim(yb_name) as name,charge_code as wjwCode," +
|
|
@@ -639,7 +606,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"#{code}" +
|
|
|
"</foreach>" +
|
|
|
"</script>")
|
|
|
- Integer selectChargeSumamt(@Param("patNo") String patNo, @Param("times") int times, @Param("list") String[] list);
|
|
|
+ Integer selectChargeSumamt(String patNo, int times, String[] list);
|
|
|
|
|
|
@Select("select code,yb_name as name,yb_code from zd_anaesthesia where yb_code is not null")
|
|
|
List<CodeName> selectZdAnstWays();
|
|
@@ -651,10 +618,10 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
List<CodeName> selectZdNations();
|
|
|
|
|
|
@Select("select top 1 insuplc_admdvs from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")
|
|
|
- String selectSetlInsuplcAdmdvs(@Param("patNo") String patNo, @Param("times") int times);
|
|
|
+ String selectSetlInsuplcAdmdvs(String patNo, int times);
|
|
|
|
|
|
@Select("select top 1 isnull(op_type,9) from zd_icd9_cm3 where yb_code=#{code}")
|
|
|
- Integer selectOperationType(@Param("code") String code);
|
|
|
+ Integer selectOperationType(String code);
|
|
|
|
|
|
// 病历分型
|
|
|
@Select("select data_element from emr_data_element where pat_no=#{patNo} and times=#{times}")
|
|
@@ -747,4 +714,22 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
|
|
|
"from t_case_frontsheet_lendout where bah=#{bah} and times=#{times} and state='LEND_OUT' " +
|
|
|
"order by lend_time desc")
|
|
|
LendOutRequest selectExistLendOut(String bah, int times);
|
|
|
+
|
|
|
+ @Select("select * from t_frontsheet_supplement where bah=#{bah} and times=#{times}")
|
|
|
+ FrontSheetSupplement getSheetSupplement(String bah, int times);
|
|
|
+
|
|
|
+ @Update("update t_frontsheet_supplement set " +
|
|
|
+ "adm_diag_code=#{admDiagCode},adm_diag_name=#{admDiagName},adm_status=#{admStatus}, " +
|
|
|
+ "diagnosis_confirm_date=#{diagnosisConfirmDate,jdbcType=DATE}, " +
|
|
|
+ "ventilator_use_time=#{ventilatorUseTime}, " +
|
|
|
+ "had_icu=#{hadIcu},icu_name=#{icuName},start_icu_time=#{startIcuTime,jdbcType=TIMESTAMP}, " +
|
|
|
+ "end_icu_time=#{endIcuTime,jdbcType=TIMESTAMP},had_ecmo=#{hadEcmo},ecmo_mode=#{ecmoMode}, " +
|
|
|
+ "start_ecmo_time=#{startEcmoTime,jdbcType=TIMESTAMP},end_ecmo_time=#{endEcmoTime,jdbcType=TIMESTAMP}, " +
|
|
|
+ "memlung_change_times=#{memlungChangeTimes},erythrocyte=#{erythrocyte,jdbcType=REAL}, " +
|
|
|
+ "platelet=#{platelet,jdbcType=REAL},plasma=#{plasma,jdbcType=REAL}, " +
|
|
|
+ "whole_blood=#{wholeBlood,jdbcType=REAL}, " +
|
|
|
+ "autotransfusion=#{autotransfusion,jdbcType=REAL},infusion=#{infusion}, " +
|
|
|
+ "infusion_reaction=#{infusionReaction},transfusion=#{transfusion}, " +
|
|
|
+ "transfusion_reaction=#{transfusionReaction} where bah=#{bah} and times=#{times}")
|
|
|
+ void updateSheetSupplement(FrontSheetSupplement sheetSupplement);
|
|
|
}
|