SMPMI01700_전실신청.xrw 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <!--
  3. * 제 목 : SMPMI01700_전실신청.xrw
  4. * 설 명 : 전실신청
  5. * 설 계 자 : 홍영표
  6. * 작 성 자 : 홍영표
  7. * 작 성 일 : 2007.05.14
  8. * 수정이력 :
  9. * 기 타 :
  10. * 구현예정 :
  11. -->
  12. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  13. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  14. <xhtml:head>
  15. <xhtml:title>전실신청</xhtml:title>
  16. <model id="model1">
  17. <instance id="instance1">
  18. <root xmlns="">
  19. <send>
  20. <ipatflag>1</ipatflag>
  21. <srchcond1>5</srchcond1>
  22. <srchcond2/>
  23. <pid/>
  24. <indd/>
  25. <todd/>
  26. <cretno/>
  27. <mskind>M</mskind>
  28. <instcd/>
  29. <s_cdcr>
  30. <cdcr_status/>
  31. </s_cdcr>
  32. <sess_posinstcd>012</sess_posinstcd>
  33. <mycheck/>
  34. <flag>2</flag>
  35. <apptflagcd>1</apptflagcd>
  36. <isolationroom/>
  37. <deisolation/>
  38. <wardcd/>
  39. <roomcd/>
  40. <antivirus/>
  41. </send>
  42. <main>
  43. <cdcr>
  44. <cdcr_status/>
  45. <cdcr_pid/>
  46. <cdcr_indd/>
  47. <cdcr_cretno/>
  48. <cdcr_seqno/>
  49. <cdcr_instcd/>
  50. <cdcr_mskind/>
  51. <cdcr_histstat/>
  52. <cdcr_acptflagcd/>
  53. <cdcr_appflagcd/>
  54. <cdcr_appdd/>
  55. <cdcr_apptm/>
  56. <cdcr_appid/>
  57. <cdcr_pamacptdd/>
  58. <cdcr_pamacpttm/>
  59. <cdcr_pamacptid/>
  60. <cdcr_prestwardcd/>
  61. <cdcr_prestroomcd/>
  62. <cdcr_prestbedcd/>
  63. <cdcr_prestroomgrde/>
  64. <cdcr_prestroomtype/>
  65. <cdcr_prestcentcd/>
  66. <cdcr_prestsuporddeptcd/>
  67. <cdcr_prestorddeptcd/>
  68. <cdcr_prestmedispclid/>
  69. <cdcr_prestatdoctid/>
  70. <cdcr_chngwardcd/>
  71. <cdcr_chngroomcd/>
  72. <cdcr_chngbedcd/>
  73. <cdcr_chngroomgrde/>
  74. <cdcr_chngroomtype/>
  75. <cdcr_oxyyn/>
  76. <cdcr_suctyn/>
  77. <cdcr_chngcentcd/>
  78. <cdcr_chngsuporddeptcd/>
  79. <cdcr_chngorddeptcd/>
  80. <cdcr_chngmedispclid/>
  81. <cdcr_chngatdoctid/>
  82. <cdcr_specordyn/>
  83. <cdcr_enddd/>
  84. <cdcr_endtm/>
  85. <cdcr_endid/>
  86. <cdcr_prestremcd/>
  87. <cdcr_chngprestrem/>
  88. <cdcr_fstrgstrid/>
  89. <cdcr_fstrgstdt/>
  90. <cdcr_lastupdtrid/>
  91. <cdcr_lastupdtdt/>
  92. <cdcr_bedcnt/>
  93. <cdcr_bsex/>
  94. <cdcr_emptbedcnt/>
  95. </cdcr>
  96. <icdr/>
  97. </main>
  98. <hidden>
  99. <rcv>
  100. <wdrm/>
  101. <inpt/>
  102. <icdr/>
  103. <cdcr/>
  104. </rcv>
  105. <original>
  106. <inpt/>
  107. <icdr>
  108. <icdr_status/>
  109. <icdr_pid/>
  110. <icdr_indd/>
  111. <icdr_cretno/>
  112. <icdr_fromdd/>
  113. <icdr_seqno/>
  114. <icdr_instcd/>
  115. <icdr_mskind/>
  116. <icdr_todd/>
  117. <icdr_histstat/>
  118. <icdr_centcd/>
  119. <icdr_dutdeptcd/>
  120. <icdr_suporddeptcd/>
  121. <icdr_orddeptcd/>
  122. <icdr_medispclid/>
  123. <icdr_atdoctid/>
  124. <icdr_specordyn/>
  125. <icdr_wardcd/>
  126. <icdr_roomcd/>
  127. <icdr_bedcd/>
  128. <icdr_roomgrdecd/>
  129. <icdr_roomtypecd/>
  130. <icdr_wardcd2/>
  131. <icdr_roomcd2/>
  132. <icdr_bedcd2/>
  133. <icdr_roomgrdecd2/>
  134. <icdr_roomtypecd2/>
  135. <icdr_fstrgstrid/>
  136. <icdr_fstrgstdt/>
  137. <icdr_lastupdtrid/>
  138. <icdr_lastupdtdt/>
  139. <icdr_hngnm/>
  140. <icdr_sex/>
  141. <icdr_age/>
  142. <icdr_bedcnt/>
  143. <icdr_bsex/>
  144. <icdr_hngnm2/>
  145. </icdr>
  146. <icdrlist>
  147. <icdr_status/>
  148. <icdr_pid/>
  149. <icdr_indd/>
  150. <icdr_cretno/>
  151. <icdr_fromdd/>
  152. <icdr_seqno/>
  153. <icdr_instcd/>
  154. <icdr_mskind/>
  155. <icdr_todd/>
  156. <icdr_histstat/>
  157. <icdr_centcd/>
  158. <icdr_dutdeptcd/>
  159. <icdr_suporddeptcd/>
  160. <icdr_orddeptcd/>
  161. <icdr_medispclid/>
  162. <icdr_atdoctid/>
  163. <icdr_specordyn/>
  164. <icdr_wardcd/>
  165. <icdr_roomcd/>
  166. <icdr_bedcd/>
  167. <icdr_roomgrdecd/>
  168. <icdr_roomtypecd/>
  169. <icdr_wardcd2/>
  170. <icdr_roomcd2/>
  171. <icdr_bedcd2/>
  172. <icdr_roomgrdecd2/>
  173. <icdr_roomtypecd2/>
  174. <icdr_fstrgstrid/>
  175. <icdr_fstrgstdt/>
  176. <icdr_lastupdtrid/>
  177. <icdr_lastupdtdt/>
  178. <icdr_hngnm/>
  179. <icdr_sex/>
  180. <icdr_age/>
  181. <icdr_bedcnt/>
  182. <icdr_bsex/>
  183. </icdrlist>
  184. <cdcr>
  185. <cdcr_status/>
  186. <cdcr_pid/>
  187. <cdcr_indd/>
  188. <cdcr_cretno/>
  189. <cdcr_seqno/>
  190. <cdcr_instcd/>
  191. <cdcr_mskind/>
  192. <cdcr_histstat/>
  193. <cdcr_acptflagcd/>
  194. <cdcr_appflagcd/>
  195. <cdcr_appdd/>
  196. <cdcr_apptm/>
  197. <cdcr_appid/>
  198. <cdcr_pamacptdd/>
  199. <cdcr_pamacpttm/>
  200. <cdcr_pamacptid/>
  201. <cdcr_prestwardcd/>
  202. <cdcr_prestroomcd/>
  203. <cdcr_prestbedcd/>
  204. <cdcr_prestroomgrde/>
  205. <cdcr_prestroomtype/>
  206. <cdcr_prestcentcd/>
  207. <cdcr_prestsuporddeptcd/>
  208. <cdcr_prestorddeptcd/>
  209. <cdcr_prestmedispclid/>
  210. <cdcr_prestatdoctid/>
  211. <cdcr_chngwardcd/>
  212. <cdcr_chngroomcd/>
  213. <cdcr_chngbedcd/>
  214. <cdcr_chngroomgrde/>
  215. <cdcr_chngroomtype/>
  216. <cdcr_oxyyn/>
  217. <cdcr_suctyn/>
  218. <cdcr_chngcentcd/>
  219. <cdcr_chngsuporddeptcd/>
  220. <cdcr_chngorddeptcd/>
  221. <cdcr_chngmedispclid/>
  222. <cdcr_chngatdoctid/>
  223. <cdcr_specordyn/>
  224. <cdcr_enddd/>
  225. <cdcr_endtm/>
  226. <cdcr_endid/>
  227. <cdcr_prestremcd/>
  228. <cdcr_chngprestrem/>
  229. <cdcr_fstrgstrid/>
  230. <cdcr_fstrgstdt/>
  231. <cdcr_lastupdtrid/>
  232. <cdcr_lastupdtdt/>
  233. </cdcr>
  234. </original>
  235. <flag>
  236. <rcv_flag>
  237. <cdcr_count/>
  238. </rcv_flag>
  239. </flag>
  240. <temp>
  241. </temp>
  242. <init>
  243. <disccd>
  244. <cd/>
  245. <nm/>
  246. </disccd>
  247. <insukind>
  248. <cd/>
  249. <nm/>
  250. </insukind>
  251. <suppkind>
  252. <cd/>
  253. <nm/>
  254. <up/>
  255. <io/>
  256. </suppkind>
  257. <orddeptcd>
  258. <cd/>
  259. <nm/>
  260. </orddeptcd>
  261. <orddrid>
  262. <cd/>
  263. <nm/>
  264. <dp/>
  265. <sp/>
  266. </orddrid>
  267. <wardcd>
  268. <cd/>
  269. <nm/>
  270. <of/>
  271. </wardcd>
  272. <roomcd>
  273. <cd/>
  274. <nm/>
  275. <wd/>
  276. <gr/>
  277. <ty/>
  278. </roomcd>
  279. <roomcd>
  280. <cd/>
  281. <nm/>
  282. <wd/>
  283. <rm/>
  284. </roomcd>
  285. <flag>
  286. <prestdd/>
  287. <mskindflag/>
  288. </flag>
  289. </init>
  290. <currenttime/>
  291. <wdrminfo>
  292. <wdrm/>
  293. </wdrminfo>
  294. <source>
  295. <pid/>
  296. <hngnm/>
  297. <indd/>
  298. <cretno/>
  299. <mskind/>
  300. </source>
  301. <target/>
  302. <roomgrdelist>
  303. <roomgrde>
  304. <cdid/>
  305. <cdnm/>
  306. </roomgrde>
  307. </roomgrdelist>
  308. <orgroominfo>
  309. <grdecd/>
  310. <typecd/>
  311. </orgroominfo>
  312. <ervisityn/>
  313. </hidden>
  314. <init>
  315. <P0313list>
  316. <P0313>
  317. <cdid/>
  318. <cdnm/>
  319. </P0313>
  320. </P0313list>
  321. <P0360list>
  322. <P0360>
  323. <cdid/>
  324. <cdnm/>
  325. </P0360>
  326. </P0360list>
  327. <P0391list>
  328. <P0391>
  329. <cdid/>
  330. <cdnm/>
  331. </P0391>
  332. </P0391list>
  333. <pamcomcode>
  334. <PK107list/>
  335. <PK115list/>
  336. </pamcomcode>
  337. </init>
  338. <temp>
  339. <traumadiaginfo/>
  340. </temp>
  341. </root>
  342. </instance>
  343. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post"/>
  344. <submission id="TRPMI00106" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/init"/>
  345. <submission id="TRPMI00401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  346. <submission id="TRPMI01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  347. <submission id="TRPMI01702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  348. <submission id="TRPMI01703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/hidden/original/icdr" resultref="/root/hidden/rcv/isocheck"/>
  349. <submission id="TRPMI01704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/orgroominfo"/>
  350. <submission id="TXPMI01701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/flag/rcv_flag"/>
  351. <submission id="TXPMI01702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/flag/rcv_flag"/>
  352. <submission id="TRPMI01901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/rcv"/>
  353. <submission id="TRPMB00303" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/roomgrdelist"/>
  354. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/init/pamcomcode"/>
  355. <submission id="TRPMI01706" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/cdcr" resultref="/root/temp/traumadiaginfo"/>
  356. </model>
  357. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  358. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  359. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  360. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  361. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  362. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  363. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  364. <script type="javascript">
  365. <![CDATA[
  366. var currentrow = 0;
  367. // 초기값설정
  368. function fInit(){
  369. }
  370. // 승인상태가 신청중이 아닌 데이터는 삭제하지 못하도록 체크박스를 Disabled시킨다.
  371. function fDisabled(){
  372. var cnt = instance1.selectNodes("/root/hidden/original/cdcr").length;
  373. for(i=1; i<=cnt; i++) {
  374. var v_rowgubun = model.getValue("/root/hidden/original/cdcr["+ i + "]/cdcr_acptflagcd");
  375. if (v_rowgubun != '1'){
  376. datagrid3.isReadOnly((i + parseInt(datagrid3.fixedRows)-1),0) = true;
  377. }
  378. }
  379. }
  380. // 층별 병상현황 조회
  381. function fQuery_Wardcond(){
  382. submit("TRPMI01701");
  383. copyNodeType("/root/hidden/wdrminfo", "/root/hidden/rcv", "replace");
  384. datagrid1.rebuild();
  385. datagrid1.subtotalposition = "after";
  386. //datagrid1.subtotal("sum", -1, 5, "#,###", "", 1, "총빈병상수");
  387. datagrid1.subtotal("sum", -1, 5, "format:#,###; roundmode:round; roundpostion:2", "background-color:#7CBBDD; color:#ffffff; font-weight:bold; ", 1, "총빈병상수");
  388. }
  389. // 조회조건에 따른 조회문장
  390. function fQuery1()
  391. {
  392. model.resetInstanceNode("/root/main");
  393. model.resetInstanceNode("/root/hidden/original");
  394. model.resetInstanceNode("/root/hidden/original/inpt");
  395. output3.refresh();
  396. output4.refresh();
  397. output7.refresh();
  398. output13.refresh();
  399. submit("TRPMI00401",false);
  400. copyNodeType("/root/hidden/original", "/root/hidden/rcv", "replace");
  401. datagrid2.rebuild();
  402. model.refresh();
  403. }
  404. // 환자이력 정보 조회
  405. function fQuery(currentrow)
  406. {
  407. var sCareInRoomDD = model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_careinrmdd");
  408. if (isNull(sCareInRoomDD) || sCareInRoomDD == "-") {
  409. messageBox("입실시간이 없습니다. 전실신청 할 수 없습니다!", "I");
  410. }
  411. model.setValue("/root/send/pid", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_pid"));
  412. model.setValue("/root/send/indd", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_indd"));
  413. model.setValue("/root/send/todd", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_dschdd"));
  414. model.setValue("/root/send/cretno", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_cretno"));
  415. model.setValue("/root/send/mskind", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_mskind"));
  416. model.setValue("/root/send/instcd", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_instcd"));
  417. // 기존의 값은 Reset해야함. ( 값이 없을경우 기존의 값이 현재의 값처럼 오인될수 있음 )
  418. model.resetInstanceNode("/root/main/cdcr");
  419. model.resetInstanceNode("/root/hidden/original/icdr");
  420. model.resetInstanceNode("/root/hidden/original/cdcr");
  421. // 기존의 노드를 삭제하지 않으면 현재의 노드가 추가되는 경우가 있음
  422. model.removeNodeset("/root/hidden/original/icdr");
  423. model.removeNodeset("/root/hidden/original/cdcr");
  424. model.removeNodeset("/root/hidden/rcv/inpt"); // 세부조회사항이 없으면 기존의 inpt를 다시카피한다. 이를 방지한다.
  425. submit("TRPMI01702",false); // 전실신청내역 및 전실내역을 조회한다.
  426. copyNodeType("/root/hidden/original", "/root/hidden/rcv", "after");
  427. datagrid3.rebuild();
  428. //2008.05.06 전실신청 정보와 현재 재원정보를 한 인스턴스에 저장하여 오류가 발생되어 수정함. 한윤희
  429. //model.removeNodeset("/root/hidden/original/icdr");
  430. model.removeNodeset("/root/hidden/original/icdrlist");
  431. submit("TRPMI01901"); // 전과전실조회
  432. copyNodeType("/root/hidden/original", "/root/hidden/rcv", "after");
  433. datagrid4.rebuild();
  434. fDisabled();
  435. // 간호요청에 의해서 환자선택시 자동이 아니라 copy 버튼 선택시 copy 되도록 수정함. 2007.09.03 홍영표
  436. var icdr_flag = instance1.selectSingleNode("/root/hidden/original/icdr");
  437. if ( icdr_flag != null){
  438. model.setValue("/root/main/cdcr/cdcr_pid",model.getValue("/root/hidden/original/icdr/icdr_pid"));
  439. model.setValue("/root/main/cdcr/cdcr_indd",model.getValue("/root/hidden/original/icdr/icdr_indd"));
  440. model.setValue("/root/main/cdcr/cdcr_cretno",model.getValue("/root/hidden/original/icdr/icdr_cretno"));
  441. model.setValue("/root/main/cdcr/cdcr_instcd",model.getValue("/root/hidden/original/icdr/icdr_instcd"));
  442. model.setValue("/root/main/cdcr/cdcr_mskind",model.getValue("/root/hidden/original/icdr/icdr_mskind"));
  443. model.setValue("/root/main/cdcr/cdcr_histstat",model.getValue("/root/hidden/original/icdr/icdr_histstat"));
  444. model.setValue("/root/main/cdcr/cdcr_acptflagcd","1");
  445. model.setValue("/root/main/cdcr/cdcr_appflagcd","1");
  446. model.setValue("/root/main/cdcr/cdcr_appdd",getCurrentDate());
  447. var CurrentTime = getCurrentTime();
  448. model.setValue("/root/main/cdcr/cdcr_apptm",CurrentTime.substr(0,4));
  449. model.setValue("/root/main/cdcr/cdcr_prestwardcd",model.getValue("/root/hidden/original/icdr/icdr_wardcd"));
  450. model.setValue("/root/main/cdcr/cdcr_prestroomcd",model.getValue("/root/hidden/original/icdr/icdr_roomcd"));
  451. model.setValue("/root/main/cdcr/cdcr_prestbedcd",model.getValue("/root/hidden/original/icdr/icdr_bedcd"));
  452. model.setValue("/root/main/cdcr/cdcr_prestroomgrde",model.getValue("/root/hidden/original/icdr/icdr_roomgrdecd"));
  453. model.setValue("/root/main/cdcr/cdcr_prestroomtype",model.getValue("/root/hidden/original/icdr/icdr_roomtypecd"));
  454. model.setValue("/root/main/cdcr/cdcr_prestcentcd",model.getValue("/root/hidden/original/icdr/icdr_centcd"));
  455. model.setValue("/root/main/cdcr/cdcr_prestsuporddeptcd",model.getValue("/root/hidden/original/icdr/icdr_suporddeptcd"));
  456. model.setValue("/root/main/cdcr/cdcr_prestorddeptcd",model.getValue("/root/hidden/original/icdr/icdr_orddeptcd"));
  457. model.setValue("/root/main/cdcr/cdcr_prestmedispclid",model.getValue("/root/hidden/original/icdr/icdr_medispclid"));
  458. model.setValue("/root/main/cdcr/cdcr_prestatdoctid",model.getValue("/root/hidden/original/icdr/icdr_atdoctid"));
  459. // model.setValue("/root/main/cdcr/cdcr_chngwardcd",model.getValue("/root/hidden/original/icdr/icdr_wardcd"));
  460. // model.setValue("/root/main/cdcr/cdcr_chngroomcd",model.getValue("/root/hidden/original/icdr/icdr_roomcd"));
  461. // model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/hidden/original/icdr/icdr_roomgrdecd"));
  462. // model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/hidden/original/icdr/icdr_roomtypecd"));
  463. model.setValue("/root/main/cdcr/cdcr_chngcentcd",model.getValue("/root/hidden/original/icdr/icdr_centcd"));
  464. model.setValue("/root/main/cdcr/cdcr_chngsuporddeptcd",model.getValue("/root/hidden/original/icdr/icdr_suporddeptcd"));
  465. model.setValue("/root/main/cdcr/cdcr_chngorddeptcd",model.getValue("/root/hidden/original/icdr/icdr_orddeptcd"));
  466. model.setValue("/root/main/cdcr/cdcr_chngmedispclid",model.getValue("/root/hidden/original/icdr/icdr_medispclid"));
  467. model.setValue("/root/main/cdcr/cdcr_chngatdoctid",model.getValue("/root/hidden/original/icdr/icdr_atdoctid"));
  468. model.setValue("/root/main/cdcr/cdcr_specordyn",model.getValue("/root/hidden/original/icdr/icdr_specordyn"));
  469. // model.setValue("/root/main/cdcr/cdcr_bedcnt",model.getValue("/root/hidden/original/icdr/icdr_bedcnt"));
  470. // model.setValue("/root/main/cdcr/cdcr_bsex",model.getValue("/root/hidden/original/icdr/icdr_bsex"));
  471. // model.setValue("/root/main/cdcr/cdcr_emptbedcnt",model.getValue("/root/hidden/original/icdr/icdr_emptbedcnt"));
  472. }
  473. model.refresh();
  474. }
  475. // 전실신청내역의 필수 입력항목 체크
  476. function fValCheck(){
  477. var rtn = "Y";
  478. var cdcr_pid = model.getValue("/root/main/cdcr/cdcr_pid");
  479. var cdcr_indd = model.getValue("/root/main/cdcr/cdcr_indd");
  480. var cdcr_cretno = model.getValue("/root/main/cdcr/cdcr_cretno");
  481. var cdcr_mskind = model.getValue("/root/main/cdcr/cdcr_mskind");
  482. var cdcr_histstat = model.getValue("/root/main/cdcr/cdcr_histstat");
  483. var cdcr_acptflagcd = model.getValue("/root/main/cdcr/cdcr_acptflagcd");
  484. var cdcr_appflagcd = model.getValue("/root/main/cdcr/cdcr_appflagcd");
  485. var cdcr_chngwardcd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  486. var cdcr_chngroomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  487. var cdcr_chngroomgrde = model.getValue("/root/main/cdcr/cdcr_chngroomgrde");
  488. var cdcr_chngroomtype = model.getValue("/root/main/cdcr/cdcr_chngroomtype");
  489. var cdcr_chngorddeptcd = model.getValue("/root/main/cdcr/cdcr_chngorddeptcd");
  490. var cdcr_chngmedispclid = model.getValue("/root/main/cdcr/cdcr_chngmedispclid");
  491. var cdcr_chngatdoctid = model.getValue("/root/main/cdcr/cdcr_chngatdoctid");
  492. var cdcr_specordyn = model.getValue("/root/main/cdcr/cdcr_specordyn");
  493. if (cdcr_pid == null || cdcr_pid == ""){
  494. rtn = "환자등록번호가";
  495. } else if (cdcr_indd == null || cdcr_indd == ""){
  496. rtn = "입원일자가";
  497. } else if (cdcr_cretno == null || cdcr_cretno == ""){
  498. rtn = "입원등록키가";
  499. } else if (cdcr_mskind == null || cdcr_mskind == ""){
  500. rtn = "주부유형이";
  501. } else if (cdcr_histstat == null || cdcr_histstat == ""){
  502. rtn = "상태값이";
  503. } else if (cdcr_acptflagcd == null || cdcr_acptflagcd == ""){
  504. rtn = "접수상태가";
  505. } else if (cdcr_appflagcd == null || cdcr_appflagcd == ""){
  506. rtn = "접수유형이";
  507. } else if (cdcr_chngwardcd == null || cdcr_chngwardcd == ""){
  508. rtn = "병동정보가";
  509. } else if (cdcr_chngroomcd == null || cdcr_chngroomcd == ""){
  510. rtn = "병실정보가";
  511. } else if (cdcr_chngroomgrde == null || cdcr_chngroomgrde == ""){
  512. rtn = "병실등급이";
  513. } else if (cdcr_chngroomtype == null || cdcr_chngroomtype == ""){
  514. rtn = "병실형태가";
  515. } else if (cdcr_chngorddeptcd == null || cdcr_chngorddeptcd == ""){
  516. rtn = "진료부서코드가";
  517. } else if (cdcr_chngmedispclid == null || cdcr_chngmedispclid == ""){
  518. rtn = "전문의코드가";
  519. } else if (cdcr_chngatdoctid == null || cdcr_chngatdoctid == ""){
  520. rtn = "주치의코드가";
  521. } else if (cdcr_specordyn == null || cdcr_specordyn == ""){
  522. rtn = "특진여부가";
  523. }
  524. return rtn;
  525. }
  526. // 전실신청내역의 필수 입력항목 체크 ( 간호 요청으로 병동, 병동병실, 등급, 형태, O2, Suction, 비고 중 1가지만 입력시 신청되도록 수정 2007.09.03 홍영표 )
  527. function fValCheck1(){
  528. var rtn = "Y";
  529. var cdcr_pid = model.getValue("/root/main/cdcr/cdcr_pid");
  530. var cdcr_indd = model.getValue("/root/main/cdcr/cdcr_indd");
  531. var cdcr_cretno = model.getValue("/root/main/cdcr/cdcr_cretno");
  532. var cdcr_mskind = model.getValue("/root/main/cdcr/cdcr_mskind");
  533. var cdcr_histstat = model.getValue("/root/main/cdcr/cdcr_histstat");
  534. var cdcr_acptflagcd = model.getValue("/root/main/cdcr/cdcr_acptflagcd");
  535. var cdcr_appflagcd = model.getValue("/root/main/cdcr/cdcr_appflagcd");
  536. var cdcr_chngwardcd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  537. var cdcr_chngroomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  538. var cdcr_chngbedcd = model.getValue("/root/main/cdcr/cdcr_chngbedcd");
  539. var cdcr_chngroomgrde = model.getValue("/root/main/cdcr/cdcr_chngroomgrde");
  540. var cdcr_chngroomtype = model.getValue("/root/main/cdcr/cdcr_chngroomtype");
  541. var cdcr_oxyyn = model.getValue("/root/main/cdcr/cdcr_oxyyn");
  542. var cdcr_suctyn = model.getValue("/root/main/cdcr/cdcr_suctyn");
  543. var cdcr_prestremcd = model.getValue("/root/main/cdcr/cdcr_prestremcd");
  544. if (cdcr_pid == null || cdcr_pid == ""){
  545. //rtn = "환자등록번호가";
  546. rtn = "N";
  547. } else if (cdcr_indd == null || cdcr_indd == ""){
  548. //rtn = "입원일자가";
  549. rtn = "N";
  550. } else if (cdcr_cretno == null || cdcr_cretno == ""){
  551. //rtn = "입원등록키가";
  552. rtn = "N";
  553. } else if (cdcr_mskind == null || cdcr_mskind == ""){
  554. //rtn = "주부유형이";
  555. rtn = "N";
  556. } else if (cdcr_histstat == null || cdcr_histstat == ""){
  557. //rtn = "상태값이";
  558. rtn = "N";
  559. } else if (cdcr_acptflagcd == null || cdcr_acptflagcd == ""){
  560. //rtn = "접수상태가";
  561. rtn = "N";
  562. } else if (cdcr_appflagcd == null || cdcr_appflagcd == ""){
  563. //rtn = "접수유형이";
  564. rtn = "N";
  565. }
  566. // 2008.07.22 병동, 병실 선택하지 않더라도 전실신청 가능하도록 주석처리
  567. if (cdcr_chngwardcd == null || cdcr_chngwardcd == "" || cdcr_chngwardcd == "-" ){
  568. messageBox("전실할 병동정보를 입력하지 않았습니다. 확인 후 전실신청하세요!", "E999", "");
  569. rtn = "N";
  570. return rtn;
  571. } else if (cdcr_chngroomcd == null || cdcr_chngroomcd == "" || cdcr_chngroomcd == "-" ){
  572. messageBox("전실할 병실정보를 입력하지 않았습니다. 확인 후 전실신청하세요!", "E999", "");
  573. rtn = "N";
  574. return rtn;
  575. } else if (cdcr_chngbedcd == null || cdcr_chngbedcd == "" || cdcr_chngbedcd == "-" ){
  576. messageBox("전실할 병상정보를 입력하지 않았습니다. 확인 후 전실신청하세요!", "E999", "");
  577. rtn = "N";
  578. return rtn;
  579. } else if (cdcr_chngroomgrde == null || cdcr_chngroomgrde == "" || cdcr_chngroomgrde == "-" ){
  580. messageBox("전실할 병실등급 정보를 입력하지 않았습니다. 확인 후 전실신청하세요!", "E999", "");
  581. rtn = "N";
  582. return rtn;
  583. } else if (cdcr_chngroomtype == null || cdcr_chngroomtype == "" || cdcr_chngroomtype == "-" ){
  584. messageBox("전실할 병실형태 정보를 입력하지 않았습니다. 확인 후 전실신청하세요!", "E999", "");
  585. rtn = "N";
  586. return rtn;
  587. }
  588. return rtn;
  589. }
  590. // 진행중인 신청내역이 있는지 체크
  591. function fDoubleCheck(){
  592. var rtn = -1;
  593. var rtn1 = -1;
  594. rtn = datagrid3.findrow("1", 1, 2);
  595. rtn1 = datagrid3.findrow("2", 1, 2);
  596. if (rtn > 0) {
  597. return rtn;
  598. } else if (rtn1 > 0) {
  599. return rtn1;
  600. } else if (rtn < 0 && rtn1 < 0 ) {
  601. return rtn;
  602. }
  603. }
  604. // 전실 신청 등록,취소
  605. function fChangeSave(arg1){
  606. var icdr_flag = null;
  607. cdcr_flag = arg1;
  608. model.removeNodeset("/root/send/s_cdcr/cdcr");
  609. if (cdcr_flag == 'I'){ // 신청등록 Routin
  610. // 20170511 응급실에서 전실신청 방지 by 조중래
  611. if (model.getValue("/root/hidden/original/icdr/icdr_wardcd") == "3120400000"
  612. || model.getValue("/root/hidden/original/icdr/icdr_wardcd") == "2360800000"
  613. || model.getValue("/root/hidden/original/icdr/icdr_wardcd") == "2280200000") {
  614. messageBox("응급실/일일수술실/항암주사실에서 병동으로의 전실은 \r\n입원의뢰서를 통해 처리하십시오.", "I");
  615. return;
  616. }
  617. // 2008.10.07 - 입실체크되어 있지 않으면 전과전실 blocking
  618. var sCdcrPid = model.getValue("/root/main/cdcr/cdcr_pid");
  619. var sCareInRoomDD = model.getValue("/root/hidden/original/inpt[inpt_pid = '" + sCdcrPid + "']/inpt_careinrmdd");
  620. if (isNull(sCareInRoomDD) || sCareInRoomDD == "-") {
  621. messageBox("입실시간이 없습니다. 전실신청 할 수 없습니다!", "I");
  622. return;
  623. }
  624. // 이중신청 블럭킹
  625. var sDoubleCheck = fDoubleCheck();
  626. if (sDoubleCheck != -1) {
  627. messageBox("신청중인 내역 또는 승인한 내역이 있습니다. 이중신청할수","I004");
  628. return;
  629. }
  630. // 필수입력항목체크
  631. var sValCheck = fValCheck1();
  632. if (sValCheck != 'Y') {
  633. if (sValCheck == 'N'){
  634. messageBox("하나이상의 항목을 ","C002");
  635. }else {
  636. messageBox("선택되어진 환자가 ","I004");
  637. }
  638. return;
  639. }
  640. // 2008.07.22 병동, 병실 코드 없어도 전실신청할 수 있도록 수정
  641. // null 값일 경우 '-'로 입력
  642. // 2008.09.17 최소한 비고는 입력되도록 체크추가
  643. var sChngWardCd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  644. var sChngRoomCd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  645. var sChngBedCd = model.getValue("/root/main/cdcr/cdcr_chngbedcd");
  646. var sChngRoomGrde = model.getValue("/root/main/cdcr/cdcr_chngroomgrde");
  647. var sChngRoomType = model.getValue("/root/main/cdcr/cdcr_chngroomtype");
  648. var sPrestremcd = model.getValue("/root/main/cdcr/cdcr_prestremcd"); // 비고
  649. if (isNull(sChngWardCd)) {
  650. //model.setValue("/root/main/cdcr/cdcr_chngwardcd", model.getValue("/root/main/cdcr/cdcr_prestwardcd"));
  651. model.setValue("/root/main/cdcr/cdcr_chngwardcd", '-');
  652. messageBox("병동정보를 입력하세요", "E999");
  653. return false;
  654. }
  655. if (isNull(sChngRoomCd)) {
  656. //model.setValue("/root/main/cdcr/cdcr_chngroomcd",model.getValue("/root/main/cdcr/cdcr_prestroomcd"));
  657. model.setValue("/root/main/cdcr/cdcr_chngroomcd", "-");
  658. messageBox("병실정보를 입력하세요", "E999");
  659. return false;
  660. }
  661. if (isNull(sChngBedCd)) {
  662. //model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/main/cdcr/cdcr_prestroomtype"));
  663. model.setValue("/root/main/cdcr/cdcr_chngbedcd", "-");
  664. messageBox("병상정보를 입력하세요", "E999");
  665. return false;
  666. }
  667. if (isNull(sChngRoomGrde)) {
  668. //model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/main/cdcr/cdcr_prestroomgrde"));
  669. model.setValue("/root/main/cdcr/cdcr_chngroomgrde", "-");
  670. messageBox("병실등급정보를 입력하세요", "E999");
  671. return false;
  672. }
  673. if (isNull(sChngRoomType)) {
  674. //model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/main/cdcr/cdcr_prestroomtype"));
  675. model.setValue("/root/main/cdcr/cdcr_chngroomtype", "-");
  676. messageBox("병실타입정보를 입력하세요", "E999");
  677. return false;
  678. }
  679. // 응급실로 전실금지처리
  680. if (sChngWardCd == "2280200000") {
  681. messageBox("응급실로의 전실은 불가합니다. 퇴원처리 후 응급실 접수하시기 바랍니다.", "E999");
  682. return false;
  683. }
  684. // 외상병동운영에 따른 상병유효성 체크 추가 by 조중래 20160405
  685. var traumaward = model.getValue("/root/init/pamcomcode/PK107list/PK107[cdid='" + sChngWardCd + "']/cdnm");
  686. // 지정된 병동이 외상병동인 경우에만 검증처리
  687. if (!isNull(traumaward)) {
  688. // 외상상병코드 검증처리
  689. if (submit("TRPMI01706")) {
  690. // 외상상병이 존재하지않는 경우
  691. if (model.getValue("/root/temp/traumadiaginfo/traumadiagyn") != "Y") {
  692. messageBox("외상관련 진단정보가 존재하지 않습니다. \r\n외상상병코드를 입력하고 전실신청하십시오.", "C000");
  693. return false;
  694. }
  695. }
  696. }
  697. // 마약/향정약 미처리건 체크실시 by 조중래 20120716
  698. var ivrObjt = document.all("ivr_drug");
  699. if (ivrObjt == null) {
  700. body.createChild("xforms:iviewer", "id:ivr_drug; src:../../../emr/wardcareweb/xrw/SMMNW01100_당일입원전과전실리스트.xrw");
  701. ivrObjt = document.all("ivr_drug");
  702. }
  703. var retMsg = ivrObjt.window.javascript.fMDrugCheck(
  704. model.getValue("/root/main/cdcr/cdcr_pid"),
  705. model.getValue("/root/main/cdcr/cdcr_indd"),
  706. model.getValue("/root/main/cdcr/cdcr_cretno")
  707. );
  708. // 처리를 중단하는 경우(미처리건 처리후 전실 실시하는 케이스)
  709. if (retMsg == "0") {
  710. return;
  711. }
  712. model.setValue("/root/main/cdcr/cdcr_status",cdcr_flag);
  713. copyNodeType("/root/send/s_cdcr", "/root/main/cdcr", "replace");
  714. } else if (cdcr_flag == 'U'){ // 신청취소 루틴
  715. var checkRow = 0;
  716. var cnt = instance1.selectNodes("/root/hidden/original/cdcr").length;
  717. for(i=1; i<=cnt; i++) {
  718. var v_rowgubun = model.getValue("/root/hidden/original/cdcr["+ i + "]/cdcr_status");
  719. var v_acptflagcd = model.getValue("/root/hidden/original/cdcr["+ i + "]/cdcr_acptflagcd");
  720. if (v_rowgubun == 'U'){
  721. if (v_acptflagcd == '1'){
  722. checkRow = checkRow +1 ;
  723. copyNodeType("/root/send/s_cdcr", "/root/hidden/original/cdcr["+ i + "]", "replace");
  724. } else{
  725. messageBox("처리중인 데이터라 취소할수","I004");
  726. return;
  727. }
  728. }
  729. }
  730. if (checkRow < 1) {
  731. messageBox("선택된 데이터가","I004");
  732. return;
  733. }else if (checkRow > 1) {
  734. messageBox("멀티로 취소할수","I004");
  735. return;
  736. }
  737. } else {
  738. messageBox("변경된 내역이","I004");
  739. return;
  740. }
  741. if ( cdcr_flag == 'U' || cdcr_flag == 'I' ) {
  742. if (submit("TXPMI01701")) {
  743. // 퇴원수납화면 응급실전실환자 출력물 제어용
  744. if (model.getValue("/root/hidden/ervisityn") == "Y" && cdcr_flag == "I") {
  745. opener.model.setValue("/root/hidden/ervisityn", "Y");
  746. opener.model.setValue("/root/hidden/erroomcd", model.getValue("/root/main/cdcr/cdcr_chngwardcd"));
  747. } else if (model.getValue("/root/hidden/ervisityn") == "Y" && cdcr_flag == "U") {
  748. opener.model.setValue("/root/hidden/ervisityn", "N");
  749. }
  750. }
  751. } else {
  752. messageBox("변경된 내역이","I004");
  753. }
  754. // alert("cdcr_flag:"+cdcr_flag);
  755. // 등급 비활성화 처리
  756. cmb_roomgrdecd2.disabled = true;
  757. if (model.getValue("/root/hidden/flag/rcv_flag/cdcr_count") == '1'){
  758. fQuery1();
  759. }
  760. // 변경이 성공하면 세부사항을 최신DB내역으로 갱신한다. 안그러면 연속 변경저장시 오류발생함.
  761. // currentrow는 원래 선택해서 변수에 담은 재원내역 Row
  762. // 구현예정 : 리턴값 체크해서 성공시에만 재조회한다. 그리고 INPT의 변경사항에 대한 변경값 REFRESH기능 필요
  763. // fQuery1();
  764. // 구현예정 : fQuery(currentrow);
  765. }
  766. //병실 성별 체크
  767. // 2008.07.29 10세미만일 때 성별체크 하지 않음
  768. function fRoomSexCheck(inpt_wardcd, inpt_roomcd, ptbs_sex, inpt_sex, rrgstno)
  769. {
  770. if (fRoomSexGubunCheck(rrgstno)) {
  771. return true;
  772. }
  773. if (ptbs_sex != inpt_sex) {
  774. if (inpt_sex != "A" && inpt_sex != "" && inpt_sex != " " && inpt_sex != null) {
  775. messageBox("선택하신 병실의 성별과 환자의 성별이 서로 틀립니다.\r\n\r\n"
  776. + "[혼성입원 연령제한 안내]\r\n\r\n"
  777. + "우리 병원에서는 만 6세미만의 경우에만 혼성입원이 가능합니다.\r\n"
  778. + "만 6세이상의 환자에 대하여 혼성입원이 필요한 경우 원무팀으로 연락바랍니다.\r\n"
  779. + "( 입원결정 및 전실신청시 해당 )\r\n\r\n"
  780. + "☎ 문의사항 ☎\r\n"
  781. + "본원 원무팀 : 재원파트 5064 / 5065, 응급수납 5058 / 5068\r\n"
  782. + "칠곡 원무팀 : 재원파트 2065 / 2066, 응급수납 2108", "E000");
  783. return false;
  784. }
  785. }
  786. //분만실("2100300000")일 경우 남자 체크
  787. if (inpt_wardcd == "2100300000") {
  788. if (ptbs_sex == "M") {
  789. messageBox("성별이 남자입니다. 다른병동을","C002");
  790. model.setValue("/root/main/cdcr/cdcr_chngwardcd", model.getValue("/root/hidden/original/icdr/icdr_wardcd"));
  791. //model.setValue("/root/main/inpt/inpt_roomcd","");
  792. //model.setValue("/root/main/inpt/inpt_roomgrdecd","");
  793. //model.setValue("/root/main/inpt/inpt_roomtypecd","");
  794. model.refresh();
  795. return false;
  796. }
  797. }
  798. return true;
  799. model.refresh();
  800. }
  801. // 간호확인(임시)
  802. function fCareCnfm(arg1){
  803. var icdr_flag = null;
  804. cdcr_flag = arg1;
  805. model.removeNodeset("/root/send/s_cdcr/cdcr");
  806. if (cdcr_flag == 'U'){ // 신청취소 루틴
  807. var v_acptflagcd = null;
  808. var curruntrow = datagrid3.row;
  809. if( curruntrow >= datagrid3.fixedRows ){
  810. if(curruntrow < 1) return false; // 스크롤시 onclick 이벤트가 적용되므로
  811. else
  812. {
  813. var rownum = curruntrow - datagrid3.fixedRows + 1;
  814. v_acptflagcd = model.getValue("/root/hidden/original/cdcr["+ rownum + "]/cdcr_acptflagcd");
  815. if (v_acptflagcd == '2'){
  816. copyNodeType("/root/send/s_cdcr", "/root/hidden/original/cdcr["+ rownum + "]", "replace");
  817. model.setValue("/root/send/s_cdcr/cdcr_status",cdcr_flag);
  818. } else{
  819. messageBox("승인상태인 데이터가 아니라 간호확인을 할수 ","I004");
  820. return;
  821. }
  822. }
  823. if ( cdcr_flag == 'U' ) {
  824. submit("TXPMI01702");
  825. } else {
  826. messageBox("변경된 내역이","I004");
  827. }
  828. if (model.getValue("/root/hidden/flag/rcv_flag/cdcr_count") == '1'){
  829. fQuery1();
  830. }
  831. } else{
  832. messageBox("선택된 승인건이","I004");
  833. }
  834. }
  835. }
  836. // 진료과,병동,병실의 콤보값을 셋팅한다.
  837. function fComboNodeSet(arg1){
  838. if (arg1 == 0){
  839. // 병동에 따른 병실 셋팅
  840. var swardcd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  841. if (swardcd == null || swardcd == " " || swardcd == "") {
  842. cmb_roomcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd"
  843. cmb_roomcd2.refresh();
  844. //2010-10-04 이동식 추가 병상정보 세팅
  845. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd"
  846. cmb_bedcd2.refresh();
  847. } else {
  848. cmb_roomcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + swardcd + "' ]";
  849. cmb_roomcd2.refresh();
  850. //2010-10-04 이동식 추가 병상정보 세팅
  851. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + swardcd + "' ]";
  852. cmb_bedcd2.refresh();
  853. }
  854. // 형태에 따른 등급셋팅
  855. var sroomtypecd = model.getValue("/root/main/cdcr/cdcr_chngroomtype");
  856. if (sroomtypecd == null || sroomtypecd == " " || sroomtypecd == "") {
  857. //cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd"
  858. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde"
  859. cmb_roomgrdecd2.refresh();
  860. } else {
  861. // NICU의 경우 원무 공통코드에 정의된 등급으로 처리
  862. if (swardcd == "2110201000") {
  863. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/init/pamcomcode/PK115list/PK115";
  864. } else {
  865. //cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd[typecd = '" + sroomtypecd + "' ]";
  866. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = '" + sroomtypecd + "' ]";
  867. }
  868. cmb_roomgrdecd2.refresh();
  869. }
  870. }else if (arg1 == 1){ // 병동선택시 병실노드셋 변경
  871. var swardcd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  872. if (swardcd == null || swardcd == " " || swardcd == "") {
  873. cmb_roomcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd"
  874. cmb_roomcd2.refresh();
  875. //2010-10-04 이동식 추가 병상정보 세팅
  876. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd"
  877. cmb_bedcd2.refresh();
  878. } else {
  879. cmb_roomcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + swardcd + "' ]";
  880. cmb_roomcd2.refresh();
  881. //2010-10-04 이동식 추가 병상정보 세팅
  882. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + swardcd + "' ]";
  883. cmb_bedcd2.refresh();
  884. }
  885. }else if (arg1 == 2){ // 병실선택시 형태에 따른 등급 셋팅
  886. var sroomtypecd = model.getValue("/root/main/cdcr/cdcr_chngroomtype");
  887. if (sroomtypecd == null || sroomtypecd == " " || sroomtypecd == "") {
  888. //cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd"
  889. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde"
  890. cmb_roomgrdecd2.refresh();
  891. } else {
  892. //cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd[typecd = '" + sroomtypecd + "' ]";
  893. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = '" + sroomtypecd + "' ]";
  894. cmb_roomgrdecd2.refresh();
  895. }
  896. }
  897. }
  898. // Popup용 데이터 생성
  899. function fCopyPopup(currentrow){
  900. model.setValue("/root/hidden/source/pid", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_pid"));
  901. model.setValue("/root/hidden/source/hngnm", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_hngnm"));
  902. model.setValue("/root/hidden/source/indd", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_indd"));
  903. model.setValue("/root/hidden/source/cretno", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_cretno"));
  904. model.setValue("/root/hidden/source/mskind", model.getValue("/root/hidden/original/inpt["+currentrow+"]/inpt_mskind"));
  905. }
  906. //세션정보
  907. function fGetUserInfosSampling()
  908. {
  909. var sUserInfosS = getUserInfos();
  910. sUserInfosS = sUserInfosS + "|";
  911. var UserInfosS_Array = sUserInfosS.split("|");
  912. var userid = UserInfosS_Array[0]; //사용자번호
  913. var usernm = UserInfosS_Array[1]; //사용자이름
  914. var posinstcd = UserInfosS_Array[2]; //소속기관코드
  915. var posinstnm = UserInfosS_Array[3]; //소속기관명
  916. var posdeptcd = UserInfosS_Array[4]; //소속부서코드
  917. var posdeptnm = UserInfosS_Array[5]; //소속부서명
  918. var dutplceinstcd = UserInfosS_Array[6]; //근무지기관코드
  919. var dutplceinstnm = UserInfosS_Array[7]; //근무지기관명
  920. var dutplcecd = UserInfosS_Array[8]; //근무지부서코드
  921. var dutplcenm = UserInfosS_Array[9]; //근무지부서명
  922. model.makeNode("/root/hidden/session/" + "userid");
  923. model.makeNode("/root/hidden/session/" + "usernm");
  924. model.makeNode("/root/hidden/session/" + "posinstcd");
  925. model.makeNode("/root/hidden/session/" + "posinstnm");
  926. model.makeNode("/root/hidden/session/" + "dutplcecd");
  927. model.makeNode("/root/hidden/session/" + "posdeptnm")
  928. if (userid == null || userid == "" || userid == " " || userid == "-") userid = "pam";
  929. //if (posinstcd == null || posinstcd == "" || posinstcd == " " || posinstcd == "-") posinstcd = "";
  930. model.setValue("/root/hidden/session/userid",userid);
  931. model.setValue("/root/hidden/session/usernm",usernm);
  932. model.setValue("/root/hidden/session/posinstcd",dutplceinstcd);
  933. model.setValue("/root/hidden/session/posinstnm",posinstnm);
  934. model.setValue("/root/hidden/session/dutplcecd",dutplcecd);
  935. model.setValue("/root/hidden/session/posdeptnm",posdeptnm);
  936. // JHP, 2009.06.22, 기관코드가 012로 박아져 있어서 그걸 세션정보의 dutplcecd로 다시 set한다.
  937. model.setValue("/root/send/sess_posinstcd",dutplceinstcd);
  938. model.refresh();
  939. }
  940. ]]>
  941. </script>
  942. <script type="javascript" ev:event="xforms-ready">
  943. <![CDATA[
  944. // 공통코드 조회
  945. zbcfGetCodeList(new Array("P0313","P0360","P0391"), new Array("/root/init/P0313list","/root/init/P0360list","/root/init/P0391list"));
  946. // 원무공통코드 조회
  947. pamfGetCodeList(new Array("PK107", "PK115"), new Array("/root/init/pamcomcode/PK107list","/root/init/pamcomcode/PK115list"));
  948. submit("TRPMI00106");
  949. //세션정보
  950. fGetUserInfosSampling();
  951. // 살아있는 병실등급 조회
  952. submit("TRPMB00303");
  953. if (model.getValue("/root/hidden/session/dutplcecd") == "2280200000" && model.getValue("/root/hidden/session/posinstcd") == "012") {
  954. button2.disabled = true;
  955. button6.disabled = true;
  956. }
  957. /* 2007.11.27
  958. 1.파라메터
  959. 2.상단정보
  960. 3.사용자소속부서
  961. */
  962. //****************************************************************************************************
  963. var paminfo = getGlobalVariable("paminfo"); //프로그램에 따라 원무정보(paminfo), 환자기본정보(patflag) get
  964. if(paminfo.length > 0) {//원무 정보(기본 정보)가 있는 경우
  965. model.removenode("/root/main/paminfo");
  966. model.makeNode("/root/main/paminfo");
  967. setCSVToNode("/root/main/paminfo", paminfo);
  968. var spid = model.getValue("/root/main/paminfo/list/pid"); //등록번호
  969. model.setValue("/root/send/srchcond2",model.getValue("/root/main/paminfo/list/wardcd")); //병동
  970. model.setValue("/root/hidden/ervisityn", model.getValue("/root/main/paminfo/list/ervisityn")); // 응급실 전실여부 저장
  971. fQuery1(); //병동환자리스트 조회
  972. var aa = instance1.selectSingleNode("/root/hidden/original");
  973. var node = aa.childNodes; // ("/root/hidden/original/inpt")
  974. // var cur_row = datagrid2.findRow(spid,datagrid2.fixedRows,2); 해당값을 찾아 row를 반환한다
  975. for (i = 1; i <= node.length; i++ )
  976. {
  977. var aaa = model.getValue("/root/hidden/original/inpt["+i+"]/inpt_pid");
  978. if (aaa == spid) {
  979. var cur_row = i;
  980. datagrid2.isSelected(cur_row + 1) = true;
  981. datagrid2.topRow = cur_row;
  982. fQuery(cur_row);
  983. fCopyPopup(cur_row);// Popup용 데이터 전달
  984. fComboNodeSet(0);// 병동,병실의 콤보값을 셋팅한다.
  985. fQuery_Wardcond();
  986. output11.text = getCurrentDate();
  987. output11.refresh();
  988. return false;
  989. }
  990. }
  991. }else {
  992. model.setValue("/root/send/srchcond2",getUserInfo("dutplcecd")); // 사용자(접속자)의 병동코드를 가져온다.
  993. fQuery1(); //병동환자리스트 조회
  994. }
  995. fQuery_Wardcond();
  996. output11.text = getCurrentDate();
  997. output11.refresh();
  998. // fInit();
  999. ]]>
  1000. </script>
  1001. </xhtml:head>
  1002. <xhtml:body style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  1003. <group id="group1" style="left:0px; top:0px; width:1185px; height:760px; ">
  1004. <caption id="caption40" class="tit_2" style="left:5px; top:55px; width:170px; height:13px; font-family:돋움; vertical-align:middle; ">층별 병상현황</caption>
  1005. <line id="line6" class="line_1" style="x1:0px; y1:70px; x2:340px; y2:70px; "/>
  1006. <button id="button4" class="btn3_letter6" visibility="hidden" style="left:0px; top:736px; width:104px; height:22px; ">
  1007. <caption>전과전실조회</caption>
  1008. <script type="javascript" ev:event="DOMActivate">
  1009. <![CDATA[
  1010. if (model.getValue("/root/hidden/source/pid") != null && model.getValue("/root/hidden/source/pid") != ""){
  1011. modal("../../../pam/ipatmngtweb/xrw/SPPMI01900", "1","50", "50", "SPPMI01900", "/root/hidden/source", "/root/hidden/target");
  1012. }
  1013. ]]>
  1014. </script>
  1015. </button>
  1016. <group id="group3" style="left:350px; top:10px; width:835px; height:720px; ">
  1017. <select1 id="combo13" ref="/root/main/cdcr/cdcr_bsex" class="combo_default" disabled="true" appearance="minimal" style="left:678px; top:132px; width:155px; height:19px; text-align:center; ">
  1018. <choices>
  1019. <itemset nodeset="/root/init/P0391list/P0391">
  1020. <label ref="cdnm"/>
  1021. <value ref="cdid"/>
  1022. </itemset>
  1023. </choices>
  1024. </select1>
  1025. <select1 id="combo12" ref="/root/hidden/original/icdr/icdr_bsex" class="combo_default" disabled="true" appearance="minimal" style="left:386px; top:244px; width:155px; height:19px; text-align:center; ">
  1026. <choices>
  1027. <itemset nodeset="/root/init/P0391list/P0391">
  1028. <label ref="cdnm"/>
  1029. <value ref="cdid"/>
  1030. </itemset>
  1031. </choices>
  1032. </select1>
  1033. <select1 id="combo11" ref="/root/hidden/original/icdr/icdr_sex" class="combo_default" disabled="true" appearance="minimal" style="left:386px; top:154px; width:77px; height:19px; ">
  1034. <choices>
  1035. <itemset nodeset="/root/init/P0313list/P0313">
  1036. <label ref="cdnm"/>
  1037. <value ref="cdid"/>
  1038. </itemset>
  1039. </choices>
  1040. </select1>
  1041. <group id="group2" style="left:0px; top:0px; width:270px; height:35px; ">
  1042. <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:270px; height:35px; "/>
  1043. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:65px; height:17px; ">병동 :</caption>
  1044. <select1 id="combo1" ref="/root/send/srchcond2" class="combo_search" appearance="minimal" style="left:83px; top:8px; width:102px; height:19px; ">
  1045. <choices>
  1046. <itemset nodeset="/root/hidden/init/wardcd">
  1047. <label ref="nm"/>
  1048. <value ref="cd"/>
  1049. </itemset>
  1050. </choices>
  1051. <script type="javascript" ev:event="xforms-select">
  1052. <![CDATA[
  1053. fQuery1();
  1054. ]]>
  1055. </script>
  1056. </select1>
  1057. <bool id="bool1" checkvalue="Y,N" ref="/root/send/mycheck" style="left:194px; top:8px; width:20px; height:20px; ">
  1058. <script type="javascript" ev:event="xforms-value-changed">
  1059. <![CDATA[
  1060. fQuery1();
  1061. ]]>
  1062. </script>
  1063. </bool>
  1064. <caption id="caption3" style="left:215px; top:9px; width:40px; height:20px; ">내환자</caption>
  1065. </group>
  1066. <caption id="caption2" class="tit_2" style="left:5px; top:45px; width:100px; height:13px; font-family:돋움; vertical-align:middle; ">환자리스트</caption>
  1067. <line id="line2" class="line_1" style="x1:0px; y1:60px; x2:272px; y2:60px; "/>
  1068. <datagrid id="datagrid2" nodeset="/root/hidden/original/inpt" caption="병실(상)^병실(상)^환자명(표)^등록번호^Sex/Age^Sex/Age^Sex^Age|병실(상)^병실(상)^환자명(표)^등록번호^Sex/Age^Sex/Age^Sex^Age" colsep="^" colwidth="47, 19, 67, 60, 36, 25" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:65px; width:272px; height:655px; ">
  1069. <col ref="inpt_roomcd" style="text-align:center; "/>
  1070. <col ref="inpt_bedno" style="text-align:center; "/>
  1071. <col ref="inpt_hngnm2" style="text-align:center; "/>
  1072. <col ref="inpt_pid" style="text-align:center; "/>
  1073. <col disabled="true" ref="inpt_sex" type="combo" style="text-align:center; ">
  1074. <choices>
  1075. <itemset nodeset="/root/init/P0313list/P0313">
  1076. <label ref="cdnm"/>
  1077. <value ref="cdid"/>
  1078. </itemset>
  1079. </choices>
  1080. </col>
  1081. <col ref="inpt_age" style="text-align:right; padding-right:2; "/>
  1082. <script type="javascript" ev:event="ondblclick">
  1083. <![CDATA[
  1084. currentrow = datagrid2.row - datagrid2.fixedRows +1;
  1085. if(currentrow < 1) {
  1086. return false;
  1087. }else{
  1088. // 재원환자정보 조회 ( 현재 선택된 재원내역 Row )
  1089. fQuery(currentrow);
  1090. // Popup용 데이터 전달
  1091. fCopyPopup(currentrow);
  1092. // 병동,병실의 콤보값을 셋팅한다.
  1093. fComboNodeSet(0);
  1094. model.setValue("/root/send/deisolation", "");
  1095. chk_deisol.refresh();
  1096. }
  1097. ]]>
  1098. </script>
  1099. </datagrid>
  1100. <caption id="caption4" class="tit_2" style="left:288px; top:45px; width:170px; height:13px; font-family:돋움; vertical-align:middle; ">현재재원정보</caption>
  1101. <line id="line3" class="line_1" style="x1:283px; y1:60px; x2:543px; y2:60px; "/>
  1102. <caption id="caption5" class="tit_2" style="left:580px; top:45px; width:170px; height:14px; font-family:돋움; vertical-align:middle; ">전실신청정보</caption>
  1103. <line id="line4" class="line_1" style="x1:575px; y1:60px; x2:835px; y2:60px; "/>
  1104. <caption id="caption6" class="cell_1" style="left:283px; top:65px; width:100px; height:20px; ">병동</caption>
  1105. <caption id="caption7" class="cell_1" style="left:283px; top:88px; width:100px; height:20px; ">병실 / 병상</caption>
  1106. <caption id="caption8" class="cell_1" style="left:283px; top:110px; width:100px; height:20px; ">환자명 / 표시명</caption>
  1107. <caption id="caption9" class="cell_1" style="left:283px; top:132px; width:100px; height:20px; ">등록번호</caption>
  1108. <caption id="caption10" class="cell_1" style="left:283px; top:154px; width:100px; height:20px; ">Sex/Age</caption>
  1109. <caption id="caption11" class="cell_1" style="left:283px; top:176px; width:54px; height:20px; ">등급</caption>
  1110. <caption id="caption12" class="cell_1" style="left:283px; top:222px; width:100px; height:20px; ">병실정원</caption>
  1111. <caption id="caption13" class="cell_1" style="left:283px; top:244px; width:100px; height:20px; ">병실성별</caption>
  1112. <button id="button5" class="icon_right" style="left:545px; top:150px; width:26px; height:19px; ">
  1113. <caption/>
  1114. <script type="javascript" ev:event="onclick">
  1115. <![CDATA[
  1116. //격리병실 초기화
  1117. model.setValue("/root/send/isolationroom", "N");
  1118. // 무균(다인)병실 초기화
  1119. model.setValue("/root/send/antivirus", "N");
  1120. // 구현예정 : 현재재원정보를 전실신청정보로 복사한다.
  1121. var icdr_flag = instance1.selectSingleNode("/root/hidden/original/icdr");
  1122. if ( icdr_flag != null){
  1123. model.setValue("/root/main/cdcr/cdcr_chngwardcd",model.getValue("/root/hidden/original/icdr/icdr_wardcd"));
  1124. model.setValue("/root/main/cdcr/cdcr_chngroomcd",model.getValue("/root/hidden/original/icdr/icdr_roomcd"));
  1125. model.setValue("/root/main/cdcr/cdcr_chngbedcd",model.getValue("/root/hidden/original/icdr/icdr_bedcd"));
  1126. model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/hidden/original/icdr/icdr_roomgrdecd"));
  1127. model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/hidden/original/icdr/icdr_roomtypecd"));
  1128. model.setValue("/root/main/cdcr/cdcr_bedcnt",model.getValue("/root/hidden/original/icdr/icdr_bedcnt"));
  1129. model.setValue("/root/main/cdcr/cdcr_bsex",model.getValue("/root/hidden/original/icdr/icdr_bsex"));
  1130. model.setValue("/root/main/cdcr/cdcr_emptbedcnt",model.getValue("/root/hidden/original/icdr/icdr_emptbedcnt"));
  1131. // 호스피스병동 등급 수정가능 처리
  1132. // NICU 환자 상태에 따른 산정요율변경에 따라 NICU 추가 by 조중래 20161025
  1133. if(model.getValue("/root/main/cdcr/cdcr_chngwardcd") == '3050136000'
  1134. || model.getValue("/root/main/cdcr/cdcr_chngwardcd") == '2110201000'){
  1135. cmb_roomgrdecd2.disabled = false;
  1136. } else {
  1137. cmb_roomgrdecd2.disabled = true;
  1138. }
  1139. if (model.getValue("/root/main/cdcr/cdcr_chngwardcd") == '2110201000') {
  1140. }
  1141. fComboNodeSet(0);
  1142. model.refresh();
  1143. }
  1144. ]]>
  1145. </script>
  1146. </button>
  1147. <line id="line5" class="line_2" style="x1:283px; y1:85px; x2:543px; y2:85px; "/>
  1148. <line id="line7" class="line_2" style="x1:283px; y1:107px; x2:543px; y2:107px; "/>
  1149. <line id="line8" class="line_2" style="x1:283px; y1:129px; x2:543px; y2:129px; "/>
  1150. <line id="line9" class="line_2" style="x1:283px; y1:151px; x2:543px; y2:151px; "/>
  1151. <line id="line10" class="line_2" style="x1:283px; y1:219px; x2:543px; y2:219px; "/>
  1152. <line id="line11" class="line_2" style="x1:283px; y1:241px; x2:543px; y2:241px; "/>
  1153. <line id="line12" class="line_2" style="x1:283px; y1:173px; x2:543px; y2:173px; "/>
  1154. <line id="line13" class="line_3" style="x1:283px; y1:266px; x2:543px; y2:266px; "/>
  1155. <output id="output3" ref="/root/hidden/original/icdr/icdr_hngnm" class="output_fix" style="left:386px; top:110px; width:82px; height:19px; "/>
  1156. <output id="output4" ref="/root/hidden/original/icdr/icdr_pid" class="output_fix" style="left:386px; top:132px; width:155px; height:19px; "/>
  1157. <output id="output7" ref="/root/hidden/original/icdr/icdr_bedcnt" class="output_fix" style="left:386px; top:222px; width:155px; height:19px; text-align:center; "/>
  1158. <line id="line14" class="line_2" style="x1:575px; y1:129px; x2:835px; y2:129px; "/>
  1159. <line id="line15" class="line_2" style="x1:575px; y1:151px; x2:835px; y2:151px; "/>
  1160. <line id="line16" class="line_2" style="x1:575px; y1:195px; x2:835px; y2:195px; "/>
  1161. <line id="line17" class="line_2" style="x1:575px; y1:217px; x2:835px; y2:217px; "/>
  1162. <line id="line18" class="line_2" style="x1:575px; y1:173px; x2:835px; y2:173px; "/>
  1163. <line id="line19" class="line_3" style="x1:575px; y1:265px; x2:835px; y2:265px; "/>
  1164. <caption id="caption14" class="cell_1" style="left:575px; top:154px; width:54px; height:20px; ">등급</caption>
  1165. <caption id="caption15" class="cell_1" style="left:575px; top:176px; width:54px; height:20px; ">형태</caption>
  1166. <caption id="caption16" class="cell_1" style="left:575px; top:198px; width:100px; height:20px; ">O2 /Suction사용</caption>
  1167. <caption id="caption17" class="cell_1" style="left:575px; top:220px; width:100px; height:42px; ">비고</caption>
  1168. <caption id="caption18" class="cell_1" style="left:575px; top:65px; width:100px; height:20px; ">병동</caption>
  1169. <caption id="caption19" class="cell_1" style="left:575px; top:88px; width:100px; height:20px; ">병실 / 병상</caption>
  1170. <caption id="caption20" class="cell_1" style="left:575px; top:110px; width:100px; height:20px; ">병실정원/빈병상</caption>
  1171. <line id="line20" class="line_2" style="x1:575px; y1:85px; x2:835px; y2:85px; "/>
  1172. <caption id="caption21" class="cell_1" style="left:575px; top:132px; width:100px; height:20px; ">병실성별</caption>
  1173. <line id="line21" class="line_2" style="x1:575px; y1:107px; x2:835px; y2:107px; "/>
  1174. <output id="output9" ref="/root/main/cdcr/cdcr_bedcnt" class="output_fix" style="left:678px; top:110px; width:77px; height:19px; text-align:center; "/>
  1175. <select1 id="cmb_wardcd2" ref="/root/main/cdcr/cdcr_chngwardcd" class="combo_default" disabled="true" appearance="minimal" style="left:678px; top:65px; width:155px; height:19px; ">
  1176. <choices>
  1177. <itemset nodeset="/root/hidden/init/wardcd">
  1178. <label ref="nm"/>
  1179. <value ref="cd"/>
  1180. </itemset>
  1181. </choices>
  1182. <script type="javascript" ev:event="xforms-select">
  1183. <![CDATA[
  1184. model.resetInstanceNode("/root/main/cdcr/cdcr_chngroomcd");
  1185. // 병실 정보셋팅
  1186. fComboNodeSet(1);
  1187. ]]>
  1188. </script>
  1189. </select1>
  1190. <select1 id="cmb_roomcd2" ref="/root/main/cdcr/cdcr_chngroomcd" class="combo_default" disabled="true" appearance="minimal" style="left:678px; top:88px; width:77px; height:19px; ">
  1191. <choices>
  1192. <itemset nodeset="/root/hidden/init/roomcd">
  1193. <label ref="nm"/>
  1194. <value ref="cd"/>
  1195. </itemset>
  1196. </choices>
  1197. <script type="javascript" ev:event="xforms-select">
  1198. <![CDATA[
  1199. var sroomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  1200. model.setValue("/root/main/cdcr/cdcr_chngwardcd",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/wd"));
  1201. model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/gr"));
  1202. model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/ty"));
  1203. model.setValue("/root/main/cdcr/cdcr_bedcnt",model.getValue("/root/hidden/wdrminfo/wdrm[wdrm_roomcd = '" + sroomcd + "' ]/wdrm_bedcnt"));
  1204. model.setValue("/root/main/cdcr/cdcr_bsex",model.getValue("/root/hidden/wdrminfo/wdrm[wdrm_roomcd = '" + sroomcd + "' ]/wdrm_sex"));
  1205. model.setValue("/root/main/cdcr/cdcr_emptbedcnt",model.getValue("/root/hidden/wdrminfo/wdrm[wdrm_roomcd = '" + sroomcd + "' ]/wdrm_roomemptbedcnt"));
  1206. //2010-10-04 이동식 추가 병상정보 세팅
  1207. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[rm = '" + sroomcd + "' ]";
  1208. cmb_bedcd2.refresh();
  1209. // 병실의 성별이 현재환자의 성별과 상이하면 메세지 표시
  1210. var sroomsex = model.getValue("/root/main/cdcr/cdcr_bsex");
  1211. var ssex = model.getValue("/root/hidden/original/icdr/icdr_sex");
  1212. var chkAge = model.getValue("/root/hidden/original/icdr/icdr_age");
  1213. if (chkAge > 0 && chkAge < 10 ) {
  1214. if ( sroomsex != 'A') { // A는 공통
  1215. if ( sroomsex != ssex){
  1216. var smsgrtn = messageBox("성별이 맞지 않지만 10세를 넘기지 않습니다. 성별이 다른 병실 등록을","Q003");
  1217. if (smsgrtn == '6') {
  1218. ;
  1219. }else {
  1220. model.setValue("/root/main/cdcr/cdcr_chngroomcd","");
  1221. model.refresh();
  1222. return false;
  1223. }
  1224. }
  1225. }
  1226. }else {
  1227. if ( sroomsex != 'A') { // A는 공통
  1228. if ( sroomsex != ssex){
  1229. messageBox("병실의 성별이 환자의 성별과 ","E004");
  1230. model.setValue("/root/main/cdcr/cdcr_chngroomcd","");
  1231. model.refresh();
  1232. return false;
  1233. }
  1234. }
  1235. }
  1236. // 형태에 따른 등급셋팅
  1237. fComboNodeSet(2);
  1238. model.refresh();
  1239. ]]>
  1240. </script>
  1241. </select1>
  1242. <select1 id="cmb_roomgrdecd2" ref="/root/main/cdcr/cdcr_chngroomgrde" class="combo_default" disabled="true" appearance="minimal" style="left:632px; top:153px; width:201px; height:19px; ">
  1243. <choices>
  1244. <!--2009/06/19 김주희 "전실신청정보 -> 등급" 부분 병실등급 수가종료 된것에 대해 빼기 roomgrdecd -> roomgrde-->
  1245. <!--<itemset nodeset="/root/hidden/init/roomgrdecd">
  1246. <label ref="nm"/>
  1247. <value ref="cd"/>
  1248. </itemset>-->
  1249. <itemset nodeset="/root/hidden/roomgrdelist/roomgrde">
  1250. <label ref="cdnm"/>
  1251. <value ref="cdid"/>
  1252. </itemset>
  1253. </choices>
  1254. </select1>
  1255. <select1 id="combo5" ref="/root/main/cdcr/cdcr_prestremcd" class="combo_default" appearance="minimal" style="left:678px; top:220px; width:155px; height:19px; ">
  1256. <choices>
  1257. <itemset nodeset="/root/init/P0360list/P0360">
  1258. <label ref="cdnm"/>
  1259. <value ref="cdid"/>
  1260. </itemset>
  1261. </choices>
  1262. </select1>
  1263. <line id="line22" class="line_2" style="x1:675px; y1:241px; x2:835px; y2:241px; "/>
  1264. <button id="button2" class="btn4_letter4" style="left:755px; top:267px; width:80px; height:22px; ">
  1265. <caption>전실신청</caption>
  1266. <script type="javascript" ev:event="DOMActivate">
  1267. <![CDATA[
  1268. bool2.dispatch("xforms-value-changed");
  1269. fChangeSave("I");
  1270. //격리병실신청 정보 클리어
  1271. model.setValue("/root/send/isolationroom", "N");
  1272. // 무균(다인)병실 초기화
  1273. model.setValue("/root/send/antivirus", "N");
  1274. ]]>
  1275. </script>
  1276. </button>
  1277. <caption id="caption22" class="tit_2" style="left:283px; top:290px; width:147px; height:13px; font-family:돋움; vertical-align:middle; ">환자별 전과전실 현황</caption>
  1278. <line id="line23" class="line_1" style="x1:283px; y1:305px; x2:835px; y2:305px; "/>
  1279. <datagrid id="datagrid3" nodeset="/root/hidden/original/cdcr" caption="^변경일^승인^구분^From^From^From^From^From^To^To^To^To^To^To^To|^변경일^승인^구분^병동^병실^병상^과^전문의^병동^병실^병상^과^전문의^O2^Suction" colsep="^" colwidth="26, 70, 40, 50, 73, 51, 51, 110, 60, 73, 51, 51, 110, 60, 34, 46" mergecellsfixedrows="bycolrec" rowsep="|" style="left:283px; top:310px; width:550px; height:165px; ">
  1280. <col checkvalue="U,N" ref="cdcr_status" type="checkbox"/>
  1281. <col ref="cdcr_enddd" format="yyyy-mm-dd" style="text-align:center; "/>
  1282. <col disabled="true" ref="cdcr_acptflagcd" type="combo">
  1283. <choices>
  1284. <item>
  1285. <label>신청</label>
  1286. <value>1</value>
  1287. </item>
  1288. <item>
  1289. <label>승인</label>
  1290. <value>2</value>
  1291. </item>
  1292. <item>
  1293. <label>완료</label>
  1294. <value>3</value>
  1295. </item>
  1296. </choices>
  1297. </col>
  1298. <col disabled="true" ref="cdcr_appflagcd" type="combo">
  1299. <choices>
  1300. <item>
  1301. <label>전실</label>
  1302. <value>1</value>
  1303. </item>
  1304. <item>
  1305. <label>전과</label>
  1306. <value>2</value>
  1307. </item>
  1308. <item>
  1309. <label>전실전과</label>
  1310. <value>3</value>
  1311. </item>
  1312. </choices>
  1313. </col>
  1314. <col disabled="true" ref="cdcr_prestwardcd" type="combo">
  1315. <choices>
  1316. <itemset nodeset="/root/hidden/init/wardcd">
  1317. <label ref="nm"/>
  1318. <value ref="cd"/>
  1319. </itemset>
  1320. </choices>
  1321. </col>
  1322. <col disabled="true" ref="cdcr_prestroomcd" type="combo">
  1323. <choices>
  1324. <itemset nodeset="/root/hidden/init/roomcd">
  1325. <label ref="nm"/>
  1326. <value ref="cd"/>
  1327. </itemset>
  1328. </choices>
  1329. </col>
  1330. <col disabled="true" ref="cdcr_prestbedcd" type="combo">
  1331. <choices>
  1332. <itemset nodeset="/root/hidden/init/bedcd">
  1333. <label ref="nm"/>
  1334. <value ref="cd"/>
  1335. </itemset>
  1336. </choices>
  1337. </col>
  1338. <col disabled="true" ref="cdcr_prestorddeptcd" type="combo">
  1339. <choices>
  1340. <itemset nodeset="/root/hidden/init/orddeptcd">
  1341. <label ref="nm"/>
  1342. <value ref="cd"/>
  1343. </itemset>
  1344. </choices>
  1345. </col>
  1346. <col disabled="true" ref="cdcr_prestmedispclid" type="combo">
  1347. <choices>
  1348. <itemset nodeset="/root/hidden/init/orddrid">
  1349. <label ref="nm"/>
  1350. <value ref="cd"/>
  1351. </itemset>
  1352. </choices>
  1353. </col>
  1354. <col disabled="true" ref="cdcr_chngwardcd" type="combo">
  1355. <choices>
  1356. <itemset nodeset="/root/hidden/init/wardcd">
  1357. <label ref="nm"/>
  1358. <value ref="cd"/>
  1359. </itemset>
  1360. </choices>
  1361. </col>
  1362. <col disabled="true" ref="cdcr_chngroomcd" type="combo">
  1363. <choices>
  1364. <itemset nodeset="/root/hidden/init/roomcd">
  1365. <label ref="nm"/>
  1366. <value ref="cd"/>
  1367. </itemset>
  1368. </choices>
  1369. </col>
  1370. <col disabled="true" ref="cdcr_chngbedcd" type="combo">
  1371. <choices>
  1372. <itemset nodeset="/root/hidden/init/bedcd">
  1373. <label ref="nm"/>
  1374. <value ref="cd"/>
  1375. </itemset>
  1376. </choices>
  1377. </col>
  1378. <col disabled="true" ref="cdcr_chngorddeptcd" type="combo">
  1379. <choices>
  1380. <itemset nodeset="/root/hidden/init/orddeptcd">
  1381. <label ref="nm"/>
  1382. <value ref="cd"/>
  1383. </itemset>
  1384. </choices>
  1385. </col>
  1386. <col disabled="true" ref="cdcr_chngmedispclid" type="combo">
  1387. <choices>
  1388. <itemset nodeset="/root/hidden/init/orddrid">
  1389. <label ref="nm"/>
  1390. <value ref="cd"/>
  1391. </itemset>
  1392. </choices>
  1393. </col>
  1394. <col ref="cdcr_oxyyn"/>
  1395. <col ref="cdcr_suctyn"/>
  1396. </datagrid>
  1397. <button id="button6" class="btn4_letter6" style="left:438px; top:282px; width:104px; height:22px; ">
  1398. <caption>전실신청취소</caption>
  1399. <script type="javascript" ev:event="DOMActivate">
  1400. <![CDATA[
  1401. fChangeSave("U");
  1402. ]]>
  1403. </script>
  1404. </button>
  1405. <bool id="bool2" checkvalue="Y,N" ref="/root/main/cdcr/cdcr_oxyyn" style="left:685px; top:198px; width:20px; height:20px; "/>
  1406. <bool id="bool3" checkvalue="Y,N" ref="/root/main/cdcr/cdcr_suctyn" style="left:765px; top:198px; width:20px; height:20px; "/>
  1407. <caption id="caption23" style="left:705px; top:199px; width:30px; height:20px; ">사용</caption>
  1408. <caption id="caption24" style="left:785px; top:199px; width:30px; height:20px; ">사용</caption>
  1409. <select1 id="cmb_roomtypecd2" ref="/root/main/cdcr/cdcr_chngroomtype" class="combo_default" disabled="true" appearance="minimal" style="left:632px; top:176px; width:201px; height:19px; ">
  1410. <choices>
  1411. <itemset nodeset="/root/hidden/init/roomtypecd">
  1412. <label ref="nm"/>
  1413. <value ref="cd"/>
  1414. </itemset>
  1415. </choices>
  1416. <script type="javascript" ev:event="xforms-select">
  1417. <![CDATA[
  1418. model.resetInstanceNode("/root/main/cdcr/cdcr_chngroomgrde");
  1419. fComboNodeSet(2);
  1420. ]]>
  1421. </script>
  1422. </select1>
  1423. <output id="output13" ref="/root/hidden/original/icdr/icdr_age" class="output_fix" style="left:466px; top:154px; width:75px; height:19px; text-align:center; "/>
  1424. <input id="input1" ref="/root/main/cdcr/cdcr_chngprestrem" style="left:678px; top:243px; width:155px; height:19px; "/>
  1425. <output id="output14" ref="/root/main/cdcr/cdcr_emptbedcnt" class="output_fix" style="left:758px; top:110px; width:75px; height:19px; text-align:center; "/>
  1426. <select1 id="cmb_wardcd1" ref="/root/hidden/original/icdr/icdr_wardcd" class="combo_default" disabled="true" appearance="minimal" style="left:386px; top:65px; width:155px; height:19px; ">
  1427. <choices>
  1428. <itemset nodeset="/root/hidden/init/wardcd">
  1429. <label ref="nm"/>
  1430. <value ref="cd"/>
  1431. </itemset>
  1432. </choices>
  1433. </select1>
  1434. <select1 id="cmb_roomcd1" ref="/root/hidden/original/icdr/icdr_roomcd" class="combo_default" disabled="true" appearance="minimal" style="left:386px; top:88px; width:77px; height:19px; ">
  1435. <choices>
  1436. <itemset nodeset="/root/hidden/init/roomcd">
  1437. <label ref="nm"/>
  1438. <value ref="cd"/>
  1439. </itemset>
  1440. </choices>
  1441. </select1>
  1442. <select1 id="cmb_roomgrdecd1" ref="/root/hidden/original/icdr/icdr_roomgrdecd" class="combo_default" disabled="true" appearance="minimal" style="left:340px; top:176px; width:201px; height:19px; ">
  1443. <choices>
  1444. <itemset nodeset="/root/hidden/init/roomgrdecd">
  1445. <label ref="nm"/>
  1446. <value ref="cd"/>
  1447. </itemset>
  1448. </choices>
  1449. </select1>
  1450. <select1 id="cmb_roomtypecd1" ref="/root/hidden/original/icdr/icdr_roomtypecd" class="combo_default" disabled="true" appearance="minimal" style="left:340px; top:200px; width:201px; height:19px; ">
  1451. <choices>
  1452. <itemset nodeset="/root/hidden/init/roomtypecd">
  1453. <label ref="nm"/>
  1454. <value ref="cd"/>
  1455. </itemset>
  1456. </choices>
  1457. </select1>
  1458. <line id="line1" class="line_2" style="x1:283px; y1:196px; x2:543px; y2:196px; "/>
  1459. <caption id="caption25" class="cell_1" style="left:283px; top:199px; width:54px; height:20px; ">형태</caption>
  1460. <datagrid id="datagrid4" nodeset="/root/hidden/original/icdrlist" caption="접수구분^신청구분^적용일자^종료일자^병동1^병실1^병상1^등급1^형태1^병동2^병실2^병상2^등급2^형태2^진료과^전문의^담당의^선택여부^Oxy여부^Suction여부^비고1^비고2^SNo^S^최종수정담당자^최종수정일시" colsep="^" colwidth="60, 60, 80, 80, 70, 60, 60, 100, 70, 70, 60, 60, 100, 70, 130, 100, 100, 62, 60, 75, 140, 100, 30, 30, 110, 110" dataheight="23" defaultrows="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="23" rowsep="|" style="left:283px; top:510px; width:550px; height:210px; ">
  1461. <col disabled="true" ref="icdr_acptflagcd" type="combo" style="text-align:center; ">
  1462. <choices>
  1463. <item>
  1464. <label>신청</label>
  1465. <value>1</value>
  1466. </item>
  1467. <item>
  1468. <label>승인</label>
  1469. <value>2</value>
  1470. </item>
  1471. <item>
  1472. <label>완료</label>
  1473. <value>3</value>
  1474. </item>
  1475. </choices>
  1476. </col>
  1477. <col disabled="true" ref="icdr_appflagcd" type="combo" style="text-align:center; ">
  1478. <choices>
  1479. <item>
  1480. <label>전실</label>
  1481. <value>1</value>
  1482. </item>
  1483. <item>
  1484. <label>전과</label>
  1485. <value>2</value>
  1486. </item>
  1487. </choices>
  1488. </col>
  1489. <col ref="icdr_fromdd" format="yyyy-mm-dd"/>
  1490. <col ref="icdr_todd" format="yyyy-mm-dd"/>
  1491. <col disabled="true" ref="icdr_wardcd" type="combo">
  1492. <choices>
  1493. <itemset nodeset="/root/hidden/init/wardcd">
  1494. <label ref="nm"/>
  1495. <value ref="cd"/>
  1496. </itemset>
  1497. </choices>
  1498. </col>
  1499. <col ref="icdr_roomcd"/>
  1500. <col ref="icdr_bedcd"/>
  1501. <col disabled="true" ref="icdr_roomgrdecd" type="combo">
  1502. <choices>
  1503. <itemset nodeset="/root/hidden/init/roomgrdecd">
  1504. <label ref="nm"/>
  1505. <value ref="cd"/>
  1506. </itemset>
  1507. </choices>
  1508. </col>
  1509. <col disabled="true" ref="icdr_roomtypecd" type="combo">
  1510. <choices>
  1511. <itemset nodeset="/root/hidden/init/roomtypecd">
  1512. <label ref="nm"/>
  1513. <value ref="cd"/>
  1514. </itemset>
  1515. </choices>
  1516. </col>
  1517. <col disabled="true" ref="icdr_wardcd2" type="combo">
  1518. <choices>
  1519. <itemset nodeset="/root/hidden/init/wardcd">
  1520. <label ref="nm"/>
  1521. <value ref="cd"/>
  1522. </itemset>
  1523. </choices>
  1524. </col>
  1525. <col ref="icdr_roomcd2"/>
  1526. <col ref="icdr_bedcd2"/>
  1527. <col disabled="true" ref="icdr_roomgrdecd2" type="combo">
  1528. <choices>
  1529. <itemset nodeset="/root/hidden/init/roomgrdecd">
  1530. <label ref="nm"/>
  1531. <value ref="cd"/>
  1532. </itemset>
  1533. </choices>
  1534. </col>
  1535. <col disabled="true" ref="icdr_roomtypecd2" type="combo">
  1536. <choices>
  1537. <itemset nodeset="/root/hidden/init/roomtypecd">
  1538. <label ref="nm"/>
  1539. <value ref="cd"/>
  1540. </itemset>
  1541. </choices>
  1542. </col>
  1543. <col disabled="true" ref="icdr_orddeptcd" type="combo">
  1544. <choices>
  1545. <itemset nodeset="/root/hidden/init/orddeptcd">
  1546. <label ref="nm"/>
  1547. <value ref="cd"/>
  1548. </itemset>
  1549. </choices>
  1550. </col>
  1551. <col disabled="true" ref="icdr_medispclid" type="combo">
  1552. <choices>
  1553. <itemset nodeset="/root/hidden/init/orddrid">
  1554. <label ref="nm"/>
  1555. <value ref="cd"/>
  1556. </itemset>
  1557. </choices>
  1558. </col>
  1559. <col disabled="true" ref="icdr_atdoctid" type="combo">
  1560. <choices>
  1561. <itemset nodeset="/root/hidden/init/orddrid">
  1562. <label ref="nm"/>
  1563. <value ref="cd"/>
  1564. </itemset>
  1565. </choices>
  1566. </col>
  1567. <col ref="icdr_specordyn"/>
  1568. <col ref="icdr_oxyyn" style="text-align:center; "/>
  1569. <col ref="icdr_suctyn" style="text-align:center; "/>
  1570. <col disabled="true" ref="icdr_prestremcd" type="combo">
  1571. <choices>
  1572. <itemset nodeset="/root/init/P0360list/P0360">
  1573. <label ref="cdnm"/>
  1574. <value ref="cdid"/>
  1575. </itemset>
  1576. </choices>
  1577. </col>
  1578. <col ref="icdr_chngprestrem"/>
  1579. <col ref="icdr_seqno"/>
  1580. <col ref="icdr_histstat"/>
  1581. <col ref="icdr_lastupdtrid"/>
  1582. <col ref="icdr_lastupdtdt"/>
  1583. </datagrid>
  1584. <caption id="caption26" class="tit_2" style="left:283px; top:495px; width:95px; height:13px; ">전과전실정보</caption>
  1585. <select1 id="cmb_bedcd1" ref="/root/hidden/original/icdr/icdr_bedcd" class="combo_default" disabled="true" appearance="minimal" style="left:466px; top:88px; width:75px; height:19px; ">
  1586. <choices>
  1587. <itemset nodeset="/root/hidden/init/bedcd">
  1588. <label ref="nm"/>
  1589. <value ref="cd"/>
  1590. </itemset>
  1591. </choices>
  1592. </select1>
  1593. <select1 id="cmb_bedcd2" ref="/root/main/cdcr/cdcr_chngbedcd" class="combo_default" disabled="true" appearance="minimal" style="left:758px; top:88px; width:55px; height:19px; ">
  1594. <choices>
  1595. <itemset nodeset="/root/hidden/init/bedcd">
  1596. <label ref="nm"/>
  1597. <value ref="cd"/>
  1598. </itemset>
  1599. </choices>
  1600. </select1>
  1601. <button id="button7" class="icon_search" style="left:817px; top:89px; width:16px; height:16px; ">
  1602. <caption/>
  1603. <script type="javascript" ev:event="DOMActivate">
  1604. <![CDATA[
  1605. model.removenode("/root/hidden/target");
  1606. model.makeNode("/root/hidden/target");
  1607. setParameter("SMPMI00100_Param1", model.getValue("/root/hidden/original/icdr/icdr_orddeptcd"));
  1608. setParameter("SMPMI00100_orduseyn", "H");
  1609. modal("SPPMI02001", "1","50", "50", "SPPMI02001", "", "");
  1610. var swardcd = instance1.selectSingleNode("/root/hidden/target/grdbedspec/wardcd");
  1611. if (swardcd != null){
  1612. var inpt_wardcd = model.getValue("/root/hidden/target/grdbedspec/wardcd");
  1613. var inpt_roomcd = model.getValue("/root/hidden/target/grdbedspec/roomcd");
  1614. //var ptbs_sex = model.getValue("/root/hidden/original/inpt/inpt_sex");
  1615. var ptbs_sex = model.getValue("/root/hidden/original/icdr/icdr_sex");
  1616. var inpt_sex = model.getValue("/root/hidden/target/grdbedspec/sex");
  1617. // 주민번호 세팅
  1618. var nodelist = instance1.selectNodes("/root/hidden/original/inpt");
  1619. var icdr_pid = model.getValue("/root/hidden/original/icdr/icdr_pid");
  1620. var ptbs_rrgstno = "";
  1621. for (i = 1 ; i <= nodelist.length; i++) {
  1622. if (icdr_pid == model.getValue("/root/hidden/original/inpt[" + i + "]/inpt_pid")) {
  1623. ptbs_rrgstno = model.getValue("/root/hidden/original/inpt[" + i + "]/inpt_rrgstno");
  1624. break;
  1625. }
  1626. }
  1627. cmb_roomcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomcd[wd = '" + inpt_wardcd + "' ]";
  1628. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[wd = '" + inpt_wardcd + "' ]";
  1629. // 20090601 JHP 수정 : 병실등급 살아있는걸로만...(기존거는 주석처리)
  1630. //cmb_roomgrdecd.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomgrdecd"
  1631. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde"
  1632. cmb_roomtypecd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomtypecd"
  1633. if( model.getValue("/root/hidden/target/grdbedspec/roomtypecd") != 'S02' ){
  1634. if (fRoomSexCheck(inpt_wardcd, inpt_roomcd, ptbs_sex, inpt_sex, ptbs_rrgstno) == false) {
  1635. //alert("2121");
  1636. return false;
  1637. }
  1638. }
  1639. model.setValue("/root/main/cdcr/cdcr_chngwardcd",model.getValue("/root/hidden/target/grdbedspec/wardcd"));
  1640. model.setValue("/root/main/cdcr/cdcr_chngroomcd",model.getValue("/root/hidden/target/grdbedspec/roomcd"));
  1641. cmb_bedcd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/bedcd[rm = '" + model.getValue("/root/main/cdcr/cdcr_chngroomcd") + "' ]";
  1642. model.setValue("/root/main/cdcr/cdcr_chngbedcd",model.getValue("/root/hidden/target/grdbedspec/bedcd"));
  1643. model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/hidden/target/grdbedspec/roomgrdecd"));
  1644. model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/hidden/target/grdbedspec/roomtypecd"));
  1645. model.setValue("/root/main/cdcr/cdcr_bsex", inpt_sex);
  1646. //fComboNodeSet(2);
  1647. //격리병실 신청 체크 해제
  1648. model.setValue("/root/send/isolationroom", "N");
  1649. // 호스피스병동 등급 수정가능 처리
  1650. if(model.getValue("/root/main/cdcr/cdcr_chngwardcd") == '3050136000'){
  1651. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = '" + model.getValue("/root/main/cdcr/cdcr_chngroomtype") + "' ]";
  1652. cmb_roomgrdecd2.refresh();
  1653. cmb_roomgrdecd2.disabled = false;
  1654. } else {
  1655. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde";
  1656. cmb_roomgrdecd2.refresh();
  1657. cmb_roomgrdecd2.disabled = true;
  1658. }
  1659. model.refresh();
  1660. }
  1661. //}
  1662. ]]>
  1663. </script>
  1664. </button>
  1665. <bool id="bool4" checkvalue="Y, N" ref="/root/send/isolationroom" style="left:573px; top:268px; width:20px; height:20px; ">
  1666. <script type="javascript" ev:event="xforms-value-changed">
  1667. <![CDATA[
  1668. var valYN = model.getValue("/root/send/isolationroom");
  1669. if( valYN == 'Y' ){
  1670. model.setValue("/root/send/deisolation", "");
  1671. chk_deisol.refresh();
  1672. if( model.getValue("/root/main/cdcr/cdcr_chngwardcd") == ''
  1673. || model.getValue("/root/main/cdcr/cdcr_chngroomcd") == ''
  1674. || model.getValue("/root/main/cdcr/cdcr_chngbedcd") == ''){
  1675. messageBox("전실신청할 병동/병실/병상 정보를 선택 후 격리체크 하세요!", "E999", "");
  1676. model.setValue("/root/send/isolationroom", "N");
  1677. bool4.refresh();
  1678. return false;
  1679. }
  1680. var retVal = messageBox("격리병실로 전실신청 하시겠습니까?", "Q999", "");
  1681. if( retVal == '6' ){
  1682. //격리병실 신청여부 체크
  1683. model.removeNodeset("/root/hidden/rcv/rcv/isocheck");
  1684. model.makeNode("/root/hidden/rcv/rcv/isocheck");
  1685. submit("TRPMI01703");
  1686. if( model.getValue("/root/hidden/rcv/rcv/isocheck/appyn") != "Y" ){
  1687. messageBox("아직 격리신청이 되지 않았습니다. 격리병실로 지정할 수 없습니다.\n주치의가 격리신청 후 격리신청 가능합니다.", "E999", "");
  1688. model.setValue("/root/send/isolationroom", "N");
  1689. bool4.refresh();
  1690. return false;
  1691. }
  1692. // S02 집중치료실의 경우 pam.picmmapp.sourcecdmapp에 매핑되어있는 등급으로 처리 by 조중래 20160922
  1693. if (model.getValue("/root/main/cdcr/cdcr_chngroomtype") == "S02") {
  1694. var newroomgrde = model.getValue("/root/hidden/roomgrdelist/roomgrde[cdid='" + model.getValue("/root/main/cdcr/cdcr_chngroomgrde") + "']/sourcecdmapp");
  1695. if (newroomgrde == null || newroomgrde == "" || newroomgrde == "-") {
  1696. alert("해당 집중치료실에는 격리등급이 생성되어있지 않습니다.\r\n수가팀(본원:6132, 칠곡:2181)으로 문의하십시오.");
  1697. model.setValue("/root/send/isolationroom", "N");
  1698. model.refresh();
  1699. return false;
  1700. }
  1701. model.setValue("/root/main/cdcr/cdcr_chngroomgrde", newroomgrde); //격리병실입원료
  1702. } else {
  1703. model.setValue("/root/main/cdcr/cdcr_chngroomgrde", "S0701"); //격리병실입원료
  1704. model.setValue("/root/main/cdcr/cdcr_chngroomtype", "S07"); //격리
  1705. }
  1706. // cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = 'S07']";
  1707. // cmb_roomgrdecd2.refresh();
  1708. fComboNodeSet(2);
  1709. }else{
  1710. model.setValue("/root/send/isolationroom", "N");
  1711. var sroomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  1712. //model.setValue("/root/main/cdcr/cdcr_chngwardcd",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/wd"));
  1713. model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/gr"));
  1714. model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/ty"));
  1715. fComboNodeSet(2);
  1716. }
  1717. }else{
  1718. var sroomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  1719. //model.setValue("/root/main/cdcr/cdcr_chngwardcd",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/wd"));
  1720. model.setValue("/root/main/cdcr/cdcr_chngroomgrde",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/gr"));
  1721. model.setValue("/root/main/cdcr/cdcr_chngroomtype",model.getValue("/root/hidden/init/roomcd[cd = '" + sroomcd + "' ]/ty"));
  1722. fComboNodeSet(2);
  1723. }
  1724. model.refresh();
  1725. ]]>
  1726. </script>
  1727. </bool>
  1728. <caption id="caption27" style="left:592px; top:269px; width:100px; height:20px; ">격리병실신청</caption>
  1729. <output id="output1" ref="/root/hidden/original/icdr/icdr_hngnm2" class="output_fix" style="left:466px; top:110px; width:75px; height:19px; "/>
  1730. <select id="chk_deisol" ref="/root/send/deisolation" overflow="visible" appearance="full" style="left:665px; top:270px; width:90px; height:17px; border-style:none; ">
  1731. <choices>
  1732. <item>
  1733. <label>격리병실해제</label>
  1734. <value>Y</value>
  1735. </item>
  1736. </choices>
  1737. <script type="javascript" ev:event="xforms-value-changed">
  1738. <![CDATA[
  1739. if (model.getValue("/root/send/deisolation") != "Y") {
  1740. return;
  1741. }
  1742. model.setValue("/root/send/isolationroom", "N");
  1743. var wardcd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  1744. var roomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  1745. if (wardcd == "" || roomcd == "") {
  1746. messageBox("격리해제할 병동/병실 정보를 선택하세요!", "E999");
  1747. model.setValue("/root/send/deisolation", "");
  1748. chk_deisol.refresh();
  1749. return;
  1750. }
  1751. model.setValue("/root/send/wardcd", wardcd);
  1752. model.setValue("/root/send/roomcd", roomcd);
  1753. submit("TRPMI01704");
  1754. model.setValue("/root/main/cdcr/cdcr_chngroomgrde", model.getValue("/root/hidden/orgroominfo/grdecd"));
  1755. var typecd = model.getValue("/root/hidden/orgroominfo/typecd");
  1756. model.setValue("/root/main/cdcr/cdcr_chngroomtype", typecd);
  1757. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[typecd = '" + typecd + "' ]";
  1758. cmb_roomgrdecd2.refresh();
  1759. model.refresh();
  1760. ]]>
  1761. </script>
  1762. </select>
  1763. <select id="checkbox1" ref="/root/send/antivirus" overflow="visible" appearance="full" style="left:574px; top:287px; width:80px; height:17px; border-style:none; ">
  1764. <choices>
  1765. <item>
  1766. <label>무균(다인)</label>
  1767. <value>Y</value>
  1768. </item>
  1769. </choices>
  1770. <script type="javascript" ev:event="xforms-value-changed">
  1771. <![CDATA[
  1772. var wardcd1 = model.getValue("/root/hidden/original/icdr/icdr_wardcd");
  1773. var wardcd2 = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  1774. if (wardcd1 == null || wardcd1 == "" || wardcd2 == null || wardcd2 == "") {
  1775. alert("현재재원정보 또는 전실신청정보가 선택되지 않았습니다.");
  1776. model.setValue("/root/send/antivirus", "")
  1777. model.refresh();
  1778. return;
  1779. }
  1780. var grdecd = "";
  1781. var typecd = "";
  1782. // 무균실 설정
  1783. if (model.getValue("/root/send/antivirus") == "Y") {
  1784. grdecd = "S1001"; // 등급 : 무균다인실
  1785. typecd = "S10"; // 형태 : 무균
  1786. // 무균실 해제(원복)
  1787. } else {
  1788. var wardcd = model.getValue("/root/main/cdcr/cdcr_chngwardcd");
  1789. var roomcd = model.getValue("/root/main/cdcr/cdcr_chngroomcd");
  1790. model.setValue("/root/send/wardcd", wardcd);
  1791. model.setValue("/root/send/roomcd", roomcd);
  1792. submit("TRPMI01704");
  1793. grdecd = model.getValue("/root/hidden/orgroominfo/grdecd");
  1794. typecd = model.getValue("/root/hidden/orgroominfo/typecd");
  1795. }
  1796. model.setValue("/root/main/cdcr/cdcr_chngroomgrde", grdecd); // 등급
  1797. model.setValue("/root/main/cdcr/cdcr_chngroomtype", typecd); // 형태
  1798. // 병실등급 재설정
  1799. cmb_roomgrdecd2.choices.itemset.attribute("nodeset") = "/root/hidden/roomgrdelist/roomgrde[cdid = '" + grdecd + "' ]";
  1800. cmb_roomgrdecd2.refresh();
  1801. // 병실형태 재설정
  1802. cmb_roomtypecd2.choices.itemset.attribute("nodeset") = "/root/hidden/init/roomtypecd[cd = '" + typecd + "' ]";
  1803. cmb_roomtypecd2.refresh();
  1804. model.refresh();
  1805. ]]>
  1806. </script>
  1807. </select>
  1808. </group>
  1809. <datagrid id="datagrid1" nodeset="/root/hidden/wdrminfo/wdrm" caption="층^병동^빈병상^상세정보^상세정보^상세정보|층^병동^빈병상^병실^성별^빈병상" colsep="^" colwidth="40, 85, 45, 62, 39, 51" fixedcols="3" mergecellsfixedcols="bycol" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:75px; width:340px; height:655px; ">
  1810. <col ref="wdrm_posinfocd"/>
  1811. <col ref="wdrm_wardnm"/>
  1812. <col ref="wdrm_wardemptbedcnt" style="text-align:right; "/>
  1813. <col ref="wdrm_roomcd"/>
  1814. <col disabled="true" ref="wdrm_sex" type="combo" style="text-align:center; ">
  1815. <choices>
  1816. <itemset nodeset="/root/init/P0391list/P0391">
  1817. <label ref="cdnm"/>
  1818. <value ref="cdid"/>
  1819. </itemset>
  1820. </choices>
  1821. </col>
  1822. <col ref="wdrm_roomemptbedcnt" style="text-align:right; "/>
  1823. </datagrid>
  1824. <output id="output11" ref="/root/hidden/currenttime" class="output_fix" format="yyyy-mm-dd" style="left:245px; top:50px; width:95px; height:19px; text-align:center; "/>
  1825. <button id="button1" class="btn2_letter4" style="left:275px; top:10px; width:64px; height:19px; ">
  1826. <caption>병상조회</caption>
  1827. <script type="javascript" ev:event="DOMActivate">
  1828. <![CDATA[
  1829. fQuery_Wardcond();
  1830. ]]>
  1831. </script>
  1832. </button>
  1833. <button id="button3" class="btn4_letter4" visibility="hidden" style="left:1000px; top:735px; width:80px; height:22px; ">
  1834. <caption>간호확인</caption>
  1835. <script type="javascript" ev:event="DOMActivate">
  1836. <![CDATA[
  1837. fCareCnfm("U");
  1838. ]]>
  1839. </script>
  1840. </button>
  1841. <button id="button8" class="btn3_letter6" visibility="visible" style="left:1081px; top:736px; width:104px; height:22px; ">
  1842. <caption>병실맞바꾸기</caption>
  1843. <script type="javascript" ev:event="DOMActivate">
  1844. <![CDATA[
  1845. modal("SMPMI06000", "1","", "", "SMPMI06000", "", "");
  1846. ]]>
  1847. </script>
  1848. </button>
  1849. </group>
  1850. </xhtml:body>
  1851. </xhtml:html>