MRD00500.js 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. /**
  2. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  3. - 사망환자등록 ( SMMRD00500_사망환자등록.xrw - JScript )
  4. - Version :
  5. 1) : Ver.1.00.01
  6. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  7. **/
  8. /**
  9. * @ver : 2007-12-01
  10. * @desc : 화면초기화
  11. * @
  12. * @by : 이창록
  13. * @param :
  14. * @return :
  15. * @---------------------------------------------------
  16. */
  17. function finitialize()
  18. {
  19. //mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/orddept","D");// O: 외래 D:입원 W:병동
  20. zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/orddept", "depthngnm", "asc");//입원과
  21. //기본 사망 정보 갖고 오기
  22. submit("TRMRD00599");
  23. if(checkOpener())
  24. {
  25. var pid = opener.javascript.getParameter("SMMRD00500_pid");
  26. if(pid!=""){
  27. model.setValue("/root/main/dethpatinfo/dethpat/pid",pid);
  28. model.makeValue("/root/main/patinfo/srchcond","1");
  29. btn_patreq1.dispatch("onclick");
  30. }
  31. }
  32. model.refresh();
  33. }
  34. /**
  35. * @ver : 2007-12-01
  36. * @desc : 진료과 선택시 주치의 명단 가져오기
  37. * @
  38. * @by : 이창록
  39. * @param :
  40. * @return :
  41. * @---------------------------------------------------
  42. */
  43. function fGetDrList(ref, rsltRef, orddeptcd, queryflag,stflag)
  44. {
  45. model.makeValue(ref + "/orddeptcd" , orddeptcd);
  46. model.makeValue(ref + "/queryflag" , queryflag);
  47. model.makeValue(ref + "/stflag" , stflag);
  48. submit("TRMRF02303", true, ref, rsltRef);
  49. model.removeNodeset("/root/send/reqdata");
  50. }
  51. /*function fGetAdotid()
  52. {
  53. model.removeNodeset("/root/init/userlist");
  54. model.makeNode("/root/init/userlist/usercombo");
  55. mmbfGetUserComboList("/root/send/reqdata", "/root/init/userlist", cmb_orddept.value, "0330");
  56. model.refresh();
  57. }*/
  58. /**
  59. * @ver : 2007-12-01
  60. * @desc : 주소팝업에서 정보 갖고 오기
  61. * @
  62. * @by : 이창록
  63. * @param :
  64. * @return :
  65. * @---------------------------------------------------
  66. */
  67. function freqaddr()
  68. {
  69. var addr1 = model.getValue("/root/main/dethpatinfo/dethpat/addr1");
  70. if(addr1 == ""){
  71. messageBox("동을","C001");
  72. model.setFocus("ipt_addr1");
  73. return;
  74. }
  75. var rcv_zipcdhead_path ="/root/main/dethpatinfo/dethpat/zipcode1" ;
  76. var rcv_zipcdfoot_path = "/root/main/dethpatinfo/dethpat/zipcode2" ;
  77. var rcv_seqno_path = "/root/main/dethpatinfo/dethpat/zipseqno";
  78. var rcv_address_path = "/root/main/dethpatinfo/dethpat/addr1";
  79. zbcfOpenZipCodeList("combination", addr1, rcv_zipcdhead_path, rcv_zipcdfoot_path, rcv_seqno_path, rcv_address_path);
  80. model.refresh();
  81. }
  82. /**
  83. * @ver : 2007-12-01
  84. * @desc : 팝업에서 환자 기본정보 갖고 오기(아이디로 조회)
  85. * @
  86. * @by : 이창록
  87. * @param :
  88. * @return :
  89. * @---------------------------------------------------
  90. */
  91. function freqpid()
  92. {
  93. var pid = model.getValue("/root/main/dethpatinfo/dethpat/pid");
  94. if(pid =="")
  95. {
  96. return;
  97. }
  98. model.makeValue("/root/main/patinfo/pid" ,model.getValue("/root/main/dethpatinfo/dethpat/pid"));
  99. model.makeValue("/root/main/patinfo/autoflag" ,"Y"); // 1건인경우 자동으로닫힘
  100. modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/main/patinfo", "/root/send");
  101. var Pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  102. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  103. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  104. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  105. var sex = model.getValue("/root/main/patinfo/patinfolist/sex");
  106. var age = model.getValue("/root/main/patinfo/patinfolist/age");
  107. var telno = model.getValue("/root/main/patinfo/patinfolist/hometel");
  108. var zipcode1 = model.getValue("/root/main/patinfo/patinfolist/zipcd1");
  109. var zipcode2 = model.getValue("/root/main/patinfo/patinfolist/zipcd2");
  110. var zipseqno = model.getValue("/root/main/patinfo/patinfolist/zipcdseq");
  111. var addr1 = model.getValue("/root/main/patinfo/patinfolist/addr");
  112. var addr2 = model.getValue("/root/main/patinfo/patinfolist/detladdr");
  113. model.setValue("/root/main/dethpatinfo/dethpat/pid",Pid);
  114. model.setValue("/root/main/dethpatinfo/dethpat/pnm",hngnm);
  115. model.setValue("/root/main/dethpatinfo/dethpat/rrgstno",rrgstno1 +"-"+rrgstno2);
  116. model.setValue("/root/main/dethpatinfo/dethpat/sex",sex);
  117. model.setValue("/root/main/dethpatinfo/dethpat/age",age);
  118. model.setValue("/root/main/dethpatinfo/dethpat/telno",telno);
  119. model.setValue("/root/main/dethpatinfo/dethpat/zipcode1",zipcode1);
  120. model.setValue("/root/main/dethpatinfo/dethpat/zipcode2",zipcode2);
  121. model.setValue("/root/main/dethpatinfo/dethpat/addr1",addr1);
  122. model.setValue("/root/main/dethpatinfo/dethpat/addr2",addr2);
  123. var sex=model.getValue("/root/main/dethpatinfo/dethpat/sex");
  124. if(sex=="M")
  125. {
  126. rdo_seconddethkindcd.disabled="true";
  127. }
  128. var age=model.getValue("/root/main/dethpatinfo/dethpat/age");
  129. if(age>=5)
  130. {
  131. rdo_firstdethkindcd.disabled="true";
  132. rdo_thirddethkindcd.disabled="true";
  133. }else if(age<=4){
  134. rdo_firstdethkindcd.disabled="false";
  135. rdo_thirddethkindcd.disabled="false";
  136. }
  137. var cd=model.getValue( "/root/main/dethpatinfo/dethpat/dethresncd");
  138. if(cd=="02"){
  139. cmb_viokindcd.disabled ="false";
  140. cmb_viopleced.disabled ="false";
  141. cmb_statcd.disabled ="false";
  142. ipt_vioacddd.disabled ="false";
  143. ipt_vioacdtm.disabled ="false";
  144. }
  145. //더블클릭시 저장된 정보를 가져온다
  146. var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  147. model.makeValue("/root/send/reqdata/deth/pid", sPid);
  148. submit("TRMRD00510");
  149. var Pid = model.getValue("/root/main/patinfo/patinfolist/pid");
  150. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  151. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  152. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  153. var sex = model.getValue("/root/main/patinfo/patinfolist/sex");
  154. var age = model.getValue("/root/main/patinfo/patinfolist/age");
  155. var telno = model.getValue("/root/main/patinfo/patinfolist/hometel");
  156. var zipcode1 = model.getValue("/root/main/patinfo/patinfolist/zipcd1");
  157. var zipcode2 = model.getValue("/root/main/patinfo/patinfolist/zipcd2");
  158. var zipseqno = model.getValue("/root/main/patinfo/patinfolist/zipcdseq");
  159. var addr1 = model.getValue("/root/main/patinfo/patinfolist/addr");
  160. var addr2 = model.getValue("/root/main/patinfo/patinfolist/detladdr");
  161. model.makeValue("/root/main/dethpatinfo/dethpat/pid" ,Pid);
  162. model.makeValue("/root/main/dethpatinfo/dethpat/pnm" ,hngnm);
  163. model.makeValue("/root/main/dethpatinfo/dethpat/rrgstno" ,rrgstno1 +"-"+rrgstno2);
  164. model.makeValue("/root/main/dethpatinfo/dethpat/sex" ,sex);
  165. model.makeValue("/root/main/dethpatinfo/dethpat/age" ,age);
  166. model.makeValue("/root/main/dethpatinfo/dethpat/telno" ,telno);
  167. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode1" ,zipcode1);
  168. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode2" ,zipcode2);
  169. model.makeValue("/root/main/dethpatinfo/dethpat/addr1" ,addr1);
  170. model.makeValue("/root/main/dethpatinfo/dethpat/addr2" ,addr2);
  171. //model.makeNode("/root/main/dethpat");
  172. model.makeNode("/root/main/dethpatinfo/dethpat/insukind");
  173. model.makeNode("/root/main/dethpatinfo/dethpat/indd");
  174. model.makeNode("/root/main/dethpatinfo/dethpat/dschdd");
  175. model.makeNode("/root/main/dethpatinfo/dethpat/inhospdd");
  176. model.makeNode("/root/main/dethpatinfo/dethpat/deptcd");
  177. model.makeNode("/root/main/dethpatinfo/dethpat/atdocnm");
  178. model.makeNode("/root/main/dethpatinfo/dethpat/atdoctid");
  179. model.makeNode("/root/main/dethpatinfo/dethpat/inpathcd");
  180. model.makeNode("/root/main/dethpatinfo/dethpat/opdd");
  181. model.makeNode("/root/main/dethpatinfo/dethpat/ordopendd");
  182. model.makeNode("/root/main/dethpatinfo/dethpat/dethdd");
  183. model.makeNode("/root/main/dethpatinfo/dethpat/dethtm");
  184. model.makeNode("/root/main/dethpatinfo/dethpat/dethplcecd");
  185. model.makeNode("/root/main/dethpatinfo/dethpat/dethresncd");
  186. model.makeNode("/root/main/dethpatinfo/dethpat/dethflag");
  187. model.makeNode("/root/main/dethpatinfo/dethpat/dethkindcd");
  188. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcascd");
  189. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcasnm");
  190. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcascd");
  191. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcasnm");
  192. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcascd");
  193. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcasnm");
  194. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdkindcd");
  195. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdplcecd");
  196. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdstatcd");
  197. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacddd");
  198. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdtm");
  199. model.makeNode("/root/main/dethpatinfo/dethpat/womndethcascd");
  200. model.makeNode("/root/main/dethpatinfo/dethpat/womndethweekcnt");
  201. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnrsltcd");
  202. model.makeNode("/root/main/dethpatinfo/dethpat/womndethbdwtqty");
  203. model.makeNode("/root/main/dethpatinfo/dethpat/womnpartrtnmthdcd");
  204. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd1");
  205. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd2");
  206. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd3");
  207. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd4");
  208. model.makeNode("/root/main/dethpatinfo/dethpat/stlborncascd");
  209. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornsexcd");
  210. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornweekcnt");
  211. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornmultpltscd");
  212. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornbdwtqty");
  213. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethweekcnt");
  214. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethbdwtqty");
  215. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethmtherpid");
  216. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnmthdcd");
  217. model.makeNode("/root/main/dethpatinfo/dethpat/cngntlmfmdyn");
  218. model.makeNode("/root/main/dethpatinfo/dethpat/multpltflag");
  219. model.makeNode("/root/main/dethpatinfo/dethpat/nbabydethcascd");
  220. zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/orddept", "depthngnm", "asc");//입원과
  221. var atdoctid =model.getValue("/root/main/dethpatinfo/dethpat/atdoctid");
  222. model.setValue("/root/main/dethpatinfo/dethpat/atdocnm",atdoctid);
  223. fGetDrList("/root/send/reqdata", "/root/init/userlist/drlist", cmb_orddept.value, "total");//주치의 조회
  224. model.refresh();
  225. }
  226. /**
  227. * @ver : 2007-12-01
  228. * @desc : 팝업에서 환자 기본정보 갖고 오기(환자명로 조회)
  229. * @
  230. * @by : 이창록
  231. * @param :
  232. * @return :
  233. * @---------------------------------------------------
  234. */
  235. function freqpnm()
  236. {
  237. var pnm = model.getValue("/root/main/dethpatinfo/dethpat/pnm");
  238. if(pnm ==""){
  239. return;
  240. }
  241. model.makeValue("/root/main/patinfo/hngnm" ,model.getValue("/root/main/dethpatinfo/dethpat/pnm"));
  242. model.makeValue("/root/main/patinfo/autoflag" ,"Y"); // 1건인경우 자동으로닫힘
  243. modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/main/patinfo", "/root/send");
  244. var fPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  245. var fHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  246. var fRrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  247. var fRrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  248. var fSex = model.getValue("/root/main/patinfo/patinfolist/sex");
  249. var fAge = model.getValue("/root/main/patinfo/patinfolist/age");
  250. var fTelno = model.getValue("/root/main/patinfo/patinfolist/hometel");
  251. var fZipcode1 = model.getValue("/root/main/patinfo/patinfolist/zipcd1");
  252. var fZipcode2 = model.getValue("/root/main/patinfo/patinfolist/zipcd2");
  253. var fZipseqno = model.getValue("/root/main/patinfo/patinfolist/zipcdseq");
  254. var fAddr1 = model.getValue("/root/main/patinfo/patinfolist/addr");
  255. var fAddr2 = model.getValue("/root/main/patinfo/patinfolist/detladdr");
  256. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  257. model.makeValue("/root/main/dethpatinfo/dethpat/pid" ,fPid);
  258. model.makeValue("/root/main/dethpatinfo/dethpat/pnm" ,fHngnm);
  259. model.makeValue("/root/main/dethpatinfo/dethpat/rrgstno" ,fRrgstno1 +"-"+fRrgstno2);
  260. model.makeValue("/root/main/dethpatinfo/dethpat/sex" ,fSex);
  261. model.makeValue("/root/main/dethpatinfo/dethpat/age" ,fAge);
  262. model.makeValue("/root/main/dethpatinfo/dethpat/telno" ,fTelno);
  263. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode1" ,fZipcode1);
  264. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode2" ,fZipcode2);
  265. model.makeValue("/root/main/dethpatinfo/dethpat/addr1" ,fAddr1);
  266. model.makeValue("/root/main/dethpatinfo/dethpat/addr2" ,fAddr2);
  267. var sex=model.getValue("/root/main/dethpatinfo/dethpat/sex");
  268. if(sex=="M")
  269. {
  270. rdo_seconddethkindcd.disabled="true";
  271. }
  272. var age=model.getValue("/root/main/dethpatinfo/dethpat/age");
  273. if(age>=5)
  274. {
  275. rdo_firstdethkindcd.disabled="true";
  276. rdo_thirddethkindcd.disabled="true";
  277. }else if(age<=4){
  278. rdo_firstdethkindcd.disabled="false";
  279. rdo_thirddethkindcd.disabled="false";
  280. }
  281. var cd=model.getValue( "/root/main/dethpatinfo/dethpat/dethresncd");
  282. if(cd=="02"){
  283. cmb_viokindcd.disabled ="false";
  284. cmb_viopleced.disabled ="false";
  285. cmb_statcd.disabled ="false";
  286. ipt_vioacddd.disabled ="false";
  287. ipt_vioacdtm.disabled ="false";
  288. }
  289. var aPid = model.getValue("/root/temp/patinfo/patinfolist/pid");
  290. model.makeValue("/root/send/reqdata/deth/pid", aPid);
  291. submit("TRMRD00510");
  292. var fPid = model.getValue("/root/main/patinfo/patinfolist/pid");
  293. var fHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  294. var fRrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  295. var fRrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  296. var fSex = model.getValue("/root/main/patinfo/patinfolist/sex");
  297. var fAge = model.getValue("/root/main/patinfo/patinfolist/age");
  298. var fTelno = model.getValue("/root/main/patinfo/patinfolist/hometel");
  299. var fZipcode1 = model.getValue("/root/main/patinfo/patinfolist/zipcd1");
  300. var fZipcode2 = model.getValue("/root/main/patinfo/patinfolist/zipcd2");
  301. var fZipseqno = model.getValue("/root/main/patinfo/patinfolist/zipcdseq");
  302. var fAddr1 = model.getValue("/root/main/patinfo/patinfolist/addr");
  303. var fAddr2 = model.getValue("/root/main/patinfo/patinfolist/detladdr");
  304. var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  305. model.makeValue("/root/main/dethpatinfo/dethpat/pid" ,fPid);
  306. model.makeValue("/root/main/dethpatinfo/dethpat/pnm" ,fHngnm);
  307. model.makeValue("/root/main/dethpatinfo/dethpat/rrgstno" ,fRrgstno1 +"-"+fRrgstno2);
  308. model.makeValue("/root/main/dethpatinfo/dethpat/sex" ,fSex);
  309. model.makeValue("/root/main/dethpatinfo/dethpat/age" ,fAge);
  310. model.makeValue("/root/main/dethpatinfo/dethpat/telno" ,fTelno);
  311. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode1" ,fZipcode1);
  312. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode2" ,fZipcode2);
  313. model.makeValue("/root/main/dethpatinfo/dethpat/addr1" ,fAddr1);
  314. model.makeValue("/root/main/dethpatinfo/dethpat/addr2" ,fAddr2);
  315. model.makeNode("/root/main/dethpatinfo/dethpat/insukind");
  316. model.makeNode("/root/main/dethpatinfo/dethpat/indd");
  317. model.makeNode("/root/main/dethpatinfo/dethpat/dschdd");
  318. model.makeNode("/root/main/dethpatinfo/dethpat/inhospdd");
  319. model.makeNode("/root/main/dethpatinfo/dethpat/deptcd");
  320. model.makeNode("/root/main/dethpatinfo/dethpat/atdocnm");
  321. model.makeNode("/root/main/dethpatinfo/dethpat/atdoctid");
  322. model.makeNode("/root/main/dethpatinfo/dethpat/inpathcd");
  323. model.makeNode("/root/main/dethpatinfo/dethpat/opdd");
  324. model.makeNode("/root/main/dethpatinfo/dethpat/ordopendd");
  325. model.makeNode("/root/main/dethpatinfo/dethpat/dethdd");
  326. model.makeNode("/root/main/dethpatinfo/dethpat/dethtm");
  327. model.makeNode("/root/main/dethpatinfo/dethpat/dethplcecd");
  328. model.makeNode("/root/main/dethpatinfo/dethpat/dethresncd");
  329. model.makeNode("/root/main/dethpatinfo/dethpat/dethflag");
  330. model.makeNode("/root/main/dethpatinfo/dethpat/dethkindcd");
  331. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcascd");
  332. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcasnm");
  333. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcascd");
  334. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcasnm");
  335. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcascd");
  336. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcasnm");
  337. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdkindcd");
  338. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdplcecd");
  339. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdstatcd");
  340. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacddd");
  341. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdtm");
  342. model.makeNode("/root/main/dethpatinfo/dethpat/womndethcascd");
  343. model.makeNode("/root/main/dethpatinfo/dethpat/womndethweekcnt");
  344. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnrsltcd");
  345. model.makeNode("/root/main/dethpatinfo/dethpat/womndethbdwtqty");
  346. model.makeNode("/root/main/dethpatinfo/dethpat/womnpartrtnmthdcd");
  347. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd1");
  348. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd2");
  349. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd3");
  350. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd4");
  351. model.makeNode("/root/main/dethpatinfo/dethpat/stlborncascd");
  352. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornsexcd");
  353. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornweekcnt");
  354. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornmultpltscd");
  355. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornbdwtqty");
  356. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethweekcnt");
  357. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethbdwtqty");
  358. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethmtherpid");
  359. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnmthdcd");
  360. model.makeNode("/root/main/dethpatinfo/dethpat/cngntlmfmdyn");
  361. model.makeNode("/root/main/dethpatinfo/dethpat/multpltflag");
  362. model.makeNode("/root/main/dethpatinfo/dethpat/nbabydethcascd");
  363. zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/orddept", "depthngnm", "asc");//입원과
  364. var atdoctid =model.getValue("/root/main/dethpatinfo/dethpat/atdoctid");
  365. model.setValue("/root/main/dethpatinfo/dethpat/atdocnm",atdoctid);
  366. fGetDrList("/root/send/reqdata", "/root/init/userlist/drlist", cmb_orddept.value, "total");//주치의 조회
  367. model.refresh();
  368. }
  369. /**
  370. * @ver : 2007-12-01
  371. * @desc : 팝업에서 환자 기본정보 갖고 오기(주민번호로 조회)
  372. * @
  373. * @by : 이창록
  374. * @param :
  375. * @return :
  376. * @---------------------------------------------------
  377. */
  378. function freqrrgstno()
  379. {
  380. var rrgstno = model.getValue("/root/main/dethpatinfo/dethpat/rrgstno");
  381. if(rrgstno ==""){
  382. return;
  383. }
  384. model.makeValue("/root/main/patinfo/pid" ,model.getValue("/root/main/dethpatinfo/dethpat/pid"));
  385. model.makeValue("/root/main/patinfo/hngnm" ,model.getValue("/root/main/dethpatinfo/dethpat/pnm"));
  386. model.makeValue("/root/main/patinfo/rrgstno1" ,model.getValue("/root/main/dethpatinfo/dethpat/rrgstno"));
  387. model.makeValue("/root/main/patinfo/rrgstno2" ,model.getValue("/root/main/dethpatinfo/dethpat/rrgstno"));
  388. //model.makeValue("/root/temp/patinfo/patinfolist/srchcond" ,"1");
  389. model.makeValue("/root/main/patinfo/autoflag" ,"Y"); // 1건인경우 자동으로닫힘
  390. modal("SPPMC02500", 1,10, 10, "SPPMC02500", "/root/main/patinfo", "/root/send");
  391. model.setValue("/root/main/dethpatinfo/dethpat/pid", model.getValue("/root/temp/patinfo/patinfolist/pid"));
  392. var hngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
  393. var rrgstno1 = model.getValue("/root/main/patinfo/patinfolist/rrgstno1");
  394. var rrgstno2 = model.getValue("/root/main/patinfo/patinfolist/rrgstno2");
  395. var sex = model.getValue("/root/main/patinfo/patinfolist/sex");
  396. var age = model.getValue("/root/main/patinfo/patinfolist/age");
  397. var telno = model.getValue("/root/main/patinfo/patinfolist/hometel");
  398. var zipcode1 = model.getValue("/root/main/patinfo/patinfolist/zipcd1");
  399. var zipcode2 = model.getValue("/root/main/patinfo/patinfolist/zipcd2");
  400. var zipseqno = model.getValue("/root/main/patinfo/patinfolist/zipcdseq");
  401. var addr1 = model.getValue("/root/main/patinfo/patinfolist/addr");
  402. var addr2 = model.getValue("/root/main/patinfo/patinfolist/detladdr");
  403. model.makeValue("/root/main/dethpatinfo/dethpat/pnm" ,hngnm);
  404. model.makeValue("/root/main/dethpatinfo/dethpat/rrgstno" ,rrgstno1 +"-"+rrgstno2);
  405. model.makeValue("/root/main/dethpatinfo/dethpat/sex" ,sex);
  406. model.makeValue("/root/main/dethpatinfo/dethpat/age" ,age);
  407. model.makeValue("/root/main/dethpatinfo/dethpat/telno" ,telno);
  408. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode1" ,zipcode1);
  409. model.makeValue("/root/main/dethpatinfo/dethpat/zipcode2" ,zipcode2);
  410. model.makeValue("/root/main/dethpatinfo/dethpat/addr1" ,addr1);
  411. model.makeValue("/root/main/dethpatinfo/dethpat/addr2" ,addr2);
  412. model.makeNode("/root/main/dethpatinfo/dethpat/insukind");
  413. model.makeNode("/root/main/dethpatinfo/dethpat/indd");
  414. model.makeNode("/root/main/dethpatinfo/dethpat/dschdd");
  415. model.makeNode("/root/main/dethpatinfo/dethpat/inhospdd");
  416. model.makeNode("/root/main/dethpatinfo/dethpat/deptcd");
  417. model.makeNode("/root/main/dethpatinfo/dethpat/atdocnm");
  418. model.makeNode("/root/main/dethpatinfo/dethpat/atdoctid");
  419. model.makeNode("/root/main/dethpatinfo/dethpat/inpathcd");
  420. model.makeNode("/root/main/dethpatinfo/dethpat/opdd");
  421. model.makeNode("/root/main/dethpatinfo/dethpat/ordopendd");
  422. model.makeNode("/root/main/dethpatinfo/dethpat/dethdd");
  423. model.makeNode("/root/main/dethpatinfo/dethpat/dethtm");
  424. model.makeNode("/root/main/dethpatinfo/dethpat/dethplcecd");
  425. model.makeNode("/root/main/dethpatinfo/dethpat/dethresncd");
  426. model.makeNode("/root/main/dethpatinfo/dethpat/dethflag");
  427. model.makeNode("/root/main/dethpatinfo/dethpat/dethkindcd");
  428. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcascd");
  429. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcasnm");
  430. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcascd");
  431. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcasnm");
  432. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcascd");
  433. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcasnm");
  434. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdkindcd");
  435. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdplcecd");
  436. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdstatcd");
  437. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacddd");
  438. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdtm");
  439. model.makeNode("/root/main/dethpatinfo/dethpat/womndethcascd");
  440. model.makeNode("/root/main/dethpatinfo/dethpat/womndethweekcnt");
  441. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnrsltcd");
  442. model.makeNode("/root/main/dethpatinfo/dethpat/womndethbdwtqty");
  443. model.makeNode("/root/main/dethpatinfo/dethpat/womnpartrtnmthdcd");
  444. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd1");
  445. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd2");
  446. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd3");
  447. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd4");
  448. model.makeNode("/root/main/dethpatinfo/dethpat/stlborncascd");
  449. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornsexcd");
  450. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornweekcnt");
  451. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornmultpltscd");
  452. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornbdwtqty");
  453. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethweekcnt");
  454. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethbdwtqty");
  455. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethmtherpid");
  456. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnmthdcd");
  457. model.makeNode("/root/main/dethpatinfo/dethpat/cngntlmfmdyn");
  458. model.makeNode("/root/main/dethpatinfo/dethpat/multpltflag");
  459. model.makeNode("/root/main/dethpatinfo/dethpat/nbabydethcascd");
  460. var sex=model.getValue("/root/main/dethpatinfo/dethpat/sex");
  461. if(sex=="M")
  462. {
  463. rdo_seconddethkindcd.disabled="true";
  464. }
  465. var age=model.getValue("/root/main/dethpatinfo/dethpat/age");
  466. if(age>=5)
  467. {
  468. rdo_firstdethkindcd.disabled="true";
  469. rdo_thirddethkindcd.disabled="true";
  470. }else if(age<=4){
  471. rdo_firstdethkindcd.disabled="false";
  472. rdo_thirddethkindcd.disabled="false";
  473. }
  474. model.refresh();
  475. }
  476. /**
  477. * @ver : 2007-12-01
  478. * @desc : 사망 분석 정보를 저장하기
  479. * @
  480. * @by : 이창록
  481. * @param :
  482. * @return :
  483. * @---------------------------------------------------
  484. */
  485. function fSavedethinfo()
  486. {
  487. if(model.getValue("/root/main/dethpatinfo/dethpat/pid")==""){
  488. messageBox("환자번호를 입력","I008");
  489. return;
  490. }
  491. if(model.getValue("/root/main/dethpatinfo/dethpat/age")==""){
  492. messageBox("나이를 입력","I008");
  493. return;
  494. }
  495. if(model.getValue("/root/main/dethpatinfo/dethpat/insukind")==""){
  496. messageBox("보험종류를 입력","I008");
  497. return;
  498. }
  499. if(model.getValue("/root/main/dethpatinfo/dethpat/dethdd")==""){
  500. messageBox("사망일자를 입력","I008");
  501. return;
  502. }
  503. if(model.getValue("/root/main/dethpatinfo/dethpat/dethresncd")==""){
  504. messageBox("사망사유를 입력","I008");
  505. return;
  506. }
  507. if(model.getValue("/root/main/dethpatinfo/dethpat/dethflag")==""){
  508. messageBox("사망구분을 입력","I008");
  509. return;
  510. }
  511. model.makeValue("/root/send/savedata/dethpatnifo/pid" ,model.getValue("/root/main/dethpatinfo/dethpat/pid"));
  512. model.makeValue("/root/send/savedata/dethpatnifo/pnm" ,model.getValue("/root/main/dethpatinfo/dethpat/pnm"));
  513. model.makeValue("/root/send/savedata/dethpatnifo/rrgstno" ,model.getValue("/root/main/dethpatinfo/dethpat/rrgstno"));
  514. model.makeValue("/root/send/savedata/dethpatnifo/sex" ,model.getValue("/root/main/dethpatinfo/dethpat/sex"));
  515. model.makeValue("/root/send/savedata/dethpatnifo/age" ,model.getValue("/root/main/dethpatinfo/dethpat/age"));
  516. model.makeValue("/root/send/savedata/dethpatnifo/telno" ,model.getValue("/root/main/dethpatinfo/dethpat/telno"));
  517. model.makeValue("/root/send/savedata/dethpatnifo/zipcode1" ,model.getValue("/root/main/dethpatinfo/dethpat/zipcode1"));
  518. model.makeValue("/root/send/savedata/dethpatnifo/zipcode2" ,model.getValue("/root/main/dethpatinfo/dethpat/zipcode2"));
  519. model.makeValue("/root/send/savedata/dethpatnifo/addr1" ,model.getValue("/root/main/dethpatinfo/dethpat/addr1"));
  520. model.makeValue("/root/send/savedata/dethpatnifo/addr2" ,model.getValue("/root/main/dethpatinfo/dethpat/addr2"));
  521. model.makeValue("/root/send/savedata/dethpatnifo/insukind" ,model.getValue("/root/main/dethpatinfo/dethpat/insukind"));
  522. model.makeValue("/root/send/savedata/dethpatnifo/indd" ,model.getValue("/root/main/dethpatinfo/dethpat/indd"));
  523. model.makeValue("/root/send/savedata/dethpatnifo/dschdd" ,model.getValue("/root/main/dethpatinfo/dethpat/dschdd"));
  524. model.makeValue("/root/send/savedata/dethpatnifo/inhospdd" ,model.getValue("/root/main/dethpatinfo/dethpat/inhospdd"));
  525. model.makeValue("/root/send/savedata/dethpatnifo/deptcd" ,model.getValue("/root/main/dethpatinfo/dethpat/deptcd"));
  526. model.makeValue("/root/send/savedata/dethpatnifo/atdocnm" ,model.getValue("/root/main/dethpatinfo/dethpat/atdocnm"));
  527. model.makeValue("/root/send/savedata/dethpatnifo/atdoctid" ,model.getValue("/root/main/dethpatinfo/dethpat/atdoctid"));
  528. model.makeValue("/root/send/savedata/dethpatnifo/inpathcd" ,model.getValue("/root/main/dethpatinfo/dethpat/inpathcd"));
  529. model.makeValue("/root/send/savedata/dethpatnifo/opdd" ,model.getValue("/root/main/dethpatinfo/dethpat/opdd"));
  530. model.makeValue("/root/send/savedata/dethpatnifo/ordopendd" ,model.getValue("/root/main/dethpatinfo/dethpat/ordopendd"));
  531. model.makeValue("/root/send/savedata/dethpatnifo/dethdd" ,model.getValue("/root/main/dethpatinfo/dethpat/dethdd"));
  532. model.makeValue("/root/send/savedata/dethpatnifo/dethtm" ,model.getValue("/root/main/dethpatinfo/dethpat/dethtm"));
  533. model.makeValue("/root/send/savedata/dethpatnifo/dethplcecd" ,model.getValue("/root/main/dethpatinfo/dethpat/dethplcecd"));
  534. model.makeValue("/root/send/savedata/dethpatnifo/dethresncd" ,model.getValue("/root/main/dethpatinfo/dethpat/dethresncd"));
  535. model.makeValue("/root/send/savedata/dethpatnifo/dethflag" ,model.getValue("/root/main/dethpatinfo/dethpat/dethflag"));
  536. model.makeValue("/root/send/savedata/dethpatnifo/dethkindcd" ,model.getValue("/root/main/dethpatinfo/dethpat/dethkindcd"));
  537. model.makeValue("/root/send/savedata/dethpatnifo/basedethcascd" ,model.getValue("/root/main/dethpatinfo/dethpat/basedethcascd"));
  538. model.makeValue("/root/send/savedata/dethpatnifo/basedethcasnm" ,model.getValue("/root/main/dethpatinfo/dethpat/basedethcasnm"));
  539. model.makeValue("/root/send/savedata/dethpatnifo/mdldethcascd" ,model.getValue("/root/main/dethpatinfo/dethpat/mdldethcascd"));
  540. model.makeValue("/root/send/savedata/dethpatnifo/mdldethcasnm" ,model.getValue("/root/main/dethpatinfo/dethpat/mdldethcasnm"));
  541. model.makeValue("/root/send/savedata/dethpatnifo/direcdethcascd" ,model.getValue("/root/main/dethpatinfo/dethpat/direcdethcascd"));
  542. model.makeValue("/root/send/savedata/dethpatnifo/direcdethcasnm" ,model.getValue("/root/main/dethpatinfo/dethpat/direcdethcasnm"));
  543. model.makeValue("/root/send/savedata/dethpatnifo/viodethacdkindcd" ,model.getValue("/root/main/dethpatinfo/dethpat/viodethacdkindcd"));
  544. model.makeValue("/root/send/savedata/dethpatnifo/viodethacddd" ,model.getValue("/root/main/dethpatinfo/dethpat/viodethacddd"));
  545. model.makeValue("/root/send/savedata/dethpatnifo/viodethacdplcecd" ,model.getValue("/root/main/dethpatinfo/dethpat/viodethacdplcecd"));
  546. model.makeValue("/root/send/savedata/dethpatnifo/viodethacdtm" ,model.getValue("/root/main/dethpatinfo/dethpat/viodethacdtm"));
  547. model.makeValue("/root/send/savedata/dethpatnifo/viodethacdstatcd" ,model.getValue("/root/main/dethpatinfo/dethpat/viodethacdstatcd"));
  548. model.makeValue("/root/send/savedata/dethpatnifo/stlborncascd" ,model.getValue("/root/main/dethpatinfo/dethpat/stlborncascd"));
  549. model.makeValue("/root/send/savedata/dethpatnifo/stlbornsexcd" ,model.getValue("/root/main/dethpatinfo/dethpat/stlbornsexcd"));
  550. model.makeValue("/root/send/savedata/dethpatnifo/stlbornweekcnt" ,model.getValue("/root/main/dethpatinfo/dethpat/stlbornweekcnt"));
  551. model.makeValue("/root/send/savedata/dethpatnifo/stlbornmultpltscd" ,model.getValue("/root/main/dethpatinfo/dethpat/stlbornmultpltscd"));
  552. model.makeValue("/root/send/savedata/dethpatnifo/stlbornbdwtqty" ,model.getValue("/root/main/dethpatinfo/dethpat/stlbornbdwtqty"));
  553. model.makeValue("/root/send/savedata/dethpatnifo/womndethcascd" ,model.getValue("/root/main/dethpatinfo/dethpat/womndethcascd"));
  554. model.makeValue("/root/send/savedata/dethpatnifo/womndethweekcnt" ,model.getValue("/root/main/dethpatinfo/dethpat/womndethweekcnt"));
  555. model.makeValue("/root/send/savedata/dethpatnifo/partrtnrsltcd" ,model.getValue("/root/main/dethpatinfo/dethpat/partrtnrsltcd"));
  556. model.makeValue("/root/send/savedata/dethpatnifo/womndethbdwtqty" ,model.getValue("/root/main/dethpatinfo/dethpat/womndethbdwtqty"));
  557. model.makeValue("/root/send/savedata/dethpatnifo/womnpartrtnmthdcd" ,model.getValue("/root/main/dethpatinfo/dethpat/womnpartrtnmthdcd"));
  558. model.makeValue("/root/send/savedata/dethpatnifo/paritycd1" ,model.getValue("/root/main/dethpatinfo/dethpat/paritycd1"));
  559. model.makeValue("/root/send/savedata/dethpatnifo/paritycd2" ,model.getValue("/root/main/dethpatinfo/dethpat/paritycd2"));
  560. model.makeValue("/root/send/savedata/dethpatnifo/paritycd3" ,model.getValue("/root/main/dethpatinfo/dethpat/paritycd3"));
  561. model.makeValue("/root/send/savedata/dethpatnifo/paritycd4" ,model.getValue("/root/main/dethpatinfo/dethpat/paritycd4"));
  562. model.makeValue("/root/send/savedata/dethpatnifo/infantdethweekcnt" ,model.getValue("/root/main/dethpatinfo/dethpat/infantdethweekcnt"));
  563. model.makeValue("/root/send/savedata/dethpatnifo/cngntlmfmdyn" ,model.getValue("/root/main/dethpatinfo/dethpat/cngntlmfmdyn"));
  564. model.makeValue("/root/send/savedata/dethpatnifo/infantdethbdwtqty" ,model.getValue("/root/main/dethpatinfo/dethpat/infantdethbdwtqty"));
  565. model.makeValue("/root/send/savedata/dethpatnifo/multpltflag" ,model.getValue("/root/main/dethpatinfo/dethpat/multpltflag"));
  566. model.makeValue("/root/send/savedata/dethpatnifo/infantdethmtherpid" ,model.getValue("/root/main/dethpatinfo/dethpat/infantdethmtherpid"));
  567. model.makeValue("/root/send/savedata/dethpatnifo/nbabydethcascd" ,model.getValue("/root/main/dethpatinfo/dethpat/nbabydethcascd"));
  568. model.makeValue("/root/send/savedata/dethpatnifo/partrtnmthdcd" ,model.getValue("/root/main/dethpatinfo/dethpat/partrtnmthdcd"));
  569. if(submit("TXMRD00510")){
  570. messageBox("작성하신 정보가","I001");
  571. }else
  572. messageBox("저장이 ","E009");
  573. }
  574. /**
  575. * @ver : 2007-12-01
  576. * @desc : 초기화버튼 클릭시
  577. * @
  578. * @by : 이창록
  579. * @param :
  580. * @return :
  581. * @---------------------------------------------------
  582. */
  583. function fCleardethinfo(){
  584. model.resetInstanceNode("/root/main/dethpatinfo/dethpat");
  585. rdo_firstdethkindcd.disabled ="false";
  586. rdo_seconddethkindcd.disabled ="false";
  587. rdo_thirddethkindcd.disabled ="false";
  588. rdo_fourdethkindcd.disabled ="false";
  589. rdo_fivedethkindcd.disabled ="false";
  590. model.refresh();
  591. }
  592. /**
  593. * @ver : 2007-12-01
  594. * @desc : 사망등록 조회에서 사망등록 정보 불러오기 (getParameter = SPMRD00500_pid)
  595. * @
  596. * @by : 이창록
  597. * @param :
  598. * @return :
  599. * @---------------------------------------------------
  600. */
  601. function fdethinfo()
  602. {
  603. modal("SMMRD01100", 1,10, 10, "SMMRD01100", "/root/main/info", "/root/send");
  604. if(getParameter("SPMRD00500_pid") == "")
  605. return;
  606. var pid = getParameter("SPMRD00500_pid");
  607. model.makeValue("/root/send/reqdata/deth/pid", pid);
  608. if(submit("TRMRD00510")==true)
  609. {
  610. model.makeNode("/root/main/dethpatinfo/dethpat/pid" );
  611. model.makeNode("/root/main/dethpatinfo/dethpat/pnm" );
  612. model.makeNode("/root/main/dethpatinfo/dethpat/rrgstno" );
  613. model.makeNode("/root/main/dethpatinfo/dethpat/sex" );
  614. model.makeNode("/root/main/dethpatinfo/dethpat/age" );
  615. model.makeNode("/root/main/dethpatinfo/dethpat/telno" );
  616. model.makeNode("/root/main/dethpatinfo/dethpat/zipcode1" );
  617. model.makeNode("/root/main/dethpatinfo/dethpat/zipcode2" );
  618. model.makeNode("/root/main/dethpatinfo/dethpat/addr1" );
  619. model.makeNode("/root/main/dethpatinfo/dethpat/addr2" );
  620. model.makeNode("/root/main/dethpatinfo/dethpat/insukind");
  621. model.makeNode("/root/main/dethpatinfo/dethpat/indd");
  622. model.makeNode("/root/main/dethpatinfo/dethpat/dschdd");
  623. model.makeNode("/root/main/dethpatinfo/dethpat/inhospdd");
  624. model.makeNode("/root/main/dethpatinfo/dethpat/deptcd");
  625. model.makeNode("/root/main/dethpatinfo/dethpat/atdocnm");
  626. model.makeNode("/root/main/dethpatinfo/dethpat/atdoctid");
  627. model.makeNode("/root/main/dethpatinfo/dethpat/inpathcd");
  628. model.makeNode("/root/main/dethpatinfo/dethpat/opdd");
  629. model.makeNode("/root/main/dethpatinfo/dethpat/ordopendd");
  630. model.makeNode("/root/main/dethpatinfo/dethpat/dethdd");
  631. model.makeNode("/root/main/dethpatinfo/dethpat/dethtm");
  632. model.makeNode("/root/main/dethpatinfo/dethpat/dethplcecd");
  633. model.makeNode("/root/main/dethpatinfo/dethpat/dethresncd");
  634. model.makeNode("/root/main/dethpatinfo/dethpat/dethflag");
  635. model.makeNode("/root/main/dethpatinfo/dethpat/dethkindcd");
  636. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcascd");
  637. model.makeNode("/root/main/dethpatinfo/dethpat/basedethcasnm");
  638. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcascd");
  639. model.makeNode("/root/main/dethpatinfo/dethpat/mdldethcasnm");
  640. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcascd");
  641. model.makeNode("/root/main/dethpatinfo/dethpat/direcdethcasnm");
  642. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdkindcd");
  643. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdplcecd");
  644. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdstatcd");
  645. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacddd");
  646. model.makeNode("/root/main/dethpatinfo/dethpat/viodethacdtm");
  647. model.makeNode("/root/main/dethpatinfo/dethpat/womndethcascd");
  648. model.makeNode("/root/main/dethpatinfo/dethpat/womndethweekcnt");
  649. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnrsltcd");
  650. model.makeNode("/root/main/dethpatinfo/dethpat/womndethbdwtqty");
  651. model.makeNode("/root/main/dethpatinfo/dethpat/womnpartrtnmthdcd");
  652. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd1");
  653. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd2");
  654. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd3");
  655. model.makeNode("/root/main/dethpatinfo/dethpat/paritycd4");
  656. model.makeNode("/root/main/dethpatinfo/dethpat/stlborncascd");
  657. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornsexcd");
  658. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornweekcnt");
  659. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornmultpltscd");
  660. model.makeNode("/root/main/dethpatinfo/dethpat/stlbornbdwtqty");
  661. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethweekcnt");
  662. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethbdwtqty");
  663. model.makeNode("/root/main/dethpatinfo/dethpat/infantdethmtherpid");
  664. model.makeNode("/root/main/dethpatinfo/dethpat/partrtnmthdcd");
  665. model.makeNode("/root/main/dethpatinfo/dethpat/cngntlmfmdyn");
  666. model.makeNode("/root/main/dethpatinfo/dethpat/multpltflag");
  667. model.makeNode("/root/main/dethpatinfo/dethpat/nbabydethcascd");
  668. zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/orddept", "depthngnm", "asc");//입원과
  669. var atdoctid =model.getValue("/root/main/dethpatinfo/dethpat/atdoctid");
  670. model.setValue("/root/main/dethpatinfo/dethpat/atdocnm",atdoctid);
  671. fGetDrList("/root/send/reqdata", "/root/init/userlist/drlist", cmb_orddept.value, "total");//주치의 조회
  672. var cd=model.getValue( "/root/main/dethpatinfo/dethpat/dethresncd");
  673. if(cd=="02"){
  674. cmb_viokindcd.disabled ="false";
  675. cmb_viopleced.disabled ="false";
  676. cmb_statcd.disabled ="false";
  677. ipt_vioacddd.disabled ="false";
  678. ipt_vioacdtm.disabled ="false";
  679. }
  680. var sex=model.getValue("/root/main/dethpatinfo/dethpat/sex");
  681. if(sex=="M")
  682. {
  683. rdo_seconddethkindcd.disabled="true";
  684. }
  685. var age=model.getValue("/root/main/dethpatinfo/dethpat/age");
  686. if(age>=5)
  687. {
  688. rdo_firstdethkindcd.disabled="true";
  689. rdo_thirddethkindcd.disabled="true";
  690. }else if(age<=4){
  691. rdo_firstdethkindcd.disabled="false";
  692. rdo_thirddethkindcd.disabled="false";
  693. }
  694. }
  695. setParameter("SPMRD00500_pid", "");
  696. }
  697. /**
  698. * @ver : 2008/07/24
  699. * @desc : 선행,중간,직접 사인 조회
  700. * @
  701. * @by : 이창록
  702. * @param :
  703. * @return :
  704. * @---------------------------------------------------
  705. */
  706. function fDethCd(flag,editflag){
  707. var Pid = model.getValue("/root/main/dethpatinfo/dethpat/pid");
  708. if(Pid==""){
  709. messageBox("환자번호를 입력","I008");
  710. return;
  711. }
  712. var bCode = model.getValue("/root/main/dethpatinfo/dethpat/basedethcascd");
  713. var mCode = model.getValue("/root/main/dethpatinfo/dethpat/mdldethcascd");
  714. var dCode = model.getValue("/root/main/dethpatinfo/dethpat/direcdethcascd");
  715. var dethflag = model.getValue("/root/temp/flag/dethflag");
  716. var dispdiagcd = model.getValue("/root/temp/selectdiaglist/dispdiagcd");
  717. clearParameter("SPMRT01500_FLAG");
  718. clearParameter("SPMRT01500_SEARCHDATA");
  719. // model.removeNodeset("/root/temp/selectdiaglist");
  720. if(dethflag=="1"){
  721. if((flag=="B")&&(editflag=="Y")){
  722. if(bCode!=""){
  723. setParameter("SPMRT01500_FLAG","1");
  724. setParameter("SPMRT01500_SEARCHDATA", bCode);
  725. }
  726. }else if((flag=="B")&&(editflag=="N")){
  727. setParameter("SPMRT01500_FLAG","1");
  728. setParameter("SPMRT01500_SEARCHDATA","");
  729. }
  730. //2009-08-01 nj 기준일지 파라메터 추가
  731. setParameter("stndd", model.getValue("/root/main/dethpatinfo/dethpat/dethdd"));
  732. setParameter("maininstyn", "N");
  733. modal("SPMRT01500");
  734. if(getNodesetCnt(model,"/root/temp/selectdiaglist/dispdiagcd") > 0){
  735. model.setValue("/root/main/dethpatinfo/dethpat/basedethcascd",model.getValue("/root/temp/selectdiaglist/dispdiagcd"));
  736. model.setValue("/root/main/dethpatinfo/dethpat/basedethcasnm",model.getValue("/root/temp/selectdiaglist/diaghngnm"));
  737. }
  738. }else if(dethflag=="2"){
  739. if((flag=="M")&&(editflag=="Y")){
  740. if(mCode!=""){
  741. setParameter("SPMRT01500_FLAG","1");
  742. setParameter("SPMRT01500_SEARCHDATA", mCode);
  743. }
  744. }else if((flag=="M")&&(editflag=="N")){
  745. setParameter("SPMRT01500_FLAG","1");
  746. setParameter("SPMRT01500_SEARCHDATA","");
  747. }
  748. //2009-08-01 nj 기준일지 파라메터 추가
  749. setParameter("stndd", model.getValue("/root/main/dethpatinfo/dethpat/dethdd"));
  750. setParameter("maininstyn", "N");
  751. modal("SPMRT01500");
  752. if(getNodesetCnt(model,"/root/temp/selectdiaglist/dispdiagcd") > 0){
  753. model.setValue("/root/main/dethpatinfo/dethpat/mdldethcascd",model.getValue("/root/temp/selectdiaglist/dispdiagcd"));
  754. model.setValue("/root/main/dethpatinfo/dethpat/mdldethcasnm",model.getValue("/root/temp/selectdiaglist/diaghngnm"));
  755. }
  756. }else if(dethflag=="3"){
  757. if((flag=="D")&&(editflag=="Y")){
  758. setParameter("SPMRT01500_FLAG","1");
  759. setParameter("SPMRT01500_SEARCHDATA", dCode);
  760. }else if((flag=="D")&&(editflag=="N")){
  761. setParameter("SPMRT01500_FLAG","1");
  762. setParameter("SPMRT01500_SEARCHDATA","");
  763. }
  764. //2009-08-01 nj 기준일지 파라메터 추가
  765. setParameter("stndd", model.getValue("/root/main/dethpatinfo/dethpat/dethdd"));
  766. setParameter("maininstyn", "N");
  767. modal("SPMRT01500");
  768. if(getNodesetCnt(model,"/root/temp/selectdiaglist/dispdiagcd") > 0){
  769. model.setValue("/root/main/dethpatinfo/dethpat/direcdethcascd",model.getValue("/root/temp/selectdiaglist/dispdiagcd"));
  770. model.setValue("/root/main/dethpatinfo/dethpat/direcdethcasnm",model.getValue("/root/temp/selectdiaglist/diaghngnm"));
  771. }
  772. }
  773. model.refresh();
  774. }