SMMNR010.js 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237
  1. /*
  2. (SMMNR01000_수혈간호기록.xrw - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var xTopAttributePath = "/root/main/topattribute";
  7. var xRecgrupListPath = "/root/main/recgrup/recgruplist";
  8. var xHIsgrupListPath = "/root/main/histgrup/histgruplist";
  9. var xRecHIstPntListPath = "/root/main/rechistpntgrup/rechistpntlist";
  10. var xClsListPath = "/root/main/detlgrup/detlgruplist"
  11. var xHIsgrupListBKPath = "/root/temp/histgrup/histgruplist";
  12. var xlrgListPath = "/root/main/lrggrup/lrggruplist"
  13. var xCondPath = "/root/main/cond";
  14. var xClsListBKPath = "/root/temp/main/detlgrup/detlgruplist";
  15. var xPopWndClsListBKPath = "/root/temp/main/cond/execpopwnddetlgrup/execpopwnddetlgruplist";
  16. var xExecDetlListPath = "/root/main/cond/execdetlgrup/execdetlgruplist";
  17. var xPopWndExecDetlListPath = "/root/main/cond/execpopwnddetlgrup/execpopwnddetlgruplist";
  18. var xDelDeliveExecPrcpListPath = "/root/main/cond/delivedetlgrup/delivedetlgruplist";
  19. var xBlodReturnReqGrupListPath = "/root/main/cond/blodreturnreqgrup/blodreturnreqgruplist";
  20. var xBlodExecRecGrupListPath = "/root/main/cond/blodexecrecgrup/blodexecrecgruplist";
  21. var xVitalSignPath = "/root/main/cond/vitalsigngrup/vitalsigngruplist";
  22. var xBlodNoRecPath = "/root/main/cond/blodnoexecrecgrup/blodnoexecrecgruplist";
  23. var ioparam = "" ;// 화면에서 넘어오는 파라메터 (절대 지우면 안됨)
  24. /**
  25. * @group :
  26. * @ver : 2007.07.16
  27. * @by : 정찬성
  28. * @---------------------------------------------------
  29. * @type : function
  30. * @access : public
  31. * @desc : 수혈 수행 내역에서 더블클릭 했을때, vital sign 리스트
  32. * @param :
  33. * @return :
  34. * @---------------------------------------------------
  35. */
  36. function fVitalSignList(){
  37. var iRow = datagrid3.row ;
  38. // alert(model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnscarerecseq"));
  39. model.removenode("/root/send");
  40. model.makeValue("/root/send/tnscarerecseq",model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnscarerecseq"));
  41. model.makeValue("/root/send/ioparam", ioparam);
  42. if(submit("TRMNR01025")){
  43. }
  44. }
  45. /**
  46. * @group :
  47. * @ver : 2007.09.27
  48. * @by : 정찬성
  49. * @---------------------------------------------------
  50. * @type : function
  51. * @access : public
  52. * @desc : 바이탈싸인 행삭제
  53. * @param :
  54. * @return :
  55. * @---------------------------------------------------
  56. */
  57. function fDelRow(){
  58. var iRow = datagrid4.row ;
  59. // alert(iRow);
  60. if(parseInt(iRow) < 4){
  61. messageBox("Vital Sign 기본정보는 삭제 ","E001");
  62. return;
  63. } else {
  64. datagrid4.deleteRow(iRow);
  65. }
  66. }
  67. /**
  68. * @group :
  69. * @ver : 2007.09.27
  70. * @by : 정찬성
  71. * @---------------------------------------------------
  72. * @type : function
  73. * @access : public
  74. * @desc : 줄추가 버튼
  75. * @param :
  76. * @return :
  77. * @---------------------------------------------------
  78. */
  79. function fAddSameLevlItemButton(){
  80. var iRows = datagrid4.rows;
  81. var iRow = datagrid4.row;
  82. if(iRows > 2) {
  83. // alert('2');
  84. datagrid4.insertRow(datagrid4.rows-datagrid4.fixedrows, "below");
  85. // var sRowCnt = grd_detlgrup.rows-grd_detlgrup.fixedrows;
  86. //
  87. // /* grupcd 현재 화면의 최대값 가져오기 시작 */
  88. //
  89. // var retVal = "" ;
  90. //
  91. // for(var i=2; i<= sRowCnt; i++){
  92. //// alert(model.getValue(xClsListPath+"["+i+"]/grupcd"));
  93. // if(model.getValue(xClsListPath+"["+i+"]/grupcd") ) {
  94. // saveyn = 1 ;
  95. // }
  96. //
  97. // retVal = Math.max(retVal,model.getValue(xClsListPath+"["+i+"]/grupcd"));
  98. //
  99. //// alert("retVal : " + retVal);
  100. //
  101. // }
  102. //
  103. // retVal = retVal + 1 ;
  104. //
  105. // retVal = String(retVal) ;
  106. //
  107. // retVal = fLpad(retVal,8,0);// grupcd 8자리 나머지는 0 으로 매꿈
  108. //
  109. // /* grupcd 현재 화면의 최대값 가져오기 끝 */
  110. //
  111. //// alert("retVal 22 : " + retVal);
  112. //
  113. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/grupcd",retVal);
  114. //
  115. //// grd_detlgrup.merge();
  116. }
  117. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/stat","I");
  118. //// model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/grupcd","00000001");
  119. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/genrdd",getCurrentDate());
  120. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/genrtm",getCurrentDateTime().substring(9,13));
  121. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/flag","등록");
  122. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/recdd",getCurrentDate());
  123. // model.setValue(xClsListPath+"["+(grd_detlgrup.row-1)+"]/rectm",getCurrentDateTime().substring(9,13));
  124. }
  125. /**
  126. * @group :
  127. * @ver : 2007.05.09
  128. * @by : 정찬성
  129. * @---------------------------------------------------
  130. * @type : function
  131. * @access : public
  132. * @desc : 참여자 정보 팝업 조회
  133. * @param : originalNode
  134. * @param : copyNode
  135. * @return : true/false
  136. * @---------------------------------------------------
  137. */
  138. function fClickUserBtn(userflag, seq, deptcd2, flag){
  139. // alert(deptcd2);
  140. var deptcd = "";
  141. var jobkindcd = "";
  142. var deptcd = "";
  143. if(userflag == "doctor"){
  144. deptcd = deptcd2;
  145. jobkindcd = "";
  146. }else if(userflag == "nurse"){
  147. deptcd = deptcd2;
  148. jobkindcd = "";
  149. }else{}
  150. setParameter("SPMNN02100_deptcd", deptcd);
  151. setParameter("SPMNN02100_jobkindcd", jobkindcd);
  152. modal("SPMNR02100");
  153. var userid = getParameter("SPMNN02100_userid");
  154. var usernm = getParameter("SPMNN02100_usernm");
  155. var posinstnm = getParameter("SPMNN02100_posinstnm");
  156. var posinstcd = getParameter("SPMNN02100_posinstcd");
  157. var posdeptnm = getParameter("SPMNN02100_posdeptnm");
  158. var posdeptcd = getParameter("SPMNN02100_posdeptcd");
  159. if(flag == "str"){
  160. model.setValue(output10.attribute("ref"), userid);// 저장할 데이터 생성
  161. model.setValue(output11.attribute("ref"), usernm);// 저장할 데이터 생성
  162. model.setValue(output12.attribute("ref"), userid+","+usernm+","+posinstnm+","+posinstcd+","+posdeptnm+","+posdeptcd);// 저장할 데이터 생성
  163. } else if(flag == "end"){
  164. model.setValue(output8.attribute("ref"), userid);// 저장할 데이터 생성
  165. model.setValue(output9.attribute("ref"), usernm);// 저장할 데이터 생성
  166. model.setValue(output13.attribute("ref"), userid+","+usernm+","+posinstnm+","+posinstcd+","+posdeptnm+","+posdeptcd);// 저장할 데이터 생성
  167. }
  168. model.refresh();
  169. // if(userid != ""){
  170. // model.setValue(xPartrtnEntrPath + "/entrid" + seq, userid);
  171. // model.setValue(xPartrtnEntrPath + "/entrnm" + seq, usernm);
  172. // model.setValue(xPartrtnEntrPath + "/status", "U");
  173. // model.refresh();
  174. // }
  175. setParameter("SPMNN02100_userid", "");
  176. setParameter("SPMNN02100_usernm", "");
  177. }
  178. /**
  179. * @group :
  180. * @ver : 2007.07.09
  181. * @by : 정찬성
  182. * @---------------------------------------------------
  183. * @type : function
  184. * @access : public
  185. * @desc : 미수행기록 목록에서 선택항목 체크(더블클릭)
  186. * @param :
  187. * @return :
  188. * @---------------------------------------------------
  189. */
  190. function fParam(getparam) {
  191. // alert("ioflag : "+opener.window.javascript.getParameter("ioflag"));
  192. // alert("pid : "+opener.window.javascript.getParameter("pid"));
  193. //
  194. // alert("getparam : "+getparam);
  195. // alert("session pid : "+getPatientInfo("pid"));
  196. var openernull = "" // 파마리터 null check
  197. var popvalue = "" ;
  198. var pidvalue = "" ;
  199. /* 메뉴 || 파라미터로 들어올때 체크 시작 */
  200. if( window.opener == null &&
  201. ( getparam == "IPRC1" || getparam == "IPRC2" || getparam == "OPRC1" || getparam == "OPRC2" ||
  202. getparam == "IPRC" || getparam == "OPRC") ) {//병동메인/주사에서 들어오지 않을때...
  203. openernull = 'Y';
  204. if(getparam == "OPRC1"){
  205. button1.selected = true;
  206. model.toggle("case1");
  207. getparam = "OPRC" ;
  208. ioparam = getparam ;
  209. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  210. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  211. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  212. button3.dispatch("DOMActivate");
  213. }
  214. } else if(getparam == "OPRC2"){
  215. button2.selected = true;
  216. model.toggle("case2");
  217. getparam = "OPRC" ;
  218. ioparam = getparam ;
  219. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  220. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  221. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  222. button16.dispatch("DOMActivate");
  223. }
  224. } else if(getparam == "IPRC1"){
  225. button1.selected = true;
  226. model.toggle("case1");
  227. getparam = "IPRC" ;
  228. ioparam = getparam ;
  229. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  230. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  231. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  232. button3.dispatch("DOMActivate");
  233. }
  234. } else if(getparam == "IPRC2"){
  235. button2.selected = true;
  236. model.toggle("case2");
  237. getparam = "IPRC" ;
  238. ioparam = getparam ;
  239. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  240. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  241. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  242. button16.dispatch("DOMActivate");
  243. }
  244. }
  245. // button1.selected = true;
  246. // model.toggle("case1");
  247. // getparam = "IPRC";
  248. } else if( window.opener != null && ( opener.window.javascript.getParameter("ioflag") == "IPRC1" ||
  249. opener.window.javascript.getParameter("ioflag") == "IPRC2" ||
  250. opener.window.javascript.getParameter("ioflag") == "OPRC1" ||
  251. opener.window.javascript.getParameter("ioflag") == "OPRC2" )
  252. ) {//병동메인/주사실메인에서 들어올때...
  253. popvalue = opener.window.javascript.getParameter("ioflag")
  254. pidvalue = opener.window.javascript.getParameter("pid")
  255. if( popvalue != null && popvalue != "" && pidvalue != null && pidvalue != "") {//플래그별 화면 case 선택
  256. if(popvalue == "OPRC1"){
  257. button1.selected = true;
  258. model.toggle("case1");
  259. getparam = "OPRC" ;
  260. ioparam = getparam ;
  261. model.setValue(input3.attribute("ref"), opener.window.javascript.getParameter("pid") );
  262. model.setValue(input12.attribute("ref"), opener.window.javascript.getParameter("pid") );
  263. button3.dispatch("DOMActivate");
  264. } else if(popvalue == "OPRC2"){
  265. button2.selected = true;
  266. model.toggle("case2");
  267. getparam = "OPRC" ;
  268. ioparam = getparam ;
  269. model.setValue(input3.attribute("ref"), opener.window.javascript.getParameter("pid") );
  270. model.setValue(input12.attribute("ref"), opener.window.javascript.getParameter("pid") );
  271. button16.dispatch("DOMActivate");
  272. } else if(popvalue == "IPRC1"){
  273. button1.selected = true;
  274. model.toggle("case1");
  275. getparam = "IPRC" ;
  276. ioparam = getparam ;
  277. model.setValue(input3.attribute("ref"), opener.window.javascript.getParameter("pid") );
  278. model.setValue(input12.attribute("ref"), opener.window.javascript.getParameter("pid") );
  279. button3.dispatch("DOMActivate");
  280. } else if(popvalue == "IPRC2"){
  281. button2.selected = true;
  282. model.toggle("case2");
  283. getparam = "IPRC" ;
  284. ioparam = getparam ;
  285. model.setValue(input3.attribute("ref"), opener.window.javascript.getParameter("pid") );
  286. model.setValue(input12.attribute("ref"), opener.window.javascript.getParameter("pid") );
  287. button16.dispatch("DOMActivate");
  288. }
  289. }
  290. } else if(
  291. ( getparam == "IPRC1" || getparam == "IPRC2" || getparam == "OPRC1" || getparam == "OPRC2" || getparam == "IPRC" || getparam == "OPRC")
  292. ) {// 메뉴에서 들어올때
  293. if(getparam == "OPRC1"){
  294. button1.selected = true;
  295. model.toggle("case1");
  296. getparam = "OPRC" ;
  297. ioparam = getparam ;
  298. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  299. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  300. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  301. button3.dispatch("DOMActivate");
  302. }
  303. } else if(getparam == "OPRC2"){
  304. button2.selected = true;
  305. model.toggle("case2");
  306. getparam = "OPRC" ;
  307. ioparam = getparam ;
  308. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  309. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  310. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  311. button16.dispatch("DOMActivate");
  312. }
  313. } else if(getparam == "IPRC1"){
  314. button1.selected = true;
  315. model.toggle("case1");
  316. getparam = "IPRC" ;
  317. ioparam = getparam ;
  318. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  319. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  320. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  321. button3.dispatch("DOMActivate");
  322. }
  323. } else if(getparam == "IPRC2"){
  324. button2.selected = true;
  325. model.toggle("case2");
  326. getparam = "IPRC" ;
  327. ioparam = getparam ;
  328. if(getPatientInfo("pid") != null && getPatientInfo("pid") != "" ) {//상단정보가 있을때
  329. model.setValue(input3.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  330. model.setValue(input12.attribute("ref"), getPatientInfo("pid") );//등록번호 화면에 셋팅
  331. button16.dispatch("DOMActivate");
  332. }
  333. }
  334. } else if(getparam == "" || getparam == null ) {// 화면파라미터 없을때
  335. button1.selected = true;
  336. model.toggle("case1");
  337. getparam = "IPRC";
  338. } else {
  339. openernull = 'Y';
  340. getparam = "" ;
  341. }
  342. /* 메뉴 && 파라미터가 아닌 로컬이나 다른 값으로 들어올때 기본 셋팅값으로 시작 */
  343. if(getparam == "" && openernull == "Y"){
  344. // 화면파라미터/팝업파라미터 모두 없을때
  345. button1.selected = true;
  346. model.toggle("case1");
  347. getparam = "IPRC" ;
  348. }
  349. /* 메뉴 && 파라미터가 아닌 로컬이나 다른 값으로 들어올때 기본 셋팅값으로 끝 */
  350. /* 메뉴 || 파라미터가 외래일때 병동/병실/환자 리스트 disabled 시작 */
  351. if(getparam == "OPRC"){ // 외래일때, 병동/병실/환자 리스트 disabled
  352. combo5.disabled = true ;
  353. combo1.disabled = true ;
  354. combo6.disabled = true ;
  355. combo7.disabled = true ;
  356. combo2.disabled = true ;
  357. combo8.disabled = true ;
  358. }
  359. /* 메뉴 || 파라미터가 외래일때 병동/병실/환자 리스트 disabled 끝 */
  360. ioparam = getparam ;
  361. return getparam ;
  362. }
  363. /**
  364. * @group :
  365. * @ver : 2007.07.09
  366. * @by : 정찬성
  367. * @---------------------------------------------------
  368. * @type : function
  369. * @access : public
  370. * @desc : 혈액요청취소 선택했을때...
  371. * @param :
  372. * @return :
  373. * @---------------------------------------------------
  374. */
  375. function fBlodReqCancelDoc(){
  376. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  377. var cnt = 0 ;
  378. model.removeNode ("/root/send/report");
  379. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  380. // alert(datagrid7.labelmatrix(i, 1));
  381. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  382. cnt = cnt + 1;
  383. // if( datagrid7.labelmatrix(i, 2) != "혈액준비") {
  384. if( datagrid7.labelmatrix(i, 2) != "불출요청") {
  385. messageBox("불출요청 상태 이외에는 혈액요청취소를 ","E001");
  386. return;
  387. }
  388. if( datagrid7.labelmatrix(i, 8).length < 5 ) {
  389. messageBox("혈액번호가 ","I004");
  390. return;
  391. }
  392. model.makeValue("/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]","");
  393. model.copyNode( "/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]", "/root/main/cond/delivedetlgrup/delivedetlgruplist["+i+"]" );
  394. // alert(instance1.selectSingleNode("/root/send/report/delivedetlgrup/delivedetlgruplist"+"["+cnt+"]").xml);
  395. }
  396. }
  397. if(cnt < 1){
  398. messageBox("선택 정보가 ","I004");
  399. return;
  400. };
  401. if(messageBox("혈액요청 취소를 ","Q004") != 6) return;// 저장하시겠습니까?
  402. model.makeValue("/root/send/report/patientnm",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/patientnm") );
  403. model.makeValue("/root/send/report/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") );
  404. model.makeValue("/root/send/report/sexage",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/sexage") );
  405. model.makeValue("/root/send/report/btypee",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/btype") );
  406. model.makeValue("/root/send/detlgrup",datagrid7.getupdatedataAll("i"));
  407. if(submit("TXMNR01034")){
  408. fGettDeliveDetlList();// 불출신청 내역 재조회
  409. }
  410. }
  411. /**
  412. * @group :
  413. * @ver : 2007.07.09
  414. * @by : 정찬성
  415. * @---------------------------------------------------
  416. * @type : function
  417. * @access : public
  418. * @desc : 미수행기록 목록에서 선택항목 체크(더블클릭)
  419. * @param :
  420. * @return :
  421. * @---------------------------------------------------
  422. */
  423. function fGridSel() {
  424. var sRowCnt2 = datagrid2.rows-datagrid2.fixedrows;
  425. var iRow = datagrid2.Row ;
  426. if( datagrid2.labelmatrix(iRow, 1) == "FALSE" || datagrid2.labelmatrix(iRow, 1) == "false" ){
  427. datagrid2.textmatrix(iRow, 1) = "true" ;
  428. } else if( datagrid2.labelmatrix(iRow, 1) == "true" ) {
  429. datagrid2.textmatrix(iRow, 1) = "FALSE" ;
  430. }
  431. }
  432. /**
  433. * @group :
  434. * @ver : 2007.07.09
  435. * @by : 정찬성
  436. * @---------------------------------------------------
  437. * @type : function
  438. * @access : public
  439. * @desc : 수행기록 내역 상세정보 (더블클릭)
  440. * @param :
  441. * @return :
  442. * @---------------------------------------------------
  443. */
  444. function fBlodExecRecDetlinfo() {
  445. var sRowCnt = datagrid3.rows-datagrid3.fixedrows;
  446. var iRow = datagrid3.row ;
  447. model.setValue(output5.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/blodno"));
  448. model.setValue(output6.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/prcpnm"));
  449. model.setValue(output7.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/abo") + model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/rh") );
  450. model.setValue(input4.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrddtm").substring(0,8));
  451. model.setValue(input5.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrddtm").substring(8,14));
  452. model.setValue(input6.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendddtm").substring(0,8));
  453. model.setValue(input7.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendddtm").substring(8,14));
  454. model.setValue(output10.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptnm"));
  455. model.setValue(output11.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursenm"));
  456. model.setValue(output8.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptnm"));
  457. model.setValue(output9.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm"));
  458. model.setValue(combo3.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnssideeffect"));
  459. model.setValue(input1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/prcpdelivefact"));
  460. model.setValue(radio1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/discontinuyn"));
  461. model.setValue(combo4.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/discontinu"));
  462. model.setValue(input8.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/drugqty"));
  463. model.setValue(textarea1.attribute("ref"), model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsrec"));
  464. /*
  465. model.makeValue("/root/send/tnsstrnurseid", sp[0] );
  466. model.makeValue("/root/send/tnsstrnursenm", sp[1] );
  467. model.makeValue("/root/send/tnsstrnursedeptcd", sp[5] );
  468. model.makeValue("/root/send/tnsstrnursedeptnm", sp[4] );
  469. */
  470. model.setValue(output12.attribute("ref"),
  471. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnurseid")+","+
  472. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursenm")+","+","+","+
  473. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptnm")+","+
  474. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsstrnursedeptcd")
  475. );
  476. // alert(output12.value);
  477. model.setValue(output13.attribute("ref"),
  478. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnurseid")+","+
  479. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")+","+","+","+
  480. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptnm")+","+
  481. model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptcd")
  482. );
  483. // alert(output13.value);
  484. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnurseid")+","+
  485. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")+","+
  486. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursedeptcd")+","+
  487. // model.getValue(xBlodExecRecGrupListPath+"["+iRow+"]/tnsendnursenm")
  488. model.refresh();
  489. var sRowCnt2 = datagrid2.rows-datagrid2.fixedrows;
  490. for(var i=1; i<= sRowCnt2; i++){ // 선택한 값이 불출신청 상태인지 체크
  491. datagrid2.textmatrix(i, 1) = "FALSE" ;
  492. }
  493. }
  494. /**
  495. * @group :
  496. * @ver : 2007.07.16
  497. * @by : 정찬성
  498. * @---------------------------------------------------
  499. * @type : function
  500. * @access : public
  501. * @desc : 수혈 수행 내역 리스트
  502. * @param :
  503. * @return :
  504. * @---------------------------------------------------
  505. */
  506. function fGetBlodExecRecList(blodpidflag){
  507. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  508. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  509. messageBox("혈액번호/등록번호를 ","C001");
  510. model.setfocus("input13");
  511. return;
  512. }
  513. model.refresh();
  514. model.makeValue("/root/send/blodpidflag",blodpidflag);
  515. model.makeValue("/root/send/blodno", input13.value );
  516. model.makeValue("/root/send/prcpddfrom", input9.value );
  517. model.makeValue("/root/send/prcpddto", input10.value );
  518. model.makeValue("/root/send/wardcd", combo5.value );
  519. model.makeValue("/root/send/roomcd", combo1.value );
  520. model.makeValue("/root/send/hngnm", combo6.value );
  521. model.makeValue("/root/send/pid", input12.value );
  522. model.makeValue("/root/send/ioparam", ioparam);
  523. if(submit("TRMNR01024")){
  524. }
  525. }
  526. /**
  527. * @group :
  528. * @ver : 2007.05.09
  529. * @by : 정찬성
  530. * @---------------------------------------------------
  531. * @type : function
  532. * @access : public
  533. * @desc : 수혈간호기록 기록저장 버튼
  534. * @param :
  535. * @return :
  536. * @---------------------------------------------------
  537. */
  538. function fTnsRecSave(){
  539. /* 수혈중단이 Y 일때 수혈폐기로 상태 변경 시작 */
  540. if( radio1.value == 'Y') {
  541. // alert(output5.value.length);
  542. var blodnodupSource = new Array();
  543. if(output5.value.length > 10){
  544. // alert('1');
  545. blodnodupSource = output5.value.split(",") ;
  546. } else {
  547. // alert('2' + output5.value);
  548. blodnodupSource[0] = output5.value ;
  549. }
  550. // alert('3' + blodnodupSource[0]);
  551. for(var i=0; i<= blodnodupSource.length -1 ; i++){
  552. // alert('4 : ' + blodnodupSource[i]);
  553. for(var n=1; n<= datagrid1.rows-1 ; n++){
  554. // alert('5 : ' + model.getValue(xBlodReturnReqGrupListPath+"["+n+"]/blodno"));
  555. if( blodnodupSource[i] == model.getValue(xBlodReturnReqGrupListPath+"["+n+"]/blodno") ) {//혈액번호와 같으면 그리드에 셋팅
  556. // alert('666');
  557. // model.setValue(xBlodReturnReqGrupListPath+"["+n+"]/stat") = 'true' ;
  558. // model.setValue(xBlodReturnReqGrupListPath+"["+n+"]/reqflag") = '3' ;
  559. // model.setValue(xBlodReturnReqGrupListPath+"["+n+"]/returnabandondate") = getCurrentDate() ;
  560. // model.setValue(xBlodReturnReqGrupListPath+"["+n+"]/etcprcpresncd") = combo4.value ;
  561. datagrid1.valuematrix(n,1) = 'true' ;
  562. datagrid1.valuematrix(n,10) = '3' ;
  563. datagrid1.valuematrix(n,11) = getCurrentDate() ;
  564. datagrid1.valuematrix(n,12) = combo4.value ;
  565. }
  566. // alert(datagrid1.labelmatrix(n, 1));
  567. // alert(datagrid1.labelmatrix(n, 10));
  568. // alert(datagrid1.labelmatrix(n, 11));
  569. // alert(datagrid1.labelmatrix(n, 12));
  570. }
  571. for(var x=1; x<= datagrid2.rows-1 ; x++){
  572. if( blodnodupSource[i] == model.getValue(xBlodNoRecPath+"["+x+"]/blodno") ) {//혈액번호와 같으면 그리드에 셋팅
  573. datagrid2.valuematrix(n,1) = 'true' ;
  574. }
  575. }
  576. }
  577. var cnt = 0 ;
  578. for(var i=1; i<= datagrid1.rows ; i++){//체크된 그리드 값 체크
  579. if( datagrid1.labelmatrix(i, 1) == "true" ) {
  580. cnt = cnt + 1;
  581. // ****************************** 반납사유 필수 로직 추가 ***************************************
  582. //alert(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd"));
  583. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == ""){//반납/폐기를 체크
  584. messageBox("반납/폐기를 ","C002");
  585. return;
  586. }
  587. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == ""){//반납/폐기일 체크
  588. messageBox("반납/폐기일을 ","C002");
  589. return;
  590. }
  591. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == ""){//반납사유 체크
  592. messageBox("반납/폐기 사유를 ","C002");
  593. return;
  594. }
  595. }
  596. }
  597. if(cnt < 1){
  598. messageBox("선택 정보가 ","I004");
  599. return;
  600. };
  601. model.removenode("/root/send");
  602. model.makeValue("/root/send/detlgrup2",datagrid1.getupdatedataAll("i"));
  603. model.makeValue("/root/send/discontinuyn2", "Y" );
  604. } else {
  605. var blodnodupSource2 = new Array();
  606. if(output5.value.length > 10){
  607. // alert('1');
  608. blodnodupSource2 = output5.value.split(",") ;
  609. } else {
  610. // alert('2' + output5.value);
  611. blodnodupSource2[0] = output5.value ;
  612. }
  613. // alert('3' + blodnodupSource[0]);
  614. for(var i=0; i<= blodnodupSource2.length -1 ; i++){
  615. for(var x=1; x<= datagrid2.rows-1 ; x++){
  616. if( blodnodupSource2[i] == model.getValue(xBlodNoRecPath+"["+x+"]/blodno") ) {//혈액번호와 같으면 그리드에 셋팅
  617. datagrid2.valuematrix(x,1) = 'true' ;
  618. }
  619. }
  620. }
  621. }
  622. /* 수혈중단이 Y 일때 수혈폐기로 상태 변경 끝 */
  623. // return ;
  624. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/blodno") == ""){
  625. messageBox("혈액번호를 ","C002");
  626. return;
  627. }
  628. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/prcpnm") == ""){
  629. messageBox("혈액명을 ","C002");
  630. return;
  631. }
  632. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/abo") == ""){
  633. messageBox("혈액형을 ","C002");
  634. return;
  635. }
  636. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrdd") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrtm") == "" ) {
  637. messageBox("수혈시작시간을 ","C001");
  638. return;
  639. }
  640. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsenddd") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendtm") == "" ) {
  641. messageBox("수혈종료시간을 ","C001");
  642. return;
  643. }
  644. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursdeptnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall") == "") {
  645. messageBox("수혈시작 간호사를 ","C002");
  646. return;
  647. }
  648. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursdeptnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursnm") == "" || model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall") == "") {
  649. messageBox("수혈종료 간호사를 ","C002");
  650. return;
  651. }
  652. if(model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsrec") == "" ) {
  653. messageBox("수혈기록을 ","C001");
  654. return;
  655. }
  656. model.makeValue("/root/send/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") ) ;
  657. model.makeValue("/root/send/blodno",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/blodno") ) ;
  658. model.makeValue("/root/send/tnsstrddtm",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrdd") + model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrtm") );
  659. model.makeValue("/root/send/tnsendddtm",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsenddd") + model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendtm") );
  660. model.makeValue("/root/send/tnsstrnursall",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall") );
  661. model.makeValue("/root/send/tnsendnursall",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall") );
  662. model.makeValue("/root/send/sideeffectcomcodelist",model.getValue("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist") );
  663. // model.makeValue("/root/send/prcpdelivefact",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/prcpdelivefact") );
  664. model.makeValue("/root/send/discontinuyn",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/discontinuyn") );
  665. model.makeValue("/root/send/discontinucomcodelist",model.getValue("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist") );
  666. model.makeValue("/root/send/drugqty",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/drugqty") );
  667. model.makeValue("/root/send/tnsrec",model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsrec") );
  668. var sp = model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsstrnursall").split(",");
  669. //alert(sp);
  670. model.makeValue("/root/send/tnsstrnurseid", sp[0] );
  671. model.makeValue("/root/send/tnsstrnursenm", sp[1] );
  672. model.makeValue("/root/send/tnsstrnursedeptcd", sp[5] );
  673. model.makeValue("/root/send/tnsstrnursedeptnm", sp[4] );
  674. var sp2 = model.getValue("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist/tnsendnursall").split(",");
  675. //alert(sp2);
  676. model.makeValue("/root/send/tnsendnurseid", sp2[0] );
  677. model.makeValue("/root/send/tnsendnursenm", sp2[1] );
  678. model.makeValue("/root/send/tnsendnursedeptcd", sp2[5] );
  679. model.makeValue("/root/send/tnsendnursedeptnm", sp2[4] );
  680. model.makeValue("/root/send/ioparam", ioparam);
  681. var check = "" ;
  682. var sRowCnt = datagrid3.rows-datagrid3.fixedrows;
  683. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  684. // alert(datagrid3.labelmatrix(i, 3));
  685. //
  686. // alert(output5.value);
  687. if( datagrid3.labelmatrix(i, 3) == output5.value ) {
  688. check = "Y" ;
  689. }
  690. }
  691. /* 저장 / 업데이트 구분 체크 끝 */
  692. if( check != "Y" ){// 신규 저장
  693. model.makeValue("/root/send/instcd", "" );
  694. model.makeValue("/root/send/execprcpuniqno", "" );
  695. //alert("신규 저장");
  696. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  697. model.makeValue("/root/send/vitalgrup",datagrid4.getupdatedataAll("i"));
  698. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  699. if(submit("TXMNR01031")){
  700. model.copyNode("/root/hidden/main","/root/main");
  701. var pidblodflag = '';
  702. if(input12.value != ""){
  703. pidblodflag = 'pid';
  704. } else if (input13.value !="") {
  705. pidblodflag = 'blod';
  706. }
  707. fBlodDeliveList(pidblodflag);// 혈액불출내역 리스트
  708. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  709. fGetBlodExecRecList(pidblodflag); //수혈 수행 내역 리스트
  710. }
  711. } else if( check == "Y") {// 업데이트
  712. model.makeValue("/root/send/prcpdd", "" );
  713. model.makeValue("/root/send/prcpno", "" );
  714. model.makeValue("/root/send/prcphistno", "" );
  715. model.makeValue("/root/send/instcd", "" );
  716. model.makeValue("/root/send/execprcpuniqno", "" );
  717. //alert("업데이트");
  718. if(messageBox("","Q002") != 6) return;// 저장하시겠습니까?
  719. model.makeValue("/root/send/detlgrup",datagrid3.getupdatedataAll("i"));
  720. if(submit("TXMNR01032")){
  721. model.copyNode("/root/hidden/main","/root/main");
  722. var pidblodflag = '';
  723. if(input12.value != ""){
  724. pidblodflag = 'pid';
  725. } else if (input13.value !="") {
  726. pidblodflag = 'blod';
  727. }
  728. fBlodDeliveList(pidblodflag);// 혈액불출내역 리스트
  729. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  730. fGetBlodExecRecList(pidblodflag); //수혈 수행 내역 리스트
  731. }
  732. }
  733. }
  734. /**
  735. * @group :
  736. * @ver : 2007.05.09
  737. * @by : 정찬성
  738. * @---------------------------------------------------
  739. * @type : function
  740. * @access : public
  741. * @desc : 미수행기록목록에서 선택한 혈액정보 기록버튼
  742. * @param :
  743. * @return :
  744. * @---------------------------------------------------
  745. */
  746. function fExecRec(){
  747. var sRowCnt = datagrid2.rows-datagrid2.fixedrows;
  748. var cnt = 0 ;
  749. model.removenode("/root/send");
  750. model.makeValue("/root/send/detlgrup",datagrid2.getupdatedataAll("i"));
  751. var blodno = "" ;
  752. var prcpnm = "" ;
  753. var aborh = "" ;
  754. var prcpdelivefact = "" ;
  755. var duplreccheck = false ;
  756. /* 미수행기록 목록 선택 되어 있는지 체크 시작 */
  757. for(var i=1; i<= sRowCnt; i++){
  758. // alert(datagrid2.labelmatrix(i, 1));
  759. if( datagrid2.labelmatrix(i, 1) == "true" ) {
  760. blodno += datagrid2.labelmatrix(i, 2) + "," ;
  761. prcpnm += datagrid2.labelmatrix(i, 3) + "," ;
  762. aborh += datagrid2.labelmatrix(i, 4)+datagrid2.labelmatrix(i, 5) + "," ;
  763. prcpdelivefact += datagrid2.labelmatrix(i, 10) + "," ;
  764. cnt = cnt + 1;
  765. }
  766. }
  767. if(cnt < 1){
  768. messageBox("선택 정보가 ","I004");
  769. return;
  770. };
  771. /* 미수행기록 목록 선택 되어 있는지 체크 끝 */
  772. var blodnodupSource = blodno.substr(0,blodno.length-1).split(",");
  773. // alert(blodnodupSource);
  774. /* 미수행내역 기록버튼시 중복 체크 시작 */
  775. for(var i=0; i<= blodnodupSource.length; i++){
  776. // alert(datagrid2.labelmatrix(i, 1));
  777. for(var n=0; n<= datagrid3.rows; n++){
  778. if( blodnodupSource[i] == model.getValue(xBlodExecRecGrupListPath+"["+n+"]/blodno") ) {
  779. duplreccheck = true ;
  780. }
  781. }
  782. }
  783. /* 미수행내역 기록버튼시 중복 체크 끝 */
  784. // alert(blodno.substr(0,blodno.length-1));
  785. // if( duplreccheck ){// 중복기록 체크
  786. // messageBox("수행기록된 혈액을 중복으로 기록할수 ","I004");
  787. // return;
  788. // };
  789. // fClearChildNode("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist");
  790. // fClearChildNode("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist");
  791. // fClearChildNode("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist");
  792. // model.refresh();
  793. model.setValue(output5.attribute("ref"), blodno.substr(0,blodno.length-1) );
  794. model.setValue(output6.attribute("ref"), prcpnm.substr(0,prcpnm.length-1) );
  795. model.setValue(output7.attribute("ref"), aborh.substr(0,aborh.length-1) );
  796. model.setValue(radio1.attribute("ref"), "N" );
  797. model.setValue(input1.attribute("ref"), prcpdelivefact.substr(0,prcpdelivefact.length-1) );//전달사항
  798. model.setValue(input4.attribute("ref"), getCurrentDate() );
  799. model.setValue(input5.attribute("ref"), getCurrentTime() );
  800. model.setValue(output10.attribute("ref"), getUserId() );
  801. model.setValue(output11.attribute("ref"), getUserInfo("dutplcenm") );
  802. model.setValue(output12.attribute("ref"), getUserInfo("userid")+","+getUserInfo("usernm")+","+getUserInfo("dutplceinstnm")+","+getUserInfo("dutplceinstcd")+","+getUserInfo("dutplcenm")+","+getUserInfo("dutplcecd"));// 저장할 데이터 생성
  803. model.setValue(output8.attribute("ref"), getUserId() );
  804. model.setValue(output9.attribute("ref"), getUserInfo("dutplcenm") );
  805. model.setValue(output13.attribute("ref"), getUserInfo("userid")+","+getUserInfo("usernm")+","+getUserInfo("dutplceinstnm")+","+getUserInfo("dutplceinstcd")+","+getUserInfo("dutplcenm")+","+getUserInfo("dutplcecd"));// 저장할 데이터 생성
  806. /* 미수행내역 리스트에서 기록버튼 누를때 vital sign 측정시작 측정일시/시간 15분후 일시 시간 셋팅 시작 */
  807. datagrid4.valuematrix(1,1) = getCurrentDate() ;
  808. datagrid4.valuematrix(1,2) = getCurrentTime() ;
  809. /* 미수행내역 리스트에서 기록버튼 누를때 vital sign 측정시작 측정일시/시간 15분후 일시 시간 셋팅 끝 */
  810. model.refresh();
  811. // var sp1 = getUserInfos();
  812. // var sp2 = sp1.split("|")
  813. // alert(sp2[0]);
  814. // alert(sp2[1]);
  815. // alert(sp2[7]);
  816. // alert(sp2[6]);
  817. // alert(sp2[9]);
  818. // alert(sp2[8]);
  819. // output10.value = sp[4];
  820. // output11.value = sp[1];
  821. // output12.value = sp2;
  822. if(submit("TRMNR01023")){
  823. model.copyNode("/root/hidden/main","/root/main");
  824. }
  825. }
  826. /**
  827. * @group :
  828. * @ver : 2007.07.09
  829. * @by : 정찬성
  830. * @---------------------------------------------------
  831. * @type : function
  832. * @access : public
  833. * @desc : 혈액요청서 선택했을때...
  834. * @param :
  835. * @return :
  836. * @---------------------------------------------------
  837. */
  838. function fBlodReqDoc(){
  839. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  840. var cnt = 0 ;
  841. model.removeNode ("/root/send/report");
  842. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  843. // alert(datagrid7.labelmatrix(i, 35));
  844. //
  845. // return ;
  846. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  847. // alert(datagrid7.labelmatrix(i, 35));
  848. // return ;
  849. cnt = cnt + 1;
  850. // if( datagrid7.labelmatrix(i, 2) != "검사완료" ) { // 코드 변경후 바꾸기
  851. // if( datagrid7.labelmatrix(i, 35) != "520") {// 520 혈액준비 (공통코드)
  852. //
  853. //// messageBox("검사완료 상태 이외에는 혈액요청서를 출력 ","E001");// 코드 변경후 바꾸기
  854. //
  855. //// if(datagrid7.labelmatrix(i, 35) == "525"){
  856. //// messageBox("혈액요청서를 이미 출력한 상태입니다. 혈액요청서를 출력 ","E001");
  857. //// return;
  858. //// } else
  859. //
  860. //// if(datagrid7.labelmatrix(i, 35) != "520" && datagrid7.labelmatrix(i, 35) != "525"){
  861. //// messageBox("준비완료 상태 이외에는 혈액요청서를 출력 ","E001");
  862. //// return;
  863. //// }
  864. //
  865. // }
  866. if(datagrid7.labelmatrix(i, 36) != "520" && datagrid7.labelmatrix(i, 36) != "525"){
  867. messageBox("준비완료 상태 이외에는 혈액요청서를 출력 ","E001");
  868. return;
  869. }
  870. if( datagrid7.labelmatrix(i, 8).length < 5 ) {
  871. messageBox("혈액번호가 ","I004");
  872. return;
  873. }
  874. model.makeValue("/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]","");
  875. model.copyNode( "/root/send/report/delivedetlgrup/delivedetlgruplist["+cnt+"]", "/root/main/cond/delivedetlgrup/delivedetlgruplist["+i+"]" );
  876. // alert(instance1.selectSingleNode("/root/send/report/delivedetlgrup/delivedetlgruplist"+"["+cnt+"]").xml);
  877. }
  878. }
  879. if(cnt < 1){
  880. messageBox("선택 정보가 ","I004");
  881. return;
  882. };
  883. if(messageBox("혈액요청 출력을 ","Q004") != 6) return;
  884. model.makeValue("/root/send/report/patientnm",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/patientnm") );
  885. model.makeValue("/root/send/report/pid",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") );
  886. model.makeValue("/root/send/report/sexage",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/sexage") );
  887. model.makeValue("/root/send/report/btypee",model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/btype") ); model.makeValue("/root/send/report/wardnm",combo7.value );
  888. model.makeValue("/root/send/report/roomcd",combo2.value );
  889. model.makeValue("/root/send/ioparam", ioparam);
  890. // exeReportPreview("RFMNR01000", "XMLSTR");
  891. /*
  892. exeReportPreview(레포트명, 연계방법, 매개변수필드 XPath, SubmitID, 출력여부, 인쇄 창 보임 여부, 저장타입, 파일명, 파일 저장 창 보임여부, 미리보기창닫기여부, 모니터 번호, 데이터 소스, 데이터 XPath , 메인리포트 반복XPath, 서브리포트1 반복Xpath)
  893. */
  894. exeReportPreview("RFMNR01000", "XMLSTR", "", "", "true", "", "", "", "", "");
  895. model.makeValue("/root/send/detlgrup",datagrid7.getupdatedataAll("i"));
  896. if(submit("TXMNR01033")){
  897. fGettDeliveDetlList();// 불출신청 내역 재조회
  898. }
  899. }
  900. /**
  901. * @group :
  902. * @ver : 2007.07.09
  903. * @by : 정찬성
  904. * @---------------------------------------------------
  905. * @type : function
  906. * @access : public
  907. * @desc : 혈액불출 내역 선택 삭제 (신청취소)
  908. * @param :
  909. * @return :
  910. * @---------------------------------------------------
  911. */
  912. function fDelDeliveExecPrcp(){
  913. alert();
  914. var sRowCnt = datagrid7.rows-datagrid7.fixedrows;
  915. var cnt = 0 ;
  916. for(var i=1; i<= sRowCnt; i++){ // 선택한 값이 불출신청 상태인지 체크
  917. // alert(datagrid7.labelmatrix(i, 1));
  918. if( datagrid7.labelmatrix(i, 1) == "true" ) {
  919. cnt = cnt + 1;
  920. // if( datagrid7.labelmatrix(i, 2) != "500" ) {
  921. //
  922. // messageBox("불출신청 이외의 상태에서는 삭제할 수 ","I004");
  923. // return;
  924. //
  925. // }
  926. alert(model.getValue(xDelDeliveExecPrcpListPath+"["+i+"]/prcppreptfflag");
  927. if( datagrid7.labelmatrix(i, 36) != "000") {// 500 불출요청 (공통코드)
  928. messageBox("혈액은행에 접수된 상태에서는 신청취소 할 수 ","I004");
  929. return;
  930. } else if( datagrid7.labelmatrix(i, 36) == "의사") {// 의사 처방 삭제 불가능
  931. messageBox("의사처방은 신청취소 할 수 ","I004");
  932. return;
  933. }
  934. }
  935. }
  936. if(cnt < 1){
  937. messageBox("선택 정보가 ","I004");
  938. return;
  939. };
  940. // alert("개발 중입니다.");
  941. // return ;
  942. model.removenode("/root/send");
  943. model.refresh();
  944. // model.makeValue("/root/send/blodpidflag",blodpidflag);
  945. model.makeValue("/root/send/blodno", input13.value );
  946. model.makeValue("/root/send/prcpddfrom", input9.value );
  947. model.makeValue("/root/send/prcpddto", input10.value );
  948. model.makeValue("/root/send/wardcd", combo5.value );
  949. model.makeValue("/root/send/roomcd", combo1.value );
  950. model.makeValue("/root/send/hngnm", combo6.value );
  951. model.makeValue("/root/send/pid", input12.value );
  952. model.makeValue("/root/send/ioparam", ioparam);
  953. /* 양천덕시 로직 시작 */
  954. if(messageBox ( "신청취소를 ", "Q004" ) == "6"){
  955. model.makeValue("/root/send/detlgrup",datagrid7.getupdatedataAll("i"));
  956. if(submit("TXMNR01035") == true ){
  957. fGetExecDetlList();// 수행처방내역리스트
  958. fGettDeliveDetlList();// 불출신청 내역 리스트
  959. }
  960. }
  961. /* 양천덕시 로직 끝 */
  962. }
  963. /**
  964. * @group :
  965. * @ver : 2007.07.16
  966. * @by : 정찬성
  967. * @---------------------------------------------------
  968. * @type : function
  969. * @access : public
  970. * @desc : 수혈 미수행 내역 리스트
  971. * @param :
  972. * @return :
  973. * @---------------------------------------------------
  974. */
  975. function fGetBlodNoExecRecList(blodpidflag){
  976. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  977. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  978. messageBox("혈액번호/등록번호를 ","C001");
  979. model.setfocus("input13");
  980. return;
  981. }
  982. /* 수혈간호기록 내용 초기화 */
  983. // fClearChildNode("/root/main/cond/tnsnurserecgrup/tnsnurserecgruplist");
  984. // fClearChildNode("/root/main/cond/tnsnursereccdgrup/sideeffectcomcodelist");
  985. // fClearChildNode("/root/main/cond/tnsnursereccdgrup/discontinucomcodelist");
  986. //
  987. // model.refresh();
  988. model.makeValue("/root/send/blodpidflag",blodpidflag);
  989. model.makeValue("/root/send/blodno", input13.value );
  990. model.makeValue("/root/send/prcpddfrom", input9.value );
  991. model.makeValue("/root/send/prcpddto", input10.value );
  992. model.makeValue("/root/send/wardcd", combo5.value );
  993. model.makeValue("/root/send/roomcd", combo1.value );
  994. model.makeValue("/root/send/hngnm", combo6.value );
  995. model.makeValue("/root/send/pid", input12.value );
  996. model.makeValue("/root/send/ioparam", ioparam);
  997. if(submit("TRMNR01021")){
  998. }
  999. }
  1000. /**
  1001. * @group :
  1002. * @ver : 2007.05.09
  1003. * @by : 정찬성
  1004. * @---------------------------------------------------
  1005. * @type : function
  1006. * @access : public
  1007. * @desc : 혈액불출내역의 혈액반납의뢰 저장
  1008. * @param :
  1009. * @return :
  1010. * @---------------------------------------------------
  1011. */
  1012. function fBlodReturnSave(){
  1013. var sRowCnt = datagrid1.rows-datagrid1.fixedrows;
  1014. var cnt = 0 ;
  1015. model.removenode("/root/send");
  1016. model.makeValue("/root/send/detlgrup",datagrid1.getupdatedataAll("i"));
  1017. var saveyn = 0 ;
  1018. for(var i=1; i<= sRowCnt; i++){
  1019. //alert(datagrid1.labelmatrix(i, 1));
  1020. if( datagrid1.labelmatrix(i, 1) == "true" ) {
  1021. cnt = cnt + 1;
  1022. // ****************************** 반납사유 필수 로직 추가 ***************************************
  1023. //alert(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd"));
  1024. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/reqflag") == ""){//반납/폐기를 체크
  1025. messageBox("반납/폐기를 ","C002");
  1026. return;
  1027. }
  1028. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/returnabandondate") == ""){//반납/폐기일 체크
  1029. messageBox("반납/폐기일을 ","C002");
  1030. return;
  1031. }
  1032. if(model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == "-" || model.getValue(xBlodReturnReqGrupListPath+"["+i+"]/etcprcpresncd") == ""){//반납사유 체크
  1033. messageBox("반납/폐기 사유를 ","C002");
  1034. return;
  1035. }
  1036. }
  1037. }
  1038. if(cnt < 1){
  1039. messageBox("선택 정보가 ","I004");
  1040. return;
  1041. };
  1042. model.makeValue("/root/send/ioparam", ioparam);
  1043. if(submit("TXMNR01030")){
  1044. model.copyNode("/root/hidden/main","/root/main");
  1045. }
  1046. /* 반납/폐기 이후 정보 조회 실행 */
  1047. var pidblodflag = '';
  1048. if(input12.value != ""){
  1049. pidblodflag = 'pid';
  1050. } else if (input13.value !="") {
  1051. pidblodflag = 'blod';
  1052. }
  1053. fBlodDeliveList(pidblodflag); //혈액불출 리스트 조회버튼
  1054. fGetBlodNoExecRecList(pidblodflag); //수혈 미수행 내역 리스트
  1055. }
  1056. /**
  1057. * @group :
  1058. * @ver : 2007.07.16
  1059. * @by : 정찬성
  1060. * @---------------------------------------------------
  1061. * @type : function
  1062. * @access : public
  1063. * @desc : 혈액불출 내역 조회 리스트
  1064. * @param :
  1065. * @return :
  1066. * @---------------------------------------------------
  1067. */
  1068. function fBlodDeliveList(blodpidflag){
  1069. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  1070. if( model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pid") == "" && model.getValue("/root/main/cond/blodno") == "" ){
  1071. messageBox("혈액번호/등록번호를 ","C001");
  1072. model.setfocus("input13");
  1073. return;
  1074. }
  1075. model.removenode("/root/send");
  1076. model.refresh();
  1077. model.makeValue("/root/send/blodpidflag",blodpidflag);
  1078. model.makeValue("/root/send/blodno", input13.value );
  1079. model.makeValue("/root/send/prcpddfrom", input9.value );
  1080. model.makeValue("/root/send/prcpddto", input10.value );
  1081. model.makeValue("/root/send/wardcd", combo5.value );
  1082. model.makeValue("/root/send/roomcd", combo1.value );
  1083. model.makeValue("/root/send/hngnm", combo6.value );
  1084. model.makeValue("/root/send/pid", input12.value );
  1085. model.makeValue("/root/send/ioparam", ioparam);
  1086. if(submit("TRMNR01020")){
  1087. for(var i = 1 ; i < datagrid1.rows; i++ ){
  1088. if( model.getValue("/root/main/cond/blodreturnreqgrup/blodreturnreqgruplist["+ i +"]/prcphistcd") == 'E' ) {
  1089. datagrid1.isReadOnly(i, datagrid1.colRef("reqflag")) = true;
  1090. datagrid1.isReadOnly(i, datagrid1.colRef("returnabandondate")) = true;
  1091. datagrid1.isReadOnly(i, datagrid1.colRef("etcprcpresncd")) = true;
  1092. datagrid1.isReadOnly(i, datagrid1.colRef("stat")) = true;
  1093. datagrid1.rowstyle(i, "data", "background-color") = "#fff000";
  1094. }
  1095. }
  1096. }
  1097. model.setfocus("input13");
  1098. }
  1099. /**
  1100. * @group :
  1101. * @ver : 2007.06.18
  1102. * @by : 정찬성
  1103. * @---------------------------------------------------
  1104. * @type : function
  1105. * @access : public
  1106. * @desc : 불출신청 내역 조회 리스트
  1107. * @param :
  1108. * @return :
  1109. * @---------------------------------------------------
  1110. */
  1111. function fGettDeliveDetlList(){
  1112. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  1113. // messageBox("병동을 ","C002");
  1114. // model.setfocus("combo7");
  1115. // return;
  1116. }
  1117. model.removenode("/root/send");
  1118. model.makeValue("/root/send/prcpddfrom", input2.value);
  1119. model.makeValue("/root/send/prcpddto", input11.value);
  1120. model.makeValue("/root/send/wardcd", combo7.value);
  1121. model.makeValue("/root/send/roomcd", combo2.value);
  1122. model.makeValue("/root/send/hngnm", combo8.value);
  1123. model.makeValue("/root/send/pid", input3.value);
  1124. model.makeValue("/root/send/ioparam", ioparam);
  1125. if(submit("TRMNR01009")){
  1126. }
  1127. }
  1128. /**
  1129. * @group :
  1130. * @ver : 2007.04.02
  1131. * @by : 정찬성
  1132. * @---------------------------------------------------
  1133. * @type : function
  1134. * @access : public
  1135. * @desc : 수행처방 선택시 체크사항
  1136. * @param :
  1137. * @return :
  1138. * @---------------------------------------------------
  1139. */
  1140. function fSelchange(){
  1141. var iRow = datagrid5.row ;
  1142. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")));
  1143. //
  1144. // alert(parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")));
  1145. if( parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/prcpqty")) <= parseInt(model.getValue(xExecDetlListPath+"["+iRow+"]/appno")) ) {
  1146. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  1147. messageBox("신청수량이 처방수량보다 클 수 ","I004");
  1148. return;
  1149. }
  1150. if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "D/C") {
  1151. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  1152. messageBox("D/C 상태에서는 신청할 수 ","I004");
  1153. return;
  1154. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "의사") {
  1155. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  1156. messageBox("의사 상태에서는 신청할 수 ","I004");
  1157. return;
  1158. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") == "완료") {
  1159. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  1160. messageBox("완료 상태에서는 신청할 수 ","I004");
  1161. return;
  1162. } else if( model.getValue(xExecDetlListPath+"["+iRow+"]/prcpstatcd") != "처방") {
  1163. model.setValue(xExecDetlListPath+"["+iRow+"]/sel", "false" ) ;
  1164. messageBox("처방 상태 이외에는 신청할 수 ","I004");
  1165. return;
  1166. }
  1167. }
  1168. /**
  1169. * @group :
  1170. * @ver : 2007.04.02
  1171. * @by : 정찬성
  1172. * @---------------------------------------------------
  1173. * @type : function
  1174. * @access : public
  1175. * @desc : 그리드의 값이 변경되었을때, 상태값을 변경한다.
  1176. * @param :
  1177. * @return :
  1178. * @---------------------------------------------------
  1179. */
  1180. function fChangedGridCol(){
  1181. var sDetlGrupRow = datagrid5.row;
  1182. var sDetlGrupBKRow=0;
  1183. var num = model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/num");
  1184. for(var i=1; i<= getNodesetCount(xPopWndClsListBKPath); i++){
  1185. if(model.getValue(xPopWndClsListBKPath+"["+i+"]/num") == num){
  1186. sDetlGrupBKRow = i;
  1187. break;
  1188. }
  1189. }
  1190. if(event.keyCode == "32") {
  1191. messageBox("신청수량에 스페이스를 넣을 수 ","I004");
  1192. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  1193. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno","");
  1194. datagrid5.refresh();
  1195. return;
  1196. }
  1197. var irr = datagrid5.textmatrix(sDetlGrupRow,6) ;
  1198. if(model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == "0" || model.getValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/appno") == ""){
  1199. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","-");
  1200. datagrid5.rebuild();
  1201. //return;
  1202. }
  1203. // alert(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml);
  1204. //
  1205. // alert(instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml);
  1206. if(instance1.selectSingleNode(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]").xml != instance1.selectSingleNode(xPopWndClsListBKPath+"["+sDetlGrupBKRow+"]").xml){
  1207. model.setValue(xPopWndExecDetlListPath+"["+sDetlGrupRow+"]/stat","I");
  1208. datagrid5.rebuild();
  1209. }
  1210. }
  1211. /**
  1212. * @group :
  1213. * @ver : 2007.05.09
  1214. * @by : 정찬성
  1215. * @---------------------------------------------------
  1216. * @type : function
  1217. * @access : public
  1218. * @desc : 혈액불출관리 init
  1219. * @param :
  1220. * @return :
  1221. * @---------------------------------------------------
  1222. */
  1223. function fPopWndSave(){
  1224. var sRowCnt = datagrid5.rows-datagrid5.fixedrows;
  1225. model.removenode("/root/send");
  1226. model.makeValue("/root/send/detlgrup",datagrid5.getupdatedataAll("i"));
  1227. var saveyn = 0 ;
  1228. for(var i=1; i<= sRowCnt; i++){
  1229. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-") {
  1230. saveyn = 1 ;
  1231. }
  1232. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/stat") != "-" && model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno") == ""){
  1233. messageBox("신청수량은 ","I003");
  1234. return;
  1235. }
  1236. // if( !isNumber(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
  1237. //
  1238. // messageBox("숫자형을 ","C001");
  1239. // return;
  1240. //
  1241. // }
  1242. if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) < 1 || parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) == " " ) {
  1243. messageBox("신청수량은 1건 이하로 입력할 수 ","E001");
  1244. return;
  1245. }
  1246. if( parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/delivepossno")) < parseInt(model.getValue(xPopWndExecDetlListPath+"["+i+"]/appno")) ) {
  1247. messageBox("신청수량은 불출수량보다 크게 입력 ","E001");
  1248. return;
  1249. }
  1250. // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") );
  1251. // alert( model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") );
  1252. if(model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd") == "" || model.getValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm") == ""){
  1253. messageBox("예약일자/예약시간은 ","I003");
  1254. return;
  1255. }
  1256. }
  1257. if(saveyn <= 0 ){
  1258. messageBox("수정사항이 없어 저장 ","E001");
  1259. return;
  1260. }
  1261. //alert("result : " + saveyn);
  1262. // if(saveyn <= 0 ){
  1263. // messageBox("수정사항이 없어 저장 ","E001");
  1264. // return;
  1265. // }
  1266. //alert(model.getValue("/root/main/cond/clsflag"));
  1267. //alert(model.getValue("/root/main/cond/recflag"));
  1268. //if(messageBox("","Q002") != 6) return;
  1269. //alert(model.getValue("/root/main/cond/todd"));
  1270. // model.makeValue("/root/send/lrggrupcd", model.getValue(xCondPath+"/lrggrupcd"));
  1271. // model.makeValue("/root/send/clsflag", model.getValue("/root/main/cond/clsflag"));
  1272. // model.makeValue("/root/send/recflag", model.getValue("/root/main/cond/recflag"))
  1273. // model.makeValue("/root/send/todd2", model.getValue("/root/main/cond/todd"))
  1274. //alert(model.getValue("/root/send/todd2"));
  1275. if(submit("TXMNR01008")){
  1276. model.copyNode("/root/hidden/main","/root/main");
  1277. }
  1278. // grd_detlgrup.row = 1;
  1279. window.close();
  1280. }
  1281. /**
  1282. * @group :
  1283. * @ver : 2007.05.09
  1284. * @by : 정찬성
  1285. * @---------------------------------------------------
  1286. * @type : function
  1287. * @access : public
  1288. * @desc : 혈액불출관리 init
  1289. * @param :
  1290. * @return :
  1291. * @---------------------------------------------------
  1292. */
  1293. function fPopWndInit(){
  1294. model.makeValue("/root/send/prcpddfrom", opener.window.javascript.getParameter("prcpddfrom") );
  1295. model.makeValue("/root/send/prcpddto", opener.window.javascript.getParameter("prcpddto") );
  1296. model.makeValue("/root/send/wardcd", opener.window.javascript.getParameter("wardcd") );
  1297. model.makeValue("/root/send/roomcd", opener.window.javascript.getParameter("roomcd") );
  1298. model.makeValue("/root/send/pid", opener.window.javascript.getParameter("pid") );
  1299. model.makeValue("/root/send/queryprcpdd", opener.window.javascript.getParameter("queryprcpdd") );
  1300. model.makeValue("/root/send/queryprcpno", opener.window.javascript.getParameter("queryprcpno") );
  1301. model.makeValue("/root/send/queryprcphistno", opener.window.javascript.getParameter("queryprcphistno") );
  1302. //alert(prcpddfrom); alert(prcpddto); alert(wardcd); alert(roomcd); alert(pid);
  1303. if(submit("TRMNR01007")){
  1304. model.copyNode("/root/temp/main","/root/main");
  1305. for(var i = 1 ; i < datagrid5.rows ; i++) {
  1306. model.setValue(xPopWndExecDetlListPath+"["+i+"]/prcphopedd",getCurrentDate());
  1307. model.setValue(xPopWndExecDetlListPath+"["+i+"]/prcphopetm",getCurrentTime());
  1308. }
  1309. }
  1310. }
  1311. /**
  1312. * @group :
  1313. * @ver : 2007.06.18
  1314. * @by : 정찬성
  1315. * @---------------------------------------------------
  1316. * @type : function
  1317. * @access : public
  1318. * @desc : 혈액불출신청 팝업
  1319. * @param :
  1320. * @return :
  1321. * @---------------------------------------------------
  1322. */
  1323. function fPopWnd(){
  1324. var iRows = datagrid5.rows;
  1325. var queryprcpdd = "" ;
  1326. var queryprcpno = "" ;
  1327. var queryprcphistno = "" ;
  1328. var checkcnt = 0 ;
  1329. for(var i = 1 ; i < datagrid5.rows; i++ ) {// 전체를 돌면서 그룹에 값이 체크되어 있는것 초기화
  1330. if( model.getValue(xExecDetlListPath+"["+ i +"]/sel") == "true" ) {
  1331. // alert("111");
  1332. queryprcpdd = queryprcpdd + "'" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpdd2") + "'," ;
  1333. queryprcpno = queryprcpno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcpno") + "," ;
  1334. // alert(model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno"));
  1335. queryprcphistno = queryprcphistno + "" + model.getValue(xExecDetlListPath+"["+ i +"]/prcphistno") + "," ;
  1336. checkcnt++ ;
  1337. } else {
  1338. // alert("222");
  1339. }
  1340. }
  1341. if( checkcnt <= 0 ) {
  1342. messageBox("수혈처방내역을 ","C002");
  1343. return 0 ;
  1344. }
  1345. queryprcpdd = queryprcpdd.replace(/-/g,"")
  1346. // alert(queryprcpdd.replace(/-/g,""));
  1347. // alert(queryprcpdd.substr(0,queryprcpdd.length-1));
  1348. // alert(queryprcpno.substr(0,queryprcpno.length-1));
  1349. // alert(queryprcphistno.substr(0,queryprcphistno.length-1));
  1350. queryprcpdd = queryprcpdd.substr(0,queryprcpdd.length-1) ;
  1351. queryprcpno = queryprcpno.substr(0,queryprcpno.length-1) ;
  1352. queryprcphistno = queryprcphistno.substr(0,queryprcphistno.length-1) ;
  1353. // for(var i = 0 ; i < data.length; i++ ) {
  1354. //
  1355. // queryprcpno = queryprcpno + data[i] ;
  1356. //
  1357. // }
  1358. setParameter("prcpddfrom", input2.value);
  1359. setParameter("prcpddto", input11.value);
  1360. setParameter("wardcd", combo7.value);
  1361. setParameter("roomcd", combo2.value);
  1362. setParameter("pid", input3.value);
  1363. setParameter("queryprcpdd", queryprcpdd);
  1364. setParameter("queryprcpno", queryprcpno);
  1365. setParameter("queryprcphistno", queryprcphistno);
  1366. var left = event.screenX-1000;
  1367. var top = event.screenY+50;
  1368. modal("SMMNR01001",1,left,top);
  1369. }
  1370. /**
  1371. * @group :
  1372. * @ver : 2007.06.18
  1373. * @by : 정찬성
  1374. * @---------------------------------------------------
  1375. * @type : function
  1376. * @access : public
  1377. * @desc : 수행처방내역 조회 리스트
  1378. * @param :
  1379. * @return :
  1380. * @---------------------------------------------------
  1381. */
  1382. function fGetExecDetlList(){
  1383. if( model.getValue("/root/main/cond/wardcdgrup/wardcdgruplist") == "" ){
  1384. // messageBox("병동을 ","C002");
  1385. // model.setfocus("combo7");
  1386. // return;
  1387. }
  1388. model.removenode("/root/send");
  1389. model.makeValue("/root/send/prcpddfrom", input2.value);
  1390. model.makeValue("/root/send/prcpddto", input11.value);
  1391. model.makeValue("/root/send/wardcd", combo7.value);
  1392. model.makeValue("/root/send/roomcd", combo2.value);
  1393. model.makeValue("/root/send/hngnm", combo8.value);
  1394. model.makeValue("/root/send/pid", input3.value);
  1395. model.makeValue("/root/send/ioparam", ioparam);
  1396. if(submit("TRMNR01006")){
  1397. }
  1398. }
  1399. /**
  1400. * @group :
  1401. * @ver : 2007.06.18
  1402. * @by : 정찬성
  1403. * @---------------------------------------------------
  1404. * @type : function
  1405. * @access : public
  1406. * @desc : 환자 상세정보 조회 combo
  1407. * @param :
  1408. * @return :
  1409. * @---------------------------------------------------
  1410. */
  1411. function fGetPatientInfoRec(arg){
  1412. // alert(ioparameter);
  1413. model.removenode("/root/send");
  1414. model.makeValue("/root/send/wardcd", combo5.value);
  1415. model.makeValue("/root/send/roomcd", combo1.value);
  1416. if( input12.value != "" ){
  1417. model.makeValue("/root/send/pid", input12.value);
  1418. } else if( model.makeValue("/root/send/pid", combo6.value) != "" ){
  1419. model.makeValue("/root/send/pid", combo6.value);
  1420. }
  1421. if(submit("TRMNR01005")){
  1422. if( arg == "pid" && ioparam == "IPRC" ){
  1423. // fGetWardList();
  1424. if("" == model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/wardcd") ) {
  1425. return ;
  1426. }
  1427. model.setValue(combo5.attribute("ref"), model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/wardcd") );
  1428. fGetRoomList();
  1429. if( "" == model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/roomcd") ) {
  1430. return ;
  1431. }
  1432. model.setValue(combo1.attribute("ref"), model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/roomcd") );
  1433. fGetPatientList();
  1434. if("" == model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/pid") ) {
  1435. return ;
  1436. }
  1437. model.setValue(combo6.attribute("ref"), model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/pid") );
  1438. }
  1439. // model.refresh();
  1440. }
  1441. model.setfocus("button16");
  1442. }
  1443. /**
  1444. * @group :
  1445. * @ver : 2007.06.18
  1446. * @by : 정찬성
  1447. * @---------------------------------------------------
  1448. * @type : function
  1449. * @access : public
  1450. * @desc : 환자 상세정보 조회 combo
  1451. * @param :
  1452. * @return :
  1453. * @---------------------------------------------------
  1454. */
  1455. function fGetPatientInfo(arg){
  1456. // alert(ioparameter);
  1457. model.removenode("/root/send");
  1458. model.makeValue("/root/send/wardcd", combo7.value);
  1459. model.makeValue("/root/send/roomcd", combo2.value);
  1460. if( input3.value != "" ){
  1461. model.makeValue("/root/send/pid", input3.value);
  1462. } else if( model.makeValue("/root/send/pid", combo8.value) != "" ){
  1463. model.makeValue("/root/send/pid", combo8.value);
  1464. }
  1465. if(submit("TRMNR01005")){
  1466. if( arg == "pid" && ioparam == "IPRC" ){
  1467. // fGetWardList();
  1468. if("" == model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/wardcd") ) {
  1469. return ;
  1470. }
  1471. model.setValue(combo7.attribute("ref"), model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/wardcd") );
  1472. fGetRoomList();
  1473. if( "" == model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/roomcd") ) {
  1474. return ;
  1475. }
  1476. model.setValue(combo2.attribute("ref"), model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/roomcd") );
  1477. fGetPatientList();
  1478. if("" == model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/pid") ) {
  1479. return ;
  1480. }
  1481. model.setValue(combo8.attribute("ref"), model.getValue("/root/main/cond/patientgrupInfo/patientgruplistInfo/pidsearchlistInfo/pid") );
  1482. }
  1483. // model.refresh();
  1484. }
  1485. model.setfocus("button3");
  1486. }
  1487. /**
  1488. * @group :
  1489. * @ver : 2007.06.18
  1490. * @by : 정찬성
  1491. * @---------------------------------------------------
  1492. * @type : function
  1493. * @access : public
  1494. * @desc : 환자 정보 조회 combo
  1495. * @param :
  1496. * @return :
  1497. * @---------------------------------------------------
  1498. */
  1499. function fGetPatientList(){
  1500. model.removenode("/root/send");
  1501. model.makeValue("/root/send/wardcd", combo7.value);
  1502. model.makeValue("/root/send/roomcd", combo2.value);
  1503. if(submit("TRMNR01004")){
  1504. }
  1505. model.setfocus("combo8");
  1506. }
  1507. /**
  1508. * @group :
  1509. * @ver : 2007.06.18
  1510. * @by : 정찬성
  1511. * @---------------------------------------------------
  1512. * @type : function
  1513. * @access : public
  1514. * @desc : 병실 조회 combo
  1515. * @param :
  1516. * @return :
  1517. * @---------------------------------------------------
  1518. */
  1519. function fGetRoomList(){
  1520. model.removenode("/root/send");
  1521. model.makeValue("/root/send/wardcd", combo7.value);
  1522. //alert(combo7.value);
  1523. if(submit("TRMNR01003")){
  1524. }
  1525. model.setfocus("combo2");
  1526. }
  1527. /**
  1528. * @group :
  1529. * @ver : 2007.06.18
  1530. * @by : 정찬성
  1531. * @---------------------------------------------------
  1532. * @type : function
  1533. * @access : public
  1534. * @desc : 병동 조회
  1535. * @param :
  1536. * @return :
  1537. * @---------------------------------------------------
  1538. */
  1539. function fGetWardList(){
  1540. model.removenode("/root/send");
  1541. model.makeValue("/root/send/wardcd", model.getValue("/root/temp/cond/wardcdgrup/wardcdgruplist/wardcd"));
  1542. if(submit("TRMNR01002")){
  1543. }
  1544. // model.setfocus("combo7");
  1545. }
  1546. /**
  1547. * @group :
  1548. * @ver : 2007.05.09
  1549. * @by : 정찬성
  1550. * @---------------------------------------------------
  1551. * @type : function
  1552. * @access : public
  1553. * @desc : 혈액불출관리 init
  1554. * @param :
  1555. * @return :
  1556. * @---------------------------------------------------
  1557. */
  1558. function fInit( getparam){
  1559. // alert('11: ' + getparam);
  1560. //
  1561. // ioparam = getparam ;
  1562. fGetWardList();// 병동코드 리스트
  1563. }