AEZ0001.xjs 117 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[
  3. /**
  4. * 파일명 : AEZ0001.js
  5. * 작성일자 : 2007.5.18
  6. */
  7. /**
  8. * 세션 GET
  9. */
  10. var suppdeptcd ;
  11. function lf_aezfSetSuppDeptcd() {
  12. var dutplcecd = sysf_getUserInfo("dutplcecd");
  13. var selectplcecd = frmf_getPrestDeptCd();
  14. if(utlf_isNull(selectplcecd)) {
  15. selectplcecd = dutplcecd;
  16. }
  17. suppdeptcd = selectplcecd;
  18. // sysf_trace("suppdeptcd == " + suppdeptcd);
  19. frmf_setParameter("AST_DEPTCD", suppdeptcd);
  20. }
  21. function lf_aezfSetSuppDeptcd_main() {
  22. var dutplcecd = sysf_getUserInfo("dutplcecd");
  23. var selectplcecd = frmf_getPrestDeptCd();
  24. if(utlf_isNull(selectplcecd)) {
  25. selectplcecd = dutplcecd;
  26. }
  27. suppdeptcd = selectplcecd;
  28. // sysf_trace("suppdeptcd == " + suppdeptcd);
  29. // frmf_setParameter("AST_DEPTCD", suppdeptcd);
  30. }
  31. /****************************************************************************************
  32. * Argument : oTrgtGrid - 그리드ID
  33. * : nColumnIndx - Col Index
  34. * Description : 그리드 바인딩 Cell Name
  35. ****************************************************************************************/
  36. function lf_aezfGetBindCellName(oTrgtGrid, nColumnIndx){
  37. var sRtnText = "";
  38. var sTrgtText = oTrgtGrid.getCellProperty("body", nColumnIndx, "text");
  39. if(!utlf_isNull( sTrgtText)){
  40. sRtnText = sTrgtText.replace("bind:", "");
  41. }
  42. return sRtnText;
  43. }
  44. /************************************************************************************************
  45. 함수명 : lf_aezfSetCellStyle ()
  46. 인자 :
  47. String gridID - 그리드 아이디
  48. String styleFlag - 컬러 인덱스
  49. String data - 데이터 값
  50. Srting colRef - 비교할 컬럼 Ref
  51. String setColRef - 변경할 컬럼 Ref
  52. String fillflag - 변경할 항목 구분(B: background, F: font)
  53. 결과값 :
  54. 함수설명 : 그리드 특정 컬럼값을 비교하여 셀 백컬러 변경
  55. * 사용예) aezfSetCellStyle(Grid00,"0^1^2","V^P^D","Column0","Column1","B");
  56. ************************************************************************************************
  57. 작 성 자 : 어 승옥
  58. 작 성 일 : 2006. 12. 01
  59. ************************************************************************************************/
  60. function lf_aezfSetCellStyle( gridID , styleFlag , data , colRef , setColRef, fillflag ) {
  61. var fillStyle = "";
  62. var style;
  63. var styleFlags = styleFlag.split("^");
  64. var datas = data.split("^");
  65. var setCellIdx = gridID.getBindCellIndex( "body", setColRef);
  66. if ( fillflag == "B" ) {
  67. style = new Array("#ffff00", "#ccffcc", "#FF9A00");
  68. gridID.setCellProperty("body", setCellIdx, "background" ,"");
  69. gridID.setCellProperty("body", setCellIdx, "background2" ,"");
  70. gridID.setCellProperty("body", setCellIdx, "font" ,"");
  71. } else if ( fillflag == "F" ) {
  72. style = new Array("#ffff00", "#ccffcc", "#FF9A00");
  73. gridID.setCellProperty("body", setCellIdx, "color" ,"");
  74. gridID.setCellProperty("body", setCellIdx, "color2" ,"");
  75. gridID.setCellProperty("body", setCellIdx, "font" ,"");
  76. }
  77. var BackGroundFont = "";
  78. var end = "";
  79. var font = "";
  80. if(datas.length == 1){
  81. BackGroundFont += "expr:" + colRef+" == '" + dataValue +"' ? '"+styleValue+"' : ''";
  82. font += "expr:" + colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : ''";
  83. }else{
  84. for( var j = 0 ; j < datas.length ; j++ ) {
  85. var dataValue = datas[j];
  86. var styleValue = style[styleFlags[j]];
  87. if(j == datas.length-1){
  88. BackGroundFont += colRef+" == '" + dataValue +"' ? '"+styleValue+"' : ''";
  89. font += colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : ''";
  90. }else if(j == 0){
  91. BackGroundFont += "expr:" + colRef+" == '" + dataValue +"' ? '"+styleValue+"' : (";
  92. font += "expr:" + colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : (";
  93. }else{
  94. BackGroundFont += colRef+" == '" + dataValue +"' ? '"+styleValue+"' : (";
  95. font += colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : (";
  96. }
  97. if( j<datas.length-1)
  98. end += ")";
  99. }
  100. BackGroundFont += end;
  101. font += end;
  102. }
  103. if ( fillflag == "B" ) {
  104. gridID.setCellProperty("body", setCellIdx, "background" ,BackGroundFont);
  105. gridID.setCellProperty("body", setCellIdx, "background2" ,BackGroundFont);
  106. gridID.setCellProperty("body", setCellIdx, "font" ,font);
  107. } else if ( fillflag == "F" ) {
  108. gridID.setCellProperty("body", setCellIdx, "color" ,BackGroundFont);
  109. gridID.setCellProperty("body", setCellIdx, "color" ,BackGroundFont);
  110. gridID.setCellProperty("body", setCellIdx, "font" ,font);
  111. }
  112. }
  113. /************************************************************************************************
  114. 함수명 : lf_aezfSetRowStyle ()
  115. 인자 :
  116. objects gridID - 그리드 Object
  117. String styleFlag - 컬러 인덱스
  118. String data - 데이터 값
  119. Srting colRef - 비교할 컬럼 Ref
  120. String [control] - 조건 smaller | smallerThen | equal | biggerThen | bigger
  121. number startCol - 그리드 시작 위치(null 이면 0으로 초기값 셋팅)
  122. 결과값 :
  123. 함수설명 : 그리드 특정 컬럼값을 비교하여 로우 백컬러 변경
  124. * 사용예) lf_aezfSetRowStyle( Grid00 , "0^2" , "3^5" , "Column1" , "small^small" )
  125. ************************************************************************************************
  126. 작 성 자 : 어 승옥
  127. 작 성 일 : 2006. 12. 01
  128. ************************************************************************************************/
  129. function lf_aezfSetRowStyle( gridID , styleFlag , data , colRef , control, startCol ) {
  130. var fillStyle = "";
  131. var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" , "#dec6a4" , "#c8e67b" ,
  132. "#43c8f5" , "#ff9933" , "#3399ff" , "#9999cc" , "#FFC8C8" , "#fab7bf" , "#ffff00" , "#ccffcc" , "#FF9A00", "#ff0000");
  133. var styleFlags = styleFlag.split("^");
  134. var datas = data.split("^");
  135. if( utlf_isNull(control))
  136. control = "equal";
  137. var controls = control.split("^");
  138. var BackGroundFont = "";
  139. var end = "";
  140. // var font = "";
  141. for( var j = 0 ; j < datas.length ; j++ ) {
  142. var dataValue = datas[j];
  143. var styleValue = style[styleFlags[j]];
  144. if(utlf_isNull(controls[j]))
  145. controls[j] = "equal";
  146. var ctrl = "";
  147. switch( controls[j] ) {
  148. case "small":
  149. ctrl = "<";
  150. break;
  151. case "smallThen":
  152. ctrl = "<=";
  153. break;
  154. case "bigger":
  155. ctrl = ">";
  156. break;
  157. case "biggerThen":
  158. ctrl = ">=";
  159. break;
  160. case "equal":
  161. ctrl = "==";
  162. break;
  163. }
  164. if(j == datas.length-1){
  165. if(datas.length == 1){
  166. BackGroundFont = "expr:" +colRef+" "+ctrl+ " '" + dataValue +"' ? '"+styleValue+"' : ''";
  167. }else{
  168. BackGroundFont += colRef+" "+ctrl+ " '" + dataValue +"' ? '"+styleValue+"' : ''";
  169. }
  170. //font += colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : ''";
  171. }else if(j == 0){
  172. BackGroundFont += "expr:" + colRef+" "+ctrl+ " '" + dataValue +"' ? '"+styleValue+"' : (";
  173. //font += "expr:" + colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : (";
  174. }else{
  175. BackGroundFont += colRef+" "+ctrl+ " '" + dataValue +"' ? '"+styleValue+"' : (";
  176. //font += colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : (";
  177. }
  178. if( j<datas.length-1)
  179. end += ")";
  180. }
  181. BackGroundFont += end;
  182. // font += end;
  183. // sysf_trace(BackGroundFont);
  184. // if ( fillflag == "B" ) {
  185. if(utlf_isNull(startCol))
  186. {
  187. startCol = 0;
  188. }
  189. for(var i=startCol; i<gridID.getCellCount("body");i++){
  190. if(gridID.getCellProperty("body",i,"celltype") == "head") continue;
  191. gridID.setCellProperty("body", i, "background" ,BackGroundFont);
  192. gridID.setCellProperty("body", i, "background2" ,BackGroundFont);
  193. }
  194. // gridID.setCellProperty("body", setCellIdx, "font" ,font);
  195. // } else if ( fillflag == "F" ) {
  196. // gridID.setCellProperty("body", setCellIdx, "color" ,BackGroundFont);
  197. // gridID.setCellProperty("body", setCellIdx, "color" ,BackGroundFont);
  198. // gridID.setCellProperty("body", setCellIdx, "font" ,font);
  199. // }
  200. }
  201. /****************************************************************************************
  202. * Argument : vGrdObj : 목적그리드
  203. * : vSrcXPath : 목적노드set
  204. * Description : Add PrcpMngt value check.
  205. ****************************************************************************************/
  206. function lf_aezfAddPrcpMngt(vGrdObj, vSrcXPath) {
  207. var objDs = eval(vGrdObj.binddataset);
  208. var i = objDs.rowposition;
  209. var pid = objDs.getColumn(i,"pid");
  210. var orddd = objDs.getColumn(i,"orddd");
  211. var cretno = objDs.getColumn(i,"cretno");
  212. var instcd = sysf_getUserInfo("dutplceinstcd");
  213. var ioflag = objDs.getColumn(i,"prcpgenrflag");
  214. var issdept = suppdeptcd;
  215. var menuparam = frmf_getMenuParam();
  216. var totalexecdeptcd = objDs.getColumn(i,"mrsmissdeptcd");
  217. if ( ioflag == "O" || ioflag == "S" ) ioflag = "O";
  218. else ioflag = "I";
  219. //집계부서가 있으면 추가처방시 집계부서를 아니면 suppdeptcd를 넘긴다
  220. if(totalexecdeptcd != "" && totalexecdeptcd!= null){
  221. issdept = totalexecdeptcd;
  222. }
  223. frmf_setParameter ( "SMMMO00200_pid", pid );
  224. frmf_setParameter ( "SMMMO00200_orddd", orddd);// ( orddd: 입원:입원일, 외래:수진일)
  225. frmf_setParameter ( "SMMMO00200_cretno", cretno );
  226. frmf_setParameter ( "SMMMO00200_instcd", instcd);
  227. frmf_setParameter ( "SMMMO00200_ioflag", ioflag );
  228. frmf_setParameter ( "SMMMO00200_issdept", issdept );
  229. if(menuparam == "PAM"){
  230. sysf_setGlobalVariable("menuparam", "PAM");
  231. }
  232. // var agument = { plgv_SMMMO00200_pid:pid
  233. // ,plgv_SMMMO00200_orddd:orddd
  234. // ,plgv_SMMMO00200_cretno:cretno
  235. // ,plgv_SMMMO00200_instcd:instcd
  236. // ,plgv_SMMMO00200_ioflag:ioflag
  237. // ,plgv_SMMMO00200_issdept:issdept };
  238. //frmf_modal("SMMMO00200", "SMMMO00200",agument, "", "", "", "", "", "", "", "", "", "M");
  239. frmf_modal("SMMMO00200", "SMMMO00200","", "", "", "", "", "", "", "", "", "", "M");
  240. }
  241. /************************************************************************************************
  242. **fCheckDup
  243. @param :
  244. * vGrdObj : grid control
  245. * vCheckVal : dup check 대상 값
  246. desc : grid dup value check.
  247. *************************************************************************************************/
  248. function lf_checkDup( vGrdObj, vCheckCol , vCheckVal ){
  249. var objDs = eval(vGrdObj.binddataset);
  250. var nFrow = objDs.findRow( vCheckCol, vCheckVal );
  251. if(nFrow > 0){
  252. return false;
  253. }
  254. }
  255. // /************************************************************************************************
  256. // * @group :
  257. // * @ver : 2007.12.12
  258. // * @by : 장준원
  259. // * @---------------------------------------------------
  260. // * @type : function
  261. // * @access : public
  262. // * @desc : OCR출력 과 출력 리스트 조회
  263. // * @return :
  264. // *************************************************************************************************/
  265. //
  266. // function aezfOcrListPrint(xpath, row1, colid1, colid2, colid3, colid4, colid5, colid6, colid7, colid8, colid9, colid10, colid11, colid12) {
  267. //
  268. // model.removeNodeset("/root/temp/para");
  269. //
  270. // model.makeValue("/root/temp/para/pid", model.getValue(xpath+"[" + row1 + "]/" + colid1 ) );
  271. // model.makeValue("/root/temp/para/orddd", model.getValue(xpath+"[" + row1 + "]/" + colid2 ) );
  272. // model.makeValue("/root/temp/para/orddeptcd", model.getValue(xpath+"[" + row1 + "]/" + colid3 ) );
  273. // model.makeValue("/root/temp/para/orddeptnm", model.getValue(xpath+"[" + row1 + "]/" + colid4 ) );
  274. // model.makeValue("/root/temp/para/orddrid", model.getValue(xpath+"[" + row1 + "]/" + colid5 ) );
  275. // model.makeValue("/root/temp/para/drnm", model.getValue(xpath+"[" + row1 + "]/" + colid6 ) );
  276. //
  277. // // I/ O /E만 받는다.
  278. // if ( colid7 == "S" ) colid7 = "O";
  279. // else if( colid7 == "D" ) colid7 = "I";
  280. // else colid7 = colid7;
  281. //
  282. // model.makeValue("/root/temp/para/ordtype", model.getValue(xpath+"[" + row1 + "]/" + colid7 ) );
  283. // model.makeValue("/root/temp/para/patnm", model.getValue(xpath+"[" + row1 + "]/" + colid8 ) );
  284. // model.makeValue("/root/temp/para/inroomcd", model.getValue(xpath+"[" + row1 + "]/" + colid9 ).getTrim() );
  285. // model.makeValue("/root/temp/para/rrgstno1", model.getValue(xpath+"[" + row1 + "]/" + colid10 ) );
  286. // model.makeValue("/root/temp/para/rrgstno2", model.getValue(xpath+"[" + row1 + "]/" + colid11 ) );
  287. // model.makeValue("/root/temp/para/cretno", model.getValue(xpath+"[" + row1 + "]/" + colid12 ) );
  288. //
  289. // model.refresh();
  290. //
  291. // modal("SMMRF02300", "", "200", "200", "SMMRF02300","/root/temp/para","/root/temp/para");
  292. //
  293. // }
  294. /************************************************************************************************
  295. * @group :
  296. * @ver : 2007.12.12
  297. * @by : 장준원
  298. * @---------------------------------------------------
  299. * @type : function
  300. * @access : public
  301. * @desc : OCR출력 과 출력 리스트 조회
  302. * @return :
  303. *************************************************************************************************/
  304. function lf_aezfOcrListPrint(gridId, row1, colid1, colid2, colid3, colid4, colid5, colid6, colid7, colid8, colid9, colid10, colid11, colid12) {
  305. //model.removeNodeset("/root/temp/para");
  306. var objDs = eval(gridId.binddataset);
  307. var pid = objDs.getColumn(row1,colid1);
  308. var orddd = objDs.getColumn(row1,colid2);
  309. var orddeptcd = objDs.getColumn(row1,colid3);
  310. var orddeptnm = objDs.getColumn(row1,colid4);
  311. var orddrid = objDs.getColumn(row1,colid5);
  312. var drnm = objDs.getColumn(row1,colid6);
  313. var ordtype = objDs.getColumn(row1,colid7);
  314. // I/ O /E만 받는다.
  315. if ( ordtype == "S" ) ordtype = "O";
  316. else if( ordtype == "D" ) ordtype = "I";
  317. else ordtype = ordtype;
  318. var patnm = objDs.getColumn(row1,colid8);
  319. var inroomcd = objDs.getColumn(row1,utlf_trim(colid9));
  320. var rrgstno1 = objDs.getColumn(row1,colid10);
  321. var rrgstno2 = objDs.getColumn(row1,colid11);
  322. var cretno = objDs.getColumn(row1,colid12);
  323. // var agument = {pid:pid
  324. // ,orddd:orddd
  325. // ,orddeptcd:orddeptcd
  326. // ,orddeptnm:orddeptnm
  327. // ,orddrid:orddrid
  328. // ,drnm:drnm
  329. // ,ordtype:ordtype
  330. // ,patnm:patnm
  331. // ,inroomcd:inroomcd
  332. // ,rrgstno1:rrgstno1
  333. // ,rrgstno2:rrgstno2
  334. // ,cretno:cretno};
  335. dsf_createDsRow("ds_temp_para", [
  336. {col:"pid", type:"STRING", size:256, val:pid}
  337. , {col:"orddd", type:"STRING", size:256, val:orddd}
  338. , {col:"orddeptcd", type:"STRING", size:256, val:orddeptcd}
  339. , {col:"orddeptnm", type:"STRING", size:256, val:orddeptnm}
  340. , {col:"orddrid", type:"STRING", size:256, val:orddrid}
  341. , {col:"drnm", type:"STRING", size:256, val:drnm}
  342. , {col:"ordtype", type:"STRING", size:256, val:ordtype}
  343. , {col:"patnm", type:"STRING", size:256, val:patnm}
  344. , {col:"inroomcd", type:"STRING", size:256, val:inroomcd}
  345. , {col:"rrgstno1", type:"STRING", size:256, val:rrgstno1}
  346. , {col:"rrgstno2", type:"STRING", size:256, val:rrgstno2}
  347. , {col:"cretno", type:"STRING", size:256, val:cretno}
  348. ]);
  349. var objArg = new Object();
  350. objArg.arg_ds_temp_para= ds_temp_para;
  351. //as-is:2020.03.17 수정
  352. //frmf_modal("SMMRF02300", "SMMRF02300", objArg, "", "", 200, 200, "", "", "", "", "", "M");
  353. frmf_modal("SPMRF04601", "SPMRF04601", objArg, "", "", 200, 200, "", "", "", "", "", "M");
  354. //modal("SMMRF02300", "", "200", "200", "SMMRF02300","/root/temp/para","/root/temp/para");
  355. }
  356. /**
  357. * Age Calculation =======================================================================================================================================
  358. */
  359. function lf_aezfgetFullAge(pResidentNo, pDate, pPosition)
  360. {
  361. if(isNaN(pResidentNo)) return -1;
  362. var pivotYY = "";
  363. var pivotMM = "";
  364. var pivotDD = "";
  365. var regYY = "";
  366. var regMM = "";
  367. var regDD = "";
  368. if(typeof(pDate) == "undefined" || pDate == "" || pDate == null) {
  369. var today = new Date();
  370. pivotYY = today.getYear();
  371. pivotMM = today.getMonth() + 1;
  372. pivotDD = today.getDate();
  373. } else {
  374. pivotYY = pDate.getYear();
  375. pivotMM = pDate.getMonth() + 1;
  376. pivotDD = pDate.getDate();
  377. }
  378. if(pResidentNo.length == 13 ){
  379. gender = pResidentNo.substr(6, 1);
  380. regYY = eval(pResidentNo.substr(0, 2));
  381. regMM = eval(pResidentNo.substr(2, 2));
  382. regDD = eval(pResidentNo.substr(4, 2));
  383. if(gender == '3' || gender == '4' || gender == '7' || gender == '8') {
  384. regYY += 2000;
  385. } else if(gender == '0' || gender == '9') {
  386. regYY += 1800;
  387. } else {
  388. regYY += 1900;
  389. }
  390. }else if(pResidentNo.length == 8 && utlf_isValidDateTime(pResidentNo, "YYYYMMDD")){
  391. regYY = eval(pResidentNo.substr(0, 4));
  392. regMM = eval(pResidentNo.substr(4, 2));
  393. regDD = eval(pResidentNo.substr(6, 2));
  394. }else{
  395. return -1;
  396. }
  397. var age = pivotYY - regYY;
  398. if(age > 0) {
  399. if(pivotMM == regMM) {
  400. if(pivotDD < regDD) {
  401. age -= 1;
  402. }
  403. } else if(pivotMM < regMM) {
  404. age -= 1;
  405. }
  406. }
  407. if ( pPosition == "M")
  408. {
  409. //12개월이하일때 계산
  410. if(age <= 0){
  411. if(pivotYY > regYY) {
  412. pivotMM += 12;
  413. }
  414. age = pivotMM - regMM ;
  415. if(pivotDD < regDD) {
  416. age -= 1;
  417. }
  418. age = "0."+age;
  419. }
  420. }
  421. return age;
  422. }
  423. /****************************************************************************************
  424. * Argument : N/A
  425. * Description : 팝업화면 오픈
  426. ****************************************************************************************/
  427. function lf_aezfPopUpModalessSample(displayid, maingridlistid) {
  428. var objDs = eval(maingridlistid.binddataset);
  429. if ( objDs.rowcount == 0 ) return;
  430. var row = maingridlistid.rowpositon;
  431. frmf_setParameter("opener_parameter_id",objDs.getColumn(row, "pid"));
  432. frmf_open(displayid,displayid,null, null, null, null, null, null, null, null, null, null, "M");
  433. }
  434. function lf_aezfPopUpRsrvSample(displayid, maingridlistid) {
  435. //if ( maingridlistid.row == 0 ) return;
  436. var objDs = eval(maingridlistid.binddataset);
  437. if ( objDs.rowcount == 0 ) return;
  438. //var pid = model.getValue(path+"[" + row + "]/pid");
  439. var pid = objDs.getColumn(objDs.rowposition,"pid");
  440. var suppdeptcd2 = suppdeptcd;
  441. var sflag = pid + "▦" + "A" + "▦" + suppdeptcd2;
  442. frmf_setParameter("opener_parameter_id", sflag);
  443. //alert(getParameter("opener_parameter_id"));
  444. //open(displayid, 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; min:hidden, max:hidden;");
  445. frmf_open(displayid, displayid,{sflag: sflag}, "", "", "", "", "", "", "", "", "", "M");
  446. //frmf_open
  447. }
  448. /************************************************************************************************
  449. * @group :
  450. * @ver : 2007.11.09
  451. * @by : 이상준
  452. * @---------------------------------------------------
  453. * @type : function
  454. * @access : public
  455. * @desc : 지정된 인스턴스를 삽입
  456. * @return :
  457. *************************************************************************************************/
  458. function lf_aezfInsertInstance(cdGroupID, codeName, codeID) {
  459. //model.refresh();
  460. // model.copyNode("/root/hidden/comcd",targetXpath);
  461. //
  462. // var nodelist = instance1.selectNodes("/root/hidden/comcd/"+cdGroupID);
  463. //
  464. // var newNode = instance1.createNode("element", cdGroupID, "");
  465. //
  466. // var childnode1 = instance1.createNode("element", "cdnm", "");
  467. // var childnode2 = instance1.createNode("element", "cdid", "");
  468. // newNode.appendChild(childnode1);
  469. // newNode.appendChild(childnode2);
  470. //
  471. // if (nodelist.length > 0)
  472. // {
  473. // //var currNode = root.hidden.comcd.insertBefore(newNode, nodelist.item(0));
  474. //
  475. // model.setValue("/root/hidden/comcd/"+cdGroupID+"[1]/cdnm", codeName);
  476. // model.setValue("/root/hidden/comcd/"+cdGroupID+"[1]/cdid", codeID);
  477. // }
  478. var dsNm = "ds_temp_"+cdGroupID;
  479. var rtn = this.all[dsNm];
  480. if (!rtn) {
  481. var nRow = rtn.addRow();
  482. rtn.setColumn(nRow,"cdnm",codeName);
  483. rtn.setColumn(nRow,"cdid",codeID);
  484. }
  485. }
  486. function lf_aezfGetSrchPatInfo(cond1, cond2, cond3, cond99, rtnXpath) {
  487. // model.makeValue ( "/root/send/cond1", cond1 );
  488. // model.makeValue ( "/root/send/cond2", cond2 );
  489. // model.makeValue ( "/root/send/cond3", cond3 );
  490. // model.makeValue ( "/root/send/cond99", cond99 );
  491. //
  492. // if (!submit ( "TRMMO02501",false )) {
  493. // model.resetInstanceNode (rtnXpath );
  494. // model.refresh();
  495. // return "0";
  496. // }else {
  497. // return "1";
  498. // }
  499. var sInDsName = dsf_createDsRow("ds_temp_req"
  500. , [{col: "cond1", val: cond1}
  501. , {col: "cond2", val: cond2}
  502. , {col: "cond3", val: cond3}
  503. , {col: "cond4", val: ""}
  504. , {col: "cond5", val: ""}
  505. , {col: "cond6", val: ""}
  506. , {col: "cond7", val: ""}
  507. , {col: "cond8", val: ""}
  508. , {col: "cond21", val: ""}
  509. , {col: "cond22", val: ""}
  510. , {col: "cond99", val: cond99}
  511. , {col: "scrnflag", val: ""}
  512. , {col: "addprcpyn", val: ""}
  513. , {col: "issdeptcd", val: ""}
  514. ]);
  515. // 서브밋호출
  516. tranf_submit({
  517. id: "TRMMO02501"
  518. , service: "prcpmngtapp.PrcpMngt"
  519. , method: "reqGetComnPatInfo"
  520. , inds : "req="+sInDsName
  521. , outds: "ds_data_patinfolist=patchosinfolist"
  522. , async: false
  523. });
  524. var rtn = this.all["ds_temp_req"];
  525. if(rtn) {
  526. var objDs = this.removeChild("ds_temp_req");
  527. delete objDs;
  528. objDs = null;
  529. }
  530. if(ds_data_patinfolist.rowcount == 0){
  531. return "0";
  532. }else{
  533. return "1";
  534. }
  535. }
  536. function lf_aezfTopMost(id,xPos,yPos,wid,ref,resultref,userProp) {
  537. var rtn = "";
  538. //body.disabled = true;
  539. if (userProp == null) {
  540. //userProp = "min:hidden;max:hidden;";
  541. var style = "min=false,max=false";
  542. } else {
  543. var style = "min=false,max=false";
  544. //userProp = "min:hidden;max:hidden;" + userProp;
  545. }
  546. var sURL = sysf_getScreenURL(id);
  547. ///model.makeValue(gvMyCBOnClosePath,onCloseEvent);
  548. //rtn = openInternal("modeless_topmost",id,"scn",monNo,xPos,yPos,wid,ref,resultref,userProp,prevPos);
  549. rtn = frmf_open("modeless_topmost",id,{userProp:userProp},null,xPos,yPos,null,null,style,userProp, "", "", "M");
  550. //frmf_openInternal
  551. //body.disabled = false;
  552. return rtn;
  553. }
  554. /************************************************************************************************
  555. * 간호일지 II 호출
  556. * 비처방기준
  557. * 20080923 , 장준원
  558. *************************************************************************************************/
  559. function lf_aezfGetNurseRecII(Xpath, Row, Gbn) {
  560. var objDs = Xpath;
  561. // trace(objDs.saveXML());
  562. // Gbn : 1 (Angio) , 2 (심도자) , 3 (CT)
  563. // var orddd = model.getValue(Xpath+"[" + Row + "]/orddd");
  564. // var cretno = model.getValue(Xpath+"[" + Row + "]/cretno");
  565. // var instcd = sysf_getUserInfo("dutplceinstcd");
  566. // var orddeptcd = model.getValue(Xpath+"[" + Row + "]/orddeptcd");
  567. // var orddrid = model.getValue(Xpath+"[" + Row + "]/orddrid");
  568. // var pid = model.getValue(Xpath+"[" + Row + "]/pid");
  569. // var hngnm = model.getValue(Xpath+"[" + Row + "]/patnm");
  570. // var age = model.getValue(Xpath+"[" + Row + "]/age");
  571. // var rrgstno1 = model.getValue(Xpath+"["+Row+"]/rrgstno1");
  572. // var rrgstno2 = model.getValue(Xpath+"["+Row+"]/rrgstno2");
  573. // if ( age == "" ) age = model.getValue(Xpath+"[" + Row + "]/age");
  574. // var ioflag = model.getValue(Xpath+"[" + Row + "]/prcpgenrflag");
  575. // var Baseparam = "recflag▦dutplaccd▦reclnkkey▩N▦019▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
  576. var orddd = objDs.getColumn(Row,"orddd");
  577. var cretno = objDs.getColumn(Row,"cretno");
  578. var instcd = sysf_getUserInfo("dutplceinstcd");
  579. var orddeptcd = objDs.getColumn(Row,"orddeptcd");
  580. var orddrid = objDs.getColumn(Row,"orddrid");
  581. var pid = objDs.getColumn(Row,"pid");
  582. var hngnm = objDs.getColumn(Row,"patnm");
  583. var rrgstno1 = objDs.getColumn(Row,"rrgstno1");
  584. var rrgstno2 = objDs.getColumn(Row,"rrgstno2");
  585. var age = lf_aezfgetFullAge(rrgstno1+rrgstno2);
  586. if ( age == "" ) age = objDs.getColumn(Row,"age");
  587. var ioflag = objDs.getColumn(Row,"prcpgenrflag");
  588. var Baseparam = "";
  589. if ( Gbn == "1" ) Baseparam = "recflag▦dutplaccd▦reclnkkey▩N▦019▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
  590. if ( Gbn == "2" ) Baseparam = "recflag▦dutplaccd▦reclnkkey▩Q▦020▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
  591. if ( Gbn == "3" ) Baseparam = "recflag▦dutplaccd▦reclnkkey▩N▦025▦" + pid + "," + orddd + "," + cretno +"," + instcd + "," + orddeptcd + "▩";
  592. var ASTparam = "pid ▦ instcd ▦ hngnm ▦ age ▦ orddd ▦ cretno ▦ ioflag ▦ orddeptcd ▦ orddrid ▩" + pid + "▦" + instcd + "▦" + hngnm + "▦" + age + "▦" + orddd + "▦" + cretno+ "▦" + ioflag + "▦" + orddeptcd + "▦" + orddrid + "▩";
  593. // alert('Baseparam->'+Baseparam);
  594. // alert('ASTparam->'+ASTparam);
  595. //setParameter("SMMNR03400_ParamBase", Baseparam);
  596. //setParameter("SMMNR03400_AST", ASTparam );
  597. frmf_setParameter("SMMNR03400_ParamBase", Baseparam);
  598. frmf_setParameter("SMMNR03400_AST", ASTparam );
  599. //modal("SMMNR03400");
  600. var arrList = this.getOwnerFrame().all;
  601. if(arrList["SMMNR03400"] == null)
  602. {
  603. var xpt = 300;
  604. var ypt = 0;
  605. lf_aezfTopMost("SMMNR03400",xpt,ypt,"SMMNR03400","","","",0,0);
  606. }else {
  607. var popupObj = arrList["SMMNR03400"];
  608. popupObj.form.reload();
  609. // window.children.item("SMMNR03400").model.refresh();
  610. // window.children.item("SMMNR03400").model.dispatch("xforms-ready");
  611. }
  612. }
  613. /************************************************************************************************
  614. 함수명 : lf_aezfSetRowStyle ()
  615. 인자 :
  616. String gridID - 그리드 아이디
  617. String styleFlag - 컬러 인덱스
  618. String data - 데이터 값
  619. Srting colRef - 비교할 컬럼 Ref
  620. String [control] - 조건 smaller | smallerThen | equal | biggerThen | bigger | equalBold
  621. 결과값 :
  622. 함수설명 : 그리드 특정 컬럼값을 비교하여 로우 글씨컬러 및 폰트bold 변경
  623. * 사용예) lf_aezfSetFontRowStyle(Grid00 , "0^5" , "3^5" , "Column1" , "equalBold^small");
  624. ************************************************************************************************/
  625. function lf_aezfSetFontRowStyle( gridID , styleFlag , data , colRef , control ) {
  626. // var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" ,
  627. // "blue" ,
  628. // "#c8e67b" ,
  629. // "green" ,
  630. // "#ff9933" ,
  631. // "red" ,
  632. // "#9999cc",
  633. // "#5A5A5A",
  634. // "#000000"
  635. // );
  636. //
  637. // var styleFlags = styleFlag.split("^");
  638. // var datas = data.split("^");
  639. //
  640. // if( control == null || control == "" )
  641. // control = "equal";
  642. //
  643. // var controls = control.split("^");
  644. //
  645. // gridObj = document.all(gridID);
  646. //
  647. // gridObj.backcoloralternate = "transparent";
  648. //
  649. // for( var j = 0 ; j < datas.length ; j++ ) {
  650. //
  651. // var dataValue = datas[j];
  652. // var styleValue = style[styleFlags[j]];
  653. //
  654. // for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
  655. //
  656. // if(controls[j] == null)
  657. // controls[j] = "equal";
  658. //
  659. // switch( controls[j] ) {
  660. // case "small":
  661. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) < dataValue ) {
  662. //
  663. // gridObj.rowstyle( i , "data" , "color" ) = styleValue;
  664. // // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
  665. // }
  666. // break;
  667. // case "smallThen":
  668. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) <= dataValue ) {
  669. //
  670. // gridObj.rowstyle( i , "data" , "color" ) = styleValue;
  671. // // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
  672. // }
  673. // break;
  674. // case "bigger":
  675. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) > dataValue ) {
  676. //
  677. // gridObj.rowstyle( i , "data" , "color" ) = styleValue;
  678. // // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
  679. // }
  680. // break;
  681. // case "biggerThen":
  682. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) >= dataValue ) {
  683. //
  684. // gridObj.rowstyle( i , "data" , "color" ) = styleValue;
  685. // // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
  686. // }
  687. // break;
  688. // /*
  689. // case "notEqual":
  690. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) != dataValue ) {
  691. //
  692. // gridObj.rowstyle( i , "data" , "background-color" ) = styleValue;
  693. // }
  694. // break;
  695. // */
  696. // case "equalBold":
  697. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
  698. // gridObj.rowstyle( i , "data" , "color" ) = styleValue;
  699. // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
  700. // }
  701. // case "equal":
  702. // if( gridObj.labelMatrix(i , gridObj.colRef(colRef)) == dataValue ) {
  703. // gridObj.rowstyle( i , "data" , "color" ) = styleValue;
  704. // // gridObj.rowstyle( i , "data" , "font-weight" ) = "bold";
  705. // }
  706. // break;
  707. // }
  708. // }
  709. // }
  710. //
  711. var fillStyle = "";
  712. var style = new Array("#fcd2c1" , "#ffe79d" , "#f3e1bf" , "#7BE6B7" , "#b9e5fb" , "#f7a08b" , "#fec34d" ,
  713. "blue" ,
  714. "#c8e67b" ,
  715. "green" ,
  716. "#ff9933" ,
  717. "red" ,
  718. "#9999cc",
  719. "#5A5A5A",
  720. "#000000"
  721. );
  722. var styleFlags = styleFlag.split("^");
  723. var datas = data.split("^");
  724. if( control == null || control == "" )
  725. control = "equal";
  726. var controls = control.split("^");
  727. var BackGroundFont = "";
  728. var end = "";
  729. var endBold = "";
  730. var boldFont = "";
  731. var fontCnt = 0;
  732. for( var j = 0 ; j < datas.length ; j++ ) {
  733. var dataValue = datas[j];
  734. var styleValue = style[styleFlags[j]];
  735. var bold = false;
  736. if(controls[j] == null)
  737. controls[j] = "equal";
  738. var ctrl = "";
  739. switch( controls[j] ) {
  740. case "small":
  741. ctrl = "<";
  742. break;
  743. case "smallThen":
  744. ctrl = "<=";
  745. break;
  746. case "bigger":
  747. ctrl = ">";
  748. break;
  749. case "biggerThen":
  750. ctrl = ">=";
  751. break;
  752. case "equal":
  753. ctrl = "==";
  754. break;
  755. case "equalBold":
  756. ctrl = "==";
  757. bold = true;
  758. break;
  759. }
  760. if(j == datas.length-1){
  761. if(datas.length == 1){
  762. BackGroundFont = "expr:" +colRef+" "+ctrl+ " " + dataValue +" ? '"+styleValue+"' : ''";
  763. if(bold){
  764. boldFont = "expr:" +colRef+" "+ctrl+ " " + dataValue +" ? 'Dotum,9,bold' : 'Dotum,9'";
  765. fontCnt++;
  766. }
  767. }else{
  768. BackGroundFont += colRef+" "+ctrl+ " " + dataValue +" ? '"+styleValue+"' : ''";
  769. if(bold){
  770. if(fontCnt > 0){
  771. boldFont += colRef+" "+ctrl+ " " + dataValue +" ? 'Dotum,9,bold' : 'Dotum,9'";
  772. fontCnt++;
  773. }else{
  774. boldFont = "expr:" + colRef+" "+ctrl+ " " + dataValue +" ? 'Dotum,9,bold' : 'Dotum,9'";
  775. fontCnt++;
  776. }
  777. }
  778. }
  779. //font += colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : ''";
  780. }else if(j == 0){
  781. BackGroundFont += "expr:" + colRef+" "+ctrl+ " " + dataValue +" ? '"+styleValue+"' : (";
  782. //font += "expr:" + colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : (";
  783. if(bold){
  784. boldFont += "expr:" + colRef+" "+ctrl+ " " + dataValue +" ? 'Dotum,9,bold' : (";
  785. fontCnt++
  786. }
  787. }else{
  788. BackGroundFont += colRef+" "+ctrl+ " " + dataValue +" ? '"+styleValue+"' : (";
  789. if(bold){
  790. if(fontCnt == 0){
  791. boldFont += "expr:" + colRef+" "+ctrl+ " " + dataValue +" ? 'Dotum,9,bold' : (";
  792. fontCnt++;
  793. }else{
  794. boldFont += colRef+" "+ctrl+ " " + dataValue +" ? 'Dotum,9,bold' : (";
  795. fontCnt++;
  796. }
  797. }
  798. //font += colRef+" == '" + dataValue +"' ? 'Dotum,9,bold' : (";
  799. }
  800. if(bold && fontCnt>1) endBold += ")";
  801. if( j<datas.length-1) end += ")";
  802. }
  803. if(fontCnt == 1){
  804. boldFont = boldFont.replace("(","'Dotum,9'");
  805. }
  806. BackGroundFont += end;
  807. boldFont += endBold;
  808. // font += end;
  809. // trace(BackGroundFont);
  810. // if ( fillflag == "B" ) {
  811. for(var i=0; i<gridID.getCellCount("body");i++){
  812. gridID.setCellProperty("body", i, "color" ,BackGroundFont);
  813. gridID.setCellProperty("body", i, "color2" ,BackGroundFont);
  814. gridID.setCellProperty("body", i, "font" ,boldFont);
  815. }
  816. // gridID.setCellProperty("body", setCellIdx, "font" ,font);
  817. // } else if ( fillflag == "F" ) {
  818. // gridID.setCellProperty("body", setCellIdx, "color" ,BackGroundFont);
  819. // gridID.setCellProperty("body", setCellIdx, "color" ,BackGroundFont);
  820. // gridID.setCellProperty("body", setCellIdx, "font" ,font);
  821. // }
  822. }
  823. /************************************************************************************************
  824. *
  825. * aezfGridSetColor
  826. @param
  827. * path : 목적그리드
  828. * chkcol : 목적ColRef
  829. * chkval : 비교value
  830. * imagename : ImageName
  831. * desc : Background Image check.
  832. *************************************************************************************************/
  833. function lf_aezfGridSetColor(chkcol, chkval, imagename ) {
  834. //alert('IN');
  835. // var srchLength1 = model.instances(0).selectNodes( path ).length;
  836. // for ( var i = 1; i <= srchLength1; i++ ) {
  837. // if ( model.getValue ( path+"["+ i +"]/"+chkcol ) == chkval ) {
  838. // grd_subresultdetail1.rowstyle(i, "data", "background-image") = "../../../com/commonweb/images/"+imagename;
  839. // grd_subresultdetail1.rowstyle(i, "data", "background-repeat") = "repeat-x";
  840. // //grd_subresultdetail1.rowstyle(i, "data", "text-align") = "center";
  841. // } else {
  842. // grd_subresultdetail1.rowstyle(i, "data", "background-image") = "";
  843. // //grd_subresultdetail1.rowstyle(i, "data", "text-align") = "left";
  844. // }
  845. // }
  846. var expr ="";
  847. expr = 'expr:'+chkcol+' == chkval ? "IMG::'+imagename+' repeat-x" : ""';
  848. for(var i=0; i< grd_subresultdetail1.getCellCount("body");i++){
  849. grd_subresultdetail1.setCellProperty("body",i,"background",expr);
  850. grd_subresultdetail1.setCellProperty("body",i,"background2",expr);
  851. }
  852. }
  853. /*
  854. 그리드 row 삭제 (선택된 row)
  855. grdObj : 대상그리드
  856. 그리드 row의 내용이 수정되면 상태값이 1 > 3으로 변경되어 row 삭제가 불가능한 현상 반영
  857. -그리드를 update상태로 변경후 삭제를하면 6상태로 변경됨
  858. 2013 05 16 이창기
  859. */
  860. function lf_aSTDeleteSelectedRows(grdObj){
  861. // for(var i = grdObj.fixedRows ; i < grdObj.rows ; i++){
  862. // if(grdObj.isSelected(i) == true && grdObj.rowStatus(i) == 3){
  863. // grdObj.rowStatus(i) = 1;
  864. // }
  865. // else if(grdObj.isSelected(i) == true && grdObj.rowStatus(i) == 6){
  866. // grdObj.rowStatus(i) = 4;
  867. // }
  868. // }
  869. dsf_deleteSelectedRows(grdObj, true);
  870. }
  871. /************************************************************************************************
  872. * @group :
  873. * @ver : 2007.12.12
  874. * @by : 장준원
  875. * @---------------------------------------------------
  876. * @type : function
  877. * @access : public
  878. * @param
  879. * baseXpath : Send Instance (검색조건)
  880. * rtnXpath : Return Instance (Userid+Usernm, 등등)
  881. * copyXpath : Return Copy Instance (Userid)
  882. * copyXpath2 : Return Copy Instance (Usernm, 등등)
  883. * @desc : 사용자정보 팝업창 호출
  884. * @return :
  885. *************************************************************************************************/
  886. function lf_aezfCommUserInfoList( rtnXpath, copyXpath, copyXpath2) {
  887. //var usrb_usrid = model.getValue(copyXpath);
  888. var usrb_usrid = copyXpath;
  889. if (usrb_usrid == null || usrb_usrid == "" || usrb_usrid == " ") {
  890. sysf_messageBox("사용자번호가 입력되지","E007");
  891. //model.setValue( copyXpath, "");
  892. //model.setValue( copyXpath2, "");
  893. //model.refresh();
  894. copyXpath = "";
  895. copyXpath2 = "";
  896. return false;
  897. }else {
  898. // model.resetInstanceNode(baseXpath); // Instance 초기화
  899. // model.removeNodeset(rtnXpath+"/list"); // Instance 초기화
  900. //model.setValue(baseXpath+"/param", "_OneS"); // 사용자 한 명만을 검색하기 위한 파라미터 설정
  901. //modal("SPZSU10103", "", "200", "200", "SPZSU10103", baseXpath, "/root/main/temp");
  902. var objDs = eval(rtnXpath.binddataset);
  903. var agument = {param:"_OneS"};
  904. var rtn = frmf_modal("SPZSU10103", "SPZSU10103",agument, "", "", "", "", "", "", "", "", "", "M");
  905. //var iParam = getParameter("SPZSU10103_");
  906. //setCSVToNode(rtnXpath, iParam);
  907. objDs.copyData(rtn);
  908. grdf_exportCsv(rtnXpath,"SPZSU10103_");
  909. //clearParameter("SPZSU10103_");
  910. // model.setValue( copyXpath, model.getValue(rtnXpath+"/list/userid") ); // 사용자 ID
  911. // model.setValue( copyXpath2, model.getValue(rtnXpath+"/list/usernm") ); // 사용자 이름+등등
  912. //
  913. // model.refresh();
  914. copyXpath = objDs.getColumn(0,"userid");
  915. copyXpath2 = objDs.getColumn(0,"usernm");
  916. }
  917. }
  918. /**
  919. * 처방마스터 대상그리드 set=======================================================================================================================================
  920. * vGrdObj : 대상그리드
  921. * vSrcXPath : 목적노드set
  922. * vDupCheckCo : dup check column no
  923. * vDupCheck : dup check yn
  924. * vCodeNode : 수가코드 목적 노드
  925. * vNameNode : 수가처방명 목적 노드
  926. * vHeaderAddRows : header row default값(1) 보다 큰 row수
  927. */
  928. function lf_setPrcpcd(vGrdObj, vSrcXPath, vDupCheckCol, vDupCheck, vCodeNode, vNameNode, vSessiondept ) {
  929. if(utlf_isNull(vGrdObj)) return ;
  930. if(utlf_isNull(vSrcXPath)) return ;
  931. if(ds_temp.getColumn(0,"okflag") != "ok" ) return ;
  932. // var cnt = getNodesetCount(vSrcXPath);
  933. //
  934. // var grdcnt = vGrdObj.rows;
  935. // if( vHeaderAddRows != "" ){
  936. // grdcnt =parseInt( vGrdObj.rows) - parseInt( vHeaderAddRows ) ;
  937. // }
  938. var objDs = eval(vGrdObj.binddataset);
  939. var rowCnt = objDs.rowcount;
  940. var vDupCheckVal = "";
  941. var i = 0;
  942. if( rowCnt == 1 ) {
  943. //vDupCheckVal = model.getValue(vSrcXPath + "/prcpcd" );
  944. vDupCheckVal = utlf_transNullToEmpty(objects[vSrcXPath].getColumn(0,"prcpcd"));
  945. if( vDupCheck == "Y" ) {
  946. if( lf_checkDup(vGrdObj , vDupCheckCol, vDupCheckVal ) == false ){
  947. if( sysf_messageBox("중복되는 수가코드[" + vDupCheckVal + "] 를 추가", "S001") != 6 ){
  948. return ;
  949. }
  950. }
  951. }
  952. var nRow = objDs.addRow();
  953. //그리드 상태보여주기
  954. grdf_setRowTypeIcon(vGrdObj, 0)
  955. //vGrdObj.cellStyle("background-image", vGrdObj.rows-1, 1) = "../../../com/commonweb/images/icon_i.gif";
  956. if( !utlf_isNull(vCodeNode) ){
  957. model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vCodeNode , vDupCheckVal );
  958. objDs.setColumn(nRow, vCodeNode,vDupCheckVal);
  959. }
  960. if( !utlf_isNull(vNameNode) ){
  961. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vNameNode , model.getValue(vSrcXPath + "/ordnm" ) );
  962. objDs.setColumn(nRow, vNameNode,objects[vSrcXPath].getColumn(0,"ordnm"));
  963. }
  964. // model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" );
  965. // model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" , vDupCheckVal );
  966. objDs.setColumn(nRow, "excucd",vDupCheckVal);
  967. //model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" );
  968. //처방명 P 한글명 H 영문명 E 선택한 값이 들어가도록 2013 06 10 윤범섭
  969. //if(model.getValue(vSrcXPath + "/prcpflag" )=="P")
  970. if(objects[vSrcXPath].getColumn(0,"prcpflag")=="P")
  971. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/prcpnm" ) );
  972. objDs.setColumn(nRow, "excucdnm",objects[vSrcXPath].getColumn(0,"prcpnm"));
  973. //if(model.getValue(vSrcXPath + "/prcpflag" )=="H")
  974. if(objects[vSrcXPath].getColumn(0,"prcpflag")=="H")
  975. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/hngnm" ) );
  976. objDs.setColumn(nRow, "excucdnm",objects[vSrcXPath].getColumn(0,"hngnm"));
  977. //if(model.getValue(vSrcXPath + "/prcpflag" )=="E")
  978. if(objects[vSrcXPath].getColumn(0,"prcpflag")=="E")
  979. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/engnm" ) );
  980. objDs.setColumn(nRow, "excucdnm",objects[vSrcXPath].getColumn(0,"engnm"));
  981. //model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" );
  982. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" , vSessiondept );
  983. objDs.setColumn(nRow, "basesuppdeptcd",vSessiondept);
  984. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutodd" , '99991231' );
  985. objDs.setColumn(nRow, "excutodd",'99991231' );
  986. // 외래시행부서 O 입원시행부서 I
  987. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  988. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="O")
  989. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  990. objDs.setColumn(nRow, "prcpexecdeptcd",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  991. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="I")
  992. //if(vSrcXPath.getColumn(0,"execdeptflag")=="I")
  993. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  994. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  995. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="O")
  996. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  997. objDs.setColumn(nRow, "prcpexecdeptcd1",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  998. if(objects[vSrcXPath].getColumn(0,"execdeptflag" )=="I")
  999. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="I")
  1000. objDs.setColumn(nRow, "prcpexecdeptcd",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1001. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  1002. objDs.setColumn(nRow, "prcpexecdeptcd",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1003. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn" , "Y" );
  1004. objDs.setColumn(nRow, "anotestyn","Y");
  1005. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0" );
  1006. objDs.setColumn(nRow, "rsrvupdtcncllimdayno","0");
  1007. // 2010.11.19 c y w 검사코드 추가시 기본값셋팅
  1008. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excuclscd", "-");
  1009. objDs.setColumn(nRow, "excuclscd","-");
  1010. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/eqmtifyn", "N");
  1011. objDs.setColumn(nRow, "eqmtifyn","N");
  1012. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/readdrid3nm", "-");
  1013. objDs.setColumn(nRow, "readdrid3nm","-");
  1014. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispyn", "Y");
  1015. objDs.setColumn(nRow, "rsltdispyn","Y");
  1016. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispgbn", model.getValue(vSrcXPath + "/rsltdispgbn" ) );
  1017. objDs.setColumn(nRow, "rsltdispgbn",objects[vSrcXPath].getColumn(0,"rsltdispgbn"));
  1018. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/partcntstats", "1");
  1019. objDs.setColumn(nRow, "partcntstats","1");
  1020. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/phocntstats", "1");
  1021. objDs.setColumn(nRow, "phocntstats","1");
  1022. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/curetims", "1");
  1023. objDs.setColumn(nRow, "curetims","1");
  1024. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexcupossyn", "Y");
  1025. objDs.setColumn(nRow, "rsrvexcupossyn","Y");
  1026. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvplceflag", "2");
  1027. objDs.setColumn(nRow, "rsrvplceflag","2");
  1028. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutm", "0");
  1029. objDs.setColumn(nRow, "excutm","0");
  1030. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvmultitmplcd", "-");
  1031. objDs.setColumn(nRow, "rsrvmultitmplcd","-");
  1032. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexmpcnt", "1");
  1033. objDs.setColumn(nRow, "rsrvexmpcnt","1");
  1034. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0");
  1035. objDs.setColumn(nRow, "rsrvupdtcncllimdayno","0");
  1036. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/pacsnocretyn", "N");
  1037. objDs.setColumn(nRow, "pacsnocretyn","N");
  1038. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/etceqmtifyn", "-");
  1039. objDs.setColumn(nRow, "etceqmtifyn","-");
  1040. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn", "Y");
  1041. objDs.setColumn(nRow, "anotestyn","Y");
  1042. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  1043. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="O")
  1044. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  1045. objDs.setColumn(nRow, "prcpexecdeptcd",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  1046. objDs.setColumn(nRow, "prcpexecdeptcd1",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  1047. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="I")
  1048. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="I")
  1049. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  1050. objDs.setColumn(nRow, "prcpexecdeptcd",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1051. objDs.setColumn(nRow, "prcpexecdeptcd1",objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1052. // if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  1053. // model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  1054. // if(model.getValue(vSrcXPath + "/execdeptflag" )=="I")
  1055. // model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  1056. }
  1057. else {
  1058. for( var i = 0 ; i < rowCnt ; i++ ){
  1059. //vDupCheckVal = model.getValue(vSrcXPath + "[" + i + "]/prcpcd" );
  1060. vDupCheckVal = utlf_transNullToEmpty(objects[vSrcXPath].getColumn(i,"prcpcd"));
  1061. if( vDupCheck == "Y" ) {
  1062. if( lf_checkDup(vGrdObj , vDupCheckCol, vDupCheckVal ) == false ){
  1063. if( sysf_messageBox("중복되는 수가코드[" + vDupCheckVal + "] 를 추가", "S001") != 6 ){
  1064. continue ;
  1065. }
  1066. }
  1067. }
  1068. //vGrdObj.addRow();
  1069. var nRow = objDs.addRow();
  1070. if( !utlf_isNull(vCodeNode) ){
  1071. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vCodeNode , vDupCheckVal );
  1072. objDs.setColumn(nRow, vCodeNode, vDupCheckVal);
  1073. }
  1074. if( !utlf_isNull(vNameNode) ){
  1075. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/" + vNameNode , model.getValue(vSrcXPath + "[" + i + "]/prcpnm" ) );
  1076. objDs.setColumn(nRow, vNameNode, objects[vSrcXPath].getColumn(i,"prcpnm"));
  1077. }
  1078. // model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" );
  1079. // model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucd" , vDupCheckVal );
  1080. objDs.setColumn(nRow, "excucd", vDupCheckVal);
  1081. // model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" );
  1082. //처방명 P 한글명 H 영문명 E 선택한 값이 들어가도록 2013 06 10 윤범섭
  1083. //if(model.getValue(vSrcXPath + "/prcpflag" )=="P")
  1084. if(objects[vSrcXPath].getColumn(0,"prcpflag")=="P")
  1085. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/prcpnm" ) );
  1086. objDs.setColumn(nRow, "excucdnm",objects[vSrcXPath].getColumn(0,"prcpnm"));
  1087. //if(model.getValue(vSrcXPath + "/prcpflag" )=="H")
  1088. if(objects[vSrcXPath].getColumn(0,"prcpflag")=="H")
  1089. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/hngnm" ) );
  1090. objDs.setColumn(nRow, "excucdnm",objects[vSrcXPath].getColumn(0,"hngnm"));
  1091. //if(model.getValue(vSrcXPath + "/prcpflag" )=="E")
  1092. if(objects[vSrcXPath].getColumn(0,"prcpflag")=="E")
  1093. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excucdnm" , model.getValue(vSrcXPath + "/engnm" ) );
  1094. objDs.setColumn(nRow, "excucdnm",objects[vSrcXPath].getColumn(0,"engnm"));
  1095. //model.makeNode(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" );
  1096. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/basesuppdeptcd" , vSessiondept );
  1097. objDs.setColumn(nRow, "basesuppdeptcd", vSessiondept);
  1098. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutodd" , '99991231' );
  1099. objDs.setColumn(nRow, "excutodd", '99991231');
  1100. // 외래시행부서 O 입원시행부서 I
  1101. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  1102. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="O")
  1103. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  1104. objDs.setColumn(nRow, "prcpexecdeptcd", objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  1105. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="I")
  1106. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="I")
  1107. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  1108. objDs.setColumn(nRow, "prcpexecdeptcd", objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1109. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn" , "Y" );
  1110. objDs.setColumn(nRow, "anotestyn", "Y");
  1111. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0" );
  1112. objDs.setColumn(nRow, "rsrvupdtcncllimdayno", "0");
  1113. // 2010.11.19 c y w 검사코드 추가시 기본값셋팅
  1114. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excuclscd", "-");
  1115. objDs.setColumn(nRow, "excuclscd", "-");
  1116. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/eqmtifyn", "N");
  1117. objDs.setColumn(nRow, "eqmtifyn", "N");
  1118. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/readdrid3nm", "-");
  1119. objDs.setColumn(nRow, "readdrid3nm", "-");
  1120. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispyn", "Y");
  1121. objDs.setColumn(nRow, "rsltdispyn", "Y");
  1122. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsltdispgbn", model.getValue(vSrcXPath + "/rsltdispgbn" ) );
  1123. objDs.setColumn(nRow, "rsltdispgbn", objects[vSrcXPath].getColumn(0,"rsltdispgbn"));
  1124. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/partcntstats", "1");
  1125. objDs.setColumn(nRow, "partcntstats", "1");
  1126. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/phocntstats", "1");
  1127. objDs.setColumn(nRow, "phocntstats", "1");
  1128. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/curetims", "1");
  1129. objDs.setColumn(nRow, "curetims", "1");
  1130. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexcupossyn", "Y");
  1131. objDs.setColumn(nRow, "rsrvexcupossyn", "Y");
  1132. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvplceflag", "2");
  1133. objDs.setColumn(nRow, "rsrvplceflag", "2");
  1134. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/excutm", "0");
  1135. objDs.setColumn(nRow, "excutm", "0");
  1136. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvmultitmplcd", "-");
  1137. objDs.setColumn(nRow, "rsrvmultitmplcd", "-");
  1138. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvexmpcnt", "1");
  1139. objDs.setColumn(nRow, "rsrvexmpcnt", "1");
  1140. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/rsrvupdtcncllimdayno", "0");
  1141. objDs.setColumn(nRow, "rsrvupdtcncllimdayno", "0");
  1142. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/pacsnocretyn", "N");
  1143. objDs.setColumn(nRow, "pacsnocretyn", "N");
  1144. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/etceqmtifyn", "-");
  1145. objDs.setColumn(nRow, "etceqmtifyn", "-");
  1146. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/anotestyn", "Y");
  1147. objDs.setColumn(nRow, "anotestyn", "Y");
  1148. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  1149. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="O")
  1150. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  1151. objDs.setColumn(nRow, "prcpexecdeptcd", objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  1152. objDs.setColumn(nRow, "prcpexecdeptcd1", objects[vSrcXPath].getColumn(0,"prcpexecdeptcd"));
  1153. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="I")
  1154. if(objects[vSrcXPath].getColumn(0,"execdeptflag")=="I")
  1155. //model.setValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  1156. objDs.setColumn(nRow, "prcpexecdeptcd", objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1157. objDs.setColumn(nRow, "prcpexecdeptcd1", objects[vSrcXPath].getColumn(0,"prcpexecdeptcd2"));
  1158. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="O")
  1159. //if(vSrcXPath.getColumn(0,"execdeptflag")=="O")
  1160. //model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd" ) );
  1161. //if(model.getValue(vSrcXPath + "/execdeptflag" )=="I")
  1162. //if(vSrcXPath.getColumn(0,"execdeptflag")=="I")
  1163. //model.makeValue(vGrdObj.nodeset + "[" + grdcnt + "]/prcpexecdeptcd1" , model.getValue(vSrcXPath + "/prcpexecdeptcd2" ) );
  1164. //grdcnt++;
  1165. }
  1166. }
  1167. }
  1168. /*
  1169. 그리드 tab 세로이동 2013 04 19 이창기
  1170. 그리드 이벤트 : onnext
  1171. */
  1172. var onselectchangedIdx = -1;
  1173. function lf_gridTabHMove(gridObj){
  1174. // event.preventDefault();
  1175. // event.defaultAction = "cancel";
  1176. // if(e.keycode == 9){ //tab
  1177. // // gridObj.row = gridObj.row +1;
  1178. // // /*
  1179. // // if(gridObj.row == (gridObj.rows - 1)){
  1180. // // alert("");
  1181. // // gridObj.col = gridObj.col+1;
  1182. // // gridObj.row = gridObj.fixedRows;
  1183. // // }
  1184. // // */
  1185. // trace("tab");
  1186. // }
  1187. // var objDs = eval(gridObj.binddataset);
  1188. // trace(objDs.rowposition);
  1189. onselectchangedIdx = gridObj.onselectchanged.addHandler(lf_grid_onselectchanged);
  1190. var nIndex = gridObj.onkeyup.addHandler(
  1191. function (obj:Grid, e:KeyEventInfo){
  1192. var nKeycode = e.keycode;
  1193. if(nKeycode == 37){ //방향키 왼쪽
  1194. if(onselectchangedIdx != -1) obj.onselectchanged.removeHandler(lf_grid_onselectchanged);
  1195. var bSuccess = obj.moveToPrevCell();
  1196. obj.showEditor(true);
  1197. onselectchangedIdx = obj.onselectchanged.addHandler(lf_grid_onselectchanged);
  1198. }else if(nKeycode == 39){ //방향키 오른쪽
  1199. if(onselectchangedIdx != -1) obj.onselectchanged.removeHandler(lf_grid_onselectchanged);
  1200. var bSuccess = obj.moveToNextCell();
  1201. obj.showEditor(true);
  1202. onselectchangedIdx = obj.onselectchanged.addHandler(lf_grid_onselectchanged);
  1203. }else if(nKeycode == 40){ //방향키 위
  1204. if(onselectchangedIdx != -1) obj.onselectchanged.removeHandler(lf_grid_onselectchanged);
  1205. obj.showEditor(true);
  1206. onselectchangedIdx = obj.onselectchanged.addHandler(lf_grid_onselectchanged);
  1207. }else if(nKeycode == 38){ //방향키 아래
  1208. if(onselectchangedIdx != -1) obj.onselectchanged.removeHandler(lf_grid_onselectchanged);
  1209. obj.showEditor(true);
  1210. onselectchangedIdx = obj.onselectchanged.addHandler(lf_grid_onselectchanged);
  1211. }else{
  1212. }
  1213. }
  1214. );
  1215. }
  1216. function lf_grid_onselectchanged(obj:Grid, e:GridSelectEventInfo){
  1217. obj.setCellPos(e.oldcell);
  1218. }
  1219. /* @group : Popup 공통 1
  1220. * @ver : 2007.06.14
  1221. * @by : 장준원
  1222. * @-----------------------------------
  1223. * @type : function
  1224. * @access : public
  1225. * @desc : Popup Sample
  1226. */
  1227. function lf_aezfPopUpSample(displayid, maingridlistid, targetpath) {
  1228. // if ( maingridlistid.row == 0 ) return;
  1229. // var row = maingridlistid.row;
  1230. var objBindDs = eval(maingridlistid.binddataset);
  1231. if(objBindDs.rowcount == 0) return;
  1232. var objDs = new Dataset;
  1233. objDs.name = "ds_temp_paramDs";
  1234. this.addChild(objDsNm, objDs);
  1235. objDs.copyData(objBindDs);
  1236. objDs.clearData();
  1237. objDs.addRow();
  1238. objDs.copyRow(0,objBindDs,objBindDs.rowposition);
  1239. //modal
  1240. //modal(displayid,"","","","",path+"[" + row + "]/pid", targetpath);
  1241. var agument = {targetpath:objDs};
  1242. var rtn = frmf_modal(displayid, displayid,agument, "", "", "", "", "", "", "", "", "", "M");
  1243. var rtn = this.all["ds_temp_paramDs"];
  1244. if(rtn) {
  1245. var objDs = this.removeChild("ds_temp_paramDs");
  1246. delete objDs;
  1247. objDs = null;
  1248. }
  1249. }
  1250. /*그리드에서 같은 글자는 merge하도록 하는 함수
  1251. grid : 그리드 ID , cols: 그리드 전체 컬럼 수
  1252. %타이틀 변경전에 선언되어야 합니다.%
  1253. grid.userdata = datagrid1.getFormatString();
  1254. grid.formats = datagrid1.userdata;*/
  1255. function grdTitleMerge(grid){
  1256. var headCols = grid.getCellCount("body");
  1257. var headCells = grid.getCellCount("head");
  1258. var headArrR1 = new Array();
  1259. var headArrR2 = new Array();
  1260. var headArrR3 = new Array();
  1261. var headArrR2No = new Array();
  1262. var headArrR3No = new Array();
  1263. var headArrR2NoIdx = 0;
  1264. var headArrR3NoIdx = 0;
  1265. var headArrMer12No = "";
  1266. var headArrMer13No = "";
  1267. var headArrMer12NoIdx = 0;
  1268. var headArrMer13NoIdx = 0;
  1269. var mergeScol = 0;
  1270. var mergeEcol = 0;
  1271. var index = 0;
  1272. var calindex = 0;
  1273. var calindex1 = 0;
  1274. var calindex11 = 0;
  1275. grid.splitContentsCell("head",0,0,3,headCols,true);
  1276. for(var i=0; i<headCells;i++){
  1277. if( parseInt(i/headCols)==0 ){
  1278. headArrR1[i%headCols] = grid.getCellText(-1,i);
  1279. }
  1280. if( parseInt(i/headCols)==1 ){
  1281. headArrR2[i%headCols] = grid.getCellText(-1,i);
  1282. }
  1283. if( parseInt(i/headCols)==2 ){
  1284. headArrR3[i%headCols] = grid.getCellText(-1,i);
  1285. }
  1286. }//for(var i=0; i<headCells;i++) 끝
  1287. //로우 병합
  1288. for(var i=0; i<headCols; i++){
  1289. if(headArrR1[i]==headArrR2[i]){
  1290. index = i;
  1291. calindex++;
  1292. grid.mergeContentsCell("head",0,i,1,i,index,false);
  1293. headArrMer12No+=i+"^";
  1294. headArrMer12NoIdx++;
  1295. }else{
  1296. headArrR2No[headArrR2NoIdx]=i;
  1297. headArrR2NoIdx++;
  1298. }
  1299. if(headArrR2[i]==headArrR3[i]){
  1300. index = eval(i)+eval(headCols)-calindex;
  1301. grid.mergeContentsCell("head",1,i,2,i,index,false);
  1302. calindex1++;
  1303. if(headArrR2[i]==headArrR1[i]){
  1304. index = eval(i)+eval(headCols)-calindex;
  1305. grid.mergeContentsCell("head",0,i,2,i,i,false);
  1306. calindex11++;
  1307. headArrMer13No+=i+"^";
  1308. headArrMer13NoIdx++;
  1309. }
  1310. }else{
  1311. headArrR3No[headArrR3NoIdx]=i;
  1312. headArrR3NoIdx++;
  1313. }
  1314. }//for(var i=0; i<headCols; i++) 끝
  1315. //배치가 바뀌어 재분배
  1316. var headCells2 = grid.getCellCount("head");
  1317. var headArr1 = new Array();
  1318. var headArr2 = new Array();
  1319. var headArr3 = new Array();
  1320. var headArr3idx = 0;
  1321. var headArr2idx = 0;
  1322. for(var i=0; i<headCells2;i++){
  1323. if( parseInt(i/headCols)==0 ){
  1324. headArr1[i%headCols] = grid.getCellText(-1,i);
  1325. }else if( eval(i)< headCols*2-eval(calindex)){
  1326. headArr2[headArr2idx] = grid.getCellText(-1,i);
  1327. headArr2idx++;
  1328. }else{
  1329. headArr3[headArr3idx] = grid.getCellText(-1,i);
  1330. headArr3idx++;
  1331. }
  1332. }//for(var i=0; i<headCells;i++) 끝
  1333. //컬럼 병합
  1334. var tmp1 = "";
  1335. var tmp1idx = 0;
  1336. var tmp2 = "";
  1337. var tmp2idx = 0;
  1338. var col = 0;
  1339. var index = 0;
  1340. var calcolindex = 0;
  1341. for(var i=0; i<headArr1.length;i++){
  1342. if(i==0){
  1343. tmp1 = headArr1[0];
  1344. tmp1idx = 0;
  1345. }else{
  1346. tmp2 = headArr1[i];
  1347. tmp2idx = i;
  1348. }
  1349. idx = i-calcolindex-1;
  1350. if(tmp1==tmp2){
  1351. grid.mergeContentsCell("head",0,tmp1idx,0,tmp2idx,idx,false);
  1352. calcolindex++;
  1353. }else{
  1354. tmp1 = headArr1[i];
  1355. tmp1idx = i;
  1356. }
  1357. }//for(var i=0; headArr1.legnth();i++) 끝
  1358. var tmp1 = "!";
  1359. var tmp2 = "!";
  1360. var tmp2idx = 0;
  1361. var calcolindex1 = 0;
  1362. var idx = 0;
  1363. for(var i=0; i<headArr2.length;i++){
  1364. if(i==0){
  1365. tmp1 = headArr2[0];
  1366. tmp1idx = 0;
  1367. }else{
  1368. tmp2 = headArr2[i];
  1369. tmp2idx = headArrR2No[i];
  1370. }
  1371. var cnt12R = biggerCnt(headArrR2No[i],headArrMer12No);
  1372. idx = (headCols+headArrR2No[i]) - calcolindex - eval(calindex) + cnt12R - eval(calcolindex1)-1;
  1373. if(tmp1==tmp2){
  1374. grid.mergeContentsCell("head",1,tmp1idx,1,tmp2idx,idx,false);
  1375. calcolindex1++;
  1376. }else{
  1377. tmp1 = headArr2[i];
  1378. tmp1idx = headArrR2No[i];
  1379. }
  1380. }//for(var i=0; headArr2.legnth();i++) 끝
  1381. var tmp1 = "!";
  1382. var tmp2 = "!";
  1383. var tmp2idx = 0;
  1384. var calcolindex11 = 0;
  1385. for(var i=0; i<headArr3.length; i++){
  1386. if(i==0){
  1387. tmp1 = headArr3[0];
  1388. tmp1idx = 0;
  1389. }else{
  1390. tmp2 = headArr3[i];
  1391. tmp2idx = headArrR3No[i];
  1392. }
  1393. var cnt13R = biggerCnt(headArrR3No[i],headArrMer13No);
  1394. idx = (headCols*2+headArrR3No[i]) - calcolindex - calcolindex1 - calcolindex11 - calindex - calindex1 + cnt13R;
  1395. if(tmp1==tmp2){
  1396. grid.mergeContentsCell("head",2,tmp1idx,2,tmp2idx,idx,false);
  1397. calcolindex11++;
  1398. }else{
  1399. tmp1 = headArr3[i];
  1400. tmp1idx = headArrR3No[i];
  1401. }
  1402. }
  1403. }
  1404. function biggerCnt(num,idxArr){
  1405. var rtn=0;
  1406. var arr = new Array();
  1407. var idxA = new String(idxArr);
  1408. arr = idxA.substr(0,idxA.length-1).split("^");
  1409. for(var i=0; i<arr.length; i++){
  1410. if(num<arr[i]){
  1411. rtn++;
  1412. }
  1413. }
  1414. return rtn;
  1415. }
  1416. //트러스트폼에서 attribute("ref")대용으로 사용
  1417. function checkColClick(grid){
  1418. var colbind = grid.getCellProperty("Body",grid.currentcol,"text");//컬럼에 바인드된 값을 갖고옴
  1419. if(colbind==null)return;
  1420. var colbindL = colbind.length;
  1421. return colbind.substr(5,colbindL);
  1422. }
  1423. /*
  1424. 멀티체크박스 사용
  1425. boxid : checkBox
  1426. cnt : checkBox갯수
  1427. allIdx : 전체항목이 있을경우 아무 값이나 적용
  1428. */
  1429. function multiCheckBox(boxid,cnt,allIdx){
  1430. var rtn="";
  1431. if(allIdx==null){
  1432. for(var i=0; i<cnt ;i++){
  1433. if(eval(boxid+i+".value")!=false){
  1434. rtn += eval(boxid+i+".value")+" ";
  1435. }
  1436. }
  1437. }else{
  1438. for(var i=0; i<cnt ;i++){
  1439. if(eval(boxid+"0"+".value")!=false){
  1440. if(i==0){
  1441. rtn = eval(boxid+"0"+".value")+" ";
  1442. }else{
  1443. eval(boxid+i).value=false;
  1444. }
  1445. }else{
  1446. if(eval(boxid+i+".value")!=false){
  1447. rtn += eval(boxid+i+".value")+" ";
  1448. }
  1449. }
  1450. }
  1451. }
  1452. return rtn;
  1453. }
  1454. /*그리드 합계
  1455. grid : 그리드명
  1456. */
  1457. function grd_getSum(grid){
  1458. var ds = grid.binddataset;
  1459. eval(ds).addRow();
  1460. var all = 0;
  1461. var sum = 0;
  1462. for(var i=0; i<grid.getCellCount("body");i++ ){
  1463. if(grid.getCellProperty("body",i,"displaytype")=="number"){
  1464. for(var j=0; j<eval(ds).rowcount-1;j++){
  1465. sum+=eval(eval(ds).getColumn(j,i));
  1466. }
  1467. eval(ds).setColumn(grid.currentrow,i,sum);
  1468. all++;
  1469. sum=0;
  1470. }else{
  1471. if(all==0){
  1472. eval(ds).setColumn(grid.currentrow,1,"합계");
  1473. }
  1474. }
  1475. }
  1476. }
  1477. /***********************************
  1478. 그리드 관련 달력 함수 시작
  1479. ************************************/
  1480. var aezBaseCalsdd = "";
  1481. var aezBaseCaledd = "";
  1482. var aezCalpath;
  1483. var aezCalColor = "";
  1484. var aezMemoBgc = "";
  1485. /*
  1486. 달력을 갖고오는 함수 onload 시점에 사용
  1487. */
  1488. function aezGetCalendar(calpath,setColor,setMemoBgc){
  1489. if(calpath==null){
  1490. aezCalpath = "CalDiv";
  1491. }else{
  1492. aezCalpath = calpath;
  1493. }
  1494. aezCalColor = setColor;
  1495. aezMemoBgc = setMemoBgc;
  1496. if(eval(aezCalpath).opt_year.value==null || eval(aezCalpath).opt_year.value==""){
  1497. var sdate = new String(utlf_getCurrentDate());
  1498. eval(aezCalpath).opt_year.value = sdate.substr(0,4);
  1499. eval(aezCalpath).opt_month.value = sdate.substr(4,2) ;
  1500. }
  1501. var dateObj = eval(aezCalpath).opt_year.value+""+eval(aezCalpath).opt_month.value;
  1502. aezBaseCalsdd = dateObj+00;
  1503. aezBaseCaledd = dateObj+32;
  1504. dsf_createDsRow("ds_cond_req",
  1505. [{col:"date", val:dateObj}
  1506. ,{col:"srchflag", val:"T"}
  1507. ,{col:"basesuppdeptcd", val:suppdeptcd}]);
  1508. dsf_createDsRow("ds_grid_calendarAST",
  1509. [{col:"basedd", val:""}
  1510. ,{col:"holinm", val:""}
  1511. ,{col:"holiflag", val:""}
  1512. ,{col:"dutflag", val:""}
  1513. ]);
  1514. var objParam = new Object();
  1515. objParam.id = "TRAEA03203";
  1516. objParam.service = "examcurersrvapp.RsrvTm";
  1517. objParam.method = "reqGetHospitalCalendar";
  1518. objParam.inds = "req=ds_cond_req";
  1519. objParam.outds ="ds_grid_calendarAST=caldata";
  1520. objParam.callback = "cbf_TRAEA03203";
  1521. objParam.progress = false;
  1522. tranf_submit(objParam);
  1523. }
  1524. function cbf_TRAEA03203(strSvcID, nErrorCode, strErrorMsg){
  1525. //여기
  1526. //에러 처리
  1527. if(nErrorCode == 0){
  1528. ds_grid_calendarAST.filter("basedd>'"+aezBaseCalsdd+"'&& basedd<'"+aezBaseCaledd+"'");
  1529. ds_grid_calendarAST.addColumn("memo1","String");
  1530. ds_grid_calendarAST.addColumn("memo2","String");
  1531. setCalWeek();
  1532. aezSetCalMemo();
  1533. setBgcExpr();
  1534. }else{
  1535. }
  1536. }
  1537. function setTodayColor(){
  1538. if(aezCalColor=="N")return;
  1539. if(utlf_getYear()==eval(aezCalpath).opt_year.value && utlf_getMonth()==eval(aezCalpath).opt_month.value){
  1540. var toDate = new String(utlf_getDate());
  1541. if(toDate.charAt(0)==0){
  1542. toDate=toDate.charAt(1);
  1543. }
  1544. for(var i=0; i<7;i++){
  1545. for(var j=0; j<ds_grid_grd_calendar.rowcount;j++){
  1546. if(ds_grid_grd_calendar.getColumn(j,i)==toDate){
  1547. ds_grid_grd_calendar.setColumn(j,i+28,"#95d4fbff");
  1548. ds_grid_grd_calendar.rowposition = j;
  1549. eval(aezCalpath).grd_calendar.setCellPos(i);
  1550. }
  1551. }
  1552. eval(aezCalpath).grd_calendar.setCellProperty("Body",i,"selectbackground","#daa7d9ff");
  1553. }
  1554. }
  1555. }
  1556. function setBgcExpr(){
  1557. setTodayColor();
  1558. if(aezMemoBgc!="Y" && aezCalColor=="N")return;
  1559. for(var i=0; i<7;i++){
  1560. eval(aezCalpath).grd_calendar.setCellProperty("Body",i,"background","EXPR(getColumn(currow,"+eval(i+28)+"))");
  1561. eval(aezCalpath).grd_calendar.setCellProperty("Body",i,"background2","EXPR(getColumn(currow,"+eval(i+28)+"))");
  1562. }
  1563. }
  1564. function setCalWeek(){
  1565. var dayNum = utlf_getDay(ds_grid_calendarAST.getColumn(0,"basedd"));
  1566. var dayArr = ["sun","mon","tue","wed","thu","fri","sat"]
  1567. var dutArr = ["sun_dut","mon_dut","tue_dut","wed_dut","thu_dut","fri_dut","sat_dut"]
  1568. var holiArr = ["sun_holi","mon_holi","tue_holi","wed_holi","thu_holi","fri_holi","sat_holi"]
  1569. ds_grid_grd_calendar.clearData();
  1570. for(var i=0; i<dayArr.length; i++){
  1571. ds_grid_grd_calendar.addColumn(dayArr[i],"String");
  1572. }
  1573. for(var i=0; i<dutArr.length; i++){
  1574. ds_grid_grd_calendar.addColumn(dutArr[i],"String");
  1575. }
  1576. for(var i=0; i<holiArr.length; i++){
  1577. ds_grid_grd_calendar.addColumn(holiArr[i],"String");
  1578. }
  1579. for(var i=0; i<eval((ds_grid_calendarAST.rowcount+dayNum)/7);i++){
  1580. ds_grid_grd_calendar.addRow();
  1581. }
  1582. var day = 1;
  1583. var idx = 0;
  1584. for(var i=dayNum; i<eval(ds_grid_calendarAST.rowcount+dayNum) ;i++){
  1585. ds_grid_grd_calendar.setColumn(parseInt(i/7),dayArr[i%7],day++);
  1586. ds_grid_grd_calendar.setColumn(parseInt(i/7),dutArr[i%7],ds_grid_calendarAST.getColumn(idx,"dutflag"));
  1587. ds_grid_grd_calendar.setColumn(parseInt(i/7),holiArr[i%7],ds_grid_calendarAST.getColumn(idx,"holiflag"));
  1588. idx++;
  1589. }
  1590. }
  1591. /* aezSetCalMemo()를 사용하지 않을 경우가 있기 때문에 임시로 만들어 두었음
  1592. 삭제 하면 안됨*/
  1593. function aezSetCalMemo(){}
  1594. /*
  1595. memods : 메모를 갖고 있는 데이터셋
  1596. col1 : 메모데이터1
  1597. flag : col1과 col2의 사이에 들어가는 문자열
  1598. col2 : 메모데이터2
  1599. */
  1600. function setCalMemo(memods,col1,flag,col2){
  1601. var dayNum = utlf_getDay(ds_grid_calendarAST.getColumn(0,"basedd"));
  1602. var dayArr = ["sun_memo","mon_memo","tue_memo","wed_memo","thu_memo","fri_memo","sat_memo"]
  1603. var bgcArr = ["sun_bgc","mon_bgc","tue_bgc","wed_bgc","thu_bgc","fri_bgc","sat_bgc"]
  1604. var idx = 0;
  1605. for(var i=0; i<dayArr.length; i++){
  1606. ds_grid_grd_calendar.addColumn(dayArr[i],"String");
  1607. }
  1608. for(var i=0; i<bgcArr.length; i++){
  1609. ds_grid_grd_calendar.addColumn(bgcArr[i],"String");
  1610. }
  1611. for(var i=dayNum; i<eval(ds_grid_calendarAST.rowcount+dayNum) ;i++){
  1612. if(eval(memods).getColumn(idx,col2)!=null){
  1613. ds_grid_grd_calendar.setColumn(parseInt(i/7),dayArr[i%7],eval(memods).getColumn(idx,col1)+""+flag+""+eval(memods).getColumn(idx,col2));
  1614. }
  1615. if(aezMemoBgc=="Y"){
  1616. if(eval(utlf_transNullToEmpty(eval(memods).getColumn(idx,col1)).trim())<eval(utlf_transNullToEmpty(eval(memods).getColumn(idx,col2)).trim())){
  1617. ds_grid_grd_calendar.setColumn(parseInt(i/7),bgcArr[i%7],"#c4e693ff");
  1618. }else{
  1619. ds_grid_grd_calendar.setColumn(parseInt(i/7),bgcArr[i%7],"default");
  1620. }
  1621. }
  1622. idx++;
  1623. }
  1624. setTodayColor();
  1625. }
  1626. function clickCalButton(obj:Button, e:ClickEventInfo)
  1627. {
  1628. var button = obj.class;
  1629. if(button=="icon_pre_year"){
  1630. eval(aezCalpath).opt_year.value = eval(eval(aezCalpath).opt_year.value)-1;
  1631. aezGetCalendar(aezCalpath,aezCalColor,aezMemoBgc);
  1632. }else if(button=="icon_pre_month"){
  1633. if(eval(aezCalpath).opt_month.value=="01"){
  1634. eval(aezCalpath).opt_year.value = eval(eval(aezCalpath).opt_year.value)-1;
  1635. eval(aezCalpath).opt_month.value = "12";
  1636. }else{
  1637. var getMonth = eval(eval(aezCalpath).opt_month.value)-1;
  1638. var month = getMonth>9? getMonth:"0"+getMonth;
  1639. eval(aezCalpath).opt_month.value = month;
  1640. }
  1641. aezGetCalendar(aezCalpath,aezCalColor,aezMemoBgc);
  1642. }else if(button=="icon_next_month"){
  1643. if(eval(aezCalpath).opt_month.value=="12"){
  1644. eval(aezCalpath).opt_year.value = eval(eval(aezCalpath).opt_year.value)+1;
  1645. eval(aezCalpath).opt_month.value = "01";
  1646. }else{
  1647. var getMonth = eval(eval(aezCalpath).opt_month.value)+1;
  1648. var month = getMonth>9? getMonth:"0"+getMonth;
  1649. eval(aezCalpath).opt_month.value = month;
  1650. }
  1651. aezGetCalendar(aezCalpath,aezCalColor,aezMemoBgc);
  1652. }else{
  1653. eval(aezCalpath).opt_year.value = eval(eval(aezCalpath).opt_year.value)+1;
  1654. aezGetCalendar(aezCalpath,aezCalColor,aezMemoBgc);
  1655. }
  1656. }
  1657. /*선택한 달력의 날짜 리턴*/
  1658. function getSelectCalDate(){
  1659. var date = ds_grid_grd_calendar.getColumn(ds_grid_grd_calendar.rowposition,eval(aezCalpath).grd_calendar.currentcell);
  1660. if(date==null)return;
  1661. if(date.length==1){
  1662. date= "0"+date;
  1663. }
  1664. return eval(aezCalpath).opt_year.value+""+eval(aezCalpath).opt_month.value+""+date;
  1665. }
  1666. /***********************************
  1667. 그리드 관련 달력 함수 끝
  1668. ************************************/
  1669. /***********************************
  1670. 스위치 형태의 환자정보 갖고오는 함수 시작
  1671. ***********************************/
  1672. /*
  1673. D : 상병 / ds_patinfo_diaginfo
  1674. O : 처방Comment,실시Comment,임상간호소견,검사주의사항 / ds_patinfo_prcpdeliveinfo
  1675. 임상Comment / ds_patinfo_ipcmcmtlist
  1676. E : 타검사현황 / ds_patinfo_excuinfolist
  1677. Y : 미진료내역 / ds_patinfo_patotptinfolist
  1678. S : 사용안함
  1679. C : 환자Comment / 고정메모(ds_patinfo_patfixrem) 환자메모(ds_patinfo_patrem)
  1680. M : 부서메모 / ds_patinfo_deptmemoinfolist
  1681. P : 환자정보/ ds_patinfo_patbaseinfolist
  1682. I : 감염정보/ ds_patinfo_isolinfolist
  1683. L : LIS최근검사결과/ ds_patinfo_labrsltinfo
  1684. A : 재료소모조회/ ds_patinfo_materialconsumelist
  1685. R : 중증완료일자/ ds_patinfo_serdiag
  1686. T : 미시행처방/ ds_patinfo_actinfo
  1687. RX : / ds_patinfo_rxnote
  1688. B : 통합예약관리 약날수/ ds_patinfo_drugperiod
  1689. G : 갑상선조직검사 초재진 조회/ ds_patinfo_thyroidinfo
  1690. J : 통합예약커멘트/ ds_patinfo_rsrvrem
  1691. H : 내시경 혈전제/ ds_patinfo_aspirinlist
  1692. */
  1693. /*
  1694. onload시 createPatInfoDs()선언;
  1695. submit TRAEA01139 대신 get_sw_patinfo(ds 형태로 값을 전달);
  1696. aezClearPatInfoBindDS(); 탭내용삭제
  1697. aezPatInfo_excucdrem : 검사주의사항 변수
  1698. */
  1699. function setTabPatInfoBtn(){}; // 사용자 정의 함수 값이 있을때 탭에 ■ 설정
  1700. function setPatInfoBindDS(){}; // 사용자 정의 함수 값을 넣을 수 있는 함수
  1701. function clearPatInfoBindDS(){}; // 사용자 정의 함수 값을 클리어할때 사용
  1702. var patInfoFlagArr = new Array();
  1703. var patInfoTabNum = 14;
  1704. function createPatInfoDs(){
  1705. dsf_createDsRow("ds_patinfo_diaginfo",[{}]);
  1706. dsf_createDsRow("ds_patinfo_prcpdeliveinfo",[{}]);
  1707. dsf_createDsRow("ds_patinfo_ipcmcmtlist",[{}]);
  1708. dsf_createDsRow("ds_patinfo_excuinfolist",[{}]);
  1709. dsf_createDsRow("ds_patinfo_patotptinfolist",[{}]);
  1710. dsf_createDsRow("ds_patinfo_patfixrem",[{col:"memodesc", val:""}]);
  1711. dsf_createDsRow("ds_patinfo_patrem",[{col:"memodesc", val:""}]);
  1712. dsf_createDsRow("ds_patinfo_deptmemoinfolist",[{}]);
  1713. dsf_createDsRow("ds_patinfo_patbaseinfolist",[{}]);
  1714. dsf_createDsRow("ds_patinfo_isolinfolist",[{}]);
  1715. dsf_createDsRow("ds_patinfo_labrsltinfo",[{}]);
  1716. dsf_createDsRow("ds_patinfo_materialconsumelist",[{}]);
  1717. dsf_createDsRow("ds_patinfo_serdiag",[{}]);
  1718. dsf_createDsRow("ds_patinfo_actinfo",[{}]);
  1719. dsf_createDsRow("ds_patinfo_rxnote",[{}]);
  1720. dsf_createDsRow("ds_patinfo_drugperiod",[{}]);
  1721. dsf_createDsRow("ds_patinfo_thyroidinfo",[{}]);
  1722. dsf_createDsRow("ds_patinfo_rsrvrem",[{}]);
  1723. dsf_createDsRow("ds_patinfo_aspirinlist",[{}]);
  1724. getTabPatInfoBtnName();
  1725. };
  1726. function get_sw_patinfo(obj){
  1727. var flag = obj.getColumn(0,"patinfoflag");
  1728. patInfoFlagArr = flag.split("^");
  1729. var output = "";
  1730. for(var i=0; i<patInfoFlagArr.length;i++){
  1731. if(patInfoFlagArr[i]=="D"){
  1732. output += "ds_patinfo_diaginfo=diaginfolist ";
  1733. }
  1734. if(patInfoFlagArr[i]=="O"){
  1735. output += "ds_patinfo_prcpdeliveinfo=prcpdeliveinfolist ds_patinfo_ipcmcmtlist=ipcmcmtlist ";
  1736. }
  1737. if(patInfoFlagArr[i]=="E"){
  1738. output += "ds_patinfo_excuinfolist=excuinfolist ";
  1739. }
  1740. if(patInfoFlagArr[i]=="Y"){
  1741. output += "ds_patinfo_patotptinfolist=patotptinfolist ";
  1742. }
  1743. if(patInfoFlagArr[i]=="C"){
  1744. output += "ds_patinfo_patfixrem=patfixrem ds_patinfo_patrem=patrem ";
  1745. }
  1746. if(patInfoFlagArr[i]=="M"){
  1747. output += "ds_patinfo_deptmemoinfolist=deptmemoinfolist ";
  1748. }
  1749. if(patInfoFlagArr[i]=="P"){
  1750. output += "ds_patinfo_patbaseinfolist=patbaseinfolist ";
  1751. }
  1752. if(patInfoFlagArr[i]=="I"){
  1753. output += "ds_patinfo_isolinfolist=isolinfolist ";
  1754. }
  1755. if(patInfoFlagArr[i]=="L"){
  1756. output += "ds_patinfo_labrsltinfo=labrsltinfo ";
  1757. }
  1758. if(patInfoFlagArr[i]=="A"){
  1759. output += "ds_patinfo_materialconsumelist=materialconsumelist ";
  1760. }
  1761. if(patInfoFlagArr[i]=="R"){
  1762. output += "ds_patinfo_serdiag=serdiag ";
  1763. }
  1764. if(patInfoFlagArr[i]=="T"){
  1765. output += "ds_patinfo_actinfo=actinfo ";
  1766. }
  1767. if(patInfoFlagArr[i]=="RX"){
  1768. output += "ds_patinfo_rxnote=rxnote ";
  1769. }
  1770. if(patInfoFlagArr[i]=="B"){
  1771. output += "ds_patinfo_drugperiod=drugperiod ";
  1772. }
  1773. if(patInfoFlagArr[i]=="G"){
  1774. output += "ds_patinfo_thyroidinfo=thyroidinfo ";
  1775. }
  1776. if(patInfoFlagArr[i]=="J"){
  1777. output += "ds_patinfo_rsrvrem=rsrvrem ";
  1778. }
  1779. if(patInfoFlagArr[i]=="H"){
  1780. output += "ds_patinfo_aspirinlist=aspirinlist ";
  1781. }
  1782. }
  1783. submit_TRAEA01139(obj.name,output);
  1784. }
  1785. function submit_TRAEA01139(input,output){
  1786. var objParam = new Object();
  1787. objParam.id = "TRAEA01139";
  1788. objParam.service = "examcureacptexecapp.PatRem";
  1789. objParam.method = "reqGetPatTotalInfo";
  1790. objParam.inds = "req="+input;
  1791. objParam.outds = output;
  1792. objParam.callback = "cbf_TRAEA01139";
  1793. tranf_submit(objParam);
  1794. }
  1795. function cbf_TRAEA01139(strSvcID, nErrorCode, strErrorMsg){
  1796. //에러 처리
  1797. if(nErrorCode == 0){
  1798. setPatInfoBindDS();
  1799. aezSetPatInfoBindDS();
  1800. }else{
  1801. }
  1802. }
  1803. function aezClearPatInfoBindDS(){
  1804. clearPatInfoBindDS();
  1805. ds_patinfo_diaginfo.clear();
  1806. ds_patinfo_prcpdeliveinfo.clear();
  1807. ds_patinfo_ipcmcmtlist.clear();
  1808. ds_patinfo_excuinfolist.clear();
  1809. ds_patinfo_patotptinfolist.clear();
  1810. ds_patinfo_patfixrem.clear();
  1811. ds_patinfo_patrem.clear();
  1812. ds_patinfo_deptmemoinfolist.clear();
  1813. ds_patinfo_patbaseinfolist.clear();
  1814. ds_patinfo_isolinfolist.clear();
  1815. ds_patinfo_labrsltinfo.clear();
  1816. ds_patinfo_materialconsumelist.clear();
  1817. ds_patinfo_serdiag.clear();
  1818. ds_patinfo_actinfo.clear();
  1819. ds_patinfo_rxnote.clear();
  1820. ds_patinfo_drugperiod.clear();
  1821. ds_patinfo_thyroidinfo.clear();
  1822. ds_patinfo_rsrvrem.clear();
  1823. ds_patinfo_aspirinlist.clear();
  1824. /*
  1825. if(!utlf_isNull(this.objects["ds_rectmpdetail"])){
  1826. ds_rectmpdetail.clear();
  1827. }
  1828. */
  1829. aezSetTabPatInfoBtn();
  1830. };
  1831. var tabPatInfoBtnName = new Array();
  1832. function getTabPatInfoBtnName(){
  1833. for(var i=0; i<patInfoTabNum ;i++){
  1834. tabPatInfoBtnName[i] = eval("sw_patinfo_btn_"+i).text;
  1835. }
  1836. };
  1837. function aezSetTabPatInfoBtn(){
  1838. setTabPatInfoBtn(){}
  1839. for(var i=0; i<patInfoTabNum ;i++){
  1840. if(i==12 || i==13)continue;
  1841. eval("sw_patinfo_btn_"+i).text = tabPatInfoBtnName[i];
  1842. eval("sw_patinfo_btn_"+i).style.color = "";
  1843. }
  1844. for(var i=0; i<patInfoFlagArr.length;i++){
  1845. if(patInfoFlagArr[i]=="D"){
  1846. if(ds_patinfo_diaginfo.getRowCount()>0){
  1847. sw_patinfo_btn_6.text = ""+tabPatInfoBtnName[6];
  1848. sw_patinfo_btn_6.style.color = "blue";
  1849. }
  1850. }
  1851. if(patInfoFlagArr[i]=="O"){
  1852. if(ds_patinfo_prcpdeliveinfo.getColumn(0,"prcpdelivefact")!="-"
  1853. && ds_patinfo_prcpdeliveinfo.getColumn(0,"prcpdelivefact")!=""
  1854. && ds_patinfo_prcpdeliveinfo.getColumn(0,"prcpdelivefact")!=null){
  1855. sw_patinfo_btn_0.text = ""+tabPatInfoBtnName[0];
  1856. sw_patinfo_btn_0.style.color = "blue";
  1857. }
  1858. if(ds_patinfo_prcpdeliveinfo.getColumn(0,"suppdeptdelivefact")!="-"
  1859. && ds_patinfo_prcpdeliveinfo.getColumn(0,"suppdeptdelivefact")!=""
  1860. && ds_patinfo_prcpdeliveinfo.getColumn(0,"suppdeptdelivefact")!=null){
  1861. sw_patinfo_btn_1.text = ""+tabPatInfoBtnName[1];
  1862. sw_patinfo_btn_1.style.color = "blue";
  1863. }
  1864. if(ds_patinfo_prcpdeliveinfo.getColumn(0,"nursdelivefact")!="-"
  1865. && ds_patinfo_prcpdeliveinfo.getColumn(0,"nursdelivefact")!=""
  1866. && ds_patinfo_prcpdeliveinfo.getColumn(0,"nursdelivefact")!=null){
  1867. sw_patinfo_btn_3.text = ""+tabPatInfoBtnName[3];
  1868. sw_patinfo_btn_3.style.color = "blue";
  1869. }
  1870. if(ds_patinfo_ipcmcmtlist.getRowCount()>0){
  1871. sw_patinfo_btn_2.text = ""+tabPatInfoBtnName[2];
  1872. sw_patinfo_btn_2.style.color = "blue";
  1873. }
  1874. if(ds_patinfo_prcpdeliveinfo.getColumn(0,"excucdrem")!="-"
  1875. && ds_patinfo_prcpdeliveinfo.getColumn(0,"excucdrem")!=""
  1876. && ds_patinfo_prcpdeliveinfo.getColumn(0,"excucdrem")!=null){
  1877. sw_patinfo_btn_11.text = ""+tabPatInfoBtnName[11];
  1878. sw_patinfo_btn_11.style.color = "blue";
  1879. }
  1880. }
  1881. if(patInfoFlagArr[i]=="E"){
  1882. if(ds_patinfo_excuinfolist.getRowCount()>0){
  1883. sw_patinfo_btn_7.text = ""+tabPatInfoBtnName[7];
  1884. sw_patinfo_btn_7.style.color = "blue";
  1885. }
  1886. }
  1887. if(patInfoFlagArr[i]=="Y"){
  1888. if(ds_patinfo_patotptinfolist.getRowCount()>0){
  1889. sw_patinfo_btn_8.text = ""+tabPatInfoBtnName[8];
  1890. sw_patinfo_btn_8.style.color = "blue";
  1891. }
  1892. }
  1893. if(patInfoFlagArr[i]=="C"){
  1894. if(
  1895. (ds_patinfo_patfixrem.getColumn(0,"memodesc")!="-" || ds_patinfo_patrem.getColumn(0,"memodesc")!="-")
  1896. &&(ds_patinfo_patfixrem.getColumn(0,"memodesc")!="" || ds_patinfo_patrem.getColumn(0,"memodesc")!="")
  1897. &&(ds_patinfo_patfixrem.getColumn(0,"memodesc")!=null || ds_patinfo_patrem.getColumn(0,"memodesc")!=null)
  1898. ){
  1899. sw_patinfo_btn_5.text = ""+tabPatInfoBtnName[5];
  1900. sw_patinfo_btn_5.style.color = "blue";
  1901. }
  1902. }
  1903. if(patInfoFlagArr[i]=="A"){
  1904. if(ds_patinfo_materialconsumelist.getRowCount()>0){
  1905. sw_patinfo_btn_4.text = ""+tabPatInfoBtnName[4];
  1906. sw_patinfo_btn_4.style.color = "blue";
  1907. }
  1908. }
  1909. if(patInfoFlagArr[i]=="T"){
  1910. if(ds_patinfo_actinfo.getRowCount()>0){
  1911. sw_patinfo_btn_9.text = ""+tabPatInfoBtnName[9];
  1912. sw_patinfo_btn_9.style.color = "blue";
  1913. }
  1914. }
  1915. if(patInfoFlagArr[i]=="J"){
  1916. sw_patinfo.case10.patinfo_rsrvrem.binddataset = "ds_patinfo_rsrvrem";
  1917. if(ds_patinfo_rsrvrem.getColumn(0,"rsrvrem")!="-" && ds_patinfo_rsrvrem.getColumn(0,"rsrvrem")!="" && ds_patinfo_rsrvrem.getColumn(0,"rsrvrem")!=null){
  1918. sw_patinfo_btn_10.text = ""+tabPatInfoBtnName[10];
  1919. sw_patinfo_btn_10.style.color = "blue";
  1920. }
  1921. }
  1922. if(!utlf_isNull(this.objects["ds_rectmpdetail"])){
  1923. if(ds_rectmpdetail.getColumn(0,"nuclcomment")!="-" && ds_rectmpdetail.getColumn(0,"nuclcomment")!=""){
  1924. sw_patinfo_btn_10.text = ""+tabPatInfoBtnName[12];
  1925. sw_patinfo_btn_10.style.color = "blue";
  1926. }
  1927. if(ds_rectmpdetail.getColumn(0,"lsnt1")!="-" && ds_rectmpdetail.getColumn(0,"lsnt1")!=""){
  1928. sw_patinfo_btn_10.text = ""+tabPatInfoBtnName[13];
  1929. sw_patinfo_btn_10.style.color = "blue";
  1930. }
  1931. }
  1932. }
  1933. };
  1934. var aezPatInfo_excucdrem = "-";
  1935. function aezSetPatInfoBindDS(){
  1936. for(var i=0; i<patInfoFlagArr.length;i++){
  1937. if(patInfoFlagArr[i]=="D"){
  1938. sw_patinfo.case6.patinfo_diaginfo.binddataset = "ds_patinfo_diaginfo";
  1939. }
  1940. if(patInfoFlagArr[i]=="O"){
  1941. ds_patinfo_prcpdeliveinfo.addColumn("excucdrem","String");
  1942. ds_patinfo_prcpdeliveinfo.setColumn(0,"excucdrem",aezPatInfo_excucdrem);
  1943. sw_patinfo.case0.patinfo_prcpdelivefact.binddataset = "ds_patinfo_prcpdeliveinfo";//처방커멘트
  1944. sw_patinfo.case1.patinfo_suppdeptdelivefact.binddataset = "ds_patinfo_prcpdeliveinfo";//실시커멘트
  1945. sw_patinfo.case2.patInfo_ipcmcmtlist.binddataset = "ds_patinfo_ipcmcmtlist"; //임상진료소견
  1946. sw_patinfo.case3.patinfo_nursdelivefact.binddataset = "ds_patinfo_prcpdeliveinfo";//임상간호소견
  1947. sw_patinfo.case11.patinfo_excucdrem.binddataset = "ds_patinfo_prcpdeliveinfo";//검사주의사항
  1948. }
  1949. if(patInfoFlagArr[i]=="E"){
  1950. sw_patinfo.case7.patinfo_excuinfolist.binddataset = "ds_patinfo_excuinfolist";
  1951. }
  1952. if(patInfoFlagArr[i]=="Y"){
  1953. sw_patinfo.case8.patinfo_patotptinfolist.binddataset = "ds_patinfo_patotptinfolist";
  1954. }
  1955. if(patInfoFlagArr[i]=="C"){
  1956. if(ds_patinfo_patfixrem.getColumn(0,"memodesc")==null){
  1957. ds_patinfo_patfixrem.addColumn("memodesc","String",255);
  1958. ds_patinfo_patfixrem.addRow();
  1959. ds_patinfo_patfixrem.setColumn(0,"memodesc","-");
  1960. }
  1961. if(ds_patinfo_patrem.getColumn(0,"memodesc")==null){
  1962. ds_patinfo_patrem.addColumn("memodesc","String",255);
  1963. ds_patinfo_patrem.addRow();
  1964. ds_patinfo_patrem.setColumn(0,"memodesc","-");
  1965. }
  1966. sw_patinfo.case5.patinfo_patfixrem.binddataset = "ds_patinfo_patfixrem";
  1967. sw_patinfo.case5.patinfo_patrem.binddataset = "ds_patinfo_patrem";
  1968. }
  1969. if(patInfoFlagArr[i]=="A"){
  1970. sw_patinfo.case4.patinfo_materialconsumelist.binddataset = "ds_patinfo_materialconsumelist";
  1971. }
  1972. if(patInfoFlagArr[i]=="T"){
  1973. sw_patinfo.case9.patinfo_actinfo.binddataset = "ds_patinfo_actinfo";
  1974. }
  1975. if(patInfoFlagArr[i]=="J"){
  1976. // if(ds_patinfo_rsrvrem.getColumn(0,"rsrvrem")==null){
  1977. // ds_patinfo_rsrvrem.addColumn("rsrvrem","String",255);
  1978. // ds_patinfo_rsrvrem.addRow();
  1979. // ds_patinfo_rsrvrem.setColumn(0,"rsrvrem","-");
  1980. // }
  1981. sw_patinfo.case10.patinfo_rsrvrem.binddataset = "ds_patinfo_rsrvrem";
  1982. }
  1983. }
  1984. aezSetTabPatInfoBtn();
  1985. };
  1986. function sw_patinfo_btn_onclick(obj:Button, e:ClickEventInfo)
  1987. {
  1988. var tabname = new String(obj.name).substr(0,15);
  1989. var tabidx = new String (obj.name).substr(15,2);
  1990. sw_patinfo.tabindex = tabidx;
  1991. for(var i = 0; i<patInfoTabNum; i++){
  1992. eval(tabname+i).class = "btn_tab";
  1993. if(obj.name == tabname+i ){
  1994. eval(tabname+i).class = "btn_tab_S";
  1995. }
  1996. if(tabidx==1 || tabidx==5 || tabidx==10){
  1997. btn_acptremsave.enable = true;
  1998. }else{
  1999. btn_acptremsave.enable = false;
  2000. }
  2001. }
  2002. }
  2003. /******************************************************
  2004. 스위치 형태의 환자정보 갖고오는 함수 끝
  2005. ******************************************************/
  2006. /******************************************************
  2007. Java 익셉션을 Script 형태로 변환하는 함수
  2008. ******************************************************/
  2009. function astErrorMsg(strErrorMsg){
  2010. var errorArr = strErrorMsg.split("|");
  2011. var message = errorArr[0].replace("?","").trim();
  2012. if(message == "데이터베이스 처리 중 중복된 데이터의 입력 시도로 고유성 위반에러가 발생하였습니다." || message == "sql.error.23505"){
  2013. sysf_messageBox("중복된 데이터가 존재합니다.","I999");
  2014. }else if(message=="업무처리 시 오류가 발생하였습니다." || message.substr(0,6)=="데이터베이스"){
  2015. sysf_messageBox(errorArr[1].replace("?",""),"I999");
  2016. var errorArr2 = errorArr[2].split(" ");
  2017. alert(errorArr2[5]+"/"+errorArr2[3]);
  2018. system.setClipboard("CF_TEXT", errorArr2[5]);
  2019. }else if(message=="조회된 결과가 없습니다."){
  2020. return;
  2021. }else{
  2022. sysf_messageBox(errorArr[0].replace("?",""),"I999");
  2023. }
  2024. }
  2025. /******************************************************
  2026. 그리드 컬럼사이즈를 0으로 줄였을때 표시하는 요구사항 반영함수
  2027. astGetGridComponents : 각 폼에서 Grid Object 추출
  2028. astGridOncolresized : 컬럼사이즈 0으로 줄였을때 적용하는 함수
  2029. ******************************************************/
  2030. function astGetGridComponents(sort){
  2031. var formcomArr = this.components;
  2032. var gridArr = new Array();
  2033. var depthArr1 = new Array();
  2034. for(var i=0; i<formcomArr.length; i++){
  2035. if(formcomArr[i]=="[object Grid]"){
  2036. gridArr[gridArr.length] = formcomArr[i].name;
  2037. }else if(formcomArr[i]=="[object Div]" || formcomArr[i]=="[object Tab]"){
  2038. depthArr1[depthArr1.length] = formcomArr[i].name;
  2039. }
  2040. }
  2041. while(!depthArr1.length==0){
  2042. var compoArr = new Array();
  2043. var depthArr2 = new Array();
  2044. for(var i=0; i<depthArr1.length; i++){
  2045. compoArr=eval(depthArr1[i]).components;
  2046. for(var j=0; j<compoArr.length; j++){
  2047. if(compoArr[j]=="[object Grid]"){
  2048. gridArr[gridArr.length] = depthArr1[i]+"."+compoArr[j].name;
  2049. }else if(compoArr[j]=="[object Div]" || compoArr[j]=="[object Tab]" || compoArr[j]=="[object Tabpage]"){
  2050. depthArr2[depthArr2.length] = depthArr1[i]+"."+compoArr[j].name;
  2051. }
  2052. }
  2053. }
  2054. depthArr1=depthArr2.slice(0,depthArr2.length);
  2055. }
  2056. for(var i=0; i<gridArr.length; i++){
  2057. eval(gridArr[i]).oncolresized.setHandler(astGridOncolresized);
  2058. if(sort!="N"){
  2059. grdf_setGridSort(eval(gridArr[i]));
  2060. }
  2061. }
  2062. }
  2063. function astGridOncolresized(obj:Grid, e:GridSizeChangedEventInfo){
  2064. if(e.newvalue == 0){
  2065. obj.setRealColSize(e.subindex, 1);
  2066. }
  2067. }
  2068. function openSMAEA04300(obj:Form, e:KeyEventInfo){
  2069. if(e.ctrlKey){
  2070. if(e.keycode==112){
  2071. frmf_open("SMAEA04300", "SMAEA04300", "", "", "", "", "", "", "", "", "", "", "M");
  2072. }
  2073. }
  2074. }
  2075. function lf_BarcdPrtSato(grd, orddeptnm,roomcd,prcpgenrflag,portyn,precureprcpflag) {
  2076. //var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
  2077. var sPrntKind = ds_data_setupinfo.getColumn(0,"prntkind");
  2078. var portOpenCheck = "";
  2079. var LCount = 0;
  2080. var iXPos = 0;
  2081. var iYPos = 0;
  2082. var sSndMsg = "";
  2083. if (sPrntKind == 0) return;
  2084. var sCommKind = ds_data_setupinfo.getColumn(0,"commkind");
  2085. var sLeftBank = ds_data_blank.getColumn(0,"left");
  2086. var sTopBank = ds_data_blank.getColumn(0,"top");
  2087. if (utlf_isNull(sLeftBank) || sLeftBank == "-") sLeftBank = 0;
  2088. if (utlf_isNull(sTopBank) || sTopBank == "-") sTopBank = 0;
  2089. var orddeptnm = orddeptnm;
  2090. var roomcd = roomcd;
  2091. var prcpgenrflag = prcpgenrflag;
  2092. var portyn = portyn;
  2093. var precureprcpflag = precureprcpflag;
  2094. var sSndMsg = "";
  2095. var sBcNo = "";
  2096. var iprintcnt = 0;
  2097. var pid = ds_selectpat.getColumn(0,"pid");
  2098. var hngnm = ds_selectpat.getColumn(0,"hngnm");
  2099. var sna = ds_selectpat.getColumn(0,"sna");
  2100. var rrgstno = ds_selectpat.getColumn(0,"rrgstno");
  2101. var styleFlags = utlf_transNullToEmpty(grp_body.group2.tar_prcpdelivefact.value).split("]");
  2102. var cmt = styleFlags[0];
  2103. //포터블 및 선처치 여부 ( 진료:Y, 간호:P )
  2104. //간호포터블접수만 표시
  2105. if( portyn == "P" && precureprcpflag == "N") {
  2106. portyn = "P";
  2107. }
  2108. else if(portyn == "N" && precureprcpflag == "Y" ) {
  2109. portyn ="?";
  2110. }
  2111. else if(portyn == "N" && precureprcpflag == "N" ) {
  2112. portyn ="";
  2113. }
  2114. else if(portyn == "P" && precureprcpflag == "Y") {
  2115. portyn ="P?";
  2116. }
  2117. sSndMsg = String.fromCharCode(27) +"A" + String.fromCharCode(27) +"A103500500"; // 시작위치 셋팅
  2118. // ????
  2119. iXPos = Number(sLeftBank) + 5;
  2120. iYPos = Number(sTopBank) + 5;
  2121. //sSndMsg += String.fromCharCode(27) +"V" + iXPos + String.fromCharCode(27) +"H" + iYPos + String.fromCharCode(27) +"S" + pid;
  2122. //sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid, 1.5, 1);
  2123. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid + " [" + rrgstno.substring(0,6) + "]", 1.5, 1);
  2124. // ??? + ????
  2125. iXPos = Number(sLeftBank) + 5;
  2126. iYPos = Number(sTopBank) + 35;
  2127. //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, hngnm+" "+ sna);
  2128. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), sna+" "+ hngnm, 1.5, 1);
  2129. // ??? (??)
  2130. if(prcpgenrflag =="I" || prcpgenrflag =="E" ) {
  2131. iXPos = Number(sLeftBank) + 5;
  2132. iYPos = Number(sTopBank) + 65;
  2133. //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, orddeptnm + "("+ roomcd + ")" );
  2134. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), orddeptnm + "("+ roomcd + ")", 1.5, 1);
  2135. }
  2136. else{
  2137. iXPos = Number(sLeftBank) + 5;
  2138. iYPos = Number(sTopBank) + 65;
  2139. //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, orddeptnm );
  2140. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), orddeptnm, 1.5, 1);
  2141. }
  2142. // ??? ? ?????
  2143. iXPos = Number(sLeftBank) + 5;
  2144. iYPos = Number(sTopBank) + 95;
  2145. //sSndMsg += CommAX.PrtImgOut(iYPos, iXPos, portyn );
  2146. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), portyn, 1.5, 1);
  2147. //Routine ? LongStream
  2148. iXPos = Number(sLeftBank) + 60;
  2149. iYPos = Number(sTopBank) + 95;
  2150. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), cmt +"]", 1.5, 1);
  2151. //???
  2152. iXPos = Number(sLeftBank) +125 ;
  2153. iYPos = Number(sTopBank) + 15;
  2154. sSndMsg += String.fromCharCode(27) +"V" + iXPos + String.fromCharCode(27) +"H" + iYPos + String.fromCharCode(27) +"BG02100" + pid; // ???
  2155. //???????
  2156. iXPos = Number(sLeftBank) +50 ;
  2157. iYPos = Number(sTopBank) + 240;
  2158. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), "*" + pid + "*", 0.5 , 0.5);
  2159. //??(??)
  2160. sSndMsg += String.fromCharCode(27) +"Q" + "1" + String.fromCharCode(27) +"Z";
  2161. CommAX.SendMsg(sSndMsg);
  2162. }
  2163. /****************************************************************************************
  2164. * Argument : pid - 환자번호
  2165. * : patnm - 환자명
  2166. * : sna - 성별/나이
  2167. * : roomcd - 병실
  2168. * : excupartcd - 사용안함.. 제거
  2169. * : prcpdelivefact - 처방전달사항
  2170. * : deptengabbr - 진료과영문
  2171. * : erprcpflag - 사용안함.. 제거
  2172. * : prcpnm - 처방명
  2173. * : barpid - 바코드ID
  2174. * Description : 촬영실 배정관리 SATO BarCode Print 설정
  2175. ****************************************************************************************/
  2176. //function fBarcdPhoLbPrtSato(pid, patnm, sna, roomcd, excupartcd, prcpdelivefact, deptengabbr, erprcpflag, prcpnm, barpid)
  2177. function lf_BarcdPhoLbPrtSato(pid, patnm, sna, roomcd, prcpdelivefact, deptengabbr, prcpnm, barpid) {
  2178. // var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
  2179. var sPrntKind = ds_data_setupinfo.getColumn(0,"prntkind");
  2180. var portOpenCheck = "";
  2181. var LCount = 0;
  2182. var iXPos = 0;
  2183. var iYPos = 0;
  2184. var sSndMsg = "";
  2185. if (sPrntKind == 0) return;
  2186. var sCommKind = ds_data_setupinfo.getColumn(0,"commkind");
  2187. var sLeftBank = ds_data_blank.getColumn(0,"left");
  2188. var sTopBank = ds_data_blank.getColumn(0,"top");
  2189. if (utlf_isNull(sLeftBank) || sLeftBank == "-") sLeftBank = 0;
  2190. if (utlf_isNull(sTopBank) || sTopBank == "-") sTopBank = 0;
  2191. var sSndMsg = "";
  2192. var sBcNo = "";
  2193. var iprintcnt = 0;
  2194. // var styleFlags = model.getValue("/root/main/patrem/prcpdeliveinfo/prcpdelivefact").split("]");
  2195. // var cmt = styleFlags[0];
  2196. sSndMsg = String.fromCharCode(27)+"A"+String.fromCharCode(27)+"A103500500"; // 시작위치 셋팅
  2197. //바코드
  2198. iXPos = Number(sLeftBank) + 140;
  2199. iYPos = Number(sTopBank) + 10;
  2200. sSndMsg += String.fromCharCode(27)+"V" + iYPos + String.fromCharCode(27)+"H" + iXPos + String.fromCharCode(27)+"BG02100" + barpid; // 바코드
  2201. // 등록번호
  2202. iXPos = Number(sLeftBank) + 0;
  2203. iYPos = Number(sTopBank) + 125;
  2204. sSndMsg += String.fromCharCode(27)+"V" + iYPos + String.fromCharCode(27)+"H" + iXPos + String.fromCharCode(27)+"L0203"+String.fromCharCode(27)+"U" + pid + String.fromCharCode(27)+"L0101";
  2205. // 환자명
  2206. iXPos = Number(sLeftBank) + 250;
  2207. iYPos = Number(sTopBank) + 125;
  2208. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), patnm, 2.0, 1);
  2209. // 병실코드
  2210. iXPos = Number(sLeftBank) + 0;
  2211. iYPos = Number(sTopBank) + 170;
  2212. sSndMsg += String.fromCharCode(27)+"V" + iYPos + String.fromCharCode(27)+"H" + iXPos + String.fromCharCode(27)+"L0203"+String.fromCharCode(27)+"U" + roomcd + String.fromCharCode(27)+"L0101";
  2213. // 진료과
  2214. iXPos = Number(sLeftBank) + 260;
  2215. iYPos = Number(sTopBank) + 170;
  2216. sSndMsg += String.fromCharCode(27)+"V" + iYPos + String.fromCharCode(27)+"H" + iXPos + String.fromCharCode(27)+"L0203"+String.fromCharCode(27)+"U" + deptengabbr + String.fromCharCode(27)+"L0101";
  2217. // 성별나이
  2218. iXPos = Number(sLeftBank) + 400;
  2219. iYPos = Number(sTopBank) + 170;
  2220. sSndMsg += String.fromCharCode(27)+"V" + iYPos + String.fromCharCode(27)+"H" + iXPos + String.fromCharCode(27)+"L0203"+String.fromCharCode(27)+"U" + sna + String.fromCharCode(27)+"L0101";
  2221. // 처방명
  2222. iXPos = Number(sLeftBank) + 0;
  2223. iYPos = Number(sTopBank) + 210;
  2224. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), prcpnm, 2, 1);
  2225. // 처방전달사항
  2226. iXPos = Number(sLeftBank) + 0;
  2227. iYPos = Number(sTopBank) + 250;
  2228. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), prcpdelivefact, 1,1);
  2229. sSndMsg += String.fromCharCode(27)+"Q" + "1" + String.fromCharCode(27)+"Z";
  2230. CommAX.SendMsg(sSndMsg);
  2231. }
  2232. // 검사실용 동명이인 체크실시
  2233. function aezfCheckNameConflict(pid, suppdeptcd, excuroomcdid, excuroomgrpcdid) {
  2234. // 필수체크
  2235. if ( utlf_isNull(pid) ) {
  2236. sysf_messageBox("차트번호가 입력되지 않았습니다.\r\n 차트번호를", "I007");
  2237. return;
  2238. } else {
  2239. dsf_createDsRow("ds_send_nameconflict", [
  2240. {col:"pid", type:"STRING", size:256, val:pid}
  2241. , {col:"suppdeptcd", type:"STRING", size:256, val:suppdeptcd}
  2242. , {col:"excuroomcdid", type:"STRING", size:256, val:excuroomcdid}
  2243. , {col:"excuroomgrpcdid", type:"STRING", size:256, val:excuroomgrpcdid}
  2244. ]);
  2245. dsf_createDs("ds_temp_nameconflict");
  2246. var oParam = {};
  2247. oParam.id = "TRAER00209";
  2248. oParam.service = "examcureacptexecapp.ExamCureAcpt";
  2249. oParam.method = "reqGetNameConflict";
  2250. oParam.inds = "req=ds_send_nameconflict";
  2251. oParam.outds = "ds_temp_nameconflict=conflictyn";
  2252. oParam.async = false;
  2253. //oParam.callback = "cf_TRAER00209";
  2254. tranf_submit(oParam);
  2255. if (ds_temp_nameconflict.getColumn(0,"conflictyn") == "Y") {
  2256. sysf_messageBox("현재 환자와 성명이 동일한 환자가 존재합니다.\r\n" +
  2257. " 주의하여 작업하시기 바랍니다.", "I000");
  2258. return false;
  2259. } else {
  2260. return true;
  2261. }
  2262. }
  2263. }
  2264. //=====================================================================================================================================================================================
  2265. // @ SATO BarCode Print 설정
  2266. //=====================================================================================================================================================================================
  2267. function lf_BarcdLbPrtSato(pid, patnm, gbn, rrgstno1, rrgstno2, barpid, excugrp, currentdate, sex, age)
  2268. {
  2269. // var barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo";
  2270. var sPrntKind = ds_data_setupinfo.getColumn(0,"prntkind");
  2271. var portOpenCheck = "";
  2272. var LCount = 0;
  2273. var iXPos = 0;
  2274. var iYPos = 0;
  2275. var sSndMsg = "";
  2276. if (sPrntKind == 0) return;
  2277. var sCommKind = ds_data_setupinfo.getColumn(0,"commkind");
  2278. var sLeftBank = ds_data_blank.getColumn(0,"left");
  2279. var sTopBank = ds_data_blank.getColumn(0,"top");
  2280. if (utlf_isNull(sLeftBank) || sLeftBank == "-") sLeftBank = 0;
  2281. if (utlf_isNull(sTopBank) || sTopBank == "-") sTopBank = 0;
  2282. var sSndMsg = "";
  2283. var sBcNo = "";
  2284. var iprintcnt = 0;
  2285. // var styleFlags = model.getValue("/root/main/patrem/prcpdeliveinfo/prcpdelivefact").split("]");
  2286. //
  2287. // var cmt = styleFlags[0];
  2288. sSndMsg = String.fromCharCode(27)+"A"+String.fromCharCode(27)+"A103500500"; // 시작위치 셋팅
  2289. iXPos = Number(sLeftBank) + 20;
  2290. iYPos = Number(sTopBank) + 75;
  2291. sSndMsg += String.fromCharCode(27)+"V" + iXPos + String.fromCharCode(27)+"H" + iYPos + String.fromCharCode(27)+"BG02100" + "*"+pid+' '+excugrp+"*";
  2292. // 등록번호 + 그룹코드
  2293. iXPos = Number(sLeftBank) + 140;
  2294. iYPos = Number(sTopBank) + 130;
  2295. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), "*"+pid+' '+excugrp+"*", 0.5, 1);
  2296. // 등록번호
  2297. iXPos = Number(sLeftBank) + 30;
  2298. iYPos = Number(sTopBank) + 180;
  2299. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), pid, 2.5, 1);
  2300. // 그룹코드
  2301. iXPos = Number(sLeftBank) + 380;
  2302. iYPos = Number(sTopBank) + 180;
  2303. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), excugrp, 2.5, 1);
  2304. // 환자명
  2305. iXPos = Number(sLeftBank) + 30;
  2306. iYPos = Number(sTopBank) + 230;
  2307. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), patnm, 2.5, 1);
  2308. // 성별
  2309. iXPos = Number(sLeftBank) + 260;
  2310. iYPos = Number(sTopBank) + 230;
  2311. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), sex, 2.5, 1);
  2312. //나이
  2313. iXPos = Number(sLeftBank) + 380;
  2314. iYPos = Number(sTopBank) + 230;
  2315. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), age, 2.5, 1);
  2316. //주민번호
  2317. iXPos = Number(sLeftBank) + 280;
  2318. iYPos = Number(sTopBank) + 300;
  2319. sSndMsg += CommAX.PrtImgOut(parseInt(iYPos), parseInt(iXPos), rrgstno1+"-"+gbn, 1.5 , 0.5);
  2320. sSndMsg += String.fromCharCode(27)+"Q" + "1" + String.fromCharCode(27)+"Z";
  2321. CommAX.SendMsg(sSndMsg);
  2322. }
  2323. /****************************************************************************************
  2324. * Argument : grdobj : 목적그리드
  2325. * : colobj : 목적ColRef
  2326. * : xpath : 목적노드set
  2327. * Description : Buffering Send check.
  2328. ****************************************************************************************/
  2329. function aezfSendMarkBuf(grdobj, colobj) {
  2330. // var colref_viewcnts = grdobj.colref(colobj);
  2331. // var rowidx;
  2332. var bufCnts = "";
  2333. var selectedRows = grdf_getSelectedRows(grdobj);
  2334. var xpath = objects[grdobj.binddataset];
  2335. for (var i = 0; i < selectedRows.length; i++){
  2336. bufCnts += xpath.getColumn(selectedRows[i], colobj) + "\r\n";
  2337. }
  2338. // window.clipBoardData = bufCnts;
  2339. system.setClipboard("CF_TEXT", bufCnts);
  2340. }
  2341. /****************************************************************************************
  2342. * Argument : targetXpath : 목적데이타셋
  2343. * : cdGroupID : 코드그룹
  2344. * : codeName : 추가할 코드명
  2345. * : codeID : 추가할 코드값
  2346. * : baseXpath : 소스데이타셋
  2347. * Description : 데이터셋을 새로 생상하여 소스데이터셋을 카피하면서 로우 추가
  2348. ****************************************************************************************/
  2349. function aezfInsertInstance2(targetXpath, cdGroupID, codeName, codeID, baseXpath) {
  2350. dsf_createDs(targetXpath);
  2351. objects[targetXpath].copyData(baseXpath);
  2352. if(utlf_isNull(objects[targetXpath].getColumnInfo("cdid"))) {
  2353. objects[targetXpath].addColumn("cdid","string");
  2354. }
  2355. if(utlf_isNull(objects[targetXpath].getColumnInfo("cdnm"))) {
  2356. objects[targetXpath].addColumn("cdnm","string");
  2357. }
  2358. objects[targetXpath].insertRow(0);
  2359. objects[targetXpath].setColumn(0,"cdnm",codeName);
  2360. objects[targetXpath].setColumn(0,"cdid",codeID);
  2361. }
  2362. /****************************************************************************************
  2363. * Argument : SPAEB00201_PARAM1 : 검색구분(cd/nm)
  2364. * : SPAEB00201_PARAM2 : 검색조건(코드/명칭)
  2365. * : SPAEB00201_PARAM3 : multiyn
  2366. * : SPAEB00201_PARAM4 : multi선택 시 setting할 목적노드
  2367. * : SPAEB00201_PARAM5 : code값을 setting할 목적노드
  2368. * : SPAEB00201_PARAM6 : name값을 setting할 목적노드
  2369. * : SPAEB00201_PARAM7 : 수가를 setting할 목적노드
  2370. * Description : 수가내역 가져오기
  2371. ****************************************************************************************/
  2372. function fGetCalScorCd(vCond, vCdnm, bMultiyn, vMultiDestXPath, vCdDestXPath, vNmDestXPath, vAmtDestXPath) {
  2373. frmf_clearParameter("SPAEB00201_PARAM1");
  2374. frmf_clearParameter("SPAEB00201_PARAM2");
  2375. frmf_clearParameter("SPAEB00201_PARAM3");
  2376. frmf_clearParameter("SPAEB00201_PARAM4");
  2377. frmf_clearParameter("SPAEB00201_PARAM5");
  2378. frmf_clearParameter("SPAEB00201_PARAM6");
  2379. //frmf_clearParameter("SPAEB00201_PARAM7");
  2380. frmf_setParameter ("SPAEB00201_PARAM1", vCond);
  2381. frmf_setParameter ("SPAEB00201_PARAM2", vCdnm);
  2382. frmf_setParameter ("SPAEB00201_PARAM3", bMultiyn);
  2383. frmf_setParameter ("SPAEB00201_PARAM4", vMultiDestXPath);
  2384. frmf_setParameter ("SPAEB00201_PARAM5", vCdDestXPath);
  2385. frmf_setParameter ("SPAEB00201_PARAM6", vNmDestXPath);
  2386. //frmf_setParameter ("SPAEB00201_PARAM7" , vAmtDestXPath);
  2387. frmf_modal("SPAEB00201", "SPAEB00201", "", "", "", "", "", "", "", "", "", "", "M");
  2388. }
  2389. /**@desc : 함수 호출시 선택된 데이터를 특정 노드에 담아둔다.
  2390. * @param1 : bufCnt: 첫번째 cnt일때 기존 노드를 삭제하기 위한 count
  2391. * @param2 : bufRow: 노드에 담아놓을 그리드 row
  2392. * @param4 : strDest: 목적지 주소값
  2393. * @param3 : strSrc: 출발지 주소값
  2394. * @return : void
  2395. * @authur : 마정민 2007. 4. 3
  2396. */
  2397. function fPrcpBuffer( bufCnt, bufRow, strDest, strSrc ) {
  2398. var ds_src = this.objects[strSrc];
  2399. var ds_dest = this.objects[strDest];
  2400. if (bufCnt == 1) { //첫번째 데이터이면 기존 노드를 삭제한다.
  2401. ds_dest.clearData();
  2402. }
  2403. //대상노드로 복사한다.
  2404. var toRow = ds_dest.addRow();
  2405. ds_dest.copyRow(toRow, ds_src, bufRow);
  2406. }
  2407. /**
  2408. * 수가내역 대상그리드 set=======================================================================================================================================
  2409. * vGrdObj : 대상그리드
  2410. * vSrcXPath : 목적노드set
  2411. * vDupCheckCo : dup check column no
  2412. * vDupCheck : dup check yn
  2413. * vCodeNode : 수가코드 목적 노드
  2414. * vNameNode : 수가처방명 목적 노드
  2415. * vHeaderAddRows : header row default값(1) 보다 큰 row수
  2416. */
  2417. //function fSetOcd(vGrdObj, vSrcXPath, vDupCheckCol, vDupCheck, vCodeNode, vNameNode, vSessiondept, vHeaderAddRows ) {
  2418. function fSetOcd(vGrdObj, vSrcXPath, vDupCheckCol, vDupCheck, vCodeNode, vNameNode, vSessiondept) {
  2419. if(utlf_isNull(vGrdObj)) return ;
  2420. if(utlf_isNull(vSrcXPath)) return ;
  2421. if( ds_temp.getColumn(0,"okflag") != "ok" ) return ;
  2422. var nodesetT = objects[vGrdObj.binddataset];
  2423. var nodesetS = objects[vSrcXPath];
  2424. var grdcnt = nodesetT.rowcount;
  2425. var cnt = nodesetS.rowcount;
  2426. // if( !utlf_isNull(vHeaderAddRows) ){
  2427. // grdcnt = parseInt( nodesetT.rowcount ) - parseInt( vHeaderAddRows ) ;
  2428. // }
  2429. var vDupCheckVal = "";
  2430. var i = 0;
  2431. if( cnt == 1 ) {
  2432. vDupCheckVal = nodesetS.getColumn(0,"calcscorcd" );
  2433. if( vDupCheck == "Y" ) {
  2434. if( lf_checkDup(vGrdObj , vDupCheckCol, vDupCheckVal ) == false ){
  2435. if( sysf_messageBox("중복되는 수가코드[" + vDupCheckVal + "] 를 추가", "S001") != 6 ){
  2436. return ;
  2437. }
  2438. }
  2439. }
  2440. nodesetT.addRow();
  2441. if( !utlf_isNull(vCodeNode) ){
  2442. nodesetT.setColumn(grdcnt,"" + vCodeNode , vDupCheckVal );
  2443. }
  2444. if( !utlf_isNull(vNameNode) ){
  2445. nodesetT.setColumn(grdcnt,"" + vNameNode , nodesetS.getColumn(0,"ordnm" ) );
  2446. }
  2447. nodesetT.addColumn("excucd","string" );
  2448. nodesetT.addColumn("excucdnm","string" );
  2449. nodesetT.addColumn("basesuppdeptcd","string" );
  2450. nodesetT.addColumn("prcpexecdeptcd1","string" );
  2451. nodesetT.addColumn("prcpexecdeptcd1","string" );
  2452. nodesetT.setColumn(grdcnt,"excucd" , vDupCheckVal );
  2453. nodesetT.setColumn(grdcnt,"excucdnm" , nodesetS.getColumn(0,"ordnm" ) );
  2454. nodesetT.setColumn(grdcnt,"basesuppdeptcd" , vSessiondept );
  2455. nodesetT.setColumn(grdcnt,"excutodd" , '99991231' );
  2456. nodesetT.setColumn(grdcnt,"prcpexecdeptcd" , nodesetS.getColumn(0,"prcpexecdeptcd" ) );
  2457. nodesetT.setColumn(grdcnt,"prcpexecdeptcd1" , nodesetS.getColumn(0,"prcpexecdeptcd" ) );
  2458. nodesetT.setColumn(grdcnt,"anotestyn" , "Y" );
  2459. nodesetT.setColumn(grdcnt,"rsrvupdtcncllimdayno", "0" );
  2460. // 2010.11.19 c y w 검사코드 추가시 기본값셋팅
  2461. nodesetT.setColumn(grdcnt,"excuclscd" , "-");
  2462. nodesetT.setColumn(grdcnt,"eqmtifyn" , "N");
  2463. nodesetT.setColumn(grdcnt,"readdrid3nm" , "-");
  2464. nodesetT.setColumn(grdcnt,"rsltdispyn" , "Y");
  2465. nodesetT.setColumn(grdcnt,"rsltdispgbn" , nodesetS.getColumn(0,"rsltdispgbn" ) );
  2466. nodesetT.setColumn(grdcnt,"partcntstats" , "1");
  2467. nodesetT.setColumn(grdcnt,"phocntstats" , "1");
  2468. nodesetT.setColumn(grdcnt,"curetims" , "1");
  2469. nodesetT.setColumn(grdcnt,"rsrvexcupossyn" , "Y");
  2470. nodesetT.setColumn(grdcnt,"rsrvplceflag" , "2");
  2471. nodesetT.setColumn(grdcnt,"excutm" , "0");
  2472. nodesetT.setColumn(grdcnt,"rsrvmultitmplcd" , "-");
  2473. nodesetT.setColumn(grdcnt,"rsrvexmpcnt" , "1");
  2474. nodesetT.setColumn(grdcnt,"rsrvupdtcncllimdayno", "0");
  2475. nodesetT.setColumn(grdcnt,"pacsnocretyn" , "N");
  2476. nodesetT.setColumn(grdcnt,"etceqmtifyn" , "-");
  2477. nodesetT.setColumn(grdcnt,"anotestyn" , "Y");
  2478. nodesetT.setColumn(grdcnt,"prcpexecdeptcd" , nodesetS.getColumn(0,"prcpexecdeptcd" ) );
  2479. nodesetT.setColumn(grdcnt,"prcpexecdeptcd1" , nodesetS.getColumn(0,"prcpexecdeptcd" ) );
  2480. } else {
  2481. nodesetT.addColumn("excucd","string" );
  2482. nodesetT.addColumn("excucdnm","string" );
  2483. nodesetT.addColumn("basesuppdeptcd","string" );
  2484. nodesetT.addColumn("prcpexecdeptcd","string" );
  2485. nodesetT.addColumn("prcpexecdeptcd1","string" );
  2486. for( var i = 0 ; i < cnt ; i++ ){
  2487. vDupCheckVal = nodesetS.getColumn(i,"calcscorcd" );
  2488. if( vDupCheck == "Y" ) {
  2489. if( lf_checkDup(vGrdObj , vDupCheckCol, vDupCheckVal ) == false ){
  2490. if( sysf_messageBox("중복되는 수가코드[" + vDupCheckVal + "] 를 추가", "S001") != 6 ){
  2491. continue ;
  2492. }
  2493. }
  2494. }
  2495. nodesetT.addRow();
  2496. if( !utlf_isNull(vCodeNode) ){
  2497. nodesetT.setColumn(grdcnt,"" + vCodeNode , vDupCheckVal );
  2498. }
  2499. if( !utlf_isNull(vNameNode) ){
  2500. nodesetT.setColumn(grdcnt,"" + vNameNode , nodesetS.getColumn(i,"ordnm" ) );
  2501. }
  2502. nodesetT.setColumn(grdcnt,"excucd" , vDupCheckVal );
  2503. nodesetT.setColumn(grdcnt,"excucdnm" , nodesetS.getColumn(i,"ordnm" ) );
  2504. nodesetT.setColumn(grdcnt,"basesuppdeptcd" , vSessiondept );
  2505. nodesetT.setColumn(grdcnt,"excutodd" , '99991231' );
  2506. nodesetT.setColumn(grdcnt,"prcpexecdeptcd" , nodesetS.getColumn(i,"prcpexecdeptcd" ) );
  2507. nodesetT.setColumn(grdcnt,"anotestyn" , "Y" );
  2508. nodesetT.setColumn(grdcnt,"rsrvupdtcncllimdayno", "0" );
  2509. // 2010.11.19 c y w 검사코드 추가시 기본값셋팅
  2510. nodesetT.setColumn(grdcnt,"excuclscd" , "-");
  2511. nodesetT.setColumn(grdcnt,"eqmtifyn" , "N");
  2512. nodesetT.setColumn(grdcnt,"readdrid3nm" , "-");
  2513. nodesetT.setColumn(grdcnt,"rsltdispyn" , "Y");
  2514. nodesetT.setColumn(grdcnt,"rsltdispgbn" , nodesetS.getColumn(i,"rsltdispgbn" ) );
  2515. nodesetT.setColumn(grdcnt,"partcntstats" , "1");
  2516. nodesetT.setColumn(grdcnt,"phocntstats" , "1");
  2517. nodesetT.setColumn(grdcnt,"curetims" , "1");
  2518. nodesetT.setColumn(grdcnt,"rsrvexcupossyn" , "Y");
  2519. nodesetT.setColumn(grdcnt,"rsrvplceflag" , "2");
  2520. nodesetT.setColumn(grdcnt,"excutm" , "0");
  2521. nodesetT.setColumn(grdcnt,"rsrvmultitmplcd" , "-");
  2522. nodesetT.setColumn(grdcnt,"rsrvexmpcnt" , "1");
  2523. nodesetT.setColumn(grdcnt,"rsrvupdtcncllimdayno", "0");
  2524. nodesetT.setColumn(grdcnt,"pacsnocretyn" , "N");
  2525. nodesetT.setColumn(grdcnt,"etceqmtifyn" , "-");
  2526. nodesetT.setColumn(grdcnt,"anotestyn" , "Y");
  2527. nodesetT.setColumn(grdcnt,"prcpexecdeptcd" , nodesetS.getColumn(i,"prcpexecdeptcd" ) );
  2528. nodesetT.setColumn(grdcnt,"prcpexecdeptcd1" , nodesetS.getColumn(i,"prcpexecdeptcd1" ) );
  2529. grdcnt++;
  2530. }
  2531. }
  2532. }
  2533. function aezfTrim(code1, value)
  2534. {
  2535. var startPoint = 0; // subString 하기 위한 시작 포인트
  2536. var endPoint = String(code1).length; // subString 하기 위한 끝 포인트
  2537. while( (startPoint < endPoint) && (String(code1).charCodeAt(startPoint) == value) )
  2538. {
  2539. startPoint++;
  2540. }
  2541. while( (startPoint < endPoint) && (String(code1).charCodeAt(endPoint-1) == value) )
  2542. {
  2543. endPoint--;
  2544. }
  2545. return ( (startPoint > 0) || (endPoint < String(code1).length) ) ? code1.substring(startPoint, endPoint) : code1;
  2546. }
  2547. //=====================================================================================================================================================================================
  2548. // @ 문자전송 20180912 kya
  2549. //=====================================================================================================================================================================================
  2550. function fSmsSend(msgcnts, pid, hngnm, mpphonno, deptcd, gubun){
  2551. ds_main_sms.clearData();
  2552. ds_send_sms.clearData();
  2553. ds_send_sms.addRow();
  2554. ds_send_sms.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  2555. ds_send_sms.setColumn(0, "data", deptcd);
  2556. ds_send_sms.setColumn(0, "condflag", "4");
  2557. var oParam = {};
  2558. oParam.id = "TRZSU00803";
  2559. oParam.service = "userdeptinfoapp.UserDeptInfo";
  2560. oParam.method = "reqGetDeptPhoneNoPlce";
  2561. oParam.inds = "req=ds_send_sms";
  2562. oParam.outds = "ds_main_sms=deptinfo";
  2563. oParam.async = false;
  2564. // oParam.callback = "cf_TRZSU00803";
  2565. tranf_submit(oParam);
  2566. if (arErrorCode.pop("TRZSU00803") < 0) {
  2567. return;
  2568. }
  2569. var calltelno = utlf_transNullToEmpty(ds_main_sms.getColumn(0, "cntctel"));
  2570. ds_send_sms.setColumn(0, "calltype", "msgcall");
  2571. ds_send_sms.setColumn(0, "insuflag", "3");
  2572. ds_send_sms.setColumn(0, "msgcnts", msgcnts);
  2573. ds_send_sms.setColumn(0, "calltelno", calltelno);
  2574. ds_send_rcv.clearData();
  2575. ds_send_rcv.addRow();
  2576. ds_send_rcv.setColumn(0, "usernm", hngnm);
  2577. ds_send_rcv.setColumn(0, "userid", sysf_getUserInfo("userid"));
  2578. ds_send_rcv.setColumn(0, "mpphonno", mpphonno);
  2579. ds_send_rcv.setColumn(0, "pid", pid);
  2580. ds_send_rcv.setColumn(0, "deptcd", deptcd);
  2581. ds_main_sms.clearData();
  2582. var oParam = {};
  2583. oParam.id = "TXZMI00202";
  2584. oParam.service = "instantmsgapp.InstantMsg";
  2585. oParam.method = "reqExeSendUserMessage";
  2586. oParam.inds = "req=ds_send_sms "
  2587. + "recvr=ds_send_rcv";
  2588. oParam.outds = "ds_main_sms=succnt";
  2589. oParam.async = false;
  2590. // oParam.callback = "cf_TXZMI00202";
  2591. tranf_submit(oParam);
  2592. if (arErrorCode.pop("TXZMI00202") < 0) {
  2593. return;
  2594. }
  2595. }
  2596. /****************************************************************************************
  2597. * Function : fPMIFPrintBarCode
  2598. * Description : 바코드 출력 함수(DSC, ER간호에서도 사용)
  2599. * Argument : 01.pPid : 등록번호
  2600. * : 02.pIndd : 입원일자
  2601. * : 03.pCretno : 생성번호
  2602. * : 04.pMskind : 주부유형
  2603. * : 05.pHiststat : 이력상태
  2604. * : 06.pSetyn : 프린터설정정보 셋팅여부
  2605. * : 07.pScrid : 프린터설정정보 조회용 화면 아이디
  2606. * : 08.pBarcdRef : 설정정보 xpath
  2607. * : 09.pRoomyn : 병실코드
  2608. * : 10.pIsNEW :
  2609. * : 10.pAfrsYn : 업무여부
  2610. * return type : String - dataset name
  2611. * Creator : PAM
  2612. ****************************************************************************************/
  2613. function fPMIFPrintBarCode(pPid, pIndd, pCretno, pMskind, pHiststat, pSetyn, pScrid, pBarcdRef)
  2614. {
  2615. var objExtCommon = new ExtCommon();
  2616. // 1. 공통[시작] - 2009.05.25
  2617. dsf_createDs("ds_send_data60", [{col:"pid"},
  2618. {col:"usernm"},
  2619. {col:"gubun"},
  2620. {col:"cardid1"},
  2621. {col:"indd"}]);
  2622. ds_send_data60.addRow();
  2623. dsf_createDs("ds_hidden_h_receipt_receipt", [{col:"pid"},
  2624. {col:"hngnm"},
  2625. {col:"hngnm2"},
  2626. {col:"gbn"},
  2627. {col:"rrgstno"},
  2628. {col:"sex"},
  2629. {col:"age"},
  2630. {col:"wardcddeptengabbr"},
  2631. {col:"excupartcd"},
  2632. {col:"roomcd"},
  2633. {col:"examroomnm"},
  2634. {col:"wardcdnm"},
  2635. {col:"prcphopedd"},
  2636. {col:"newprintflag"},
  2637. {col:"btype"},
  2638. {col:"rfidyn"},
  2639. {col:"rfidcardid1"},
  2640. {col:"babyyn"}
  2641. ]);
  2642. ds_hidden_h_receipt_receipt.addRow();
  2643. ds_hidden_h_receipt_receipt.setColumn(0,"pid", ds_subordlist1.getColumn(0,"pid"));
  2644. ds_hidden_h_receipt_receipt.setColumn(0,"hngnm", ds_subordlist1.getColumn(0,"patnm"));
  2645. ds_hidden_h_receipt_receipt.setColumn(0,"hngnm2", ds_subordlist1.getColumn(0,"patnm"));
  2646. ds_hidden_h_receipt_receipt.setColumn(0,"btype", ds_subordlist1.getColumn(0,"btype"));
  2647. ds_hidden_h_receipt_receipt.setColumn(0,"rrgstno", ds_subordlist1.getColumn(0,"rgstno"));
  2648. //ds_hidden_h_receipt_receipt.setColumn(0,"rsrvdd", "");
  2649. if (ds_subordlist1.getColumn(0,"sna").substr(0,1) == "M") ds_hidden_h_receipt_receipt.setColumn(0,"sex", "남");
  2650. if (ds_subordlist1.getColumn(0,"sna").substr(0,1) == "F") ds_hidden_h_receipt_receipt.setColumn(0,"sex", "여");
  2651. ds_hidden_h_receipt_receipt.setColumn(0,"age", ds_subordlist1.getColumn(0,"sna").substr(2));
  2652. ds_hidden_h_receipt_receipt.setColumn(0,"wardcddeptengabbr", ds_subordlist1.getColumn(0,"prcpgenrflag"));
  2653. ds_hidden_h_receipt_receipt.setColumn(0,"excupartcd", "");
  2654. ds_hidden_h_receipt_receipt.setColumn(0,"roomcd", "");
  2655. ds_hidden_h_receipt_receipt.setColumn(0,"examroomnm", ds_subordlist1.getColumn(0,"orddrnm"));
  2656. ds_hidden_h_receipt_receipt.setColumn(0,"wardcdnm", ds_subordlist1.getColumn(0,"orddepthngnm"));
  2657. ds_hidden_h_receipt_receipt.setColumn(0,"prcphopedd", ds_subordlist1.getColumn(0,"prcpdd"));
  2658. ds_hidden_h_receipt_receipt.setColumn(0,"newprintflag", ds_subordlist1.getColumn(0,"newprintflag"));
  2659. //ds_hidden_h_receipt_receipt.setColumn(0,"rfidyn", ds_subordlist1.getColumn(0,"rfidyn"));
  2660. ds_hidden_h_receipt_receipt.setColumn(0,"rfidyn", 'Y');
  2661. var rfidcardid1 = 'P' + utlf_lPad(ds_subordlist1.getColumn(0,"pid"), 9,'0')+'0000'; //환자구분 + 환자번호 +일련번호고정
  2662. ds_hidden_h_receipt_receipt.setColumn(0,"rfidcardid1", rfidcardid1);
  2663. //공통코드 P0045에서 프린터 명칭과 트레이 호출
  2664. fGetPrintName();
  2665. // 프린터정보
  2666. var print_name = "";
  2667. // 트레이정보
  2668. var print_tray = "";
  2669. var resultFlag = "";
  2670. // 6세미만 체크
  2671. if (ds_hidden_h_receipt_receipt.getColumn(0, "age") < 6) {
  2672. resultFlag = sysf_messageBox("6세미만 환자입니다!!! \r\n\r\n소아용팔찌를 출력", "S006", "\r\n성인용팔찌를 출력|\r\n출력을 취소");
  2673. // 취소한 경우
  2674. if (resultFlag == "2") {
  2675. return;
  2676. }
  2677. }
  2678. // 소아용
  2679. if (resultFlag == "6") {
  2680. // 신형 프린터 설정
  2681. if (ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "Y" || ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "B") {
  2682. print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_13_nm", "p")); // SLP-T401
  2683. print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_13_tray", "p"));
  2684. // 구형 프린터 설정
  2685. } else {
  2686. print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_11_nm", "p")); // HC101
  2687. print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_11_tray", "p"));
  2688. }
  2689. ds_hidden_h_receipt_receipt.setColumn(0, "babyyn", "Y"); // 소아용
  2690. // 성인용
  2691. } else {
  2692. // 신형 프린터 설정
  2693. if (ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "Y" || ds_hidden_h_receipt_receipt.getColumn(0, "newprintflag") == "A") {
  2694. print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_12_nm", "p")); // SLP-T400
  2695. print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_12_tray", "p"));
  2696. // 구형 프린터 설정
  2697. } else {
  2698. print_name = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_8_nm", "p")); // HC100
  2699. print_tray = utlf_transNullToEmpty(sysf_getGlobalVariable("SPPAO00100_P0045_8_tray", "p"));
  2700. }
  2701. ds_hidden_h_receipt_receipt.setColumn(0, "babyyn", "N"); // 성인용
  2702. }
  2703. // }
  2704. // 호출끝
  2705. //trace("print_name = " + print_name );
  2706. // 신형팔찌용 렉스퍼트
  2707. if (print_name == 'SLP-T400' || print_name == 'SLP-T401') {
  2708. var objDOM = rptf_createDOM(); // DOM 객체 설정
  2709. rptf_setNodeListToDOM(objDOM, "/root/hidden/h_receipt/receipt", ds_hidden_h_receipt_receipt); // 데이터셋 1
  2710. var objParam = new Object();
  2711. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  2712. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;show=1";
  2713. var prnopt = "offsety=1;printername="+print_name;
  2714. var rfidyn = ds_hidden_h_receipt_receipt.getColumn(0, "rfidyn");
  2715. //sysf_messageBox("222");
  2716. rptf_exeReportPreview30(["RPPMI03202"],[objParam], option, prnopt);
  2717. // if (rfidyn == "Y") {
  2718. //
  2719. // ds_send_data60.setColumn(0, "pid", pPid);
  2720. // ds_send_data60.setColumn(0, "usernm", ds_hidden_h_receipt_receipt.getColumn(0, "patnm"));
  2721. // ds_send_data60.setColumn(0, "gubun", "P");
  2722. // ds_send_data60.setColumn(0, "cardid1", ds_hidden_h_receipt_receipt.getColumn(0, "rfidcardid1"));
  2723. // ds_send_data60.setColumn(0, "indd", pIndd);
  2724. //
  2725. // var oParam = {};
  2726. // oParam.id = "TXPMC06606";
  2727. // oParam.service = "pamcomnapp.RFID";
  2728. // oParam.method = "reqInsPatRFIDInfo";
  2729. // oParam.inds = "req=ds_send_data60";
  2730. // oParam.outds = "";
  2731. // oParam.async = false;
  2732. // //oParam.callback = "cf_TRPMI00115";
  2733. //
  2734. // tranf_submit(oParam);
  2735. // }
  2736. //exeReportPreview("RPPMI03203", "XMLSTR" , "" , "" , print_name , "", "", "", "", "true", "", "", print_tray);
  2737. // 기존팔찌용 렉스퍼트
  2738. } else {
  2739. var objDOM = rptf_createDOM(); // DOM 객체 설정
  2740. rptf_setNodeListToDOM(objDOM, "/root/hidden/h_receipt/receipt", ds_hidden_h_receipt_receipt); // 데이터셋 1
  2741. var objParam = new Object();
  2742. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  2743. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0;show=1";
  2744. var prnopt = "offsety=1;printername="+print_name;
  2745. rptf_exeReportPreview30(["RPPMI03201"],[objParam], option, prnopt);
  2746. // exeReportPreview("RPPMI03201", "XMLSTR" , "" , "" , print_name , "", "", "", "", "true", "", "", print_tray);
  2747. }
  2748. }]]></Script>