BloodSugarQueryDao.java 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. package thyyxxk.webserver.dao.his.examinations;
  2. import org.apache.ibatis.annotations.Mapper;
  3. import org.apache.ibatis.annotations.Param;
  4. import org.apache.ibatis.annotations.Select;
  5. import org.apache.ibatis.annotations.Update;
  6. import thyyxxk.webserver.entity.examinations.BloodSugar.BgNursingTestSync;
  7. import thyyxxk.webserver.entity.inpatient.patient.Patient;
  8. import java.util.List;
  9. @Mapper
  10. public interface BloodSugarQueryDao {
  11. @Select("select bed_no, " +
  12. " rtrim(a.name) name, " +
  13. " birth_date, " +
  14. " a.inpatient_no, " +
  15. " admiss_date," +
  16. " b.sex," +
  17. " zk_ward_name = (select rtrim(name) from zd_unit_code where code = zk_ward) " +
  18. "from ${tableName} a, " +
  19. " a_patient_mi b " +
  20. "where a.inpatient_no = b.inpatient_no " +
  21. " and a.inpatient_no = #{patNo} " +
  22. "and a.admiss_times = #{times}")
  23. Patient getPatientInfo(@Param("tableName") String tableName,
  24. @Param("patNo") String patNo,
  25. @Param("times") Integer times);
  26. @Select("select id, " +
  27. " inpatient_no, " +
  28. " admiss_times, " +
  29. " nurse_id, " +
  30. " nurse_id_name = (select rtrim(name) from a_employee_mi where code = nurse_id)," +
  31. " test_time, " +
  32. " bed_no, " +
  33. " timecode_id, " +
  34. " timecode_name, " +
  35. " rtrim(test_result) test_result, " +
  36. " rtrim(result_unit) result_unit " +
  37. "from data_blood_glouse " +
  38. "where inpatient_no = #{patNo}" +
  39. " and admiss_times = #{times}")
  40. List<BgNursingTestSync> getPatientLoodSugar(@Param("patNo") String patNo,
  41. @Param("times") Integer times);
  42. @Select("select admiss_times " +
  43. "from zy_actpatient " +
  44. "where inpatient_no = #{patNo} ")
  45. Integer getPatientTimes(@Param("patNo") String patNo);
  46. @Update("update bg_nursing_test_sync " +
  47. "set nurse_id = #{nurseId}, " +
  48. " test_time = #{testTime}, " +
  49. " test_result = #{testResult} " +
  50. "where id = #{id}")
  51. void modifyPatientBloodGlucoseInfo(BgNursingTestSync param);
  52. }