clinic.js 113 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493
  1. //@ sourceURL=clinic.js
  2. //判断病人列表是否在加载中,防止重复加载
  3. var msg_list_loading = false;
  4. //挂号卡片列表页面下标
  5. var pageIndex = 0;
  6. $(function () {
  7. initGenderSelect();
  8. initResponceTypeSelect();
  9. $('#editUserBirthDayGroup').datetimepicker({
  10. format: 'yyyy-mm-dd',
  11. language: 'zh-CN',
  12. minView: "month",
  13. });
  14. initDaterangepickerWithId('reportrange', "right");
  15. formatCheck();
  16. //数据校验
  17. init_validator();
  18. //时间区间
  19. initMzWorkTime();
  20. //初始门诊收银方式下拉选
  21. initChequeType("payType");
  22. /**
  23. * 清空
  24. */
  25. $("#clearRegistration").on("click", function (t) {
  26. $("#cardNo").val(null);
  27. $("#cardNo").attr("title", null);
  28. $("#userName").val(null);
  29. $("#age").val(null);
  30. $("#gender").selectpicker('val', 1);
  31. $("#gender").selectpicker('refresh');
  32. $("#birthDay").val(null);
  33. $("#birthDay").attr("title", null);
  34. $("#phoneNum").val(null);
  35. $("#phoneNum").attr("title", null);
  36. $("#patientsNature").selectpicker('val', '01');//默认选中
  37. $('#patientsNature').selectpicker('refresh');
  38. $("#idCard").val(null);
  39. $("#idCard").attr("title", null);
  40. $("#address").val(null);
  41. $("#patientId").val(null);
  42. $("#editUser").hide();
  43. //默认光标在卡号输入框
  44. $("#cardNo").focus();
  45. initMzWorkTime();
  46. readonlyOrNot(false);
  47. });
  48. //加载候诊患者列表
  49. loadUnClinicTableList();
  50. //加载接诊中患者列表
  51. loadInClinicTableList();
  52. //加载已接诊患者列表
  53. loadClinicTableList();
  54. //每隔一分钟秒读加载候诊患者列表
  55. setInterval(function () {
  56. //加载候诊患者列表
  57. loadUnClinicTableList();
  58. }, 60000);
  59. //初始化快速接诊病人姓名栏事件
  60. initUserList();
  61. //初始化主诉弹出层
  62. initRecommendList();
  63. //卡号输入改变事件
  64. cardNoChange();
  65. /**
  66. * 患者信息修改
  67. */
  68. $("#saveEditUser").on("click", function (t) {
  69. modifyPatient();
  70. });
  71. /**
  72. * 挂号列表中的科室和医生列表初始化
  73. */
  74. initListSelect();
  75. //折叠按钮初始化
  76. $(".collapse-link").on("click", function () {
  77. var a = $(this).closest(".x_panel")
  78. , b = $(this).find("i")
  79. , c = a.find(".x_content");
  80. a.attr("style") ? c.slideToggle(200, function () {
  81. a.removeAttr("style").css("background", "#EBEBE4");
  82. }) : (c.slideToggle(200),
  83. a.css("height", "auto").css("background", "#EBEBE4")),
  84. b.toggleClass("fa-chevron-up fa-chevron-down")
  85. });
  86. initSmartWizard("wizard0");
  87. $(".actionBar").append("<div style='float: left'>金额:<span id='amount0'>61.92元</span></div>");
  88. /**
  89. * 接诊
  90. */
  91. $("#saveapidAccepts1").on("click", function (t) {
  92. var saveapidAccepts1 = $("#patientIdDb").val();
  93. clinicalReception(saveapidAccepts1);
  94. clearRapidAcceptsModal();
  95. $("#rapidAcceptsModal").modal("hide");
  96. });
  97. /**
  98. * 实例化智能问诊弹窗
  99. */
  100. // $("[data-toggle='popover']").popover();
  101. $("#box-arrow-left").popover({
  102. html: 'true',
  103. content: '<div id="smartAssistPopoverContent"></div>'
  104. });
  105. });
  106. /**
  107. * 关闭只能问诊弹框
  108. */
  109. function closePopover() {
  110. //$(".popover").popover('hide');
  111. $("#box-arrow-left").click();
  112. }
  113. /**
  114. * 加载只能问诊弹框内容
  115. */
  116. function contentMethod() {
  117. setTimeout(function () {
  118. $(".popover div.arrow").css("display", "none");
  119. var popoverId = $("#box-arrow-left").attr("aria-describedby");
  120. if (popoverId == undefined) {
  121. return;
  122. }
  123. var left = $("#" + popoverId).css("left");
  124. left = left.replace("px", "");
  125. left = parseInt(left);
  126. left = left + 55;
  127. $("#" + popoverId).css("height", "100%").css("top", "0px").css("left", left + "px").css("border-radius", "0px");
  128. $("#" + popoverId + " .popover-content").css("height", "100%");
  129. $("#smartAssistPopoverContent").css("height", "100%");
  130. var html = ' <div style="height: 34%;padding-left: 15px;width: 100%;">' +
  131. ' <button type="button" style="cursor: default;margin-bottom: 0px;margin-right: 0px; font-size: 12px;"' +
  132. ' class="btn btn-primary">' +
  133. ' <span id="patientHisData"></span>就医轨迹' +
  134. ' </button>' +
  135. ' <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" onclick="closePopover()">×</span>' +
  136. ' </button>' +
  137. ' <div style="height: calc(100% - 39px);border: 1px solid #DDDDDD;margin-top: 5px;width: 100%;">' +
  138. ' <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off"' +
  139. ' style="height: 100%;overflow-y: auto;width: 100%;text-align: -webkit-center;position: relative;" id="patientHisDataForm">' +
  140. ' </form>' +
  141. ' </div>' +
  142. ' </div>' +
  143. ' <div style="height: 33%;padding-left: 15px;">' +
  144. ' <button type="button" style="cursor: default;margin-bottom: 0px;margin-right: 0px;margin-top: 5px;"' +
  145. ' class="btn btn-primary">' +
  146. ' 推荐' +
  147. ' </button>' +
  148. ' <div style="height: calc(100% - 44px);border: 1px solid #DDDDDD;overflow-y: auto;margin-top: 5px;width: 100%;">' +
  149. ' <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off"' +
  150. ' style="height: 100%;overflow-y: auto;width: 100%;text-align: -webkit-center;position: relative;">' +
  151. ' <img src="/thmz/images/no-recommend.png" style="height: 120px;position: absolute;top: 50%;transform: translateY(-50%);margin-left: -30px;">' +
  152. ' </form>' +
  153. ' </div>' +
  154. ' </div>' +
  155. ' <div style="height: 33%;padding-left: 15px;" class="hide">' +
  156. ' <button type="button" style="cursor: default;margin-bottom: 0px;margin-right: 0px;margin-top: 5px;"' +
  157. ' class="btn btn-primary">' +
  158. ' 主诉推荐' +
  159. ' </button>' +
  160. ' <div style="height: calc(100% - 44px);border: 1px solid #DDDDDD;overflow-y: auto;margin-top: 5px;width: 100%;">' +
  161. ' <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off"' +
  162. ' style="height: 100%;overflow-y: auto;width: 100%;">' +
  163. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  164. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  165. ' title="畏寒发热咳嗽1周。">' +
  166. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  167. ' </div>' +
  168. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  169. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  170. ' <img' +
  171. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  172. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  173. ' </div>' +
  174. ' </div>' +
  175. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  176. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  177. ' title="畏寒发热咳嗽1周。">' +
  178. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  179. ' </div>' +
  180. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  181. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  182. ' <img' +
  183. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  184. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  185. ' </div>' +
  186. ' </div>' +
  187. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  188. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  189. ' title="畏寒发热咳嗽1周。">' +
  190. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  191. ' </div>' +
  192. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  193. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  194. ' <img' +
  195. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  196. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  197. ' </div>' +
  198. ' </div>' +
  199. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  200. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  201. ' title="畏寒发热咳嗽1周。">' +
  202. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  203. ' </div>' +
  204. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  205. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  206. ' <img' +
  207. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  208. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  209. ' </div>' +
  210. ' </div>' +
  211. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  212. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  213. ' title="畏寒发热咳嗽1周。">' +
  214. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  215. ' </div>' +
  216. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  217. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  218. ' <img' +
  219. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  220. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  221. ' </div>' +
  222. ' </div>' +
  223. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  224. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  225. ' title="畏寒发热咳嗽1周。">' +
  226. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  227. ' </div>' +
  228. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  229. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  230. ' <img' +
  231. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  232. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  233. ' </div>' +
  234. ' </div>' +
  235. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  236. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  237. ' title="畏寒发热咳嗽1周。">' +
  238. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  239. ' </div>' +
  240. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  241. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  242. ' <img' +
  243. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  244. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  245. ' </div>' +
  246. ' </div>' +
  247. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  248. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  249. ' title="畏寒发热咳嗽1周。">' +
  250. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  251. ' </div>' +
  252. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  253. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  254. ' <img' +
  255. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  256. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  257. ' </div>' +
  258. ' </div>' +
  259. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  260. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  261. ' title="畏寒发热咳嗽1周。">' +
  262. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  263. ' </div>' +
  264. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  265. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  266. ' <img' +
  267. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  268. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  269. ' </div>' +
  270. ' </div>' +
  271. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  272. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  273. ' title="畏寒发热咳嗽1周。">' +
  274. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  275. ' </div>' +
  276. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  277. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  278. ' <img' +
  279. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  280. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  281. ' </div>' +
  282. ' </div>' +
  283. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  284. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  285. ' title="畏寒发热咳嗽1周。">' +
  286. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  287. ' </div>' +
  288. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  289. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  290. ' <img' +
  291. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  292. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  293. ' </div>' +
  294. ' </div>' +
  295. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  296. ' <div style="margin-left: 10px;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 60px);"' +
  297. ' title="畏寒发热咳嗽1周。">' +
  298. ' 畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多' +
  299. ' </div>' +
  300. ' <div style="float: left;width: 36px;cursor: pointer;"' +
  301. ' onclick="fitAppeal(\'畏寒发热咳嗽1周。肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多\')">' +
  302. ' <img' +
  303. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  304. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  305. ' </div>' +
  306. ' </div>' +
  307. ' </form>' +
  308. ' </div>' +
  309. ' </div>' +
  310. ' <div style="height: 33%;padding-left: 15px;">' +
  311. ' <button type="button"' +
  312. ' style="cursor: default;margin-bottom: 0px;margin-right: 0px;margin-top: 5px; font-size: 12px;"' +
  313. ' class="btn btn-primary">' +
  314. ' 医疗范本' +
  315. ' </button>' +
  316. ' <div style="height: calc(100% - 44px);border: 1px solid #DDDDDD;overflow-y: auto;margin-top: 5px;width: 100%;">' +
  317. ' <form class="form-horizontal form-label-left mz-fixed-form" novalidate autocomplete="off"' +
  318. ' style="height: 100%;overflow-y: auto;width: 100%;">' +
  319. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  320. ' <div title="急性上呼吸道感染"' +
  321. ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
  322. ' 急性上呼吸道感染' +
  323. ' </div>' +
  324. ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
  325. ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
  326. ' style="cursor: pointer; color: #2e69eb;"' +
  327. ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
  328. ' </div>' +
  329. ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
  330. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  331. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  332. ' </div>' +
  333. ' </div>' +
  334. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  335. ' <div title="急性上呼吸道感染"' +
  336. ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
  337. ' 急性上呼吸道感染' +
  338. ' </div>' +
  339. ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
  340. ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
  341. ' style="cursor: pointer; color: #2e69eb;"' +
  342. ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
  343. ' </div>' +
  344. ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
  345. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  346. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  347. ' </div>' +
  348. ' </div>' +
  349. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  350. ' <div title="急性上呼吸道感染"' +
  351. ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
  352. ' 急性上呼吸道感染' +
  353. ' </div>' +
  354. ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
  355. ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
  356. ' style="cursor: pointer; color: #2e69eb;"' +
  357. ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
  358. ' </div>' +
  359. ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
  360. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  361. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  362. ' </div>' +
  363. ' </div>' +
  364. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  365. ' <div title="急性上呼吸道感染"' +
  366. ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
  367. ' 急性上呼吸道感染' +
  368. ' </div>' +
  369. ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
  370. ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
  371. ' style="cursor: pointer; color: #2e69eb;"' +
  372. ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
  373. ' </div>' +
  374. ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
  375. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  376. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  377. ' </div>' +
  378. ' </div>' +
  379. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  380. ' <div title="急性上呼吸道感染"' +
  381. ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
  382. ' 急性上呼吸道感染' +
  383. ' </div>' +
  384. ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
  385. ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
  386. ' style="cursor: pointer; color: #2e69eb;"' +
  387. ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
  388. ' </div>' +
  389. ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
  390. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  391. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  392. ' </div>' +
  393. ' </div>' +
  394. ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">' +
  395. ' <div title="急性上呼吸道感染"' +
  396. ' style="margin-left: 10px!important;float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 100px;">' +
  397. ' 急性上呼吸道感染' +
  398. ' </div>' +
  399. ' <div style="float: left;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 160px);"' +
  400. ' title="肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多">诊断:<a' +
  401. ' style="cursor: pointer; color: #2e69eb;"' +
  402. ' onclick="medicalModelModal(1)">肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多肺嗜酸性粒细胞增多</a>' +
  403. ' </div>' +
  404. ' <div style="float: left;width: 36px;cursor: pointer;" onclick="medicalModelModal(1)"><img' +
  405. ' src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/cursor-fill.svg"' +
  406. ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>' +
  407. ' </div>' +
  408. ' </div>' +
  409. ' </form>' +
  410. ' </div>' +
  411. ' </div>';
  412. $("#smartAssistPopoverContent").html(html);
  413. fitPatientHisData();
  414. }, 100);
  415. // setTimeout(function () {
  416. // $("#patientHisDataForm").html("aadsasfasdfasdfasdfasdfsdfasdfasdfasdfdfafda");
  417. // },1000);
  418. }
  419. /**
  420. * 设置患者的就诊轨迹
  421. */
  422. function fitPatientHisData() {
  423. if($("#patientId").val()==null || $("#patientId").val()==""){
  424. return;
  425. }
  426. $.ajax({
  427. type: "POST",
  428. url: '/thmz/getClinicWithPage',
  429. contentType: "application/json;charset=UTF-8",
  430. dataType: "json",
  431. data: JSON.stringify({
  432. "patientId": $("#patientId").val(),
  433. "clinicStatuses": [5, 6],
  434. "pageSize": 10000,
  435. "offset": 0,
  436. "beginDate": "2012-02-01 00:00:00",
  437. "endDate": format(new Date(), "yyyy-MM-dd HH:mm:ss")
  438. }),
  439. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  440. success: function (res) {
  441. if (res == '401' || res == 401) {
  442. window.location.href = '/thmz/login/view'
  443. return;
  444. }
  445. if (res.code == 0) {
  446. var html = '';
  447. var data = res.data;
  448. if (data == null || data.length == 0) {
  449. html = '<img src="/thmz/images/locus.png" style="height: 120px;position: absolute;top: 50%;transform: translateY(-50%);margin-left: -30px;">';
  450. } else {
  451. for (var i = 0; i < data.length; i++) {
  452. var icdText =data[i].icdText;
  453. if(icdText==null){
  454. // continue;
  455. icdText="空白诊断";
  456. }
  457. icdText=icdText.trim();
  458. html += ' <div class="item form-group thmz_alert" style="padding: 10px 0;width: 100%;">';
  459. html += ' <div style="float: left;width: 172px;">';
  460. html += ' <img src="/thmz/css/bootstrap/bootstrap-icons-1.5.0/stopwatch.svg"';
  461. html += ' style="margin-left: 10px!important;vertical-align: -.15em;margin-right: 10px!important;"/>';
  462. html += ' <span style="width: 120px;margin-right: 20px!important;">' + format(data[i].opDay, "yyyy-MM-dd HH:mm") + '</span>';
  463. html += ' </div>';
  464. html += ' <div style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 172px);"';
  465. html += ' title="' + icdText + '">诊断:<a style="cursor: pointer; color: #2e69eb;"';
  466. html += ' onclick="visitingDetailModal(1)">' + icdText + '</a>';
  467. html += ' </div>';
  468. html += ' </div>';
  469. }
  470. }
  471. $("#patientHisData").text($("#patientName").text()+"的");
  472. $("#patientHisDataForm").html(html);
  473. } else {
  474. errorMesage(res);
  475. }
  476. }
  477. });
  478. }
  479. /**
  480. * 清空快速接诊弹窗
  481. */
  482. function clearRapidAcceptsModal() {
  483. $("#rapidAcceptsUserName").val(null);
  484. $("#rapidAcceptsUserCode").val(null);
  485. $("#patientIdDb").val(null);
  486. $("#rapidAcceptsUserCardNo").val(null);
  487. $("#rapidAcceptsUserGender").selectpicker('val', 0);
  488. $("#rapidAcceptsUserGender").selectpicker('refresh');
  489. $("#rapidAcceptsUserPhoneNum").val(null);
  490. $("#rapidAcceptsUserIdCard").val(null);
  491. $("#rapidAcceptsUserIdCard").attr("title", null);
  492. $("#rapidAcceptsUserPhoneNum").attr("title", null);
  493. }
  494. /**
  495. * 清空接诊台用户信息
  496. */
  497. function clearUser() {
  498. $("#patientName").html("");
  499. $("#patientAge").html("");
  500. $("#patientGender").html("");
  501. $("#patientId").val(null);
  502. $("#patientPhone").html("");
  503. $("#patientPhoneLabel").hide();
  504. $("#patientResponseType").html("");
  505. $("#first").parent().addClass("checked");
  506. $("#not").parent().removeClass("checked");
  507. $("#patientHisData").text("");
  508. }
  509. /**
  510. * 卡号输入改变事件
  511. */
  512. function cardNoChange() {
  513. if (window.ActiveXObject || "ActiveXObject" in window) {
  514. $("#rapidAcceptsUserCardNo").on('input propertychange', function () {
  515. queryUserInfoByCardNo();
  516. });
  517. } else {
  518. $("#rapidAcceptsUserCardNo").on('input οninput', function () {
  519. queryUserInfoByCardNo();
  520. });
  521. }
  522. }
  523. /**
  524. * 刷新就诊列表
  525. */
  526. function refreshClinic() {
  527. loadInClinicTableList();
  528. loadClinicTableList();
  529. }
  530. /**
  531. * 加载接诊中患者列表
  532. */
  533. function loadInClinicTableList() {
  534. //loadCommonClinicTableList("tb_table_in_clinic","/thmz/getInClinicWithPage");
  535. loadCommonClinicTableList("tb_table_in_clinic", queryParamsInClinic);
  536. }
  537. /**
  538. * 加载已接诊患者列表
  539. */
  540. function loadClinicTableList() {
  541. //loadCommonClinicTableList("tb_table_clinic","/thmz/getClinicWithPage");
  542. loadCommonClinicTableList("tb_table_clinic", queryParamsClinic);
  543. }
  544. /**
  545. * 加载患者列表通用方法
  546. * @param id
  547. * @param queryParams
  548. */
  549. function loadCommonClinicTableList(id, queryParams) {
  550. $('#' + id).bootstrapTable('refresh');
  551. $('#' + id).bootstrapTable({
  552. url: "/thmz/getClinicWithPage", //请求后台的URL(*)
  553. method: 'post', //请求方式(*)
  554. toolbar: '#toolbar', //工具按钮用哪个容器
  555. striped: true, //是否显示行间隔色
  556. cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
  557. pagination: true, //是否显示分页(*)
  558. sortable: true, //是否启用排序
  559. sortOrder: "asc", //排序方式
  560. queryParams: queryParams, //传递参数(*)
  561. sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
  562. pageNumber: 1, //初始化加载第一页,默认第一页
  563. pageSize: 5, //每页的记录行数(*)
  564. pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
  565. search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
  566. strictSearch: true,
  567. showColumns: false, //是否显示所有的列
  568. showRefresh: false, //是否显示刷新按钮
  569. minimumCountColumns: 2, //最少允许的列数
  570. clickToSelect: true, //是否启用点击选中行
  571. uniqueId: "ID", //每一行的唯一标识,一般为主键列
  572. showToggle: false, //是否显示详细视图和列表视图的切换按钮
  573. cardView: false, //是否显示详细视图
  574. detailView: false,
  575. //rowStyle:rowStyle,//通过自定义函数设置行样式
  576. ajaxOptions: {
  577. headers: {
  578. 'Accept': 'application/json',
  579. 'Authorization': 'Bearer ' + localStorage.getItem("token")
  580. }
  581. },
  582. columns: [
  583. {
  584. field: 'patientName',
  585. title: '姓名/性别/年龄',
  586. align: "center",
  587. valign: 'middle',
  588. // sortable: true
  589. formatter: function (value, row, index) {
  590. return value + "/" + row.gender + "/" + row.age + "岁";
  591. }
  592. }, {
  593. field: 'opDay',
  594. title: '接诊时间',
  595. align: "center",
  596. valign: 'middle',
  597. // sortable: true
  598. formatter: function (value, row, index) {
  599. return format(value, "MM/dd HH:mm");
  600. }
  601. }
  602. , {
  603. title: '操作',
  604. align: "center",
  605. valign: 'middle',
  606. // sortable: true,
  607. formatter: function (value, row, index) {
  608. if (row.clinicStatus == 5) {
  609. return '<a title="修改" style="cursor: pointer"></a>修改&nbsp;<a title="详情">详情</a>';
  610. } else {
  611. return '<a title="接诊" onclick="clinicalReception(\'' + row.patientId + '\')" style="cursor: pointer">接诊</a>&nbsp;<a title="详情">详情</a>';
  612. }
  613. }
  614. }
  615. ],
  616. responseHandler: function (res) {
  617. if (res == '401' || res == 401) {
  618. window.location.href = '/thmz/login/view'
  619. return;
  620. }
  621. var ress = eval(res);
  622. if (ress.code == -1) {
  623. new PNotify({
  624. title: '错误提示',
  625. text: ress.message,
  626. type: 'error',
  627. hide: false,
  628. styling: 'bootstrap3'
  629. });
  630. return {
  631. "total": 0,//总页数
  632. "rows": {} //数据
  633. };
  634. }
  635. return {
  636. "total": ress.total,//总页数
  637. "rows": ress.data //数据
  638. };
  639. },
  640. onLoadSuccess: function (data) {
  641. $(".pagination-detail").css("display", "none");
  642. if (id == "tb_table_clinic") {
  643. $("#ClinicNum").html(data.total);
  644. } else {
  645. $("#inClinicNum").html(data.total);
  646. }
  647. }
  648. });
  649. }
  650. /**
  651. * 得到查询的参数
  652. * @param params
  653. * @returns {{mzyReqrec: {unitCode: string | number | string[] | undefined | jQuery, doctorCode: string | number | string[] | undefined | jQuery, name: string | number | string[] | undefined | jQuery}, beginTime: Date, endTime: Date, pageSize: *, pageIndex: number}}
  654. */
  655. function queryParamsInClinic(params) {
  656. var rePortRangeArr = getRePortRangeArr();
  657. var temp = {
  658. beginDate: rePortRangeArr[0],
  659. endDate: rePortRangeArr[1],
  660. commonParams: $("#userName").val(),
  661. clinicStatuses: [4],
  662. pageSize: params.limit,
  663. offset: params.offset
  664. };
  665. return temp;
  666. };
  667. /**
  668. * 得到查询的参数
  669. * @param params
  670. * @returns {{mzyReqrec: {unitCode: string | number | string[] | undefined | jQuery, doctorCode: string | number | string[] | undefined | jQuery, name: string | number | string[] | undefined | jQuery}, beginTime: Date, endTime: Date, pageSize: *, pageIndex: number}}
  671. */
  672. function queryParamsClinic(params) {
  673. var rePortRangeArr = getRePortRangeArr();
  674. var temp = {
  675. beginDate: rePortRangeArr[0],
  676. endDate: rePortRangeArr[1],
  677. commonParams: $("#userName").val(),
  678. clinicStatuses: [5, 6, 7],
  679. pageSize: params.limit,
  680. offset: params.offset
  681. };
  682. return temp;
  683. };
  684. /**
  685. * 加载待诊患者列表方法
  686. */
  687. function loadUnClinicTableList() {
  688. $('#tb_table_un_clinic').bootstrapTable('refresh');
  689. $('#tb_table_un_clinic').bootstrapTable({
  690. url: "/thmz/getUnClinicWithPage", //请求后台的URL(*)
  691. method: 'post', //请求方式(*)
  692. toolbar: '#toolbar', //工具按钮用哪个容器
  693. striped: true, //是否显示行间隔色
  694. cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
  695. pagination: true, //是否显示分页(*)
  696. sortable: true, //是否启用排序
  697. sortOrder: "asc", //排序方式
  698. queryParams: queryParamsUnClinic, //传递参数(*)
  699. sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
  700. pageNumber: 1, //初始化加载第一页,默认第一页
  701. pageSize: 5, //每页的记录行数(*)
  702. pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
  703. search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
  704. strictSearch: true,
  705. showColumns: false, //是否显示所有的列
  706. showRefresh: false, //是否显示刷新按钮
  707. minimumCountColumns: 2, //最少允许的列数
  708. clickToSelect: true, //是否启用点击选中行
  709. uniqueId: "ID", //每一行的唯一标识,一般为主键列
  710. showToggle: false, //是否显示详细视图和列表视图的切换按钮
  711. cardView: false, //是否显示详细视图
  712. detailView: false,
  713. //rowStyle:rowStyle,//通过自定义函数设置行样式
  714. ajaxOptions: {
  715. headers: {
  716. 'Accept': 'application/json',
  717. 'Authorization': 'Bearer ' + localStorage.getItem("token")
  718. }
  719. },
  720. columns: [
  721. {
  722. field: 'name',
  723. title: '姓名/性别/年龄',
  724. align: "center",
  725. valign: 'middle',
  726. // sortable: true
  727. formatter: function (value, row, index) {
  728. return value + "/" + row.gender + "/" + row.age + "岁";
  729. }
  730. }, {
  731. field: 'visitDate',
  732. title: '分诊时间',
  733. align: "center",
  734. valign: 'middle',
  735. // sortable: true
  736. formatter: function (value, row, index) {
  737. return format(value, "MM/dd HH:mm");
  738. }
  739. }
  740. , {
  741. title: '操作',
  742. align: "center",
  743. valign: 'middle',
  744. // sortable: true,
  745. formatter: function (value, row, index) {
  746. if (row.statusFlag == 0) {
  747. return '<a title="接诊">接诊</a>';
  748. } else {
  749. return '<a title="通知" onclick="editUserModal(\'' + row.patientId + '\')">通知</a>&nbsp;<a title="接诊" onclick="clinicalReception(\'' + row.patientId + '\')" style="cursor: pointer">接诊</a>';
  750. }
  751. }
  752. }
  753. ],
  754. responseHandler: function (res) {
  755. if (res == '401' || res == 401) {
  756. window.location.href = '/thmz/login/view'
  757. return;
  758. }
  759. var ress = eval(res);
  760. if (ress.code == -1) {
  761. new PNotify({
  762. title: '错误提示',
  763. text: ress.message,
  764. type: 'error',
  765. hide: false,
  766. styling: 'bootstrap3'
  767. });
  768. return {
  769. "total": 0,//总页数
  770. "rows": {} //数据
  771. };
  772. }
  773. return {
  774. "total": ress.total,//总页数
  775. "rows": ress.data //数据
  776. };
  777. },
  778. onLoadSuccess: function (data) {
  779. $(".pagination-detail").css("display", "none");
  780. $("#unClinicNum").html(data.total);
  781. }
  782. });
  783. }
  784. /**
  785. * 得到查询的参数
  786. * @param params
  787. * @returns {{mzyReqrec: {unitCode: string | number | string[] | undefined | jQuery, doctorCode: string | number | string[] | undefined | jQuery, name: string | number | string[] | undefined | jQuery}, beginTime: Date, endTime: Date, pageSize: *, pageIndex: number}}
  788. */
  789. function queryParamsUnClinic(params) {
  790. var temp = {
  791. pageSize: params.limit,
  792. pageIndex: params.offset / params.limit, //页码
  793. };
  794. return temp;
  795. };
  796. /**
  797. * 接诊方法
  798. * @param patientId
  799. */
  800. function clinicalReception(patientId) {
  801. var existPatientId = $("#patientId").val();
  802. if (existPatientId != null && existPatientId != "" && existPatientId != patientId) {
  803. $("#messageModal").modal();
  804. $("#messageButton").on("click", function (t) {
  805. $("#messageModal").modal("hide");
  806. clearWorkSpace();
  807. realClinicalReception(patientId)
  808. });
  809. } else {
  810. realClinicalReception(patientId)
  811. }
  812. }
  813. /**
  814. * 真实的接诊方法
  815. * @param patientId
  816. */
  817. function realClinicalReception(patientId) {
  818. $.ajax({
  819. type: "GET",
  820. url: '/thmz/getByPatientId?patientId=' + patientId,
  821. contentType: "application/json;charset=UTF-8",
  822. dataType: "json",
  823. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  824. success: function (res) {
  825. if (res == '401' || res == 401) {
  826. window.location.href = '/thmz/login/view'
  827. return;
  828. }
  829. if (res.code == 0) {
  830. if (res.data != null) {
  831. $("#patientName").html(res.data.name);
  832. $("#patientAge").html(res.data.age);
  833. $("#patientGender").html(res.data.gender);
  834. $("#patientId").val(patientId);
  835. if (res.data.phoneNo != null && res.data.phoneNo != '') {
  836. $("#patientPhone").html(res.data.phoneNo);
  837. $("#patientPhoneLabel").show();
  838. } else {
  839. $("#patientPhoneLabel").hide();
  840. }
  841. $("#patientResponseType").html(res.data.responseTypeName);
  842. if (res.data.times == 1) {
  843. $("#first").parent().addClass("checked");
  844. $("#not").parent().removeClass("checked");
  845. } else {
  846. $("#not").parent().addClass("checked");
  847. $("#first").parent().removeClass("checked");
  848. }
  849. $("#patientHisData").text(res.data.name);
  850. }
  851. } else {
  852. errorMesage(res);
  853. }
  854. }
  855. });
  856. }
  857. /**
  858. * 清空工作台
  859. */
  860. function clearWorkSpace() {
  861. //TODO
  862. clearUser();
  863. }
  864. /**
  865. * 就诊详情
  866. * @param id
  867. */
  868. function visitingDetailModal(id) {
  869. $("#visitingDetailModal").modal();
  870. }
  871. /**
  872. * 医疗范文
  873. * @param id
  874. */
  875. function medicalModelModal(id) {
  876. $("#medicalModelModal").modal();
  877. }
  878. /**
  879. * 填充主诉
  880. * @param appeal
  881. */
  882. function fitAppeal(appeal) {
  883. var symptom = $("#symptom").val();
  884. if (symptom != null && symptom != "") {
  885. if (confirm("主诉项已经录入,是否覆盖?")) {
  886. $("#symptom").val(appeal);
  887. }
  888. } else {
  889. $("#symptom").val(appeal);
  890. }
  891. }
  892. /**
  893. * 实例化处方分页
  894. * @param id
  895. */
  896. function initSmartWizard(id) {
  897. if (typeof ($.fn.smartWizard) === 'undefined') {
  898. return;
  899. }
  900. console.log('init_SmartWizard');
  901. $('#' + id).smartWizard();
  902. $('.buttonNext').addClass('btn btn-success');
  903. $('.buttonPrevious').addClass('btn btn-primary');
  904. $('.buttonFinish').addClass('btn btn-default');
  905. $(".stepContainer").css("height", "270px");
  906. $(".buttonFinish").css("display", "none");
  907. $(".buttonNext").html("下一个");
  908. $(".buttonPrevious").html("上一个");
  909. //动态设置微元素的高度
  910. $('<style>#' + id + ' a:before{top:10px; } </style>').appendTo('head')//这里写body也可以
  911. //$('<style> #wizard0 a:before,#wizard1 a:before,#wizard2 a:before{top:10px; } </style>').appendTo('head')//这里写body也可以
  912. };
  913. /**
  914. * 初始化性别下拉选
  915. */
  916. function initGenderSelect() {
  917. $(".selectpicker").selectpicker({
  918. dropuAuto: false
  919. });
  920. var gender = '<option value="1">男</option><option value="2">女</option><option value="0">未知</option>';
  921. $('#rapidAcceptsUserGender').html(gender);
  922. $('#rapidAcceptsUserGender').selectpicker('refresh');
  923. $('#editUserGender').html(gender);
  924. $('#editUserGender').selectpicker('refresh');
  925. }
  926. /**
  927. * 初始化病人身份类别下拉选
  928. */
  929. function initResponceTypeSelect() {
  930. $(".selectpicker").selectpicker({
  931. dropuAuto: false
  932. });
  933. $("#groupId").parent().css("width", "85px");
  934. $("#groupId1").parent().css("width", "85px");
  935. $("#groupId3").parent().css("width", "85px");
  936. $.ajax({
  937. type: "GET",
  938. url: '/thmz/getMzResponceType',
  939. contentType: "application/json;charset=UTF-8",
  940. dataType: "json",
  941. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  942. success: function (res) {
  943. if (res == '401' || res == 401) {
  944. window.location.href = '/thmz/login/view'
  945. return;
  946. }
  947. if (res.code == 0) {
  948. res.data.forEach(function (item, index) {
  949. var html = '<option value="' + item.code + '">' + item.name + '</option>';
  950. $('#patientsNature').append(html);
  951. $('#editUserPatientsNature').append(html);
  952. });
  953. $('#patientsNature').selectpicker('refresh');
  954. $('#editUserPatientsNature').selectpicker('refresh');
  955. } else {
  956. new PNotify({
  957. title: '错误提示',
  958. text: res.message,
  959. type: 'error',
  960. hide: false,
  961. styling: 'bootstrap3'
  962. });
  963. }
  964. }
  965. });
  966. }
  967. /**
  968. * 初始科室下拉选
  969. * @param ampm 时间段区间
  970. */
  971. function initDeptPlus() {
  972. //科室列表
  973. $.ajax({
  974. type: "GET",
  975. url: '/thmz/getUnitCodeByRequestDay?ampm=' + $("#ampm").val(),
  976. dataType: "json",
  977. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  978. success: function (data) {
  979. if (data == '401' || data == 401) {
  980. window.location.href = '/thmz/login/view'
  981. return;
  982. }
  983. var html = '';
  984. $.each(data.data, function (commentIndex, comment) {
  985. html += '<option value="' + comment.code + '">' + comment.name + '</option>';
  986. });
  987. $('#deptNo').empty();
  988. $('#deptNo').html(html);
  989. $('#deptNo').selectpicker('refresh');
  990. $('#chargeType').empty();
  991. $('#chargeType').selectpicker('refresh');
  992. emptyInput();
  993. }
  994. });
  995. }
  996. /**
  997. * 初始医生下拉选
  998. * @param ampm 时间段区间
  999. */
  1000. function initEmployee() {
  1001. //医生列表
  1002. $.ajax({
  1003. type: "GET",
  1004. url: '/thmz/getDoctorCodeByRequestDay?unitCode=' + $('#deptNo').val() + "&ampm=" + $("#ampm").val() + "&chargeType=" + $("#chargeType").val(),
  1005. dataType: "json",
  1006. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1007. success: function (res) {
  1008. if (res == '401' || res == 401) {
  1009. window.location.href = '/thmz/login/view'
  1010. return;
  1011. }
  1012. var html = '';
  1013. var flag = false;
  1014. $.each(res.data, function (commentIndex, comment) {
  1015. html += '<option value="' + comment.employee.employeeCode + '" data-chargeType="' + comment.chargeType + '" data-checkFee="' + comment.checkFee + '" data-mzyRequestId="' + comment.mzyRequestId + '">' + comment.employee.employeeName + '</option>';
  1016. if (comment.employeeCode == -1) {
  1017. flag = true;
  1018. }
  1019. });
  1020. $('#doctor').empty();
  1021. $('#doctor').html(html);
  1022. $('#doctor').selectpicker('refresh');
  1023. validator.checkAll($("#regi_form"));
  1024. if (flag) {
  1025. //如果有无需选择医生的选项,默认选择
  1026. $('#doctor').selectpicker('val', -1);
  1027. $('#doctor').selectpicker('refresh');
  1028. fitFee();
  1029. }
  1030. }
  1031. });
  1032. }
  1033. /**
  1034. * 初始门诊时间区间下拉选
  1035. */
  1036. function initMzWorkTime() {
  1037. $.ajax({
  1038. type: "GET",
  1039. url: '/thmz/getMzWorkTime',
  1040. dataType: "json",
  1041. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1042. success: function (res) {
  1043. if (res == '401' || res == 401) {
  1044. window.location.href = '/thmz/login/view'
  1045. return;
  1046. }
  1047. var html = '';
  1048. var ampm = null;
  1049. $.each(res.data, function (commentIndex, comment) {
  1050. html += '<option value="' + comment.code + '">' + comment.name + '</option>';
  1051. if (ampm == null || (ampm != "a" && ampm != "p")) {
  1052. var startTime = paseToFullTime(comment.startTime);
  1053. var endTime = paseToFullTime(comment.endTime);
  1054. if (range(startTime, endTime)) {
  1055. ampm = comment.code;
  1056. }
  1057. }
  1058. });
  1059. $('#ampm').empty(); //清空resText里面的所有内容
  1060. $('#ampm').html(html);
  1061. $('#ampm').selectpicker('refresh');
  1062. $("#ampm").selectpicker('val', ampm);
  1063. $('#ampm').selectpicker('refresh');
  1064. initDeptPlus();
  1065. }
  1066. });
  1067. }
  1068. /**
  1069. * 初始门诊号别下拉选
  1070. */
  1071. function initChargeType() {
  1072. $.ajax({
  1073. type: "GET",
  1074. url: '/thmz/getChargeTypeByRequestDay?unitCode=' + $('#deptNo').val() + "&ampm=" + $("#ampm").val(),
  1075. dataType: "json",
  1076. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1077. success: function (res) {
  1078. if (res == '401' || res == 401) {
  1079. window.location.href = '/thmz/login/view'
  1080. return;
  1081. }
  1082. var html = '';
  1083. $.each(res.data, function (commentIndex, comment) {
  1084. html += '<option value="' + comment.code + '">' + comment.name + '</option>';
  1085. });
  1086. $('#chargeType').empty(); //清空resText里面的所有内容
  1087. $('#chargeType').html(html);
  1088. $('#chargeType').selectpicker('refresh');
  1089. validator.checkAll($("#regi_form"));
  1090. emptyInput();
  1091. }
  1092. });
  1093. }
  1094. /**
  1095. * 设置挂号费等费用
  1096. */
  1097. function fitFee() {
  1098. var chargeType = $('#doctor').find("option:selected").attr('data-chargeType');
  1099. var checkFee = $('#doctor').find("option:selected").attr('data-checkFee');
  1100. $("#checkFee").val(checkFee);
  1101. $("#amountMoney").text(checkFee);
  1102. $("#amountMoneyConfirm").text(checkFee);
  1103. $("#realMoney").val(checkFee);
  1104. $("#cash").val(checkFee);
  1105. $("#changeAmount").val(0);
  1106. $.ajax({
  1107. type: "GET",
  1108. url: '/thmz/getMzChargeTypeByCode?code=' + chargeType,
  1109. dataType: "json",
  1110. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1111. success: function (res) {
  1112. if (res == '401' || res == 401) {
  1113. window.location.href = '/thmz/login/view'
  1114. return;
  1115. }
  1116. $("#registrationFee").val(res.data.reqFee);
  1117. $("#hospitalFee").val(res.data.clinicFee);
  1118. checkFee = parseFloat(checkFee) + parseFloat(res.data.reqFee) + parseFloat(res.data.clinicFee);
  1119. $("#amountMoney").text(checkFee);
  1120. $("#amountMoneyConfirm").text(checkFee);
  1121. $("#realMoney").val(checkFee);
  1122. $("#cash").val(checkFee);
  1123. }
  1124. });
  1125. }
  1126. /**
  1127. * 初始门诊收银方式下拉选
  1128. */
  1129. function initChequeType(payType) {
  1130. $.ajax({
  1131. type: "GET",
  1132. url: '/thmz/getAllZdChequeTypeForMz',
  1133. dataType: "json",
  1134. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1135. success: function (res) {
  1136. if (res == '401' || res == 401) {
  1137. window.location.href = '/thmz/login/view'
  1138. return;
  1139. }
  1140. var html = '';
  1141. $.each(res.data, function (commentIndex, comment) {
  1142. html += '<option value="' + comment.code + '">' + comment.name + '</option>';
  1143. });
  1144. $('#' + payType).empty();
  1145. $('#' + payType).html(html);
  1146. $('#' + payType).selectpicker('refresh');
  1147. }
  1148. });
  1149. }
  1150. /**
  1151. * 日期值改变修改年龄字段
  1152. * @param ev
  1153. */
  1154. function changeDate(ev) {
  1155. }
  1156. /**
  1157. * 列表类型按钮切换事件
  1158. * @param object
  1159. */
  1160. function titleButtonChange(object) {
  1161. $("#regi_List_btn_group").find("button").each(function (index, element) {
  1162. if ($(element).hasClass("btn-primary")) {
  1163. $(element).removeClass("btn-primary").addClass("btn-default");
  1164. }
  1165. });
  1166. $(object).removeClass("btn-default").addClass("btn-primary");
  1167. loadRegistrationList(true);
  1168. }
  1169. /**
  1170. * 表格类型切换事件 卡片展示或者列表形式
  1171. */
  1172. function listTypeChange(object) {
  1173. //var indexNum = 0;
  1174. $("#regi_List_type").find("button").each(function (index, element) {
  1175. if ($(element).hasClass("btn-primary")) {
  1176. $(element).removeClass("btn-primary").addClass("btn-default");
  1177. }
  1178. // if (object == element) {
  1179. // indexNum = index;
  1180. // }
  1181. });
  1182. $(object).removeClass("btn-default").addClass("btn-primary");
  1183. loadRegistrationList(true);
  1184. }
  1185. /**
  1186. * 打开编辑挂号信息窗口
  1187. * @param data
  1188. */
  1189. function editRegistration(data) {
  1190. $("#editRegiModal").modal();
  1191. }
  1192. /**
  1193. * 打开编辑用户信息窗口
  1194. * @param data
  1195. */
  1196. function editUserModal() {
  1197. $("#editUserModal").modal();
  1198. $.ajax({
  1199. type: "GET",
  1200. url: '/thmz/getByPatientId?patientId=' + $("#patientId").val(),
  1201. contentType: "application/json;charset=UTF-8",
  1202. dataType: "json",
  1203. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1204. success: function (res) {
  1205. if (res == '401' || res == 401) {
  1206. window.location.href = '/thmz/login/view'
  1207. return;
  1208. }
  1209. if (res.code == 0) {
  1210. if (res.data != null) {
  1211. //延时调用,因为当前弹框还没有加载出来,校验规则无法获取光标与模拟光标丢失事件,延时可以等弹框加载出来后模拟事件
  1212. setTimeout(function () {
  1213. fillPlusPatinet(res.data);
  1214. }, 400);
  1215. }
  1216. } else {
  1217. errorMesage(res);
  1218. }
  1219. }
  1220. });
  1221. }
  1222. /**
  1223. * 收费明细类型按钮切换事件
  1224. * @param object
  1225. * @param objectIndex
  1226. */
  1227. function billItemButtonChange(object, objectIndex) {
  1228. $("#bill_item_group").find("button").each(function (index, element) {
  1229. if ($(element).hasClass("btn-primary")) {
  1230. $(element).removeClass("btn-primary").addClass("btn-default");
  1231. }
  1232. if (index == objectIndex) {
  1233. var id = "wizard" + index;
  1234. $("#" + id).removeClass("hide").addClass("show");
  1235. initSmartWizard(id);
  1236. var amountId = "amount" + index;
  1237. if ($("#" + amountId).length <= 0) {
  1238. $($(".actionBar")[index]).append("<div style='float: left'>金额:<span id='" + amountId + "'>61.92元</span></div>");
  1239. }
  1240. $("#rp_form" + index).removeClass("hide").addClass("show");
  1241. } else {
  1242. $("#wizard" + index).removeClass("show").addClass("hide");
  1243. $("#rp_form" + index).removeClass("show").addClass("hide");
  1244. }
  1245. });
  1246. $(object).removeClass("btn-default").addClass("btn-primary");
  1247. // initChargeDetailTable();
  1248. //默认光标在卡号输入框
  1249. // $("#cardNo").focus();
  1250. }
  1251. /**
  1252. * 打开智能辅助医生系统窗口
  1253. * @param data
  1254. */
  1255. function smartAssistModal() {
  1256. //点击模态框外不关闭模态框
  1257. $("#smartAssistModal").modal({
  1258. backdrop: "false"
  1259. });
  1260. //$(".modal-backdrop").remove();
  1261. }
  1262. /**
  1263. * 打开退费信息窗口
  1264. * @param data
  1265. */
  1266. function backNoModal(data) {
  1267. $("#backNoModal").modal();
  1268. }
  1269. /**
  1270. * 打开打印窗口
  1271. * @param data
  1272. */
  1273. function printOrPreviewModal(data) {
  1274. $("#printOrPreviewModal").modal();
  1275. }
  1276. /**
  1277. * 打开打印内容窗口
  1278. * @param data
  1279. */
  1280. function printModal(data) {
  1281. $("#printOrPreviewModal").modal("hide");
  1282. $("#printModal").modal();
  1283. }
  1284. /**
  1285. * 打开快速接诊窗口
  1286. * @param data
  1287. */
  1288. function rapidAcceptsModal() {
  1289. $("#rapidAcceptsModal").modal();
  1290. //延迟触发 默认光标在卡号输入框
  1291. setTimeout('$("#rapidAcceptsUserCardNo").focus();', 500);
  1292. }
  1293. /**
  1294. * checkBox样式
  1295. */
  1296. function formatCheck() {
  1297. if ($("input.flat")[0]) {
  1298. $(document).ready(function () {
  1299. $('input.flat').iCheck({
  1300. checkboxClass: 'icheckbox_flat-blue',
  1301. radioClass: 'iradio_flat-blue'
  1302. });
  1303. });
  1304. }
  1305. }
  1306. /**
  1307. * 卡号有变化后查询病人信息
  1308. */
  1309. function queryUserInfoByCardNo() {
  1310. //当反写的id不存在,说明不是查询后的改变事件,触发查询
  1311. var rapidAcceptsUserCardNo = $("#rapidAcceptsUserCardNo").val();
  1312. var index = rapidAcceptsUserCardNo.indexOf("-");
  1313. if (($("#patientIdDb").val() == null || $("#patientIdDb").val() == "") && ((index > 0 && index == rapidAcceptsUserCardNo.length - 2) || rapidAcceptsUserCardNo.length == 8)) {
  1314. $("#cardNo").attr("title", rapidAcceptsUserCardNo);
  1315. $.ajax({
  1316. type: "GET",
  1317. url: '/thmz/getByIcCardNo?icCardNo=' + rapidAcceptsUserCardNo,
  1318. contentType: "application/json;charset=UTF-8",
  1319. dataType: "json",
  1320. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1321. success: function (res) {
  1322. if (res == '401' || res == 401) {
  1323. window.location.href = '/thmz/login/view'
  1324. return;
  1325. }
  1326. if (res.code == 0) {
  1327. if (res.data != null) {
  1328. $("#rapidAcceptsUserName").val(res.data.name);
  1329. $("#rapidAcceptsUserCode").val(res.data.patientId);
  1330. $("#patientIdDb").val(res.data.patientId);
  1331. $("#rapidAcceptsUserCardNo").val(res.data.icCardNo);
  1332. $("#rapidAcceptsUserGender").selectpicker('val', res.data.sex);
  1333. $("#rapidAcceptsUserGender").selectpicker('refresh');
  1334. $("#rapidAcceptsUserPhoneNum").val(res.data.phoneNo);
  1335. $("#rapidAcceptsUserIdCard").val(res.data.socialNo);
  1336. $("#rapidAcceptsUserIdCard").attr("title", res.data.socialNo);
  1337. $("#rapidAcceptsUserPhoneNum").attr("title", res.data.phoneNo);
  1338. } else {
  1339. errorMesageSimaple("病人信息不存在!");
  1340. }
  1341. } else {
  1342. errorMesage(res);
  1343. }
  1344. }
  1345. });
  1346. }
  1347. }
  1348. /**
  1349. * 清空快速接诊查询框
  1350. */
  1351. function clearRapidAccepts() {
  1352. $("#rapidAcceptsUserName").val(null);
  1353. $("#rapidAcceptsUserCode").val(null);
  1354. $("#patientIdDb").val(null);
  1355. $("#rapidAcceptsUserCardNo").val(null);
  1356. $("#rapidAcceptsUserGender").selectpicker('val', 0);
  1357. $("#rapidAcceptsUserGender").selectpicker('refresh');
  1358. $("#rapidAcceptsUserPhoneNum").val(null);
  1359. $("#rapidAcceptsUserIdCard").val(null);
  1360. $("#rapidAcceptsUserIdCard").attr("title", null);
  1361. $("#rapidAcceptsUserPhoneNum").attr("title", null);
  1362. $("#rapidAcceptsUserCardNo").focus();
  1363. }
  1364. /**
  1365. * 校验收款金额
  1366. */
  1367. function checkFee() {
  1368. var cash = parseFloat($("#cash").val());
  1369. var realMoney = parseFloat($("#realMoney").val());
  1370. realMoney = realMoney.toFixed(2);
  1371. $("#realMoney").val(realMoney)
  1372. if (cash < realMoney) {
  1373. new PNotify({
  1374. title: '错误提示',
  1375. text: "收款金额不能少于实收金额!",
  1376. type: 'error',
  1377. hide: true,
  1378. styling: 'bootstrap3'
  1379. });
  1380. } else if (cash > realMoney) {
  1381. if ($("#payType").val() == 1) {
  1382. var changeAmount = cash - realMoney;
  1383. $("#changeAmount").val(changeAmount.toFixed(2));
  1384. } else {
  1385. new PNotify({
  1386. title: '错误提示',
  1387. text: "非现金收款金额不能大于实收金额!",
  1388. type: 'error',
  1389. hide: true,
  1390. styling: 'bootstrap3'
  1391. });
  1392. }
  1393. }
  1394. //计算和设置折扣比例
  1395. var amountMoneyConfirm = parseFloat($("#amountMoneyConfirm").text());
  1396. var discount = realMoney / amountMoneyConfirm * 100;
  1397. $("#discount").text(discount.toFixed(2))
  1398. }
  1399. /**
  1400. * 根据病人姓名输入框内容动态加载病人列表
  1401. */
  1402. function initUserList() {
  1403. //var width=$("#userName").css("width");
  1404. var settings = {
  1405. trigger: 'click',
  1406. content: '',
  1407. width: 170,
  1408. multi: true,
  1409. closeable: false,
  1410. style: '',
  1411. delay: 300,
  1412. padding: true,
  1413. height: 300
  1414. };
  1415. var webuiPopover = $('#rapidAcceptsUserName').webuiPopover('destroy').webuiPopover(settings);
  1416. //用户姓名选中事件
  1417. $("#rapidAcceptsUserName").on("click", function (t) {
  1418. if ($(webuiPopover).css("display") == "block") {
  1419. refeshPatinetList(true);
  1420. }
  1421. });
  1422. }
  1423. /**
  1424. * 刷新候诊病人列表
  1425. */
  1426. function refeshPatinetList(flag) {
  1427. //如果是重新加载病人列表,需要重置下标
  1428. if (flag) {
  1429. //重置下标
  1430. pageIndex = 0;
  1431. msg_list_loading = true;
  1432. }
  1433. var userName = $('#rapidAcceptsUserName').val();
  1434. if (!(userName == null || userName == "" || isChinese(userName))) {
  1435. return;
  1436. }
  1437. $.ajax({
  1438. type: "POST",
  1439. url: '/thmz/getUnClinicWithPage',
  1440. contentType: "application/json;charset=UTF-8",
  1441. dataType: "json",
  1442. data: JSON.stringify({"name": userName, "pageIndex": pageIndex}),
  1443. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1444. success: function (res) {
  1445. if (res == '401' || res == 401) {
  1446. window.location.href = '/thmz/login/view'
  1447. return;
  1448. }
  1449. if (res.code == 0) {
  1450. if (res.data != null && res.data.length > 0) {
  1451. $("#webuiPopover0").css("display", "block");
  1452. $("#webuiPopover0 .webui-popover-content").css("max-height", "300px").css("height", "auto");
  1453. var html = '<div class="list-group">';
  1454. for (var i = 0; i < res.data.length; i++) {
  1455. var mzPatientMi = res.data[i];
  1456. html += '<a href="#" class="list-group-item list-group-item-action" onclick="fillUnClinicPatinet(\'' + mzPatientMi.patientId + '\')">';
  1457. if (mzPatientMi.gender == "男") {
  1458. html += '<img src="/thmz/images/boy.png"/>'
  1459. } else if (mzPatientMi.gender == "女") {
  1460. html += '<img src="/thmz/images/girl.png"/>'
  1461. } else if (mzPatientMi.gender == "未知" || mzPatientMi.gender == null) {
  1462. html += '<img src="/thmz/images/girl_or_boy.png"/>'
  1463. }
  1464. html += '<div>' + mzPatientMi.name + '&nbsp;' + mzPatientMi.gender + '&nbsp;';
  1465. if (mzPatientMi.age != null && mzPatientMi.age != "") {
  1466. html += mzPatientMi.age + '岁';
  1467. } else {
  1468. html += '**岁';
  1469. }
  1470. if (mzPatientMi.phoneNo != null && mzPatientMi.phoneNo != "") {
  1471. html += '<span>' + mzPatientMi.phoneNo + '</span>';
  1472. }
  1473. html += '</div></a>';
  1474. }
  1475. html += '</div>';
  1476. if (flag) {
  1477. $("#webuiPopover0 div.webui-popover-content").html("");
  1478. }
  1479. $("#webuiPopover0 div.webui-popover-content").append(html);
  1480. $("#webuiPopover0 div.arrow").css("left", "23px");
  1481. refeshPatinetListScrollEvent();
  1482. } else {
  1483. $("#webuiPopover0").css("display", "none");
  1484. }
  1485. }
  1486. //查询完成,设置加载完成
  1487. msg_list_loading = false;
  1488. }
  1489. });
  1490. }
  1491. /**
  1492. * 病人下拉列表滚动条滚动到底部时继续加载新纪录
  1493. */
  1494. function refeshPatinetListScrollEvent() {
  1495. $('.webui-popover-content').scroll(function (event) {
  1496. var top = $(this).scrollTop();
  1497. var height = $(this).height();
  1498. var scrollHeight = $(this).get(0).scrollHeight;
  1499. if (scrollHeight <= top + height) {
  1500. if (!msg_list_loading) {
  1501. msg_list_loading = true;
  1502. pageIndex = pageIndex + 1;
  1503. refeshPatinetList(false);
  1504. }
  1505. }
  1506. });
  1507. }
  1508. /**
  1509. * 按照病人id查询病人信息
  1510. * @param patientId
  1511. */
  1512. function fillUnClinicPatinet(patientId) {
  1513. $("#rapidAcceptsUserCardNo").val(patientId);
  1514. $("#webuiPopover0").css("display", "none");
  1515. queryUserInfoByCardNo();
  1516. }
  1517. /**
  1518. * 加载主诉窗口
  1519. */
  1520. function initRecommendList() {
  1521. var width = $("#symptom").parent().css("width");
  1522. var settings = {
  1523. placement: 'bottom-right',//值: auto,top,right,bottom,left,top-right,top-left,bottom-right,bottom-left 要显示的位置
  1524. trigger: 'click', //值:click,hover 触发方式
  1525. content: '',//内容,内容可以是函数
  1526. width: width,
  1527. multi: true,//在页面允许其他弹出层
  1528. closeable: true,//显示关闭按钮
  1529. style: '', //值:'',inverse
  1530. delay: 300,//延迟时间, 悬浮属性才执行
  1531. padding: true,//内容填充
  1532. height: 320
  1533. };
  1534. //主诉弹窗
  1535. var symptomWebuiPopover = $('#symptom').webuiPopover('destroy').webuiPopover(settings);
  1536. //体格检查弹窗
  1537. settings.height = 260;
  1538. $('#weight').webuiPopover('destroy').webuiPopover(settings);
  1539. //诊断弹窗
  1540. settings.height = 320;
  1541. var diagnoseWebuiPopover = $('#diagnose').webuiPopover('destroy').webuiPopover(settings);
  1542. //用户姓名选中事件
  1543. $("#symptom").on("click", function (t) {
  1544. if ($(symptomWebuiPopover).css("display") == "block") {
  1545. $("#webuiPopover1 div.arrow").css("left", "23px");
  1546. var html = '<span style="font-size: 18px;margin-left: 20px!important;color: #2e69eb!important;line-height: 50px;">主诉</span>';
  1547. html += "<div style='width: 100%;height:210px;overflow-y: auto;padding: 0px 20px;' id='contentHtml'>";
  1548. html += "</div>";
  1549. html += '<div style="height: 60px; line-height: 60px; font-size: 14px;">' +
  1550. '<div style="float: left">' +
  1551. '<span style="margin-left: 20px;">内容:</span> ' +
  1552. '</div>' +
  1553. '<div style="float: left;">' +
  1554. '<select class="form-control selectpicker show-tick" id="paramsType" dropupAuto="true">' +
  1555. '<option label="常用症状" value="0">常用症状</option>' +
  1556. '<option label="常用时间" value="1">常用时间</option>' +
  1557. '<option label="常用标点" value="2">常用标点</option>' +
  1558. '<option label="常用词" value="3">常用词</option>' +
  1559. '</select> ' +
  1560. '</div>' +
  1561. '<div style="width: 200px;float: left;margin-left: 10px;">' +
  1562. '<input id="paramsNameInput" class="form-control" type="text" style="position: relative;top: 13px;height: 34px;">' +
  1563. '</div>' +
  1564. '<div style="float: left;margin-left: 10px;">' +
  1565. ' <button type="button" class="btn" onclick="saveParams();"' +
  1566. ' style="height: 30px;line-height: 15px;border-color: #2e69eb!important;color: #2e69eb;background-color: white;">' +
  1567. ' <svg class="bi" width="1em" height="1em" fill="currentColor" style="vertical-align: -.15em;margin-right: 10px!important;color: #2e69eb;">' +
  1568. ' <use xlink:href="/thmz/css/bootstrap/bootstrap-icons-1.5.0/bootstrap-icons.svg#plus-circle"></use>' +
  1569. ' </svg>' +
  1570. '新增' +
  1571. ' </button>' +
  1572. ' </div>' +
  1573. '</div>';
  1574. $("#webuiPopover1 div.webui-popover-content").append(html);
  1575. $('#paramsType').selectpicker('refresh');
  1576. $("#paramsType").parent().css("width", "140px").css("height", "34px");
  1577. loadSymptom();
  1578. }
  1579. });
  1580. //体格检查各输入框选中事件
  1581. $("#weight,#temperature,#sphygmus,#breathe,#pressure_high,#pressure_floor").on("click", function (t) {
  1582. if ($("#webuiPopover2").css("display") == "block") {
  1583. $("#webuiPopover2").css("left", $("#webuiPopover1").css("left"));
  1584. if ($("#healthCheckupContentHtml").html() == null || $("#healthCheckupContentHtml").html() == "") {
  1585. $("#webuiPopover2 div.arrow").css("left", "23px");
  1586. var html = '<span style="font-size: 18px;margin-left: 20px!important;color: #2e69eb!important;line-height: 50px;">体格检查</span>';
  1587. html += "<div style='width: 100%;height:210px;overflow-y: auto;padding: 0px 20px;' id='healthCheckupContentHtml'>";
  1588. html += "</div>";
  1589. $("#webuiPopover2 div.webui-popover-content").append(html);
  1590. loadHealthCheckup();
  1591. }
  1592. //loadSymptom();
  1593. } else {
  1594. $('#weight').webuiPopover('show');
  1595. $("#webuiPopover2").css("left", $("#webuiPopover1").css("left"));
  1596. if ($("#healthCheckupContentHtml").html() == null || $("#healthCheckupContentHtml").html() != "") {
  1597. $("#webuiPopover2 div.arrow").css("left", "23px");
  1598. var html = '<span style="font-size: 18px;margin-left: 20px!important;color: #2e69eb!important;line-height: 50px;">体格检查</span>';
  1599. html += "<div style='width: 100%;height:210px;overflow-y: auto;padding: 0px 20px;' id='healthCheckupContentHtml'>";
  1600. html += "</div>";
  1601. $("#webuiPopover2 div.webui-popover-content").append(html);
  1602. loadHealthCheckup();
  1603. }
  1604. }
  1605. return false;
  1606. });
  1607. //诊断选中事件
  1608. $("#diagnose").on("click", function (t) {
  1609. if ($(diagnoseWebuiPopover).css("display") == "block") {
  1610. $("#webuiPopover3 div.arrow").css("left", "23px");
  1611. $("#webuiPopover3 a.close").css("margin-top", "15px");
  1612. var html = '<span style="font-size: 18px;margin-left: 20px!important;color: #2e69eb!important;line-height: 50px;">诊断</span>';
  1613. html += '<div class="form-group has-feedback" style="float: right;width: 300px;margin-right: 20px;margin-top: 10px;">' +
  1614. ' <input type="text" class="form-control has-feedback-left" ' +
  1615. ' placeholder="搜索" style="padding-left: 10px;" oninput="loadDiagnose(this.value)" id="paramsDiagnose">' +
  1616. ' <span class="fa fa-search form-control-feedback right" aria-hidden="true" style="right: 0px;"></span>' +
  1617. ' </div>';
  1618. html += "<div style='width: 100%;height:210px;overflow-y: auto;padding: 0px 20px;' id='diagnoseContentHtml'>";
  1619. html += "</div>";
  1620. $("#webuiPopover3 div.webui-popover-content").append(html);
  1621. $("#paramsDiagnose").on('input propertychange', loadDiagnose($("#paramsDiagnose").val()));
  1622. loadDiagnose("");
  1623. }
  1624. });
  1625. }
  1626. /**
  1627. * 新增通用参数
  1628. */
  1629. function saveParams() {
  1630. $.ajax({
  1631. type: "POST",
  1632. url: '/thmz/saveTCommonParams',
  1633. contentType: "application/json;charset=UTF-8",
  1634. dataType: "json",
  1635. data: JSON.stringify({
  1636. "paramsType": $("#paramsType").val(),
  1637. "paramsName": $("#paramsNameInput").val()
  1638. }),
  1639. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1640. success: function (res) {
  1641. if (res == '401' || res == 401) {
  1642. window.location.href = '/thmz/login/view'
  1643. return;
  1644. }
  1645. if (res.code == 0) {
  1646. successMesage(res);
  1647. loadSymptom();
  1648. $("#paramsNameInput").val(null);
  1649. // $("#paramsType").selectpicker('val', 0);
  1650. // $("#paramsType").selectpicker('refresh');
  1651. } else {
  1652. errorMesage(res);
  1653. }
  1654. }
  1655. });
  1656. }
  1657. /**
  1658. * 加载主诉参数列表
  1659. */
  1660. function loadSymptom() {
  1661. $.ajax({
  1662. type: "GET",
  1663. url: '/thmz/loadSymptom',
  1664. contentType: "application/json;charset=UTF-8",
  1665. dataType: "json",
  1666. async: false,
  1667. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1668. success: function (res) {
  1669. if (res == '401' || res == 401) {
  1670. window.location.href = '/thmz/login/view'
  1671. return;
  1672. }
  1673. var html = '';
  1674. if (res.code == 0) {
  1675. if (res.featureList != null && res.featureList.length > 0) {
  1676. html += '<div id="feature">';
  1677. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">常用症状:</div>';
  1678. html += '<div style="width: calc(100% - 80px); float: left;">';
  1679. for (var i = 0; i < res.featureList.length; i++) {
  1680. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.featureList[i].paramsName + '\',\'symptom\')"><span style="padding: 0px 5px;">';
  1681. html += res.featureList[i].paramsName;
  1682. html += '</span></button>';
  1683. }
  1684. html += '</div><div style="clear:both"></div></div>';
  1685. }
  1686. if (res.timeList != null && res.timeList.length > 0) {
  1687. html += '<div id="time">';
  1688. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">常用时间:</div>';
  1689. html += '<div style="width: calc(100% - 80px); float: left;">';
  1690. for (var i = 0; i < res.timeList.length; i++) {
  1691. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.timeList[i].paramsName + '\',\'symptom\')"><span style="padding: 0px 5px;">';
  1692. html += res.timeList[i].paramsName;
  1693. html += '</span></button>';
  1694. }
  1695. html += '</div><div style="clear:both"></div></div>';
  1696. }
  1697. if (res.characterList != null && res.characterList.length > 0) {
  1698. html += '<div id="character">';
  1699. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">常用标点:</div>';
  1700. html += '<div style="width: calc(100% - 80px); float: left;">';
  1701. for (var i = 0; i < res.characterList.length; i++) {
  1702. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.characterList[i].paramsName + '\',\'symptom\')"><span style="padding: 0px 5px;">';
  1703. html += res.characterList[i].paramsName;
  1704. html += '</span></button>';
  1705. }
  1706. html += '</div><div style="clear:both"></div></div>';
  1707. }
  1708. if (res.wordsList != null && res.wordsList.length > 0) {
  1709. html += '<div id="words">';
  1710. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">常用词:</div>';
  1711. html += '<div style="width: calc(100% - 80px); float: left;">';
  1712. for (var i = 0; i < res.wordsList.length; i++) {
  1713. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.wordsList[i].paramsName + '\',\'symptom\')"><span style="padding: 0px 5px;">';
  1714. html += res.wordsList[i].paramsName;
  1715. html += '</span></button>';
  1716. }
  1717. html += '</div><div style="clear:both"></div></div>';
  1718. }
  1719. } else {
  1720. errorMesage(res);
  1721. }
  1722. $("#contentHtml").html(html);
  1723. }
  1724. });
  1725. }
  1726. /**
  1727. * 加载体格检查参数列表
  1728. */
  1729. function loadHealthCheckup() {
  1730. $.ajax({
  1731. type: "GET",
  1732. url: '/thmz/loadHealthCheckup',
  1733. contentType: "application/json;charset=UTF-8",
  1734. dataType: "json",
  1735. async: false,
  1736. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1737. success: function (res) {
  1738. if (res == '401' || res == 401) {
  1739. window.location.href = '/thmz/login/view'
  1740. return;
  1741. }
  1742. var html = '';
  1743. if (res.code == 0) {
  1744. if (res.weightList != null && res.weightList.length > 0) {
  1745. html += '<div id="weightDiv">';
  1746. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">体重:</div>';
  1747. html += '<div style="width: calc(100% - 80px); float: left;">';
  1748. for (var i = 0; i < res.weightList.length; i++) {
  1749. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.weightList[i].paramsName + '\',\'weight\')"><span style="padding: 0px 5px;">';
  1750. html += res.weightList[i].paramsName;
  1751. html += '</span></button>';
  1752. }
  1753. html += '</div><div style="clear:both"></div></div>';
  1754. }
  1755. if (res.temperatureList != null && res.temperatureList.length > 0) {
  1756. html += '<div id="temperatureDiv">';
  1757. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">体温:</div>';
  1758. html += '<div style="width: calc(100% - 80px); float: left;">';
  1759. for (var i = 0; i < res.temperatureList.length; i++) {
  1760. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.temperatureList[i].paramsName + '\',\'temperature\')"><span style="padding: 0px 5px;">';
  1761. html += res.temperatureList[i].paramsName;
  1762. html += '</span></button>';
  1763. }
  1764. html += '</div><div style="clear:both"></div></div>';
  1765. }
  1766. if (res.sphygmusList != null && res.sphygmusList.length > 0) {
  1767. html += '<div id="sphygmusDiv">';
  1768. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">脉搏:</div>';
  1769. html += '<div style="width: calc(100% - 80px); float: left;">';
  1770. for (var i = 0; i < res.sphygmusList.length; i++) {
  1771. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.sphygmusList[i].paramsName + '\',\'sphygmus\')"><span style="padding: 0px 5px;">';
  1772. html += res.sphygmusList[i].paramsName;
  1773. html += '</span></button>';
  1774. }
  1775. html += '</div><div style="clear:both"></div></div>';
  1776. }
  1777. if (res.breatheList != null && res.breatheList.length > 0) {
  1778. html += '<div id="breatheDiv">';
  1779. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">呼吸:</div>';
  1780. html += '<div style="width: calc(100% - 80px); float: left;">';
  1781. for (var i = 0; i < res.breatheList.length; i++) {
  1782. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.breatheList[i].paramsName + '\',\'breathe\')"><span style="padding: 0px 5px;">';
  1783. html += res.breatheList[i].paramsName;
  1784. html += '</span></button>';
  1785. }
  1786. html += '</div><div style="clear:both"></div></div>';
  1787. }
  1788. if (res.pressureList != null && res.pressureList.length > 0) {
  1789. html += '<div id="pressureDiv">';
  1790. html += '<div style="width: 80px; line-height: 25px; float: left;font-size: 16px;">呼吸:</div>';
  1791. html += '<div style="width: calc(100% - 80px); float: left;">';
  1792. for (var i = 0; i < res.pressureList.length; i++) {
  1793. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitValue(\'' + res.pressureList[i].paramsName + '\',\'pressure_\')"><span style="padding: 0px 5px;">';
  1794. html += res.pressureList[i].paramsName;
  1795. html += '</span></button>';
  1796. }
  1797. html += '</div><div style="clear:both"></div></div>';
  1798. }
  1799. } else {
  1800. errorMesage(res);
  1801. }
  1802. $("#healthCheckupContentHtml").html(html);
  1803. }
  1804. });
  1805. }
  1806. /**
  1807. * 加载诊断参数列表
  1808. * @param value
  1809. */
  1810. function loadDiagnose(value) {
  1811. $.ajax({
  1812. type: "GET",
  1813. url: '/thmz/getTCommonParamsByParamsType?paramsType=4&commonParams=' + value,
  1814. contentType: "application/json;charset=UTF-8",
  1815. dataType: "json",
  1816. async: false,
  1817. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1818. success: function (res) {
  1819. if (res == '401' || res == 401) {
  1820. window.location.href = '/thmz/login/view'
  1821. return;
  1822. }
  1823. var html = '';
  1824. if (res.code == 0) {
  1825. if (res.data != null && res.data.length > 0) {
  1826. html += '<div>';
  1827. for (var i = 0; i < res.data.length; i++) {
  1828. html += '<button type="button" class="button_color" style="background-color: rgb(255, 255, 255);border: none;" onclick="fitDiagnoseValue(\'' + res.data[i].paramsName + '\',\'' + res.data[i].paramsCode + '\')"><span style="padding: 0px 5px;font-size: 20px;">';
  1829. html += res.data[i].paramsName;
  1830. html += '<small>&nbsp;&nbsp;(' + res.data[i].paramsCode + ')</small>';
  1831. html += '</span></button>';
  1832. }
  1833. html += '</div>';
  1834. }
  1835. } else {
  1836. errorMesage(res);
  1837. }
  1838. $("#diagnoseContentHtml").html(html);
  1839. }
  1840. });
  1841. }
  1842. /**
  1843. * 填充诊断
  1844. * @param value
  1845. * @param code
  1846. */
  1847. function fitDiagnoseValue(value, code) {
  1848. var html = '';
  1849. var childrenNum = $("#diagnoseTags").children().length;
  1850. if (childrenNum == 3) {
  1851. errorMesageSimaple("最多填写三个诊断!");
  1852. return;
  1853. }
  1854. if (childrenNum == 0) {
  1855. html += '<span class="el-tag--mainDiagnosis" ';
  1856. } else {
  1857. html += '<span class="el-tag--secondaryDiagnosis" ';
  1858. }
  1859. html += ' title="' + value + '(' + code + ')" id="' + code + '"><span class="el-select__tags-text">' + value + '</span><i class="fa fa-remove .el-icon-close" style="margin-left: 10px;height: 16px;width: 16px;" onclick="removeDiagnoseValue(\'' + code + '\')"></i><span style="clear: both"></span></span>';
  1860. $("#diagnoseTags").append(html);
  1861. var diagnoseValue = $("#diagnoseValue").val();
  1862. if (diagnoseValue == null || diagnoseValue == "") {
  1863. diagnoseValue = code;
  1864. } else {
  1865. diagnoseValue += "," + code;
  1866. }
  1867. $("#diagnoseValue").val(diagnoseValue);
  1868. }
  1869. /**
  1870. * 移除诊断
  1871. * @param code
  1872. */
  1873. function removeDiagnoseValue(code) {
  1874. var childrenIndex = 0;
  1875. var children = $("#diagnoseTags").children();
  1876. for (var i = 0; i < children.length; i++) {
  1877. if ($(children[i]).attr("id") == code) {
  1878. childrenIndex = i;
  1879. break;
  1880. }
  1881. }
  1882. $($("#diagnoseTags").children("span")[childrenIndex]).remove();
  1883. if (childrenIndex == 0) {
  1884. $($("#diagnoseTags").children("span")[childrenIndex]).removeClass("el-tag--secondaryDiagnosis").addClass("el-tag--mainDiagnosis");
  1885. }
  1886. var diagnoseValue = $("#diagnoseValue").val();
  1887. $("#diagnoseValue").val(diagnoseValue.replace(code, ""));
  1888. }
  1889. /**
  1890. * 点击通用参数属性值时设置值到对应的区域
  1891. * @param value
  1892. * @param id
  1893. */
  1894. function fitValue(value, id) {
  1895. //当选择的是血压时
  1896. if (id == "pressure_") {
  1897. var arr = value.split("/");
  1898. $("#pressure_high").val(arr[0]);
  1899. $("#pressure_floor").val(arr[1]);
  1900. //当选的是体重,体温,脉搏和呼吸时
  1901. } else if (id == "weight" || id == "temperature" || id == "sphygmus" || id == "breathe") {
  1902. $("#" + id).val(value);
  1903. } else {
  1904. //主诉拼写时
  1905. var valueExist = $("#" + id).val();
  1906. if (valueExist != null && valueExist != "") {
  1907. value = valueExist + value;
  1908. }
  1909. $("#" + id).val(value);
  1910. }
  1911. }
  1912. function getByPatientId(patientId) {
  1913. $.ajax({
  1914. type: "GET",
  1915. url: '/thmz/getByPatientId?patientId=' + patientId,
  1916. contentType: "application/json;charset=UTF-8",
  1917. dataType: "json",
  1918. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  1919. success: function (res) {
  1920. if (res == '401' || res == 401) {
  1921. window.location.href = '/thmz/login/view'
  1922. return;
  1923. }
  1924. if (res.code == 0) {
  1925. if (res.data != null) {
  1926. $("#cardNo").val(res.data.icCardNo);
  1927. $("#cardNo").attr("title", res.data.icCardNo);
  1928. $("#cardNo").blur();
  1929. $("#userName").val(res.data.name);
  1930. $("#userName").blur();
  1931. $("#userNameReadOnly").val(res.data.name);
  1932. $("#age").val(res.data.age);
  1933. $("#age").blur();
  1934. $("#gender").selectpicker('val', res.data.sex);
  1935. $("#gender").selectpicker('refresh');
  1936. $("#gender").blur();
  1937. $("#birthDayReadonly").val(res.data.birthDayStr);
  1938. $("#birthDayReadonly").attr("title", res.data.birthDayStr);
  1939. $("#birthDayReadonly").blur();
  1940. $("#birthDay").val(res.data.birthDayStr);
  1941. $("#birthDay").blur();
  1942. $("#phoneNum").val(res.data.phoneNo);
  1943. $("#phoneNum").attr("title", res.data.phoneNo);
  1944. $("#phoneNum").blur();
  1945. $("#patientsNature").selectpicker('val', res.data.responseType);//默认选中
  1946. $('#patientsNature').selectpicker('refresh');
  1947. $("#patientsNature").blur();
  1948. $("#idCard").val(res.data.socialNo);
  1949. $("#idCard").attr("title", res.data.socialNo);
  1950. $("#idCard").blur();
  1951. $("#address").val(res.data.address);
  1952. $("#address").blur();
  1953. $("#patientId").val(res.data.patientId);
  1954. if (res.data.name != null && res.data.name != "") {
  1955. $("#editUser").show();
  1956. }
  1957. readonlyOrNot(true);
  1958. }
  1959. } else {
  1960. errorMesage(res);
  1961. }
  1962. }
  1963. });
  1964. }
  1965. /**
  1966. * 将病人信息填入患者信息修改form
  1967. * @param patinet
  1968. */
  1969. function fillPlusPatinet(patinet) {
  1970. if (patinet != null) {
  1971. $("#editUserCode").val(patinet.patientId);
  1972. $("#editUserName").val(patinet.name);
  1973. $("#editUserName").blur();
  1974. $("#editUserAge").val(patinet.age);
  1975. $("#editUserAge").blur();
  1976. $("#editUserGender").selectpicker('val', patinet.sex);
  1977. $("#editUserGender").selectpicker('refresh');
  1978. $("#editUserGender").blur();
  1979. $("#editUserBirthDay").val(patinet.birthDayStr);
  1980. $("#editUserBirthDay").blur();
  1981. $("#editUserCardNo").val(patinet.icCardNo);
  1982. $("#editUserCardNo").attr("title", patinet.icCardNo);
  1983. $("#editUserCardNo").blur();
  1984. $("#editUserPhoneNum").val(patinet.phoneNo);
  1985. $("#editUserPhoneNum").attr("title", patinet.phoneNo);
  1986. $("#editUserPhoneNum").blur();
  1987. $("#editUserPatientsNature").selectpicker('val', patinet.responseType);//默认选中
  1988. $('#editUserPatientsNature').selectpicker('refresh');
  1989. $("#editUserPatientsNature").blur();
  1990. $("#editUserIdCard").val(patinet.socialNo);
  1991. $("#editUserIdCard").attr("title", patinet.socialNo);
  1992. $("#editUserIdCard").blur();
  1993. $("#editUserAddress").val(patinet.address);
  1994. $("#editUserAddress").blur();
  1995. $("#editUserContact").val(patinet.relName);
  1996. $("#editUserContactPhone").val(patinet.contractName);
  1997. }
  1998. }
  1999. /**
  2000. * 关闭当前这个付款方式
  2001. */
  2002. function closeThisParent(obj) {
  2003. $(obj).parent().parent().remove();
  2004. }
  2005. /**
  2006. * 科室与时间区间下拉选改变时清空输入框内容
  2007. */
  2008. function emptyInput() {
  2009. $('#doctor').empty();
  2010. $('#doctor').selectpicker('refresh');
  2011. $("#registrationFee").val(0.00);
  2012. $("#hospitalFee").val(0.00);
  2013. $("#checkFee").val(0.00);
  2014. $("#amountMoney").text(0.00);
  2015. $("#amountMoneyConfirm").text(0.00);
  2016. $("#realMoney").val(0.00);
  2017. }
  2018. /**
  2019. * 给某些域增加title或者清除title
  2020. * @param obj
  2021. */
  2022. function clearTextOrTitle(obj) {
  2023. if ($(obj).val() == null || $(obj).val().length == 0) {
  2024. $(obj).attr("title", null);
  2025. } else {
  2026. $(obj).attr("title", $(obj).val());
  2027. if ($(obj).attr("id") == "birthDay") {
  2028. $(obj).blur()
  2029. }
  2030. }
  2031. }
  2032. /**
  2033. * 当按照卡号查询时,病人信息输入框不可编辑,当清空输入框时可编辑
  2034. * @param flag
  2035. */
  2036. function readonlyOrNot(flag) {
  2037. if (flag) {
  2038. $("#cardNo").attr("readonly", "readonly");
  2039. $("#userName").attr("readonly", "readonly");
  2040. $("#age").attr("readonly", "readonly");
  2041. $("#gender").attr("disabled", "disabled");
  2042. $("#phoneNum").attr("readonly", "readonly");
  2043. $("#patientsNature").attr("disabled", "disabled");
  2044. $("#idCard").attr("readonly", "readonly");
  2045. $("#address").attr("readonly", "readonly");
  2046. $("#birthDayReadonly").removeClass("hide").addClass("in");
  2047. $("#birthDayGroup").removeClass("in").addClass("hide");
  2048. $("#userName").removeClass("in").addClass("hide");
  2049. $("#userNameReadOnly").removeClass("hide").addClass("in");
  2050. $("#webuiPopover0").css("display", "none");
  2051. } else {
  2052. $("#cardNo").removeAttr("readonly");
  2053. $("#userName").removeAttr("readonly");
  2054. $("#age").removeAttr("readonly");
  2055. $("#gender").removeAttr("disabled");
  2056. $("#gender").next().removeClass("disabled");
  2057. $("#phoneNum").removeAttr("readonly");
  2058. $("#patientsNature").removeAttr("disabled");
  2059. $("#patientsNature").next().removeClass("disabled");
  2060. $("#idCard").removeAttr("readonly");
  2061. $("#address").removeAttr("readonly");
  2062. $("#birthDayReadonly").removeClass("in").addClass("hide");
  2063. $("#birthDayGroup").removeClass("hide").addClass("in");
  2064. $("#userName").removeClass("hide").addClass("in");
  2065. $("#userNameReadOnly").removeClass("in").addClass("hide");
  2066. //$("#webuiPopover0").css("display", "block");
  2067. }
  2068. }
  2069. /**
  2070. * 保存窗口号
  2071. */
  2072. function saveWindows() {
  2073. $.ajax({
  2074. type: "POST",
  2075. url: '/thmz/saveWindows',
  2076. contentType: "application/json;charset=UTF-8",
  2077. dataType: "json",
  2078. data: JSON.stringify({"windowsNo": $("#windowsNum").val()}),
  2079. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  2080. success: function (res) {
  2081. if (res == '401' || res == 401) {
  2082. window.location.href = '/thmz/login/view'
  2083. return;
  2084. }
  2085. $('#editWindowsModal').modal('hide');
  2086. if (res.code == 0) {
  2087. new PNotify({
  2088. title: '操作提示',
  2089. text: res.message,
  2090. type: 'success',
  2091. hide: true,
  2092. styling: 'bootstrap3'
  2093. });
  2094. } else {
  2095. new PNotify({
  2096. title: '错误提示',
  2097. text: res.message,
  2098. type: 'error',
  2099. hide: true,
  2100. styling: 'bootstrap3'
  2101. });
  2102. }
  2103. }
  2104. });
  2105. }
  2106. /**
  2107. * 保存病人信息
  2108. */
  2109. function savePatient() {
  2110. $.ajax({
  2111. type: "POST",
  2112. url: '/thmz/savePatient',
  2113. contentType: "application/json;charset=UTF-8",
  2114. dataType: "json",
  2115. data: JSON.stringify({
  2116. "name": $("#userName").val(),
  2117. "age": $("#age").val(),
  2118. "sex": $("#gender").val(),
  2119. "birthDay": $("#birthDay").val(),
  2120. "icCardNo": $("#cardNo").val(),
  2121. "phoneNo": $("#phoneNum").val(),
  2122. "responseType": $("#patientsNature").val(),
  2123. "socialNo": $("#idCard").val(),
  2124. "address": $("#address").val()
  2125. }),
  2126. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  2127. success: function (res) {
  2128. if (res == '401' || res == 401) {
  2129. window.location.href = '/thmz/login/view'
  2130. return;
  2131. }
  2132. if (res.code == 0) {
  2133. $("#patientId").val(res.data.patientId);
  2134. saveMzyReqrec();
  2135. } else {
  2136. new PNotify({
  2137. title: '错误提示',
  2138. text: res.message,
  2139. type: 'error',
  2140. hide: true,
  2141. styling: 'bootstrap3'
  2142. });
  2143. }
  2144. }
  2145. });
  2146. }
  2147. /**
  2148. * 修改病人信息
  2149. */
  2150. function modifyPatient() {
  2151. $.ajax({
  2152. type: "POST",
  2153. url: '/thmz/modifyPatient',
  2154. contentType: "application/json;charset=UTF-8",
  2155. dataType: "json",
  2156. data: JSON.stringify({
  2157. "name": $("#editUserName").val(),
  2158. "age": $("#editUserAge").val(),
  2159. "sex": $("#editUserGender").val(),
  2160. "birthDay": $("#editUserBirthDay").val(),
  2161. "icCardNo": $("#editUserCardNo").val(),
  2162. "phoneNo": $("#editUserPhoneNum").val(),
  2163. "responseType": $("#editUserPatientsNature").val(),
  2164. "socialNo": $("#editUserIdCard").val(),
  2165. "address": $("#editUserAddress").val(),
  2166. "patientId": $("#editUserCode").val(),
  2167. "relName": $("#editUserContact").val(),
  2168. "contractName": $("#editUserContactPhone").val()
  2169. }),
  2170. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  2171. success: function (res) {
  2172. if (res == '401' || res == 401) {
  2173. window.location.href = '/thmz/login/view'
  2174. return;
  2175. }
  2176. if (res.code == 0) {
  2177. $('#editUserModal').modal('hide');
  2178. realClinicalReception($("#patientId").val());
  2179. } else {
  2180. new PNotify({
  2181. title: '错误提示',
  2182. text: res.message,
  2183. type: 'error',
  2184. hide: true,
  2185. styling: 'bootstrap3'
  2186. });
  2187. }
  2188. }
  2189. });
  2190. }
  2191. /**
  2192. * 保存挂号信息
  2193. */
  2194. function saveMzyReqrec() {
  2195. var mzyRequestId = $('#doctor').find("option:selected").attr('data-mzyRequestId');
  2196. $.ajax({
  2197. type: "POST",
  2198. url: '/thmz/saveMzyReqrec',
  2199. contentType: "application/json;charset=UTF-8",
  2200. dataType: "json",
  2201. data: JSON.stringify({
  2202. "mzyReqrec": {
  2203. "patientId": $("#patientId").val(),
  2204. "ampm": $("#ampm").val(),
  2205. "unitCode": $("#deptNo").val(),
  2206. "chargeType": $("#chargeType").val()
  2207. }, "responceType": $("#patientsNature").val(), "mzyRequestId": mzyRequestId
  2208. }),
  2209. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  2210. success: function (res) {
  2211. if (res == '401' || res == 401) {
  2212. window.location.href = '/thmz/login/view'
  2213. return;
  2214. }
  2215. if (res.code == 0) {
  2216. new PNotify({
  2217. title: '操作提示',
  2218. text: res.message,
  2219. type: 'success',
  2220. hide: true,
  2221. styling: 'bootstrap3'
  2222. });
  2223. $('#confirmFeeModal').modal('hide');
  2224. loadTableCount();
  2225. loadRegistrationList(true);
  2226. } else {
  2227. new PNotify({
  2228. title: '错误提示',
  2229. text: res.message,
  2230. type: 'error',
  2231. hide: true,
  2232. styling: 'bootstrap3'
  2233. });
  2234. }
  2235. }
  2236. });
  2237. }
  2238. /**
  2239. * 挂号列表中的科室和医生列表初始化
  2240. */
  2241. function initListSelect() {
  2242. initListDeptSelect();
  2243. initListDoctorSelect();
  2244. }
  2245. /**
  2246. * 挂号列表中的科室列表
  2247. */
  2248. function initListDeptSelect() {
  2249. //科室列表
  2250. $.ajax({
  2251. type: "GET",
  2252. url: '/thmz/allMzUnitCode',
  2253. dataType: "json",
  2254. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  2255. success: function (data) {
  2256. if (data == '401' || data == 401) {
  2257. window.location.href = '/thmz/login/view'
  2258. return;
  2259. }
  2260. var html = '';
  2261. $.each(data.data, function (commentIndex, comment) {
  2262. html += '<option value="' + comment.code + '">' + comment.name + '</option>';
  2263. });
  2264. $('#deptNoParam').empty();
  2265. $('#deptNoParam').html(html);
  2266. $('#deptNoParam').selectpicker('refresh');
  2267. }
  2268. });
  2269. }
  2270. /**
  2271. * 挂号列表中的医生列表初始化
  2272. */
  2273. function initListDoctorSelect() {
  2274. //医生列表
  2275. $.ajax({
  2276. type: "GET",
  2277. url: '/thmz/listEmployeeByDepts?depts=' + $('#deptNoParam').val(),
  2278. dataType: "json",
  2279. headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
  2280. success: function (res) {
  2281. if (res == '401' || res == 401) {
  2282. window.location.href = '/thmz/login/view'
  2283. return;
  2284. }
  2285. var html = '';
  2286. $.each(res.data, function (commentIndex, comment) {
  2287. html += '<option value="' + comment.employeeCode + '">' + comment.employeeName + '</option>';
  2288. });
  2289. $('#doctorParam').empty();
  2290. $('#doctorParam').html(html);
  2291. // $("#doctorParam").selectpicker({
  2292. // size: 10
  2293. // });
  2294. $('#doctorParam').selectpicker('destroy').selectpicker('refresh');
  2295. }
  2296. });
  2297. }
  2298. /**
  2299. * 加载挂号列表
  2300. * @param flag 是否清空挂号卡片列表区域
  2301. */
  2302. function loadRegistrationList(flag) {
  2303. if (flag) {
  2304. pageIndex = 0;
  2305. $("#card_regi_list").empty();
  2306. $("div.page").removeClass("in").addClass("hide");
  2307. }
  2308. var regiListType = getIndex("regi_List_type");
  2309. if (regiListType == 0) {
  2310. loadCardList();
  2311. } else if (regiListType == 1) {
  2312. loadTableList();
  2313. }
  2314. }
  2315. /**
  2316. * 获取按钮组选择的下标
  2317. * @param id
  2318. * @returns {number}
  2319. */
  2320. function getIndex(id) {
  2321. var index = 0;
  2322. var item = $("#" + id).find("button");
  2323. for (var i = 0; i <= item.length; i++) {
  2324. if ($(item[i]).hasClass("btn-primary")) {
  2325. index = i;
  2326. break;
  2327. }
  2328. }
  2329. return index;
  2330. }
  2331. /**
  2332. * 获取时间选择器的时间数组
  2333. * @returns {string[]}
  2334. */
  2335. function getRePortRangeArr() {
  2336. var rePortRange = $('#reportrange span').html();
  2337. var rePortRangeArr = rePortRange.split(" - ");
  2338. rePortRangeArr[0] = rePortRangeArr[0] + " 00:00:00"
  2339. rePortRangeArr[1] = rePortRangeArr[1] + " 23:59:59"
  2340. return rePortRangeArr;
  2341. }
  2342. /**
  2343. * 清空搜索参数
  2344. */
  2345. function clearParams() {
  2346. $("#deptNoParam").selectpicker('val', null);
  2347. $("#deptNoParam").selectpicker('refresh');
  2348. $("#doctorParam").selectpicker('val', null);
  2349. $("#deptNoParam").selectpicker('refresh');
  2350. $("#userNameParam").val(null);
  2351. $('#reportrange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
  2352. }