MRF03800.xjs 196 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
  3. include "emr_prcpmngtxp::MMO001.xjs";
  4. //=======================================================================================
  5. // Global Form Variable
  6. //---------------------------------------------------------------------------------------
  7. var fso = inff_fileSystemObject();
  8. //var gv_ImgeSavePath = "C:/BCP_OCR_Image/";
  9. var gv_ImgeSavePath = system.convertRealPath("%MYDOCUMENT%") + "\KU20\\BCP_OCR_Image\\";
  10. //var gv_BCPINIPath = document.location;
  11. var gv_Logo_ImgePath = "../../../com/commonweb/images";
  12. var gTimerID;
  13. var CLIP_FLAG = false;
  14. var gocrprntyn = "Y";
  15. /**
  16. * @desc : 수가와 매핑된 서식 조회를 위한 인터페이스
  17. *
  18. * @param :
  19. * @return :
  20. * @author : HIT EMR Team
  21. * @---------------------------------------------------
  22. */
  23. function fCalcScorInterface(pid, orddd, cretno, ordtype, calcscorcd, ocrprntyn, orddeptcd, payflagcd){
  24. if((utlf_isNull(pid)) || (utlf_isNull(orddd)) || (utlf_isNull(cretno)) || (utlf_isNull(ordtype))){
  25. sys_messageBox("원무접수 정보가", "I004");
  26. return;
  27. }
  28. if ( ocrprntyn == "N" ){
  29. gocrprntyn = "N";
  30. }
  31. var formtypecls = "";
  32. var ocrtagprntyn = "";
  33. var formcd = "";
  34. var formfromddt = "";
  35. var calcscorcdList = "";
  36. var arrycalcscorcd = calcscorcd.split("▦");
  37. var formcd_calc = "";
  38. var prcp_rtn = "";
  39. var popyn = "";
  40. var node = sysf_getGlobalVariable("paminfo");
  41. dsf_setCSVToDs("ds_main_paminfo", node);
  42. for(var i = 1; i <= arrycalcscorcd.length -1; i++){
  43. calcscorcdList = calcscorcdList + arrycalcscorcd[i-1];
  44. if(i < arrycalcscorcd.length -1){
  45. calcscorcdList = calcscorcdList + ",";
  46. }
  47. }
  48. var payflag = payflagcd.substr(0,1);
  49. if (payflag == "2") {
  50. var condflag = "Y";
  51. }
  52. else {
  53. var condflag = "N";
  54. }
  55. ds_send_reqdata.setColumn(0,"calcscorcd",calcscorcdList);
  56. ds_send_reqdata.setColumn(0,"condflag",condflag);
  57. dsf_createDs("ds_main_formexinfo", [{col:"trgtcd", type:"STRING", size:256}
  58. , {col:"trgtcdnm", type:"STRING", size:256}
  59. , {col:"hardspec", type:"STRING", size:256}]);
  60. var oParam = {};
  61. oParam.id = "TRMRF03808";
  62. oParam.service = "formmngtapp.OcrPreViewMngt";
  63. oParam.method = "reqGetCalcScorForm";
  64. oParam.inds = "req=ds_send_reqdata";
  65. oParam.outds = "ds_main_forminfo=forminfo ds_main_formexinfo=formexinfo";
  66. oParam.async = false;
  67. //oParam.callback = "cf_TRMRF03808";
  68. tranf_submit(oParam);
  69. //서식별 동의서 출력 예외부서(20171230)
  70. var excnt = ds_main_formexinfo.getCaseCount("trgtcdnm == '"+arrycalcscorcd[0]+"'");
  71. if (excnt > 0) {
  72. return "X";
  73. }
  74. //시행부서 처방에서 동의서 출력유무
  75. var openWin = frmf_findPopup("SMMMO00200");
  76. var popcnt = ds_main_forminfo.getCaseCount("popyn == 'Y'");
  77. if (openWin != null && popcnt> 0) {
  78. if ( 6 != sysf_messageBox("동의서를 출력하시겠습니까?","Q") ) {
  79. return "X";
  80. }
  81. }
  82. // CLIP 전자 동의서를 통한 출력 여부 확인
  83. var clipPrntFlag = false;
  84. if (lf_ContainsHardCD("6921", "Y") && !lf_ContainsHardCD("6926", orddeptcd) && !lf_ContainsHardCD("6927", sysf_getUserId())) {
  85. clipPrntFlag = true;
  86. for (var i = 0; i < ds_main_forminfo.rowcount; i++) {
  87. if (lf_ContainsHardCD("6922", ds_main_forminfo.getColumn(i, "formcd"))) {
  88. clipPrntFlag = false;
  89. break;
  90. }
  91. }
  92. }
  93. ds_clip_info.setColumn(0, "formcdarr", "");
  94. ds_clip_info.setColumn(0, "ocrtagarr", "");
  95. var formCdArr = "";
  96. var ocrTagArr = "";
  97. var formList = ds_main_forminfo.rowcount;
  98. for (var i = 0; i < formList; i++) {
  99. formcd = ds_main_forminfo.getColumn(i, "formcd");
  100. formfromdt = ds_main_forminfo.getColumn(i, "formfromdt");
  101. formtypecls = ds_main_forminfo.getColumn(i, "formtypecls");
  102. ocrtagprntyn = ds_main_forminfo.getColumn(i, "ocrtagprntyn");
  103. formcd_calc = ds_main_forminfo.getColumn(i, "calcscorcd");
  104. popyn = ds_main_forminfo.getColumn(i, "popyn");
  105. var ocrTag = "";
  106. // CLIP 전자 동의서를 통한 출력일 경우, OCR Tag 만 획득한다.
  107. if (clipPrntFlag) {
  108. fmakeOCRTag();
  109. ocrTag = ds_main_ocrtag.getColumn(0, "tag");
  110. formCdArr += formcd + ( i < formList - 1 ? "," : "" );
  111. ocrTagArr += ocrTag + ( i < formList - 1 ? "," : "" );
  112. } else {
  113. fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, null, null, null, false);
  114. // Delay 처리
  115. var timeOut = utlf_getNewDate();
  116. timeOut.setSeconds(timeOut.getSeconds() + 1);
  117. while(true) {
  118. var currDate = utlf_getNewDate();
  119. if (timeOut < currDate) {
  120. break;
  121. }
  122. }
  123. ocrTag = fPrint();
  124. }
  125. var arry_calccd = utlf_transNullToEmpty(formcd_calc).split(",");
  126. for (var j = 0; j < arry_calccd.length; j++) {
  127. prcp_rtn += arry_calccd[j] + "▦" + ocrTag + "▦";
  128. }
  129. }
  130. ds_clip_info.setColumn(0, "formcdarr", formCdArr);
  131. ds_clip_info.setColumn(0, "ocrtagarr", ocrTagArr);
  132. return prcp_rtn;
  133. }
  134. function fCalcScorInterface_CLIP(pid, orddd, cretno, ordtype, calcscorcd, orddeptcd, prntflag, payflagcd) {
  135. if ((utlf_isNull(pid)) || (utlf_isNull(orddd)) || (utlf_isNull(cretno)) || (utlf_isNull(ordtype))){
  136. sysf_messageBox("원무접수 정보가", "I004");
  137. return "X";
  138. }
  139. var calcscorcdList = "";
  140. var arrycalcscorcd = calcscorcd.split("▦");
  141. for (var i = 1; i <= arrycalcscorcd.length -1; i++) {
  142. calcscorcdList += arrycalcscorcd[i - 1];
  143. if (i < arrycalcscorcd.length -1) {
  144. calcscorcdList += ",";
  145. }
  146. }
  147. var payflag = payflagcd.substr(0,1);
  148. if (payflag == "2") {
  149. var condflag = "Y";
  150. }
  151. else {
  152. var condflag = "N";
  153. }
  154. ds_send_reqdata.setColumn(0, "calcscorcd", calcscorcdList);
  155. ds_send_reqdata.setColumn(0, "condflag", condflag);
  156. dsf_createDs("ds_main_formexinfo", [{col:"trgtcd", type:"STRING", size:256}
  157. , {col:"trgtcdnm", type:"STRING", size:256}
  158. , {col:"hardspec", type:"STRING", size:256}]);
  159. var oParam = {};
  160. oParam.id = "TRMRF03808";
  161. oParam.service = "formmngtapp.OcrPreViewMngt";
  162. oParam.method = "reqGetCalcScorForm";
  163. oParam.inds = "req=ds_send_reqdata";
  164. oParam.outds = "ds_main_forminfo=forminfo "
  165. + "ds_main_formexinfo=formexinfo";
  166. oParam.async = false;
  167. tranf_submit(oParam);
  168. // 서식별 동의서 출력 예외부서(20171230)
  169. if (ds_main_formexinfo.getCaseCount("trgtcdnm == '" + arrycalcscorcd[0] + "'") > 0) {
  170. return "X";
  171. }
  172. // 시행부서 처방에서 동의서 출력유무
  173. var openWin = frmf_findPopup("SMMMO00200");
  174. var popcnt = ds_main_forminfo.getCaseCount("popyn == 'Y'");
  175. if (openWin != null && popcnt > 0) {
  176. if (sysf_messageBox("동의서를 출력하시겠습니까?", "Q") != 6) {
  177. return "X";
  178. }
  179. }
  180. var formCd = "";
  181. var ocrTag = "";
  182. var formCdArr = "";
  183. var ocrTagArr = "";
  184. var calcCdArr = "";
  185. var prcp_rtn = "";
  186. var formList = ds_main_forminfo.rowcount;
  187. for (var i = 0; i < formList; i++) {
  188. formCd = ds_main_forminfo.getColumn(i, "formcd");
  189. fmakeOCRTag();
  190. ocrTag = ds_main_ocrtag.getColumn(0, "tag");
  191. formCdArr += formCd + ( i < formList - 1 ? "," : "" );
  192. ocrTagArr += ocrTag + ( i < formList - 1 ? "," : "" );
  193. calcCdArr = utlf_transNullToEmpty(ds_main_forminfo.getColumn(i, "calcscorcd")).split(",");
  194. for (var j = 0; j < calcCdArr.length; j++) {
  195. prcp_rtn += calcCdArr[j] + "▦" + ocrTag + "▦";
  196. }
  197. }
  198. dsf_createDsRow("ds_para_clip", [{col:"wdsize", type:"STRING", size:256, val: "MINIMIZED"}
  199. , {col:"title", type:"STRING", size:256, val: "경북대학교 병원 전자동의서"}
  200. , {col:"cboxflag", type:"STRING", size:256, val: "FALSE"}
  201. , {col:"maxflag", type:"STRING", size:256, val: "FALSE"}
  202. , {col:"minflag", type:"STRING", size:256, val: "FALSE"}
  203. , {col:"csviewyn", type:"STRING", size:256, val: "N"}
  204. , {col:"ptviewyn", type:"STRING", size:256, val: "N"}
  205. , {col:"formcd", type:"STRING", size:256, val: formCdArr}
  206. , {col:"ocrtag", type:"STRING", size:256, val: ocrTagArr}
  207. , {col:"saveyn", type:"STRING", size:256, val: ( prntflag ? "N" : "Y" )}
  208. , {col:"printyn", type:"STRING", size:256, val: ( prntflag ? "Y" : "N" )}
  209. , {col:"pid", type:"STRING", size:256, val: pid}
  210. , {col:"ordtype", type:"STRING", size:256, val: ordtype}
  211. , {col:"orddd", type:"STRING", size:256, val: orddd}
  212. , {col:"cretno", type:"STRING", size:256, val: cretno}
  213. , {col:"orddeptcd", type:"STRING", size:256, val: ""}
  214. , {col:"oprsrvno", type:"STRING", size:256, val: ""}
  215. , {col:"msgflag", type:"STRING", size:256, val: "N"}
  216. , {col:"specdryn", type:"STRING", size:256, val: ""}
  217. , {col:"ctstartdd", type:"STRING", size:256, val: ""}
  218. , {col:"ctenddd", type:"STRING", size:256, val: ""}
  219. , {col:"roomcapa", type:"STRING", size:256, val: ""}
  220. , {col:"cttelno", type:"STRING", size:256, val: ""}
  221. , {col:"ctstnm1", type:"STRING", size:256, val: ""}
  222. , {col:"ctstnm2", type:"STRING", size:256, val: ""}
  223. , {col:"ctstnm3", type:"STRING", size:256, val: ""}
  224. , {col:"cardno", type:"STRING", size:256, val: ""}]);
  225. var objArg = new Object();
  226. objArg.arg_ds_para = ds_para_clip;
  227. frmf_modal("SPMRF04601", "SPMRF04601", objArg, false, 1, "", "", 350, 70, "", "", "", "P");
  228. return prcp_rtn;
  229. }
  230. /**
  231. * @desc : OCR 데이타 정보 조회 후 파일세팅
  232. *
  233. * @param :
  234. * @return :
  235. * @author : HIT EMR Team
  236. * @---------------------------------------------------
  237. */
  238. function fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag, pWardCd, pOpRsrvNo, pClipPrntFlag) {
  239. // CLIP 전자 동의서 분기
  240. var clip_pid = "";
  241. var clip_orddd = "";
  242. var clip_cretno = "";
  243. var clip_ordtype = "";
  244. var clip_orddeptcd = "";
  245. if (utlf_isNull(pid) && utlf_isNull(orddd) && utlf_isNull(cretno) && utlf_isNull(ordtype) ) {
  246. if( !utlf_isNull(parent.parent) && parent.parent.toString().toUpperCase() != "[OBJECT CHILDFRAME]" && parent.parent.objects["ds_main_ordinfo"] != null ){
  247. clip_pid = parent.parent.ds_main_ordinfo.getColumn(0, "pid");
  248. clip_orddd = parent.parent.ds_main_ordinfo.getColumn(0, "orddd");
  249. clip_cretno = parent.parent.ds_main_ordinfo.getColumn(0, "cretno");
  250. clip_ordtype = parent.parent.ds_main_ordinfo.getColumn(0, "ordtype");
  251. clip_orddeptcd = parent.parent.ds_main_ordinfo.getColumn(0, "orddeptcd");
  252. }else{
  253. sysf_trace("parent.parent OBJECT CHILDFRAME");
  254. }
  255. } else {
  256. clip_pid = pid;
  257. clip_orddd = orddd;
  258. clip_cretno = cretno;
  259. clip_ordtype = ordtype;
  260. }
  261. CLIP_FLAG = false;
  262. if (lf_ContainsHardCD("6923", sysf_getUserInfo("dutplcecd")) && lf_ContainsHardCD("6924", formcd)) {
  263. CLIP_FLAG = true;
  264. }
  265. //임시로 빠지는 기준추가
  266. if(lf_isTmp(clip_pid,clip_orddd,clip_cretno,formcd)) CLIP_FLAG = true;
  267. pClipPrntFlag = utlf_isNull(pClipPrntFlag) ? true : pClipPrntFlag;
  268. //clip_orddeptcd = "2230000000";
  269. if (pClipPrntFlag) {
  270. // 출력 여부 재확인
  271. if (lf_ContainsHardCD("6921", "Y") && !lf_ContainsHardCD("6926", clip_orddeptcd) && !lf_ContainsHardCD("6927", sysf_getUserId())) {
  272. CLIP_FLAG = true;
  273. var formcdArr = formcd.split(",");
  274. for (var i = 0; i < formcdArr.length; i++) {
  275. if (lf_ContainsHardCD("6922", formcdArr[i])) {
  276. CLIP_FLAG = false;
  277. break;
  278. }
  279. }
  280. } else {
  281. CLIP_FLAG = false;
  282. }
  283. }
  284. if (CLIP_FLAG) {
  285. dsf_createDsRow("ds_para_clip", [{col:"wdsize", type:"STRING", size:256, val: "MINIMIZED"}
  286. , {col:"title", type:"STRING", size:256, val: "경북대학교 병원 전자동의서"}
  287. , {col:"cboxflag", type:"STRING", size:256, val: "FALSE"}
  288. , {col:"maxflag", type:"STRING", size:256, val: "FALSE"}
  289. , {col:"minflag", type:"STRING", size:256, val: "FALSE"}
  290. , {col:"csviewyn", type:"STRING", size:256, val: "N"}
  291. , {col:"ptviewyn", type:"STRING", size:256, val: "N"}
  292. , {col:"formcd", type:"STRING", size:256, val: formcd}
  293. , {col:"ocrtag", type:"STRING", size:256, val: ocrtag}
  294. , {col:"saveyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "N" : "Y" )}
  295. , {col:"printyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "Y" : "N" )}
  296. , {col:"pid", type:"STRING", size:256, val: clip_pid}
  297. , {col:"ordtype", type:"STRING", size:256, val: clip_ordtype}
  298. , {col:"orddd", type:"STRING", size:256, val: clip_orddd}
  299. , {col:"cretno", type:"STRING", size:256, val: clip_cretno}
  300. , {col:"orddeptcd", type:"STRING", size:256, val: ""}
  301. , {col:"oprsrvno", type:"STRING", size:256, val: pOpRsrvNo}
  302. , {col:"msgflag", type:"STRING", size:256, val: "Y"}
  303. , {col:"specdryn", type:"STRING", size:256, val: ""}
  304. , {col:"ctstartdd", type:"STRING", size:256, val: ""}
  305. , {col:"ctenddd", type:"STRING", size:256, val: ""}
  306. , {col:"roomcapa", type:"STRING", size:256, val: ""}
  307. , {col:"cttelno", type:"STRING", size:256, val: ""}
  308. , {col:"ctstnm1", type:"STRING", size:256, val: ""}
  309. , {col:"ctstnm2", type:"STRING", size:256, val: ""}
  310. , {col:"ctstnm3", type:"STRING", size:256, val: ""}
  311. , {col:"cardno", type:"STRING", size:256, val: ""}]);
  312. return;
  313. }
  314. var instance = parent.parent;
  315. var nodelist = null;
  316. var localfilenm = null;
  317. var para = false;
  318. if(formtypecls == '1'){
  319. grp_cnrlbox.rdo_diagopnm.visible = true;
  320. grp_cnrlbox.ipt_diagnm.visible = true;
  321. } else if(formtypecls == '2'){
  322. grp_cnrlbox.rdo_diagopnm.visible = true;
  323. grp_cnrlbox.ipt_diagnm.visible = true;
  324. grp_cnrlbox.rdo_diagopnm.index = 0;
  325. } else if((formtypecls == '3') || (formtypecls == '4') || (formtypecls == '5') || (formtypecls == '7') || (formtypecls == '8')){
  326. grp_cnrlbox.rdo_diagopnm.visible = false;
  327. grp_cnrlbox.ipt_diagnm.visible = false;
  328. }
  329. ds_hidden.clearData();
  330. ds_hidden.addRow();
  331. if((pid != null) && (orddd != null) && (cretno != null) && (ordtype != null)){
  332. ds_hidden.setColumn(0,"parentflag","ETC")
  333. } else if((pid == null) && (orddd == null) && (cretno == null) && (ordtype == null)){
  334. ds_hidden.setColumn(0,"parentflag","PRNT")
  335. } else {
  336. sysf_messageBox("원무접수 정보가", "I004");
  337. return;
  338. }
  339. ds_main_forminfo.setColumn(0,"formcd",formcd);
  340. ds_main_forminfo.setColumn(0,"formtypecls",formtypecls);
  341. // 20090715 ocrtagprntyn 값 추가 nj
  342. ds_main_forminfo.setColumn(0,"ocrtagprntyn",ocrtagprntyn);
  343. ds_send_reqdata.clearData();
  344. ds_send_reqdata.addRow();
  345. ds_send_reqdata.setColumn(0,"formcd", formcd)
  346. if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
  347. if( !utlf_isNull(parent.parent) && parent.parent.toString().toUpperCase() != "[OBJECT CHILDFRAME]" && parent.parent.objects["ds_main_ordinfo"] != null ){
  348. ds_send_reqdata.setColumn(0,"pid",parent.parent.ds_main_ordinfo.getColumn(0,"pid"));
  349. }else{
  350. ds_send_reqdata.setColumn(0,"pid", "");
  351. }
  352. } else {
  353. ds_send_reqdata.setColumn(0,"pid",pid);
  354. }
  355. ds_send_reqdata.setColumn(0,"ocrtag",ocrtag);
  356. oParam = {};
  357. oParam.id = "TRMRF03801";
  358. oParam.service = "formmngtapp.OcrPreViewMngt";
  359. oParam.method = "reqGetOcrInfo";
  360. oParam.inds = "req=ds_send_reqdata";
  361. oParam.outds = "ds_main_ocrinfo=ocrlist";
  362. oParam.async = false;
  363. //oParam.callback = "cf_TRMRF03801";
  364. tranf_submit(oParam);
  365. //sysf_trace(ds_main_ocrinfo.saveXML());
  366. var ocrimgcnt = ds_main_ocrinfo.rowcount;
  367. if(ocrimgcnt == 0) {
  368. var check = this.getOwnerFrame().form.frmf_getParameter("SPMRF01100");
  369. if ( check == "Y" ) {
  370. sysf_messageBox("연결된 서식이 존재하지", "I011");
  371. } else {
  372. sysf_messageBox("OCR로 출력할 수 없는 서식", "E008");
  373. }
  374. return;
  375. }
  376. /** fFolderSet(path, flag)
  377. * path에 해당하는 폴더를 local에 생성
  378. * path는 이미지가 저장될 path
  379. * flag는 해당 폴더의 file을 삭제 여부를 나타냄
  380. * flag: "D"이면 삭제 값을 주지 않으면 삭제하지 않음
  381. */
  382. fFolderSet(gv_ImgeSavePath, "D");
  383. nodelist = ds_main_ocrinfo;
  384. ds_pageinfo.setColumn(0,"ocrdatacnt", nodelist.rowcount)
  385. FileCount:
  386. var errFlag = false;
  387. for(var i = 0; i < nodelist.rowcount; i++){
  388. fGetOCRData(i);
  389. var img_file = fso.GetFile(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm"));
  390. var timeOut = utlf_getNewDate();
  391. timeOut.setSeconds( timeOut.getSeconds() + 5 );
  392. FileSize:
  393. while(true){
  394. if (utlf_isNull(img_file.Size)){
  395. break;
  396. }
  397. img_size = img_file.Size;
  398. var currDate = utlf_getNewDate();
  399. if(timeOut < currDate){
  400. errFlag = true;
  401. //break FileCount;
  402. break;
  403. }
  404. if(fso.FileExists(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm") )
  405. && (img_size == ds_main_ocrinfo.getColumn(i,"ocrfilesize"))){
  406. //break FileSize;
  407. break;
  408. }
  409. }
  410. }
  411. if(errFlag){
  412. sysf_messageBox("파일 다운로드를", "E009");
  413. return;
  414. }
  415. /* Edited by nj 2007-07-27 CurrentDirectory을 사용하지 않음 */
  416. if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
  417. ds_send_reqdata.setColumn(0,"pid", pid);
  418. ds_send_reqdata.setColumn(0,"orddd", orddd);
  419. ds_send_reqdata.setColumn(0,"cretno", cretno);
  420. ds_send_reqdata.setColumn(0,"ordtype", ordtype);
  421. ds_send_reqdata.setColumn(0,"ocrtag", ocrtag);
  422. var oParam = {};
  423. oParam.id = "TRMRF03803";
  424. oParam.service = "formmngtapp.OcrPreViewMngt";
  425. oParam.method = "reqGetPatInfo";
  426. oParam.inds = "req=ds_send_reqdata";
  427. oParam.outds = "ds_main_patinfo=patinfo";
  428. oParam.async = false;
  429. //oParam.callback = "cf_TRMRF03803";
  430. tranf_submit(oParam);
  431. ds_main_patinfo.addColumn("patnm", "string");
  432. ds_main_patinfo.addColumn("orddeptcd", "string");
  433. ds_main_patinfo.addColumn("orddeptnm", "string");
  434. ds_main_patinfo.addColumn("drid", "string");
  435. ds_main_patinfo.addColumn("drnm", "string");
  436. ds_main_patinfo.addColumn("inroomcd", "string");
  437. ds_main_patinfo.addColumn("rrgstno", "string");
  438. ds_main_patinfo.addColumn("roomcd", "string");
  439. ds_main_patinfo.addColumn("centcd", "string");
  440. ds_main_patinfo.addColumn("centengabbr", "string");
  441. ds_main_patinfo.setColumn(0, "patnm", ds_main_patinfo.getColumn(0,"hngnm"));
  442. ds_main_patinfo.setColumn(0, "orddeptcd", ds_main_patinfo.getColumn(0,"deptcd"));
  443. ds_main_patinfo.setColumn(0, "orddeptnm", ds_main_patinfo.getColumn(0,"deptnm"));
  444. ds_main_patinfo.setColumn(0, "drid", ds_main_patinfo.getColumn(0,"orddrid"));
  445. ds_main_patinfo.setColumn(0, "drnm", ds_main_patinfo.getColumn(0,"orddrnm"));
  446. ds_main_patinfo.setColumn(0, "inroomcd", ds_main_patinfo.getColumn(0,"roomcd"));
  447. ds_main_patinfo.setColumn(0, "rrgstno", ds_main_patinfo.getColumn(0,"rrgstno1"));
  448. var rrgstno = ds_main_patinfo.getColumn(0,"rrgstno").substring(0, 8) + "XXXXXX";
  449. ds_main_patinfo.setColumn(0,"rrgstno",rrgstno);
  450. }
  451. ds_pageinfo.setColumn(0,"currentpage", 1);
  452. ds_pageinfo.setColumn(0,"doubcnt", 1);
  453. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  454. /** Edited by nj 2007-08-28 출력 서식이 5개 종류로 나뉨
  455. * TYPE1: 환자정보+진단명/수술명+본문
  456. * TYPE2: 환자정보+진단명+본문
  457. * TYPE3: 환자정보+본문
  458. * TYPE4: 환자정보+본문(OMR)
  459. * TYPE5: 본문(DSC)
  460. * TYPE6: 환자정보+본문 ( 2013.08.21 cyw )
  461. */
  462. fInitCreateHtml(); //Footer 및 Header 정보생성
  463. fBaseCreateHtml(formtypecls); //Type별 정보셋팅
  464. fChartCreateHtml(formtypecls,formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn); //OCR파일정보 생성.
  465. if(ds_pageinfo.getColumn(0,"ocrdatacnt") == ds_pageinfo.getColumn(0,"currentpage")){
  466. grp_cnrlbox.btn_postpage.enable = false;
  467. grp_cnrlbox.btn_prepage.enable = false;
  468. } else {
  469. grp_cnrlbox.btn_postpage.enable = true;
  470. grp_cnrlbox.btn_prepage.enable = false;
  471. }
  472. //2013/03/29 Start
  473. ds_main_ocrtag.setColumn(0,"tag", ocrtag);
  474. //2013/03/29 End
  475. }
  476. /**
  477. * @desc : OCR 데이타 정보 조회 후 파일세팅
  478. * dbs227 의무기록실 사용자 LC, 클립소프트 구분 출력 기능
  479. * @param :
  480. * @return :
  481. * @author : HIT EMR Team
  482. * @---------------------------------------------------
  483. */
  484. function fGetOCRInfoDebug(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag, pWardCd, pOpRsrvNo, pClipPrntFlag, debugMode) {
  485. // CLIP 전자 동의서 분기
  486. var clip_pid = "";
  487. var clip_orddd = "";
  488. var clip_cretno = "";
  489. var clip_ordtype = "";
  490. var clip_orddeptcd = "";
  491. if (utlf_isNull(pid) && utlf_isNull(orddd) && utlf_isNull(cretno) && utlf_isNull(ordtype)) {
  492. clip_pid = parent.parent.ds_main_ordinfo.getColumn(0, "pid");
  493. clip_orddd = parent.parent.ds_main_ordinfo.getColumn(0, "orddd");
  494. clip_cretno = parent.parent.ds_main_ordinfo.getColumn(0, "cretno");
  495. clip_ordtype = parent.parent.ds_main_ordinfo.getColumn(0, "ordtype");
  496. clip_orddeptcd = parent.parent.ds_main_ordinfo.getColumn(0, "orddeptcd");
  497. } else {
  498. clip_pid = pid;
  499. clip_orddd = orddd;
  500. clip_cretno = cretno;
  501. clip_ordtype = ordtype;
  502. }
  503. CLIP_FLAG = false;
  504. if (lf_ContainsHardCD("6923", sysf_getUserInfo("dutplcecd")) && lf_ContainsHardCD("6924", formcd)) {
  505. CLIP_FLAG = true;
  506. }
  507. /*
  508. dsf_createDsRow("ds_send_clip", [{col:"pid", type:"STRING", size:256, val: clip_pid}
  509. , {col:"orddd", type:"STRING", size:256, val: clip_orddd}
  510. , {col:"cretno", type:"STRING", size:256, val: clip_cretno}
  511. , {col:"ordtype", type:"STRING", size:256, val: clip_ordtype}]);
  512. dsf_createDs("ds_pt_clip", [{col:"pid", type:"STRING", size:256}
  513. , {col:"orddd", type:"STRING", size:256}
  514. , {col:"ordtype", type:"STRING", size:256}
  515. , {col:"cretno", type:"STRING", size:256}
  516. , {col:"orddeptcd", type:"STRING", size:256}
  517. , {col:"centcd", type:"STRING", size:256}
  518. , {col:"wardcd", type:"STRING", size:256}]);
  519. var oParam = {};
  520. oParam.id = "TRMRF03815";
  521. oParam.service = "formmngtapp.OcrPrntMngt";
  522. oParam.method = "reqGetPtInfo_CLIP";
  523. oParam.inds = "req=ds_send_clip";
  524. oParam.outds = "ds_pt_clip=pt";
  525. oParam.async = false;
  526. tranf_submit(oParam);
  527. if (ds_pt_clip.rowcount > 0) {
  528. var wardcd = utlf_isNull(pWardCd) ? ds_pt_clip.getColumn(0, "wardcd") : pWardCd;
  529. if (lf_ContainsHardCD("6916", "Y")) {
  530. if (lf_ContainsHardCD("6917", sysf_getUserId())) {
  531. if (ordtype == "O") {
  532. if (lf_ContainsHardCD("6918", ds_pt_clip.getColumn(0, "centcd")) || lf_ContainsHardCD("6918", ds_pt_clip.getColumn(0, "orddeptcd"))) {
  533. CLIP_FLAG = true;
  534. }
  535. } else {
  536. if (lf_ContainsHardCD("6918", wardcd)) {
  537. CLIP_FLAG = true;
  538. }
  539. }
  540. }
  541. }
  542. }
  543. */
  544. pClipPrntFlag = utlf_isNull(pClipPrntFlag) ? false : pClipPrntFlag;
  545. if (pClipPrntFlag) {
  546. // 출력 여부 재확인
  547. // dbs227, 의존성 제거
  548. //if (lf_ContainsHardCD("6921", "Y") && !lf_ContainsHardCD("6926", clip_orddeptcd) && !lf_ContainsHardCD("6927", sysf_getUserId()))
  549. {
  550. CLIP_FLAG = true;
  551. // var formcdArr = formcd.split(",");
  552. // for (var i = 0; i < formcdArr.length; i++) {
  553. // if (lf_ContainsHardCD("6922", formcdArr[i])) {
  554. // CLIP_FLAG = false;
  555. // break;
  556. // }
  557. // }
  558. }
  559. // else {
  560. // CLIP_FLAG = false;
  561. // }
  562. }
  563. if (CLIP_FLAG) {
  564. dsf_createDsRow("ds_para_clip", [{col:"wdsize", type:"STRING", size:256, val: "MINIMIZED"}
  565. , {col:"title", type:"STRING", size:256, val: "경북대학교 병원 전자동의서"}
  566. , {col:"cboxflag", type:"STRING", size:256, val: "FALSE"}
  567. , {col:"maxflag", type:"STRING", size:256, val: "FALSE"}
  568. , {col:"minflag", type:"STRING", size:256, val: "FALSE"}
  569. , {col:"csviewyn", type:"STRING", size:256, val: "N"}
  570. , {col:"ptviewyn", type:"STRING", size:256, val: "N"}
  571. , {col:"formcd", type:"STRING", size:256, val: formcd}
  572. , {col:"ocrtag", type:"STRING", size:256, val: ocrtag}
  573. , {col:"saveyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "N" : "Y" )}
  574. , {col:"printyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "Y" : "N" )}
  575. , {col:"pid", type:"STRING", size:256, val: clip_pid}
  576. , {col:"ordtype", type:"STRING", size:256, val: clip_ordtype}
  577. , {col:"orddd", type:"STRING", size:256, val: clip_orddd}
  578. , {col:"cretno", type:"STRING", size:256, val: clip_cretno}
  579. , {col:"orddeptcd", type:"STRING", size:256, val: ""}
  580. , {col:"oprsrvno", type:"STRING", size:256, val: pOpRsrvNo}
  581. , {col:"msgflag", type:"STRING", size:256, val: "Y"}
  582. , {col:"specdryn", type:"STRING", size:256, val: ""}
  583. , {col:"ctstartdd", type:"STRING", size:256, val: ""}
  584. , {col:"ctenddd", type:"STRING", size:256, val: ""}
  585. , {col:"roomcapa", type:"STRING", size:256, val: ""}
  586. , {col:"cttelno", type:"STRING", size:256, val: ""}
  587. , {col:"ctstnm1", type:"STRING", size:256, val: ""}
  588. , {col:"ctstnm2", type:"STRING", size:256, val: ""}
  589. , {col:"ctstnm3", type:"STRING", size:256, val: ""}
  590. , {col:"cardno", type:"STRING", size:256, val: ""}]);
  591. return;
  592. }
  593. var instance = parent.parent;
  594. var nodelist = null;
  595. var localfilenm = null;
  596. var para = false;
  597. if(formtypecls == '1'){
  598. grp_cnrlbox.rdo_diagopnm.visible = true;
  599. grp_cnrlbox.ipt_diagnm.visible = true;
  600. } else if(formtypecls == '2'){
  601. grp_cnrlbox.rdo_diagopnm.visible = true;
  602. grp_cnrlbox.ipt_diagnm.visible = true;
  603. grp_cnrlbox.rdo_diagopnm.index = 0;
  604. } else if((formtypecls == '3') || (formtypecls == '4') || (formtypecls == '5') || (formtypecls == '7') || (formtypecls == '8')){
  605. grp_cnrlbox.rdo_diagopnm.visible = false;
  606. grp_cnrlbox.ipt_diagnm.visible = false;
  607. }
  608. ds_hidden.clearData();
  609. ds_hidden.addRow();
  610. if((pid != null) && (orddd != null) && (cretno != null) && (ordtype != null)){
  611. ds_hidden.setColumn(0,"parentflag","ETC")
  612. } else if((pid == null) && (orddd == null) && (cretno == null) && (ordtype == null)){
  613. ds_hidden.setColumn(0,"parentflag","PRNT")
  614. } else {
  615. sysf_messageBox("원무접수 정보가", "I004");
  616. return;
  617. }
  618. ds_main_forminfo.setColumn(0,"formcd",formcd);
  619. ds_main_forminfo.setColumn(0,"formtypecls",formtypecls);
  620. // 20090715 ocrtagprntyn 값 추가 nj
  621. ds_main_forminfo.setColumn(0,"ocrtagprntyn",ocrtagprntyn);
  622. ds_send_reqdata.clearData();
  623. ds_send_reqdata.addRow();
  624. ds_send_reqdata.setColumn(0,"formcd", formcd)
  625. if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
  626. ds_send_reqdata.setColumn(0,"pid",parent.parent.ds_main_ordinfo.getColumn(0,"pid"));
  627. } else {
  628. ds_send_reqdata.setColumn(0,"pid",pid);
  629. }
  630. ds_send_reqdata.setColumn(0,"ocrtag",ocrtag);
  631. oParam = {};
  632. oParam.id = "TRMRF03801";
  633. oParam.service = "formmngtapp.OcrPreViewMngt";
  634. oParam.method = "reqGetOcrInfo";
  635. oParam.inds = "req=ds_send_reqdata";
  636. oParam.outds = "ds_main_ocrinfo=ocrlist";
  637. oParam.async = false;
  638. //oParam.callback = "cf_TRMRF03801";
  639. tranf_submit(oParam);
  640. //sysf_trace(ds_main_ocrinfo.saveXML());
  641. var ocrimgcnt = ds_main_ocrinfo.rowcount;
  642. if(ocrimgcnt == 0) {
  643. var check = this.getOwnerFrame().form.frmf_getParameter("SPMRF01100");
  644. if ( check == "Y" ) {
  645. sysf_messageBox("연결된 서식이 존재하지", "I011");
  646. } else {
  647. sysf_messageBox("OCR로 출력할 수 없는 서식", "E008");
  648. }
  649. return;
  650. }
  651. /** fFolderSet(path, flag)
  652. * path에 해당하는 폴더를 local에 생성
  653. * path는 이미지가 저장될 path
  654. * flag는 해당 폴더의 file을 삭제 여부를 나타냄
  655. * flag: "D"이면 삭제 값을 주지 않으면 삭제하지 않음
  656. */
  657. fFolderSet(gv_ImgeSavePath, "D");
  658. nodelist = ds_main_ocrinfo;
  659. ds_pageinfo.setColumn(0,"ocrdatacnt", nodelist.rowcount)
  660. FileCount:
  661. var errFlag = false;
  662. for(var i = 0; i < nodelist.rowcount; i++){
  663. fGetOCRData(i);
  664. var img_file = fso.GetFile(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm"));
  665. var timeOut = utlf_getNewDate();
  666. timeOut.setSeconds( timeOut.getSeconds() + 5 );
  667. FileSize:
  668. while(true){
  669. if (utlf_isNull(img_file.Size)){
  670. break;
  671. }
  672. img_size = img_file.Size;
  673. var currDate = utlf_getNewDate();
  674. if(timeOut < currDate){
  675. errFlag = true;
  676. //break FileCount;
  677. break;
  678. }
  679. if(fso.FileExists(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm") )
  680. && (img_size == ds_main_ocrinfo.getColumn(i,"ocrfilesize"))){
  681. //break FileSize;
  682. break;
  683. }
  684. }
  685. }
  686. if(errFlag){
  687. sysf_messageBox("파일 다운로드를", "E009");
  688. return;
  689. }
  690. /* Edited by nj 2007-07-27 CurrentDirectory을 사용하지 않음 */
  691. if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
  692. ds_send_reqdata.setColumn(0,"pid", pid);
  693. ds_send_reqdata.setColumn(0,"orddd", orddd);
  694. ds_send_reqdata.setColumn(0,"cretno", cretno);
  695. ds_send_reqdata.setColumn(0,"ordtype", ordtype);
  696. ds_send_reqdata.setColumn(0,"ocrtag", ocrtag);
  697. var oParam = {};
  698. oParam.id = "TRMRF03803";
  699. oParam.service = "formmngtapp.OcrPreViewMngt";
  700. oParam.method = "reqGetPatInfo";
  701. oParam.inds = "req=ds_send_reqdata";
  702. oParam.outds = "ds_main_patinfo=patinfo";
  703. oParam.async = false;
  704. //oParam.callback = "cf_TRMRF03803";
  705. tranf_submit(oParam);
  706. ds_main_patinfo.addColumn("patnm", "string");
  707. ds_main_patinfo.addColumn("orddeptcd", "string");
  708. ds_main_patinfo.addColumn("orddeptnm", "string");
  709. ds_main_patinfo.addColumn("drid", "string");
  710. ds_main_patinfo.addColumn("drnm", "string");
  711. ds_main_patinfo.addColumn("inroomcd", "string");
  712. ds_main_patinfo.addColumn("rrgstno", "string");
  713. ds_main_patinfo.addColumn("roomcd", "string");
  714. ds_main_patinfo.addColumn("centcd", "string");
  715. ds_main_patinfo.addColumn("centengabbr", "string");
  716. ds_main_patinfo.setColumn(0, "patnm", ds_main_patinfo.getColumn(0,"hngnm"));
  717. ds_main_patinfo.setColumn(0, "orddeptcd", ds_main_patinfo.getColumn(0,"deptcd"));
  718. ds_main_patinfo.setColumn(0, "orddeptnm", ds_main_patinfo.getColumn(0,"deptnm"));
  719. ds_main_patinfo.setColumn(0, "drid", ds_main_patinfo.getColumn(0,"orddrid"));
  720. ds_main_patinfo.setColumn(0, "drnm", ds_main_patinfo.getColumn(0,"orddrnm"));
  721. ds_main_patinfo.setColumn(0, "inroomcd", ds_main_patinfo.getColumn(0,"roomcd"));
  722. ds_main_patinfo.setColumn(0, "rrgstno", ds_main_patinfo.getColumn(0,"rrgstno1"));
  723. var rrgstno = ds_main_patinfo.getColumn(0,"rrgstno").substring(0, 8) + "XXXXXX";
  724. ds_main_patinfo.setColumn(0,"rrgstno",rrgstno);
  725. }
  726. ds_pageinfo.setColumn(0,"currentpage", 1);
  727. ds_pageinfo.setColumn(0,"doubcnt", 1);
  728. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  729. /** Edited by nj 2007-08-28 출력 서식이 5개 종류로 나뉨
  730. * TYPE1: 환자정보+진단명/수술명+본문
  731. * TYPE2: 환자정보+진단명+본문
  732. * TYPE3: 환자정보+본문
  733. * TYPE4: 환자정보+본문(OMR)
  734. * TYPE5: 본문(DSC)
  735. * TYPE6: 환자정보+본문 ( 2013.08.21 cyw )
  736. */
  737. fInitCreateHtml(); //Footer 및 Header 정보생성
  738. fBaseCreateHtml(formtypecls); //Type별 정보셋팅
  739. fChartCreateHtml(formtypecls,formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn); //OCR파일정보 생성.
  740. if(ds_pageinfo.getColumn(0,"ocrdatacnt") == ds_pageinfo.getColumn(0,"currentpage")){
  741. grp_cnrlbox.btn_postpage.enable = false;
  742. grp_cnrlbox.btn_prepage.enable = false;
  743. } else {
  744. grp_cnrlbox.btn_postpage.enable = true;
  745. grp_cnrlbox.btn_prepage.enable = false;
  746. }
  747. //2013/03/29 Start
  748. ds_main_ocrtag.setColumn(0,"tag", ocrtag);
  749. //2013/03/29 End
  750. }
  751. /**
  752. * @desc : 폴더 셋팅
  753. *
  754. * @param :
  755. * @return :
  756. * @author : HIT EMR Team
  757. * @---------------------------------------------------
  758. */
  759. function fFolderSet(folderpath, delflag)
  760. {
  761. /*
  762. var haveFile;
  763. var currFile;
  764. if(fso.FolderExists(folderpath) == false){
  765. fso.CreateFolder(folderpath);
  766. }
  767. if (delflag == "D"){
  768. haveFile = fso.GetFolder(gv_ImgeSavePath);
  769. // currFile = new Enumerator(haveFile.Files);
  770. //
  771. // for( ; !currFile.atEnd(); currFile.moveNext()) {
  772. // //20130418 김동준 start try Catch 추가
  773. try{
  774. fso.DeleteFile(gv_ImgeSavePath + "*.*", true);
  775. } catch(e){
  776. }
  777. // //20130418 김동준 end
  778. // }
  779. }
  780. */
  781. var objExtCommon = new ExtCommon();
  782. if(utlf_isNull(folderpath)){
  783. return;
  784. }
  785. var folderDept = folderpath.split("\\");
  786. var currentPos = folderDept[0];
  787. for(var i =1; i<folderDept.length ; i++){
  788. if(utlf_isNull(folderDept[i])){
  789. break;
  790. }
  791. currentPos += ("\\" + folderDept[i]);
  792. objExtCommon.checkDirectory(currentPos, 1);
  793. }
  794. if (delflag == "D"){
  795. var objFileList = VirtualFile.getFileList(folderpath, "*", VirtualFile.findFileOnly);
  796. for(var i=0; i<objFileList.length; i++){
  797. sFileName = objFileList[i].filename;
  798. bDeleteFile = VirtualFile.delete(folderpath+"\\"+sFileName);
  799. }
  800. }
  801. }
  802. /**
  803. * @desc : Footer 및 Header 정보생성
  804. *
  805. * @param :
  806. * @return :
  807. * @author : HIT EMR Team
  808. * @---------------------------------------------------
  809. */
  810. function fInitCreateHtml()
  811. {
  812. var stype = "";
  813. var cover_header ="";
  814. var cover_footer ="";
  815. var body_header ="";
  816. var body_footer ="";
  817. var headertitle ="";
  818. var local_path ="";
  819. var local_file ="";
  820. var trans = "";
  821. var formtypecls = ds_main_forminfo.getColumn(0,"formtypecls");
  822. var ocrtagprnt = ds_main_forminfo.getColumn(0,"ocrtagprntyn"); // TAG출력여부 - TAG출력여부가 N인서식은
  823. // ocrtag번호 및 바코드 서식에서 생성하지 않음 2012-11-05 김유성
  824. local_path = gv_ImgeSavePath + "template\\" ;
  825. if( fso.FolderExists(gv_ImgeSavePath) == false) {
  826. fso.CreateFolder(gv_ImgeSavePath)
  827. }
  828. if( fso.FolderExists(local_path) == false) {
  829. fso.CreateFolder(local_path)
  830. }
  831. //Free 3 of 9
  832. if(ocrtagprnt == "N"){
  833. cover_footer = " <HTML> " +
  834. "\n <BODY style='margin: 0;'> " +
  835. "\n " +
  836. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  837. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  838. "\n <TR> " +
  839. "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
  840. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
  841. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
  842. "\n </TR> " +
  843. "\n </TABLE> " +
  844. "\n </DIV> " +
  845. "\n " +
  846. "\n </BODY> " +
  847. "\n </HTML> ";
  848. body_header = " <HTML> " +
  849. "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
  850. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 14pt;'> " +
  851. "\n <TR> " +
  852. "\n </TR> " +
  853. "\n </TABLE> " +
  854. "\n <TABLE> " +
  855. "\n <TR> " +
  856. "\n <TD style='width: 100%; text-align: center;' ><!--?VAR_CHART_NAME_TOP?--></TD> " +
  857. "\n </TR> " +
  858. "\n </TABLE> " +
  859. "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 2px;'> " +
  860. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  861. "\n " +
  862. "\n <TR> " +
  863. "\n <TD style='text-align: left; '><!--?VAR_PAT_NUM?--></TD> " +
  864. "\n <TD style='text-align: center;'><!--?VAR_PAT_NAME1?--></TD> " +
  865. "\n <TD style='text-align: center;'>|&nbsp;진료과&nbsp;:&nbsp;<!--?VAR_TREAT_DEPT?--></TD> " +
  866. "\n <TD style='text-align: center;'>|&nbsp;주민등록번호&nbsp;:&nbsp;<!--?VAR_PAT_JUMIN_NO?--></TD> " +
  867. "\n <TD style='text-align: right; '>|&nbsp;진료일&nbsp;:&nbsp;<!--?VAR_TREAT_DATE?--></TD> " +
  868. "\n </TR> " +
  869. "\n </TABLE> " +
  870. "\n </DIV> " +
  871. "\n " +
  872. "\n </BODY> " +
  873. "\n </HTML> ";
  874. body_footer = "<HTML> " +
  875. "\n <BODY style='margin: 0;'> " +
  876. "\n " +
  877. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  878. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  879. "\n <TR> " +
  880. "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
  881. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
  882. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
  883. "\n </TR> " +
  884. "\n </TABLE> " +
  885. "\n </DIV> " +
  886. "\n " +
  887. "\n </BODY> " +
  888. "\n </HTML> ";
  889. }else{
  890. if( formtypecls == "6" ){ // type6인 경우 ocrtag 없애고 바코드는 오른쪽 위로, 환자정보 보이게
  891. cover_footer = " <HTML> " +
  892. "\n <BODY style='margin: 0;'> " +
  893. "\n " +
  894. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  895. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  896. "\n <TR> " +
  897. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
  898. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
  899. "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
  900. "\n <TD ></TD> " +
  901. "\n </TR> " +
  902. "\n </TABLE> " +
  903. "\n </DIV> " +
  904. "\n " +
  905. "\n </BODY> " +
  906. "\n </HTML> ";
  907. body_header = " <HTML> " +
  908. "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
  909. "\n <TABLE style='width: 100%; font-family: Arial; font-size: 14pt; font-weight: bold;'> " +
  910. "\n <TR> " +
  911. "\n <TD></TD> " +
  912. "\n <TD></TD> " +
  913. "\n <TD></TD> " +
  914. //"\n <TD style='text-align: right; font-family: Free 3 of 9;font-size: 24pt;' ><!--?VAR_PRINT_BARCODE?--></TD> " +
  915. "\n </TR> " +
  916. "\n </TABLE> " +
  917. "\n <TABLE> " +
  918. "\n <TR> " +
  919. "\n <TD style='width: 100%; text-align: center;' ><!--?VAR_CHART_NAME_TOP?--></TD> " +
  920. "\n </TR> " +
  921. "\n </TABLE> " +
  922. "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 2px;'> " +
  923. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  924. "\n " +
  925. "\n <TR> " +
  926. "\n <TD style='text-align: left; '><!--?VAR_PAT_NUM?--></TD> " +
  927. "\n <TD style='text-align: center;'><!--?VAR_PAT_NAME1?--></TD> " +
  928. "\n <TD style='text-align: center;'>|&nbsp;진료과&nbsp;:&nbsp;<!--?VAR_TREAT_DEPT?--></TD> " +
  929. "\n <TD style='text-align: center;'>|&nbsp;주민등록번호&nbsp;:&nbsp;<!--?VAR_PAT_JUMIN_NO?--></TD> " +
  930. "\n <TD style='text-align: right; '>|&nbsp;진료일&nbsp;:&nbsp;<!--?VAR_TREAT_DATE?--></TD> " +
  931. "\n </TR> " +
  932. "\n </TABLE> " +
  933. "\n </DIV> " +
  934. "\n " +
  935. "\n </BODY> " +
  936. "\n </HTML> ";
  937. body_footer = "<HTML> " +
  938. "\n <BODY style='margin: 0;'> " +
  939. "\n " +
  940. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  941. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  942. "\n <TR> " +
  943. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
  944. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
  945. "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
  946. "\n <TD></TD> " +
  947. "\n </TR> " +
  948. "\n </TABLE> " +
  949. "\n </DIV> " +
  950. "\n " +
  951. "\n </BODY> " +
  952. "\n </HTML> ";
  953. }else{
  954. cover_footer = " <HTML> " +
  955. "\n <BODY style='margin: 0;'> " +
  956. "\n " +
  957. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  958. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  959. "\n <TR> " +
  960. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
  961. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
  962. "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
  963. "\n <TD style='text-align: left; font-family: Free 3 of 9;font-size: 24pt;'><!--?VAR_PRINT_BARCODE?--></TD> " +
  964. "\n </TR> " +
  965. "\n </TABLE> " +
  966. "\n </DIV> " +
  967. "\n " +
  968. "\n </BODY> " +
  969. "\n </HTML> ";
  970. body_header = " <HTML> " +
  971. "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
  972. "\n <TABLE style='width: 100%; font-family: Arial; font-size: 14pt; font-weight: bold;'> " +
  973. "\n <TR> " +
  974. "\n <TD style='width: 15%; text-align: left; ' ><!--?VAR_OCR_LEFT?--></TD> " +
  975. "\n <TD style='width: 10%; text-align: right;' ><!--?VAR_OCR_RIGHT?--></TD> " +
  976. "\n </TR> " +
  977. "\n </TABLE> " +
  978. "\n <TABLE> " +
  979. "\n <TR> " +
  980. "\n <TD style='width: 100%; text-align: center;' ><!--?VAR_CHART_NAME_TOP?--></TD> " +
  981. "\n </TR> " +
  982. "\n </TABLE> " +
  983. "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 2px;'> " +
  984. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  985. "\n " +
  986. "\n <TR> " +
  987. "\n <TD style='text-align: left; '><!--?VAR_PAT_NUM?--></TD> " +
  988. "\n <TD style='text-align: center;'><!--?VAR_PAT_NAME1?--></TD> " +
  989. "\n <TD style='text-align: center;'>|&nbsp;진료과&nbsp;:&nbsp;<!--?VAR_TREAT_DEPT?--></TD> " +
  990. "\n <TD style='text-align: center;'>|&nbsp;주민등록번호&nbsp;:&nbsp;<!--?VAR_PAT_JUMIN_NO?--></TD> " +
  991. "\n <TD style='text-align: right; '>|&nbsp;진료일&nbsp;:&nbsp;<!--?VAR_TREAT_DATE?--></TD> " +
  992. "\n </TR> " +
  993. "\n </TABLE> " +
  994. "\n </DIV> " +
  995. "\n " +
  996. "\n </BODY> " +
  997. "\n </HTML> ";
  998. body_footer = "<HTML> " +
  999. "\n <BODY style='margin: 0;'> " +
  1000. "\n " +
  1001. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  1002. "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
  1003. "\n <TR> " +
  1004. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
  1005. "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
  1006. "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
  1007. "\n <TD style='text-align: left; font-family: Free 3 of 9;font-size: 24pt;'><!--?VAR_PRINT_BARCODE?--></TD> " +
  1008. "\n </TR> " +
  1009. "\n </TABLE> " +
  1010. "\n </DIV> " +
  1011. "\n " +
  1012. "\n </BODY> " +
  1013. "\n </HTML> ";
  1014. }
  1015. }
  1016. if(fso.FileExists(local_path + "cover_footer.html") == true)
  1017. {
  1018. fso.DeleteFile(local_path + "cover_footer.html", true)
  1019. }
  1020. var a = fso.CreateTextFile( local_path + "cover_footer.html" , true, true);
  1021. a.WriteLine(cover_footer);
  1022. a.Close();
  1023. if(fso.FileExists(local_path + "body_header.html") == true)
  1024. {
  1025. fso.DeleteFile(local_path + "body_header.html", true)
  1026. }
  1027. var a = fso.CreateTextFile( local_path + "body_header.html" , true, true);
  1028. a.WriteLine(body_header);
  1029. a.Close();
  1030. if(fso.FileExists(local_path + "body_footer.html") == true)
  1031. {
  1032. fso.DeleteFile(local_path + "body_footer.html", true)
  1033. }
  1034. var a = fso.CreateTextFile( local_path + "body_footer.html" , true, true);
  1035. a.WriteLine(body_footer);
  1036. a.Close();
  1037. }
  1038. /**
  1039. * @desc : Type별 정보셋팅
  1040. *
  1041. * @param :
  1042. * @return :
  1043. * @author : HIT EMR Team
  1044. * @---------------------------------------------------
  1045. */
  1046. function fBaseCreateHtml(formtypecls)
  1047. {
  1048. var stype = "";
  1049. var cover_header ="";
  1050. var headertitle ="";
  1051. var local_path ="";
  1052. var local_file ="";
  1053. var trans = "";
  1054. local_path = gv_ImgeSavePath + "template\\" ;
  1055. if( fso.FolderExists(gv_ImgeSavePath) == false)
  1056. {
  1057. fso.CreateFolder(gv_ImgeSavePath);
  1058. }
  1059. if( fso.FolderExists(local_path) == false)
  1060. {
  1061. fso.CreateFolder(local_path);
  1062. }
  1063. var ocrtagprnt = ds_main_forminfo.getColumn(0,"ocrtagprntyn"); // TAG출력여부 - TAG출력여부가 N인서식은
  1064. // ocrtag번호 및 바코드 서식에서 생성하지 않음 2012-11-05 김유성
  1065. if(ocrtagprnt == "N"){
  1066. cover_header = "<HTML>" +
  1067. "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
  1068. "\n <DIV > " +
  1069. "\n <TABLE width='100%' style='font-family: 맑은 고딕; font-size: 14pt;'> " +
  1070. "\n <TR> " +
  1071. "\n </TR> " +
  1072. "\n </TABLE> " +
  1073. "\n </DIV> ";
  1074. }else{
  1075. if( formtypecls == "6" ){
  1076. cover_header = "<HTML>" +
  1077. "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
  1078. "\n <DIV > " +
  1079. "\n <TABLE width='100%' style='font-family: Arial; font-size: 14pt; '> " +
  1080. "\n <TR> " +
  1081. "\n <TD></TD> " +
  1082. "\n <TD></TD> " +
  1083. "\n <TD></TD> " +
  1084. //"\n <TD style='text-align: right; font-family: Free 3 of 9;font-size: 24pt;'><!--?VAR_PRINT_BARCODE?--></TD> " +
  1085. "\n </TR> " +
  1086. "\n </TABLE> " +
  1087. "\n </DIV> ";
  1088. }else{
  1089. cover_header = "<HTML>" +
  1090. "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
  1091. "\n <DIV > " +
  1092. "\n <TABLE width='100%' style='font-family: Arial; font-size: 14pt; font-weight: bold;'> " +
  1093. "\n <TR> " +
  1094. "\n <TD style='width: 100%; text-align: left'><!--?VAR_OCR_LEFT?--></TD> " +
  1095. "\n <TD style='width: 100%; text-align: right'><!--?VAR_OCR_RIGHT?--></TD> " +
  1096. "\n </TR> " +
  1097. "\n </TABLE> " +
  1098. "\n </DIV> ";
  1099. }
  1100. }
  1101. //[2012.04.27 기관코드 추가 ]
  1102. var pInstcd = "";
  1103. if( !utlf_isNull(parent.parent) && isValidObject("ds_main_ordinfo") ){
  1104. pInstcd = parent.parent.ds_main_ordinfo.getColumn(0,"instcd");
  1105. }
  1106. if(utlf_isNull(pInstcd)) {
  1107. pInstcd =sysf_getUserInfo("dutplceinstcd");
  1108. }
  1109. //[2012.04.27 기관코드 추가 ]
  1110. var getformnm = ds_main_ocrinfo.getColumn(0,"formprntnm");
  1111. var arryformnm = getformnm.split("\n");
  1112. var langflag = ds_main_ocrinfo.getColumn(0,"langflag");
  1113. headertitle = "\n <TABLE cellspacing='0' width='100%'> " +
  1114. "\n <TR> " +
  1115. "\n <TD width='65%'> " +
  1116. "\n <TABLE style='width: 100%; font-family: 맑은 고딕;'> " +
  1117. "\n <TR> " +
  1118. "\n <TD><IMG SRC='" + rptf_getBigLogoImageURL("", "") + "' width='130' height='30' ></TD> " +
  1119. "\n </TR> " +
  1120. "\n <TR> " +
  1121. "\n <TD style='font-size: 18pt; text-align: center;'><!--?VAR_CHART_NAME_TOP?--></TD> " +
  1122. "\n </TR> ";
  1123. if(arryformnm.length == 2){
  1124. headertitle = headertitle +
  1125. "\n <TR> " +
  1126. "\n <TD style='font-size: 14pt; text-align: center;'><!--?VAR_CHART_NAME2_TOP?--></TD> " +
  1127. "\n </TR> ";
  1128. }
  1129. headertitle = headertitle +
  1130. "\n </TABLE> " +
  1131. "\n </TD> " +
  1132. "\n <TD width='35%'> " +
  1133. "\n <DIV style='border-style: solid; border-width: 1px; padding: 2px'> " +
  1134. "\n <TABLE cellspacing='0' width='100%' style='font-family: 맑은 고딕;'> " +
  1135. "\n <TR> " +
  1136. "\n <TD style='font-size: 18pt' width='70%'><!--?VAR_PAT_NUM?--></TD> " +
  1137. "\n <TD style='font-size: 14pt; text-align: center;' width='30%'><!--?VAR_TREAT_DEPT?--></TD> " +
  1138. "\n </TR> " +
  1139. "\n </TABLE> " +
  1140. "\n <TABLE> " +
  1141. "\n <TR> " +
  1142. "\n <TD style='font-size: 14pt' width='60%'><!--?VAR_PAT_NAME?--></TD> " +
  1143. "\n <TD style='font-size: 14pt; text-align: center;' width='40%'><!--?VAR_PAT_SA?--></TD> " +
  1144. "\n </TR> " +
  1145. "\n <TR height='40'> " +
  1146. "\n <TD style='font-size: 12pt' width='60%' ><!--?VAR_PAT_JUMIN_NO?--></TD> " +
  1147. "\n <TD style='font-size: 12pt' width='40%'><!--?VAR_TREAT_DATE?--></TD> " +
  1148. "\n </TR> " +
  1149. "\n </TABLE> " +
  1150. "\n </DIV> " +
  1151. "\n </TD> " +
  1152. "\n </TR> " +
  1153. "\n </TABLE> " ;
  1154. footer = "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 1.5px;'> " +
  1155. "\n </DIV> " +
  1156. "\n " +
  1157. "\n </BODY> " +
  1158. "\n </HTML> ";
  1159. switch(formtypecls)
  1160. {
  1161. case "1":
  1162. local_file = "cover_header1.html";
  1163. if(fso.FileExists(local_path + local_file) == true)
  1164. {
  1165. fso.DeleteFile(local_path + local_file, true)
  1166. }
  1167. if(fso.FileExists(local_path + local_file) == false)
  1168. {
  1169. cover_header = cover_header + headertitle +
  1170. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  1171. "\n <TABLE cellspacing='0' > " +
  1172. "\n <TR ><TD ></TD></TR> " +
  1173. "\n </TABLE> " +
  1174. "\n </DIV> " +
  1175. "\n <TABLE cellspacing='0' width='100%'> " +
  1176. "\n <TR> " +
  1177. "\n <TD style='border-style: solid; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕; text-align: center;' width='12%'> " +
  1178. "\n 진단명 " +
  1179. "\n </TD> " +
  1180. "\n <TD style='border-style: solid; border-left-style: none; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕;' width='88%'> " +
  1181. "\n <TABLE width='100%' height='100%'> " +
  1182. "\n <TR> " +
  1183. "\n <TD style='border-bottom-style: solid; border-width: 1; border-color: #000000;'> " +
  1184. "\n &nbsp;<!--?VAR_JINDAN1?--> " +
  1185. "\n </TD> " +
  1186. "\n </TR> " +
  1187. "\n <TR> " +
  1188. "\n <TD> " +
  1189. "\n &nbsp;<!--?VAR_JINDAN2?--> " +
  1190. "\n </TD> " +
  1191. "\n </TR> " +
  1192. "\n </TABLE> " +
  1193. "\n </TD> " +
  1194. "\n </TR> " +
  1195. "\n <TR> " +
  1196. "\n <TD style='border-left-style: solid; border-right-style: solid; border-bottom-style: solid; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕; text-align: center;' width='12%'> " +
  1197. "\n &nbsp;&nbsp;수술명<BR>(처치/검사) " +
  1198. "\n </TD> " +
  1199. "\n <TD style='border-right-style: solid; border-bottom-style: solid; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕;' width='88%'> " +
  1200. "\n <TABLE width='100%' height='100%'> " +
  1201. "\n <TR> " +
  1202. "\n <TD style='border-bottom-style: solid; border-width: 1; border-color: #000000;'> " +
  1203. "\n &nbsp;<!--?VAR_OPERATION1?--> " +
  1204. "\n </TD> " +
  1205. "\n </TR> " +
  1206. "\n <TR> " +
  1207. "\n <TD> " +
  1208. "\n &nbsp;<!--?VAR_OPERATION2?--> " +
  1209. "\n </TD> " +
  1210. "\n </TR> " +
  1211. "\n </TABLE> " +
  1212. "\n </TD> " +
  1213. "\n </TR> " +
  1214. "\n </TABLE> " +
  1215. "\n <TABLE cellspacing='0'> " +
  1216. "\n <TR ><TD ></TD></TR> " +
  1217. "\n </TABLE> " +
  1218. footer
  1219. }
  1220. break;
  1221. case "2":
  1222. local_file = "cover_header2.html";
  1223. if(fso.FileExists(local_path + local_file) == true)
  1224. {
  1225. fso.DeleteFile(local_path + local_file, true)
  1226. }
  1227. if(fso.FileExists(local_path + local_file) == false)
  1228. {
  1229. cover_header = cover_header + headertitle +
  1230. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  1231. "\n <TABLE cellspacing='0' > " +
  1232. "\n <TR ><TD ></TD></TR> " +
  1233. "\n </TABLE> " +
  1234. "\n </DIV> " +
  1235. "\n <TABLE cellspacing='0' width='100%' > " +
  1236. "\n <TR> " +
  1237. "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; font-size: 13pt; font-family: 맑은 고딕; text-align: center;' width='10%' rowspan='2'>진단명</TD> " +
  1238. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 13pt;' width='90%' height='20px' >&nbsp; " +
  1239. "\n <!--?VAR_JINDAN1?--> " +
  1240. "\n </TD> " +
  1241. "\n </TR> " +
  1242. "\n <TR > " +
  1243. "\n <TD style='border-style: solid; border-color: #000000; border-width: 1px; font-size: 13pt;' width='90%' height='20px'>&nbsp; " +
  1244. "\n <!--?VAR_JINDAN2?--> " +
  1245. "\n </TD> " +
  1246. "\n </TR> " +
  1247. "\n </TABLE> " +
  1248. "\n <TABLE cellspacing='0' > " +
  1249. "\n <TR ><TD ></TD></TR> " +
  1250. "\n </TABLE> " +
  1251. footer
  1252. }
  1253. break;
  1254. case "3":
  1255. local_file = "cover_header3.html";
  1256. if(fso.FileExists(local_path + local_file) == true)
  1257. {
  1258. fso.DeleteFile(local_path + local_file, true)
  1259. }
  1260. if(fso.FileExists(local_path + local_file) == false)
  1261. {
  1262. cover_header = cover_header + headertitle + footer
  1263. }
  1264. break;
  1265. case "4":
  1266. local_file = "cover_header4.html";
  1267. if(fso.FileExists(local_path + local_file) == true)
  1268. {
  1269. fso.DeleteFile(local_path + local_file, true)
  1270. }
  1271. if(fso.FileExists(local_path + local_file) == false)
  1272. {
  1273. cover_header = cover_header + headertitle + footer
  1274. }
  1275. break;
  1276. case "5":
  1277. local_file = "cover_header5.html";
  1278. if(fso.FileExists(local_path + local_file) == true)
  1279. {
  1280. fso.DeleteFile(local_path + local_file, true)
  1281. }
  1282. if(fso.FileExists(local_path + local_file) == false)
  1283. {
  1284. cover_header = cover_header +
  1285. "\n <TABLE cellspacing='0' width='100%'> " +
  1286. "\n <TR> " +
  1287. "\n <TD width='100%'> " +
  1288. "\n <TABLE style='width=100%; font-family: 맑은 고딕;'> " +
  1289. "\n <TR> " +
  1290. "\n <TD style='font-size: 18pt; text-align: center;'><!--?VAR_CHART_NAME_TOP?--></TD> " +
  1291. "\n </TR> " +
  1292. "\n </TABLE> " +
  1293. "\n </TD> " +
  1294. "\n </TR> " +
  1295. "\n </TABLE> " +
  1296. footer
  1297. }
  1298. break;
  1299. case "6":
  1300. local_file = "cover_header6.html";
  1301. if(fso.FileExists(local_path + local_file) == true)
  1302. {
  1303. fso.DeleteFile(local_path + local_file, true)
  1304. }
  1305. if(fso.FileExists(local_path + local_file) == false)
  1306. {
  1307. cover_header = cover_header + headertitle + footer
  1308. }
  1309. break;
  1310. case "7":
  1311. local_file = "cover_header7.html";
  1312. if(fso.FileExists(local_path + local_file) == true)
  1313. {
  1314. fso.DeleteFile(local_path + local_file, true)
  1315. }
  1316. if(fso.FileExists(local_path + local_file) == false)
  1317. {
  1318. cover_header = cover_header + headertitle + //footer +
  1319. "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 1.5px;'> </DIV>" +
  1320. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  1321. "\n <TABLE cellspacing='0' > " +
  1322. "\n <TR ><TD ></TD></TR> " +
  1323. "\n </TABLE> " +
  1324. "\n </DIV> " +
  1325. "\n <TABLE cellspacing='0' width='100%' > " +
  1326. "\n <TR> " +
  1327. "\n <TD style='font-size: 11pt; font-family: 맑은 고딕;text-align: left;text-style: bold;' colspan='7' width='100%'><pre style='font-weight:bold;'> 1. 환자의 현재상태</pre></TD> " +
  1328. "\n </TR> " +
  1329. "\n <TR> " +
  1330. "\n <TD width='5%' rowspan='5'></TD> " +
  1331. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='10%'><pre>진단명</pre></TD> " +
  1332. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='85%' height='25px' colspan='2'> " +
  1333. "\n <pre> <!--?VAR_JINDAN1?--></pre> " +
  1334. "\n </TD> " +
  1335. "\n </TR> " +
  1336. "\n <TR> " +
  1337. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='10%'><pre style='font-size:12;'>수술,시술명</pre></TD> " +
  1338. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='85%' height='25px' colspan='2'> " +
  1339. "\n <pre> <!--?VAR_JINDAN2?--></pre> " +
  1340. "\n </TD> " +
  1341. "\n </TR> " +
  1342. "\n <TR> " +
  1343. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='10%' rowspan='2'><pre>참여\n의료진</pre></TD> " +
  1344. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='12%' ><pre>주치의\n(집도의 1)</pre></TD> " +
  1345. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='73%' height='20px' ><pre> <!--?VAR_OPERATION1?--></pre></TD> " +
  1346. "\n </TR> " +
  1347. "\n <TR> " +
  1348. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='12%' ><pre>주치의\n(집도의 2)</pre></TD> " +
  1349. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='73%' height='20px' ><pre> <!--?VAR_OPERATION2?--></pre></TD> " +
  1350. "\n </TR> " +
  1351. "\n <TR> " +
  1352. "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='22%' colspan='2'><pre>시 행 예 정 일</pre></TD>" +
  1353. "\n <TD style='border-style: solid; border-color: #000000; border-width: 1px; font-size: 10pt;' width='73%' height='25px' > " +
  1354. "\n <pre> <!--?VAR_OPCNFMDD?--></pre> " +
  1355. "\n </TD> " +
  1356. "\n </TR> " +
  1357. "\n </TABLE> " +
  1358. "\n <TABLE cellspacing='0' width='100%' > " +
  1359. "\n <TR> " +
  1360. "\n <TD style='font-size: 11pt; font-family: 맑은 고딕;text-align: left;text-style: bold;' colspan='5' width='100%' height='15px'></TD> " +
  1361. "\n </TR> " +
  1362. "\n <TR> " +
  1363. "\n <TD width='5%' rowspan='7'></TD> " +
  1364. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='22%'><pre>과거병력\n(질병·상해 전력)</pre></TD> " +
  1365. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1366. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>특이체질</pre></TD> " +
  1367. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='30%' height='25px'><pre>○유 ○무 ○미상</pre></TD> " +
  1368. "\n </TR> " +
  1369. "\n <TR> " +
  1370. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>알레르기</pre></TD> " +
  1371. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1372. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>출혈소인</pre></TD> " +
  1373. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='30%' height='25px'><pre>○유 ○무 ○미상</pre></TD> " +
  1374. "\n </TR> " +
  1375. "\n <TR> " +
  1376. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>마약사고</pre></TD> " +
  1377. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1378. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>심장질환(심근경색증 등)</pre></TD> " +
  1379. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='30%' height='25px'><pre>○유 ○무 ○미상</pre></TD> " +
  1380. "\n </TR> " +
  1381. "\n <TR> " +
  1382. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>당뇨병</pre></TD> " +
  1383. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1384. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>호흡기질환(기침,가래 등)</pre></TD> " +
  1385. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='30%' height='25px'><pre>○유 ○무 ○미상</pre></TD> " +
  1386. "\n </TR> " +
  1387. "\n <TR> " +
  1388. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>고·저혈압</pre></TD> " +
  1389. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1390. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>기도이상 유무</pre></TD> " +
  1391. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='30%' height='25px'><pre>○유 ○무 ○미상</pre></TD> " +
  1392. "\n </TR> " +
  1393. "\n <TR> " +
  1394. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>신장질환(부종 등)</pre></TD> " +
  1395. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1396. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>흡연여부</pre></TD> " +
  1397. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='30%' height='25px'><pre>○유 ○무 ○미상</pre></TD> " +
  1398. "\n </TR> " +
  1399. "\n <TR> " +
  1400. "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>복용약물</pre></TD> " +
  1401. "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
  1402. "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>기타</pre></TD> " +
  1403. "\n <TD style='border-style: solid;border-color: #000000; border-width: 1px; text-align: center;'width='25%' height='35px'><pre></pre></TD> " +
  1404. "\n </TR> " +
  1405. "\n </TABLE> " +
  1406. "\n </BODY> " +
  1407. "\n </HTML>"
  1408. }
  1409. break;
  1410. case "8":
  1411. local_file = "cover_header8.html";
  1412. if(fso.FileExists(local_path + local_file) == true)
  1413. {
  1414. fso.DeleteFile(local_path + local_file, true)
  1415. }
  1416. if(fso.FileExists(local_path + local_file) == false)
  1417. {
  1418. cover_header = cover_header + headertitle + //footer +
  1419. "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 1.5px;'> </DIV>" +
  1420. "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
  1421. "\n <TABLE cellspacing='0' > " +
  1422. "\n <TR ><TD height='20px'></TD></TR> " +
  1423. "\n </TABLE> " +
  1424. "\n </DIV> " +
  1425. "\n <TABLE cellspacing='0' width='100%' > " +
  1426. "\n <TR> " +
  1427. "\n <TD style='font-size: 11pt; font-family: 맑은 고딕;text-align: left;text-style: bold;' colspan='7' width='100%'><pre style='font-weight:bold;font-size:15px'> 1. 환자의 현재상태</pre></TD> " +
  1428. "\n </TR> " +
  1429. "\n <TR> " +
  1430. "\n <TD width='5%' rowspan='15'></TD> " +
  1431. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='11%'><pre>진 단 명:</pre></TD> " +
  1432. "\n <TD style='border-style: solid;border-left-style: none; border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'> " +
  1433. "\n <pre> <!--?VAR_JINDAN1?--></pre> " +
  1434. "\n </TD> " +
  1435. "\n </TR> " +
  1436. "\n <TR> " +
  1437. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='11%'><pre>수 술 명:</pre></TD> " +
  1438. "\n <TD style='border-style: solid;border-left-style: none; border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'> " +
  1439. "\n <pre> <!--?VAR_JINDAN2?--></pre> " +
  1440. "\n </TD> " +
  1441. "\n </TR> " +
  1442. "\n <TR> " +
  1443. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: center;' width='11%' rowspan='3'>참 여<BR>의료진</TD> " +
  1444. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='15%'><pre><!--?VAR_ANSTCAP1?--></pre></TD> " +
  1445. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='69%' height='35px' ><pre> <!--?VAR_OPERATION1?--></pre></TD> " +
  1446. "\n </TR> " +
  1447. "\n <TR> " +
  1448. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='15%'><pre><!--?VAR_ANSTCAP2?--></pre></TD> " +
  1449. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='69%' height='35px' ><pre> <!--?VAR_OPERATION2?--></pre></TD> " +
  1450. "\n </TR> " +
  1451. "\n <TR> " +
  1452. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='15%'><pre><!--?VAR_ANSTCAP3?--></pre></TD> " +
  1453. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='69%' height='35px' ><pre> <!--?VAR_OPERATION3?--></pre></TD> " +
  1454. "\n </TR> " +
  1455. "\n <TR> " +
  1456. "\n <TD style='border-style: solid;border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='95%' height='30px' colspan='3'><pre> 시 행 예 정 일 : <!--?VAR_OPCNFMDD?--></pre></TD> " +
  1457. "\n </TR> " +
  1458. "\n <TR> " +
  1459. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>심혈관질환</pre></TD> " +
  1460. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□고·저혈압 □심근경색 □부정맥 □뇌경색 □뇌출혈 □기타( ) □ 해당없음</pre></TD> " +
  1461. "\n </TR> " +
  1462. "\n <TR> " +
  1463. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>호흡기질환</pre></TD> " +
  1464. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□호흡곤란 □결핵 □만성기관지염 □기타( ) □ 해당없음</pre></TD> " +
  1465. "\n </TR> " +"\n <TR> " +
  1466. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>대사질환</pre></TD> " +
  1467. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□신장질환 (부종 등) □당뇨병 □갑상선질환 □기타( ) □ 해당없음</pre></TD> " +
  1468. "\n </TR> " +"\n <TR> " +
  1469. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>특이체질</pre></TD> " +
  1470. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□약물 부작용 □알레르기질환 □기타( ) □ 해당없음</pre></TD> " +
  1471. "\n </TR> " +"\n <TR> " +
  1472. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>혈액질환</pre></TD> " +
  1473. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□출혈 소인 □기타( ) □ 해당없음</pre></TD> " +
  1474. "\n </TR> " +"\n <TR> " +
  1475. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>복용약물</pre></TD> " +
  1476. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□항혈전제 □아스피린 □기타약물( ) □ 해당없음</pre></TD> " +
  1477. "\n </TR> " +"\n <TR> " +
  1478. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>기도이상</pre></TD> " +
  1479. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□수면무호흡증 □과거 마취시 합병증 □기타 ( ) □ 해당없음</pre></TD> " +
  1480. "\n </TR> " +"\n <TR> " +
  1481. "\n <TD style='border-style: solid;border-right-style: none; border-bottom-style: none;border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>개인 습관</pre></TD> " +
  1482. "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>흡연( □유 □무)</pre></TD> " +
  1483. "\n </TR> " +
  1484. "\n </TR> " +"\n <TR> " +
  1485. "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; font-size: 10pt; font-family: 맑은 고딕; text-align: left;' width='11%'><pre>과거병력</pre></TD> " +
  1486. "\n <TD style='border-style: solid;border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□상해전력 □마약사고 □수술 □기타( ) □ 해당없음</pre></TD> " +
  1487. "\n </TR> " +
  1488. "\n </TABLE> " +
  1489. "\n </BODY> " +
  1490. "\n </HTML> "
  1491. }
  1492. break;
  1493. default:
  1494. local_file = "cover_header3.html";
  1495. if(fso.FileExists(local_path + local_file) == true)
  1496. {
  1497. fso.DeleteFile(local_path + local_file, true)
  1498. }
  1499. if(fso.FileExists(local_path + local_file) == false)
  1500. {
  1501. cover_header = cover_header + headertitle + footer
  1502. }
  1503. break;
  1504. break;
  1505. }
  1506. var a = fso.CreateTextFile( local_path + local_file , true, true);
  1507. a.WriteLine(cover_header);
  1508. a.Close();
  1509. }
  1510. function fChartCreateHtml(formtypecls,formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn)
  1511. {
  1512. if(fso.FileExists(gv_ImgeSavePath + "chart1.html") == true)
  1513. {
  1514. fso.DeleteFile(gv_ImgeSavePath + "chart*.html", true)
  1515. }
  1516. // 환자정보
  1517. var getdate = "";
  1518. var barcode= "";
  1519. var pidinfo = "";
  1520. var patnminfo = "";
  1521. var prnt_patnminfo ="";
  1522. var sa = "";
  1523. var barcode_pid = "";
  1524. if( !utlf_isNull(parent.parent) && isValidObject("ds_main_ordinfo") ){
  1525. barcode_pid = parent.parent.ds_main_ordinfo.getColumn(0,"pid");
  1526. }
  1527. if( formtypecls != "6" ){
  1528. if(utlf_isNull(ocrtag)){
  1529. ocrtag = "+2012123456789+";
  1530. barcode = "*2012123456789*";
  1531. }else if( ocrtag == "N" ){
  1532. }else{
  1533. ocrtag = "+" + ocrtag + "+";
  1534. barcode = "*" + ocrtag + "*";
  1535. }
  1536. }else{
  1537. if(utlf_isNull(ocrtag)){
  1538. ocrtag = "+2012123456789+";
  1539. barcode = "*" + barcode_pid + "*";
  1540. }else if( ocrtag == "N" ){
  1541. }else{
  1542. ocrtag = "+" + ocrtag + "+";
  1543. barcode = "*" + barcode_pid + "*";
  1544. }
  1545. }
  1546. //[2012.04.27 기관코드 추가 ]
  1547. var pInstcd = "";
  1548. if( !utlf_isNull(parent.parent) && isValidObject("ds_main_ordinfo") ){
  1549. pInstcd = parent.parent.ds_main_ordinfo.getColumn(0,"instcd");
  1550. }
  1551. if(utlf_isNull(pInstcd)){
  1552. pInstcd = sysf_getUserInfo("dutplceinstcd");
  1553. }
  1554. //[2012.04.27 기관코드 추가 ]
  1555. //f_View.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+pInstcd+".jpg");
  1556. if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
  1557. pidinfo = ds_main_patinfo.getColumn(0,"pid");
  1558. patnminfo = ds_main_patinfo.getColumn(0,"patnm");
  1559. ds_main_patinfo.setColumn(0,"rrgstno", ds_main_patinfo.getColumn(0,"rrgstno"));
  1560. ds_main_patinfo.setColumn(0,"centcd", ds_main_patinfo.getColumn(0,"centcd"));
  1561. ds_main_patinfo.setColumn(0,"centengabbr", ds_main_patinfo.getColumn(0,"centengabbr"));
  1562. ds_main_patinfo.setColumn(0,"oprsrvno", "");
  1563. } else if (ds_hidden.getColumn(0,"parentflag") == "PRNT"){
  1564. if( !utlf_isNull(parent.parent) && parent.parent.toString().toUpperCase() != "[OBJECT CHILDFRAME]" && parent.parent.objects["ds_main_ordinfo"] != null ){
  1565. pidinfo = parent.parent.ds_main_ordinfo.getColumn(0,"pid");
  1566. patnminfo = parent.parent.ds_main_ordinfo.getColumn(0,"patnm");
  1567. sa = parent.parent.ds_main_ordinfo.getColumn(0,"sa");
  1568. ds_main_patinfo.setColumn(0,"pid", parent.parent.ds_main_ordinfo.getColumn(0,"pid"));
  1569. ds_main_patinfo.setColumn(0,"orddd", parent.parent.ds_main_ordinfo.getColumn(0,"orddd"));
  1570. ds_main_patinfo.setColumn(0,"ordtype", parent.parent.ds_main_ordinfo.getColumn(0,"ordtype"));
  1571. ds_main_patinfo.setColumn(0,"orddeptcd", parent.parent.ds_main_ordinfo.getColumn(0,"orddeptcd"));
  1572. ds_main_patinfo.setColumn(0,"patnm", parent.parent.ds_main_ordinfo.getColumn(0,"patnm"));
  1573. ds_main_patinfo.setColumn(0,"drid", parent.parent.ds_main_ordinfo.getColumn(0,"drid"));
  1574. ds_main_patinfo.setColumn(0,"drnm", parent.parent.ds_main_ordinfo.getColumn(0,"drnm"));
  1575. ds_main_patinfo.setColumn(0,"sa", parent.parent.ds_main_ordinfo.getColumn(0,"sa"));
  1576. ds_main_patinfo.setColumn(0,"inroomcd", parent.parent.ds_main_ordinfo.getColumn(0,"inroomcd"));
  1577. ds_main_patinfo.setColumn(0,"cretno", parent.parent.ds_main_ordinfo.getColumn(0,"cretno"));
  1578. ds_main_patinfo.setColumn(0,"rrgstno", parent.parent.ds_main_ordinfo.getColumn(0,"rrgstno"));
  1579. ds_main_patinfo.setColumn(0,"centcd", parent.parent.ds_main_ordinfo.getColumn(0,"centcd"));
  1580. ds_main_patinfo.setColumn(0,"centnm", parent.parent.ds_main_ordinfo.getColumn(0,"centnm"));
  1581. ds_main_patinfo.setColumn(0,"centengabbr", parent.parent.ds_main_ordinfo.getColumn(0,"centengabbr"));
  1582. ds_main_patinfo.setColumn(0,"oprsrvno", parent.parent.ds_main_ordinfo.getColumn(0,"oprsrvno"));
  1583. }else{
  1584. sysf_trace("parent.parent OBJECT CHILDFRAME fChartCreateHtml");
  1585. ds_main_patinfo.setColumn(0,"pid", "");
  1586. ds_main_patinfo.setColumn(0,"orddd", "");
  1587. ds_main_patinfo.setColumn(0,"ordtype", "");
  1588. ds_main_patinfo.setColumn(0,"orddeptcd", "");
  1589. ds_main_patinfo.setColumn(0,"patnm", "");
  1590. ds_main_patinfo.setColumn(0,"drid", "");
  1591. ds_main_patinfo.setColumn(0,"drnm", "");
  1592. ds_main_patinfo.setColumn(0,"sa", "");
  1593. ds_main_patinfo.setColumn(0,"inroomcd", "");
  1594. ds_main_patinfo.setColumn(0,"cretno", "");
  1595. ds_main_patinfo.setColumn(0,"rrgstno", "");
  1596. ds_main_patinfo.setColumn(0,"centcd", "");
  1597. ds_main_patinfo.setColumn(0,"centnm", "");
  1598. ds_main_patinfo.setColumn(0,"centengabbr", "");
  1599. ds_main_patinfo.setColumn(0,"oprsrvno", "");
  1600. }
  1601. }
  1602. var hardcd = ds_temp_hardcode.getColumn(0,"hardcd");
  1603. if (hardcd == "Y")
  1604. {
  1605. for(var i = pidinfo.length; i <= 8; i++){
  1606. if(i < 8){
  1607. pidinfo = "0"+pidinfo;
  1608. }
  1609. }
  1610. var str1 = pidinfo.substr(0, 3);
  1611. var str2 = pidinfo.substr(3, 2);
  1612. var str3 = pidinfo.substr(5, 2);
  1613. var str4 = pidinfo.substr(7, 1);
  1614. pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
  1615. }
  1616. getdate = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0,"orddd"));
  1617. // 환자명 5자까리 수정
  1618. if (patnminfo.length > 5 && patnminfo.length <= 10)
  1619. {
  1620. prnt_patnminfo = patnminfo ;
  1621. }
  1622. else if (patnminfo.length > 11)
  1623. {
  1624. prnt_patnminfo = patnminfo ;
  1625. //외국인 환자를 위해서 수정(20160311 이윤주)
  1626. //prnt_patnminfo = patnminfo.substring(0, 10);
  1627. }
  1628. else
  1629. {
  1630. for(var i = 0; i <= patnminfo.length; i++){
  1631. tmp_patnminfo = patnminfo.substring(i, i+1);
  1632. if(i == patnminfo.length){
  1633. break;
  1634. }
  1635. prnt_patnminfo = prnt_patnminfo + tmp_patnminfo.concat(" ");
  1636. }
  1637. }
  1638. ds_send_reqdata.setColumn(0,"deptcd", ds_main_patinfo.getColumn(0,"orddeptcd"));
  1639. ds_send_reqdata.setColumn(0,"orddd", ds_main_patinfo.getColumn(0,"orddd"));
  1640. // 진료정보
  1641. var oParam = {};
  1642. oParam.id = "TRMRF03805";
  1643. oParam.service = "formmngtapp.OcrPreViewMngt";
  1644. oParam.method = "reqGetDeptInfo";
  1645. oParam.inds = "req=ds_send_reqdata";
  1646. oParam.outds = "ds_main_deptinfo=deptinfo";
  1647. oParam.async = false;
  1648. //oParam.callback = "cf_TRMRF03805";
  1649. tranf_submit(oParam);
  1650. var dept = ds_main_deptinfo.getColumn(0,"deptengabbr");
  1651. var juminno = ds_main_patinfo.getColumn(0,"rrgstno");
  1652. var treatdate = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
  1653. var ordtype = ds_main_patinfo.getColumn(0,"ordtype");
  1654. if (ordtype == 'I') {
  1655. ds_send_reqdata.setColumn(0,"pid", ds_main_patinfo.getColumn(0,"pid"));
  1656. ds_send_reqdata.setColumn(0,"orddd", ds_main_patinfo.getColumn(0,"orddd"));
  1657. ds_send_reqdata.setColumn(0,"cretno", ds_main_patinfo.getColumn(0,"cretno"));
  1658. var oParam = {};
  1659. oParam.id = "TRMRF03809";
  1660. oParam.service = "formmngtapp.OcrPreViewMngt";
  1661. oParam.method = "reqGetInRoomInfo";
  1662. oParam.inds = "req=ds_send_reqdata";
  1663. oParam.outds = "ds_main_inroominfo=inroominfo";
  1664. oParam.async = false;
  1665. //oParam.callback = "cf_TRMRF03809";
  1666. tranf_submit(oParam);
  1667. var inroomcd = ds_main_inroominfo.getColumn(0,"roomcd");
  1668. } else {
  1669. var inroomcd =" ";
  1670. }
  1671. var getformnm = ds_main_ocrinfo.getColumn(0,"formprntnm");
  1672. var arryformnm = getformnm.split("\n");
  1673. var langflag = ds_main_ocrinfo.getColumn(0,"langflag");
  1674. var formnm ="" ;
  1675. var formnm2 ="" ;
  1676. if(arryformnm.length == 2){
  1677. formnm = arryformnm[0];
  1678. formnm2 = arryformnm[1];
  1679. } else if(arryformnm.length == 1){
  1680. formnm = arryformnm[0];
  1681. }
  1682. //formnm = getformnm.replace("\n",' ');
  1683. // 출력정보
  1684. var getdate = utlf_getCurrentDate();
  1685. var gettime = utlf_getCurrentTime();
  1686. var getuser = sysf_getUserName();
  1687. var getuseren = sysf_getUserInfo("userengnm");
  1688. var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
  1689. var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
  1690. var langflag = ds_main_ocrinfo.getColumn(0,"langflag");
  1691. var printDate = "";
  1692. var printDept = "";
  1693. var printIP = sysf_getUserInfo("ipaddr").split(".");
  1694. //예전데이터 뽑을때 활용 - 평가(이윤주)
  1695. //var dateprnt = "2016/12/18";
  1696. //var timeprnt ="11:37:23";
  1697. //var getuser = "김지영";
  1698. switch(langflag){
  1699. case "KO":
  1700. printDate = "출력일시 : " + dateprnt + " " + timeprnt + " " + printIP[2] + "." + printIP[3]+ " " +inroomcd;
  1701. printDept = "출력자 : " + getuser;
  1702. break;
  1703. case "EN":
  1704. printDate = "Print Date : " + dateprnt + " " + timeprnt + " " + printIP[2] + "." + printIP[3]+ " " +inroomcd;
  1705. printDept = "Printed by : " + getuser;
  1706. break;
  1707. default:
  1708. printDate = "출력일시 : " + dateprnt + " " + timeprnt + " " + printIP[2] + "." + printIP[3]+ " " +inroomcd;
  1709. printDept = "출력자 : " + getuser;
  1710. break;
  1711. }
  1712. ds_send_reqdata.clearData();
  1713. ds_send_reqdata.addRow();
  1714. //2012-10-15 김유성 수정--------------------------------------------------------------------------------------------------
  1715. if(ds_main.getColumn(0,"exist") == "Y"){
  1716. } else if( utlf_isNull(ds_main.getColumn(0,"exist")) && utlf_isNull(ds_main_ocrinfo.getColumnInfo("diagengnm"))){
  1717. ds_send_reqdata.setColumn(0,"pid", ds_main_patinfo.getColumn(0,"pid"));
  1718. ds_send_reqdata.setColumn(0,"orddd", ds_main_patinfo.getColumn(0,"orddd"));
  1719. ds_send_reqdata.setColumn(0,"cretno", ds_main_patinfo.getColumn(0,"cretno"));
  1720. ds_send_reqdata.setColumn(0,"orddeptcd", ds_main_patinfo.getColumn(0,"orddeptcd"));
  1721. ds_send_reqdata.setColumn(0,"ordtype", ds_main_patinfo.getColumn(0,"ordtype"));
  1722. var oParam = {};
  1723. oParam.id = "TRMRF03807";
  1724. oParam.service = "formmngtapp.OcrPreViewMngt";
  1725. oParam.method = "reqGetDiagnm";
  1726. oParam.inds = "req=ds_send_reqdata";
  1727. oParam.outds = "ds_main_diaginfo=diaginfo";
  1728. oParam.async = false;
  1729. //oParam.callback = "cf_TRMRF03807";
  1730. tranf_submit(oParam);
  1731. }
  1732. var jindan1 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(0,"termengnm"));
  1733. var jindan2 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(1,"termengnm"));
  1734. var opengnm1 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(0,"termhngnm"));
  1735. var opengnm2 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(1,"termhngnm"));
  1736. var opengnm3 = "";
  1737. var anstcap1 = "";
  1738. var anstcap2 = "";
  1739. var anstcap3 = "";
  1740. var opcnfmdd = "";
  1741. //--------------------------------------------------------------------------------------------------------------------------
  1742. if( formtypecls == "7" || formtypecls == "8" ){
  1743. // Default
  1744. if( formtypecls == "8" ){
  1745. anstcap1 = "주치의(집도의1)";
  1746. anstcap2 = "주치의(집도의2)";
  1747. anstcap3 = "주치의(집도의3)";
  1748. opcnfmdd = "2 0 년 월 일";
  1749. }
  1750. var nOprsrvno = ds_main_patinfo.getColumn(0,"oprsrvno");
  1751. if( utlf_isNull(nOprsrvno)
  1752. && parent.parent instanceof ChildFrame == false
  1753. && (parent.parent.objects["ds_main_anstconsent"] != null
  1754. && parent.parent.ds_main_anstconsent.getColumn(0,"printyn") != "Y")
  1755. && frmf_getParameter("anstconsentload") != "Y" ){
  1756. if ( 6 != sysf_messageBox("수술정보가 없습니다. 수술 동의서는 수술 Tab에서 서식 출력 바랍니다.\n\n수술 정보 없이 계속 진행하시겠습니까?","Q") ) {
  1757. if( parent.parent.objects["ds_main_selform"] != null ){
  1758. parent.parent.ds_main_selform.setColumn(0, "selform", "");
  1759. }
  1760. if( parent.parent.objects["ds_main_ordinfo"] != null ){
  1761. parent.parent.ds_main_ordinfo.setColumn(0, "formcd", "");
  1762. }
  1763. return;
  1764. }
  1765. }
  1766. dsf_createDsRow("ds_cond_TRMRF03815", [{col:"formcd", type:"STRING", size:256, val:formcd}
  1767. , {col:"oprsrvno", type:"STRING", size:256, val:nOprsrvno}]);
  1768. dsf_createDs("ds_data_TRMRF03815");
  1769. var oParam = {};
  1770. oParam.id = "TRMRF03815";
  1771. oParam.service = "formmngtapp.OcrPrntMngt";
  1772. oParam.method = "reqGetSusulInfo";
  1773. oParam.inds = "req=ds_cond_TRMRF03815";
  1774. oParam.outds = "ds_data_TRMRF03815=susullist";
  1775. oParam.async = false;
  1776. tranf_submit(oParam);
  1777. if( ds_data_TRMRF03815.rowcount > 0 ){
  1778. jindan1 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"diagnm"));
  1779. jindan2 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"opnm"));
  1780. opengnm1 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"perfdr"));
  1781. opengnm2 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"perfdr2"));
  1782. opengnm3 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"perfdr3"));
  1783. var tmp_opcnfmdd = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"opcnfmdd"));
  1784. if( !utlf_isNull(tmp_opcnfmdd) ){
  1785. opcnfmdd = tmp_opcnfmdd
  1786. }
  1787. // 마취동의서의 경우 의료진정보는 마취의 정보로 설정
  1788. if( ds_data_TRMRF03815.getColumn(0,"anstconsentyn") == "Y" ){
  1789. opengnm1 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"anstdr"));
  1790. opengnm2 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"anstdr2"));
  1791. opengnm3 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"anstdr3"));
  1792. anstcap1 = "마취의(마취의1)";
  1793. anstcap2 = "마취의(마취의2)";
  1794. anstcap3 = "마취의(마취의3)";
  1795. }
  1796. }else{
  1797. var tmpNm = "(이름: ) □전문의(전문과목: ), □일반의(진료과목: )";
  1798. jindan1 = "";
  1799. jindan2 = "";
  1800. opengnm1 = tmpNm;
  1801. opengnm2 = tmpNm;
  1802. opengnm3 = tmpNm;
  1803. }
  1804. }
  1805. f_View.PageRemove(0,0);
  1806. f_View.Viewmode = 0;
  1807. f_View.BackColor = 16777215;
  1808. f_View.AutoRefresh = false;
  1809. for(var i = 0; i < ds_main_ocrinfo.rowcount; i++){
  1810. trans="";
  1811. trans = "<!--@\n @DOCUMENT_HOME = " + gv_ImgeSavePath +
  1812. "\n @OUTPUT_WIDTH = 21.00" +
  1813. "\n @OUTPUT_HEIGHT = 29.70" +
  1814. "\n @OUTPUT_MARGIN_TOP = 0.84" +
  1815. "\n @OUTPUT_MARGIN_BOTTOM = 0.84" +
  1816. "\n @OUTPUT_MARGIN_LEFT = 0.84" +
  1817. "\n @OUTPUT_MARGIN_RIGHT = 0.84" +
  1818. "\n @OUTPUT_MAGNIFICATION = 2"
  1819. if( i == 0)
  1820. {
  1821. trans = trans +
  1822. "\n @COVER_HEADER = template/cover_header" + formtypecls + ".html" +
  1823. "\n @COVER_FOOTER = template/cover_footer.html"
  1824. } else
  1825. {
  1826. trans = trans +
  1827. "\n @COVER_HEADER = template/body_header.html" +
  1828. "\n @COVER_FOOTER = template/body_footer.html"
  1829. }
  1830. if (ordtype == 'I') {
  1831. if (inroomcd == "" || inroomcd == null)
  1832. {
  1833. }
  1834. else
  1835. {
  1836. }
  1837. }
  1838. trans = trans +
  1839. "\n @VAR_OCR_LEFT = " + ocrtag +
  1840. "\n @VAR_OCR_RIGHT = " + ocrtag +
  1841. "\n @VAR_PAT_NUM = " + pidinfo +
  1842. "\n @VAR_PAT_NAME = " + prnt_patnminfo +
  1843. "\n @VAR_PAT_NAME1 = " + patnminfo +
  1844. "\n @VAR_PAT_SA = " + sa +
  1845. "\n @VAR_PAT_JUMIN_NO = " + juminno +
  1846. "\n @VAR_TREAT_DEPT = " + dept +
  1847. "\n @VAR_TREAT_DATE = " + treatdate +
  1848. "\n @VAR_WARD_HEAD = " + "병실 : " + inroomcd +
  1849. "\n @VAR_CHART_NAME_TOP = " + formnm +
  1850. "\n @VAR_CHART_NAME2_TOP = " + formnm2 +
  1851. "\n @VAR_PRINT_DATE = " + printDate +
  1852. "\n @VAR_PRINT_DEPT = " + printDept +
  1853. "\n @VAR_PRINT_BARCODE = " + barcode +
  1854. "\n @VAR_JINDAN1 = " + jindan1 +
  1855. "\n @VAR_JINDAN2 = " + jindan2 +
  1856. "\n @VAR_OPERATION1 = " + opengnm1 +
  1857. "\n @VAR_OPERATION2 = " + opengnm2 +
  1858. "\n @VAR_OPERATION3 = " + opengnm3 +
  1859. "\n @VAR_OPCNFMDD = " + opcnfmdd +
  1860. "\n @VAR_ANSTCAP1 = " + anstcap1 +
  1861. "\n @VAR_ANSTCAP2 = " + anstcap2 +
  1862. "\n @VAR_ANSTCAP3 = " + anstcap3 +
  1863. "\n @VAR_PAGE_CURRENT = " + "Page: " + ( i + 1 ) +
  1864. "\n @VAR_PAGE_TOTAL = " + ds_main_ocrinfo.rowcount +
  1865. "\n @-->\n" +
  1866. "<HTML>" +
  1867. "\n<BODY>" +
  1868. "\n<TABLE WIDTH='100%' HEIGHT='100%'>" +
  1869. "\n <TR>" +
  1870. "\n <TD align='center'>"
  1871. var path;
  1872. var width;
  1873. var ocrfnm = ds_main_ocrinfo.getColumn(i, "ocrfilenm");
  1874. path = gv_ImgeSavePath + ocrfnm
  1875. f_View.PageAppend( path ,1,1);
  1876. f_View.PageCurrent = f_View.PageTotal;
  1877. width = f_View.PageWidth ;
  1878. f_View.PageRemove(f_View.PageTotal,f_View.PageTotal);
  1879. if( i == 0)
  1880. {
  1881. switch(formtypecls)
  1882. {
  1883. case "1":
  1884. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='650' ISOTROPIC BORDERREMOVE>"
  1885. break;
  1886. case "2":
  1887. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='800' ISOTROPIC BORDERREMOVE>"
  1888. break;
  1889. case "3":
  1890. if( width < 1400 ){
  1891. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE:1,1>"
  1892. } else {
  1893. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE:1412,1800>"
  1894. }
  1895. break;
  1896. case "4":
  1897. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE>"
  1898. break;
  1899. case "5":
  1900. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE>"
  1901. break;
  1902. case "6":
  1903. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE>"
  1904. break;
  1905. case "7":
  1906. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='470' ISOTROPIC BORDERREMOVE>"//710
  1907. break;
  1908. case "8":
  1909. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='350' ISOTROPIC BORDERREMOVE>"
  1910. break;
  1911. }
  1912. } else
  1913. {
  1914. if( width < 1400 ){
  1915. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='910' ISOTROPIC BORDERREMOVE:1,1>"
  1916. } else {
  1917. trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='910' ISOTROPIC BORDERREMOVE:1412,1900>"
  1918. }
  1919. }
  1920. trans = trans + "\n </TD>" +
  1921. "\n </TR>" +
  1922. "\n</TABLE>" +
  1923. "\n</BODY>" +
  1924. "\n</HTML>" +
  1925. "\n"
  1926. var a = fso.CreateTextFile(gv_ImgeSavePath + "chart" + (i + 1) + ".html", true, true);
  1927. a.WriteLine(trans);
  1928. a.Close();
  1929. //2012-08-10 오전 9:45:48 강지훈 전자동의서 서명을 위한 파일패스경로 저장.
  1930. var ocrfilepath = gv_ImgeSavePath + "chart" + (i + 1) + ".html";
  1931. ds_main_ocrinfo.setColumn(0,"ocrfilepath",ocrfilepath);
  1932. f_View.PageAppend(ocrfilepath,1,1);
  1933. }
  1934. f_View.PageCurrent = 1;
  1935. f_View.AutoRefresh = true;
  1936. }
  1937. /****************************************************************************************
  1938. * Description : OCR 데이터 조회
  1939. * Argument : 01. inode : index
  1940. * retrun type : N/A
  1941. * Creator : (SSMRC03160_LC_ADMIN MRF03800.xjs 제거로 fmakeOCRTag 복사함 로직수정시 동일하게 수정 필요)
  1942. ****************************************************************************************/
  1943. function fGetOCRData(inode){
  1944. var localfilenm = ds_main_ocrinfo.getColumn(inode, "ocrfilenm");
  1945. ds_reqfilepath.setColumn(0,"ocrseq", ds_main_ocrinfo.getColumn(inode, "ocrseq") );
  1946. var oParam = {};
  1947. oParam.id = "TRMRF03802";
  1948. oParam.service = "formmngtapp.OcrPreViewMngt";
  1949. oParam.method = "reqGetOcrData";
  1950. oParam.inds = "req=ds_reqfilepath";
  1951. oParam.outds = "ds_filedata=ocrfile";
  1952. oParam.async = false;
  1953. //oParam.callback = "cf_TRMRF03802";
  1954. tranf_submit(oParam);
  1955. //dsf_readFileFromDs(gv_ImgeSavePath + "\\" + localfilenm, ds_filedata, 0, "ocrdata"); // 파일저장
  1956. dsf_readFileFromDs(gv_ImgeSavePath + localfilenm, ds_filedata, 0, "ocrdata"); // 파일저장
  1957. }
  1958. /**
  1959. * @desc : 기준페이지에서 다음 페이지
  1960. *
  1961. * @param :
  1962. * @return :
  1963. * @author : HIT EMR Team
  1964. * @---------------------------------------------------
  1965. */
  1966. function fPostPage(){
  1967. var currpage = parseInt( ds_pageinfo.getColumn(0,"currentpage"));
  1968. if( currpage == (f_View.PageTotal) ) {
  1969. } else {
  1970. currpage = currpage+1;
  1971. ds_pageinfo.setColumn(0,"currentpage", currpage);
  1972. fMovePage(currpage);
  1973. grp_cnrlbox.btn_prepage.visible = true;
  1974. if (parseInt(currpage) == parseInt(ds_pageinfo.getColumn(0,"ocrdatacnt"))) {
  1975. grp_cnrlbox.btn_postpage.enable = false;
  1976. grp_cnrlbox.btn_prepage.enable = true;
  1977. } else {
  1978. grp_cnrlbox.btn_postpage.enable = true;
  1979. grp_cnrlbox.btn_prepage.enable = true;
  1980. }
  1981. }
  1982. }
  1983. /**
  1984. * @desc : OCR 페이지 이동
  1985. *
  1986. * @param :
  1987. * @return :
  1988. * @author : HIT EMR Team
  1989. * @---------------------------------------------------
  1990. */
  1991. function fMovePage(pageno){
  1992. var formtype = ds_main_forminfo.getColumn(0,"formtypecls");
  1993. var pid = ds_main_forminfo.getColumn(0,"pid");
  1994. var orddd = ds_main_forminfo.getColumn(0,"orddd");
  1995. var ordtype = ds_main_forminfo.getColumn(0,"ordtype");
  1996. var cretno = ds_main_forminfo.getColumn(0,"cretno");
  1997. var formcd = ds_main_forminfo.getColumn(0,"formcd");
  1998. var ocrtag = ds_main_ocrtag.getColumn(0,"tag");
  1999. var ocrtagprntyn = ds_main_forminfo.getColumn(0,"ocrtagprntyn");
  2000. // var topinfoprntyn = parent.frmf_getParameter("topinfoprntyn");
  2001. // if(pageno == '1'){
  2002. //
  2003. // } else if ( topinfoprntyn != "Y") {
  2004. //
  2005. // }
  2006. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  2007. f_View.PageCurrent = pageno;
  2008. }
  2009. /**
  2010. * @desc : 기준페이지에서 이전 페이지
  2011. *
  2012. * @param :
  2013. * @return :
  2014. * @author : HIT EMR Team
  2015. * @---------------------------------------------------
  2016. */
  2017. function fPrePage(){
  2018. var currpage = parseInt( ds_pageinfo.getColumn(0,"currentpage"));
  2019. if(currpage == 1){
  2020. } else {
  2021. currpage = currpage-1;
  2022. ds_pageinfo.setColumn(0,"currentpage", currpage);
  2023. fMovePage(currpage);
  2024. if (parseInt(currpage) == 1 ) {
  2025. grp_cnrlbox.btn_prepage.enable = false;
  2026. grp_cnrlbox.btn_postpage.enable = true;
  2027. } else {
  2028. grp_cnrlbox.btn_prepage.enable = true;
  2029. grp_cnrlbox.btn_postpage.enable = true;
  2030. }
  2031. }
  2032. }
  2033. function fPrint(prntflag)
  2034. {
  2035. // CLIP 전자 동의서 분기 처리
  2036. if (CLIP_FLAG) {
  2037. var objArg = new Object();
  2038. objArg.arg_ds_para = ds_para_clip;
  2039. frmf_modal("SPMRF04601", "SPMRF04601", objArg, false, 1, "", "", 350, 70, "", "", "", "P");
  2040. return;
  2041. }
  2042. var insyn;
  2043. var existyn;
  2044. var ocrDataCnt = ds_pageinfo.getColumn(0,"ocrdatacnt");
  2045. var currentpage = ds_pageinfo.getColumn(0,"currentpage");
  2046. var prntcnt = 1;
  2047. var succ_Prnt = false;
  2048. var save_ocrtag = "";
  2049. var doubyn = ds_main_ocrinfo.getColumn(0,"doubyn");
  2050. if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
  2051. parent.parent.group2.btn_prnt.enable = false;
  2052. }
  2053. //이윤주 수정 20160912 formtypecls=6 인경우는 이미지만 출력
  2054. var formtypecls = ds_main_forminfo.getColumn(0,"formtypecls");
  2055. if (formtypecls == "6") {
  2056. fPrintOCR();
  2057. return;
  2058. }
  2059. if((prntflag == 'A') || (prntflag == 'P')){
  2060. ds_main_temp_ocrtag.setColumn(0,"tag", "+" + ds_main_ocrtag.getColumn(0,"tag") + "+" );
  2061. fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
  2062. fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
  2063. if(ocrDataCnt > 0){
  2064. if(prntflag == 'P'){
  2065. for(var doubcnt = 1; doubcnt <= doubyn; doubcnt++){
  2066. if(doubcnt == 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2067. //--Yoo fSetBarCode();
  2068. // 20090715 OCRTAG 출력여부 값에 따른 수정
  2069. if(ds_main_forminfo.getColumn(0,"ocrtagprntyn") == "N"){
  2070. fOCRReplace("");
  2071. } else {
  2072. fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
  2073. }
  2074. } else {
  2075. fOCRReplace("[환자 보관용]");
  2076. }
  2077. grp_cnrlbox.opt_pagecnt.value = currentpage + "/" + ocrDataCnt;
  2078. succ_Prnt = fPrintOCR();
  2079. }
  2080. } else if (prntflag == 'A'){ // 재출력
  2081. for(var doubcnt = 1; doubcnt <= doubyn; doubcnt++){
  2082. for(prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++){
  2083. ds_pageinfo.setColumn(0,"doubcnt", doubcnt);
  2084. //--Yoo fMovePage('1');
  2085. // 2009-07-27 nj OCT TYPE5 버전 수정
  2086. if(prntcnt != 1){
  2087. ds_pageinfo.setColumn(0,"currentpage", prntcnt);
  2088. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  2089. if(doubcnt != 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2090. fOCRReplace("[환자 보관용]");
  2091. }
  2092. else
  2093. {
  2094. fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
  2095. }
  2096. } else {
  2097. ds_pageinfo.setColumn(0,"currentpage", prntcnt);
  2098. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  2099. if(doubcnt != 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2100. fOCRReplace("[환자 보관용]");
  2101. }
  2102. else
  2103. {
  2104. fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
  2105. }
  2106. }
  2107. ds_pageinfo.setColumn(0,"currentpage", prntcnt);
  2108. }
  2109. succ_Prnt = fPrintOCR();
  2110. }
  2111. }
  2112. }
  2113. if(succ_Prnt){
  2114. } else {
  2115. sysf_messageBox("출력을", "E009");
  2116. return;
  2117. }
  2118. } else{
  2119. var n_ocrtag;
  2120. n_ocrtag = fmakeOCRTag()
  2121. fOCRReplace(n_ocrtag);
  2122. //fBarcodeCheck에서 fOCRReplace를 실행한다.
  2123. //fOCRReplace(n_ocrtag);
  2124. fBarcodeCheck(n_ocrtag);
  2125. // 이력관련해서 저장후 출력으로 임시수정(20090225)
  2126. //fSaveOCR();
  2127. //--Yoo fMovePage('1');
  2128. save_ocrtag = fSaveOCR();
  2129. insyn = ds_hiddden_insocrtag.getColumn(0,"insyn");
  2130. if(insyn == "Y"){
  2131. if(ocrDataCnt > 0){
  2132. for(var doubcnt = 1; doubcnt <= doubyn; doubcnt++){
  2133. for(prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++){
  2134. ds_pageinfo.setColumn(0,"doubcnt", doubcnt);
  2135. //--Yoo fMovePage('1');
  2136. // 2009-07-27 nj OCT TYPE5 버전 수정
  2137. if(prntcnt != 1){
  2138. ds_pageinfo.setColumn(0,"currentpage", prntcnt);
  2139. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  2140. //--Yoo fSetBottomInfo();
  2141. if(doubcnt != 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2142. fOCRReplace("[환자 보관용]");
  2143. }
  2144. } else {
  2145. ds_pageinfo.setColumn(0,"currentpage", prntcnt);
  2146. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
  2147. if(doubcnt!= 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2148. fOCRReplace("[환자 보관용]");
  2149. }
  2150. }
  2151. }
  2152. if (gocrprntyn == "Y") {
  2153. succ_Prnt = fPrintOCR();
  2154. }
  2155. else {
  2156. succ_Prnt = "Y"; //하드코드에 등록된 과는 실제 출력하지 않는다
  2157. }
  2158. }
  2159. }
  2160. }
  2161. else
  2162. {
  2163. sysf_messageBox("출력(OCR)을", "E009");
  2164. return;
  2165. }
  2166. if(succ_Prnt){
  2167. // 이력관련해서 저장후 출력으로 임시수정(20090225)
  2168. insyn =ds_hiddden_insocrtag.getColumn(0,"insyn");
  2169. if(insyn == "Y"){
  2170. } else if(insyn != "Y"){
  2171. sysf_messageBox("저장을", "E009");
  2172. return;
  2173. }
  2174. } else {
  2175. sysf_messageBox("출력을", "E009");
  2176. return;
  2177. }
  2178. }
  2179. ds_pageinfo.setColumn(0,"doubcnt", "1");
  2180. ds_pageinfo.setColumn(0,"currentpage", "1");
  2181. ds_main.setColumn(0,"iptdiaghngnm", "");
  2182. return save_ocrtag;
  2183. }
  2184. // dbs227 의무기록실 사용자 LC, 클립소프트 구분 출력 기능
  2185. function fPrintDebug(prntflag, debugMode) {
  2186. // CLIP 전자 동의서 분기 처리
  2187. if (debugMode) {
  2188. var objArg = new Object();
  2189. objArg.arg_ds_para = ds_para_clip;
  2190. frmf_modal("SPMRF04601", "SPMRF04601", objArg, false, 1, "", "", 350, 70, "", "", "", "P");
  2191. return;
  2192. }
  2193. var insyn;
  2194. var existyn;
  2195. var ocrDataCnt = ds_pageinfo.getColumn(0, "ocrdatacnt");
  2196. var currentpage = ds_pageinfo.getColumn(0, "currentpage");
  2197. var prntcnt = 1;
  2198. var succ_Prnt = false;
  2199. var save_ocrtag = "";
  2200. var doubyn = ds_main_ocrinfo.getColumn(0, "doubyn");
  2201. if (ds_hidden.getColumn(0, "parentflag") == "PRNT") {
  2202. parent.parent.group2.btn_prnt.enable = false;
  2203. }
  2204. //이윤주 수정 20160912 formtypecls=6 인경우는 이미지만 출력
  2205. var formtypecls = ds_main_forminfo.getColumn(0, "formtypecls");
  2206. if (formtypecls == "6") {
  2207. fPrintOCR();
  2208. return;
  2209. }
  2210. if ((prntflag == 'A') || (prntflag == 'P')) {
  2211. ds_main_temp_ocrtag.setColumn(0, "tag", "+" + ds_main_ocrtag.getColumn(0, "tag") + "+");
  2212. fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
  2213. fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
  2214. if (ocrDataCnt > 0) {
  2215. if (prntflag == 'P') {
  2216. for (var doubcnt = 1; doubcnt <= doubyn; doubcnt++) {
  2217. if (doubcnt == 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2218. //--Yoo fSetBarCode();
  2219. // 20090715 OCRTAG 출력여부 값에 따른 수정
  2220. if (ds_main_forminfo.getColumn(0, "ocrtagprntyn") == "N") {
  2221. fOCRReplace("");
  2222. } else {
  2223. fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
  2224. }
  2225. } else {
  2226. fOCRReplace("[환자 보관용]");
  2227. }
  2228. grp_cnrlbox.opt_pagecnt.value = currentpage + "/" + ocrDataCnt;
  2229. succ_Prnt = fPrintOCR();
  2230. }
  2231. } else if (prntflag == 'A') { // 재출력
  2232. for (var doubcnt = 1; doubcnt <= doubyn; doubcnt++) {
  2233. for (prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++) {
  2234. ds_pageinfo.setColumn(0, "doubcnt", doubcnt);
  2235. //--Yoo fMovePage('1');
  2236. // 2009-07-27 nj OCT TYPE5 버전 수정
  2237. if (prntcnt != 1) {
  2238. ds_pageinfo.setColumn(0, "currentpage", prntcnt);
  2239. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
  2240. if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2241. fOCRReplace("[환자 보관용]");
  2242. } else {
  2243. fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
  2244. }
  2245. } else {
  2246. ds_pageinfo.setColumn(0, "currentpage", prntcnt);
  2247. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
  2248. if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2249. fOCRReplace("[환자 보관용]");
  2250. } else {
  2251. fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
  2252. }
  2253. }
  2254. ds_pageinfo.setColumn(0, "currentpage", prntcnt);
  2255. }
  2256. succ_Prnt = fPrintOCR();
  2257. }
  2258. }
  2259. }
  2260. if (succ_Prnt) {} else {
  2261. sysf_messageBox("출력을", "E009");
  2262. return;
  2263. }
  2264. } else {
  2265. var n_ocrtag;
  2266. n_ocrtag = fmakeOCRTag()
  2267. fOCRReplace(n_ocrtag);
  2268. //fBarcodeCheck에서 fOCRReplace를 실행한다.
  2269. //fOCRReplace(n_ocrtag);
  2270. fBarcodeCheck(n_ocrtag);
  2271. // 이력관련해서 저장후 출력으로 임시수정(20090225)
  2272. //fSaveOCR();
  2273. //--Yoo fMovePage('1');
  2274. save_ocrtag = fSaveOCR();
  2275. insyn = ds_hiddden_insocrtag.getColumn(0, "insyn");
  2276. if (insyn == "Y") {
  2277. if (ocrDataCnt > 0) {
  2278. for (var doubcnt = 1; doubcnt <= doubyn; doubcnt++) {
  2279. for (prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++) {
  2280. ds_pageinfo.setColumn(0, "doubcnt", doubcnt);
  2281. //--Yoo fMovePage('1');
  2282. // 2009-07-27 nj OCT TYPE5 버전 수정
  2283. if (prntcnt != 1) {
  2284. ds_pageinfo.setColumn(0, "currentpage", prntcnt);
  2285. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
  2286. //--Yoo fSetBottomInfo();
  2287. if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2288. fOCRReplace("[환자 보관용]");
  2289. }
  2290. } else {
  2291. ds_pageinfo.setColumn(0, "currentpage", prntcnt);
  2292. grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
  2293. if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
  2294. fOCRReplace("[환자 보관용]");
  2295. }
  2296. }
  2297. }
  2298. if (gocrprntyn == "Y") {
  2299. succ_Prnt = fPrintOCR();
  2300. } else {
  2301. succ_Prnt = "Y"; //하드코드에 등록된 과는 실제 출력하지 않는다
  2302. }
  2303. }
  2304. }
  2305. } else {
  2306. sysf_messageBox("출력(OCR)을", "E009");
  2307. return;
  2308. }
  2309. if (succ_Prnt) {
  2310. // 이력관련해서 저장후 출력으로 임시수정(20090225)
  2311. insyn = ds_hiddden_insocrtag.getColumn(0, "insyn");
  2312. if (insyn == "Y") {} else if (insyn != "Y") {
  2313. sysf_messageBox("저장을", "E009");
  2314. return;
  2315. }
  2316. } else {
  2317. sysf_messageBox("출력을", "E009");
  2318. return;
  2319. }
  2320. }
  2321. ds_pageinfo.setColumn(0, "doubcnt", "1");
  2322. ds_pageinfo.setColumn(0, "currentpage", "1");
  2323. ds_main.setColumn(0, "iptdiaghngnm", "");
  2324. return save_ocrtag;
  2325. }
  2326. function fOCRReplace(OCRno)
  2327. {
  2328. var formtypecls = ds_main_forminfo.getColumn(0, "formtypecls");
  2329. ds_main.setColumn(0,"exist", "N")
  2330. ds_hidden.getColumn(0,"parentflag")
  2331. if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
  2332. if(parent.parent.group2.swt_ocrinfoflag.tabindex == 2){
  2333. parent.parent.group2.btn_prnt.enable = false;
  2334. } else {
  2335. var parentauth = parent.parent.frmf_getScreenAuth();
  2336. if(parentauth.charAt(1) == '1'){ //20100727-kys-실행권한이 있을시에만 disable변경처리.(요청번호 : 11292)
  2337. parent.parent.group2.btn_prnt.enable = true;
  2338. }
  2339. }
  2340. }
  2341. if(OCRno != ""){
  2342. OCRno = OCRno.replace("+","");
  2343. OCRno = OCRno.replace("+","");
  2344. OCRno = OCRno.replace("+","");
  2345. OCRno = OCRno.replace("+","");
  2346. OCRno = OCRno.replace("+","");
  2347. OCRno = OCRno.replace("+","");
  2348. ds_main_ocrtag.setColumn(0,"tag", OCRno);
  2349. }
  2350. // [요청번호:20190103016] 퇴원(퇴소)사실 통지서 출력시 프린트물 용도 변경.
  2351. if( this.objects["ds_data_doubtitlelist"] == null ){
  2352. dsf_createDs("ds_data_doubtitlelist");
  2353. }
  2354. lf_getHardCDList("N", 6938, null, ds_data_doubtitlelist);
  2355. var nFormcd = ds_main_forminfo.getColumn(0, "formcd");
  2356. var nChngTitle = OCRno == "[환자 보관용]" ? ds_data_doubtitlelist.lookup("hardcd", nFormcd, "hardcdnm") : "";
  2357. for(var i = 1; i <= f_View.PageTotal; i++){
  2358. //[2012.04.27 기관코드 추가 ]
  2359. var pInstcd = "";
  2360. if (isValidObject("ds_main_ordinfo")){
  2361. pInstcd = ds_main_ordinfo.getColumn(0,"instcd");
  2362. }
  2363. if(pInstcd ==""){
  2364. pInstcd = sysf_getUserInfo("dutplceinstcd");
  2365. }
  2366. var OCR = "";
  2367. if( !utlf_isNull(nChngTitle) ){
  2368. OCR = "+" + nChngTitle + "+";
  2369. }else{
  2370. OCR = "+" + OCRno + "+";
  2371. }
  2372. var r = fso.OpenTextFile(gv_ImgeSavePath + "chart" + i + ".html", 1,false, -1)
  2373. var databuffer = "";
  2374. var trans ="";
  2375. while (!r.AtEndOfStream)
  2376. {
  2377. databuffer = r.ReadLine();
  2378. if(databuffer.substr(1, 10) == "@VAR_OCR_L"){
  2379. databuffer = " @VAR_OCR_LEFT = " + OCR
  2380. }
  2381. if(databuffer.substr(1, 10) == "@VAR_OCR_R"){
  2382. if(OCRno == "[환자 보관용]")
  2383. {
  2384. databuffer = " @VAR_OCR_RIGHT = "
  2385. }
  2386. else
  2387. {
  2388. databuffer = " @VAR_OCR_RIGHT = " + OCR
  2389. }
  2390. }
  2391. if( formtypecls != "6" ){
  2392. if(databuffer.substr(1, 18) == "@VAR_PRINT_BARCODE"){
  2393. if( !utlf_isNull(nChngTitle) ){
  2394. databuffer = " @VAR_PRINT_BARCODE = ";
  2395. }else{
  2396. databuffer = " @VAR_PRINT_BARCODE = *" + OCRno + "0" + i + "*";
  2397. }
  2398. }
  2399. }
  2400. trans += databuffer + "\n";
  2401. }
  2402. r.Close();
  2403. var a = fso.CreateTextFile(gv_ImgeSavePath + "chart" + i + ".html", true, true);
  2404. a.WriteLine(trans);
  2405. a.Close();
  2406. f_View.ActionParamINT1 = i;
  2407. f_View.ActionSingle = 1;
  2408. }
  2409. }
  2410. /****************************************************************************************
  2411. * Description : OCR 테그 생성
  2412. * Argument : N/A
  2413. * retrun type : N/A
  2414. * Creator : (SSMRC03160_LC_ADMIN MRF03800.xjs 제거로 fmakeOCRTag 복사함 로직수정시 동일하게 수정 필요)
  2415. ****************************************************************************************/
  2416. function fmakeOCRTag(){
  2417. /*
  2418. OCRTag는 일련번호를 사용하기로함.
  2419. 일시+일련번호 사용
  2420. */
  2421. var ocrtag = null;
  2422. var tmptag;
  2423. var prntocrtag = "";
  2424. ds_main_ocrtag.setColumn(0, "tag", "");
  2425. ds_send_reqdata.setColumn(0,"date", utlf_getCurrentDate());
  2426. var oParam = {};
  2427. oParam.id = "TRMRF03806";
  2428. oParam.service = "formmngtapp.OcrPreViewMngt";
  2429. oParam.method = "reqGetOCRSeq";
  2430. oParam.inds = "req=ds_send_reqdata";
  2431. oParam.outds = "ds_main_ocrtag_seq=ocrtagseq";
  2432. oParam.async = false;
  2433. //oParam.callback = "cf_TRMRF03806";
  2434. tranf_submit(oParam);
  2435. ocrtag = utlf_getCurrentDate() + ds_main_ocrtag_seq.getColumn(0,"seq");
  2436. for(var i = 0; i <= ocrtag.length; i++){
  2437. tmptag = ocrtag.substring(i, i+1);
  2438. if(i == ocrtag.length){
  2439. break;
  2440. }
  2441. // 글자 사이의 공백을 제거
  2442. // prntocrtag = prntocrtag + tmptag.concat(" ");
  2443. prntocrtag = prntocrtag + tmptag;
  2444. }
  2445. ds_main_ocrtag.setColumn(0,"tag", prntocrtag);
  2446. ds_main_temp_ocrtag.setColumn(0,"tag", "+"+prntocrtag+"+")
  2447. ds_send_reqdata.setColumn(0,"date", "");
  2448. return ds_main_temp_ocrtag.getColumn(0,"tag");
  2449. }
  2450. function fBarcodeCheck(OCRno)
  2451. {
  2452. var chkFlag = false;
  2453. while(chkFlag == false){
  2454. var j = 0;
  2455. var k = 0;
  2456. fOCRReplace(OCRno);
  2457. j = j + 1;
  2458. //바코드 체크
  2459. for(var i = 1; i <= f_View.PageTotal ; i++){
  2460. var r = fso.OpenTextFile(gv_ImgeSavePath + "chart" + i + ".html", 1, false, -1)
  2461. var databuffer = "";
  2462. while (!r.AtEndOfStream)
  2463. {
  2464. databuffer = r.ReadLine();
  2465. if(databuffer.substr(1, 18) == "@VAR_PRINT_BARCODE"){
  2466. if ( databuffer.indexOf("+") == -1 ) {
  2467. k = k + 1;
  2468. }
  2469. }
  2470. if (i == k) {
  2471. chkFlag = true;
  2472. }
  2473. if (j >= 30 ) {
  2474. chkFlag = true;
  2475. }
  2476. }
  2477. r.Close();
  2478. }
  2479. if( chkFlag == false ) {
  2480. //이윤주(LCTECH 요청-20130414)
  2481. //pause(j * 1000);
  2482. ds_send_reqdata.setColumn(0,"ocrtag", OCRno);
  2483. ds_send_reqdata.setColumn(0,"ipaddr", sysf_getUserInfo("ipaddr"));
  2484. ds_send_reqdata.setColumn(0,"instrid", sysf_getUserInfo("userid"));
  2485. var oParam = {};
  2486. oParam.id = "TXMRF03806";
  2487. oParam.service = "formmngtapp.OcrPreViewMngt";
  2488. oParam.method = "reqInsOcrLog";
  2489. oParam.inds = "req=ds_send_reqdata";
  2490. oParam.outds = "ds_log_ocrtag=ocrinfo";
  2491. oParam.async = false;
  2492. oParam.callback = "cf_TXMRF03806";
  2493. tranf_submit(oParam);
  2494. if(arErrorCode.pop("TXMRF03806") > -1){
  2495. ds_send_reqdata.clearData();
  2496. ds_send_reqdata.addRow();
  2497. return true;
  2498. }
  2499. }
  2500. }
  2501. }
  2502. function cf_TXMRF03806(sSvcId, nErrorCode, sErrorMsg) {
  2503. arErrorCode.push(sSvcId, nErrorCode);
  2504. }
  2505. function fSaveOCR(){
  2506. var savepath = this.objects["ds_send_reqdata"];
  2507. savepath.setColumn(0, "ocrtag", ds_main_ocrtag.getColumn(0,"tag"));
  2508. savepath.setColumn(0, "pid", ds_main_patinfo.getColumn(0,"pid"));
  2509. savepath.setColumn(0, "orddd", ds_main_patinfo.getColumn(0,"orddd"));
  2510. savepath.setColumn(0, "cretno", ds_main_patinfo.getColumn(0,"cretno"));
  2511. savepath.setColumn(0, "ordtype", ds_main_patinfo.getColumn(0,"ordtype"));
  2512. savepath.setColumn(0, "orddeptcd", ds_main_patinfo.getColumn(0,"orddeptcd"));
  2513. savepath.setColumn(0, "orddrid", ds_main_patinfo.getColumn(0,"drid"));
  2514. savepath.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
  2515. savepath.setColumn(0, "formcd", ds_main_ocrinfo.getColumn(0,"ocrformcd"));
  2516. savepath.setColumn(0, "formfromdt", ds_main_ocrinfo.getColumn(0,"ocrformfromdt"));
  2517. savepath.setColumn(0, "fstprntdt", utlf_getCurrentDate()+utlf_getCurrentTime());
  2518. savepath.setColumn(0, "fstprntdeptcd", sysf_getUserInfo("dutplcecd"));
  2519. savepath.setColumn(0, "fstprntid", sysf_getUserInfo("userid"));
  2520. savepath.setColumn(0, "updtdt", utlf_getCurrentDate()+utlf_getCurrentTime());
  2521. savepath.setColumn(0, "updtdeptcd", sysf_getUserInfo("dutplcecd"));
  2522. savepath.setColumn(0, "updtuserid", sysf_getUserInfo("userid"));
  2523. savepath.setColumn(0, "diagnm", ds_main_diaginfo.getColumn(0,"diaghngnm"));
  2524. //savepath.setColumn(0, "opnm", ds_main_opinfo.getColumn(0,"ophngnm"));
  2525. savepath.setColumn(0, "pagecnt", ds_pageinfo.getColumn(0,"ocrdatacnt"));
  2526. if (gocrprntyn == "N") {
  2527. savepath.setColumn(0, "updtresncnts", "실제 출력은 하지 않음");
  2528. savepath.setColumn(0, "realprntyn", "N");
  2529. }
  2530. //sysf_trace(ds_send_reqdata.saveXML());
  2531. // dsf_makeValue(ds_send_reqdata,"formcd","string","");
  2532. // dsf_makeValue(ds_send_reqdata,"formfromdt","string","");
  2533. // dsf_makeValue(ds_send_reqdata,"diagnm","string","");
  2534. // dsf_makeValue(ds_send_reqdata,"opnm","string","");
  2535. var oParam = {};
  2536. oParam.id = "TXMRF03805";
  2537. oParam.service = "formmngtapp.OcrPreViewMngt";
  2538. oParam.method = "reqInsOcrPrntInfo";
  2539. oParam.inds = "req=ds_send_reqdata";
  2540. oParam.outds = "ds_hiddden_insocrtag=ocrprntlnfo";
  2541. oParam.async = false;
  2542. oParam.callback = "cf_TXMRF03805";
  2543. tranf_submit(oParam);
  2544. if(arErrorCode.pop("TXMRF03805") > -1){
  2545. return ds_main_ocrtag.getColumn(0, "tag");
  2546. }
  2547. }
  2548. function cf_TXMRF03805(sSvcId, nErrorCode, sErrorMsg) {
  2549. arErrorCode.push(sSvcId, nErrorCode);
  2550. }
  2551. function fPrintOCR()
  2552. {
  2553. try{
  2554. var i;
  2555. f_print.DocumentBegin(f_View.PageTotal+"_"+"OCRPrint");
  2556. for(i = 1; i <= f_View.PageTotal; i++)
  2557. {
  2558. f_print.PageBegin();
  2559. f_print.PrintImage(f_View.get_PageFilePath(i), f_View.get_PageFilePage(i) + 1, 0, 0, f_print.PrintableWidth, f_print.PrintableHeight, 2,1,1,12);
  2560. f_print.PageEnd();
  2561. }
  2562. f_print.DocumentEnd();
  2563. ds_main.setColumn(0,"exist", "N");
  2564. if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
  2565. if(parent.parent.group2.swt_ocrinfoflag.tabindex == 2){
  2566. parent.parent.group2.btn_prnt.enable = false;
  2567. } else {
  2568. var parentauth = parent.parent.frmf_getScreenAuth();
  2569. if(parentauth.toString().charAt(1) == '1'){ //20100727-kys-실행권한이 있을시에만 disable변경처리.(요청번호 : 11292)
  2570. parent.parent.group2.btn_prnt.enable = true;
  2571. }
  2572. }
  2573. }
  2574. return true;
  2575. }
  2576. catch(e){
  2577. return false;
  2578. }
  2579. }
  2580. function pause(numberMillis) {
  2581. var now = new Date();
  2582. var exitTime = now.getTime() + numberMillis;
  2583. while (true) {
  2584. now = new Date();
  2585. if (now.getTime() > exitTime)
  2586. return;
  2587. }
  2588. }
  2589. function fBarCodeReplace(OCRno)
  2590. {
  2591. for(var i = 1; i <= f_View.Pagetotal ; i++){
  2592. var OCR = "";
  2593. OCR = OCRno
  2594. OCR = OCR.replace("+","");
  2595. OCR = OCR.replace("+","");
  2596. OCR = OCR.replace("+","");
  2597. OCR = OCR.replace("+","");
  2598. OCR = OCR.replace("+","");
  2599. OCR = OCR.replace("+","");
  2600. var r = fso.OpenTextFile(gv_ImgeSavePath + "chart" + i + ".html", 1,false, -1)
  2601. var databuffer = "";
  2602. var trans ="";
  2603. while (!r.AtEndOfStream)
  2604. {
  2605. databuffer = r.ReadLine();
  2606. if(databuffer.substr(1, 18) == "@VAR_PRINT_BARCODE"){
  2607. OCR = OCR.replace("+","*");
  2608. OCR = OCR.replace("+","*");
  2609. databuffer = " @VAR_PRINT_BARCODE = " + "*" + OCR + "0" + i + "*"
  2610. }
  2611. trans += databuffer + "\n";
  2612. }
  2613. r.Close();
  2614. var a = fso.CreateTextFile(gv_ImgeSavePath + "chart" + i + ".html", true, true);
  2615. a.WriteLine(trans);
  2616. a.Close();
  2617. f_View.ActionParamINT1 = i;
  2618. f_View.ActionSingle = 1;
  2619. }
  2620. }
  2621. /**
  2622. * @desc : 환자 정보 셋팅
  2623. *
  2624. * @param :
  2625. * @return :
  2626. * @author : HIT EMR Team
  2627. * @---------------------------------------------------
  2628. */
  2629. function fSetPatInfo(formcd, pid, orddd, cretno, ordtype){
  2630. var pidinfo = "";
  2631. var patnminfo = "";
  2632. var orddept = "";
  2633. var drinfo = "";
  2634. var sainfo = "";
  2635. var inroomcd = "";
  2636. var prnt_patnminfo = "";
  2637. var tmp_patnminfo = "";
  2638. var getdate = "";
  2639. if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
  2640. pidinfo = ds_main_patinfo.getColumn(0,"pid");
  2641. patnminfo = ds_main_patinfo.getColumn(0,"patnm");
  2642. orddept = ds_main_patinfo.getColumn(0,"deptn");
  2643. drinfo = ds_main_patinfo.getColumn(0,"drnm");
  2644. sainfo = ds_main_patinfo.getColumn(0,"sa");
  2645. model.makeValue("/root/main/patinfo/items/rrgstno", model.getValue("/root/main/patinfo/items/rrgstno"));
  2646. model.makeValue("/root/main/patinfo/items/centcd", model.getValue("/root/main/patinfo/items/centcd"));
  2647. model.makeValue("/root/main/patinfo/items/centnm", model.getValue("/root/main/patinfo/items/centnm"));
  2648. model.makeValue("/root/main/patinfo/items/centengabbr", model.getValue("/root/main/patinfo/items/centengabbr"));
  2649. } else if (model.getValue("/root/hidden/parentflag") == "PRNT"){
  2650. pidinfo = parent.model.getValue("/root/main/ordinfo/pid");
  2651. patnminfo = parent.model.getValue("/root/main/ordinfo/patnm");
  2652. orddept = parent.model.getValue("/root/main/ordinfo/orddeptnm");
  2653. drinfo = parent.model.getValue("/root/main/ordinfo/drnm");
  2654. sainfo = parent.model.getValue("/root/main/ordinfo/sa");
  2655. model.makeValue("/root/main/patinfo/items/pid", parent.model.getValue("/root/main/ordinfo/pid"));
  2656. model.makeValue("/root/main/patinfo/items/orddd", parent.model.getValue("/root/main/ordinfo/orddd"));
  2657. model.makeValue("/root/main/patinfo/items/ordtype", parent.model.getValue("/root/main/ordinfo/ordtype"));
  2658. model.makeValue("/root/main/patinfo/items/orddeptcd", parent.model.getValue("/root/main/ordinfo/orddeptcd"));
  2659. model.makeValue("/root/main/patinfo/items/patnm", parent.model.getValue("/root/main/ordinfo/patnm"));
  2660. model.makeValue("/root/main/patinfo/items/orddeptnm", parent.model.getValue("/root/main/ordinfo/orddeptnm"));
  2661. model.makeValue("/root/main/patinfo/items/drid", parent.model.getValue("/root/main/ordinfo/drid"));
  2662. model.makeValue("/root/main/patinfo/items/drnm", parent.model.getValue("/root/main/ordinfo/drnm"));
  2663. model.makeValue("/root/main/patinfo/items/sa", parent.model.getValue("/root/main/ordinfo/sa"));
  2664. model.makeValue("/root/main/patinfo/items/inroomcd", parent.model.getValue("/root/main/ordinfo/inroomcd"));
  2665. model.makeValue("/root/main/patinfo/items/cretno", parent.model.getValue("/root/main/ordinfo/cretno"));
  2666. model.makeValue("/root/main/patinfo/items/rrgstno", parent.model.getValue("/root/main/ordinfo/rrgstno"));
  2667. model.makeValue("/root/main/patinfo/items/centcd", parent.model.getValue("/root/main/ordinfo/centcd"));
  2668. model.makeValue("/root/main/patinfo/items/centnm", parent.model.getValue("/root/main/ordinfo/centnm"));
  2669. model.makeValue("/root/main/patinfo/items/centengabbr", parent.model.getValue("/root/main/ordinfo/centengabbr"));
  2670. }
  2671. patnminf = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/patnm");
  2672. // 병원별 등록번호 표시방법 여부(HardCode 테이블 이용) - 2009/06/01 추가
  2673. mmbfGetHardCodeInfoNm("/root/send/harddata","/root/temp/hardcode", 3801); //OCR서식의 등록번호 체크로직 표시 여부
  2674. var hardcd = model.getValue("/root/temp/hardcode/hardcd/hardcd");
  2675. if (hardcd == "Y")
  2676. {
  2677. for(var i = pidinfo.length; i <= 8; i++){
  2678. if(i < 8){
  2679. pidinfo = "0"+pidinfo;
  2680. }
  2681. }
  2682. var str1 = pidinfo.substr(0, 3);
  2683. var str2 = pidinfo.substr(3, 2);
  2684. var str3 = pidinfo.substr(5, 2);
  2685. var str4 = pidinfo.substr(7, 1);
  2686. pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
  2687. }
  2688. obj_BCP.setParam("rgst_no", pidinfo);
  2689. getdate = model.getValue("/root/main/patinfo/items/orddd");
  2690. // 환자명 5자까리 수정
  2691. if (patnminfo.length > 5 && patnminfo.length <= 10)
  2692. {
  2693. prnt_patnminfo = patnminfo
  2694. }
  2695. else if (patnminfo.length > 11)
  2696. {
  2697. prnt_patnminfo = patnminfo.substring(0, 10);
  2698. }
  2699. else
  2700. {
  2701. for(var i = 0; i <= patnminfo.length; i++){
  2702. tmp_patnminfo = patnminfo.substring(i, i+1);
  2703. if(i == patnminfo.length){
  2704. break;
  2705. }
  2706. prnt_patnminfo = prnt_patnminfo + tmp_patnminfo.concat(" ");
  2707. }
  2708. }
  2709. obj_BCP.setParam("pat_nm", prnt_patnminfo);
  2710. model.makeValue("/root/send/reqdata/deptcd", model.getValue("/root/main/patinfo/items/orddeptcd"));
  2711. model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/patinfo/items/orddd"));
  2712. // 부서약어 가져오기
  2713. submit("TRMRF03805");
  2714. obj_BCP.setParam("orddept", model.getValue("/root/main/deptinfo/info/deptengabbr"));
  2715. obj_BCP.setParam("rrgstno", model.getValue("/root/main/patinfo/items/rrgstno"));
  2716. obj_BCP.setParam("fromdd", getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2));
  2717. // 2009.11.16. 현재 재원중인 병실정보 가져오기.. & 병실정보 출력하기..
  2718. obj_BCP.setParam("inroomcd", "");
  2719. var ordtype = model.getValue("/root/main/patinfo/items/ordtype");
  2720. if (ordtype == 'I') {
  2721. model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/patinfo/items/pid"));
  2722. model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/patinfo/items/orddd"));
  2723. model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/main/patinfo/items/cretno"));
  2724. submit("TRMRF03809");
  2725. var inroomcd = model.getValue("/root/main/inroominfo/inroomlist/roomcd");
  2726. if (inroomcd != "False" && inroomcd != "" ) {
  2727. //obj_BCP.setParam("inroomcd", "병실 : " + inroomcd);
  2728. //lyj 2011/11/29
  2729. obj_BCP.setParam("rgst_no", pidinfo +" ("+inroomcd+")");
  2730. }
  2731. }
  2732. }
  2733. /**
  2734. * @desc : 타이틀 정보 셋팅
  2735. *
  2736. * @param :
  2737. * @return :
  2738. * @author : HIT EMR Team
  2739. * @---------------------------------------------------
  2740. */
  2741. function fSetTitle(){
  2742. var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
  2743. var arryformnm = getformnm.split("\n");
  2744. var langflag = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/langflag");
  2745. if(arryformnm.length == 2){
  2746. obj_BCP.setParam("formnm1", arryformnm[0]);
  2747. obj_BCP.setParam("formnm2", arryformnm[1]);
  2748. } else if(arryformnm.length == 1){
  2749. obj_BCP.setParam("formnm", arryformnm[0]);
  2750. }
  2751. //obj_BCP.setParam("centnm", "센터명 : " ); // + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
  2752. switch(langflag){
  2753. case "KO":
  2754. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  2755. if(model.getValue("/root/main/ocrinfo/doubcnt") != "1"){
  2756. obj_BCP.setParam("useflag", "[환자 보관용]");
  2757. }
  2758. break;
  2759. case "EN":
  2760. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
  2761. if(model.getValue("/root/main/ocrinfo/doubcnt") != "1"){
  2762. obj_BCP.setParam("useflag", "\"" + "For Patient Use" + "\"");
  2763. }
  2764. break;
  2765. default:
  2766. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  2767. if(model.getValue("/root/main/ocrinfo/doubcnt") != "1"){
  2768. obj_BCP.setParam("useflag", "[환자 보관용]");
  2769. }
  2770. break;
  2771. }
  2772. //obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/logo012.gif");
  2773. }
  2774. /**
  2775. * @desc : OCR 테그 셋팅
  2776. *
  2777. * @param :
  2778. * @return :
  2779. * @author : HIT EMR Team
  2780. * @---------------------------------------------------
  2781. * 20090715 fSetOCRTag 파라메터 수정 fSetOCRTag(flag) - > fSetOCRTag(flag, ocrtagprntyn)
  2782. */
  2783. function fSetOCRTag(flag, ocrtagprntyn){
  2784. var getocrtag;
  2785. model.removeNodeset("/root/send/reqdata");
  2786. //copyNodeset("/root/send/reqdata", "/root/main/patinfo/items");
  2787. //model.makeValue("/root/send/reqdata/formcd", model.getValue("/root/main/ocrinfo/ocrlist/formcd"));
  2788. //model.makeValue("/root/send/reqdata/formfromdt", model.getValue("/root/main/ocrinfo/ocrlist/formfromdt"));
  2789. //submit("TRMRF03804");
  2790. //getocrtag = model.getValue("/root/main/ocrinfo/ocrtag/tag");
  2791. // 새로 OCRTag를 생성으로 바꿈.
  2792. // 간호분만프로그램에서 환자가 두 명의 아이를 분만하였을 경우,
  2793. // 각각 OCRTAG가 개별적으로 생성이 되어야 한다.
  2794. // MRI 동의서 같은 경우 각각 동의서가 출력되어야 하고 OCRTAG도 각각 출력이 되어야 함.
  2795. // 수정일 2007.12.10
  2796. model.makeValue("/root/main/exist", "N");
  2797. if(model.getValue("/root/hidden/parentflag") == "PRNT"){
  2798. if(parent.swt_ocrinfoflag.selectedIndex == "1"){
  2799. parent.btn_prnt.disabled = true;
  2800. } else {
  2801. var parentauth = parent.model.getValue("/root/properties/auth")
  2802. if(parentauth.charAt(1) == '1'){ //20100727-kys-실행권한이 있을시에만 disable변경처리.(요청번호 : 11292)
  2803. parent.btn_prnt.disabled = false;
  2804. }
  2805. }
  2806. }
  2807. if(flag != ""){
  2808. // 20090715 ocrtag 출력구분 값으로 출력여부 판단 수정 nj
  2809. // obj_BCP.setParam("ocrtag", "+"+flag+"+");
  2810. if(ocrtagprntyn == "N"){
  2811. obj_BCP.setParam("ocrtag", "");
  2812. } else {
  2813. obj_BCP.setParam("ocrtag", "+"+flag+"+");
  2814. }
  2815. model.makeValue("/root/main/ocrinfo/ocrtag/tag", flag);
  2816. fSetBarCode();
  2817. }
  2818. /*
  2819. if(getocrtag == ""){
  2820. model.setValue("/root/main/exist", "N");
  2821. if(model.getValue("/root/hidden/parentflag") == "PRNT"){
  2822. parent.btn_prnt.disabled = false;
  2823. }
  2824. } else {
  2825. model.setValue("/root/main/exist", "Y");
  2826. obj_BCP.setParam("ocrtag", "+"+getocrtag);
  2827. fSetBarCode();
  2828. if(model.getValue("/root/hidden/parentflag") == "PRNT"){
  2829. parent.btn_prnt.disabled = true;
  2830. }
  2831. }
  2832. */
  2833. obj_BCP.Refresh();
  2834. }
  2835. /**
  2836. * @desc : 바코드 셋팅
  2837. *
  2838. * @param :
  2839. * @return :
  2840. * @author : HIT EMR Team
  2841. * @---------------------------------------------------
  2842. */
  2843. function fSetBarCode(){
  2844. var barcode = "";
  2845. var pageno = 0;
  2846. barcode = model.getValue("/root/main/ocrinfo/ocrtag/tag");
  2847. pageno = model.getValue("/root/main/ocrinfo/currentpage");
  2848. if(pageno.length == 1){
  2849. pageno = "0"+pageno;
  2850. }
  2851. obj_BCP.setParam("barcode", "*"+barcode+pageno+"*");
  2852. }
  2853. /**
  2854. * @desc : 진단명 셋팅
  2855. *
  2856. * @param :
  2857. * @return :
  2858. * @author : HIT EMR Team
  2859. * @---------------------------------------------------
  2860. */
  2861. function fSetDiag(pid, orddd, cretno, ordtype){
  2862. model.removeNodeset("/root/send/reqdata");
  2863. if(model.getValue("/root/main/exist") == "Y"){
  2864. // obj_BCP.setParam("tag_diagnm", "진단명");
  2865. // obj_BCP.setParam("diagnm", model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm"));
  2866. } else if(model.getValue("/root/main/exist") == "N" && model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm") == ""){
  2867. model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/patinfo/items/pid"));
  2868. model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/patinfo/items/orddd"));
  2869. model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/main/patinfo/items/cretno"));
  2870. model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/patinfo/items/orddeptcd"));
  2871. model.makeValue("/root/send/reqdata/ordtype", model.getValue("/root/main/patinfo/items/ordtype"));
  2872. submit("TRMRF03807");
  2873. // obj_BCP.setParam("tag_diagnm", "진단명")
  2874. // obj_BCP.setParam("diagnm", model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm"));
  2875. }
  2876. obj_BCP.setParam("tag_diagnm", "진단명")
  2877. obj_BCP.setParam("diagnm", model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm"));
  2878. obj_BCP.Refresh();
  2879. }
  2880. /**
  2881. * @desc : 수술명 셋팅
  2882. *
  2883. * @param :
  2884. * @return :
  2885. * @author : HIT EMR Team
  2886. * @---------------------------------------------------
  2887. */
  2888. function fSetOp(pid, orddd, cretno, ordtype){
  2889. obj_BCP.setParam("tag_opnm", "수술명");
  2890. obj_BCP.setParam("tag_opnm1", "(처치/검사)");
  2891. }
  2892. /**
  2893. * @desc : 하단정보(출력일시, 출력자, 페이지) 셋팅
  2894. *
  2895. * @param :
  2896. * @return :
  2897. * @author : HIT EMR Team
  2898. * @---------------------------------------------------
  2899. */
  2900. function fSetBottomInfo(){
  2901. var getdate = getCurrentDate();
  2902. var gettime = getCurrentTime();
  2903. var getuser = getUserName();
  2904. var getuseren = getUserInfo("userengnm");
  2905. var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
  2906. var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
  2907. var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
  2908. var ipaddr = getUserInfo("ipaddr");
  2909. switch(langflag){
  2910. case "KO":
  2911. obj_BCP.setParam("bottom_time", "출력일시 : " + dateprnt + " " + timeprnt);
  2912. obj_BCP.setParam("bottom_user", "출력자 : " + getuser );
  2913. obj_BCP.setParam("pagecnt", "페이지 : " + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
  2914. break;
  2915. case "EN":
  2916. obj_BCP.setParam("bottom_time", "Print Date : " + dateprnt + " " + timeprnt);
  2917. if((getuseren == null)||(getuseren == "")){
  2918. obj_BCP.setParam("bottom_user", "Printed by : " + getuser);
  2919. } else {
  2920. // 영문동의서도 출력자는 한글명으로 표시되어야 함. 2008-09-17 김미선 선생님 요청
  2921. obj_BCP.setParam("bottom_user", "Printed by : " + getuser);
  2922. //obj_BCP.setParam("bottom_user", "Printed by : " + getuseren.substring(0, 7));
  2923. }
  2924. obj_BCP.setParam("pagecnt", "Page : " + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
  2925. break;
  2926. default:
  2927. obj_BCP.setParam("bottom_time", "출력일시 : " + dateprnt + " " + timeprnt);
  2928. obj_BCP.setParam("bottom_user", "출력자 : " + getuser);
  2929. obj_BCP.setParam("pagecnt", "페이지 : " + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
  2930. break;
  2931. }
  2932. var centnm = model.getValue("/root/main/patinfo/items/centnm");
  2933. //if (centnm != "")
  2934. if (centnm != "False" && centnm != "" )
  2935. {
  2936. obj_BCP.setParam("centnm", "센터명 : " + centnm+'('+ipaddr+')');
  2937. }
  2938. else
  2939. {
  2940. obj_BCP.setParam("centnm", ipaddr);
  2941. }
  2942. }
  2943. /**
  2944. * @desc : 파일셋팅1
  2945. *
  2946. * @param :
  2947. * @return :
  2948. * @author : HIT EMR Team
  2949. * @---------------------------------------------------
  2950. * 20090715 fSetInitFile1 파라메터 수정 fSetInitFile1(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile1(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
  2951. */
  2952. function fSetInitFile1(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
  2953. obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype1.ini");
  2954. fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
  2955. if(model.getValue("/root/main/ocrinfo/doubcnt") == "1"){
  2956. // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
  2957. // 20090715 fSetOCRTag(ocrtag);
  2958. fSetOCRTag(ocrtag, ocrtagprntyn);
  2959. }
  2960. fSetTitle();
  2961. fSetDiag(pid, orddd, cretno, ordtype);
  2962. fSetOp(pid, orddd, cretno, ordtype);
  2963. fSetBottomInfo();
  2964. }
  2965. /**
  2966. * @desc : 파일셋팅2
  2967. *
  2968. * @param :
  2969. * @return :
  2970. * @author : HIT EMR Team
  2971. * @---------------------------------------------------
  2972. * 20090715 fSetInitFile2 파라메터 수정 fSetInitFile2(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile2(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
  2973. */
  2974. function fSetInitFile2(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
  2975. obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype2.ini");
  2976. fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
  2977. if(model.getValue("/root/main/ocrinfo/doubcnt") == "1"){
  2978. // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
  2979. // 20090715 fSetOCRTag(ocrtag);
  2980. fSetOCRTag(ocrtag, ocrtagprntyn);
  2981. }
  2982. fSetTitle();
  2983. fSetDiag(pid, orddd, cretno, ordtype);
  2984. fSetBottomInfo();
  2985. }
  2986. /**
  2987. * @desc : 파일셋팅3
  2988. *
  2989. * @param :
  2990. * @return :
  2991. * @author : HIT EMR Team
  2992. * @---------------------------------------------------
  2993. * 20090715 fSetInitFile3 파라메터 수정 fSetInitFile3(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile3(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
  2994. */
  2995. function fSetInitFile3(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
  2996. obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype3.ini");
  2997. fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
  2998. if(model.getValue("/root/main/ocrinfo/doubcnt") == "1"){
  2999. // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
  3000. // 20090715 fSetOCRTag(ocrtag);
  3001. fSetOCRTag(ocrtag, ocrtagprntyn);
  3002. }
  3003. fSetTitle();
  3004. fSetBottomInfo();
  3005. }
  3006. /**
  3007. * @desc : 파일셋팅4
  3008. *
  3009. * @param :
  3010. * @return :
  3011. * @author : HIT EMR Team
  3012. * @---------------------------------------------------
  3013. * 20090715 fSetInitFile4 파라메터 수정 fSetInitFile4(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile4(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
  3014. */
  3015. function fSetInitFile4(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
  3016. obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype4.ini");
  3017. fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
  3018. if(model.getValue("/root/main/ocrinfo/doubcnt") == 1){
  3019. // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
  3020. // 20090715 fSetOCRTag(ocrtag);
  3021. fSetOCRTag(ocrtag, ocrtagprntyn);
  3022. }
  3023. fSetTitle();
  3024. fSetBottomInfo();
  3025. }
  3026. /**
  3027. * @desc : 파일셋팅5
  3028. *
  3029. * @param :
  3030. * @return :
  3031. * @author : HIT EMR Team
  3032. * @---------------------------------------------------
  3033. * 20090715 fSetInitFile5 파라메터 수정 fSetInitFile5(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile5(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
  3034. */
  3035. function fSetInitFile5(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
  3036. obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype5.ini");
  3037. fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
  3038. // 2009-07-27 nj 추가
  3039. var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
  3040. // formprntnm으로 출력명 변경
  3041. var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
  3042. var arryformnm = getformnm.split("\n");
  3043. if(arryformnm.length == 2){
  3044. obj_BCP.setParam("formnm1", arryformnm[0]);
  3045. obj_BCP.setParam("formnm2", arryformnm[1]);
  3046. } else if(arryformnm.length == 1){
  3047. obj_BCP.setParam("formnm", arryformnm[0]);
  3048. }
  3049. fSetOCRTag(ocrtag, ocrtagprntyn);
  3050. switch(langflag){
  3051. case "KO":
  3052. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  3053. break;
  3054. case "EN":
  3055. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
  3056. break;
  3057. default:
  3058. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  3059. break;
  3060. }
  3061. fSetBottomInfo();
  3062. }
  3063. /**
  3064. * @desc : 진단명이나 opnm 셋팅
  3065. *
  3066. * @param :
  3067. * @return :
  3068. * @author : HIT EMR Team
  3069. * @---------------------------------------------------
  3070. */
  3071. function fSetDiagOpnm(){
  3072. var iptflag = ds_main.getColumn(0, "iptnmflag");
  3073. if(iptflag == "diagnm") {
  3074. //obj_BCP.setParam("diagnm", model.getValue("/root/main/iptdiaghngnm"));
  3075. model.makeValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm", model.getValue("/root/main/iptdiaghngnm"));
  3076. } else if(iptflag == "opnm") {
  3077. //obj_BCP.setParam("opnm", model.getValue("/root/main/iptdiaghngnm"));
  3078. model.makeValue("/root/main/ocrinfo/ocrtag/opinfo/opengnm", model.getValue("/root/main/iptdiaghngnm"));
  3079. }
  3080. //obj_BCP.Refresh();
  3081. }
  3082. /**
  3083. * @desc : OCR 서식 병원 보관용 Default 정보 출력
  3084. *
  3085. * @param :
  3086. * @return :
  3087. * @author : HIT EMR Team
  3088. * @---------------------------------------------------
  3089. */
  3090. function fSetDefault(){
  3091. var getdate = model.getValue("/root/main/patinfo/items/orddd");
  3092. // Default page 출력명칭 으로 수정
  3093. // var getformnm = model.getValue("/root/main/ocrinfo/ocrlist/formnm");
  3094. var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
  3095. var pidinfo = model.getValue("/root/main/patinfo/items/pid");
  3096. var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
  3097. // formprntnm으로 출력명 변경
  3098. var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
  3099. var arryformnm = getformnm.split("\n");
  3100. if(arryformnm.length == 2){
  3101. obj_BCP.setParam("formnm1", arryformnm[0]);
  3102. obj_BCP.setParam("formnm2", arryformnm[1]);
  3103. } else if(arryformnm.length == 1){
  3104. obj_BCP.setParam("formnm", arryformnm[0]);
  3105. }
  3106. // 병원별 등록번호 표시방법 여부(HardCode 테이블 이용) - 2009/06/01 추가
  3107. mmbfGetHardCodeInfoNm("/root/send/harddata","/root/temp/hardcode", 3801); //OCR서식의 등록번호 체크로직 표시 여부
  3108. var hardcd = model.getValue("/root/temp/hardcode/hardcd/hardcd");
  3109. if (hardcd == "Y")
  3110. {
  3111. for(var i = pidinfo.length; i <= 8; i++){
  3112. if(i < 8){
  3113. pidinfo = "0"+pidinfo;
  3114. }
  3115. }
  3116. var str1 = pidinfo.substr(0, 3);
  3117. var str2 = pidinfo.substr(3, 2);
  3118. var str3 = pidinfo.substr(5, 2);
  3119. var str4 = pidinfo.substr(7, 1);
  3120. pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
  3121. }
  3122. obj_BCP.setParam("rgst_no", pidinfo);
  3123. // 환자명 5자로 짜르기
  3124. var pat_nm = model.getValue("/root/main/patinfo/items/patnm");
  3125. if (pat_nm.length > 10)
  3126. {
  3127. pat_nm = pat_nm.substr(0, 10);
  3128. }
  3129. //obj_BCP.setParam("pat_nm", model.getValue("/root/main/patinfo/items/patnm"));
  3130. obj_BCP.setParam("pat_nm", pat_nm);
  3131. // obj_BCP.setParam("formnm", getformnm);
  3132. // 2009-07-27 OCRTAG 출력여부 수정
  3133. if(model.getValue("/root/main/forminfo/ocrtagprntyn") == "N"){
  3134. obj_BCP.setParam("ocrtag", "");
  3135. } else {
  3136. obj_BCP.setParam("ocrtag", model.getValue("/root/main/temp/ocrtag/tag"));
  3137. }
  3138. switch(langflag){
  3139. case "KO":
  3140. obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
  3141. obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
  3142. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  3143. obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
  3144. break;
  3145. case "EN":
  3146. obj_BCP.setParam("fromdd", "Date : " + dateprnt);
  3147. obj_BCP.setParam("orddept", "Dept : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
  3148. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
  3149. obj_BCP.setParam("rrgstno", "SN : " + model.getValue("/root/main/patinfo/items/rrgstno"));
  3150. break;
  3151. default:
  3152. obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
  3153. obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
  3154. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  3155. obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
  3156. break;
  3157. }
  3158. }
  3159. /**
  3160. * @desc : OCR 서식 환자 보관용 Default 정보 출력
  3161. *
  3162. * @param :
  3163. * @return :
  3164. * @author : HIT EMR Team
  3165. * @---------------------------------------------------
  3166. */
  3167. function fSetDefaultPat(){
  3168. var getdate = model.getValue("/root/main/patinfo/items/orddd");
  3169. // Default page 출력명칭 으로 수정
  3170. // var getformnm = model.getValue("/root/main/ocrinfo/ocrlist/formnm");
  3171. var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
  3172. var pidinfo = model.getValue("/root/main/patinfo/items/pid");
  3173. var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
  3174. // formprntnm으로 출력명 변경
  3175. var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
  3176. var arryformnm = getformnm.split("\n");
  3177. if(arryformnm.length == 2){
  3178. obj_BCP.setParam("formnm1", arryformnm[0]);
  3179. obj_BCP.setParam("formnm2", arryformnm[1]);
  3180. } else if(arryformnm.length == 1){
  3181. obj_BCP.setParam("formnm", arryformnm[0]);
  3182. }
  3183. // 병원별 등록번호 표시방법 여부(HardCode 테이블 이용) - 2009/06/01 추가
  3184. mmbfGetHardCodeInfoNm("/root/send/harddata","/root/temp/hardcode", 3801); //OCR서식의 등록번호 체크로직 표시 여부
  3185. var hardcd = model.getValue("/root/temp/hardcode/hardcd/hardcd");
  3186. if (hardcd == "Y")
  3187. {
  3188. for(var i = pidinfo.length; i <= 8; i++){
  3189. if(i < 8){
  3190. pidinfo = "0"+pidinfo;
  3191. }
  3192. }
  3193. var str1 = pidinfo.substr(0, 3);
  3194. var str2 = pidinfo.substr(3, 2);
  3195. var str3 = pidinfo.substr(5, 2);
  3196. var str4 = pidinfo.substr(7, 1);
  3197. pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
  3198. }
  3199. obj_BCP.setParam("rgst_no", pidinfo);
  3200. // 환자명 5자로 짜르기
  3201. var pat_nm = model.getValue("/root/main/patinfo/items/patnm");
  3202. if (pat_nm.length > 10)
  3203. {
  3204. pat_nm = pat_nm.substr(0, 10);
  3205. }
  3206. //obj_BCP.setParam("pat_nm", model.getValue("/root/main/patinfo/items/patnm"));
  3207. obj_BCP.setParam("pat_nm", pat_nm);
  3208. // obj_BCP.setParam("formnm", getformnm);
  3209. switch(langflag){
  3210. case "KO":
  3211. obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
  3212. obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
  3213. obj_BCP.setParam("useflag", "[환자 보관용]");
  3214. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  3215. obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
  3216. break;
  3217. case "EN":
  3218. obj_BCP.setParam("fromdd", "Date : " + dateprnt);
  3219. obj_BCP.setParam("orddept", "Dept : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
  3220. obj_BCP.setParam("useflag", "\"" + "For Patient Use" + "\"");
  3221. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
  3222. obj_BCP.setParam("rrgstno", "SN : " + model.getValue("/root/main/patinfo/items/rrgstno"));
  3223. break;
  3224. default:
  3225. obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
  3226. obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
  3227. obj_BCP.setParam("useflag", "[환자 보관용]");
  3228. obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
  3229. obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
  3230. break;
  3231. }
  3232. }
  3233. /**
  3234. * @desc : OCR 정보 저장
  3235. *
  3236. * @param :
  3237. * @return :
  3238. * @author : HIT EMR Team
  3239. * @---------------------------------------------------
  3240. */
  3241. function fSaveOCRIF(ocrtag, pid, orddd, cretno, ordtype, orddeptcd, orddrid, formcd, formfromdt, diaghngnm, ophngnm, pagecnt, rtnyn){
  3242. var objColInfo = new Array();
  3243. objColInfo.push({col: "ocrtag", val: ocrtag});
  3244. objColInfo.push({col: "pid", val: pid});
  3245. objColInfo.push({col: "orddd", val: orddd});
  3246. objColInfo.push({col: "cretno", val: cretno});
  3247. objColInfo.push({col: "ordtype", val: ordtype});
  3248. objColInfo.push({col: "orddeptcd", val: orddeptcd});
  3249. objColInfo.push({col: "orddrid", val: orddrid});
  3250. objColInfo.push({col: "instcd", val: sysf_getUserInfo("dutplceinstcd")});
  3251. objColInfo.push({col: "formcd", val: formcd});
  3252. objColInfo.push({col: "formfromdt", val: formfromdt});
  3253. objColInfo.push({col: "fstprntdt", val: utlf_getCurrentDate()+ utlf_getCurrentTime()});
  3254. objColInfo.push({col: "fstprntdeptcd", val: sysf_getUserInfo("dutplcecd")});
  3255. objColInfo.push({col: "fstprntid", val: sysf_getUserInfo("userid")});
  3256. objColInfo.push({col: "updtdt", val: utlf_getCurrentDate()+ utlf_getCurrentTime()});
  3257. objColInfo.push({col: "updtdeptcd", val: sysf_getUserInfo("dutplcecd")});
  3258. objColInfo.push({col: "updtuserid", val: sysf_getUserInfo("userid")});
  3259. objColInfo.push({col: "diagnm", val: diaghngnm});
  3260. objColInfo.push({col: "opnm", val: ophngnm});
  3261. objColInfo.push({col: "pagecnt", val: pagecnt});
  3262. dsf_createDsRow("ds_send_ocr_reqdata", objColInfo);
  3263. var oParam = {};
  3264. oParam.id = "TXMRF03805";
  3265. oParam.service = "formmngtapp.OcrPreViewMngt";
  3266. oParam.method = "reqInsOcrPrntInfo";
  3267. oParam.inds = "req=ds_send_ocr_reqdata";
  3268. oParam.outds = "ds_ocrprntlnfo=ocrprntlnfo";
  3269. oParam.async = false;
  3270. oParam.callback = "cf_TXMRF03805";
  3271. tranf_submit(oParam);
  3272. if (arErrorCode.pop("TXMRF03805") > -1){
  3273. if(rtnyn == "Y"){ //hardcdno : 9950 자동반납관리
  3274. sleep(1000);
  3275. ds_send_ocr_reqdata.addColumn("barcode", "string", 256);
  3276. ds_send_ocr_reqdata.addColumn("lstupdtdt", "string", 256);
  3277. ds_send_ocr_reqdata.addColumn("lstupdtuserid", "string", 256);
  3278. ds_send_ocr_reqdata.addColumn("lstupdtdeptcd", "string", 256);
  3279. ds_send_ocr_reqdata.addColumn("updtresncnts", "string", 256);
  3280. ds_send_ocr_reqdata.addColumn("statcd", "string", 256);
  3281. ds_send_ocr_reqdata.addColumn("scanyn", "string", 256);
  3282. ds_send_ocr_reqdata.addColumn("scancnt", "string", 256);
  3283. ds_send_ocr_reqdata.setColumn(0, "barcode", ocrtag);
  3284. ds_send_ocr_reqdata.setColumn(0, "ocrtag", ocrtag);
  3285. ds_send_ocr_reqdata.setColumn(0, "updtdt", utlf_getCurrentDate()+ utlf_getCurrentTime());
  3286. ds_send_ocr_reqdata.setColumn(0, "lstupdtdt", utlf_getCurrentDate()+ utlf_getCurrentTime());
  3287. ds_send_ocr_reqdata.setColumn(0, "lstupdtuserid", sysf_getUserInfo("userid"));
  3288. ds_send_ocr_reqdata.setColumn(0, "lstupdtdeptcd", sysf_getUserInfo("dutplcecd"));
  3289. ds_send_ocr_reqdata.setColumn(0, "updtresncnts", "");
  3290. ds_send_ocr_reqdata.setColumn(0, "statcd", "R");
  3291. ds_send_ocr_reqdata.setColumn(0, "scanyn", "N");
  3292. ds_send_ocr_reqdata.setColumn(0, "scancnt", "0");
  3293. var oParam = {};
  3294. oParam.id = "TXMRF02901";
  3295. oParam.service = "formmngtapp.OcrRtnMngt";
  3296. oParam.method = "reqSetRtnBarCode";
  3297. oParam.inds = "req=ds_send_ocr_reqdata";
  3298. oParam.outds = "ds_rtnlist=rtnlist ds_rtncnfmlist=rtncnfmlist";
  3299. oParam.async = false;
  3300. oParam.callback = "cf_TXMRF02901";
  3301. tranf_submit(oParam);
  3302. if(arErrorCode.pop("TXMRF02901") < 0){
  3303. sysf_messageBox("자동반납저장을 실패하였습니다");
  3304. }
  3305. }
  3306. ds_send_ocr_reqdata.clearData();
  3307. return true;
  3308. } else {
  3309. ds_send_ocr_reqdata.clearData();
  3310. return false;
  3311. }
  3312. }
  3313. function cf_TXMRF03805(sSvcId, nErrorCode, sErrorMsg) {
  3314. arErrorCode.push(sSvcId, nErrorCode);
  3315. }
  3316. function cf_TXMRF02901(sSvcId, nErrorCode, sErrorMsg) {
  3317. arErrorCode.push(sSvcId, nErrorCode);
  3318. }
  3319. // 딜레이 function
  3320. function sleep(msecs){
  3321. var start =new Date().getTime();
  3322. var cur=start;
  3323. while(cur-start<msecs){
  3324. cur=new Date().getTime();
  3325. }
  3326. }
  3327. /**
  3328. * @desc : 특정 동의서를 출력한다.
  3329. *
  3330. * @param :
  3331. * @return :
  3332. * @author : 김영학
  3333. * @---------------------------------------------------
  3334. */
  3335. function fSpclOCRPrintInterface(formcd, cnts){
  3336. var formtypecls = "";
  3337. var ocrtagprntyn = "";
  3338. var formfromddt = "";
  3339. var calcscorcdList = "";
  3340. var formcd_calc = "";
  3341. var prcp_rtn = "";
  3342. var node = getGlobalVariable("paminfo");
  3343. setCSVToNode("/root/main/paminfo", node);
  3344. model.makeValue("/root/send/reqdata/formcd", formcd);
  3345. submit("TRMRF03810");
  3346. for(var i = 1; i <= cnts; i++){
  3347. pid = model.getValue("/root/main/paminfo/list/pid");
  3348. orddd = model.getValue("/root/main/paminfo/list/orddd");
  3349. cretno = model.getValue("/root/main/paminfo/list/cretno");
  3350. ordtype = model.getValue("/root/main/paminfo/list/ordtype");
  3351. orddrid = model.getValue("/root/main/paminfo/list/orddrid");
  3352. orddeptcd = model.getValue("/root/main/paminfo/list/orddeptcd");
  3353. formcd = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/formcd");
  3354. formfromdt = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/formfromdt");
  3355. formtypecls = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/formtypecls");
  3356. ocrtagprntyn = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/ocrtagprntyn");
  3357. fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn);
  3358. var save_ocrtag = fPrint();
  3359. }
  3360. return prcp_rtn;
  3361. }
  3362. /**
  3363. * @desc : 유전자검사동의서를 재출력한다.
  3364. *
  3365. * @param :
  3366. * @return :
  3367. * @author : 이윤주
  3368. * @---------------------------------------------------
  3369. */
  3370. function fGenePrint(ocrtag,ordtype,formcd)
  3371. {
  3372. dsf_createDsRow("ds_cond_TRMRF03811", [{col:"ocrtag", type:"STRING", size:256, val:ocrtag}
  3373. , {col:"ordtype", type:"STRING", size:256, val:ordtype}]);
  3374. dsf_createDs("ds_data_TRMRF03811", [{col:"pid", type:"STRING", size:256}
  3375. , {col:"patnm", type:"STRING", size:256}
  3376. , {col:"rrgstno", type:"STRING", size:256}
  3377. , {col:"proceryn", type:"STRING", size:256}
  3378. , {col:"procernm", type:"STRING", size:256}
  3379. , {col:"procerbrthdd", type:"STRING", size:256}
  3380. , {col:"drnm", type:"STRING", size:256}
  3381. , {col:"drbrthdd", type:"STRING", size:256}
  3382. , {col:"testresn", type:"STRING", size:256}
  3383. , {col:"stdyresn", type:"STRING", size:256}
  3384. , {col:"spcproccd", type:"STRING", size:256}
  3385. , {col:"spcpossntermcd", type:"STRING", size:256}
  3386. , {col:"spcpossnterm", type:"STRING", size:256}
  3387. , {col:"spcuseaprvyn", type:"STRING", size:256}
  3388. , {col:"patinfouseyn", type:"STRING", size:256}
  3389. , {col:"centcd", type:"STRING", size:256}
  3390. , {col:"deptengabbr", type:"STRING", size:256}
  3391. , {col:"orddd", type:"STRING", size:256}
  3392. , {col:"roomcd", type:"STRING", size:256}
  3393. , {col:"ocrtag", type:"STRING", size:256}
  3394. , {col:"curdd", type:"STRING", size:256}
  3395. , {col:"curtm", type:"STRING", size:256}
  3396. , {col:"logurl", type:"STRING", size:256}
  3397. , {col:"pattelno", type:"STRING", size:256}
  3398. , {col:"pataddr", type:"STRING", size:256}
  3399. , {col:"patsex", type:"STRING", size:256}
  3400. , {col:"instnm", type:"STRING", size:256}
  3401. , {col:"insttelno", type:"STRING", size:256}
  3402. , {col:"pagenum", type:"STRING", size:256}
  3403. , {col:"prcplist", type:"STRING", size:256}]);
  3404. var oParam = {};
  3405. oParam.id = "TRMMO21001";
  3406. oParam.service = "prcpmngtapp.EtcPrcpMngt";
  3407. oParam.method = "reqGetGeneinsptAgree";
  3408. oParam.inds = "req=ds_cond_TRMRF03811";
  3409. oParam.outds = "ds_data_TRMRF03811=geneunitlist";
  3410. oParam.async = false;
  3411. //oParam.callback = "cf_TRMMO21001";
  3412. tranf_submit(oParam);
  3413. // 유전자 동의서 : 1300014609 , 인체유래물 동의서 : 1000007185
  3414. var nRexpertID = "";
  3415. var objDOM = rptf_createDOM(); // DOM 객체 설정
  3416. if(formcd == "1300014609"){
  3417. rptf_setNodeListToDOM(objDOM, "/root/hidden/geneunitlist2", ds_data_TRMRF03811); // 데이터셋 1
  3418. nRexpertID = "RPMMO21002";
  3419. }else{
  3420. rptf_setNodeListToDOM(objDOM, "/root/hidden/geneunitlist", ds_data_TRMRF03811); // 데이터셋 1
  3421. nRexpertID = "RPMMO21001";
  3422. }
  3423. var objParam = new Object();
  3424. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  3425. var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0";
  3426. rptf_exeReportPreview30([nRexpertID],[objParam], option);
  3427. dsf_deleteDs("ds_cond_TRMRF03811");
  3428. dsf_deleteDs("ds_data_TRMRF03811");
  3429. }
  3430. function lf_isTmp(pid,orddd,cretno,formcd,ordtype,orddeptcd) {
  3431. if (utlf_isNull(ordtype) || utlf_isNull(orddeptcd) ) {
  3432. dsf_createDsRow("ds_send_req", [ {col:"pid", type:"string", size:256, val:pid}
  3433. , {col:"orddd", type:"string", size:256, val:orddd}
  3434. , {col:"formcd", type:"string", size:256, val:formcd.substring(0,10)}
  3435. , {col:"cretno", type:"string", size:256, val:cretno}]);
  3436. dsf_createDs("ds_rtn", [ {col:"ordtype", type:"string", size:256}
  3437. ,{col:"orddrid", type:"string", size:256}
  3438. ,{col:"wardcd", type:"string", size:256}
  3439. ,{col:"myn", type:"string", size:256}
  3440. ,{col:"prntonly", type:"string", size:256}
  3441. ,{col:"orddeptcd", type:"string", size:256}]);
  3442. var oParam = {};
  3443. oParam.id = "reqGetPatSujinInfo_01";
  3444. oParam.service = "formmngtapp.OcrPrntMngt";
  3445. oParam.method = "reqGetPatSujinInfo";
  3446. oParam.inds = "req=ds_send_req";
  3447. oParam.outds = "ds_rtn=patinfo";
  3448. oParam.async = false;
  3449. oParam.callback = "";
  3450. tranf_submit(oParam);
  3451. ordtype = ds_rtn.getColumn(0,"ordtype");
  3452. orddrid = ds_rtn.getColumn(0,"orddrid");
  3453. wardcd = ds_rtn.getColumn(0,"wardcd");
  3454. orddeptcd = ds_rtn.getColumn(0,"orddeptcd");
  3455. var myn = ds_rtn.getColumn(0,"myn");
  3456. var prntonly = ds_rtn.getColumn(0,"prntonly");
  3457. dsf_deleteDs("ds_send_req");
  3458. dsf_deleteDs("ds_rtn");
  3459. }
  3460. // 6954 [전자동의서]임시저장 SW
  3461. // 6955 [전자동의서]임시저장 ordtype SW
  3462. // 6956 [전자동의서]임시저장 예외병동
  3463. // 6957 [전자동의서]임시저장 예외부서
  3464. // 6958 [전자동의서]임시저장 예외의사
  3465. // 6959 [전자동의서]임시저장 해당서식
  3466. // 6960 [전자동의서]레몬 PC 전자동의서 호출IP + 듀얼 모드(C#)
  3467. var acu_user = "N";
  3468. // 아큐 사용이면서 레몬전자동의서 사용
  3469. if (lf_ContainsHardCD("6950", "Y") && lf_ContainsHardCD("6951", sysf_getUserInfo("userid")) &&
  3470. lf_ContainsHardCD("6952", formcd) && lf_ContainsHardCD("6960", sysf_getIPAddress())) {
  3471. var acu_user = "Y";
  3472. }
  3473. if (lf_ContainsHardCD("6954", "Y")
  3474. && lf_ContainsHardCD("6955", ordtype)
  3475. && myn == "Y"
  3476. && prntonly == "N"
  3477. && acu_user == "N"
  3478. && !lf_ContainsHardCD("6956", wardcd)
  3479. && !lf_ContainsHardCD("6957", orddeptcd)
  3480. && !lf_ContainsHardCD("6967", sysf_getUserInfo("dutplcecd"))
  3481. && !lf_ContainsHardCD("6958", sysf_getUserInfo("userid"))) {
  3482. return true;
  3483. }
  3484. return false;
  3485. }]]></Script>