YzTemperatureMapper.java 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. package thyyxxk.webserver.dao.his.datamodify;
  2. import org.apache.ibatis.annotations.Delete;
  3. import org.apache.ibatis.annotations.Mapper;
  4. import org.apache.ibatis.annotations.Select;
  5. import org.apache.ibatis.annotations.Update;
  6. import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
  7. import thyyxxk.webserver.entity.datamodify.YzTemperature;
  8. import java.util.List;
  9. /**
  10. * <p>
  11. * 描述
  12. * </p>
  13. *
  14. * @author xc
  15. * @date 2021-04-12 17:43
  16. */
  17. @Mapper
  18. public interface YzTemperatureMapper {
  19. /**
  20. * 查询住院 护理记录单
  21. * @param param 住院号 住院次数,能查询出这个人的全部护理记录单 在根据日期,时间就能查询出 某一条的护理记录单
  22. * @return 返回这个人一条的护理记录单
  23. * */
  24. @Select("select patientName=(select rtrim(name) name from a_patient_mi where a_patient_mi.inpatient_no= yz_temperature.inpatient_no), " +
  25. "inpatient_no,rec_date,rec_time,temperature_1,pulse_1,breathe_1,pressure_1_am,pressure_1_pm," +
  26. "spo2,mind,skin,tubes_name,tubes_status,other_info,ward,admiss_times,detail_no, " +
  27. "userid=(select rtrim(name) name from a_employee_mi where code = userid) " +
  28. "from yz_temperature " +
  29. "where inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
  30. "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} " +
  31. "order by detail_no"
  32. )
  33. List<YzTemperature> queryDetails(YzTemperature param);
  34. /**
  35. * 获取病区
  36. * @return 科室 code 和 名字
  37. * */
  38. @Select("select code,rtrim(name) name from zy_ward_code")
  39. List<GetDropdownBox> getWard();
  40. /**
  41. * 更新重要的数据
  42. * @param param 根据 住院号 住院次数 日期 时间
  43. * 现在能修改的字段有 体温:temperature1 脉搏:pulse1 呼吸:breathe1
  44. * 血压am: pressure1Am, 血压pm:pressure1Pm spo2:spo2 意识:mind 皮肤:skin
  45. * 管道名称:tubesName 管道状态:tubesStatus 病区:ward
  46. * @return 返回状态
  47. * */
  48. @Update("<script>" +
  49. "update yz_temperature set " +
  50. "modify_userid=#{modifyUserid},modify_time=#{modifyTime} " +
  51. "<if test=\"temperature1!=null\">" +
  52. ",temperature_1=#{temperature1}" +
  53. "</if>" +
  54. "<if test=\"pulse1!=null\">" +
  55. ",pulse_1=#{pulse1}" +
  56. "</if>" +
  57. "<if test=\"breathe1!=null\">" +
  58. ",breathe_1=#{breathe1}" +
  59. "</if>" +
  60. "<if test=\"pressure1Am!=null\">" +
  61. ",pressure_1_am=#{pressure1Am}" +
  62. "</if>" +
  63. "<if test=\"pressure1Pm!=null\">" +
  64. ",pressure_1_pm=#{pressure1Pm}" +
  65. "</if>" +
  66. "<if test=\"spo2!=null\">" +
  67. ",spo2=#{spo2}" +
  68. "</if>" +
  69. "<if test=\"mind!=null\">" +
  70. ",mind=#{mind}" +
  71. "</if>" +
  72. "<if test=\"skin!=null\">" +
  73. ",skin=#{skin}" +
  74. "</if>" +
  75. "<if test=\"tubesName!=null\">" +
  76. ",tubes_name=#{tubesName}" +
  77. "</if>" +
  78. "<if test=\"tubesStatus!=null\">" +
  79. ",tubes_status=#{tubesStatus}" +
  80. "</if>" +
  81. "<if test=\"ward!=null\">" +
  82. ",ward=#{ward}" +
  83. "</if>" +
  84. "where " +
  85. "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
  86. "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} and detail_no=#{detailNo}" +
  87. "</script>")
  88. Boolean teperatureHead(YzTemperature param);
  89. /**
  90. * 更新 剩下的地方 主要是更新 病室和 修改人 修改时间
  91. * */
  92. @Update("<script>" +
  93. "update yz_temperature set modify_userid=#{modifyUserid},modify_time=#{modifyTime}" +
  94. "<if test=\"ward!=null\">" +
  95. ",ward=#{ward}" +
  96. "</if>" +
  97. "where " +
  98. "inpatient_no=#{inpatientNo} and admiss_times=#{admissTimes} and scd_flag='0' " +
  99. "and rec_date=#{toStringRecDate} and rec_time=#{toStringRecTime} and detail_no=#{detailNo}" +
  100. "</script>")
  101. Boolean teperatureBody(YzTemperature param);
  102. }