12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[include "com_commonxp::comm_main.xjs";
- include "emr_prcpmngtxp::MMO001.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var fso = inff_fileSystemObject();
- //var gv_ImgeSavePath = "C:/BCP_OCR_Image/";
- var gv_ImgeSavePath = system.convertRealPath("%MYDOCUMENT%") + "\KU20\\BCP_OCR_Image\\";
- //var gv_BCPINIPath = document.location;
- var gv_Logo_ImgePath = "../../../com/commonweb/images";
- var gTimerID;
- var CLIP_FLAG = false;
- var gocrprntyn = "Y";
- /**
- * @desc : 수가와 매핑된 서식 조회를 위한 인터페이스
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fCalcScorInterface(pid, orddd, cretno, ordtype, calcscorcd, ocrprntyn, orddeptcd, payflagcd){
- if((utlf_isNull(pid)) || (utlf_isNull(orddd)) || (utlf_isNull(cretno)) || (utlf_isNull(ordtype))){
- sys_messageBox("원무접수 정보가", "I004");
- return;
- }
-
- if ( ocrprntyn == "N" ){
- gocrprntyn = "N";
- }
-
- var formtypecls = "";
- var ocrtagprntyn = "";
- var formcd = "";
- var formfromddt = "";
- var calcscorcdList = "";
- var arrycalcscorcd = calcscorcd.split("▦");
- var formcd_calc = "";
- var prcp_rtn = "";
- var popyn = "";
-
- var node = sysf_getGlobalVariable("paminfo");
- dsf_setCSVToDs("ds_main_paminfo", node);
-
- for(var i = 1; i <= arrycalcscorcd.length -1; i++){
- calcscorcdList = calcscorcdList + arrycalcscorcd[i-1];
- if(i < arrycalcscorcd.length -1){
- calcscorcdList = calcscorcdList + ",";
- }
- }
-
- var payflag = payflagcd.substr(0,1);
- if (payflag == "2") {
- var condflag = "Y";
- }
- else {
- var condflag = "N";
- }
-
- ds_send_reqdata.setColumn(0,"calcscorcd",calcscorcdList);
- ds_send_reqdata.setColumn(0,"condflag",condflag);
-
- dsf_createDs("ds_main_formexinfo", [{col:"trgtcd", type:"STRING", size:256}
- , {col:"trgtcdnm", type:"STRING", size:256}
- , {col:"hardspec", type:"STRING", size:256}]);
-
- var oParam = {};
- oParam.id = "TRMRF03808";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetCalcScorForm";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_forminfo=forminfo ds_main_formexinfo=formexinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03808";
- tranf_submit(oParam);
-
- //서식별 동의서 출력 예외부서(20171230)
- var excnt = ds_main_formexinfo.getCaseCount("trgtcdnm == '"+arrycalcscorcd[0]+"'");
- if (excnt > 0) {
- return "X";
- }
-
- //시행부서 처방에서 동의서 출력유무
- var openWin = frmf_findPopup("SMMMO00200");
- var popcnt = ds_main_forminfo.getCaseCount("popyn == 'Y'");
- if (openWin != null && popcnt> 0) {
- if ( 6 != sysf_messageBox("동의서를 출력하시겠습니까?","Q") ) {
- return "X";
- }
- }
-
- // CLIP 전자 동의서를 통한 출력 여부 확인
- var clipPrntFlag = false;
-
- if (lf_ContainsHardCD("6921", "Y") && !lf_ContainsHardCD("6926", orddeptcd) && !lf_ContainsHardCD("6927", sysf_getUserId())) {
-
- clipPrntFlag = true;
-
- for (var i = 0; i < ds_main_forminfo.rowcount; i++) {
- if (lf_ContainsHardCD("6922", ds_main_forminfo.getColumn(i, "formcd"))) {
- clipPrntFlag = false;
- break;
- }
- }
- }
-
- ds_clip_info.setColumn(0, "formcdarr", "");
- ds_clip_info.setColumn(0, "ocrtagarr", "");
-
- var formCdArr = "";
- var ocrTagArr = "";
-
- var formList = ds_main_forminfo.rowcount;
- for (var i = 0; i < formList; i++) {
-
- formcd = ds_main_forminfo.getColumn(i, "formcd");
- formfromdt = ds_main_forminfo.getColumn(i, "formfromdt");
- formtypecls = ds_main_forminfo.getColumn(i, "formtypecls");
- ocrtagprntyn = ds_main_forminfo.getColumn(i, "ocrtagprntyn");
- formcd_calc = ds_main_forminfo.getColumn(i, "calcscorcd");
- popyn = ds_main_forminfo.getColumn(i, "popyn");
-
- var ocrTag = "";
-
- // CLIP 전자 동의서를 통한 출력일 경우, OCR Tag 만 획득한다.
- if (clipPrntFlag) {
-
- fmakeOCRTag();
-
- ocrTag = ds_main_ocrtag.getColumn(0, "tag");
-
- formCdArr += formcd + ( i < formList - 1 ? "," : "" );
- ocrTagArr += ocrTag + ( i < formList - 1 ? "," : "" );
-
- } else {
-
- fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, null, null, null, false);
-
- // Delay 처리
- var timeOut = utlf_getNewDate();
-
- timeOut.setSeconds(timeOut.getSeconds() + 1);
-
- while(true) {
-
- var currDate = utlf_getNewDate();
- if (timeOut < currDate) {
- break;
- }
- }
-
- ocrTag = fPrint();
- }
-
- var arry_calccd = utlf_transNullToEmpty(formcd_calc).split(",");
-
- for (var j = 0; j < arry_calccd.length; j++) {
- prcp_rtn += arry_calccd[j] + "▦" + ocrTag + "▦";
- }
- }
-
- ds_clip_info.setColumn(0, "formcdarr", formCdArr);
- ds_clip_info.setColumn(0, "ocrtagarr", ocrTagArr);
-
- return prcp_rtn;
- }
- function fCalcScorInterface_CLIP(pid, orddd, cretno, ordtype, calcscorcd, orddeptcd, prntflag, payflagcd) {
-
- if ((utlf_isNull(pid)) || (utlf_isNull(orddd)) || (utlf_isNull(cretno)) || (utlf_isNull(ordtype))){
- sysf_messageBox("원무접수 정보가", "I004");
- return "X";
- }
-
- var calcscorcdList = "";
- var arrycalcscorcd = calcscorcd.split("▦");
-
- for (var i = 1; i <= arrycalcscorcd.length -1; i++) {
- calcscorcdList += arrycalcscorcd[i - 1];
- if (i < arrycalcscorcd.length -1) {
- calcscorcdList += ",";
- }
- }
-
- var payflag = payflagcd.substr(0,1);
- if (payflag == "2") {
- var condflag = "Y";
- }
- else {
- var condflag = "N";
- }
- ds_send_reqdata.setColumn(0, "calcscorcd", calcscorcdList);
- ds_send_reqdata.setColumn(0, "condflag", condflag);
-
- dsf_createDs("ds_main_formexinfo", [{col:"trgtcd", type:"STRING", size:256}
- , {col:"trgtcdnm", type:"STRING", size:256}
- , {col:"hardspec", type:"STRING", size:256}]);
-
- var oParam = {};
- oParam.id = "TRMRF03808";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetCalcScorForm";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_forminfo=forminfo "
- + "ds_main_formexinfo=formexinfo";
- oParam.async = false;
-
- tranf_submit(oParam);
-
- // 서식별 동의서 출력 예외부서(20171230)
- if (ds_main_formexinfo.getCaseCount("trgtcdnm == '" + arrycalcscorcd[0] + "'") > 0) {
- return "X";
- }
-
- // 시행부서 처방에서 동의서 출력유무
- var openWin = frmf_findPopup("SMMMO00200");
- var popcnt = ds_main_forminfo.getCaseCount("popyn == 'Y'");
-
- if (openWin != null && popcnt > 0) {
- if (sysf_messageBox("동의서를 출력하시겠습니까?", "Q") != 6) {
- return "X";
- }
- }
-
- var formCd = "";
- var ocrTag = "";
- var formCdArr = "";
- var ocrTagArr = "";
- var calcCdArr = "";
- var prcp_rtn = "";
-
- var formList = ds_main_forminfo.rowcount;
-
- for (var i = 0; i < formList; i++) {
-
- formCd = ds_main_forminfo.getColumn(i, "formcd");
- fmakeOCRTag();
- ocrTag = ds_main_ocrtag.getColumn(0, "tag");
-
- formCdArr += formCd + ( i < formList - 1 ? "," : "" );
- ocrTagArr += ocrTag + ( i < formList - 1 ? "," : "" );
-
- calcCdArr = utlf_transNullToEmpty(ds_main_forminfo.getColumn(i, "calcscorcd")).split(",");
- for (var j = 0; j < calcCdArr.length; j++) {
- prcp_rtn += calcCdArr[j] + "▦" + ocrTag + "▦";
- }
- }
-
- dsf_createDsRow("ds_para_clip", [{col:"wdsize", type:"STRING", size:256, val: "MINIMIZED"}
- , {col:"title", type:"STRING", size:256, val: "경북대학교 병원 전자동의서"}
- , {col:"cboxflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"maxflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"minflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"csviewyn", type:"STRING", size:256, val: "N"}
- , {col:"ptviewyn", type:"STRING", size:256, val: "N"}
- , {col:"formcd", type:"STRING", size:256, val: formCdArr}
- , {col:"ocrtag", type:"STRING", size:256, val: ocrTagArr}
- , {col:"saveyn", type:"STRING", size:256, val: ( prntflag ? "N" : "Y" )}
- , {col:"printyn", type:"STRING", size:256, val: ( prntflag ? "Y" : "N" )}
- , {col:"pid", type:"STRING", size:256, val: pid}
- , {col:"ordtype", type:"STRING", size:256, val: ordtype}
- , {col:"orddd", type:"STRING", size:256, val: orddd}
- , {col:"cretno", type:"STRING", size:256, val: cretno}
- , {col:"orddeptcd", type:"STRING", size:256, val: ""}
- , {col:"oprsrvno", type:"STRING", size:256, val: ""}
- , {col:"msgflag", type:"STRING", size:256, val: "N"}
- , {col:"specdryn", type:"STRING", size:256, val: ""}
- , {col:"ctstartdd", type:"STRING", size:256, val: ""}
- , {col:"ctenddd", type:"STRING", size:256, val: ""}
- , {col:"roomcapa", type:"STRING", size:256, val: ""}
- , {col:"cttelno", type:"STRING", size:256, val: ""}
- , {col:"ctstnm1", type:"STRING", size:256, val: ""}
- , {col:"ctstnm2", type:"STRING", size:256, val: ""}
- , {col:"ctstnm3", type:"STRING", size:256, val: ""}
- , {col:"cardno", type:"STRING", size:256, val: ""}]);
-
- var objArg = new Object();
-
- objArg.arg_ds_para = ds_para_clip;
-
- frmf_modal("SPMRF04601", "SPMRF04601", objArg, false, 1, "", "", 350, 70, "", "", "", "P");
-
- return prcp_rtn;
- }
- /**
- * @desc : OCR 데이타 정보 조회 후 파일세팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag, pWardCd, pOpRsrvNo, pClipPrntFlag) {
-
- // CLIP 전자 동의서 분기
- var clip_pid = "";
- var clip_orddd = "";
- var clip_cretno = "";
- var clip_ordtype = "";
- var clip_orddeptcd = "";
-
- if (utlf_isNull(pid) && utlf_isNull(orddd) && utlf_isNull(cretno) && utlf_isNull(ordtype) ) {
- if( !utlf_isNull(parent.parent) && parent.parent.toString().toUpperCase() != "[OBJECT CHILDFRAME]" && parent.parent.objects["ds_main_ordinfo"] != null ){
- clip_pid = parent.parent.ds_main_ordinfo.getColumn(0, "pid");
- clip_orddd = parent.parent.ds_main_ordinfo.getColumn(0, "orddd");
- clip_cretno = parent.parent.ds_main_ordinfo.getColumn(0, "cretno");
- clip_ordtype = parent.parent.ds_main_ordinfo.getColumn(0, "ordtype");
- clip_orddeptcd = parent.parent.ds_main_ordinfo.getColumn(0, "orddeptcd");
- }else{
- sysf_trace("parent.parent OBJECT CHILDFRAME");
- }
- } else {
-
- clip_pid = pid;
- clip_orddd = orddd;
- clip_cretno = cretno;
- clip_ordtype = ordtype;
- }
-
- CLIP_FLAG = false;
-
- if (lf_ContainsHardCD("6923", sysf_getUserInfo("dutplcecd")) && lf_ContainsHardCD("6924", formcd)) {
- CLIP_FLAG = true;
- }
-
- //임시로 빠지는 기준추가
- if(lf_isTmp(clip_pid,clip_orddd,clip_cretno,formcd)) CLIP_FLAG = true;
-
- pClipPrntFlag = utlf_isNull(pClipPrntFlag) ? true : pClipPrntFlag;
-
- //clip_orddeptcd = "2230000000";
-
- if (pClipPrntFlag) {
- // 출력 여부 재확인
-
- if (lf_ContainsHardCD("6921", "Y") && !lf_ContainsHardCD("6926", clip_orddeptcd) && !lf_ContainsHardCD("6927", sysf_getUserId())) {
-
- CLIP_FLAG = true;
-
- var formcdArr = formcd.split(",");
- for (var i = 0; i < formcdArr.length; i++) {
- if (lf_ContainsHardCD("6922", formcdArr[i])) {
- CLIP_FLAG = false;
- break;
- }
- }
-
- } else {
- CLIP_FLAG = false;
- }
- }
-
- if (CLIP_FLAG) {
-
- dsf_createDsRow("ds_para_clip", [{col:"wdsize", type:"STRING", size:256, val: "MINIMIZED"}
- , {col:"title", type:"STRING", size:256, val: "경북대학교 병원 전자동의서"}
- , {col:"cboxflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"maxflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"minflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"csviewyn", type:"STRING", size:256, val: "N"}
- , {col:"ptviewyn", type:"STRING", size:256, val: "N"}
- , {col:"formcd", type:"STRING", size:256, val: formcd}
- , {col:"ocrtag", type:"STRING", size:256, val: ocrtag}
- , {col:"saveyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "N" : "Y" )}
- , {col:"printyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "Y" : "N" )}
- , {col:"pid", type:"STRING", size:256, val: clip_pid}
- , {col:"ordtype", type:"STRING", size:256, val: clip_ordtype}
- , {col:"orddd", type:"STRING", size:256, val: clip_orddd}
- , {col:"cretno", type:"STRING", size:256, val: clip_cretno}
- , {col:"orddeptcd", type:"STRING", size:256, val: ""}
- , {col:"oprsrvno", type:"STRING", size:256, val: pOpRsrvNo}
- , {col:"msgflag", type:"STRING", size:256, val: "Y"}
- , {col:"specdryn", type:"STRING", size:256, val: ""}
- , {col:"ctstartdd", type:"STRING", size:256, val: ""}
- , {col:"ctenddd", type:"STRING", size:256, val: ""}
- , {col:"roomcapa", type:"STRING", size:256, val: ""}
- , {col:"cttelno", type:"STRING", size:256, val: ""}
- , {col:"ctstnm1", type:"STRING", size:256, val: ""}
- , {col:"ctstnm2", type:"STRING", size:256, val: ""}
- , {col:"ctstnm3", type:"STRING", size:256, val: ""}
- , {col:"cardno", type:"STRING", size:256, val: ""}]);
-
- return;
- }
- var instance = parent.parent;
- var nodelist = null;
- var localfilenm = null;
- var para = false;
- if(formtypecls == '1'){
- grp_cnrlbox.rdo_diagopnm.visible = true;
- grp_cnrlbox.ipt_diagnm.visible = true;
- } else if(formtypecls == '2'){
- grp_cnrlbox.rdo_diagopnm.visible = true;
- grp_cnrlbox.ipt_diagnm.visible = true;
- grp_cnrlbox.rdo_diagopnm.index = 0;
- } else if((formtypecls == '3') || (formtypecls == '4') || (formtypecls == '5') || (formtypecls == '7') || (formtypecls == '8')){
- grp_cnrlbox.rdo_diagopnm.visible = false;
- grp_cnrlbox.ipt_diagnm.visible = false;
- }
- ds_hidden.clearData();
- ds_hidden.addRow();
- if((pid != null) && (orddd != null) && (cretno != null) && (ordtype != null)){
- ds_hidden.setColumn(0,"parentflag","ETC")
- } else if((pid == null) && (orddd == null) && (cretno == null) && (ordtype == null)){
- ds_hidden.setColumn(0,"parentflag","PRNT")
- } else {
- sysf_messageBox("원무접수 정보가", "I004");
- return;
- }
- ds_main_forminfo.setColumn(0,"formcd",formcd);
- ds_main_forminfo.setColumn(0,"formtypecls",formtypecls);
- // 20090715 ocrtagprntyn 값 추가 nj
- ds_main_forminfo.setColumn(0,"ocrtagprntyn",ocrtagprntyn);
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
- ds_send_reqdata.setColumn(0,"formcd", formcd)
- if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
- if( !utlf_isNull(parent.parent) && parent.parent.toString().toUpperCase() != "[OBJECT CHILDFRAME]" && parent.parent.objects["ds_main_ordinfo"] != null ){
- ds_send_reqdata.setColumn(0,"pid",parent.parent.ds_main_ordinfo.getColumn(0,"pid"));
- }else{
- ds_send_reqdata.setColumn(0,"pid", "");
- }
-
- } else {
- ds_send_reqdata.setColumn(0,"pid",pid);
- }
- ds_send_reqdata.setColumn(0,"ocrtag",ocrtag);
-
-
- oParam = {};
- oParam.id = "TRMRF03801";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetOcrInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_ocrinfo=ocrlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03801";
- tranf_submit(oParam);
-
- //sysf_trace(ds_main_ocrinfo.saveXML());
-
- var ocrimgcnt = ds_main_ocrinfo.rowcount;
- if(ocrimgcnt == 0) {
-
- var check = this.getOwnerFrame().form.frmf_getParameter("SPMRF01100");
-
- if ( check == "Y" ) {
- sysf_messageBox("연결된 서식이 존재하지", "I011");
- } else {
- sysf_messageBox("OCR로 출력할 수 없는 서식", "E008");
- }
- return;
- }
- /** fFolderSet(path, flag)
- * path에 해당하는 폴더를 local에 생성
- * path는 이미지가 저장될 path
- * flag는 해당 폴더의 file을 삭제 여부를 나타냄
- * flag: "D"이면 삭제 값을 주지 않으면 삭제하지 않음
- */
- fFolderSet(gv_ImgeSavePath, "D");
-
- nodelist = ds_main_ocrinfo;
- ds_pageinfo.setColumn(0,"ocrdatacnt", nodelist.rowcount)
- FileCount:
- var errFlag = false;
- for(var i = 0; i < nodelist.rowcount; i++){
- fGetOCRData(i);
- var img_file = fso.GetFile(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm"));
-
- var timeOut = utlf_getNewDate();
- timeOut.setSeconds( timeOut.getSeconds() + 5 );
-
- FileSize:
- while(true){
- if (utlf_isNull(img_file.Size)){
- break;
- }
- img_size = img_file.Size;
- var currDate = utlf_getNewDate();
-
- if(timeOut < currDate){
- errFlag = true;
- //break FileCount;
- break;
- }
-
- if(fso.FileExists(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm") )
- && (img_size == ds_main_ocrinfo.getColumn(i,"ocrfilesize"))){
- //break FileSize;
- break;
- }
- }
- }
- if(errFlag){
- sysf_messageBox("파일 다운로드를", "E009");
- return;
- }
- /* Edited by nj 2007-07-27 CurrentDirectory을 사용하지 않음 */
- if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
- ds_send_reqdata.setColumn(0,"pid", pid);
- ds_send_reqdata.setColumn(0,"orddd", orddd);
- ds_send_reqdata.setColumn(0,"cretno", cretno);
- ds_send_reqdata.setColumn(0,"ordtype", ordtype);
- ds_send_reqdata.setColumn(0,"ocrtag", ocrtag);
-
- var oParam = {};
- oParam.id = "TRMRF03803";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetPatInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_patinfo=patinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03803";
- tranf_submit(oParam);
- ds_main_patinfo.addColumn("patnm", "string");
- ds_main_patinfo.addColumn("orddeptcd", "string");
- ds_main_patinfo.addColumn("orddeptnm", "string");
- ds_main_patinfo.addColumn("drid", "string");
- ds_main_patinfo.addColumn("drnm", "string");
- ds_main_patinfo.addColumn("inroomcd", "string");
- ds_main_patinfo.addColumn("rrgstno", "string");
- ds_main_patinfo.addColumn("roomcd", "string");
- ds_main_patinfo.addColumn("centcd", "string");
- ds_main_patinfo.addColumn("centengabbr", "string");
- ds_main_patinfo.setColumn(0, "patnm", ds_main_patinfo.getColumn(0,"hngnm"));
- ds_main_patinfo.setColumn(0, "orddeptcd", ds_main_patinfo.getColumn(0,"deptcd"));
- ds_main_patinfo.setColumn(0, "orddeptnm", ds_main_patinfo.getColumn(0,"deptnm"));
- ds_main_patinfo.setColumn(0, "drid", ds_main_patinfo.getColumn(0,"orddrid"));
- ds_main_patinfo.setColumn(0, "drnm", ds_main_patinfo.getColumn(0,"orddrnm"));
- ds_main_patinfo.setColumn(0, "inroomcd", ds_main_patinfo.getColumn(0,"roomcd"));
- ds_main_patinfo.setColumn(0, "rrgstno", ds_main_patinfo.getColumn(0,"rrgstno1"));
- var rrgstno = ds_main_patinfo.getColumn(0,"rrgstno").substring(0, 8) + "XXXXXX";
- ds_main_patinfo.setColumn(0,"rrgstno",rrgstno);
- }
-
- ds_pageinfo.setColumn(0,"currentpage", 1);
- ds_pageinfo.setColumn(0,"doubcnt", 1);
-
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
- /** Edited by nj 2007-08-28 출력 서식이 5개 종류로 나뉨
- * TYPE1: 환자정보+진단명/수술명+본문
- * TYPE2: 환자정보+진단명+본문
- * TYPE3: 환자정보+본문
- * TYPE4: 환자정보+본문(OMR)
- * TYPE5: 본문(DSC)
- * TYPE6: 환자정보+본문 ( 2013.08.21 cyw )
- */
- fInitCreateHtml(); //Footer 및 Header 정보생성
- fBaseCreateHtml(formtypecls); //Type별 정보셋팅
- fChartCreateHtml(formtypecls,formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn); //OCR파일정보 생성.
- if(ds_pageinfo.getColumn(0,"ocrdatacnt") == ds_pageinfo.getColumn(0,"currentpage")){
- grp_cnrlbox.btn_postpage.enable = false;
- grp_cnrlbox.btn_prepage.enable = false;
- } else {
- grp_cnrlbox.btn_postpage.enable = true;
- grp_cnrlbox.btn_prepage.enable = false;
- }
- //2013/03/29 Start
- ds_main_ocrtag.setColumn(0,"tag", ocrtag);
- //2013/03/29 End
- }
- /**
- * @desc : OCR 데이타 정보 조회 후 파일세팅
- * dbs227 의무기록실 사용자 LC, 클립소프트 구분 출력 기능
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fGetOCRInfoDebug(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn, ocrtag, pWardCd, pOpRsrvNo, pClipPrntFlag, debugMode) {
-
- // CLIP 전자 동의서 분기
- var clip_pid = "";
- var clip_orddd = "";
- var clip_cretno = "";
- var clip_ordtype = "";
- var clip_orddeptcd = "";
-
- if (utlf_isNull(pid) && utlf_isNull(orddd) && utlf_isNull(cretno) && utlf_isNull(ordtype)) {
-
- clip_pid = parent.parent.ds_main_ordinfo.getColumn(0, "pid");
- clip_orddd = parent.parent.ds_main_ordinfo.getColumn(0, "orddd");
- clip_cretno = parent.parent.ds_main_ordinfo.getColumn(0, "cretno");
- clip_ordtype = parent.parent.ds_main_ordinfo.getColumn(0, "ordtype");
- clip_orddeptcd = parent.parent.ds_main_ordinfo.getColumn(0, "orddeptcd");
-
- } else {
-
- clip_pid = pid;
- clip_orddd = orddd;
- clip_cretno = cretno;
- clip_ordtype = ordtype;
- }
-
- CLIP_FLAG = false;
-
- if (lf_ContainsHardCD("6923", sysf_getUserInfo("dutplcecd")) && lf_ContainsHardCD("6924", formcd)) {
- CLIP_FLAG = true;
- }
-
- /*
- dsf_createDsRow("ds_send_clip", [{col:"pid", type:"STRING", size:256, val: clip_pid}
- , {col:"orddd", type:"STRING", size:256, val: clip_orddd}
- , {col:"cretno", type:"STRING", size:256, val: clip_cretno}
- , {col:"ordtype", type:"STRING", size:256, val: clip_ordtype}]);
-
- dsf_createDs("ds_pt_clip", [{col:"pid", type:"STRING", size:256}
- , {col:"orddd", type:"STRING", size:256}
- , {col:"ordtype", type:"STRING", size:256}
- , {col:"cretno", type:"STRING", size:256}
- , {col:"orddeptcd", type:"STRING", size:256}
- , {col:"centcd", type:"STRING", size:256}
- , {col:"wardcd", type:"STRING", size:256}]);
-
- var oParam = {};
- oParam.id = "TRMRF03815";
- oParam.service = "formmngtapp.OcrPrntMngt";
- oParam.method = "reqGetPtInfo_CLIP";
- oParam.inds = "req=ds_send_clip";
- oParam.outds = "ds_pt_clip=pt";
- oParam.async = false;
-
- tranf_submit(oParam);
-
- if (ds_pt_clip.rowcount > 0) {
-
- var wardcd = utlf_isNull(pWardCd) ? ds_pt_clip.getColumn(0, "wardcd") : pWardCd;
-
- if (lf_ContainsHardCD("6916", "Y")) {
- if (lf_ContainsHardCD("6917", sysf_getUserId())) {
- if (ordtype == "O") {
- if (lf_ContainsHardCD("6918", ds_pt_clip.getColumn(0, "centcd")) || lf_ContainsHardCD("6918", ds_pt_clip.getColumn(0, "orddeptcd"))) {
- CLIP_FLAG = true;
- }
- } else {
- if (lf_ContainsHardCD("6918", wardcd)) {
- CLIP_FLAG = true;
- }
- }
- }
- }
- }
- */
-
- pClipPrntFlag = utlf_isNull(pClipPrntFlag) ? false : pClipPrntFlag;
-
- if (pClipPrntFlag) {
- // 출력 여부 재확인
- // dbs227, 의존성 제거
- //if (lf_ContainsHardCD("6921", "Y") && !lf_ContainsHardCD("6926", clip_orddeptcd) && !lf_ContainsHardCD("6927", sysf_getUserId()))
- {
-
- CLIP_FLAG = true;
-
- // var formcdArr = formcd.split(",");
- // for (var i = 0; i < formcdArr.length; i++) {
- // if (lf_ContainsHardCD("6922", formcdArr[i])) {
- // CLIP_FLAG = false;
- // break;
- // }
- // }
-
- }
- // else {
- // CLIP_FLAG = false;
- // }
- }
-
- if (CLIP_FLAG) {
-
- dsf_createDsRow("ds_para_clip", [{col:"wdsize", type:"STRING", size:256, val: "MINIMIZED"}
- , {col:"title", type:"STRING", size:256, val: "경북대학교 병원 전자동의서"}
- , {col:"cboxflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"maxflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"minflag", type:"STRING", size:256, val: "FALSE"}
- , {col:"csviewyn", type:"STRING", size:256, val: "N"}
- , {col:"ptviewyn", type:"STRING", size:256, val: "N"}
- , {col:"formcd", type:"STRING", size:256, val: formcd}
- , {col:"ocrtag", type:"STRING", size:256, val: ocrtag}
- , {col:"saveyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "N" : "Y" )}
- , {col:"printyn", type:"STRING", size:256, val: ( pClipPrntFlag ? "Y" : "N" )}
- , {col:"pid", type:"STRING", size:256, val: clip_pid}
- , {col:"ordtype", type:"STRING", size:256, val: clip_ordtype}
- , {col:"orddd", type:"STRING", size:256, val: clip_orddd}
- , {col:"cretno", type:"STRING", size:256, val: clip_cretno}
- , {col:"orddeptcd", type:"STRING", size:256, val: ""}
- , {col:"oprsrvno", type:"STRING", size:256, val: pOpRsrvNo}
- , {col:"msgflag", type:"STRING", size:256, val: "Y"}
- , {col:"specdryn", type:"STRING", size:256, val: ""}
- , {col:"ctstartdd", type:"STRING", size:256, val: ""}
- , {col:"ctenddd", type:"STRING", size:256, val: ""}
- , {col:"roomcapa", type:"STRING", size:256, val: ""}
- , {col:"cttelno", type:"STRING", size:256, val: ""}
- , {col:"ctstnm1", type:"STRING", size:256, val: ""}
- , {col:"ctstnm2", type:"STRING", size:256, val: ""}
- , {col:"ctstnm3", type:"STRING", size:256, val: ""}
- , {col:"cardno", type:"STRING", size:256, val: ""}]);
-
- return;
- }
-
- var instance = parent.parent;
- var nodelist = null;
- var localfilenm = null;
- var para = false;
- if(formtypecls == '1'){
- grp_cnrlbox.rdo_diagopnm.visible = true;
- grp_cnrlbox.ipt_diagnm.visible = true;
- } else if(formtypecls == '2'){
- grp_cnrlbox.rdo_diagopnm.visible = true;
- grp_cnrlbox.ipt_diagnm.visible = true;
- grp_cnrlbox.rdo_diagopnm.index = 0;
- } else if((formtypecls == '3') || (formtypecls == '4') || (formtypecls == '5') || (formtypecls == '7') || (formtypecls == '8')){
- grp_cnrlbox.rdo_diagopnm.visible = false;
- grp_cnrlbox.ipt_diagnm.visible = false;
- }
- ds_hidden.clearData();
- ds_hidden.addRow();
- if((pid != null) && (orddd != null) && (cretno != null) && (ordtype != null)){
- ds_hidden.setColumn(0,"parentflag","ETC")
- } else if((pid == null) && (orddd == null) && (cretno == null) && (ordtype == null)){
- ds_hidden.setColumn(0,"parentflag","PRNT")
- } else {
- sysf_messageBox("원무접수 정보가", "I004");
- return;
- }
- ds_main_forminfo.setColumn(0,"formcd",formcd);
- ds_main_forminfo.setColumn(0,"formtypecls",formtypecls);
- // 20090715 ocrtagprntyn 값 추가 nj
- ds_main_forminfo.setColumn(0,"ocrtagprntyn",ocrtagprntyn);
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
- ds_send_reqdata.setColumn(0,"formcd", formcd)
- if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
- ds_send_reqdata.setColumn(0,"pid",parent.parent.ds_main_ordinfo.getColumn(0,"pid"));
- } else {
- ds_send_reqdata.setColumn(0,"pid",pid);
- }
- ds_send_reqdata.setColumn(0,"ocrtag",ocrtag);
-
-
- oParam = {};
- oParam.id = "TRMRF03801";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetOcrInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_ocrinfo=ocrlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03801";
- tranf_submit(oParam);
-
- //sysf_trace(ds_main_ocrinfo.saveXML());
-
- var ocrimgcnt = ds_main_ocrinfo.rowcount;
- if(ocrimgcnt == 0) {
-
- var check = this.getOwnerFrame().form.frmf_getParameter("SPMRF01100");
-
- if ( check == "Y" ) {
- sysf_messageBox("연결된 서식이 존재하지", "I011");
- } else {
- sysf_messageBox("OCR로 출력할 수 없는 서식", "E008");
- }
- return;
- }
- /** fFolderSet(path, flag)
- * path에 해당하는 폴더를 local에 생성
- * path는 이미지가 저장될 path
- * flag는 해당 폴더의 file을 삭제 여부를 나타냄
- * flag: "D"이면 삭제 값을 주지 않으면 삭제하지 않음
- */
- fFolderSet(gv_ImgeSavePath, "D");
-
- nodelist = ds_main_ocrinfo;
- ds_pageinfo.setColumn(0,"ocrdatacnt", nodelist.rowcount)
- FileCount:
- var errFlag = false;
- for(var i = 0; i < nodelist.rowcount; i++){
- fGetOCRData(i);
- var img_file = fso.GetFile(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm"));
-
- var timeOut = utlf_getNewDate();
- timeOut.setSeconds( timeOut.getSeconds() + 5 );
-
- FileSize:
- while(true){
- if (utlf_isNull(img_file.Size)){
- break;
- }
- img_size = img_file.Size;
- var currDate = utlf_getNewDate();
-
- if(timeOut < currDate){
- errFlag = true;
- //break FileCount;
- break;
- }
-
- if(fso.FileExists(gv_ImgeSavePath+ ds_main_ocrinfo.getColumn(i,"ocrfilenm") )
- && (img_size == ds_main_ocrinfo.getColumn(i,"ocrfilesize"))){
- //break FileSize;
- break;
- }
- }
- }
- if(errFlag){
- sysf_messageBox("파일 다운로드를", "E009");
- return;
- }
- /* Edited by nj 2007-07-27 CurrentDirectory을 사용하지 않음 */
- if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
- ds_send_reqdata.setColumn(0,"pid", pid);
- ds_send_reqdata.setColumn(0,"orddd", orddd);
- ds_send_reqdata.setColumn(0,"cretno", cretno);
- ds_send_reqdata.setColumn(0,"ordtype", ordtype);
- ds_send_reqdata.setColumn(0,"ocrtag", ocrtag);
-
- var oParam = {};
- oParam.id = "TRMRF03803";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetPatInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_patinfo=patinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03803";
- tranf_submit(oParam);
- ds_main_patinfo.addColumn("patnm", "string");
- ds_main_patinfo.addColumn("orddeptcd", "string");
- ds_main_patinfo.addColumn("orddeptnm", "string");
- ds_main_patinfo.addColumn("drid", "string");
- ds_main_patinfo.addColumn("drnm", "string");
- ds_main_patinfo.addColumn("inroomcd", "string");
- ds_main_patinfo.addColumn("rrgstno", "string");
- ds_main_patinfo.addColumn("roomcd", "string");
- ds_main_patinfo.addColumn("centcd", "string");
- ds_main_patinfo.addColumn("centengabbr", "string");
- ds_main_patinfo.setColumn(0, "patnm", ds_main_patinfo.getColumn(0,"hngnm"));
- ds_main_patinfo.setColumn(0, "orddeptcd", ds_main_patinfo.getColumn(0,"deptcd"));
- ds_main_patinfo.setColumn(0, "orddeptnm", ds_main_patinfo.getColumn(0,"deptnm"));
- ds_main_patinfo.setColumn(0, "drid", ds_main_patinfo.getColumn(0,"orddrid"));
- ds_main_patinfo.setColumn(0, "drnm", ds_main_patinfo.getColumn(0,"orddrnm"));
- ds_main_patinfo.setColumn(0, "inroomcd", ds_main_patinfo.getColumn(0,"roomcd"));
- ds_main_patinfo.setColumn(0, "rrgstno", ds_main_patinfo.getColumn(0,"rrgstno1"));
- var rrgstno = ds_main_patinfo.getColumn(0,"rrgstno").substring(0, 8) + "XXXXXX";
- ds_main_patinfo.setColumn(0,"rrgstno",rrgstno);
- }
-
- ds_pageinfo.setColumn(0,"currentpage", 1);
- ds_pageinfo.setColumn(0,"doubcnt", 1);
-
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
- /** Edited by nj 2007-08-28 출력 서식이 5개 종류로 나뉨
- * TYPE1: 환자정보+진단명/수술명+본문
- * TYPE2: 환자정보+진단명+본문
- * TYPE3: 환자정보+본문
- * TYPE4: 환자정보+본문(OMR)
- * TYPE5: 본문(DSC)
- * TYPE6: 환자정보+본문 ( 2013.08.21 cyw )
- */
- fInitCreateHtml(); //Footer 및 Header 정보생성
- fBaseCreateHtml(formtypecls); //Type별 정보셋팅
- fChartCreateHtml(formtypecls,formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn); //OCR파일정보 생성.
- if(ds_pageinfo.getColumn(0,"ocrdatacnt") == ds_pageinfo.getColumn(0,"currentpage")){
- grp_cnrlbox.btn_postpage.enable = false;
- grp_cnrlbox.btn_prepage.enable = false;
- } else {
- grp_cnrlbox.btn_postpage.enable = true;
- grp_cnrlbox.btn_prepage.enable = false;
- }
- //2013/03/29 Start
- ds_main_ocrtag.setColumn(0,"tag", ocrtag);
- //2013/03/29 End
- }
- /**
- * @desc : 폴더 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fFolderSet(folderpath, delflag)
- {
- /*
- var haveFile;
- var currFile;
- if(fso.FolderExists(folderpath) == false){
- fso.CreateFolder(folderpath);
- }
-
- if (delflag == "D"){
- haveFile = fso.GetFolder(gv_ImgeSavePath);
- // currFile = new Enumerator(haveFile.Files);
- //
- // for( ; !currFile.atEnd(); currFile.moveNext()) {
- // //20130418 김동준 start try Catch 추가
- try{
- fso.DeleteFile(gv_ImgeSavePath + "*.*", true);
- } catch(e){
- }
- // //20130418 김동준 end
- // }
- }
- */
- var objExtCommon = new ExtCommon();
-
- if(utlf_isNull(folderpath)){
- return;
- }
- var folderDept = folderpath.split("\\");
- var currentPos = folderDept[0];
- for(var i =1; i<folderDept.length ; i++){
- if(utlf_isNull(folderDept[i])){
- break;
- }
- currentPos += ("\\" + folderDept[i]);
- objExtCommon.checkDirectory(currentPos, 1);
-
- }
-
- if (delflag == "D"){
- var objFileList = VirtualFile.getFileList(folderpath, "*", VirtualFile.findFileOnly);
- for(var i=0; i<objFileList.length; i++){
- sFileName = objFileList[i].filename;
- bDeleteFile = VirtualFile.delete(folderpath+"\\"+sFileName);
- }
- }
-
- }
- /**
- * @desc : Footer 및 Header 정보생성
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fInitCreateHtml()
- {
- var stype = "";
- var cover_header ="";
- var cover_footer ="";
- var body_header ="";
- var body_footer ="";
- var headertitle ="";
- var local_path ="";
- var local_file ="";
-
- var trans = "";
- var formtypecls = ds_main_forminfo.getColumn(0,"formtypecls");
- var ocrtagprnt = ds_main_forminfo.getColumn(0,"ocrtagprntyn"); // TAG출력여부 - TAG출력여부가 N인서식은
- // ocrtag번호 및 바코드 서식에서 생성하지 않음 2012-11-05 김유성
- local_path = gv_ImgeSavePath + "template\\" ;
-
- if( fso.FolderExists(gv_ImgeSavePath) == false) {
- fso.CreateFolder(gv_ImgeSavePath)
- }
- if( fso.FolderExists(local_path) == false) {
- fso.CreateFolder(local_path)
- }
-
- //Free 3 of 9
-
- if(ocrtagprnt == "N"){
- cover_footer = " <HTML> " +
- "\n <BODY style='margin: 0;'> " +
- "\n " +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n <TR> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
- body_header = " <HTML> " +
- "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 14pt;'> " +
- "\n <TR> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE> " +
- "\n <TR> " +
- "\n <TD style='width: 100%; text-align: center;' ><!--?VAR_CHART_NAME_TOP?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n " +
- "\n <TR> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAT_NUM?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PAT_NAME1?--></TD> " +
- "\n <TD style='text-align: center;'>| 진료과 : <!--?VAR_TREAT_DEPT?--></TD> " +
- "\n <TD style='text-align: center;'>| 주민등록번호 : <!--?VAR_PAT_JUMIN_NO?--></TD> " +
- "\n <TD style='text-align: right; '>| 진료일 : <!--?VAR_TREAT_DATE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
-
- body_footer = "<HTML> " +
- "\n <BODY style='margin: 0;'> " +
- "\n " +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n <TR> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
- }else{
- if( formtypecls == "6" ){ // type6인 경우 ocrtag 없애고 바코드는 오른쪽 위로, 환자정보 보이게
- cover_footer = " <HTML> " +
- "\n <BODY style='margin: 0;'> " +
- "\n " +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n <TR> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
- "\n <TD ></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
- body_header = " <HTML> " +
- "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
- "\n <TABLE style='width: 100%; font-family: Arial; font-size: 14pt; font-weight: bold;'> " +
- "\n <TR> " +
- "\n <TD></TD> " +
- "\n <TD></TD> " +
- "\n <TD></TD> " +
- //"\n <TD style='text-align: right; font-family: Free 3 of 9;font-size: 24pt;' ><!--?VAR_PRINT_BARCODE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE> " +
- "\n <TR> " +
- "\n <TD style='width: 100%; text-align: center;' ><!--?VAR_CHART_NAME_TOP?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n " +
- "\n <TR> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAT_NUM?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PAT_NAME1?--></TD> " +
- "\n <TD style='text-align: center;'>| 진료과 : <!--?VAR_TREAT_DEPT?--></TD> " +
- "\n <TD style='text-align: center;'>| 주민등록번호 : <!--?VAR_PAT_JUMIN_NO?--></TD> " +
- "\n <TD style='text-align: right; '>| 진료일 : <!--?VAR_TREAT_DATE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
-
- body_footer = "<HTML> " +
- "\n <BODY style='margin: 0;'> " +
- "\n " +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n <TR> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
- "\n <TD></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
- }else{
- cover_footer = " <HTML> " +
- "\n <BODY style='margin: 0;'> " +
- "\n " +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n <TR> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
- "\n <TD style='text-align: left; font-family: Free 3 of 9;font-size: 24pt;'><!--?VAR_PRINT_BARCODE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
- body_header = " <HTML> " +
- "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
- "\n <TABLE style='width: 100%; font-family: Arial; font-size: 14pt; font-weight: bold;'> " +
- "\n <TR> " +
- "\n <TD style='width: 15%; text-align: left; ' ><!--?VAR_OCR_LEFT?--></TD> " +
- "\n <TD style='width: 10%; text-align: right;' ><!--?VAR_OCR_RIGHT?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE> " +
- "\n <TR> " +
- "\n <TD style='width: 100%; text-align: center;' ><!--?VAR_CHART_NAME_TOP?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n " +
- "\n <TR> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAT_NUM?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PAT_NAME1?--></TD> " +
- "\n <TD style='text-align: center;'>| 진료과 : <!--?VAR_TREAT_DEPT?--></TD> " +
- "\n <TD style='text-align: center;'>| 주민등록번호 : <!--?VAR_PAT_JUMIN_NO?--></TD> " +
- "\n <TD style='text-align: right; '>| 진료일 : <!--?VAR_TREAT_DATE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
-
- body_footer = "<HTML> " +
- "\n <BODY style='margin: 0;'> " +
- "\n " +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕; font-size: 10pt;'> " +
- "\n <TR> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DATE?--></TD> " +
- "\n <TD style='text-align: center;'><!--?VAR_PRINT_DEPT?--></TD> " +
- "\n <TD style='text-align: left; '><!--?VAR_PAGE_CURRENT?-->/<!--?VAR_PAGE_TOTAL?--></TD> " +
- "\n <TD style='text-align: left; font-family: Free 3 of 9;font-size: 24pt;'><!--?VAR_PRINT_BARCODE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
- }
- }
-
-
-
- if(fso.FileExists(local_path + "cover_footer.html") == true)
- {
- fso.DeleteFile(local_path + "cover_footer.html", true)
- }
- var a = fso.CreateTextFile( local_path + "cover_footer.html" , true, true);
- a.WriteLine(cover_footer);
- a.Close();
-
- if(fso.FileExists(local_path + "body_header.html") == true)
- {
- fso.DeleteFile(local_path + "body_header.html", true)
- }
- var a = fso.CreateTextFile( local_path + "body_header.html" , true, true);
- a.WriteLine(body_header);
- a.Close();
-
- if(fso.FileExists(local_path + "body_footer.html") == true)
- {
- fso.DeleteFile(local_path + "body_footer.html", true)
- }
- var a = fso.CreateTextFile( local_path + "body_footer.html" , true, true);
- a.WriteLine(body_footer);
- a.Close();
-
- }
- /**
- * @desc : Type별 정보셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fBaseCreateHtml(formtypecls)
- {
- var stype = "";
- var cover_header ="";
- var headertitle ="";
- var local_path ="";
- var local_file ="";
-
- var trans = "";
-
- local_path = gv_ImgeSavePath + "template\\" ;
-
- if( fso.FolderExists(gv_ImgeSavePath) == false)
- {
- fso.CreateFolder(gv_ImgeSavePath);
- }
- if( fso.FolderExists(local_path) == false)
- {
- fso.CreateFolder(local_path);
- }
- var ocrtagprnt = ds_main_forminfo.getColumn(0,"ocrtagprntyn"); // TAG출력여부 - TAG출력여부가 N인서식은
- // ocrtag번호 및 바코드 서식에서 생성하지 않음 2012-11-05 김유성
- if(ocrtagprnt == "N"){
- cover_header = "<HTML>" +
- "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
- "\n <DIV > " +
- "\n <TABLE width='100%' style='font-family: 맑은 고딕; font-size: 14pt;'> " +
- "\n <TR> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> ";
- }else{
- if( formtypecls == "6" ){
- cover_header = "<HTML>" +
- "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
- "\n <DIV > " +
- "\n <TABLE width='100%' style='font-family: Arial; font-size: 14pt; '> " +
- "\n <TR> " +
- "\n <TD></TD> " +
- "\n <TD></TD> " +
- "\n <TD></TD> " +
- //"\n <TD style='text-align: right; font-family: Free 3 of 9;font-size: 24pt;'><!--?VAR_PRINT_BARCODE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> ";
- }else{
- cover_header = "<HTML>" +
- "\n <BODY style='margin-top: 0; margin-left: 0; margin-right; 0;'> " +
- "\n <DIV > " +
- "\n <TABLE width='100%' style='font-family: Arial; font-size: 14pt; font-weight: bold;'> " +
- "\n <TR> " +
- "\n <TD style='width: 100%; text-align: left'><!--?VAR_OCR_LEFT?--></TD> " +
- "\n <TD style='width: 100%; text-align: right'><!--?VAR_OCR_RIGHT?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> ";
-
- }
- }
- //[2012.04.27 기관코드 추가 ]
- var pInstcd = "";
- if( !utlf_isNull(parent.parent) && isValidObject("ds_main_ordinfo") ){
- pInstcd = parent.parent.ds_main_ordinfo.getColumn(0,"instcd");
- }
-
- if(utlf_isNull(pInstcd)) {
- pInstcd =sysf_getUserInfo("dutplceinstcd");
- }
- //[2012.04.27 기관코드 추가 ]
- var getformnm = ds_main_ocrinfo.getColumn(0,"formprntnm");
- var arryformnm = getformnm.split("\n");
- var langflag = ds_main_ocrinfo.getColumn(0,"langflag");
- headertitle = "\n <TABLE cellspacing='0' width='100%'> " +
- "\n <TR> " +
- "\n <TD width='65%'> " +
- "\n <TABLE style='width: 100%; font-family: 맑은 고딕;'> " +
- "\n <TR> " +
- "\n <TD><IMG SRC='" + rptf_getBigLogoImageURL("", "") + "' width='130' height='30' ></TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD style='font-size: 18pt; text-align: center;'><!--?VAR_CHART_NAME_TOP?--></TD> " +
- "\n </TR> ";
-
- if(arryformnm.length == 2){
- headertitle = headertitle +
- "\n <TR> " +
- "\n <TD style='font-size: 14pt; text-align: center;'><!--?VAR_CHART_NAME2_TOP?--></TD> " +
- "\n </TR> ";
- }
- headertitle = headertitle +
- "\n </TABLE> " +
- "\n </TD> " +
- "\n <TD width='35%'> " +
- "\n <DIV style='border-style: solid; border-width: 1px; padding: 2px'> " +
- "\n <TABLE cellspacing='0' width='100%' style='font-family: 맑은 고딕;'> " +
- "\n <TR> " +
- "\n <TD style='font-size: 18pt' width='70%'><!--?VAR_PAT_NUM?--></TD> " +
- "\n <TD style='font-size: 14pt; text-align: center;' width='30%'><!--?VAR_TREAT_DEPT?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE> " +
- "\n <TR> " +
- "\n <TD style='font-size: 14pt' width='60%'><!--?VAR_PAT_NAME?--></TD> " +
- "\n <TD style='font-size: 14pt; text-align: center;' width='40%'><!--?VAR_PAT_SA?--></TD> " +
- "\n </TR> " +
- "\n <TR height='40'> " +
- "\n <TD style='font-size: 12pt' width='60%' ><!--?VAR_PAT_JUMIN_NO?--></TD> " +
- "\n <TD style='font-size: 12pt' width='40%'><!--?VAR_TREAT_DATE?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " ;
- footer = "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 1.5px;'> " +
- "\n </DIV> " +
- "\n " +
- "\n </BODY> " +
- "\n </HTML> ";
-
- switch(formtypecls)
- {
- case "1":
- local_file = "cover_header1.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE cellspacing='0' > " +
- "\n <TR ><TD ></TD></TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n <TABLE cellspacing='0' width='100%'> " +
- "\n <TR> " +
- "\n <TD style='border-style: solid; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕; text-align: center;' width='12%'> " +
- "\n 진단명 " +
- "\n </TD> " +
- "\n <TD style='border-style: solid; border-left-style: none; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕;' width='88%'> " +
- "\n <TABLE width='100%' height='100%'> " +
- "\n <TR> " +
- "\n <TD style='border-bottom-style: solid; border-width: 1; border-color: #000000;'> " +
- "\n <!--?VAR_JINDAN1?--> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD> " +
- "\n <!--?VAR_JINDAN2?--> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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%'> " +
- "\n 수술명<BR>(처치/검사) " +
- "\n </TD> " +
- "\n <TD style='border-right-style: solid; border-bottom-style: solid; border-width: 1; border-color: #000000; font-size: 12pt; font-family: 맑은 고딕;' width='88%'> " +
- "\n <TABLE width='100%' height='100%'> " +
- "\n <TR> " +
- "\n <TD style='border-bottom-style: solid; border-width: 1; border-color: #000000;'> " +
- "\n <!--?VAR_OPERATION1?--> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD> " +
- "\n <!--?VAR_OPERATION2?--> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE cellspacing='0'> " +
- "\n <TR ><TD ></TD></TR> " +
- "\n </TABLE> " +
- footer
- }
- break;
- case "2":
- local_file = "cover_header2.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE cellspacing='0' > " +
- "\n <TR ><TD ></TD></TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n <TABLE cellspacing='0' width='100%' > " +
- "\n <TR> " +
- "\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> " +
- "\n <TD style='border-style: solid;border-bottom-style: none; border-color: #000000; border-width: 1px; font-size: 13pt;' width='90%' height='20px' > " +
- "\n <!--?VAR_JINDAN1?--> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR > " +
- "\n <TD style='border-style: solid; border-color: #000000; border-width: 1px; font-size: 13pt;' width='90%' height='20px'> " +
- "\n <!--?VAR_JINDAN2?--> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE cellspacing='0' > " +
- "\n <TR ><TD ></TD></TR> " +
- "\n </TABLE> " +
- footer
- }
- break;
- case "3":
- local_file = "cover_header3.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle + footer
- }
- break;
- case "4":
- local_file = "cover_header4.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle + footer
- }
- break;
- case "5":
- local_file = "cover_header5.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header +
- "\n <TABLE cellspacing='0' width='100%'> " +
- "\n <TR> " +
- "\n <TD width='100%'> " +
- "\n <TABLE style='width=100%; font-family: 맑은 고딕;'> " +
- "\n <TR> " +
- "\n <TD style='font-size: 18pt; text-align: center;'><!--?VAR_CHART_NAME_TOP?--></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- footer
- }
- break;
- case "6":
- local_file = "cover_header6.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle + footer
- }
- break;
- case "7":
- local_file = "cover_header7.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle + //footer +
- "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 1.5px;'> </DIV>" +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE cellspacing='0' > " +
- "\n <TR ><TD ></TD></TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n <TABLE cellspacing='0' width='100%' > " +
- "\n <TR> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD width='5%' rowspan='5'></TD> " +
- "\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> " +
- "\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'> " +
- "\n <pre> <!--?VAR_JINDAN1?--></pre> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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'> " +
- "\n <pre> <!--?VAR_JINDAN2?--></pre> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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>" +
- "\n <TD style='border-style: solid; border-color: #000000; border-width: 1px; font-size: 10pt;' width='73%' height='25px' > " +
- "\n <pre> <!--?VAR_OPCNFMDD?--></pre> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n <TABLE cellspacing='0' width='100%' > " +
- "\n <TR> " +
- "\n <TD style='font-size: 11pt; font-family: 맑은 고딕;text-align: left;text-style: bold;' colspan='5' width='100%' height='15px'></TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD width='5%' rowspan='7'></TD> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>복용약물</pre></TD> " +
- "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='20%'><pre>○유 ○무 ○미상</pre></TD> " +
- "\n <TD style='border-style: solid;border-right-style: none; border-color: #000000; border-width: 1px; text-align: center;'width='25%'><pre>기타</pre></TD> " +
- "\n <TD style='border-style: solid;border-color: #000000; border-width: 1px; text-align: center;'width='25%' height='35px'><pre></pre></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </BODY> " +
- "\n </HTML>"
- }
- break;
- case "8":
- local_file = "cover_header8.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle + //footer +
- "\n <DIV style='border-top-style: solid; border-bottom-style: solid; border-width: 1.5px;'> </DIV>" +
- "\n <DIV style='border-top-style: solid; border-width: 2px;'> " +
- "\n <TABLE cellspacing='0' > " +
- "\n <TR ><TD height='20px'></TD></TR> " +
- "\n </TABLE> " +
- "\n </DIV> " +
- "\n <TABLE cellspacing='0' width='100%' > " +
- "\n <TR> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\n <TD width='5%' rowspan='15'></TD> " +
- "\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> " +
- "\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'> " +
- "\n <pre> <!--?VAR_JINDAN1?--></pre> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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'> " +
- "\n <pre> <!--?VAR_JINDAN2?--></pre> " +
- "\n </TD> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\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> " +
- "\n </TR> " +
- "\n </TR> " +"\n <TR> " +
- "\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> " +
- "\n <TD style='border-style: solid;border-color: #000000; border-width: 1px; font-size: 10pt;' width='84%' height='30px' colspan='2'><pre>□상해전력 □마약사고 □수술 □기타( ) □ 해당없음</pre></TD> " +
- "\n </TR> " +
- "\n </TABLE> " +
- "\n </BODY> " +
- "\n </HTML> "
- }
- break;
- default:
- local_file = "cover_header3.html";
- if(fso.FileExists(local_path + local_file) == true)
- {
- fso.DeleteFile(local_path + local_file, true)
- }
- if(fso.FileExists(local_path + local_file) == false)
- {
- cover_header = cover_header + headertitle + footer
- }
- break;
- break;
- }
-
- var a = fso.CreateTextFile( local_path + local_file , true, true);
- a.WriteLine(cover_header);
- a.Close();
-
- }
- function fChartCreateHtml(formtypecls,formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn)
- {
- if(fso.FileExists(gv_ImgeSavePath + "chart1.html") == true)
- {
- fso.DeleteFile(gv_ImgeSavePath + "chart*.html", true)
- }
-
- // 환자정보
- var getdate = "";
-
- var barcode= "";
- var pidinfo = "";
- var patnminfo = "";
- var prnt_patnminfo ="";
- var sa = "";
- var barcode_pid = "";
-
- if( !utlf_isNull(parent.parent) && isValidObject("ds_main_ordinfo") ){
- barcode_pid = parent.parent.ds_main_ordinfo.getColumn(0,"pid");
- }
-
- if( formtypecls != "6" ){
- if(utlf_isNull(ocrtag)){
- ocrtag = "+2012123456789+";
- barcode = "*2012123456789*";
- }else if( ocrtag == "N" ){
-
- }else{
- ocrtag = "+" + ocrtag + "+";
- barcode = "*" + ocrtag + "*";
- }
- }else{
- if(utlf_isNull(ocrtag)){
- ocrtag = "+2012123456789+";
- barcode = "*" + barcode_pid + "*";
- }else if( ocrtag == "N" ){
-
- }else{
- ocrtag = "+" + ocrtag + "+";
- barcode = "*" + barcode_pid + "*";
- }
- }
-
- //[2012.04.27 기관코드 추가 ]
- var pInstcd = "";
- if( !utlf_isNull(parent.parent) && isValidObject("ds_main_ordinfo") ){
- pInstcd = parent.parent.ds_main_ordinfo.getColumn(0,"instcd");
- }
- if(utlf_isNull(pInstcd)){
- pInstcd = sysf_getUserInfo("dutplceinstcd");
- }
- //[2012.04.27 기관코드 추가 ]
- //f_View.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+pInstcd+".jpg");
- if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
- pidinfo = ds_main_patinfo.getColumn(0,"pid");
- patnminfo = ds_main_patinfo.getColumn(0,"patnm");
- ds_main_patinfo.setColumn(0,"rrgstno", ds_main_patinfo.getColumn(0,"rrgstno"));
- ds_main_patinfo.setColumn(0,"centcd", ds_main_patinfo.getColumn(0,"centcd"));
- ds_main_patinfo.setColumn(0,"centengabbr", ds_main_patinfo.getColumn(0,"centengabbr"));
-
- ds_main_patinfo.setColumn(0,"oprsrvno", "");
- } else if (ds_hidden.getColumn(0,"parentflag") == "PRNT"){
- if( !utlf_isNull(parent.parent) && parent.parent.toString().toUpperCase() != "[OBJECT CHILDFRAME]" && parent.parent.objects["ds_main_ordinfo"] != null ){
-
- pidinfo = parent.parent.ds_main_ordinfo.getColumn(0,"pid");
- patnminfo = parent.parent.ds_main_ordinfo.getColumn(0,"patnm");
- sa = parent.parent.ds_main_ordinfo.getColumn(0,"sa");
-
- ds_main_patinfo.setColumn(0,"pid", parent.parent.ds_main_ordinfo.getColumn(0,"pid"));
- ds_main_patinfo.setColumn(0,"orddd", parent.parent.ds_main_ordinfo.getColumn(0,"orddd"));
- ds_main_patinfo.setColumn(0,"ordtype", parent.parent.ds_main_ordinfo.getColumn(0,"ordtype"));
- ds_main_patinfo.setColumn(0,"orddeptcd", parent.parent.ds_main_ordinfo.getColumn(0,"orddeptcd"));
- ds_main_patinfo.setColumn(0,"patnm", parent.parent.ds_main_ordinfo.getColumn(0,"patnm"));
- ds_main_patinfo.setColumn(0,"drid", parent.parent.ds_main_ordinfo.getColumn(0,"drid"));
- ds_main_patinfo.setColumn(0,"drnm", parent.parent.ds_main_ordinfo.getColumn(0,"drnm"));
- ds_main_patinfo.setColumn(0,"sa", parent.parent.ds_main_ordinfo.getColumn(0,"sa"));
- ds_main_patinfo.setColumn(0,"inroomcd", parent.parent.ds_main_ordinfo.getColumn(0,"inroomcd"));
- ds_main_patinfo.setColumn(0,"cretno", parent.parent.ds_main_ordinfo.getColumn(0,"cretno"));
- ds_main_patinfo.setColumn(0,"rrgstno", parent.parent.ds_main_ordinfo.getColumn(0,"rrgstno"));
- ds_main_patinfo.setColumn(0,"centcd", parent.parent.ds_main_ordinfo.getColumn(0,"centcd"));
- ds_main_patinfo.setColumn(0,"centnm", parent.parent.ds_main_ordinfo.getColumn(0,"centnm"));
- ds_main_patinfo.setColumn(0,"centengabbr", parent.parent.ds_main_ordinfo.getColumn(0,"centengabbr"));
-
- ds_main_patinfo.setColumn(0,"oprsrvno", parent.parent.ds_main_ordinfo.getColumn(0,"oprsrvno"));
- }else{
- sysf_trace("parent.parent OBJECT CHILDFRAME fChartCreateHtml");
-
- ds_main_patinfo.setColumn(0,"pid", "");
- ds_main_patinfo.setColumn(0,"orddd", "");
- ds_main_patinfo.setColumn(0,"ordtype", "");
- ds_main_patinfo.setColumn(0,"orddeptcd", "");
- ds_main_patinfo.setColumn(0,"patnm", "");
- ds_main_patinfo.setColumn(0,"drid", "");
- ds_main_patinfo.setColumn(0,"drnm", "");
- ds_main_patinfo.setColumn(0,"sa", "");
- ds_main_patinfo.setColumn(0,"inroomcd", "");
- ds_main_patinfo.setColumn(0,"cretno", "");
- ds_main_patinfo.setColumn(0,"rrgstno", "");
- ds_main_patinfo.setColumn(0,"centcd", "");
- ds_main_patinfo.setColumn(0,"centnm", "");
- ds_main_patinfo.setColumn(0,"centengabbr", "");
- ds_main_patinfo.setColumn(0,"oprsrvno", "");
- }
- }
-
- var hardcd = ds_temp_hardcode.getColumn(0,"hardcd");
-
- if (hardcd == "Y")
- {
- for(var i = pidinfo.length; i <= 8; i++){
- if(i < 8){
- pidinfo = "0"+pidinfo;
- }
- }
- var str1 = pidinfo.substr(0, 3);
- var str2 = pidinfo.substr(3, 2);
- var str3 = pidinfo.substr(5, 2);
- var str4 = pidinfo.substr(7, 1);
- pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
-
- getdate = utlf_transNullToEmpty(ds_main_patinfo.getColumn(0,"orddd"));
-
- // 환자명 5자까리 수정
- if (patnminfo.length > 5 && patnminfo.length <= 10)
- {
- prnt_patnminfo = patnminfo ;
- }
- else if (patnminfo.length > 11)
- {
- prnt_patnminfo = patnminfo ;
- //외국인 환자를 위해서 수정(20160311 이윤주)
- //prnt_patnminfo = patnminfo.substring(0, 10);
- }
- else
- {
- for(var i = 0; i <= patnminfo.length; i++){
- tmp_patnminfo = patnminfo.substring(i, i+1);
- if(i == patnminfo.length){
- break;
- }
- prnt_patnminfo = prnt_patnminfo + tmp_patnminfo.concat(" ");
- }
- }
-
- ds_send_reqdata.setColumn(0,"deptcd", ds_main_patinfo.getColumn(0,"orddeptcd"));
- ds_send_reqdata.setColumn(0,"orddd", ds_main_patinfo.getColumn(0,"orddd"));
- // 진료정보
- var oParam = {};
- oParam.id = "TRMRF03805";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetDeptInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_deptinfo=deptinfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03805";
- tranf_submit(oParam);
- var dept = ds_main_deptinfo.getColumn(0,"deptengabbr");
- var juminno = ds_main_patinfo.getColumn(0,"rrgstno");
- var treatdate = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
-
- var ordtype = ds_main_patinfo.getColumn(0,"ordtype");
- if (ordtype == 'I') {
- ds_send_reqdata.setColumn(0,"pid", ds_main_patinfo.getColumn(0,"pid"));
- ds_send_reqdata.setColumn(0,"orddd", ds_main_patinfo.getColumn(0,"orddd"));
- ds_send_reqdata.setColumn(0,"cretno", ds_main_patinfo.getColumn(0,"cretno"));
-
- var oParam = {};
- oParam.id = "TRMRF03809";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetInRoomInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_inroominfo=inroominfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03809";
- tranf_submit(oParam);
-
- var inroomcd = ds_main_inroominfo.getColumn(0,"roomcd");
- } else {
- var inroomcd =" ";
- }
-
-
- var getformnm = ds_main_ocrinfo.getColumn(0,"formprntnm");
- var arryformnm = getformnm.split("\n");
- var langflag = ds_main_ocrinfo.getColumn(0,"langflag");
- var formnm ="" ;
- var formnm2 ="" ;
-
-
- if(arryformnm.length == 2){
- formnm = arryformnm[0];
- formnm2 = arryformnm[1];
- } else if(arryformnm.length == 1){
- formnm = arryformnm[0];
- }
-
- //formnm = getformnm.replace("\n",' ');
-
- // 출력정보
- var getdate = utlf_getCurrentDate();
- var gettime = utlf_getCurrentTime();
- var getuser = sysf_getUserName();
- var getuseren = sysf_getUserInfo("userengnm");
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
- var langflag = ds_main_ocrinfo.getColumn(0,"langflag");
-
- var printDate = "";
- var printDept = "";
-
- var printIP = sysf_getUserInfo("ipaddr").split(".");
-
- //예전데이터 뽑을때 활용 - 평가(이윤주)
- //var dateprnt = "2016/12/18";
- //var timeprnt ="11:37:23";
- //var getuser = "김지영";
-
- switch(langflag){
- case "KO":
- printDate = "출력일시 : " + dateprnt + " " + timeprnt + " " + printIP[2] + "." + printIP[3]+ " " +inroomcd;
- printDept = "출력자 : " + getuser;
- break;
- case "EN":
- printDate = "Print Date : " + dateprnt + " " + timeprnt + " " + printIP[2] + "." + printIP[3]+ " " +inroomcd;
- printDept = "Printed by : " + getuser;
- break;
- default:
- printDate = "출력일시 : " + dateprnt + " " + timeprnt + " " + printIP[2] + "." + printIP[3]+ " " +inroomcd;
- printDept = "출력자 : " + getuser;
- break;
- }
-
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
-
- //2012-10-15 김유성 수정--------------------------------------------------------------------------------------------------
- if(ds_main.getColumn(0,"exist") == "Y"){
-
- } else if( utlf_isNull(ds_main.getColumn(0,"exist")) && utlf_isNull(ds_main_ocrinfo.getColumnInfo("diagengnm"))){
- ds_send_reqdata.setColumn(0,"pid", ds_main_patinfo.getColumn(0,"pid"));
- ds_send_reqdata.setColumn(0,"orddd", ds_main_patinfo.getColumn(0,"orddd"));
- ds_send_reqdata.setColumn(0,"cretno", ds_main_patinfo.getColumn(0,"cretno"));
- ds_send_reqdata.setColumn(0,"orddeptcd", ds_main_patinfo.getColumn(0,"orddeptcd"));
- ds_send_reqdata.setColumn(0,"ordtype", ds_main_patinfo.getColumn(0,"ordtype"));
-
- var oParam = {};
- oParam.id = "TRMRF03807";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetDiagnm";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_diaginfo=diaginfo";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03807";
- tranf_submit(oParam);
- }
-
- var jindan1 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(0,"termengnm"));
- var jindan2 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(1,"termengnm"));
- var opengnm1 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(0,"termhngnm"));
- var opengnm2 = utlf_transNullToEmpty(ds_main_diaginfo.getColumn(1,"termhngnm"));
- var opengnm3 = "";
-
-
- var anstcap1 = "";
- var anstcap2 = "";
- var anstcap3 = "";
- var opcnfmdd = "";
- //--------------------------------------------------------------------------------------------------------------------------
-
- if( formtypecls == "7" || formtypecls == "8" ){
-
- // Default
- if( formtypecls == "8" ){
- anstcap1 = "주치의(집도의1)";
- anstcap2 = "주치의(집도의2)";
- anstcap3 = "주치의(집도의3)";
- opcnfmdd = "2 0 년 월 일";
- }
-
- var nOprsrvno = ds_main_patinfo.getColumn(0,"oprsrvno");
-
- if( utlf_isNull(nOprsrvno)
- && parent.parent instanceof ChildFrame == false
- && (parent.parent.objects["ds_main_anstconsent"] != null
- && parent.parent.ds_main_anstconsent.getColumn(0,"printyn") != "Y")
- && frmf_getParameter("anstconsentload") != "Y" ){
- if ( 6 != sysf_messageBox("수술정보가 없습니다. 수술 동의서는 수술 Tab에서 서식 출력 바랍니다.\n\n수술 정보 없이 계속 진행하시겠습니까?","Q") ) {
-
- if( parent.parent.objects["ds_main_selform"] != null ){
- parent.parent.ds_main_selform.setColumn(0, "selform", "");
- }
- if( parent.parent.objects["ds_main_ordinfo"] != null ){
- parent.parent.ds_main_ordinfo.setColumn(0, "formcd", "");
- }
- return;
- }
- }
-
- dsf_createDsRow("ds_cond_TRMRF03815", [{col:"formcd", type:"STRING", size:256, val:formcd}
- , {col:"oprsrvno", type:"STRING", size:256, val:nOprsrvno}]);
- dsf_createDs("ds_data_TRMRF03815");
-
- var oParam = {};
- oParam.id = "TRMRF03815";
- oParam.service = "formmngtapp.OcrPrntMngt";
- oParam.method = "reqGetSusulInfo";
- oParam.inds = "req=ds_cond_TRMRF03815";
- oParam.outds = "ds_data_TRMRF03815=susullist";
- oParam.async = false;
-
- tranf_submit(oParam);
-
- if( ds_data_TRMRF03815.rowcount > 0 ){
- jindan1 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"diagnm"));
- jindan2 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"opnm"));
- opengnm1 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"perfdr"));
- opengnm2 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"perfdr2"));
- opengnm3 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"perfdr3"));
- var tmp_opcnfmdd = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"opcnfmdd"));
- if( !utlf_isNull(tmp_opcnfmdd) ){
- opcnfmdd = tmp_opcnfmdd
- }
-
- // 마취동의서의 경우 의료진정보는 마취의 정보로 설정
- if( ds_data_TRMRF03815.getColumn(0,"anstconsentyn") == "Y" ){
- opengnm1 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"anstdr"));
- opengnm2 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"anstdr2"));
- opengnm3 = utlf_transNullToEmpty(ds_data_TRMRF03815.getColumn(0,"anstdr3"));
-
- anstcap1 = "마취의(마취의1)";
- anstcap2 = "마취의(마취의2)";
- anstcap3 = "마취의(마취의3)";
- }
- }else{
- var tmpNm = "(이름: ) □전문의(전문과목: ), □일반의(진료과목: )";
- jindan1 = "";
- jindan2 = "";
- opengnm1 = tmpNm;
- opengnm2 = tmpNm;
- opengnm3 = tmpNm;
- }
- }
-
-
- f_View.PageRemove(0,0);
- f_View.Viewmode = 0;
- f_View.BackColor = 16777215;
- f_View.AutoRefresh = false;
- for(var i = 0; i < ds_main_ocrinfo.rowcount; i++){
- trans="";
- trans = "<!--@\n @DOCUMENT_HOME = " + gv_ImgeSavePath +
- "\n @OUTPUT_WIDTH = 21.00" +
- "\n @OUTPUT_HEIGHT = 29.70" +
- "\n @OUTPUT_MARGIN_TOP = 0.84" +
- "\n @OUTPUT_MARGIN_BOTTOM = 0.84" +
- "\n @OUTPUT_MARGIN_LEFT = 0.84" +
- "\n @OUTPUT_MARGIN_RIGHT = 0.84" +
- "\n @OUTPUT_MAGNIFICATION = 2"
- if( i == 0)
- {
- trans = trans +
- "\n @COVER_HEADER = template/cover_header" + formtypecls + ".html" +
- "\n @COVER_FOOTER = template/cover_footer.html"
- } else
- {
- trans = trans +
- "\n @COVER_HEADER = template/body_header.html" +
- "\n @COVER_FOOTER = template/body_footer.html"
- }
-
- if (ordtype == 'I') {
-
- if (inroomcd == "" || inroomcd == null)
- {
- }
- else
- {
- }
-
- }
-
- trans = trans +
- "\n @VAR_OCR_LEFT = " + ocrtag +
- "\n @VAR_OCR_RIGHT = " + ocrtag +
- "\n @VAR_PAT_NUM = " + pidinfo +
- "\n @VAR_PAT_NAME = " + prnt_patnminfo +
- "\n @VAR_PAT_NAME1 = " + patnminfo +
- "\n @VAR_PAT_SA = " + sa +
- "\n @VAR_PAT_JUMIN_NO = " + juminno +
- "\n @VAR_TREAT_DEPT = " + dept +
- "\n @VAR_TREAT_DATE = " + treatdate +
- "\n @VAR_WARD_HEAD = " + "병실 : " + inroomcd +
- "\n @VAR_CHART_NAME_TOP = " + formnm +
- "\n @VAR_CHART_NAME2_TOP = " + formnm2 +
- "\n @VAR_PRINT_DATE = " + printDate +
- "\n @VAR_PRINT_DEPT = " + printDept +
- "\n @VAR_PRINT_BARCODE = " + barcode +
- "\n @VAR_JINDAN1 = " + jindan1 +
- "\n @VAR_JINDAN2 = " + jindan2 +
- "\n @VAR_OPERATION1 = " + opengnm1 +
- "\n @VAR_OPERATION2 = " + opengnm2 +
- "\n @VAR_OPERATION3 = " + opengnm3 +
- "\n @VAR_OPCNFMDD = " + opcnfmdd +
- "\n @VAR_ANSTCAP1 = " + anstcap1 +
- "\n @VAR_ANSTCAP2 = " + anstcap2 +
- "\n @VAR_ANSTCAP3 = " + anstcap3 +
- "\n @VAR_PAGE_CURRENT = " + "Page: " + ( i + 1 ) +
- "\n @VAR_PAGE_TOTAL = " + ds_main_ocrinfo.rowcount +
- "\n @-->\n" +
- "<HTML>" +
- "\n<BODY>" +
- "\n<TABLE WIDTH='100%' HEIGHT='100%'>" +
- "\n <TR>" +
- "\n <TD align='center'>"
-
- var path;
- var width;
- var ocrfnm = ds_main_ocrinfo.getColumn(i, "ocrfilenm");
- path = gv_ImgeSavePath + ocrfnm
-
- f_View.PageAppend( path ,1,1);
- f_View.PageCurrent = f_View.PageTotal;
- width = f_View.PageWidth ;
- f_View.PageRemove(f_View.PageTotal,f_View.PageTotal);
- if( i == 0)
- {
- switch(formtypecls)
- {
- case "1":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='650' ISOTROPIC BORDERREMOVE>"
- break;
- case "2":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='800' ISOTROPIC BORDERREMOVE>"
- break;
- case "3":
- if( width < 1400 ){
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE:1,1>"
- } else {
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE:1412,1800>"
- }
-
- break;
- case "4":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE>"
- break;
- case "5":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE>"
- break;
- case "6":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='850' ISOTROPIC BORDERREMOVE>"
- break;
- case "7":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='470' ISOTROPIC BORDERREMOVE>"//710
- break;
- case "8":
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='350' ISOTROPIC BORDERREMOVE>"
- break;
- }
- } else
- {
- if( width < 1400 ){
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='910' ISOTROPIC BORDERREMOVE:1,1>"
- } else {
- trans = trans + "\n <IMG SRC='" + ocrfnm + "' WIDTH='700' HEIGHT='910' ISOTROPIC BORDERREMOVE:1412,1900>"
- }
-
- }
-
-
-
- trans = trans + "\n </TD>" +
- "\n </TR>" +
- "\n</TABLE>" +
- "\n</BODY>" +
- "\n</HTML>" +
- "\n"
-
- var a = fso.CreateTextFile(gv_ImgeSavePath + "chart" + (i + 1) + ".html", true, true);
- a.WriteLine(trans);
- a.Close();
-
-
- //2012-08-10 오전 9:45:48 강지훈 전자동의서 서명을 위한 파일패스경로 저장.
- var ocrfilepath = gv_ImgeSavePath + "chart" + (i + 1) + ".html";
-
- ds_main_ocrinfo.setColumn(0,"ocrfilepath",ocrfilepath);
-
- f_View.PageAppend(ocrfilepath,1,1);
-
- }
- f_View.PageCurrent = 1;
- f_View.AutoRefresh = true;
- }
- /****************************************************************************************
- * Description : OCR 데이터 조회
- * Argument : 01. inode : index
- * retrun type : N/A
- * Creator : (SSMRC03160_LC_ADMIN MRF03800.xjs 제거로 fmakeOCRTag 복사함 로직수정시 동일하게 수정 필요)
- ****************************************************************************************/
- function fGetOCRData(inode){
- var localfilenm = ds_main_ocrinfo.getColumn(inode, "ocrfilenm");
- ds_reqfilepath.setColumn(0,"ocrseq", ds_main_ocrinfo.getColumn(inode, "ocrseq") );
- var oParam = {};
- oParam.id = "TRMRF03802";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetOcrData";
- oParam.inds = "req=ds_reqfilepath";
- oParam.outds = "ds_filedata=ocrfile";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03802";
- tranf_submit(oParam);
-
- //dsf_readFileFromDs(gv_ImgeSavePath + "\\" + localfilenm, ds_filedata, 0, "ocrdata"); // 파일저장
- dsf_readFileFromDs(gv_ImgeSavePath + localfilenm, ds_filedata, 0, "ocrdata"); // 파일저장
- }
- /**
- * @desc : 기준페이지에서 다음 페이지
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fPostPage(){
- var currpage = parseInt( ds_pageinfo.getColumn(0,"currentpage"));
- if( currpage == (f_View.PageTotal) ) {
-
- } else {
- currpage = currpage+1;
- ds_pageinfo.setColumn(0,"currentpage", currpage);
- fMovePage(currpage);
- grp_cnrlbox.btn_prepage.visible = true;
- if (parseInt(currpage) == parseInt(ds_pageinfo.getColumn(0,"ocrdatacnt"))) {
- grp_cnrlbox.btn_postpage.enable = false;
- grp_cnrlbox.btn_prepage.enable = true;
- } else {
- grp_cnrlbox.btn_postpage.enable = true;
- grp_cnrlbox.btn_prepage.enable = true;
- }
- }
-
- }
- /**
- * @desc : OCR 페이지 이동
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fMovePage(pageno){
- var formtype = ds_main_forminfo.getColumn(0,"formtypecls");
-
- var pid = ds_main_forminfo.getColumn(0,"pid");
- var orddd = ds_main_forminfo.getColumn(0,"orddd");
- var ordtype = ds_main_forminfo.getColumn(0,"ordtype");
- var cretno = ds_main_forminfo.getColumn(0,"cretno");
- var formcd = ds_main_forminfo.getColumn(0,"formcd");
- var ocrtag = ds_main_ocrtag.getColumn(0,"tag");
- var ocrtagprntyn = ds_main_forminfo.getColumn(0,"ocrtagprntyn");
- // var topinfoprntyn = parent.frmf_getParameter("topinfoprntyn");
-
- // if(pageno == '1'){
- //
- // } else if ( topinfoprntyn != "Y") {
- //
- // }
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
-
- f_View.PageCurrent = pageno;
- }
- /**
- * @desc : 기준페이지에서 이전 페이지
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fPrePage(){
- var currpage = parseInt( ds_pageinfo.getColumn(0,"currentpage"));
-
- if(currpage == 1){
- } else {
- currpage = currpage-1;
- ds_pageinfo.setColumn(0,"currentpage", currpage);
- fMovePage(currpage);
-
- if (parseInt(currpage) == 1 ) {
- grp_cnrlbox.btn_prepage.enable = false;
- grp_cnrlbox.btn_postpage.enable = true;
- } else {
- grp_cnrlbox.btn_prepage.enable = true;
- grp_cnrlbox.btn_postpage.enable = true;
- }
- }
- }
- function fPrint(prntflag)
- {
- // CLIP 전자 동의서 분기 처리
-
- if (CLIP_FLAG) {
-
- var objArg = new Object();
-
- objArg.arg_ds_para = ds_para_clip;
-
- frmf_modal("SPMRF04601", "SPMRF04601", objArg, false, 1, "", "", 350, 70, "", "", "", "P");
-
- return;
- }
-
- var insyn;
- var existyn;
- var ocrDataCnt = ds_pageinfo.getColumn(0,"ocrdatacnt");
- var currentpage = ds_pageinfo.getColumn(0,"currentpage");
- var prntcnt = 1;
- var succ_Prnt = false;
- var save_ocrtag = "";
- var doubyn = ds_main_ocrinfo.getColumn(0,"doubyn");
- if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
- parent.parent.group2.btn_prnt.enable = false;
- }
-
- //이윤주 수정 20160912 formtypecls=6 인경우는 이미지만 출력
- var formtypecls = ds_main_forminfo.getColumn(0,"formtypecls");
- if (formtypecls == "6") {
- fPrintOCR();
- return;
- }
-
- if((prntflag == 'A') || (prntflag == 'P')){
-
- ds_main_temp_ocrtag.setColumn(0,"tag", "+" + ds_main_ocrtag.getColumn(0,"tag") + "+" );
-
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
-
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
-
- if(ocrDataCnt > 0){
- if(prntflag == 'P'){
-
- for(var doubcnt = 1; doubcnt <= doubyn; doubcnt++){
- if(doubcnt == 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- //--Yoo fSetBarCode();
- // 20090715 OCRTAG 출력여부 값에 따른 수정
- if(ds_main_forminfo.getColumn(0,"ocrtagprntyn") == "N"){
- fOCRReplace("");
- } else {
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
- }
- } else {
-
- fOCRReplace("[환자 보관용]");
- }
- grp_cnrlbox.opt_pagecnt.value = currentpage + "/" + ocrDataCnt;
- succ_Prnt = fPrintOCR();
- }
- } else if (prntflag == 'A'){ // 재출력
- for(var doubcnt = 1; doubcnt <= doubyn; doubcnt++){
- for(prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++){
- ds_pageinfo.setColumn(0,"doubcnt", doubcnt);
- //--Yoo fMovePage('1');
- // 2009-07-27 nj OCT TYPE5 버전 수정
- if(prntcnt != 1){
- ds_pageinfo.setColumn(0,"currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
-
- if(doubcnt != 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- }
- else
- {
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
- }
- } else {
- ds_pageinfo.setColumn(0,"currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
-
- if(doubcnt != 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- }
- else
- {
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0,"tag"));
- }
- }
- ds_pageinfo.setColumn(0,"currentpage", prntcnt);
- }
- succ_Prnt = fPrintOCR();
- }
- }
- }
- if(succ_Prnt){
- } else {
- sysf_messageBox("출력을", "E009");
- return;
- }
- } else{
- var n_ocrtag;
- n_ocrtag = fmakeOCRTag()
- fOCRReplace(n_ocrtag);
- //fBarcodeCheck에서 fOCRReplace를 실행한다.
- //fOCRReplace(n_ocrtag);
- fBarcodeCheck(n_ocrtag);
- // 이력관련해서 저장후 출력으로 임시수정(20090225)
- //fSaveOCR();
- //--Yoo fMovePage('1');
- save_ocrtag = fSaveOCR();
- insyn = ds_hiddden_insocrtag.getColumn(0,"insyn");
- if(insyn == "Y"){
- if(ocrDataCnt > 0){
- for(var doubcnt = 1; doubcnt <= doubyn; doubcnt++){
- for(prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++){
- ds_pageinfo.setColumn(0,"doubcnt", doubcnt);
- //--Yoo fMovePage('1');
- // 2009-07-27 nj OCT TYPE5 버전 수정
- if(prntcnt != 1){
- ds_pageinfo.setColumn(0,"currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
- //--Yoo fSetBottomInfo();
- if(doubcnt != 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- }
- } else {
- ds_pageinfo.setColumn(0,"currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0,"currentpage") + "/" + ds_pageinfo.getColumn(0,"ocrdatacnt");
-
- if(doubcnt!= 1){ // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- }
- }
-
- }
-
- if (gocrprntyn == "Y") {
- succ_Prnt = fPrintOCR();
- }
- else {
- succ_Prnt = "Y"; //하드코드에 등록된 과는 실제 출력하지 않는다
- }
-
- }
- }
- }
- else
- {
- sysf_messageBox("출력(OCR)을", "E009");
- return;
- }
-
- if(succ_Prnt){
- // 이력관련해서 저장후 출력으로 임시수정(20090225)
- insyn =ds_hiddden_insocrtag.getColumn(0,"insyn");
- if(insyn == "Y"){
- } else if(insyn != "Y"){
- sysf_messageBox("저장을", "E009");
- return;
- }
- } else {
- sysf_messageBox("출력을", "E009");
- return;
- }
-
- }
- ds_pageinfo.setColumn(0,"doubcnt", "1");
- ds_pageinfo.setColumn(0,"currentpage", "1");
- ds_main.setColumn(0,"iptdiaghngnm", "");
- return save_ocrtag;
- }
- // dbs227 의무기록실 사용자 LC, 클립소프트 구분 출력 기능
- function fPrintDebug(prntflag, debugMode) {
- // CLIP 전자 동의서 분기 처리
- if (debugMode) {
- var objArg = new Object();
- objArg.arg_ds_para = ds_para_clip;
- frmf_modal("SPMRF04601", "SPMRF04601", objArg, false, 1, "", "", 350, 70, "", "", "", "P");
- return;
- }
- var insyn;
- var existyn;
- var ocrDataCnt = ds_pageinfo.getColumn(0, "ocrdatacnt");
- var currentpage = ds_pageinfo.getColumn(0, "currentpage");
- var prntcnt = 1;
- var succ_Prnt = false;
- var save_ocrtag = "";
- var doubyn = ds_main_ocrinfo.getColumn(0, "doubyn");
- if (ds_hidden.getColumn(0, "parentflag") == "PRNT") {
- parent.parent.group2.btn_prnt.enable = false;
- }
- //이윤주 수정 20160912 formtypecls=6 인경우는 이미지만 출력
- var formtypecls = ds_main_forminfo.getColumn(0, "formtypecls");
- if (formtypecls == "6") {
- fPrintOCR();
- return;
- }
- if ((prntflag == 'A') || (prntflag == 'P')) {
- ds_main_temp_ocrtag.setColumn(0, "tag", "+" + ds_main_ocrtag.getColumn(0, "tag") + "+");
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
- if (ocrDataCnt > 0) {
- if (prntflag == 'P') {
- for (var doubcnt = 1; doubcnt <= doubyn; doubcnt++) {
- if (doubcnt == 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- //--Yoo fSetBarCode();
- // 20090715 OCRTAG 출력여부 값에 따른 수정
- if (ds_main_forminfo.getColumn(0, "ocrtagprntyn") == "N") {
- fOCRReplace("");
- } else {
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
- }
- } else {
- fOCRReplace("[환자 보관용]");
- }
- grp_cnrlbox.opt_pagecnt.value = currentpage + "/" + ocrDataCnt;
- succ_Prnt = fPrintOCR();
- }
- } else if (prntflag == 'A') { // 재출력
- for (var doubcnt = 1; doubcnt <= doubyn; doubcnt++) {
- for (prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++) {
- ds_pageinfo.setColumn(0, "doubcnt", doubcnt);
- //--Yoo fMovePage('1');
- // 2009-07-27 nj OCT TYPE5 버전 수정
- if (prntcnt != 1) {
- ds_pageinfo.setColumn(0, "currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
- if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- } else {
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
- }
- } else {
- ds_pageinfo.setColumn(0, "currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
- if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- } else {
- fOCRReplace(ds_main_temp_ocrtag.getColumn(0, "tag"));
- }
- }
- ds_pageinfo.setColumn(0, "currentpage", prntcnt);
- }
- succ_Prnt = fPrintOCR();
- }
- }
- }
- if (succ_Prnt) {} else {
- sysf_messageBox("출력을", "E009");
- return;
- }
- } else {
- var n_ocrtag;
- n_ocrtag = fmakeOCRTag()
- fOCRReplace(n_ocrtag);
- //fBarcodeCheck에서 fOCRReplace를 실행한다.
- //fOCRReplace(n_ocrtag);
- fBarcodeCheck(n_ocrtag);
- // 이력관련해서 저장후 출력으로 임시수정(20090225)
- //fSaveOCR();
- //--Yoo fMovePage('1');
- save_ocrtag = fSaveOCR();
- insyn = ds_hiddden_insocrtag.getColumn(0, "insyn");
- if (insyn == "Y") {
- if (ocrDataCnt > 0) {
- for (var doubcnt = 1; doubcnt <= doubyn; doubcnt++) {
- for (prntcnt = 1; prntcnt <= ocrDataCnt; prntcnt++) {
- ds_pageinfo.setColumn(0, "doubcnt", doubcnt);
- //--Yoo fMovePage('1');
- // 2009-07-27 nj OCT TYPE5 버전 수정
- if (prntcnt != 1) {
- ds_pageinfo.setColumn(0, "currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
- //--Yoo fSetBottomInfo();
- if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- }
- } else {
- ds_pageinfo.setColumn(0, "currentpage", prntcnt);
- grp_cnrlbox.opt_pagecnt.value = ds_pageinfo.getColumn(0, "currentpage") + "/" + ds_pageinfo.getColumn(0, "ocrdatacnt");
- if (doubcnt != 1) { // 2008-08-31 환자용 출력시 바코드 정보는 출력하지 않는다
- fOCRReplace("[환자 보관용]");
- }
- }
- }
- if (gocrprntyn == "Y") {
- succ_Prnt = fPrintOCR();
- } else {
- succ_Prnt = "Y"; //하드코드에 등록된 과는 실제 출력하지 않는다
- }
- }
- }
- } else {
- sysf_messageBox("출력(OCR)을", "E009");
- return;
- }
- if (succ_Prnt) {
- // 이력관련해서 저장후 출력으로 임시수정(20090225)
- insyn = ds_hiddden_insocrtag.getColumn(0, "insyn");
- if (insyn == "Y") {} else if (insyn != "Y") {
- sysf_messageBox("저장을", "E009");
- return;
- }
- } else {
- sysf_messageBox("출력을", "E009");
- return;
- }
- }
- ds_pageinfo.setColumn(0, "doubcnt", "1");
- ds_pageinfo.setColumn(0, "currentpage", "1");
- ds_main.setColumn(0, "iptdiaghngnm", "");
- return save_ocrtag;
- }
- function fOCRReplace(OCRno)
- {
- var formtypecls = ds_main_forminfo.getColumn(0, "formtypecls");
-
- ds_main.setColumn(0,"exist", "N")
- ds_hidden.getColumn(0,"parentflag")
- if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
- if(parent.parent.group2.swt_ocrinfoflag.tabindex == 2){
- parent.parent.group2.btn_prnt.enable = false;
- } else {
- var parentauth = parent.parent.frmf_getScreenAuth();
- if(parentauth.charAt(1) == '1'){ //20100727-kys-실행권한이 있을시에만 disable변경처리.(요청번호 : 11292)
- parent.parent.group2.btn_prnt.enable = true;
- }
- }
- }
- if(OCRno != ""){
- OCRno = OCRno.replace("+","");
- OCRno = OCRno.replace("+","");
- OCRno = OCRno.replace("+","");
- OCRno = OCRno.replace("+","");
- OCRno = OCRno.replace("+","");
- OCRno = OCRno.replace("+","");
-
- ds_main_ocrtag.setColumn(0,"tag", OCRno);
- }
-
- // [요청번호:20190103016] 퇴원(퇴소)사실 통지서 출력시 프린트물 용도 변경.
- if( this.objects["ds_data_doubtitlelist"] == null ){
- dsf_createDs("ds_data_doubtitlelist");
- }
- lf_getHardCDList("N", 6938, null, ds_data_doubtitlelist);
- var nFormcd = ds_main_forminfo.getColumn(0, "formcd");
- var nChngTitle = OCRno == "[환자 보관용]" ? ds_data_doubtitlelist.lookup("hardcd", nFormcd, "hardcdnm") : "";
-
-
- for(var i = 1; i <= f_View.PageTotal; i++){
- //[2012.04.27 기관코드 추가 ]
- var pInstcd = "";
- if (isValidObject("ds_main_ordinfo")){
- pInstcd = ds_main_ordinfo.getColumn(0,"instcd");
- }
- if(pInstcd ==""){
- pInstcd = sysf_getUserInfo("dutplceinstcd");
- }
- var OCR = "";
- if( !utlf_isNull(nChngTitle) ){
- OCR = "+" + nChngTitle + "+";
- }else{
- OCR = "+" + OCRno + "+";
- }
-
- var r = fso.OpenTextFile(gv_ImgeSavePath + "chart" + i + ".html", 1,false, -1)
- var databuffer = "";
- var trans ="";
- while (!r.AtEndOfStream)
- {
- databuffer = r.ReadLine();
- if(databuffer.substr(1, 10) == "@VAR_OCR_L"){
- databuffer = " @VAR_OCR_LEFT = " + OCR
- }
- if(databuffer.substr(1, 10) == "@VAR_OCR_R"){
- if(OCRno == "[환자 보관용]")
- {
- databuffer = " @VAR_OCR_RIGHT = "
- }
- else
- {
- databuffer = " @VAR_OCR_RIGHT = " + OCR
- }
-
- }
- if( formtypecls != "6" ){
- if(databuffer.substr(1, 18) == "@VAR_PRINT_BARCODE"){
- if( !utlf_isNull(nChngTitle) ){
- databuffer = " @VAR_PRINT_BARCODE = ";
- }else{
- databuffer = " @VAR_PRINT_BARCODE = *" + OCRno + "0" + i + "*";
- }
- }
- }
- trans += databuffer + "\n";
-
- }
-
- r.Close();
-
- var a = fso.CreateTextFile(gv_ImgeSavePath + "chart" + i + ".html", true, true);
- a.WriteLine(trans);
- a.Close();
-
- f_View.ActionParamINT1 = i;
- f_View.ActionSingle = 1;
- }
-
-
- }
- /****************************************************************************************
- * Description : OCR 테그 생성
- * Argument : N/A
- * retrun type : N/A
- * Creator : (SSMRC03160_LC_ADMIN MRF03800.xjs 제거로 fmakeOCRTag 복사함 로직수정시 동일하게 수정 필요)
- ****************************************************************************************/
- function fmakeOCRTag(){
- /*
- OCRTag는 일련번호를 사용하기로함.
- 일시+일련번호 사용
- */
- var ocrtag = null;
- var tmptag;
- var prntocrtag = "";
-
- ds_main_ocrtag.setColumn(0, "tag", "");
- ds_send_reqdata.setColumn(0,"date", utlf_getCurrentDate());
- var oParam = {};
- oParam.id = "TRMRF03806";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqGetOCRSeq";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_ocrtag_seq=ocrtagseq";
- oParam.async = false;
- //oParam.callback = "cf_TRMRF03806";
- tranf_submit(oParam);
-
- ocrtag = utlf_getCurrentDate() + ds_main_ocrtag_seq.getColumn(0,"seq");
- for(var i = 0; i <= ocrtag.length; i++){
- tmptag = ocrtag.substring(i, i+1);
- if(i == ocrtag.length){
- break;
- }
- // 글자 사이의 공백을 제거
- // prntocrtag = prntocrtag + tmptag.concat(" ");
- prntocrtag = prntocrtag + tmptag;
- }
- ds_main_ocrtag.setColumn(0,"tag", prntocrtag);
- ds_main_temp_ocrtag.setColumn(0,"tag", "+"+prntocrtag+"+")
- ds_send_reqdata.setColumn(0,"date", "");
- return ds_main_temp_ocrtag.getColumn(0,"tag");
- }
- function fBarcodeCheck(OCRno)
- {
- var chkFlag = false;
-
- while(chkFlag == false){
-
- var j = 0;
- var k = 0;
-
- fOCRReplace(OCRno);
-
- j = j + 1;
-
- //바코드 체크
- for(var i = 1; i <= f_View.PageTotal ; i++){
-
- var r = fso.OpenTextFile(gv_ImgeSavePath + "chart" + i + ".html", 1, false, -1)
- var databuffer = "";
-
- while (!r.AtEndOfStream)
- {
- databuffer = r.ReadLine();
-
- if(databuffer.substr(1, 18) == "@VAR_PRINT_BARCODE"){
- if ( databuffer.indexOf("+") == -1 ) {
- k = k + 1;
- }
- }
-
- if (i == k) {
- chkFlag = true;
- }
-
- if (j >= 30 ) {
- chkFlag = true;
- }
-
- }
-
- r.Close();
- }
-
- if( chkFlag == false ) {
- //이윤주(LCTECH 요청-20130414)
- //pause(j * 1000);
- ds_send_reqdata.setColumn(0,"ocrtag", OCRno);
- ds_send_reqdata.setColumn(0,"ipaddr", sysf_getUserInfo("ipaddr"));
- ds_send_reqdata.setColumn(0,"instrid", sysf_getUserInfo("userid"));
- var oParam = {};
- oParam.id = "TXMRF03806";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqInsOcrLog";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_log_ocrtag=ocrinfo";
- oParam.async = false;
- oParam.callback = "cf_TXMRF03806";
- tranf_submit(oParam);
- if(arErrorCode.pop("TXMRF03806") > -1){
- ds_send_reqdata.clearData();
- ds_send_reqdata.addRow();
- return true;
- }
-
- }
-
- }
- }
- function cf_TXMRF03806(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function fSaveOCR(){
- var savepath = this.objects["ds_send_reqdata"];
-
- savepath.setColumn(0, "ocrtag", ds_main_ocrtag.getColumn(0,"tag"));
- savepath.setColumn(0, "pid", ds_main_patinfo.getColumn(0,"pid"));
- savepath.setColumn(0, "orddd", ds_main_patinfo.getColumn(0,"orddd"));
- savepath.setColumn(0, "cretno", ds_main_patinfo.getColumn(0,"cretno"));
- savepath.setColumn(0, "ordtype", ds_main_patinfo.getColumn(0,"ordtype"));
- savepath.setColumn(0, "orddeptcd", ds_main_patinfo.getColumn(0,"orddeptcd"));
- savepath.setColumn(0, "orddrid", ds_main_patinfo.getColumn(0,"drid"));
- savepath.setColumn(0, "instcd", sysf_getUserInfo("dutplceinstcd"));
-
- savepath.setColumn(0, "formcd", ds_main_ocrinfo.getColumn(0,"ocrformcd"));
- savepath.setColumn(0, "formfromdt", ds_main_ocrinfo.getColumn(0,"ocrformfromdt"));
- savepath.setColumn(0, "fstprntdt", utlf_getCurrentDate()+utlf_getCurrentTime());
- savepath.setColumn(0, "fstprntdeptcd", sysf_getUserInfo("dutplcecd"));
- savepath.setColumn(0, "fstprntid", sysf_getUserInfo("userid"));
- savepath.setColumn(0, "updtdt", utlf_getCurrentDate()+utlf_getCurrentTime());
- savepath.setColumn(0, "updtdeptcd", sysf_getUserInfo("dutplcecd"));
- savepath.setColumn(0, "updtuserid", sysf_getUserInfo("userid"));
-
- savepath.setColumn(0, "diagnm", ds_main_diaginfo.getColumn(0,"diaghngnm"));
- //savepath.setColumn(0, "opnm", ds_main_opinfo.getColumn(0,"ophngnm"));
- savepath.setColumn(0, "pagecnt", ds_pageinfo.getColumn(0,"ocrdatacnt"));
-
- if (gocrprntyn == "N") {
- savepath.setColumn(0, "updtresncnts", "실제 출력은 하지 않음");
- savepath.setColumn(0, "realprntyn", "N");
- }
-
- //sysf_trace(ds_send_reqdata.saveXML());
-
- // dsf_makeValue(ds_send_reqdata,"formcd","string","");
- // dsf_makeValue(ds_send_reqdata,"formfromdt","string","");
- // dsf_makeValue(ds_send_reqdata,"diagnm","string","");
- // dsf_makeValue(ds_send_reqdata,"opnm","string","");
-
- var oParam = {};
- oParam.id = "TXMRF03805";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqInsOcrPrntInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_hiddden_insocrtag=ocrprntlnfo";
- oParam.async = false;
- oParam.callback = "cf_TXMRF03805";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXMRF03805") > -1){
- return ds_main_ocrtag.getColumn(0, "tag");
- }
- }
- function cf_TXMRF03805(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- function fPrintOCR()
- {
- try{
- var i;
- f_print.DocumentBegin(f_View.PageTotal+"_"+"OCRPrint");
- for(i = 1; i <= f_View.PageTotal; i++)
- {
- f_print.PageBegin();
- 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);
- f_print.PageEnd();
- }
- f_print.DocumentEnd();
- ds_main.setColumn(0,"exist", "N");
- if(ds_hidden.getColumn(0,"parentflag") == "PRNT"){
- if(parent.parent.group2.swt_ocrinfoflag.tabindex == 2){
- parent.parent.group2.btn_prnt.enable = false;
- } else {
- var parentauth = parent.parent.frmf_getScreenAuth();
- if(parentauth.toString().charAt(1) == '1'){ //20100727-kys-실행권한이 있을시에만 disable변경처리.(요청번호 : 11292)
- parent.parent.group2.btn_prnt.enable = true;
- }
- }
- }
- return true;
- }
- catch(e){
- return false;
- }
- }
- function pause(numberMillis) {
-
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
-
- }
- }
- function fBarCodeReplace(OCRno)
- {
-
- for(var i = 1; i <= f_View.Pagetotal ; i++){
- var OCR = "";
- OCR = OCRno
- OCR = OCR.replace("+","");
- OCR = OCR.replace("+","");
- OCR = OCR.replace("+","");
- OCR = OCR.replace("+","");
- OCR = OCR.replace("+","");
- OCR = OCR.replace("+","");
- var r = fso.OpenTextFile(gv_ImgeSavePath + "chart" + i + ".html", 1,false, -1)
- var databuffer = "";
- var trans ="";
-
- while (!r.AtEndOfStream)
- {
-
- databuffer = r.ReadLine();
-
- if(databuffer.substr(1, 18) == "@VAR_PRINT_BARCODE"){
- OCR = OCR.replace("+","*");
- OCR = OCR.replace("+","*");
- databuffer = " @VAR_PRINT_BARCODE = " + "*" + OCR + "0" + i + "*"
- }
-
- trans += databuffer + "\n";
-
- }
-
- r.Close();
-
- var a = fso.CreateTextFile(gv_ImgeSavePath + "chart" + i + ".html", true, true);
- a.WriteLine(trans);
- a.Close();
-
- f_View.ActionParamINT1 = i;
- f_View.ActionSingle = 1;
- }
-
-
- }
- /**
- * @desc : 환자 정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetPatInfo(formcd, pid, orddd, cretno, ordtype){
- var pidinfo = "";
- var patnminfo = "";
- var orddept = "";
- var drinfo = "";
- var sainfo = "";
- var inroomcd = "";
- var prnt_patnminfo = "";
- var tmp_patnminfo = "";
- var getdate = "";
-
- if(ds_hidden.getColumn(0,"parentflag") == "ETC"){
- pidinfo = ds_main_patinfo.getColumn(0,"pid");
- patnminfo = ds_main_patinfo.getColumn(0,"patnm");
- orddept = ds_main_patinfo.getColumn(0,"deptn");
- drinfo = ds_main_patinfo.getColumn(0,"drnm");
- sainfo = ds_main_patinfo.getColumn(0,"sa");
-
- model.makeValue("/root/main/patinfo/items/rrgstno", model.getValue("/root/main/patinfo/items/rrgstno"));
- model.makeValue("/root/main/patinfo/items/centcd", model.getValue("/root/main/patinfo/items/centcd"));
- model.makeValue("/root/main/patinfo/items/centnm", model.getValue("/root/main/patinfo/items/centnm"));
- model.makeValue("/root/main/patinfo/items/centengabbr", model.getValue("/root/main/patinfo/items/centengabbr"));
- } else if (model.getValue("/root/hidden/parentflag") == "PRNT"){
- pidinfo = parent.model.getValue("/root/main/ordinfo/pid");
- patnminfo = parent.model.getValue("/root/main/ordinfo/patnm");
- orddept = parent.model.getValue("/root/main/ordinfo/orddeptnm");
- drinfo = parent.model.getValue("/root/main/ordinfo/drnm");
- sainfo = parent.model.getValue("/root/main/ordinfo/sa");
- model.makeValue("/root/main/patinfo/items/pid", parent.model.getValue("/root/main/ordinfo/pid"));
- model.makeValue("/root/main/patinfo/items/orddd", parent.model.getValue("/root/main/ordinfo/orddd"));
- model.makeValue("/root/main/patinfo/items/ordtype", parent.model.getValue("/root/main/ordinfo/ordtype"));
- model.makeValue("/root/main/patinfo/items/orddeptcd", parent.model.getValue("/root/main/ordinfo/orddeptcd"));
- model.makeValue("/root/main/patinfo/items/patnm", parent.model.getValue("/root/main/ordinfo/patnm"));
- model.makeValue("/root/main/patinfo/items/orddeptnm", parent.model.getValue("/root/main/ordinfo/orddeptnm"));
- model.makeValue("/root/main/patinfo/items/drid", parent.model.getValue("/root/main/ordinfo/drid"));
- model.makeValue("/root/main/patinfo/items/drnm", parent.model.getValue("/root/main/ordinfo/drnm"));
- model.makeValue("/root/main/patinfo/items/sa", parent.model.getValue("/root/main/ordinfo/sa"));
- model.makeValue("/root/main/patinfo/items/inroomcd", parent.model.getValue("/root/main/ordinfo/inroomcd"));
- model.makeValue("/root/main/patinfo/items/cretno", parent.model.getValue("/root/main/ordinfo/cretno"));
- model.makeValue("/root/main/patinfo/items/rrgstno", parent.model.getValue("/root/main/ordinfo/rrgstno"));
-
- model.makeValue("/root/main/patinfo/items/centcd", parent.model.getValue("/root/main/ordinfo/centcd"));
- model.makeValue("/root/main/patinfo/items/centnm", parent.model.getValue("/root/main/ordinfo/centnm"));
- model.makeValue("/root/main/patinfo/items/centengabbr", parent.model.getValue("/root/main/ordinfo/centengabbr"));
-
- }
- patnminf = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/patnm");
-
-
- // 병원별 등록번호 표시방법 여부(HardCode 테이블 이용) - 2009/06/01 추가
- mmbfGetHardCodeInfoNm("/root/send/harddata","/root/temp/hardcode", 3801); //OCR서식의 등록번호 체크로직 표시 여부
- var hardcd = model.getValue("/root/temp/hardcode/hardcd/hardcd");
-
- if (hardcd == "Y")
- {
- for(var i = pidinfo.length; i <= 8; i++){
- if(i < 8){
- pidinfo = "0"+pidinfo;
- }
- }
- var str1 = pidinfo.substr(0, 3);
- var str2 = pidinfo.substr(3, 2);
- var str3 = pidinfo.substr(5, 2);
- var str4 = pidinfo.substr(7, 1);
- pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
- obj_BCP.setParam("rgst_no", pidinfo);
- getdate = model.getValue("/root/main/patinfo/items/orddd");
-
-
- // 환자명 5자까리 수정
- if (patnminfo.length > 5 && patnminfo.length <= 10)
- {
- prnt_patnminfo = patnminfo
- }
- else if (patnminfo.length > 11)
- {
- prnt_patnminfo = patnminfo.substring(0, 10);
- }
- else
- {
- for(var i = 0; i <= patnminfo.length; i++){
- tmp_patnminfo = patnminfo.substring(i, i+1);
- if(i == patnminfo.length){
- break;
- }
- prnt_patnminfo = prnt_patnminfo + tmp_patnminfo.concat(" ");
- }
- }
- obj_BCP.setParam("pat_nm", prnt_patnminfo);
-
-
- model.makeValue("/root/send/reqdata/deptcd", model.getValue("/root/main/patinfo/items/orddeptcd"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/patinfo/items/orddd"));
-
- // 부서약어 가져오기
- submit("TRMRF03805");
- obj_BCP.setParam("orddept", model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("rrgstno", model.getValue("/root/main/patinfo/items/rrgstno"));
- obj_BCP.setParam("fromdd", getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2));
- // 2009.11.16. 현재 재원중인 병실정보 가져오기.. & 병실정보 출력하기..
- obj_BCP.setParam("inroomcd", "");
- var ordtype = model.getValue("/root/main/patinfo/items/ordtype");
- if (ordtype == 'I') {
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/patinfo/items/pid"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/patinfo/items/orddd"));
- model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/main/patinfo/items/cretno"));
- submit("TRMRF03809");
- var inroomcd = model.getValue("/root/main/inroominfo/inroomlist/roomcd");
- if (inroomcd != "False" && inroomcd != "" ) {
- //obj_BCP.setParam("inroomcd", "병실 : " + inroomcd);
- //lyj 2011/11/29
- obj_BCP.setParam("rgst_no", pidinfo +" ("+inroomcd+")");
-
- }
- }
- }
- /**
- * @desc : 타이틀 정보 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetTitle(){
- var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
- var arryformnm = getformnm.split("\n");
- var langflag = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/langflag");
- if(arryformnm.length == 2){
- obj_BCP.setParam("formnm1", arryformnm[0]);
- obj_BCP.setParam("formnm2", arryformnm[1]);
- } else if(arryformnm.length == 1){
- obj_BCP.setParam("formnm", arryformnm[0]);
- }
-
- //obj_BCP.setParam("centnm", "센터명 : " ); // + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
-
- switch(langflag){
- case "KO":
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- if(model.getValue("/root/main/ocrinfo/doubcnt") != "1"){
- obj_BCP.setParam("useflag", "[환자 보관용]");
- }
- break;
- case "EN":
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
- if(model.getValue("/root/main/ocrinfo/doubcnt") != "1"){
- obj_BCP.setParam("useflag", "\"" + "For Patient Use" + "\"");
- }
- break;
- default:
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- if(model.getValue("/root/main/ocrinfo/doubcnt") != "1"){
- obj_BCP.setParam("useflag", "[환자 보관용]");
- }
- break;
- }
- //obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/logo012.gif");
- }
- /**
- * @desc : OCR 테그 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- * 20090715 fSetOCRTag 파라메터 수정 fSetOCRTag(flag) - > fSetOCRTag(flag, ocrtagprntyn)
- */
- function fSetOCRTag(flag, ocrtagprntyn){
- var getocrtag;
- model.removeNodeset("/root/send/reqdata");
- //copyNodeset("/root/send/reqdata", "/root/main/patinfo/items");
- //model.makeValue("/root/send/reqdata/formcd", model.getValue("/root/main/ocrinfo/ocrlist/formcd"));
- //model.makeValue("/root/send/reqdata/formfromdt", model.getValue("/root/main/ocrinfo/ocrlist/formfromdt"));
- //submit("TRMRF03804");
- //getocrtag = model.getValue("/root/main/ocrinfo/ocrtag/tag");
- // 새로 OCRTag를 생성으로 바꿈.
- // 간호분만프로그램에서 환자가 두 명의 아이를 분만하였을 경우,
- // 각각 OCRTAG가 개별적으로 생성이 되어야 한다.
- // MRI 동의서 같은 경우 각각 동의서가 출력되어야 하고 OCRTAG도 각각 출력이 되어야 함.
- // 수정일 2007.12.10
- model.makeValue("/root/main/exist", "N");
- if(model.getValue("/root/hidden/parentflag") == "PRNT"){
- if(parent.swt_ocrinfoflag.selectedIndex == "1"){
- parent.btn_prnt.disabled = true;
- } else {
- var parentauth = parent.model.getValue("/root/properties/auth")
- if(parentauth.charAt(1) == '1'){ //20100727-kys-실행권한이 있을시에만 disable변경처리.(요청번호 : 11292)
- parent.btn_prnt.disabled = false;
- }
- }
- }
- if(flag != ""){
- // 20090715 ocrtag 출력구분 값으로 출력여부 판단 수정 nj
- // obj_BCP.setParam("ocrtag", "+"+flag+"+");
- if(ocrtagprntyn == "N"){
- obj_BCP.setParam("ocrtag", "");
- } else {
- obj_BCP.setParam("ocrtag", "+"+flag+"+");
- }
-
- model.makeValue("/root/main/ocrinfo/ocrtag/tag", flag);
- fSetBarCode();
- }
- /*
- if(getocrtag == ""){
- model.setValue("/root/main/exist", "N");
- if(model.getValue("/root/hidden/parentflag") == "PRNT"){
- parent.btn_prnt.disabled = false;
- }
- } else {
- model.setValue("/root/main/exist", "Y");
- obj_BCP.setParam("ocrtag", "+"+getocrtag);
- fSetBarCode();
- if(model.getValue("/root/hidden/parentflag") == "PRNT"){
- parent.btn_prnt.disabled = true;
- }
- }
- */
- obj_BCP.Refresh();
- }
- /**
- * @desc : 바코드 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetBarCode(){
- var barcode = "";
- var pageno = 0;
-
- barcode = model.getValue("/root/main/ocrinfo/ocrtag/tag");
- pageno = model.getValue("/root/main/ocrinfo/currentpage");
- if(pageno.length == 1){
- pageno = "0"+pageno;
- }
-
- obj_BCP.setParam("barcode", "*"+barcode+pageno+"*");
-
- }
- /**
- * @desc : 진단명 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetDiag(pid, orddd, cretno, ordtype){
- model.removeNodeset("/root/send/reqdata");
-
- if(model.getValue("/root/main/exist") == "Y"){
- // obj_BCP.setParam("tag_diagnm", "진단명");
- // obj_BCP.setParam("diagnm", model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm"));
- } else if(model.getValue("/root/main/exist") == "N" && model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm") == ""){
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/patinfo/items/pid"));
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/patinfo/items/orddd"));
- model.makeValue("/root/send/reqdata/cretno", model.getValue("/root/main/patinfo/items/cretno"));
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/patinfo/items/orddeptcd"));
- model.makeValue("/root/send/reqdata/ordtype", model.getValue("/root/main/patinfo/items/ordtype"));
-
- submit("TRMRF03807");
- // obj_BCP.setParam("tag_diagnm", "진단명")
- // obj_BCP.setParam("diagnm", model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm"));
- }
-
- obj_BCP.setParam("tag_diagnm", "진단명")
- obj_BCP.setParam("diagnm", model.getValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm"));
- obj_BCP.Refresh();
- }
- /**
- * @desc : 수술명 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetOp(pid, orddd, cretno, ordtype){
- obj_BCP.setParam("tag_opnm", "수술명");
- obj_BCP.setParam("tag_opnm1", "(처치/검사)");
- }
- /**
- * @desc : 하단정보(출력일시, 출력자, 페이지) 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetBottomInfo(){
- var getdate = getCurrentDate();
- var gettime = getCurrentTime();
- var getuser = getUserName();
- var getuseren = getUserInfo("userengnm");
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var timeprnt = gettime.substr(0, 2) + ":" + gettime.substr(2, 2) + ":" + gettime.substr(4, 2);
- var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
- var ipaddr = getUserInfo("ipaddr");
-
-
-
- switch(langflag){
- case "KO":
- obj_BCP.setParam("bottom_time", "출력일시 : " + dateprnt + " " + timeprnt);
- obj_BCP.setParam("bottom_user", "출력자 : " + getuser );
- obj_BCP.setParam("pagecnt", "페이지 : " + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
- break;
- case "EN":
- obj_BCP.setParam("bottom_time", "Print Date : " + dateprnt + " " + timeprnt);
- if((getuseren == null)||(getuseren == "")){
- obj_BCP.setParam("bottom_user", "Printed by : " + getuser);
- } else {
- // 영문동의서도 출력자는 한글명으로 표시되어야 함. 2008-09-17 김미선 선생님 요청
- obj_BCP.setParam("bottom_user", "Printed by : " + getuser);
- //obj_BCP.setParam("bottom_user", "Printed by : " + getuseren.substring(0, 7));
- }
- obj_BCP.setParam("pagecnt", "Page : " + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
- break;
- default:
- obj_BCP.setParam("bottom_time", "출력일시 : " + dateprnt + " " + timeprnt);
- obj_BCP.setParam("bottom_user", "출력자 : " + getuser);
- obj_BCP.setParam("pagecnt", "페이지 : " + model.getValue("/root/main/ocrinfo/currentpage") + "/" + model.getValue("/root/main/ocrinfo/ocrdatacnt"));
- break;
- }
-
- var centnm = model.getValue("/root/main/patinfo/items/centnm");
- //if (centnm != "")
- if (centnm != "False" && centnm != "" )
- {
- obj_BCP.setParam("centnm", "센터명 : " + centnm+'('+ipaddr+')');
- }
- else
- {
- obj_BCP.setParam("centnm", ipaddr);
- }
- }
- /**
- * @desc : 파일셋팅1
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- * 20090715 fSetInitFile1 파라메터 수정 fSetInitFile1(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile1(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
- */
- function fSetInitFile1(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
- obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype1.ini");
- fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
- if(model.getValue("/root/main/ocrinfo/doubcnt") == "1"){
- // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
- // 20090715 fSetOCRTag(ocrtag);
- fSetOCRTag(ocrtag, ocrtagprntyn);
- }
- fSetTitle();
- fSetDiag(pid, orddd, cretno, ordtype);
- fSetOp(pid, orddd, cretno, ordtype);
- fSetBottomInfo();
- }
- /**
- * @desc : 파일셋팅2
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- * 20090715 fSetInitFile2 파라메터 수정 fSetInitFile2(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile2(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
- */
- function fSetInitFile2(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
- obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype2.ini");
- fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
- if(model.getValue("/root/main/ocrinfo/doubcnt") == "1"){
- // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
- // 20090715 fSetOCRTag(ocrtag);
- fSetOCRTag(ocrtag, ocrtagprntyn);
- }
- fSetTitle();
- fSetDiag(pid, orddd, cretno, ordtype);
- fSetBottomInfo();
- }
- /**
- * @desc : 파일셋팅3
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- * 20090715 fSetInitFile3 파라메터 수정 fSetInitFile3(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile3(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
- */
- function fSetInitFile3(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
- obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype3.ini");
- fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
- if(model.getValue("/root/main/ocrinfo/doubcnt") == "1"){
- // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
- // 20090715 fSetOCRTag(ocrtag);
- fSetOCRTag(ocrtag, ocrtagprntyn);
- }
- fSetTitle();
- fSetBottomInfo();
- }
- /**
- * @desc : 파일셋팅4
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- * 20090715 fSetInitFile4 파라메터 수정 fSetInitFile4(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile4(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
- */
- function fSetInitFile4(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
- obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype4.ini");
- fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
- if(model.getValue("/root/main/ocrinfo/doubcnt") == 1){
- // 20090715 fSetOCRTag 호출시 OCRTAG 출력에 여부에 따른 파라메터 추가로 넘김 nj
- // 20090715 fSetOCRTag(ocrtag);
- fSetOCRTag(ocrtag, ocrtagprntyn);
- }
- fSetTitle();
- fSetBottomInfo();
- }
- /**
- * @desc : 파일셋팅5
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- * 20090715 fSetInitFile5 파라메터 수정 fSetInitFile5(formcd, pid, orddd, cretno, ordtype, ocrtag) - > fSetInitFile5(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn) nj
- */
- function fSetInitFile5(formcd, pid, orddd, cretno, ordtype, ocrtag, ocrtagprntyn){
- obj_BCP.LoadChart(gv_BCPINIPath+"set_ocrtype5.ini");
- fSetPatInfo(formcd, pid, orddd, cretno, ordtype);
- // 2009-07-27 nj 추가
- var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
- // formprntnm으로 출력명 변경
- var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
- var arryformnm = getformnm.split("\n");
- if(arryformnm.length == 2){
- obj_BCP.setParam("formnm1", arryformnm[0]);
- obj_BCP.setParam("formnm2", arryformnm[1]);
- } else if(arryformnm.length == 1){
- obj_BCP.setParam("formnm", arryformnm[0]);
- }
-
- fSetOCRTag(ocrtag, ocrtagprntyn);
- switch(langflag){
- case "KO":
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- break;
- case "EN":
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
- break;
- default:
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- break;
- }
- fSetBottomInfo();
- }
- /**
- * @desc : 진단명이나 opnm 셋팅
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetDiagOpnm(){
- var iptflag = ds_main.getColumn(0, "iptnmflag");
-
- if(iptflag == "diagnm") {
- //obj_BCP.setParam("diagnm", model.getValue("/root/main/iptdiaghngnm"));
- model.makeValue("/root/main/ocrinfo/ocrtag/diaginfo/diagengnm", model.getValue("/root/main/iptdiaghngnm"));
- } else if(iptflag == "opnm") {
- //obj_BCP.setParam("opnm", model.getValue("/root/main/iptdiaghngnm"));
- model.makeValue("/root/main/ocrinfo/ocrtag/opinfo/opengnm", model.getValue("/root/main/iptdiaghngnm"));
- }
- //obj_BCP.Refresh();
- }
- /**
- * @desc : OCR 서식 병원 보관용 Default 정보 출력
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetDefault(){
- var getdate = model.getValue("/root/main/patinfo/items/orddd");
- // Default page 출력명칭 으로 수정
- // var getformnm = model.getValue("/root/main/ocrinfo/ocrlist/formnm");
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var pidinfo = model.getValue("/root/main/patinfo/items/pid");
- var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
- // formprntnm으로 출력명 변경
- var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
- var arryformnm = getformnm.split("\n");
- if(arryformnm.length == 2){
- obj_BCP.setParam("formnm1", arryformnm[0]);
- obj_BCP.setParam("formnm2", arryformnm[1]);
- } else if(arryformnm.length == 1){
- obj_BCP.setParam("formnm", arryformnm[0]);
- }
-
- // 병원별 등록번호 표시방법 여부(HardCode 테이블 이용) - 2009/06/01 추가
- mmbfGetHardCodeInfoNm("/root/send/harddata","/root/temp/hardcode", 3801); //OCR서식의 등록번호 체크로직 표시 여부
- var hardcd = model.getValue("/root/temp/hardcode/hardcd/hardcd");
-
- if (hardcd == "Y")
- {
- for(var i = pidinfo.length; i <= 8; i++){
- if(i < 8){
- pidinfo = "0"+pidinfo;
- }
- }
- var str1 = pidinfo.substr(0, 3);
- var str2 = pidinfo.substr(3, 2);
- var str3 = pidinfo.substr(5, 2);
- var str4 = pidinfo.substr(7, 1);
- pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
-
- obj_BCP.setParam("rgst_no", pidinfo);
-
- // 환자명 5자로 짜르기
- var pat_nm = model.getValue("/root/main/patinfo/items/patnm");
-
- if (pat_nm.length > 10)
- {
- pat_nm = pat_nm.substr(0, 10);
- }
-
- //obj_BCP.setParam("pat_nm", model.getValue("/root/main/patinfo/items/patnm"));
- obj_BCP.setParam("pat_nm", pat_nm);
-
-
- // obj_BCP.setParam("formnm", getformnm);
- // 2009-07-27 OCRTAG 출력여부 수정
- if(model.getValue("/root/main/forminfo/ocrtagprntyn") == "N"){
- obj_BCP.setParam("ocrtag", "");
- } else {
- obj_BCP.setParam("ocrtag", model.getValue("/root/main/temp/ocrtag/tag"));
- }
- switch(langflag){
- case "KO":
- obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
- obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
- break;
- case "EN":
- obj_BCP.setParam("fromdd", "Date : " + dateprnt);
- obj_BCP.setParam("orddept", "Dept : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
- obj_BCP.setParam("rrgstno", "SN : " + model.getValue("/root/main/patinfo/items/rrgstno"));
- break;
- default:
- obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
- obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
- break;
- }
- }
- /**
- * @desc : OCR 서식 환자 보관용 Default 정보 출력
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSetDefaultPat(){
- var getdate = model.getValue("/root/main/patinfo/items/orddd");
- // Default page 출력명칭 으로 수정
- // var getformnm = model.getValue("/root/main/ocrinfo/ocrlist/formnm");
- var dateprnt = getdate.substr(0, 4) + "/" + getdate.substr(4, 2) + "/" + getdate.substr(6, 2);
- var pidinfo = model.getValue("/root/main/patinfo/items/pid");
- var langflag = model.getValue("/root/main/ocrinfo/ocrlist["+ 1 +"]/langflag");
-
- // formprntnm으로 출력명 변경
- var getformnm = model.getValue("/root/main/ocrinfo/ocrlist[" + 1 + "]/formprntnm");
- var arryformnm = getformnm.split("\n");
- if(arryformnm.length == 2){
- obj_BCP.setParam("formnm1", arryformnm[0]);
- obj_BCP.setParam("formnm2", arryformnm[1]);
- } else if(arryformnm.length == 1){
- obj_BCP.setParam("formnm", arryformnm[0]);
- }
-
- // 병원별 등록번호 표시방법 여부(HardCode 테이블 이용) - 2009/06/01 추가
- mmbfGetHardCodeInfoNm("/root/send/harddata","/root/temp/hardcode", 3801); //OCR서식의 등록번호 체크로직 표시 여부
- var hardcd = model.getValue("/root/temp/hardcode/hardcd/hardcd");
-
- if (hardcd == "Y")
- {
- for(var i = pidinfo.length; i <= 8; i++){
- if(i < 8){
- pidinfo = "0"+pidinfo;
- }
- }
- var str1 = pidinfo.substr(0, 3);
- var str2 = pidinfo.substr(3, 2);
- var str3 = pidinfo.substr(5, 2);
- var str4 = pidinfo.substr(7, 1);
- pidinfo = str1 + " " + str2 + " " + str3 + "-" + str4;
- }
-
- obj_BCP.setParam("rgst_no", pidinfo);
-
- // 환자명 5자로 짜르기
- var pat_nm = model.getValue("/root/main/patinfo/items/patnm");
-
- if (pat_nm.length > 10)
- {
- pat_nm = pat_nm.substr(0, 10);
- }
-
- //obj_BCP.setParam("pat_nm", model.getValue("/root/main/patinfo/items/patnm"));
- obj_BCP.setParam("pat_nm", pat_nm);
-
- // obj_BCP.setParam("formnm", getformnm);
-
- switch(langflag){
- case "KO":
- obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
- obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("useflag", "[환자 보관용]");
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
- break;
- case "EN":
- obj_BCP.setParam("fromdd", "Date : " + dateprnt);
- obj_BCP.setParam("orddept", "Dept : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("useflag", "\"" + "For Patient Use" + "\"");
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+"e.jpg");
- obj_BCP.setParam("rrgstno", "SN : " + model.getValue("/root/main/patinfo/items/rrgstno"));
- break;
- default:
- obj_BCP.setParam("fromdd", "진료일 : " + dateprnt);
- obj_BCP.setParam("orddept", "진료과 : " + model.getValue("/root/main/deptinfo/info/deptengabbr"));
- obj_BCP.setParam("useflag", "[환자 보관용]");
- obj_BCP.setParam("logo_imge", gv_Logo_ImgePath + "/biglogo"+getUserInfo("dutplceinstcd")+".jpg");
- obj_BCP.setParam("rrgstno", "주민등록번호: " + model.getValue("/root/main/patinfo/items/rrgstno"));
- break;
- }
- }
- /**
- * @desc : OCR 정보 저장
- *
- * @param :
- * @return :
- * @author : HIT EMR Team
- * @---------------------------------------------------
- */
- function fSaveOCRIF(ocrtag, pid, orddd, cretno, ordtype, orddeptcd, orddrid, formcd, formfromdt, diaghngnm, ophngnm, pagecnt, rtnyn){
-
-
- var objColInfo = new Array();
- objColInfo.push({col: "ocrtag", val: ocrtag});
- objColInfo.push({col: "pid", val: pid});
- objColInfo.push({col: "orddd", val: orddd});
- objColInfo.push({col: "cretno", val: cretno});
- objColInfo.push({col: "ordtype", val: ordtype});
- objColInfo.push({col: "orddeptcd", val: orddeptcd});
- objColInfo.push({col: "orddrid", val: orddrid});
- objColInfo.push({col: "instcd", val: sysf_getUserInfo("dutplceinstcd")});
- objColInfo.push({col: "formcd", val: formcd});
- objColInfo.push({col: "formfromdt", val: formfromdt});
- objColInfo.push({col: "fstprntdt", val: utlf_getCurrentDate()+ utlf_getCurrentTime()});
- objColInfo.push({col: "fstprntdeptcd", val: sysf_getUserInfo("dutplcecd")});
- objColInfo.push({col: "fstprntid", val: sysf_getUserInfo("userid")});
- objColInfo.push({col: "updtdt", val: utlf_getCurrentDate()+ utlf_getCurrentTime()});
- objColInfo.push({col: "updtdeptcd", val: sysf_getUserInfo("dutplcecd")});
- objColInfo.push({col: "updtuserid", val: sysf_getUserInfo("userid")});
- objColInfo.push({col: "diagnm", val: diaghngnm});
- objColInfo.push({col: "opnm", val: ophngnm});
- objColInfo.push({col: "pagecnt", val: pagecnt});
- dsf_createDsRow("ds_send_ocr_reqdata", objColInfo);
-
- var oParam = {};
- oParam.id = "TXMRF03805";
- oParam.service = "formmngtapp.OcrPreViewMngt";
- oParam.method = "reqInsOcrPrntInfo";
- oParam.inds = "req=ds_send_ocr_reqdata";
- oParam.outds = "ds_ocrprntlnfo=ocrprntlnfo";
- oParam.async = false;
- oParam.callback = "cf_TXMRF03805";
- tranf_submit(oParam);
-
-
-
- if (arErrorCode.pop("TXMRF03805") > -1){
-
- if(rtnyn == "Y"){ //hardcdno : 9950 자동반납관리
- sleep(1000);
- ds_send_ocr_reqdata.addColumn("barcode", "string", 256);
- ds_send_ocr_reqdata.addColumn("lstupdtdt", "string", 256);
- ds_send_ocr_reqdata.addColumn("lstupdtuserid", "string", 256);
- ds_send_ocr_reqdata.addColumn("lstupdtdeptcd", "string", 256);
- ds_send_ocr_reqdata.addColumn("updtresncnts", "string", 256);
- ds_send_ocr_reqdata.addColumn("statcd", "string", 256);
- ds_send_ocr_reqdata.addColumn("scanyn", "string", 256);
- ds_send_ocr_reqdata.addColumn("scancnt", "string", 256);
-
- ds_send_ocr_reqdata.setColumn(0, "barcode", ocrtag);
- ds_send_ocr_reqdata.setColumn(0, "ocrtag", ocrtag);
- ds_send_ocr_reqdata.setColumn(0, "updtdt", utlf_getCurrentDate()+ utlf_getCurrentTime());
- ds_send_ocr_reqdata.setColumn(0, "lstupdtdt", utlf_getCurrentDate()+ utlf_getCurrentTime());
- ds_send_ocr_reqdata.setColumn(0, "lstupdtuserid", sysf_getUserInfo("userid"));
- ds_send_ocr_reqdata.setColumn(0, "lstupdtdeptcd", sysf_getUserInfo("dutplcecd"));
- ds_send_ocr_reqdata.setColumn(0, "updtresncnts", "");
- ds_send_ocr_reqdata.setColumn(0, "statcd", "R");
- ds_send_ocr_reqdata.setColumn(0, "scanyn", "N");
- ds_send_ocr_reqdata.setColumn(0, "scancnt", "0");
-
-
- var oParam = {};
- oParam.id = "TXMRF02901";
- oParam.service = "formmngtapp.OcrRtnMngt";
- oParam.method = "reqSetRtnBarCode";
- oParam.inds = "req=ds_send_ocr_reqdata";
- oParam.outds = "ds_rtnlist=rtnlist ds_rtncnfmlist=rtncnfmlist";
- oParam.async = false;
- oParam.callback = "cf_TXMRF02901";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TXMRF02901") < 0){
- sysf_messageBox("자동반납저장을 실패하였습니다");
- }
- }
- ds_send_ocr_reqdata.clearData();
- return true;
- } else {
- ds_send_ocr_reqdata.clearData();
- return false;
- }
- }
- function cf_TXMRF03805(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
-
- }
- function cf_TXMRF02901(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- // 딜레이 function
- function sleep(msecs){
- var start =new Date().getTime();
- var cur=start;
- while(cur-start<msecs){
- cur=new Date().getTime();
- }
- }
- /**
- * @desc : 특정 동의서를 출력한다.
- *
- * @param :
- * @return :
- * @author : 김영학
- * @---------------------------------------------------
- */
- function fSpclOCRPrintInterface(formcd, cnts){
- var formtypecls = "";
- var ocrtagprntyn = "";
- var formfromddt = "";
- var calcscorcdList = "";
- var formcd_calc = "";
- var prcp_rtn = "";
- var node = getGlobalVariable("paminfo");
- setCSVToNode("/root/main/paminfo", node);
-
- model.makeValue("/root/send/reqdata/formcd", formcd);
- submit("TRMRF03810");
- for(var i = 1; i <= cnts; i++){
- pid = model.getValue("/root/main/paminfo/list/pid");
- orddd = model.getValue("/root/main/paminfo/list/orddd");
- cretno = model.getValue("/root/main/paminfo/list/cretno");
- ordtype = model.getValue("/root/main/paminfo/list/ordtype");
- orddrid = model.getValue("/root/main/paminfo/list/orddrid");
- orddeptcd = model.getValue("/root/main/paminfo/list/orddeptcd");
-
- formcd = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/formcd");
- formfromdt = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/formfromdt");
- formtypecls = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/formtypecls");
- ocrtagprntyn = model.getValue("/root/main/spclocrprntinfo/spclocrprntlist/ocrtagprntyn");
-
- fGetOCRInfo(formcd, pid, orddd, cretno, ordtype, formtypecls, ocrtagprntyn);
- var save_ocrtag = fPrint();
- }
-
- return prcp_rtn;
- }
- /**
- * @desc : 유전자검사동의서를 재출력한다.
- *
- * @param :
- * @return :
- * @author : 이윤주
- * @---------------------------------------------------
- */
- function fGenePrint(ocrtag,ordtype,formcd)
- {
- dsf_createDsRow("ds_cond_TRMRF03811", [{col:"ocrtag", type:"STRING", size:256, val:ocrtag}
- , {col:"ordtype", type:"STRING", size:256, val:ordtype}]);
- dsf_createDs("ds_data_TRMRF03811", [{col:"pid", type:"STRING", size:256}
- , {col:"patnm", type:"STRING", size:256}
- , {col:"rrgstno", type:"STRING", size:256}
- , {col:"proceryn", type:"STRING", size:256}
- , {col:"procernm", type:"STRING", size:256}
- , {col:"procerbrthdd", type:"STRING", size:256}
- , {col:"drnm", type:"STRING", size:256}
- , {col:"drbrthdd", type:"STRING", size:256}
- , {col:"testresn", type:"STRING", size:256}
- , {col:"stdyresn", type:"STRING", size:256}
- , {col:"spcproccd", type:"STRING", size:256}
- , {col:"spcpossntermcd", type:"STRING", size:256}
- , {col:"spcpossnterm", type:"STRING", size:256}
- , {col:"spcuseaprvyn", type:"STRING", size:256}
- , {col:"patinfouseyn", type:"STRING", size:256}
- , {col:"centcd", type:"STRING", size:256}
- , {col:"deptengabbr", type:"STRING", size:256}
- , {col:"orddd", type:"STRING", size:256}
- , {col:"roomcd", type:"STRING", size:256}
- , {col:"ocrtag", type:"STRING", size:256}
- , {col:"curdd", type:"STRING", size:256}
- , {col:"curtm", type:"STRING", size:256}
- , {col:"logurl", type:"STRING", size:256}
- , {col:"pattelno", type:"STRING", size:256}
- , {col:"pataddr", type:"STRING", size:256}
- , {col:"patsex", type:"STRING", size:256}
- , {col:"instnm", type:"STRING", size:256}
- , {col:"insttelno", type:"STRING", size:256}
- , {col:"pagenum", type:"STRING", size:256}
- , {col:"prcplist", type:"STRING", size:256}]);
-
-
- var oParam = {};
- oParam.id = "TRMMO21001";
- oParam.service = "prcpmngtapp.EtcPrcpMngt";
- oParam.method = "reqGetGeneinsptAgree";
- oParam.inds = "req=ds_cond_TRMRF03811";
- oParam.outds = "ds_data_TRMRF03811=geneunitlist";
- oParam.async = false;
- //oParam.callback = "cf_TRMMO21001";
- tranf_submit(oParam);
- // 유전자 동의서 : 1300014609 , 인체유래물 동의서 : 1000007185
- var nRexpertID = "";
- var objDOM = rptf_createDOM(); // DOM 객체 설정
- if(formcd == "1300014609"){
- rptf_setNodeListToDOM(objDOM, "/root/hidden/geneunitlist2", ds_data_TRMRF03811); // 데이터셋 1
- nRexpertID = "RPMMO21002";
- }else{
- rptf_setNodeListToDOM(objDOM, "/root/hidden/geneunitlist", ds_data_TRMRF03811); // 데이터셋 1
- nRexpertID = "RPMMO21001";
- }
-
- var objParam = new Object();
- objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
- var option = "open=1;save=1;directprint=1;printdialog=0;print=1;zoom=0";
-
- rptf_exeReportPreview30([nRexpertID],[objParam], option);
-
- dsf_deleteDs("ds_cond_TRMRF03811");
- dsf_deleteDs("ds_data_TRMRF03811");
- }
- function lf_isTmp(pid,orddd,cretno,formcd,ordtype,orddeptcd) {
-
- if (utlf_isNull(ordtype) || utlf_isNull(orddeptcd) ) {
-
- dsf_createDsRow("ds_send_req", [ {col:"pid", type:"string", size:256, val:pid}
- , {col:"orddd", type:"string", size:256, val:orddd}
- , {col:"formcd", type:"string", size:256, val:formcd.substring(0,10)}
- , {col:"cretno", type:"string", size:256, val:cretno}]);
- dsf_createDs("ds_rtn", [ {col:"ordtype", type:"string", size:256}
- ,{col:"orddrid", type:"string", size:256}
- ,{col:"wardcd", type:"string", size:256}
- ,{col:"myn", type:"string", size:256}
- ,{col:"prntonly", type:"string", size:256}
- ,{col:"orddeptcd", type:"string", size:256}]);
-
- var oParam = {};
- oParam.id = "reqGetPatSujinInfo_01";
- oParam.service = "formmngtapp.OcrPrntMngt";
- oParam.method = "reqGetPatSujinInfo";
- oParam.inds = "req=ds_send_req";
- oParam.outds = "ds_rtn=patinfo";
- oParam.async = false;
- oParam.callback = "";
- tranf_submit(oParam);
-
- ordtype = ds_rtn.getColumn(0,"ordtype");
- orddrid = ds_rtn.getColumn(0,"orddrid");
- wardcd = ds_rtn.getColumn(0,"wardcd");
- orddeptcd = ds_rtn.getColumn(0,"orddeptcd");
- var myn = ds_rtn.getColumn(0,"myn");
- var prntonly = ds_rtn.getColumn(0,"prntonly");
-
- dsf_deleteDs("ds_send_req");
- dsf_deleteDs("ds_rtn");
-
- }
-
-
- // 6954 [전자동의서]임시저장 SW
- // 6955 [전자동의서]임시저장 ordtype SW
- // 6956 [전자동의서]임시저장 예외병동
- // 6957 [전자동의서]임시저장 예외부서
- // 6958 [전자동의서]임시저장 예외의사
- // 6959 [전자동의서]임시저장 해당서식
- // 6960 [전자동의서]레몬 PC 전자동의서 호출IP + 듀얼 모드(C#)
- var acu_user = "N";
-
- // 아큐 사용이면서 레몬전자동의서 사용
- if (lf_ContainsHardCD("6950", "Y") && lf_ContainsHardCD("6951", sysf_getUserInfo("userid")) &&
- lf_ContainsHardCD("6952", formcd) && lf_ContainsHardCD("6960", sysf_getIPAddress())) {
- var acu_user = "Y";
- }
-
- if (lf_ContainsHardCD("6954", "Y")
- && lf_ContainsHardCD("6955", ordtype)
- && myn == "Y"
- && prntonly == "N"
- && acu_user == "N"
- && !lf_ContainsHardCD("6956", wardcd)
- && !lf_ContainsHardCD("6957", orddeptcd)
- && !lf_ContainsHardCD("6967", sysf_getUserInfo("dutplcecd"))
- && !lf_ContainsHardCD("6958", sysf_getUserInfo("userid"))) {
- return true;
- }
-
- return false;
- }]]></Script>
|