InpMedOrderMapper.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.xinxin.topro.pubservice.mysqlmapper.InpMedOrderMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.InpMedOrder" >
  5. <id column="IMO_ID" property="imoId" jdbcType="INTEGER" />
  6. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  7. <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
  8. <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
  9. <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
  10. <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
  11. <result column="IMO_Order_ID" property="imoOrderId" jdbcType="VARCHAR" />
  12. <result column="IMO_Item_Code" property="imoItemCode" jdbcType="VARCHAR" />
  13. <result column="IMO_Order_Name" property="imoOrderName" jdbcType="VARCHAR" />
  14. <result column="IMO_Item_Explain" property="imoItemExplain" jdbcType="VARCHAR" />
  15. <result column="IMO_Item_SupID" property="imoItemSupid" jdbcType="VARCHAR" />
  16. <result column="IMO_Item_OrderID" property="imoItemOrderid" jdbcType="VARCHAR" />
  17. <result column="IMO_FirstDay_Times" property="imoFirstdayTimes" jdbcType="DOUBLE" />
  18. <result column="IMO_Entrust" property="imoEntrust" jdbcType="VARCHAR" />
  19. <result column="IMO_Med_Usage" property="imoMedUsage" jdbcType="VARCHAR" />
  20. <result column="IMO_IsLong" property="imoIslong" jdbcType="INTEGER" />
  21. <result column="IMO_Status" property="imoStatus" jdbcType="INTEGER" />
  22. <result column="IMO_Order_Type" property="imoOrderType" jdbcType="INTEGER" />
  23. <result column="IMO_Med_Type" property="imoMedType" jdbcType="INTEGER" />
  24. <result column="IMO_Med_Way" property="imoMedWay" jdbcType="VARCHAR" />
  25. <result column="IMO_Item_Name" property="imoItemName" jdbcType="VARCHAR" />
  26. <result column="IMO_Item_Spec" property="imoItemSpec" jdbcType="VARCHAR" />
  27. <result column="IMO_Item_Dose" property="imoItemDose" jdbcType="DOUBLE" />
  28. <result column="IMO_Item_DoseUnit" property="imoItemDoseunit" jdbcType="VARCHAR" />
  29. <result column="IMO_Once_Dose" property="imoOnceDose" jdbcType="DOUBLE" />
  30. <result column="IMO_Once_DoseUnit" property="imoOnceDoseunit" jdbcType="VARCHAR" />
  31. <result column="IMO_IsEmer" property="imoIsemer" jdbcType="INTEGER" />
  32. <result column="IMO_PIVA" property="imoPiva" jdbcType="INTEGER" />
  33. <result column="IMO_IsSkinTest" property="imoIsskintest" jdbcType="INTEGER" />
  34. <result column="IMO_SkinTest_Result" property="imoSkintestResult" jdbcType="VARCHAR" />
  35. <result column="IMO_Opener" property="imoOpener" jdbcType="VARCHAR" />
  36. <result column="IMO_Open_Time" property="imoOpenTime" jdbcType="TIMESTAMP" />
  37. <result column="IMO_Stoper" property="imoStoper" jdbcType="VARCHAR" />
  38. <result column="IMO_Stop_Time" property="imoStopTime" jdbcType="TIMESTAMP" />
  39. <result column="IMO_StopChecker" property="imoStopchecker" jdbcType="VARCHAR" />
  40. <result column="IMO_StopCheck_Time" property="imoStopcheckTime" jdbcType="TIMESTAMP" />
  41. <result column="IMO_Revoker" property="imoRevoker" jdbcType="VARCHAR" />
  42. <result column="IMO_Revoke_Time" property="imoRevokeTime" jdbcType="TIMESTAMP" />
  43. <result column="IMO_Revoke_Reason" property="imoRevokeReason" jdbcType="VARCHAR" />
  44. <result column="IMO_Checker" property="imoChecker" jdbcType="VARCHAR" />
  45. <result column="IMO_Check_Time" property="imoCheckTime" jdbcType="TIMESTAMP" />
  46. <result column="IMO_Excutor" property="imoExcutor" jdbcType="VARCHAR" />
  47. <result column="IMO_Excute_Time" property="imoExcuteTime" jdbcType="TIMESTAMP" />
  48. <result column="IMO_Drug_Days" property="imoDrugDays" jdbcType="INTEGER" />
  49. <result column="IMO_Rate" property="imoRate" jdbcType="VARCHAR" />
  50. <result column="IMO_Rate_Unit" property="imoRateUnit" jdbcType="VARCHAR" />
  51. </resultMap>
  52. <sql id="Base_Column_List" >
  53. IMO_ID, HI_ID, PatientNo, DD_DepDm, DW_WardDm, DB_BedNo, IMO_Order_ID, IMO_Item_Code,
  54. IMO_Order_Name, IMO_Item_Explain, IMO_Item_SupID, IMO_Item_OrderID, IMO_FirstDay_Times,
  55. IMO_Entrust, IMO_Med_Usage, IMO_IsLong, IMO_Status, IMO_Order_Type, IMO_Med_Type,
  56. IMO_Med_Way, IMO_Item_Name, IMO_Item_Spec, IMO_Item_Dose, IMO_Item_DoseUnit, IMO_Once_Dose,
  57. IMO_Once_DoseUnit, IMO_IsEmer, IMO_PIVA, IMO_IsSkinTest, IMO_SkinTest_Result, IMO_Opener,
  58. IMO_Open_Time, IMO_Stoper, IMO_Stop_Time, IMO_StopChecker, IMO_StopCheck_Time, IMO_Revoker,
  59. IMO_Revoke_Time, IMO_Revoke_Reason, IMO_Checker, IMO_Check_Time, IMO_Excutor, IMO_Excute_Time,
  60. IMO_Drug_Days, IMO_Rate, IMO_Rate_Unit
  61. </sql>
  62. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  63. select
  64. <include refid="Base_Column_List" />
  65. from inp_med_order
  66. where IMO_ID = #{imoId,jdbcType=INTEGER}
  67. </select>
  68. <!-- <select id="selectPatientNo" resultType="com.xinxin.topro.pubservice.mysqlModel.InpOriginalOrderInfo"
  69. parameterType="com.xinxin.topro.pubservice.VO.MedOrderSearchVO" >
  70. select
  71. a.IMO_ID as ItemNo,
  72. a.PatientNo as VisitNo,/*病人ID */
  73. a.DW_WardDm as DepartNo,/*病区代码*/
  74. a.DD_DepDm as DivNo,/*科室代码*/
  75. a.DB_BedNo as BedNo,/*床位*/
  76. a.IMO_Order_ID as OrderNo,/*医嘱ID*/
  77. a.IMO_Opener as OrderUser,/*开立医生*/
  78. a.IMO_Open_Time as OrderTime,/*开立时间*/
  79. a.IMO_Stop_Time as TreatTime,/*停嘱时间*/
  80. a.IMO_Stoper as TreatUser,/*停嘱人*/
  81. a.IMO_Status as TreatStatus,/*停嘱状态 -1=作废 1=新增 2=核对 3=展开 4=执行 5=停止 6=撤销 7=删除 8=教学*/
  82. a.IMO_Excute_Time as ExecTime,/*执行时间*/
  83. a.IMO_Item_Dose as Dose,/*每次剂量*/
  84. a.IMO_Item_DoseUnit as DoseUnit,/*剂量单位*/
  85. a.IMO_Med_Way as WayType,/*给药方式类型*/
  86. d.DMW_Name WayName,/*给药方式名称*/
  87. a.IMO_Item_Code as ItemCode,/*医嘱项目代码*/
  88. a.IMO_Order_Name as ItemName,/*医嘱名称*/
  89. a.IMO_Order_Type as OrderType,/*医嘱类型 1=诊疗 2=药品 3=检验 4=检查 5=输血 6=会诊 7=文本 8=手术*/
  90. a.IMO_Med_Type as BigType,/*医嘱分类 1=西药 2=成药 3=草药 4=颗粒剂 5=膏方*/
  91. a.IMO_Item_OrderID as PairItemNo,/*成组医嘱*/
  92. a.IMO_Rate as Rate,/*滴速*/
  93. a.IMO_Rate_Unit as RateUnit,/*滴速单位*/
  94. a.IMO_Med_Usage `Usage`,/*频率*/
  95. a.IMO_IsLong as LongOrTempFlag,/*长期临时 1=长期 2=临时*/
  96. a.IMO_Item_Explain as Advise /*医嘱说明*/
  97. from inp_med_order a
  98. INNER JOIN dic_med_way d on a.IMO_Med_Way = d.DMW_Code
  99. where a.PatientNo = #{patientNo,jdbcType=VARCHAR}
  100. <if test="beginTime != null" >
  101. and a.IMO_Open_Time <![CDATA[>=]]> #{beginTime}
  102. </if>
  103. <if test="endTime != null" >
  104. and a.IMO_Open_Time <![CDATA[<=]]>#{endTime}
  105. </if>
  106. </select>-->
  107. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  108. delete from inp_med_order
  109. where IMO_ID = #{imoId,jdbcType=INTEGER}
  110. </delete>
  111. <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpMedOrder" >
  112. insert into inp_med_order (IMO_ID, HI_ID, PatientNo,
  113. DD_DepDm, DW_WardDm, DB_BedNo,
  114. IMO_Order_ID, IMO_Item_Code, IMO_Order_Name,
  115. IMO_Item_Explain, IMO_Item_SupID, IMO_Item_OrderID,
  116. IMO_FirstDay_Times, IMO_Entrust, IMO_Med_Usage,
  117. IMO_IsLong, IMO_Status, IMO_Order_Type,
  118. IMO_Med_Type, IMO_Med_Way, IMO_Item_Name,
  119. IMO_Item_Spec, IMO_Item_Dose, IMO_Item_DoseUnit,
  120. IMO_Once_Dose, IMO_Once_DoseUnit, IMO_IsEmer,
  121. IMO_PIVA, IMO_IsSkinTest, IMO_SkinTest_Result,
  122. IMO_Opener, IMO_Open_Time, IMO_Stoper,
  123. IMO_Stop_Time, IMO_StopChecker, IMO_StopCheck_Time,
  124. IMO_Revoker, IMO_Revoke_Time, IMO_Revoke_Reason,
  125. IMO_Checker, IMO_Check_Time, IMO_Excutor,
  126. IMO_Excute_Time, IMO_Drug_Days, IMO_Rate,
  127. IMO_Rate_Unit)
  128. values (#{imoId,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR},
  129. #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
  130. #{imoOrderId,jdbcType=VARCHAR}, #{imoItemCode,jdbcType=VARCHAR}, #{imoOrderName,jdbcType=VARCHAR},
  131. #{imoItemExplain,jdbcType=VARCHAR}, #{imoItemSupid,jdbcType=VARCHAR}, #{imoItemOrderid,jdbcType=VARCHAR},
  132. #{imoFirstdayTimes,jdbcType=DOUBLE}, #{imoEntrust,jdbcType=VARCHAR}, #{imoMedUsage,jdbcType=VARCHAR},
  133. #{imoIslong,jdbcType=INTEGER}, #{imoStatus,jdbcType=INTEGER}, #{imoOrderType,jdbcType=INTEGER},
  134. #{imoMedType,jdbcType=INTEGER}, #{imoMedWay,jdbcType=VARCHAR}, #{imoItemName,jdbcType=VARCHAR},
  135. #{imoItemSpec,jdbcType=VARCHAR}, #{imoItemDose,jdbcType=DOUBLE}, #{imoItemDoseunit,jdbcType=VARCHAR},
  136. #{imoOnceDose,jdbcType=DOUBLE}, #{imoOnceDoseunit,jdbcType=VARCHAR}, #{imoIsemer,jdbcType=INTEGER},
  137. #{imoPiva,jdbcType=INTEGER}, #{imoIsskintest,jdbcType=INTEGER}, #{imoSkintestResult,jdbcType=VARCHAR},
  138. #{imoOpener,jdbcType=VARCHAR}, #{imoOpenTime,jdbcType=TIMESTAMP}, #{imoStoper,jdbcType=VARCHAR},
  139. #{imoStopTime,jdbcType=TIMESTAMP}, #{imoStopchecker,jdbcType=VARCHAR}, #{imoStopcheckTime,jdbcType=TIMESTAMP},
  140. #{imoRevoker,jdbcType=VARCHAR}, #{imoRevokeTime,jdbcType=TIMESTAMP}, #{imoRevokeReason,jdbcType=VARCHAR},
  141. #{imoChecker,jdbcType=VARCHAR}, #{imoCheckTime,jdbcType=TIMESTAMP}, #{imoExcutor,jdbcType=VARCHAR},
  142. #{imoExcuteTime,jdbcType=TIMESTAMP}, #{imoDrugDays,jdbcType=INTEGER}, #{imoRate,jdbcType=VARCHAR},
  143. #{imoRateUnit,jdbcType=VARCHAR})
  144. </insert>
  145. <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpMedOrder" >
  146. insert into inp_med_order
  147. <trim prefix="(" suffix=")" suffixOverrides="," >
  148. <if test="imoId != null" >
  149. IMO_ID,
  150. </if>
  151. <if test="hiId != null" >
  152. HI_ID,
  153. </if>
  154. <if test="patientno != null" >
  155. PatientNo,
  156. </if>
  157. <if test="ddDepdm != null" >
  158. DD_DepDm,
  159. </if>
  160. <if test="dwWarddm != null" >
  161. DW_WardDm,
  162. </if>
  163. <if test="dbBedno != null" >
  164. DB_BedNo,
  165. </if>
  166. <if test="imoOrderId != null" >
  167. IMO_Order_ID,
  168. </if>
  169. <if test="imoItemCode != null" >
  170. IMO_Item_Code,
  171. </if>
  172. <if test="imoOrderName != null" >
  173. IMO_Order_Name,
  174. </if>
  175. <if test="imoItemExplain != null" >
  176. IMO_Item_Explain,
  177. </if>
  178. <if test="imoItemSupid != null" >
  179. IMO_Item_SupID,
  180. </if>
  181. <if test="imoItemOrderid != null" >
  182. IMO_Item_OrderID,
  183. </if>
  184. <if test="imoFirstdayTimes != null" >
  185. IMO_FirstDay_Times,
  186. </if>
  187. <if test="imoEntrust != null" >
  188. IMO_Entrust,
  189. </if>
  190. <if test="imoMedUsage != null" >
  191. IMO_Med_Usage,
  192. </if>
  193. <if test="imoIslong != null" >
  194. IMO_IsLong,
  195. </if>
  196. <if test="imoStatus != null" >
  197. IMO_Status,
  198. </if>
  199. <if test="imoOrderType != null" >
  200. IMO_Order_Type,
  201. </if>
  202. <if test="imoMedType != null" >
  203. IMO_Med_Type,
  204. </if>
  205. <if test="imoMedWay != null" >
  206. IMO_Med_Way,
  207. </if>
  208. <if test="imoItemName != null" >
  209. IMO_Item_Name,
  210. </if>
  211. <if test="imoItemSpec != null" >
  212. IMO_Item_Spec,
  213. </if>
  214. <if test="imoItemDose != null" >
  215. IMO_Item_Dose,
  216. </if>
  217. <if test="imoItemDoseunit != null" >
  218. IMO_Item_DoseUnit,
  219. </if>
  220. <if test="imoOnceDose != null" >
  221. IMO_Once_Dose,
  222. </if>
  223. <if test="imoOnceDoseunit != null" >
  224. IMO_Once_DoseUnit,
  225. </if>
  226. <if test="imoIsemer != null" >
  227. IMO_IsEmer,
  228. </if>
  229. <if test="imoPiva != null" >
  230. IMO_PIVA,
  231. </if>
  232. <if test="imoIsskintest != null" >
  233. IMO_IsSkinTest,
  234. </if>
  235. <if test="imoSkintestResult != null" >
  236. IMO_SkinTest_Result,
  237. </if>
  238. <if test="imoOpener != null" >
  239. IMO_Opener,
  240. </if>
  241. <if test="imoOpenTime != null" >
  242. IMO_Open_Time,
  243. </if>
  244. <if test="imoStoper != null" >
  245. IMO_Stoper,
  246. </if>
  247. <if test="imoStopTime != null" >
  248. IMO_Stop_Time,
  249. </if>
  250. <if test="imoStopchecker != null" >
  251. IMO_StopChecker,
  252. </if>
  253. <if test="imoStopcheckTime != null" >
  254. IMO_StopCheck_Time,
  255. </if>
  256. <if test="imoRevoker != null" >
  257. IMO_Revoker,
  258. </if>
  259. <if test="imoRevokeTime != null" >
  260. IMO_Revoke_Time,
  261. </if>
  262. <if test="imoRevokeReason != null" >
  263. IMO_Revoke_Reason,
  264. </if>
  265. <if test="imoChecker != null" >
  266. IMO_Checker,
  267. </if>
  268. <if test="imoCheckTime != null" >
  269. IMO_Check_Time,
  270. </if>
  271. <if test="imoExcutor != null" >
  272. IMO_Excutor,
  273. </if>
  274. <if test="imoExcuteTime != null" >
  275. IMO_Excute_Time,
  276. </if>
  277. <if test="imoDrugDays != null" >
  278. IMO_Drug_Days,
  279. </if>
  280. <if test="imoRate != null" >
  281. IMO_Rate,
  282. </if>
  283. <if test="imoRateUnit != null" >
  284. IMO_Rate_Unit,
  285. </if>
  286. </trim>
  287. <trim prefix="values (" suffix=")" suffixOverrides="," >
  288. <if test="imoId != null" >
  289. #{imoId,jdbcType=INTEGER},
  290. </if>
  291. <if test="hiId != null" >
  292. #{hiId,jdbcType=INTEGER},
  293. </if>
  294. <if test="patientno != null" >
  295. #{patientno,jdbcType=VARCHAR},
  296. </if>
  297. <if test="ddDepdm != null" >
  298. #{ddDepdm,jdbcType=VARCHAR},
  299. </if>
  300. <if test="dwWarddm != null" >
  301. #{dwWarddm,jdbcType=VARCHAR},
  302. </if>
  303. <if test="dbBedno != null" >
  304. #{dbBedno,jdbcType=VARCHAR},
  305. </if>
  306. <if test="imoOrderId != null" >
  307. #{imoOrderId,jdbcType=VARCHAR},
  308. </if>
  309. <if test="imoItemCode != null" >
  310. #{imoItemCode,jdbcType=VARCHAR},
  311. </if>
  312. <if test="imoOrderName != null" >
  313. #{imoOrderName,jdbcType=VARCHAR},
  314. </if>
  315. <if test="imoItemExplain != null" >
  316. #{imoItemExplain,jdbcType=VARCHAR},
  317. </if>
  318. <if test="imoItemSupid != null" >
  319. #{imoItemSupid,jdbcType=VARCHAR},
  320. </if>
  321. <if test="imoItemOrderid != null" >
  322. #{imoItemOrderid,jdbcType=VARCHAR},
  323. </if>
  324. <if test="imoFirstdayTimes != null" >
  325. #{imoFirstdayTimes,jdbcType=DOUBLE},
  326. </if>
  327. <if test="imoEntrust != null" >
  328. #{imoEntrust,jdbcType=VARCHAR},
  329. </if>
  330. <if test="imoMedUsage != null" >
  331. #{imoMedUsage,jdbcType=VARCHAR},
  332. </if>
  333. <if test="imoIslong != null" >
  334. #{imoIslong,jdbcType=INTEGER},
  335. </if>
  336. <if test="imoStatus != null" >
  337. #{imoStatus,jdbcType=INTEGER},
  338. </if>
  339. <if test="imoOrderType != null" >
  340. #{imoOrderType,jdbcType=INTEGER},
  341. </if>
  342. <if test="imoMedType != null" >
  343. #{imoMedType,jdbcType=INTEGER},
  344. </if>
  345. <if test="imoMedWay != null" >
  346. #{imoMedWay,jdbcType=VARCHAR},
  347. </if>
  348. <if test="imoItemName != null" >
  349. #{imoItemName,jdbcType=VARCHAR},
  350. </if>
  351. <if test="imoItemSpec != null" >
  352. #{imoItemSpec,jdbcType=VARCHAR},
  353. </if>
  354. <if test="imoItemDose != null" >
  355. #{imoItemDose,jdbcType=DOUBLE},
  356. </if>
  357. <if test="imoItemDoseunit != null" >
  358. #{imoItemDoseunit,jdbcType=VARCHAR},
  359. </if>
  360. <if test="imoOnceDose != null" >
  361. #{imoOnceDose,jdbcType=DOUBLE},
  362. </if>
  363. <if test="imoOnceDoseunit != null" >
  364. #{imoOnceDoseunit,jdbcType=VARCHAR},
  365. </if>
  366. <if test="imoIsemer != null" >
  367. #{imoIsemer,jdbcType=INTEGER},
  368. </if>
  369. <if test="imoPiva != null" >
  370. #{imoPiva,jdbcType=INTEGER},
  371. </if>
  372. <if test="imoIsskintest != null" >
  373. #{imoIsskintest,jdbcType=INTEGER},
  374. </if>
  375. <if test="imoSkintestResult != null" >
  376. #{imoSkintestResult,jdbcType=VARCHAR},
  377. </if>
  378. <if test="imoOpener != null" >
  379. #{imoOpener,jdbcType=VARCHAR},
  380. </if>
  381. <if test="imoOpenTime != null" >
  382. #{imoOpenTime,jdbcType=TIMESTAMP},
  383. </if>
  384. <if test="imoStoper != null" >
  385. #{imoStoper,jdbcType=VARCHAR},
  386. </if>
  387. <if test="imoStopTime != null" >
  388. #{imoStopTime,jdbcType=TIMESTAMP},
  389. </if>
  390. <if test="imoStopchecker != null" >
  391. #{imoStopchecker,jdbcType=VARCHAR},
  392. </if>
  393. <if test="imoStopcheckTime != null" >
  394. #{imoStopcheckTime,jdbcType=TIMESTAMP},
  395. </if>
  396. <if test="imoRevoker != null" >
  397. #{imoRevoker,jdbcType=VARCHAR},
  398. </if>
  399. <if test="imoRevokeTime != null" >
  400. #{imoRevokeTime,jdbcType=TIMESTAMP},
  401. </if>
  402. <if test="imoRevokeReason != null" >
  403. #{imoRevokeReason,jdbcType=VARCHAR},
  404. </if>
  405. <if test="imoChecker != null" >
  406. #{imoChecker,jdbcType=VARCHAR},
  407. </if>
  408. <if test="imoCheckTime != null" >
  409. #{imoCheckTime,jdbcType=TIMESTAMP},
  410. </if>
  411. <if test="imoExcutor != null" >
  412. #{imoExcutor,jdbcType=VARCHAR},
  413. </if>
  414. <if test="imoExcuteTime != null" >
  415. #{imoExcuteTime,jdbcType=TIMESTAMP},
  416. </if>
  417. <if test="imoDrugDays != null" >
  418. #{imoDrugDays,jdbcType=INTEGER},
  419. </if>
  420. <if test="imoRate != null" >
  421. #{imoRate,jdbcType=VARCHAR},
  422. </if>
  423. <if test="imoRateUnit != null" >
  424. #{imoRateUnit,jdbcType=VARCHAR},
  425. </if>
  426. </trim>
  427. </insert>
  428. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpMedOrder" >
  429. update inp_med_order
  430. <set >
  431. <if test="hiId != null" >
  432. HI_ID = #{hiId,jdbcType=INTEGER},
  433. </if>
  434. <if test="patientno != null" >
  435. PatientNo = #{patientno,jdbcType=VARCHAR},
  436. </if>
  437. <if test="ddDepdm != null" >
  438. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  439. </if>
  440. <if test="dwWarddm != null" >
  441. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  442. </if>
  443. <if test="dbBedno != null" >
  444. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  445. </if>
  446. <if test="imoOrderId != null" >
  447. IMO_Order_ID = #{imoOrderId,jdbcType=VARCHAR},
  448. </if>
  449. <if test="imoItemCode != null" >
  450. IMO_Item_Code = #{imoItemCode,jdbcType=VARCHAR},
  451. </if>
  452. <if test="imoOrderName != null" >
  453. IMO_Order_Name = #{imoOrderName,jdbcType=VARCHAR},
  454. </if>
  455. <if test="imoItemExplain != null" >
  456. IMO_Item_Explain = #{imoItemExplain,jdbcType=VARCHAR},
  457. </if>
  458. <if test="imoItemSupid != null" >
  459. IMO_Item_SupID = #{imoItemSupid,jdbcType=VARCHAR},
  460. </if>
  461. <if test="imoItemOrderid != null" >
  462. IMO_Item_OrderID = #{imoItemOrderid,jdbcType=VARCHAR},
  463. </if>
  464. <if test="imoFirstdayTimes != null" >
  465. IMO_FirstDay_Times = #{imoFirstdayTimes,jdbcType=DOUBLE},
  466. </if>
  467. <if test="imoEntrust != null" >
  468. IMO_Entrust = #{imoEntrust,jdbcType=VARCHAR},
  469. </if>
  470. <if test="imoMedUsage != null" >
  471. IMO_Med_Usage = #{imoMedUsage,jdbcType=VARCHAR},
  472. </if>
  473. <if test="imoIslong != null" >
  474. IMO_IsLong = #{imoIslong,jdbcType=INTEGER},
  475. </if>
  476. <if test="imoStatus != null" >
  477. IMO_Status = #{imoStatus,jdbcType=INTEGER},
  478. </if>
  479. <if test="imoOrderType != null" >
  480. IMO_Order_Type = #{imoOrderType,jdbcType=INTEGER},
  481. </if>
  482. <if test="imoMedType != null" >
  483. IMO_Med_Type = #{imoMedType,jdbcType=INTEGER},
  484. </if>
  485. <if test="imoMedWay != null" >
  486. IMO_Med_Way = #{imoMedWay,jdbcType=VARCHAR},
  487. </if>
  488. <if test="imoItemName != null" >
  489. IMO_Item_Name = #{imoItemName,jdbcType=VARCHAR},
  490. </if>
  491. <if test="imoItemSpec != null" >
  492. IMO_Item_Spec = #{imoItemSpec,jdbcType=VARCHAR},
  493. </if>
  494. <if test="imoItemDose != null" >
  495. IMO_Item_Dose = #{imoItemDose,jdbcType=DOUBLE},
  496. </if>
  497. <if test="imoItemDoseunit != null" >
  498. IMO_Item_DoseUnit = #{imoItemDoseunit,jdbcType=VARCHAR},
  499. </if>
  500. <if test="imoOnceDose != null" >
  501. IMO_Once_Dose = #{imoOnceDose,jdbcType=DOUBLE},
  502. </if>
  503. <if test="imoOnceDoseunit != null" >
  504. IMO_Once_DoseUnit = #{imoOnceDoseunit,jdbcType=VARCHAR},
  505. </if>
  506. <if test="imoIsemer != null" >
  507. IMO_IsEmer = #{imoIsemer,jdbcType=INTEGER},
  508. </if>
  509. <if test="imoPiva != null" >
  510. IMO_PIVA = #{imoPiva,jdbcType=INTEGER},
  511. </if>
  512. <if test="imoIsskintest != null" >
  513. IMO_IsSkinTest = #{imoIsskintest,jdbcType=INTEGER},
  514. </if>
  515. <if test="imoSkintestResult != null" >
  516. IMO_SkinTest_Result = #{imoSkintestResult,jdbcType=VARCHAR},
  517. </if>
  518. <if test="imoOpener != null" >
  519. IMO_Opener = #{imoOpener,jdbcType=VARCHAR},
  520. </if>
  521. <if test="imoOpenTime != null" >
  522. IMO_Open_Time = #{imoOpenTime,jdbcType=TIMESTAMP},
  523. </if>
  524. <if test="imoStoper != null" >
  525. IMO_Stoper = #{imoStoper,jdbcType=VARCHAR},
  526. </if>
  527. <if test="imoStopTime != null" >
  528. IMO_Stop_Time = #{imoStopTime,jdbcType=TIMESTAMP},
  529. </if>
  530. <if test="imoStopchecker != null" >
  531. IMO_StopChecker = #{imoStopchecker,jdbcType=VARCHAR},
  532. </if>
  533. <if test="imoStopcheckTime != null" >
  534. IMO_StopCheck_Time = #{imoStopcheckTime,jdbcType=TIMESTAMP},
  535. </if>
  536. <if test="imoRevoker != null" >
  537. IMO_Revoker = #{imoRevoker,jdbcType=VARCHAR},
  538. </if>
  539. <if test="imoRevokeTime != null" >
  540. IMO_Revoke_Time = #{imoRevokeTime,jdbcType=TIMESTAMP},
  541. </if>
  542. <if test="imoRevokeReason != null" >
  543. IMO_Revoke_Reason = #{imoRevokeReason,jdbcType=VARCHAR},
  544. </if>
  545. <if test="imoChecker != null" >
  546. IMO_Checker = #{imoChecker,jdbcType=VARCHAR},
  547. </if>
  548. <if test="imoCheckTime != null" >
  549. IMO_Check_Time = #{imoCheckTime,jdbcType=TIMESTAMP},
  550. </if>
  551. <if test="imoExcutor != null" >
  552. IMO_Excutor = #{imoExcutor,jdbcType=VARCHAR},
  553. </if>
  554. <if test="imoExcuteTime != null" >
  555. IMO_Excute_Time = #{imoExcuteTime,jdbcType=TIMESTAMP},
  556. </if>
  557. <if test="imoDrugDays != null" >
  558. IMO_Drug_Days = #{imoDrugDays,jdbcType=INTEGER},
  559. </if>
  560. <if test="imoRate != null" >
  561. IMO_Rate = #{imoRate,jdbcType=VARCHAR},
  562. </if>
  563. <if test="imoRateUnit != null" >
  564. IMO_Rate_Unit = #{imoRateUnit,jdbcType=VARCHAR},
  565. </if>
  566. </set>
  567. where IMO_ID = #{imoId,jdbcType=INTEGER}
  568. </update>
  569. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.InpMedOrder" >
  570. update inp_med_order
  571. set HI_ID = #{hiId,jdbcType=INTEGER},
  572. PatientNo = #{patientno,jdbcType=VARCHAR},
  573. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  574. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  575. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  576. IMO_Order_ID = #{imoOrderId,jdbcType=VARCHAR},
  577. IMO_Item_Code = #{imoItemCode,jdbcType=VARCHAR},
  578. IMO_Order_Name = #{imoOrderName,jdbcType=VARCHAR},
  579. IMO_Item_Explain = #{imoItemExplain,jdbcType=VARCHAR},
  580. IMO_Item_SupID = #{imoItemSupid,jdbcType=VARCHAR},
  581. IMO_Item_OrderID = #{imoItemOrderid,jdbcType=VARCHAR},
  582. IMO_FirstDay_Times = #{imoFirstdayTimes,jdbcType=DOUBLE},
  583. IMO_Entrust = #{imoEntrust,jdbcType=VARCHAR},
  584. IMO_Med_Usage = #{imoMedUsage,jdbcType=VARCHAR},
  585. IMO_IsLong = #{imoIslong,jdbcType=INTEGER},
  586. IMO_Status = #{imoStatus,jdbcType=INTEGER},
  587. IMO_Order_Type = #{imoOrderType,jdbcType=INTEGER},
  588. IMO_Med_Type = #{imoMedType,jdbcType=INTEGER},
  589. IMO_Med_Way = #{imoMedWay,jdbcType=VARCHAR},
  590. IMO_Item_Name = #{imoItemName,jdbcType=VARCHAR},
  591. IMO_Item_Spec = #{imoItemSpec,jdbcType=VARCHAR},
  592. IMO_Item_Dose = #{imoItemDose,jdbcType=DOUBLE},
  593. IMO_Item_DoseUnit = #{imoItemDoseunit,jdbcType=VARCHAR},
  594. IMO_Once_Dose = #{imoOnceDose,jdbcType=DOUBLE},
  595. IMO_Once_DoseUnit = #{imoOnceDoseunit,jdbcType=VARCHAR},
  596. IMO_IsEmer = #{imoIsemer,jdbcType=INTEGER},
  597. IMO_PIVA = #{imoPiva,jdbcType=INTEGER},
  598. IMO_IsSkinTest = #{imoIsskintest,jdbcType=INTEGER},
  599. IMO_SkinTest_Result = #{imoSkintestResult,jdbcType=VARCHAR},
  600. IMO_Opener = #{imoOpener,jdbcType=VARCHAR},
  601. IMO_Open_Time = #{imoOpenTime,jdbcType=TIMESTAMP},
  602. IMO_Stoper = #{imoStoper,jdbcType=VARCHAR},
  603. IMO_Stop_Time = #{imoStopTime,jdbcType=TIMESTAMP},
  604. IMO_StopChecker = #{imoStopchecker,jdbcType=VARCHAR},
  605. IMO_StopCheck_Time = #{imoStopcheckTime,jdbcType=TIMESTAMP},
  606. IMO_Revoker = #{imoRevoker,jdbcType=VARCHAR},
  607. IMO_Revoke_Time = #{imoRevokeTime,jdbcType=TIMESTAMP},
  608. IMO_Revoke_Reason = #{imoRevokeReason,jdbcType=VARCHAR},
  609. IMO_Checker = #{imoChecker,jdbcType=VARCHAR},
  610. IMO_Check_Time = #{imoCheckTime,jdbcType=TIMESTAMP},
  611. IMO_Excutor = #{imoExcutor,jdbcType=VARCHAR},
  612. IMO_Excute_Time = #{imoExcuteTime,jdbcType=TIMESTAMP},
  613. IMO_Drug_Days = #{imoDrugDays,jdbcType=INTEGER},
  614. IMO_Rate = #{imoRate,jdbcType=VARCHAR},
  615. IMO_Rate_Unit = #{imoRateUnit,jdbcType=VARCHAR}
  616. where IMO_ID = #{imoId,jdbcType=INTEGER}
  617. </update>
  618. <select id="getMedInformation2" resultMap="BaseResultMap">
  619. select <include refid="Base_Column_List"/>
  620. from inp_med_order
  621. where PatientNo =#{patientNo,jdbcType=VARCHAR}
  622. and HI_ID = #{hiId,jdbcType=INTEGER}
  623. and IMO_Status in (1,2,3,4,5)
  624. <if test="startDate != null">
  625. and IMO_Open_Time >= #{startDate,jdbcType=TIMESTAMP}
  626. </if>
  627. <if test="endDate != null">
  628. and #{endDate,jdbcType=TIMESTAMP} >= IMO_Open_Time
  629. </if>
  630. <if test="classifyList != null" >
  631. and IMO_Order_Type in
  632. <foreach collection="classifyList" item="item" separator="," open="(" close=")">
  633. #{item}
  634. </foreach>
  635. </if>
  636. <if test="typeList != null" >
  637. and IMO_IsLong in
  638. <foreach collection="typeList" item="item" separator="," open="(" close=")">
  639. #{item}
  640. </foreach>
  641. </if>
  642. <if test="searchKey != null and searchKey != ''" >
  643. and IMO_Order_Name like concat('%',#{searchKey,jdbcType=VARCHAR},'%')
  644. </if>
  645. </select>
  646. </mapper>