SMMRC01400.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. /**
  2. * @desc : Source Node의 갯수를 구한다.
  3. * @
  4. * @param : path - node path
  5. * @return :
  6. * @authur : 김선태 2007. 5. 8
  7. * @---------------------------------------------------
  8. */
  9. function getNodeSetCnt(path)
  10. {
  11. var insXml = model.instances(0);
  12. var nodeList = insXml.selectNodes(path);
  13. return nodeList.length;
  14. }
  15. /**
  16. * @desc : Source Node의 child nodelist를 Destination의 nodelist로 append한다.
  17. *
  18. * @param : strDest - 도착node path
  19. * : strSrc - 출발node path
  20. * @return :
  21. * @authur : 이상현 2007. 3. 27
  22. * @---------------------------------------------------
  23. */
  24. function addCopyNodeset(strDest, strSrc, mode, destModel, srcModel) {
  25. if( destModel == null || destModel =="" )
  26. destModel = document.models.item(0);
  27. if( srcModel == null || srcModel =="" )
  28. srcModel = document.models.item(0);
  29. var srcNodeList = srcModel.instances(0).selectNodes(strSrc);
  30. var srcNode;
  31. var pDestNode = destModel.instances.item(0).selectSingleNode(strDest).parentNode;
  32. if( mode == "replace" || mode == null ) {
  33. destModel.removeNodeset(strDest);
  34. while( srcNode = srcNodeList.nextNode() ) {
  35. pDestNode.appendChild(srcNode.cloneNode(true));
  36. }
  37. }
  38. else if( mode == "after" ) {
  39. while( srcNode = srcNodeList.nextNode() ) {
  40. pDestNode.appendChild(srcNode.cloneNode(true));
  41. }
  42. }
  43. else if( mode == "before" ) {
  44. var destNode;
  45. for( var i = srcNodeList.length - 1; i >= 0; i-- ) {
  46. destNode = destModel.instances.item(0).selectSingleNode(strDest + "[1]");
  47. pDestNode.insertBefore(srcNodeList.item(i).cloneNode(true), destNode);
  48. }
  49. }
  50. }
  51. /**
  52. * @desc : 사용자의 권한을 체크하여 버튼셋팅.
  53. * btn_r 조회버튼, btn_x 저장 및 수정 버튼, btn_p : 출력버튼
  54. * @
  55. * @param :
  56. * @return :
  57. * @authur : 김선태 2007. 5. 8
  58. * @---------------------------------------------------
  59. */
  60. function fchkAuth()
  61. {
  62. for(var i=0; i<= document.controls.length-1 ; i++){
  63. if(document.controls.item(i).elementName == "xforms:button"){
  64. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_r_"){
  65. document.controls.item(i).disabled = !checkAuth("R");
  66. }
  67. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_x_"){
  68. document.controls.item(i).disabled = !checkAuth("X");
  69. }
  70. if(document.controls.item(i).attribute("id").substr(0,6) == "btn_p_"){
  71. document.controls.item(i).disabled = !checkAuth("P");
  72. }
  73. }
  74. }
  75. }
  76. /**
  77. * @desc : 폼초기화
  78. * @
  79. * @param :
  80. * @return :
  81. * @authur : 이은영 2008.03.18
  82. * @---------------------------------------------------
  83. */
  84. function fFormInit()
  85. {
  86. btn_chrtlist.dispatch("onclick");
  87. //공통코드 가져오기...
  88. //P0021:초재진구분코드, F:병원초진, R:재진, D:과초진, S:상병초진, 4:타과경유(초진인데 재진료수납)
  89. //M0392:챠트미대출사유코드
  90. //M0412:과보관사유코드
  91. //M0424:챠트상태코드
  92. zbcfGetCodeList(
  93. new Array("P0021","M0392","M0412","M0424"),
  94. new Array("/root/init/P0021","/root/init/M0392","/root/init/M0412","/root/init/M0424"));
  95. //대출코드 불러오기
  96. model.makeValue("/root/send/reqdata/ioflag", "O");
  97. submit("TRMRC01305");
  98. // 대출용도, 대출과, 차트과, 차트담당자, 보관장소
  99. model.makeValue("/root/send/reqdata/ioflag" , "O");
  100. model.makeValue("/root/send/reqdata/useyn" , "");
  101. model.makeValue("/root/send/reqdata/allwardyn", "");
  102. model.refresh();
  103. submit("TRMRC00100");
  104. }
  105. /**
  106. * @desc : 선택된 챠트정보를 상위에 디스플레이 한다.
  107. * @
  108. * @param :
  109. * @return :
  110. * @authur : 이은영 2008.03.18
  111. * @---------------------------------------------------
  112. */
  113. function fDisplayChrtInfo(gridObj){
  114. if (gridObj.row < 1){
  115. return;
  116. }
  117. var ref = gridObj.nodeset;
  118. var row = gridObj.row;
  119. var pid = model.getValue(ref + "[" + row +"]/pid");
  120. var pnm = model.getValue(ref + "[" + row +"]/pnm");
  121. var orddeptcd = model.getValue(ref + "[" + row +"]/orddeptcd");
  122. var lastorddd = model.getValue(ref + "[" + row +"]/lastorddd");
  123. var bcno = model.getValue(ref + "[" + row +"]/bcno");
  124. var chrtrem = model.getValue(ref + "[" + row +"]/chrtrem");
  125. var fstrgstdt = model.getValue(ref + "[" + row +"]/fstrgstdt");
  126. var chrtstat = model.getValue(ref + "[" + row +"]/chrtstat");
  127. var lendyn = model.getValue(ref + "[" + row +"]/lendyn");
  128. var ioflag = model.getValue(ref + "[" + row +"]/ioflag");
  129. var medirecno = model.getValue(ref + "[" + row +"]/medirecno");
  130. var orddeptabbr = model.getValue(ref + "[" + row +"]/orddeptabbr");
  131. model.makeValue("/root/main/chrtinfo/pid" , pid);
  132. model.makeValue("/root/main/chrtinfo/pnm" , pnm);
  133. model.makeValue("/root/main/chrtinfo/orddeptcd" , orddeptcd);
  134. model.makeValue("/root/main/chrtinfo/lastorddd" , lastorddd);
  135. model.makeValue("/root/main/chrtinfo/bcno" , bcno);
  136. model.makeValue("/root/main/chrtinfo/chrtrem" , chrtrem);
  137. model.makeValue("/root/main/chrtinfo/fstrgstdt" , fstrgstdt);
  138. model.makeValue("/root/main/chrtinfo/chrtstat" , chrtstat);
  139. model.makeValue("/root/main/chrtinfo/lendyn" , lendyn);
  140. model.makeValue("/root/main/chrtinfo/ioflag" , ioflag);
  141. model.makeValue("/root/main/chrtinfo/medirecno" , medirecno);
  142. model.makeValue("/root/main/chrtinfo/orddeptabbr", orddeptabbr);
  143. model.refresh();
  144. model.makeValue("/root/send/reqdata/medirecno", medirecno);
  145. model.makeValue("/root/send/reqdata/pid" , pid);
  146. // 챠트분실이력조회
  147. submit("TRMRC01401");
  148. // 챠트대출이력조회
  149. submit("TRMRC00170");
  150. }
  151. function fDisplayChrtInfoI(gridObj){
  152. if (gridObj.row < 1){
  153. return;
  154. }
  155. var ref = gridObj.nodeset;
  156. var row = gridObj.row;
  157. var pid = model.getValue(ref + "[" + row +"]/pid");
  158. var pnm = model.getValue(ref + "[" + row +"]/pnm");
  159. var dschdeptcd = model.getValue(ref + "[" + row +"]/dschdeptcd");
  160. var dschdd = model.getValue(ref + "[" + row +"]/dschdd");
  161. var bcno = model.getValue(ref + "[" + row +"]/bcno");
  162. var chrtrem = model.getValue(ref + "[" + row +"]/chrtrem");
  163. var fstrgstdt = model.getValue(ref + "[" + row +"]/fstrgstdt");
  164. var lendyn = model.getValue(ref + "[" + row +"]/lendyn");
  165. var chrtstat = model.getValue(ref + "[" + row +"]/chrtstat");
  166. var ioflag = model.getValue(ref + "[" + row +"]/ioflag");
  167. var medirecno = model.getValue(ref + "[" + row +"]/medirecno");
  168. var dschdeptnm = model.getValue(ref + "[" + row +"]/dschdeptnm");
  169. model.makeValue("/root/main/chrtinfo/pid" , pid);
  170. model.makeValue("/root/main/chrtinfo/pnm" , pnm);
  171. model.makeValue("/root/main/chrtinfo/dschdeptcd", dschdeptcd);
  172. model.makeValue("/root/main/chrtinfo/dschdd" , dschdd);
  173. model.makeValue("/root/main/chrtinfo/bcno" , bcno);
  174. model.makeValue("/root/main/chrtinfo/chrtrem" , chrtrem);
  175. model.makeValue("/root/main/chrtinfo/fstrgstdt" , fstrgstdt);
  176. model.makeValue("/root/main/chrtinfo/lendyn" , lendyn);
  177. model.makeValue("/root/main/chrtinfo/chrtstat" , chrtstat);
  178. model.makeValue("/root/main/chrtinfo/ioflag" , ioflag);
  179. model.makeValue("/root/main/chrtinfo/medirecno" , medirecno);
  180. model.makeValue("/root/main/chrtinfo/dschdeptnm", dschdeptnm);
  181. model.refresh();
  182. model.makeValue("/root/send/reqdata/medirecno", medirecno);
  183. model.makeValue("/root/send/reqdata/pid" , pid);
  184. // 챠트분실이력조회
  185. submit("TRMRC01401");
  186. // 챠트대출이력조회
  187. submit("TRMRC02702");
  188. }
  189. /**
  190. * @desc : 챠트정보를 초기화한다.
  191. * @
  192. * @param :
  193. * @return :
  194. * @authur : 이은영 2008.03.18
  195. * @---------------------------------------------------
  196. */
  197. function fClearChrtInfo(){
  198. model.makeValue("/root/main/chrtinfo/pid" , "");
  199. model.makeValue("/root/main/chrtinfo/pnm" , "");
  200. model.makeValue("/root/main/chrtinfo/medirecno" , "");
  201. model.makeValue("/root/main/chrtinfo/orddeptcd" , "");
  202. model.makeValue("/root/main/chrtinfo/bcno" , "");
  203. model.makeValue("/root/main/chrtinfo/chrtrem" , "");
  204. model.makeValue("/root/main/chrtinfo/chrtstat" , "");
  205. model.makeValue("/root/main/chrtinfo/lendyn" , "");
  206. model.makeValue("/root/main/chrtinfo/lastorddd" , "");
  207. model.makeValue("/root/main/chrtinfo/fstrgstdt" , "");
  208. model.makeValue("/root/main/chrtinfo/dschdeptcd" , "");
  209. model.makeValue("/root/main/chrtinfo/dschdd" , "");
  210. model.makeValue("/root/main/chrtinfo/orddeptabbr", "");
  211. model.makeValue("/root/main/chrtinfo/dschdeptnm" , "");
  212. model.refresh();
  213. }
  214. /**
  215. * @desc : 챠트정보를 등록한다.
  216. * @
  217. * @param :
  218. * @return :
  219. * @authur : 이은영 2008.03.18
  220. * @---------------------------------------------------
  221. */
  222. function fSaveChrtInfo(){
  223. var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
  224. if(medirecno != ""){
  225. messageBox("차트이력이 선택되어있습니다.\n신규버튼을 눌러 다시 작성 해 주십시요" , "I999")
  226. return;
  227. }
  228. var orddeptcd = model.getValue("/root/main/chrtinfo/orddeptcd");
  229. var medirecno = model.getValue("/root/main/chrtlist[orddeptcd = "+ orddeptcd +"]/orddeptcd");
  230. if (medirecno != ""){
  231. messageBox("이미 등록된 차트과입니다.\n신규버튼을 눌러 다시 작성 해 주십시요" , "I999")
  232. return;
  233. }
  234. // if(medirecno == ""){
  235. // model.setValue("/root/main/chrtinfo/medirecno","0");
  236. // }
  237. submit("TXMRC01401");
  238. }
  239. /**
  240. * @desc : 챠트정보를 수정한다.
  241. * @
  242. * @param :
  243. * @return :
  244. * @authur : 이은영 2008.03.18
  245. * @---------------------------------------------------
  246. */
  247. function fUpdateChrtInfo(){
  248. var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
  249. if(medirecno == ""){
  250. messageBox("선택된 차트이력이 ", "I004")
  251. return;
  252. }
  253. submit("TXMRC01401");
  254. }
  255. /**
  256. * @desc : 챠트정보를 삭제한다.
  257. * @
  258. * @param :
  259. * @return :
  260. * @authur : 이은영 2008.03.18
  261. * @---------------------------------------------------
  262. */
  263. function fDeleteChrtInfo(ioflag){
  264. var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
  265. if(medirecno == ""){
  266. messageBox("선택된 차트이력이 ", "I004")
  267. return;
  268. } else {
  269. if(messageBox("선택된 차트이력을 ", "Q001") == "7"){
  270. return;
  271. }
  272. }
  273. // 차트대출이력을 조회한다. 카운트가 0 인 경우만 삭제한다.
  274. if (ioflag == "O") {
  275. submit("TRMRC00170");
  276. } else {
  277. submit("TRMRC02702");
  278. }
  279. var cnt = getNodeSetCnt("/root/main/chrtlendlist");
  280. if (cnt == 0) {
  281. submit("TXMRC01402");
  282. // 삭제후 챠트정보 초기화한다.
  283. fClearChrtInfo();
  284. } else {
  285. messageBox("선택된 차트이력의 대출이력이 있어서 삭제 ", "E001")
  286. return;
  287. }
  288. }
  289. /**
  290. * @desc : 환자등록번호 조회 팝업
  291. * @
  292. * @param :
  293. * @return :
  294. * @authur : 이은영 2008.03.18
  295. * @---------------------------------------------------
  296. */
  297. function fGetPid(refPid, refPnm)
  298. {
  299. //조회건수가 1건일 경우 팝업창을 바로 닫는다.
  300. model.setValue("/root/hidden/tmp/pidpopupinfo/checkfnexam", "1");
  301. model.setValue("/root/hidden/tmp/pidpopupinfo/autoflag", "N");
  302. if( model.getValue("/root/hidden/tmp/pidpopupinfo/srchcond") == '' ){
  303. model.setValue("/root/hidden/tmp/pidpopupinfo/srchcond", '2');
  304. }
  305. modal("SPPMC02500", "1","150", "150", "SPPMC02500", "/root/hidden/tmp/pidpopupinfo", "/root/send");
  306. model.resetInstanceNode("/root/source");
  307. //환자번호 copy
  308. var popupendflag = model.getValue("/root/main/popupendflag");
  309. if (popupendflag == "ok")
  310. {
  311. model.setValue(refPid, model.getValue("/root/main/patinfo/patinfolist/pid"));
  312. if (refPnm != null || refPnm != "") {
  313. model.setValue(refPnm, model.getValue("/root/main/patinfo/patinfolist/hngnm"));
  314. }
  315. model.refresh();
  316. }
  317. }
  318. /**
  319. * @desc : 선택된 챠트정보를 상위에 디스플레이 한다.
  320. * @
  321. * @param : gridObj - 그리드 컨트롤
  322. * @return :
  323. * @authur : 이은영 2008.03.18
  324. * @---------------------------------------------------
  325. */
  326. function fDisplayLendList(gridObj){
  327. if (isDataCell() == false){
  328. return;
  329. }
  330. if (gridObj.row < 1){
  331. return;
  332. }
  333. var ref = gridObj.nodeset;
  334. var row = gridObj.row;
  335. var pid = model.getValue(ref + "[" + row +"]/pid");
  336. var chrtseqno = model.getValue(ref + "[" + row +"]/chrtseqno");
  337. var appdeptcd = model.getValue(ref + "[" + row +"]/appdeptcd");
  338. var lendmanid = model.getValue(ref + "[" + row +"]/lendmanid");
  339. var appmanid = model.getValue(ref + "[" + row +"]/appmanid");
  340. var cntctelno = model.getValue(ref + "[" + row +"]/cntctelno");
  341. var appdt = model.getValue(ref + "[" + row +"]/appdt");
  342. var fstacptprndt = model.getValue(ref + "[" + row +"]/fstacptprndt");
  343. var rendschedt = model.getValue(ref + "[" + row +"]/rendschedt");
  344. var renddt = model.getValue(ref + "[" + row +"]/renddt");
  345. var rtndt = model.getValue(ref + "[" + row +"]/rtndt");
  346. var delyn = model.getValue(ref + "[" + row +"]/delyn");
  347. var rendcd = model.getValue(ref + "[" + row +"]/rendcd");
  348. var rendresn = model.getValue(ref + "[" + row +"]/rendresn");
  349. var unrendcd = model.getValue(ref + "[" + row +"]/unrendcd");
  350. var unrendresn = model.getValue(ref + "[" + row +"]/unrendresn");
  351. var deptkeepcd = model.getValue(ref + "[" + row +"]/deptkeepcd");
  352. var deptkeepresn = model.getValue(ref + "[" + row +"]/deptkeepresn");
  353. var unrtnresn = model.getValue(ref + "[" + row +"]/unrtnresn");
  354. var msgcnts = model.getValue(ref + "[" + row +"]/msgcnts");
  355. var roomcd = model.getValue(ref + "[" + row +"]/roomcd");
  356. var fsexamflag = model.getValue(ref + "[" + row +"]/fsexamflag");
  357. var chrtdeptcd = model.getValue(ref + "[" + row +"]/chrtdeptcd");
  358. var lendman = model.getValue(ref + "[" + row +"]/lendman");
  359. var appman = model.getValue(ref + "[" + row +"]/appman");
  360. var rtnschedd = model.getValue(ref + "[" + row +"]/rtnschedd");
  361. var rendbcflag = model.getValue(ref + "[" + row +"]/rendbcflag");
  362. var rtnbcflag = model.getValue(ref + "[" + row +"]/rtnbcflag");
  363. model.makeValue("/root/main/chrtlendinfo/pid" , pid);
  364. model.makeValue("/root/main/chrtlendinfo/chrtseqno" , chrtseqno);
  365. model.makeValue("/root/main/chrtlendinfo/appdeptcd" , appdeptcd);
  366. model.makeValue("/root/main/chrtlendinfo/lendmanid" , lendmanid);
  367. model.makeValue("/root/main/chrtlendinfo/appmanid" , appmanid);
  368. model.makeValue("/root/main/chrtlendinfo/cntctelno" , cntctelno);
  369. model.makeValue("/root/main/chrtlendinfo/appdt" , appdt);
  370. model.makeValue("/root/main/chrtlendinfo/appdd" , appdt.substring(0,8));
  371. model.makeValue("/root/main/chrtlendinfo/apptm" , appdt.substring(8,14));
  372. model.makeValue("/root/main/chrtlendinfo/fstacptprndt", fstacptprndt);
  373. model.makeValue("/root/main/chrtlendinfo/rendschedd" , rendschedt.substring(0,8));
  374. model.makeValue("/root/main/chrtlendinfo/rendschetm" , rendschedt.substring(8,12));
  375. model.makeValue("/root/main/chrtlendinfo/renddt" , renddt);
  376. model.makeValue("/root/main/chrtlendinfo/renddd" , renddt.substring(0,8));
  377. model.makeValue("/root/main/chrtlendinfo/rendtm" , renddt.substring(8,14));
  378. model.makeValue("/root/main/chrtlendinfo/rtndt" , rtndt);
  379. model.makeValue("/root/main/chrtlendinfo/rtndd" , rtndt.substring(0,8));
  380. model.makeValue("/root/main/chrtlendinfo/rtntm" , rtndt.substring(8,14));
  381. model.makeValue("/root/main/chrtlendinfo/delyn" , delyn);
  382. model.makeValue("/root/main/chrtlendinfo/rendcd" , rendcd);
  383. model.makeValue("/root/main/chrtlendinfo/rendresn" , rendresn);
  384. model.makeValue("/root/main/chrtlendinfo/unrendcd" , unrendcd);
  385. model.makeValue("/root/main/chrtlendinfo/unrendresn" , unrendresn);
  386. model.makeValue("/root/main/chrtlendinfo/deptkeepcd" , deptkeepcd);
  387. model.makeValue("/root/main/chrtlendinfo/deptkeepresn", deptkeepresn);
  388. model.makeValue("/root/main/chrtlendinfo/unrtnresn" , unrtnresn);
  389. model.makeValue("/root/main/chrtlendinfo/msgcnts" , msgcnts);
  390. model.makeValue("/root/main/chrtlendinfo/roomcd" , roomcd);
  391. model.makeValue("/root/main/chrtlendinfo/fsexamflag" , fsexamflag);
  392. model.makeValue("/root/main/chrtlendinfo/chrtdeptcd" , chrtdeptcd);
  393. model.makeValue("/root/main/chrtlendinfo/lendman" , lendman);
  394. model.makeValue("/root/main/chrtlendinfo/appman" , appman);
  395. model.makeValue("/root/main/chrtlendinfo/rtnschedd" , rtnschedd);
  396. model.makeValue("/root/main/chrtlendinfo/rendbcflag" , rendbcflag);
  397. model.makeValue("/root/main/chrtlendinfo/rtnbcflag" , rtnbcflag);
  398. model.refresh();
  399. }
  400. /**
  401. * @desc : 챠트상태를 수정한다.
  402. * @
  403. * @param :
  404. * @return :
  405. * @authur : 이은영 2008.06.11
  406. * @---------------------------------------------------
  407. */
  408. function fUpdateChrtStat(){
  409. var medirecno = model.getValue("/root/main/chrtinfo/medirecno");
  410. if(medirecno == ""){
  411. messageBox("선택된 차트이력이 ", "I004")
  412. return;
  413. }
  414. model.removeNodeset("/root/main/chrtstatlist");
  415. submit("TXMRC01403");
  416. }
  417. /**
  418. * @desc : 대출자/반납자 조회
  419. * @
  420. * @param : refUserid - 대출자 ID, refUserNm - 대출자명
  421. * @return :
  422. * @authur : 이윤정 2008.07.21
  423. * @---------------------------------------------------
  424. */
  425. function fGetUserid(refUserid, refUserNm)
  426. {
  427. model.removenode("/root/hidden/tmp/tempuserinfo/list");
  428. model.reset("/root/hidden/tmp/tempuserinfo");
  429. var user = model.getValue(refUserid);
  430. var flag = "userid";
  431. if(isNaN(user)){
  432. flag = "usernm";
  433. }
  434. model.setValue("/root/hidden/tmp/userpopupinfo/param", "_OneS");
  435. model.setValue("/root/hidden/tmp/userpopupinfo/flag", flag);
  436. model.setValue("/root/hidden/tmp/userpopupinfo/searchitem", user);
  437. modal("SPZSU10103", "", "200", "200", "SPZSU10103","/root/hidden/tmp/userpopupinfo","/root/main/temp");
  438. var iParam = getParameter("SPZSU10103_");
  439. setCSVToNode("/root/hidden/tmp/tempuserinfo", iParam);
  440. clearParameter("SPZSU10103_");
  441. model.refresh();
  442. //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
  443. if( getNodesetCount("/root/hidden/tmp/tempuserinfo/list") > 0 ){
  444. var userid = model.getValue("/root/hidden/tmp/tempuserinfo/list/userid");
  445. var usernm = model.getValue("/root/hidden/tmp/tempuserinfo/list/usernm");
  446. model.makeValue(refUserid, userid);
  447. if (refUserNm != null)
  448. {
  449. model.makeValue(refUserNm, usernm);
  450. }
  451. model.refresh();
  452. }
  453. }
  454. /**
  455. * @desc : 등록된 사용자 번호인지 체킹한다..
  456. * @
  457. * @param : iptObj - 사용자 ID 입력 컨트롤 (userid)
  458. * @return : posdeptcd - 사용자 부서코드
  459. * @authur : 이은영 2008.03.18
  460. * @---------------------------------------------------
  461. */
  462. function fCheckUserid(iptObj)
  463. {
  464. setInputNodeCurText();
  465. // 사용자 번호 체크
  466. if(iptObj.currentText.length > 0 ){
  467. // 사용자 조회
  468. model.removenode("/root/hidden/tmp/tempuserinfo/list");
  469. model.reset("/root/hidden/tmp/tempuserinfo");
  470. model.setValue("/root/hidden/tmp/userpopupinfo/param", "_OneS");
  471. model.setValue("/root/hidden/tmp/userpopupinfo/flag", "userid");
  472. model.setValue("/root/hidden/tmp/userpopupinfo/searchitem", iptObj.currentText);
  473. modal("SPZSU10103", "", "200", "200", "SPZSU10103","/root/hidden/tmp/userpopupinfo","/root/main/temp");
  474. var iParam = getParameter("SPZSU10103_");
  475. setCSVToNode("/root/hidden/tmp/tempuserinfo", iParam);
  476. clearParameter("SPZSU10103_");
  477. //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
  478. if( getNodesetCount("/root/hidden/tmp/tempuserinfo/list") > 0 ){
  479. var userid = model.getValue("/root/hidden/tmp/tempuserinfo/list/userid");
  480. var posdeptcd = model.getValue("/root/hidden/tmp/tempuserinfo/list/posdeptcd");
  481. iptObj.value = userid;
  482. model.refresh();
  483. return posdeptcd;
  484. //fSearch();
  485. }else{
  486. model.resetInstanceNode("/root/hidden/tmp/tempuserinfo/list");
  487. messageBox("없는 사용자 번호 입니다.", "E999", "");
  488. model.refresh();
  489. }
  490. }else{
  491. messageBox("사용자 번호를 정확히", "C001");
  492. }
  493. return "";
  494. }
  495. /**
  496. * @desc : 등록된 환자번호인지 체킹한다..
  497. * @
  498. * @param : iptObj - 환자번호 입력 컨트롤 (pid)
  499. * @return :
  500. * @authur : 이은영 2008.09.17
  501. * @---------------------------------------------------
  502. */
  503. function fGetPidNo(iptObj, ref)
  504. {
  505. var chkyn = model.getValue(ref);
  506. if (chkyn == "Y") {
  507. if (iptObj.currentText.length > 0) {
  508. var pid = iptObj.currentText;
  509. pid = getCretCheckNo(pid, getUserInfo("dutplceinstcd"));
  510. model.makeValue(iptObj.attribute("ref"), pid);
  511. iptObj.refresh();
  512. }
  513. }
  514. }
  515. /**
  516. * @desc : 등록된 환자번호인지 체킹한다..
  517. * @
  518. * @param : iptObj - 환자번호 입력 컨트롤 (pid)
  519. * @return : pnm - 환자명
  520. * @authur : 이은영 2008.03.18
  521. * @---------------------------------------------------
  522. */
  523. function fCheckPid(iptObj, refPnm)
  524. {
  525. model.makeValue("/root/send/req/srchcond", "1");
  526. model.makeValue("/root/send/req/pid", iptObj.currentText);
  527. //환자등록번호 체크
  528. if(iptObj.currentText.length > 0 ){
  529. model.resetInstanceNode("/root/main/result/patinfo");
  530. model.makeNode("/root/main/result/patinfo");
  531. if(submit("TRPMC02500", "", "/root/send/req", "/root/main/result/patinfo")){
  532. //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
  533. if( getNodesetCount("/root/main/result/patinfo/patinfolist") > 0 ){
  534. model.copyNode("/root/main/patinfo", "/root/main/result/patinfo");
  535. //* 2009.04.07. 이중번호 메세지 ( 14257937 박용석 -> 13275912 신옥순 )
  536. var sBindPid = model.getValue("/root/main/result/patinfo/patinfolist/bindpid");
  537. if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
  538. //합번된 등록번호 메세지 처리
  539. var sPid = model.getValue("/root/main/result/patinfo/patinfolist/pid");
  540. var sHngnm = model.getValue("/root/main/result/patinfo/patinfolist/hngnm");
  541. var retValue = messageBox(sPid + " (" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
  542. if( retValue == '6' ){
  543. model.makeValue(iptObj.attribute("ref"), sBindPid);
  544. iptObj.refresh();
  545. fCheckPid(iptObj, refPnm);
  546. return "";
  547. }
  548. }
  549. //*/
  550. var pid = model.getValue("/root/main/result/patinfo/patinfolist/pid");
  551. var pnm = model.getValue("/root/main/result/patinfo/patinfolist/hngnm");
  552. if (refPnm != null)
  553. {
  554. model.makeValue(refPnm, pnm);
  555. }
  556. return pnm;
  557. }else{
  558. model.resetInstanceNode("/root/main/patinfo/patinfolist");
  559. messageBox("없는 환자 번호 입니다.", "E999", "");
  560. model.refresh();
  561. return "";
  562. }
  563. }
  564. }else{
  565. messageBox("환자등록번호를 정확히", "C001");
  566. return "";
  567. }
  568. }