123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>진료일정 등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <schecretfromdd/>
- <schecrettodd/>
- <bfdatadel>Del</bfdatadel>
- <regltempflag/>
- <ordlist>
- <orddrfild>
- <orddrfildlist>
- <ordfild/>
- <fstexamrem/>
- <reexamrem/>
- <orddrid/>
- <orddeptcd/>
- <seqno/>
- <inetrsrvpossyn/>
- <internetinwon/>
- </orddrfildlist>
- </orddrfild>
- <ordschecrite>
- <ordschecritelist/>
- </ordschecrite>
- <ordschecritedetail>
- <ordschecritedetaillist/>
- </ordschecritedetail>
- </ordlist>
- <result/>
- <orddeptcd/>
- <selectedday>
- <mon/>
- <monampm/>
- <tue/>
- <tueampm/>
- <wed/>
- <wedampm/>
- <thu/>
- <thuampm/>
- <fri/>
- <friampm/>
- <sat/>
- <satampm/>
- </selectedday>
- <lastcretdd/>
- <ordschecrethist/>
- <ordschecretno/>
- <subdeptcd/>
- <holicheck>
- <biweeklycheck>
- <check/>
- </biweeklycheck>
- </holicheck>
- <biweekcheck>
- <fromdd/>
- <todd/>
- <orddrid/>
- <orddeptcd/>
- </biweekcheck>
- </main>
- <send>
- <orddeptcd/>
- <orddrid/>
- <dwcd/>
- <seqno/>
- <scheno/>
- <updatedata>
- <datalist/>
- </updatedata>
- <fromdwcd/>
- <fromampmflag/>
- <fromscheno/>
- <todwcd/>
- <toampmflag/>
- <toscheno/>
- <ordcretdegree/>
- <allyn/>
- </send>
- <init>
- <P0033list>
- </P0033list>
- <orddeptcd>
- <orddeptcdlist>
- <cd/>
- <nm/>
- </orddeptcdlist>
- </orddeptcd>
- <orddrid>
- <orddridlist>
- <cd/>
- <nm/>
- <dp/>
- <sp/>
- </orddridlist>
- </orddrid>
- <P0316list>
- </P0316list>
- <P0356list/>
- <ordschecrethist>
- <ordschecrethistlist/>
- </ordschecrethist>
- <P6590list/>
- </init>
- <hidden>
- <tmp/>
- <rCSV/>
- <drcheck/>
- <capacheck>
- <capachecklist>
- <cdid/>
- <cdnm/>
- </capachecklist>
- </capacheck>
- </hidden>
- <temp>
- <source>
- <orddeptcd/>
- <orddrid/>
- </source>
- <rCSV/>
- </temp>
- </root>
- </instance>
- <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
- <submission id="TRPMB00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordlist/ordschecritedetail"/>
- <submission id="TRPMB00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
- <submission id="TRPMB00703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
- <submission id="TXPMB00704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
- <submission id="TXPMB00705" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
- <submission id="TXPMB00706" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
- <submission id="TRPMB00707" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordlist/orddrfild"/>
- <submission id="TXPMB00708" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
- <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
- <submission id="TXPMB00709" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
- <submission id="TXPMB00710" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
- <submission id="TXPMB00711" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
- <submission id="TRPMB00712" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordlist"/>
- <submission id="TXPMB00713" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
- <submission id="TRPMB00714" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/biweekcheck" resultref="/root/main/holicheck"/>
- <submission id="TXPMB00715" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/biweekcheck" resultref="/root/main/result"/>
- <submission id="TRPMB00716" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/capacheck"/>
- <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
- <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- zbcfGetCodeList(new Array("P0033", "P0316", "P0356"), new Array("/root/init/P0033list", "/root/init/P0316list", "/root/init/P0356list"), true, new Array("cdid", ""), new Array("asc", "") );
-
- pamfGetCodeList(new Array("P6590"), new Array("/root/init/P6590list"));
-
- var menu = 'S'; //getScreenMenuParameter();
-
- fCapaCheck();
-
- /*
- var capacheckyn = model.getValue("/root/hidden/capacheck/capachecklist[cdid=10]/cdnm");
- var capano = model.getValue("/root/hidden/capacheck/capachecklist[cdid=20]/cdnm");
- // var cdid = model.getValue("/root/hidden/capacheck[cdid='" + 변수 +"']/cdnm");
- //var cdnm = model.getValue("/root/hidden/capacheck/cdnm");
-
- //model.alert(cdnm);
- */
- //menu = 'S'
- //팝업으로 열릴때 진료일정생성 버튼 비활성화
- if (menu != 'S'){ //팝업화면으로 사용될 때
-
- btn_search4.disabled = true;
- rdo_reglsche.visible = false;
- rdo_etcsche.visible = true;
-
- textarea1.disabled = true;
- textarea2.disabled = true;
- textarea3.disabled = true;
-
- btn_delete.disabled = true;
- btn_update.disabled = true;
- button27.disabled = true;
-
- //진료일정삭제버튼
- button10.disabled = true;
-
- }else{
- rdo_reglsche.visible = true;
- rdo_etcsche.visible = false;
- }
-
- pamGetDeptCDDrIDList();
- model.refresh();
- fInitialize();
- //grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = " + cmb_orddept.value + "]";
- //grd_orddr.rebuild();
-
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //최종일정생성일을 조회합니다.
- function fGetLastOrdScheCretDD(){
- var cur_row = grd_orddr.row;
- if( cur_row > 0){
- model.setValue("/root/send/orddrid", grd_orddr.valueMatrix(cur_row, 3));
- model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
-
- if( ! submit("TRPMB00702") ){
- messageBox("최종일정생성일을 가져올 수 없습니다.", "E999", "");
- }else{
-
- //기간별일정 생성 내역 조회
- model.removeNodeset("/root/init/ordschecrethist");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/weeks", "기간별 진료일정생성 내역");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/fromdd", "");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/todd", "");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/seqno", "0");
- model.setValue("/root/main/ordschecrethist", "0");
- copyNodeType("/root/init/ordschecrethist", "/root/main/result/ordschecrethist", "after");
-
- var curDate = model.getValue("/root/main/result/lastordschecret/lastcretdd");
- model.setValue("/root/main/lastcretdd", curDate);
- model.setValue("/root/main/ordschecretno", "0");
-
- if( curDate == '' || curDate == ' '){
- curDate = getCurrentDate();
- }else{
- /* curDate = curDate.toDate().getAddDate(1, "D");
- var tmpDate = curDate.getFullYear();
- tmpDate = tmpDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
- curDate = tmpDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ; */
-
- }
- // model.setValue("/root/main/schecretfromdd", curDate);
- model.setValue("/root/main/schecretfromdd", getCurrentDate());
- // curDate = curDate.toDate().getAddDate(1,"Y");
- // var nextDate = curDate.getFullYear();
- // nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
- // nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
- //
- // model.setValue("/root/main/schecrettodd", nextDate);
- if( isValidDateTime(curDate, "YYYYMMDD") ){
-
- model.setValue("/root/main/schecrettodd", curDate);
- }else{
-
- model.setValue("/root/main/schecrettodd", "20100228");
- }
- // model.setValue("/root/main/schecrettodd", "20100228");
- model.refresh();
- }
- }else return;
-
- }
-
- //진료일정 기준 상세 자료를 조회한다.
- function fGetOrdScheCriteDetail(){
-
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- //grd_ordschecritedetail.rebuild();
- grd_ordschecritedetail.rebuildStyle();
- var cur_row = grd_ordschecrite.row - 1;
- if( cur_row > 0){
-
- model.setValue("/root/send/orddeptcd", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/orddeptcd"));
- model.setValue("/root/send/orddrid", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/orddrid"));
- model.setValue("/root/send/dwcd", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/dwcd"));
- //model.setValue("/root/send/seqno", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/seqno"));
- model.setValue("/root/send/scheno", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/scheno"));
-
- if(submit("TRPMB00701")){
-
- grd_ordschecritedetail.backcoloralternate = "transparent";
- grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("fstexamcap"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
- grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("reexamcap"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
- grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("totalexamcap"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
- grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("examcapsum"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
-
- setRowStyle("grd_ordschecritedetail", "2", "1", "fstexamcap");
- }
- }
- /*
- if( getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist") > 0 ){
-
- grd_ordschecritedetail.attribute("top") = "152";
- grd_ordschecritedetail.attribute("height") = "581";
- button8.visible = true;
- }
- */
- model.refresh();
- }
-
- //진료일정 기준 자료를 조회한다.
- function fGetOrdShceCrite(){
- var cur_row = grd_orddr.row;
- if( cur_row > 0){
- model.setValue("/root/send/orddrid", grd_orddr.valueMatrix(cur_row, 3));
- model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
-
-
-
- for( var i = 2; i <= grd_ordschecrite.rows; i++ ){
- grd_ordschecrite.cellStyle("background-image", i, 1) = "../../../com/commonweb/images/icon_n.gif";
- }
-
- //진료일정기준자료 조회, 진료의사별전문분야 조회
- if(submit("TRPMB00703")){
-
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
-
- model.copyNode("/root/main/ordlist/ordschecrite", "/root/main/result/ordschecrite");
- model.copyNode("/root/main/ordlist/orddrfild", "/root/main/result/orddrfild");
- model.refresh();
-
- //기간별일정 생성 내역 조회
- model.removeNodeset("/root/init/ordschecrethist");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/weeks", "기간별 진료일정생성 내역");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/fromdd", "");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/todd", "");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/seqno", "0");
- model.setValue("/root/main/ordschecrethist", "0");
- copyNodeType("/root/init/ordschecrethist", "/root/main/result/ordschecrethist", "after");
-
- var curDate = model.getValue("/root/main/result/lastordschecret/lastcretdd");
- model.setValue("/root/main/lastcretdd", curDate);
- model.setValue("/root/main/ordschecretno", "0");
-
- if( curDate == '' || curDate == ' '){
- curDate = getCurrentDate();
- }
-
- model.setValue("/root/main/schecretfromdd", getCurrentDate());
- if( isValidDateTime(curDate, "YYYYMMDD") ){
-
- model.setValue("/root/main/schecrettodd", curDate);
- }else{
-
- model.setValue("/root/main/schecrettodd", "20100228");
- }
- }
- model.refresh();
-
- }else return;
- }
-
- //진료일정 요일별 상세기준자료 정원합계 계산
- function fCalculateTotalExamcapDetail(){
-
- var cur_row = grd_ordschecritedetail.row -1 ;
- var fstexamcap = model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/fstexamcap");
- if( fstexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/fstexamcap", 0);
- fstexamcap = 0;
- }
- var reexamcap = model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/reexamcap");
- if( reexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/reexamcap", 0);
- reexamcap = 0;
- }
- var totalexamcap = model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/totalexamcap");
- if( totalexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/totalexamcap", 0);
- totalexamcap = 0;
- }
-
- if( (parseInt(fstexamcap) > 0 || parseInt(reexamcap) > 0) && parseInt(totalexamcap) > 0 ){
-
- messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 수정해주십시요.", "E999", "");
- }
-
- if( grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("schecretbase")) == 'U' ){
-
-
- }
- var sum = 0;
- sum = sum + parseInt( fstexamcap );
- sum = sum + parseInt( reexamcap );
- sum = sum + parseInt( totalexamcap );
-
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/examcapsum", sum);
-
- model.refresh();
- }
- //진료일정기준자료테이블에서 '환자수'가 변할 경우 '총환자수'를 새로 계산해 준다.
- function fCalculateTotalExamcap(){
- var cur_row = grd_ordschecrite.row - 1;
-
- var amfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amfstexamcap");
- if( amfstexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amfstexamcap", 0);
- amfstexamcap = 0;
- }
- var amreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amreexamcap");
- if( amreexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amreexamcap", 0);
- amreexamcap = 0;
- }
- var amtotalexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amtotalexamcap");
- if( amtotalexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amtotalexamcap", 0);
- amtotalexamcap = 0;
- }
- if( (parseInt(amfstexamcap) > 0 || parseInt(amreexamcap) > 0) && parseInt(amtotalexamcap) > 0 ){
-
- messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 오전정원을 수정해주십시요.", "E999", "");
- }
-
- var pmfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmfstexamcap");
- if( pmfstexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmfstexamcap", 0);
- pmfstexamcap = 0;
- }
- var pmreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmreexamcap");
- if( pmreexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmreexamcap", 0);
- pmreexamcap = 0;
- }
- var pmtotalexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmtotalexamcap");
- if( pmtotalexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmtotalexamcap", 0);
- pmtotalexamcap = 0;
- }
- if( (parseInt(pmfstexamcap) > 0 || parseInt(pmreexamcap) > 0) && parseInt(pmtotalexamcap) > 0 ){
-
- messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 오후정원을 수정해주십시요.", "E999", "");
- }
-
- var nigtfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtfstexamcap");
- if( nigtfstexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtfstexamcap", 0);
- nigtfstexamcap = 0;
- }
- var nigtreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtreexamcap");
- if( nigtreexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtreexamcap", 0);
- nigtreexamcap = 0;
- }
- var nigttotalexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigttotalexamcap");
- if( nigttotalexamcap == '' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigttotalexamcap", 0);
- nigttotalexamcap = 0;
- }
- if( (parseInt(nigtfstexamcap) > 0 || parseInt(nigtreexamcap) > 0) && parseInt(nigttotalexamcap) > 0 ){
-
- messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 야간정원을 수정해주십시요.", "E999", "");
- }
-
- var sum = 0;
- sum = sum + parseInt(amfstexamcap);
- sum = sum + parseInt(amreexamcap);
- sum = sum + parseInt(amtotalexamcap);
- sum = sum + parseInt(pmfstexamcap);
- sum = sum + parseInt(pmreexamcap);
- sum = sum + parseInt(pmtotalexamcap);
- sum = sum + parseInt(nigtfstexamcap);
- sum = sum + parseInt(nigtreexamcap);
- sum = sum + parseInt(nigttotalexamcap);
-
- if( model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/schecretbase") == 'T' ){
-
- var termCount = fCheckDataForCalc(grd_ordschecrite.row);
-
- if( termCount > 0 ){
- sum = sum * termCount;
- }else{
- sum = 0;
- }
-
- }
-
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/totalexamcap", sum);
- // model.refresh();
- }
-
- //오전/오후/야간 별 총 정원을 계산한다.
- function fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ){
- var countInterval = 0;
- var sumCap = 0;
- var returnValue = 0;
-
- if( fromtm == "" && totm == "" ){
-
- return returnValue;
- }else{
- if( isValidDateTime( fromtm, "hhmm") ){
-
- if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
- if( isNaN( term ) || parseInt(term) <= 0 ){
- return returnValue;
- }
- //정원체크 초/재진정원과 총정원 동시입력체크
- if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
- return returnValue;
- }
- //총정원 체크
- if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
- //초진정원 체크
- if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
- return returnValue;
- }
- //grd_ordschecrite.valueMatrix( row, 21) = 0;
- }else{
- //grd_ordschecrite.valueMatrix( row, 15) = 0;
- //grd_ordschecrite.valueMatrix( row, 18) = 0;
- }
- }else{
- return returnValue;
- }
- }else{
- return returnValue;
- }
-
- //텀 갯수 계산
- //sumCap = parseInt(fstexam) + parseInt(reexam) + parseInt(totalexam);
- countInterval = getTimeInterval( fromtm, totm ) / 60; //두 시간 차를 초단위로 리턴 / 60 ==> 분단위로 변환
- returnValue = Math.ceil(countInterval / parseInt(term) );
- return returnValue;
- }
- }
-
- //오전/오후/야간 별 데이터 무결성 검사 밑 정원 계산을 호출한다.
- function fCheckDataForCalc(row){
-
- var TermCnt = 0;
-
- var fromtm = "";
- var totm = "";
- var term = "";
- var fstexam = "";
- var reexam = "";
- var ampmnigt = "";
-
- //진료시간 체크 -- 오전
- fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfromtm"));
- totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotm"));
- term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm"));
- fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap"));
- reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap"));
- totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap"));
-
- TermCnt = TermCnt + parseInt( fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ) );
- //진료시간 체크 -- 오후
- fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfromtm"));
- totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotm"));
- term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm"));
- fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap"));
- reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap"));
- totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap"));
-
- TermCnt = TermCnt + parseInt( fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ) );
- //진료시간 체크 -- 야간
- fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfromtm"));
- totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotm"));
- term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm"));
- fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap"));
- reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap"));
- totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap"));
-
- TermCnt = TermCnt + parseInt( fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ) );
- return TermCnt;
- }
-
- //진료일정기준상세 테이블에 새로운 행을 추가한다.
- function fAddRowDetail(){
-
- cur_row = grd_ordschecrite.row;
- if( cur_row > 1 ){
-
- grd_ordschecritedetail.addRow(false);
- grd_ordschecritedetail.cellStyle("background-image", grd_ordschecritedetail.row, 1) = "../../../com/commonweb/images/icon_i.gif";
-
- var bottom = grd_ordschecritedetail.rows - grd_ordschecritedetail.fixedRows -1;
-
- if( grd_ordschecritedetail.valueMatrix(1, 5) != '합계 : ' ){
- // bottom = parseInt(bottom) + 1;
- messageBox("기준자료를 더블클릭하여 수정할 상세기준자료를 조회하신 후 작업하세요!!", "E999", "");
- return false;
- }
- //숨겨진 컬럼값 세팅
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/orddrid", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("orddrid") ));
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/orddeptcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("orddeptcd") ));
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/centcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("centcd") ));
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/subdeptcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("subdeptcd") ));
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/seqno", 1);
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/scheno", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("scheno") ));
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/dwcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("dwcd") ));
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/fstexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/reexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/totalexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/examcapsum", 0);
-
- model.setFocus("grd_ordschecritedetail");
- grd_ordschecritedetail.row = grd_ordschecritedetail.rows;
- grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("ordtm");
- grd_ordschecritedetail.editCell();
-
- //model.refresh();
- }else messageBox("진료일정기준 정보를 얻어 올 수", "I004");
- }
- //진료일정기준자료 테이블에 새로운 행을 추가한다. -- 숨겨진 컬럼 값을 세팅한다.
- function fAddRow( dayType ){
-
- cur_row = grd_orddr.row;
- if( cur_row > 0 ){
-
- grd_ordschecrite.addRow(false);
- grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_i.gif";
-
- var bottom = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
- //숨겨진 컬럼값 세팅
- /* model.removeNodeset("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]");
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/check", 'Y');
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddrid", grd_orddr.valueMatrix( cur_row, grd_orddr.colRef("cd") ));
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddeptcd", grd_orddr.valueMatrix( cur_row, grd_orddr.colRef("dp") ));
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/dwcd", dayType);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/seqno", 1);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/scheno", 1);
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/instcd");
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/histstat", 'Y');
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amordyn");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmordyn");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtordyn");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfromtm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfromtm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtfromtm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigttotm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amterm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmterm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtterm");
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase", 'U');
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfstexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amreexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotalexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfstexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmreexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotalexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtfstexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtreexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigttotalexamcap", 0);
- model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 0);
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/clincnm");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/remfact");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/fstrgstrid");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/fstrgstdt");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/lastupdtrid");
- model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/lastupdtdt");
- // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase", 'T');
- // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/check", 'Y');
- // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase","U");
- */
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddrid", grd_orddr.valueMatrix( cur_row, grd_orddr.colRef("cd") ));
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddeptcd", model.getValue("/root/main/orddeptcd"));
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/centcd", '-');
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/subdeptcd", model.getValue("/root/main/subdeptcd"));
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/seqno", 1);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/dwcd", dayType);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfstexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amreexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotalexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfstexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmreexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotalexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtfstexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtreexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigttotalexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 0);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase", 'T');
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/check", 'Y');
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase","U");
- if( radio1.value == 'YA' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotalexamcap", 50);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 50);
- }
- if (radio1.value == 'YP' ){
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotalexamcap", 50);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 50);
- }
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = grd_ordschecrite.rows;
- grd_ordschecrite.col = grd_ordschecrite.colRef("dwcd");
- grd_ordschecrite.editCell();
- // model.refresh();
- return true;
- }else{
- messageBox("진료과코드와 진료의사코드를 얻어 올 수", "I004");
- return false;
- }
- }
- /*
- //진료의사별전문분야 테이블에 새로운 행을 추가한다. -- 숨겨진 컬럼 값을 세팅한다.
- function fAddDrFildRow(){
-
- cur_row = grd_orddr.row;
- if( cur_row > 0 ){
- grd_orddrfild.addRow(false);
-
- //숨겨진 컬럼값 세팅
- model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
- model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/orddeptcd", grd_orddr.valueMatrix( cur_row, 2));
- model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/seqno", 1);
- }else messageBox("진료과코드와 진료의사코드를 얻어 올 수", "I004");
- }
- */
- function fSaveDrFild(){
- cur_row = grd_orddr.row;
- if( cur_row > 0 ){
-
- model.copyNode("/root/send/updatedata/datalist", "/root/main/ordlist/orddrfild/orddrfildlist");
-
-
- if (model.getValue("/root/send/updatedata/datalist/inetrsrvpossyn") == ""){
-
- model.setValue("/root/send/updatedata/datalist/inetrsrvpossyn","N");
- }
-
- //2014/07/28
- if(ipt_internetinwon.value=="" || ipt_internetinwon.value==null){
- model.makeValue("/root/send/updatedata/datalist/internetinwon","0");
- }else{
- model.makeValue("/root/send/updatedata/datalist/internetinwon", ipt_internetinwon.value);
- }
- //2014/07/28
-
- model.setValue("/root/send/updatedata/datalist/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
- model.setValue("/root/send/updatedata/datalist/orddeptcd", model.getValue("/root/main/orddeptcd"));
-
- model.makeNode("/root/send/updatedata/datalist/m");
- model.setValue("/root/send/updatedata/datalist/m", "u");
-
- if( model.getValue("/root/send/updatedata/datalist/orddrid") == '' ||
- model.getValue("/root/send/updatedata/datalist/orddeptcd") == ''){
-
- messageBox("진료의사/진료과 정보를 가져올 수 없습니다.","E999","");
- return false;
- }
-
- if(messageBox("전문분야를 저장 하시겠습니까?", "Q999") != 6) return;
-
- if ( submit("TXPMB00704") ) {
- //전문분야 추가/수정 후 재 조회한다.
- //submit("TRPMB00707")
- //grd_orddrfild.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- }
-
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
- model.refresh();
- }else{
-
- messageBox("진료의사/진료과 정보를 가져올 수 없습니다.","E999","");
- }
- return true;
- }
-
- function fCheckData(){
- var cur_row = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
- var row = 0;
- var fromtm = "";
- var totm = "";
- var term = "";
- var fstexam = "";
- var reexam = "";
- var schecretbase = "";
- var dayCD = "";
- var ampmnigt = "";
- for(var i = 0; i < cur_row; i++){
- row = i + 2;
- if( grd_ordschecrite.rowStatus(row) != 0 ){
- //요일 데이터 체크
- dayCD = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("dwcd"));
- if( ! (dayCD == "0" || dayCD == "1" || dayCD == "2" || dayCD == "3" || dayCD == "4" || dayCD == "5" || dayCD == "6")){
- messageBox((row-1) + "번째 줄의 " + "요일구분이 정확히 입력되지 않았습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("dwcd");
- grd_ordschecrite.editCell();
-
- return false;
- }
-
- //생성기준 체크
- schecretbase = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("schecretbase")).toUpperCase();
- if( schecretbase != "U" && schecretbase != "T" ){
- messageBox((row-1) + "번째 줄의 " + "생성기준 데이터를 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("schecretbase");
- grd_ordschecrite.editCell();
-
- return false;
- }
-
- //진료시간 체크 -- 오전
- fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfromtm"));
- totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotm"));
- term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm"));
- fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap"));
- reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap"));
- totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap"));
- if( fromtm == "" && totm == "" ){
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amordyn")) = "N";
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap")) = 0;
- }else{
- if( isValidDateTime( fromtm, "hhmm") ){
- if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amordyn")) = "Y";
-
- //TERM 체크
- if( schecretbase == "U" ){
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm")) = 0;
- }else{
-
- if( isNaN( term ) || parseInt(term) <= 0 ){
-
- messageBox((row-1) + "번째 줄의 " + "오전 TERM을 잘못 입력하셨습니다.", "E999", "");
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("amterm");
- grd_ordschecrite.editCell();
- return false;
- }
- }
-
- //오전정원체크 초/재진정원과 총정원 동시입력체크
- if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
-
- messageBox((row-1) + "번째 줄의 오전 초/재진정원과 총정원이 동시에 입력되었습니다. 수정해주십시요.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("amfstexamcap");
- grd_ordschecrite.editCell();
-
- return false;
- }
- //오전 총정원 체크
- if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
-
- //오전 초진정원 체크
- if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "오전 초진/재진 정원을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("amfstexamcap");
- grd_ordschecrite.editCell();
-
- return false;
- }
- /*
- //오전 재진정원 체크
- if( parseInt(reexam) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "오전 재진정원을 잘못 입력하셨습니다.", "E999", "");
- return false;
- }
- */
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap")) = 0;
- }else{
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap")) = 0;
- }
- }else{
- messageBox((row-1) + "번째 줄의 " + "오전진료 종료시간을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("amtotm");
- grd_ordschecrite.editCell();
-
- return false;
- }
-
- }else{
- messageBox((row-1) + "번째 줄의 " + "오전진료 시작시간을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("amfromtm");
- grd_ordschecrite.editCell();
-
- return false;
- }
-
- ampmnigt = "A";
- } //오전 데이터 체크 종료
-
- //진료시간 체크 -- 오후
- fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfromtm"));
- totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotm"));
- term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm"));
- fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap"));
- reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap"));
- totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap"));
- if( fromtm == "" && totm == "" ){
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmordyn")) = "N";
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap")) = 0;
- }else{
- if( isValidDateTime( fromtm, "hhmm") ){
- if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmordyn")) = "Y";
-
- //TERM 체크
- if( schecretbase == "U" ){
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm")) = 0;
- }else{
- if( isNaN( term ) || parseInt(term) <= 0 ){
-
- messageBox((row-1) + "번째 줄의 " + "오후 TERM을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("pmterm");
- grd_ordschecrite.editCell();
-
- return false;
- }
- }
-
- //오후정원체크 초/재진정원과 총정원 동시입력체크
- if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
-
- messageBox((row-1) + "번째 줄의 오후 초/재진정원과 총정원이 동시에 입력되었습니다. 수정해주십시요.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("pmfstexamcap");
- grd_ordschecrite.editCell();
-
- return false;
- }
- //오전 총정원 체크
- if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
- //오후 초진정원 체크
- if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "오후 초진/재진 정원을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("pmfstexamcap");
- grd_ordschecrite.editCell();
-
- return false;
- }
- /*
- //오후 재진정원 체크
- if( isNaN( parseInt(reexam) ) || parseInt(reexam) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "오후 재진정원을 잘못 입력하셨습니다.", "E999", "");
- return false;
- }
- */
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap")) = 0;
- }else{
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap")) = 0;
- }
-
- }else{
- messageBox((row-1) + "번째 줄의 " + "오후진료 종료시간을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("pmtotm");
- grd_ordschecrite.editCell();
- return false;
- }
-
- }else{
- messageBox((row-1) + "번째 줄의 " + "오후진료 시작시간을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("pmfromtm");
- grd_ordschecrite.editCell();
- return false;
- }
-
- ampmnigt = "P";
- } //오후 데이터 체크 종료
-
- //진료시간 체크 -- 야간
- fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfromtm"));
- totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotm"));
- term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm"));
- fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap"));
- reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap"));
- totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap"));
- if( fromtm == "" && totm == "" ){
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtordyn")) = "N";
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap")) = 0;
- }else{
- if( isValidDateTime( fromtm, "hhmm") ){
- if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtordyn")) = "Y";
-
- //TERM 체크
- if( schecretbase == "U" ){
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm")) = 0;
- }else{
- if( isNaN( term ) || parseInt(term) <= 0 ){
-
- messageBox((row-1) + "번째 줄의 " + "야간 TERM을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("nigtterm");
- grd_ordschecrite.editCell();
- return false;
- }
- }
-
- //야간정원체크 초/재진정원과 총정원 동시입력체크
- if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
-
- messageBox((row-1) + "번째 줄의 야간 초/재진정원과 총정원이 동시에 입력되었습니다. 수정해주십시요.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("nigtfstexamcap");
- grd_ordschecrite.editCell();
- return false;
- }
-
- //오전 총정원 체크
- if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
- //야간 초진정원 체크
- if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "야간 초진/재진 정원을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("nigtfstexamcap");
- grd_ordschecrite.editCell();
- return false;
- }
- /*
- //야간 재진정원 체크
- if( isNaN( parseInt(reexam) ) || parseInt(reexam) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "야간 재진정원을 잘못 입력하셨습니다.", "E999", "");
- return false;
- }
- */
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap")) = 0;
- }else{
-
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap")) = 0;
- grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap")) = 0;
- }
-
- }else{
- messageBox((row-1) + "번째 줄의 " + "야간진료 종료시간을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("nigttotm");
- grd_ordschecrite.editCell();
- return false;
- }
-
- }else{
- messageBox((row-1) + "번째 줄의 " + "야간진료 시작시간을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("nigtfromtm");
- grd_ordschecrite.editCell();
- return false;
- }
-
- ampmnigt = "N";
- } //야간 데이터 체크 종료
-
- //진료시간이 오전/오후/야간 모두 안들어가 있을 경우
- if( ampmnigt == '' ){
- messageBox((row-1) + "번째 줄의 " + "진료시간이 입력되지 않았습니다.", "E999", "");
-
- model.setFocus("grd_ordschecrite");
- grd_ordschecrite.row = row;
- grd_ordschecrite.col = grd_ordschecrite.colRef("amfromtm");
- grd_ordschecrite.editCell();
- return false;
- }
-
- ampmnigt = "";
- } //수정이나 추가가 되었는지를 체크한다.
-
- } //for 루프를 닫는다.
- return true;
- }
-
- function fSave(){
- if( fCheckData() ){
- var cur_row = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
-
- if( cur_row > 0 ){
-
- if(messageBox("진료일정기준자료를 저장 하시겠습니까?", "Q999") != 6) return;
-
- model.setValue("/root/send/updatedata/datalist",grd_ordschecrite.getUpdateData());
- //grd_ordschecrite.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
- if ( submit("TXPMB00706") ) {
- //진료일정기준자료를 재 조회한다.
- fGetOrdShceCrite();
-
- grd_ordschecrite.clearStatus();
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- }
-
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
- model.refresh();
- }
- }else{
- return false;
- }
- return true;
- }
-
- function fSaveDetail(){
- if( fCheckDetailData() ){
- var cur_row = grd_ordschecritedetail.rows;
-
-
- if( cur_row > 0 ){
-
- model.setValue("/root/send/updatedata/datalist",grd_ordschecritedetail.getUpdateData());
- grd_ordschecritedetail.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
- if ( submit("TXPMB00710") ) {
- //진료일정기준자료를 재 조회한다.
- fGetOrdScheCriteDetail();
- grd_ordschecritedetail.clearStatus();
- //model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- }
-
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
- model.refresh();
- }
- }else{
- return false;
- }
- return true;
- }
-
- //기준상세자료 에러 체크
- function fCheckDetailData(){
- var cur_row = getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist/orddrid");
- var selected_row = grd_ordschecrite.row;
- var row = 0;
- var ordtm = "";
- var ampmflag = "";
- var fstexamcap = "";
- var reexamcap = "";
- var totalexamcap = "";
- //var dayCD = "";
- var checkFstExamCap = 0;
- var checkReExamCap = 0;
- var checkTotalExamCap = 0;
- var checkSumExamCap = 0;
-
- for(var i = 0; i < cur_row; i++){
-
- if( grd_ordschecritedetail.valueMatrix(1, 5) != '합계 : ' ){
- row = i + 2;
- // bottom = parseInt(bottom) + 1;
- // messageBox("기준자료를 더블클릭하여 수정할 상세기준자료를 조회하신 후 작업하세요!!", "E999", "");
- // return false;
- }else{
- row = i + 2;
- }
- // if( grd_ordschecritedetail.rowStatus(row) != 0 ){
- /*
- //요일 데이터 체크
- dayCD = grd_ordschecritedetail.valueMatrix( row, 1);
- if( dayCD != grd_ordschecrite.valueMatrix( selected_row, 2) ){
- messageBox( row + "번째 줄의 " + "요일구분이 기준자료의 요일구분과 다릅니다.", "E999", "");
- return false;
- }
- */
- //진료시간 체크
- ordtm = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("ordtm"));
- if( ! isValidDateTime(ordtm, 'hhmm') ){
- messageBox( row + "번째 줄의 " + "진료시간이 잘못 입력되었습니다.", "E999", "");
-
- model.setFocus("grd_ordschecritedetail");
- grd_ordschecritedetail.row = row;
- grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("ordtm");
- grd_ordschecritedetail.editCell();
-
- return false;
- }
-
- //시간구분 체크
- ampmflag = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("ampmflag")).toUpperCase();
- if( ampmflag != 'A' && ampmflag != 'P' && ampmflag != 'N' ){
- messageBox( row + "번째 줄의 " + "시간구분이 잘못 입력되었습니다.", "E999", "");
-
- model.setFocus("grd_ordschecritedetail");
- grd_ordschecritedetail.row = row;
- grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("ampmflag");
- grd_ordschecritedetail.editCell();
-
- return false;
- }
-
- //초진/재진/총정원 체크
- fstexamcap = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("fstexamcap"));
- reexamcap = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("reexamcap"));
- totalexamcap = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("totalexamcap"));
-
- checkFstExamCap = parseInt(checkFstExamCap) + parseInt(fstexamcap);
- checkReExamCap = parseInt(checkReExamCap) + parseInt(reexamcap);
- checkTotalExamCap = parseInt(checkTotalExamCap) + parseInt(totalexamcap);
-
- if( isNaN( totalexamcap ) || parseInt(totalexamcap) <= 0 ){
- //초진정원 체크
- if( isNaN( fstexamcap ) || isNaN( reexamcap) || parseInt(fstexamcap) + parseInt(reexamcap) <= 0 ){
- messageBox((row) + "번째 줄의 " + "초/재진 정원을 잘못 입력하셨습니다.", "E999", "");
-
- model.setFocus("grd_ordschecritedetail");
- grd_ordschecritedetail.row = row;
- grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("fstexamcap");
- grd_ordschecritedetail.editCell();
-
- return false;
- }
- /*
- //재진정원 체크
- if( isNaN( parseInt(reexamcap) ) || parseInt(reexamcap) <= 0 ){
- messageBox((row-1) + "번째 줄의 " + "재진정원을 잘못 입력하셨습니다.", "E999", "");
- return false;
- }
- */
- grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("totalexamcap")) = 0;
- }else{
-
- grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("fstexamcap")) = 0;
- grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("reexamcap")) = 0;
- }
- // }
- } //for 루프를 닫는다.
-
- //정원 변경사항 체크
-
- //정원합계 계산
- checkSumExamCap = parseInt(checkFstExamCap) + parseInt(checkReExamCap) + parseInt(checkTotalExamCap);
- //기준자료가 구간일 경우에는 정원합계만 체크한다.
- if( grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("schecretbase") ) == 'T' ){
- if( grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("totalexamcap") ) != checkSumExamCap ){
- messageBox("변경하신 상세기준자료의 정원합계와 기준자료의 정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
- return false;
- }
-
- //기준자료가 섹션일 때에는 초진/재진/총정원으로 구분해서 비교한다.
- }else{
- if( checkFstExamCap != parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("amfstexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("pmfstexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("nigtfstexamcap")))){
-
- messageBox("변경하신 상세기준자료의 초진정원합계와 기준자료의 초진정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
- return false;
-
- }else if( checkReExamCap != parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("amreexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("pmreexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("nigtreexamcap")))){
-
- messageBox("변경하신 상세기준자료의 재진정원합계와 기준자료의 재진정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
- return false;
-
- }else if( checkTotalExamCap != parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("amtotalexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("pmtotalexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("nigttotalexamcap")))){
-
- messageBox("변경하신 상세기준자료의 총정원합계와 기준자료의 총정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
- return false;
-
- }
- }
-
- return true;
- }
-
- //화면 초기화
- function fInitialize(){
- //model.resetInstanceNode("/root/main");
- model.resetInstanceNode("/root/main/ordlist/orddrfild/orddrfildlist");
- model.removeNodeset("/root/main/ordlist/ordschecrite/ordschecritelist");
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- //선택요일추가 초기화
- model.resetInstanceNode("/root/main/selectedday");
- if (checkOpener()){ //팝업화면으로 사용될 때
- model.setValue("/root/main/regltempflag", 'XX');
- model.setValue("/root/main/bfdatadel", '-');
- }else{
- model.setValue("/root/main/regltempflag", 'YY');
- model.setValue("/root/main/bfdatadel", 'Del');
- }
- model.setValue("/root/main/selectedday", '');
- model.setValue("/root/main/lastcretdd", '');
- //grd_ordschecritedetail.rebuild();
- //grd_ordschecrite.rebuild();
- //grd_orddrfild.rebuild();
- //model.refresh();
-
- //날자 입력 항목에 오늘 날자 세팅
- var curDate = getCurrentDate();
- model.setValue("/root/main/schecretfromdd", curDate);
-
- //기간별일정 생성 내역 조회
- model.removeNodeset("/root/init/ordschecrethist");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/weeks", "기간별 진료일정생성 내역");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/fromdd", "");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/todd", "");
- model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/seqno", "0");
- model.setValue("/root/main/ordschecrethist", "0");
-
- //2월 마지막날 구하기..
- // if( curDate >= curDate.substring(0,4) + "0301" ){
- //
- // curDate = curDate.toDate().getAddDate(1,"Y");
- // curDate = curDate.getFullYear().toString() + "0301"
- // curDate = curDate.toDate().getAddDate(-1,"D");
- // }else{
- //
- // curDate = curDate.getFullYear().toString() + "0301"
- // curDate = curDate.toDate().getAddDate(-1,"D");
- // }
-
-
-
- // curDate = curDate.toDate().getAddDate(1,"Y");
- // var nextDate = curDate.getFullYear();
- // nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
- // nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
- //
- // model.setValue("/root/main/schecrettodd", nextDate);
-
- // model.setValue("/root/main/schecrettodd", curDate);
-
- model.setValue("/root/main/schecrettodd", "20100228");
- //2007-10-10
- model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/inetrsrvpossyn", "Y");
-
- model.refresh();
- }
-
- function fSetTime( ampm ){
- var bottom = grd_ordschecrite.bottomRow - 1;
- if( ampm.search('AM') != -1){
- //오전 시작/종료시간 세팅
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfromtm", '0830');
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotm", '1230'); //1200 -> 1230 수정 파트장님 요청사항
- }
-
- if( ampm.search('PM') != -1){
- //오후 시작/종료시간 세팅
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfromtm", '1330');
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotm", '1655');
- }
- }
-
- //진료일정생성 버튼 선택시
- function fOrdScheCriteList(){
- var nodeList = instance1.selectNodes("/root/main/ordlist/ordschecrite/ordschecritelist[check='Y']");
- var rCSV = getNodeListCSV(nodeList);
-
- if( rCSV == "" || rCSV == null || rCSV == undefined){
- //messageBox("일정을 생성할 기준자료가 선택되지 않았습니다.", "E999", "");
- messageBox("일정을 생성할 기준자료가 선택되지", "E007");
- return false;
- }
-
- for( var i = grd_ordschecrite.fixedRows; i <= grd_ordschecrite.rows; i++ ){
- if( grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("check")) == 'Y'){
- if(grd_ordschecrite.rowStatus(i) == '1' || grd_ordschecrite.rowStatus(i) == '3' ){
- messageBox("선택하신 기준자료 중에 저장이 되지 않은 내역이 있습니다. [기준자료저장]을 하신 후에 [진료일정생성]하세요.", "E999", "");
- return false;
- }
- }
- }
-
- model.resetInstanceNode("/root/send/updatedata");
- model.setValue("/root/send/updatedata/datalist", rCSV);
-
- model.makeNode("/root/send/updatedata/schecretfromdd");
- model.makeNode("/root/send/updatedata/schecrettodd");
- model.makeNode("/root/send/updatedata/bfdatadel");
- model.makeNode("/root/send/updatedata/regltempflag");
- model.makeNode("/root/send/updatedata/capacheckyn");
- model.makeNode("/root/send/updatedata/capano");
-
- model.makeNode("/root/send/updatedata/ordschecretno");
- model.setValue("/root/send/updatedata/ordschecretno", model.getValue("/root/main/ordschecretno"));
-
- var fromdd = model.getValue("/root/main/schecretfromdd");
- if( isValidDateTime(fromdd, "YYYYMMDD") ){
- model.setValue("/root/send/updatedata/schecretfromdd", fromdd);
- }else{
- messageBox("진료일정생성 기간 중 시작일이 유효한 날자가 아닙니다. 확인해 주세요.", "E999");
- model.setFocus("ipt_fromdd");
- return false;
- }
-
- var todd = model.getValue("/root/main/schecrettodd");
- if( isValidDateTime(todd, "YYYYMMDD") ){
- model.setValue("/root/send/updatedata/schecrettodd", todd);
- }else{
- messageBox("진료일정생성 기간 중 종료일이 유효한 날자가 아닙니다. 확인해 주세요.", "E999");
- model.setFocus("ipt_todd");
- return false;
- }
-
- if( fromdd > todd){
- messageBox("희망일정 생성 종료일자가 희망일정 생성 시작일자 보다 이전일자 입니다. 확인해 주세요.", "E999");
- model.setFocus("ipt_todd");
- return false;
- }
-
- //특별 일정외 모든 일정구분 capa수제한
- var regltempflag = model.getValue("/root/main/regltempflag");
- var capacheckyn = model.getValue("/root/hidden/capacheck/capachecklist[cdid=10]/cdnm");
- var capano = parseInt(model.getValue("/root/hidden/capacheck/capachecklist[cdid=20]/cdnm"));
- var endRow = grd_ordschecrite.rows;
- endRow = endRow-1;
-
- if(capacheckyn == 'Y'){
- if(regltempflag != 'SS' && regltempflag != 'YY'){
- for( var i = 1; i < endRow; i++){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/check") == 'Y' ){
-
- var amfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/amfstexamcap");
- var amreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/amreexamcap");
- var pmfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/pmfstexamcap");
- var pmreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/pmreexamcap");
- var nigtfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/nigtfstexamcap");
- var nigtreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/nigtreexamcap");
- var amtotalexamcap = parseInt(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/amtotalexamcap"));
- var pmtotalexamcap = parseInt(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/pmtotalexamcap"));
- var nigttotalexamcap = parseInt(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/nigttotalexamcap"));
-
-
- var amcapa = parseInt(amfstexamcap) + parseInt(amreexamcap) + parseInt(amtotalexamcap);
- var pmcapa = parseInt(pmfstexamcap) + parseInt(pmreexamcap) + parseInt(pmtotalexamcap);
- var nigtcapa = parseInt(nigtfstexamcap) + parseInt(nigtreexamcap) + parseInt(nigttotalexamcap);
-
- if(amcapa > capano){
- messageBox(i+"번째 줄의 오전 정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
- return;
- }else if(pmcapa > capano){
- messageBox(i+"번째 줄이 오후 정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
- return;
- }else if(nigtcapa > capano){
- messageBox(i+"번째 줄이 야간 정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
- return;
- }else if(amtotalexamcap > capano){
- messageBox(i+"번째 줄이 오전 총정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
- return;
- }else if(pmtotalexamcap > capano){
- messageBox(i+"번째 줄이 오후 총정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
- return;
- }else if(nigttotalexamcap > capano){
- messageBox(i+"번째 줄이 야간 총정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
- return;
- }
- }
- }
- }
- }
-
- if(capacheckyn == 'Y'){
- model.setValue("/root/send/updatedata/capacheckyn", capacheckyn);
- model.setValue("/root/send/updatedata/capano", capano);
- }
-
- //정규일정 생성시 기존 내역 삭제여부 체크
- var cnt = getNodesetCount("/root/init/ordschecrethist/ordschecrethistlist/weeks");
- //cnt = cnt -1;
-
- if(regltempflag == 'YY'){
- for( var i = 1; i <= cnt; i ++ ){
- if( model.getValue("/root/init/ordschecrethist/ordschecrethistlist[" + i + "]/reglscheflag") == 'Y' ){
- var yfromdd = model.getValue("/root/init/ordschecrethist/ordschecrethistlist[" + i + "]/fromdd");
- var ytodd = model.getValue("/root/init/ordschecrethist/ordschecrethistlist[" + i + "]/todd");
- var cfromdd = model.getValue("/root/main/schecretfromdd");
- var ctodd = model.getValue("/root/main/schecrettodd");
-
- if( yfromdd <= ctodd && ytodd >= cfromdd){
- var rtn = messageBox("기존에 정규일정이 존재 합니다. 기존 일정을 삭제 하시겠습니까? ", "Q999")
-
- if (rtn == 6) { // Yes : 6 / No : 7 / Cancel : 2
- model.setValue("/root/send/updatedata/bfdatadel", model.getValue("/root/main/bfdatadel"));
- }else{
- model.setValue("/root/send/updatedata/bfdatadel", '');
- }
- }
- }
- }
- }
-
- var strRegItempFlag = model.getValue("/root/main/regltempflag").substring(0,1);
-
- model.setValue("/root/send/updatedata/regltempflag", strRegItempFlag);
-
- if(regltempflag == 'YY'){
- if(messageBox("정규일정을 생성 하시겠습니까?", "Q999") != 6){
- return;
- }
- }else if(regltempflag == 'NN'){
- if(messageBox("임시일정을 생성 하시겠습니까?", "Q999") != 6){
- return;
- }
- }else if(regltempflag == 'ZZ'){
- if(messageBox("대진일정을 생성 하시겠습니까?", "Q999") != 6){
- return;
- }
- }else if(regltempflag == 'SS'){
- if(messageBox("특별일정을 생성 하시겠습니까?", "Q999") != 6){
- return;
- }
- }else if(regltempflag == 'VV'){
- if(messageBox("기타(임시)일정을 생성 하시겠습니까?", "Q999") != 6){
- return;
- }
- }else if(regltempflag == 'XX'){
- if(messageBox("기타(검사)일정을 생성 하시겠습니까?", "Q999") != 6){
- return;
- }
- }
-
- if (submit("TXPMB00708")){
- messageBox("일정생성", "I002");
- }else{
- messageBox("일정생성이 비정상 종료! 최종진료생성일 확인!", "I999");
- return;
- }
-
- //진료일정 생성시 격주 휴무 체크
- var cur_row = grd_orddr.row;
-
- model.setValue("/root/main/biweekcheck/fromdd", model.getValue("/root/main/schecretfromdd"));
- model.setValue("/root/main/biweekcheck/todd", model.getValue("/root/main/schecrettodd"));
- model.setValue("/root/main/biweekcheck/orddeptcd", model.getValue("/root/main/orddeptcd"));
- model.setValue("/root/main/biweekcheck/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
-
- var cnt = "";
-
- model.makeNode("/root/main/holicheck/biweeklycheck/check");
-
- model.makeNode("/root/send/updatedata/datalist");
-
- //격주 휴무 체크 후 진료일정 생성 -- 추가
- if (submit("TRPMB00714")){
- cnt = model.getValue("/root/main/holicheck/biweeklycheck/check");
- }
-
- if(cnt != "0"){
- var rtn = messageBox("변경하시려는 일정에 격주휴무가 있습니다. 격주 휴무를 ", "Q001")
-
- if (rtn == 6) { // Yes : 6 / No : 7 / Cancel : 2
- submit("TXPMB00715")
- }
- }
-
- fGetLastOrdScheCretDD();
-
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
-
-
- }
-
-
-
- function fAddOrdList(){
- if( model.getValue("/root/main/selectedday/sun") == 'Y' ){
- if( fAddRow( '0' ) ){
- fSetTime( model.getValue("/root/main/selectedday/sunampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
- if( fAddRow( '1' ) ){
- fSetTime( model.getValue("/root/main/selectedday/monampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
- if( fAddRow( '2' ) ){
- fSetTime( model.getValue("/root/main/selectedday/tueampm") );;
- }
- }
- if( model.getValue("/root/main/selectedday/wed") == 'Y' ){
- if( fAddRow( '3' ) ){
- fSetTime( model.getValue("/root/main/selectedday/wedampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/thu") == 'Y' ){
- if( fAddRow( '4' ) ){
- fSetTime( model.getValue("/root/main/selectedday/thuampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/fri") == 'Y' ){
- if( fAddRow( '5' ) ){
- fSetTime( model.getValue("/root/main/selectedday/friampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/sat") == 'Y' ){
- if( fAddRow( '6' ) ){
- fSetTime( model.getValue("/root/main/selectedday/satampm") );
- }
- }
- //선택요일추가 초기화
- model.resetInstanceNode("/root/main/selectedday");
- model.refresh();
-
- }
-
-
- function fSetCheckDay(){
-
- //오전
- if (radio1.value == 'NA' || radio1.value == 'YA' || radio1.value == 'ZA'){
- if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
- model.setValue("/root/main/selectedday/monampm", "AM");
- }
- if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
- model.setValue("/root/main/selectedday/tueampm","AM");
- }
- if (model.getValue("/root/main/selectedday/wed") == 'Y'){
- model.setValue("/root/main/selectedday/wedampm", "AM");
- }
- if (model.getValue("/root/main/selectedday/thu") == 'Y'){
- model.setValue("/root/main/selectedday/thuampm", "AM");
- }
- if (model.getValue("/root/main/selectedday/fri") == 'Y'){
- model.setValue("/root/main/selectedday/friampm", "AM");
- }
- if (model.getValue("/root/main/selectedday/sat") == "Y"){
- model.setValue("/root/main/selectedday/satampm", "AM");
- }
- }
- if (radio1.value == 'NP' || radio1.value == 'YP' || radio1.value == 'ZP'){
- if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
- model.setValue("/root/main/selectedday/monampm", "PM");
- }
- if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
- model.setValue("/root/main/selectedday/tueampm","PM");
- }
- if (model.getValue("/root/main/selectedday/wed") == 'Y'){
- model.setValue("/root/main/selectedday/wedampm", "PM");
- }
- if (model.getValue("/root/main/selectedday/thu") == 'Y'){
- model.setValue("/root/main/selectedday/thuampm", "PM");
- }
- if (model.getValue("/root/main/selectedday/fri") == 'Y'){
- model.setValue("/root/main/selectedday/friampm", "PM");
- }
- if (model.getValue("/root/main/selectedday/sat") == "Y"){
- model.setValue("/root/main/selectedday/satampm", "PM");
- }
- }
-
-
-
- // fAddOrdList();
- if( model.getValue("/root/main/selectedday/sun") == 'Y' ){
- if( fAddRow( '0' ) ){
- fSetTime( model.getValue("/root/main/selectedday/sunampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
- if( fAddRow( '1' ) ){
- fSetTime( model.getValue("/root/main/selectedday/monampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
- if( fAddRow( '2' ) ){
- fSetTime( model.getValue("/root/main/selectedday/tueampm") );;
- }
- }
- if( model.getValue("/root/main/selectedday/wed") == 'Y' ){
- if( fAddRow( '3' ) ){
- fSetTime( model.getValue("/root/main/selectedday/wedampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/thu") == 'Y' ){
- if( fAddRow( '4' ) ){
- fSetTime( model.getValue("/root/main/selectedday/thuampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/fri") == 'Y' ){
- if( fAddRow( '5' ) ){
- fSetTime( model.getValue("/root/main/selectedday/friampm") );
- }
- }
- if( model.getValue("/root/main/selectedday/sat") == 'Y' ){
- if( fAddRow( '6' ) ){
- fSetTime( model.getValue("/root/main/selectedday/satampm") );
- }
- }
-
-
- }
-
-
- function fSave2(){
- if( fCheckData() ){
- var cur_row = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
-
- if( cur_row > 0 ){
-
- model.setValue("/root/send/updatedata/datalist",grd_ordschecrite.getUpdateData());
- grd_ordschecrite.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
-
- if ( submit("TXPMB00706") ) {
- //진료일정기준자료를 재 조회한다.
- fGetOrdShceCrite();
-
- //grd_ordschecrite.clearStatus();
-
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- }
-
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
- model.refresh();
- }
- }else{
- return false;
- }
- return true;
- }
-
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:178px; height:14px; ">진료일정 등록</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
- <caption id="caption22" style="left:895px; top:200px; width:35px; height:20px; ">전체</caption>
- <bool id="bool7" checkvalue="Y,N" ref="/root/send/allyn" style="left:875px; top:200px; width:20px; height:20px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //진료일정기준자료 조회 함수 호출 by 설승민 20181207
-
- fGetOrdShceCrite();
-
- var cur_row = grd_orddr.row;
- model.setValue("/root/hidden/drcheck","");
-
- if(cur_row > 0){
- model.setValue("/root/hidden/drcheck", grd_orddr.valueMatrix( cur_row, 1 ));
- }
- ]]>
- </script>
- </bool>
- <caption id="caption25" style="left:640px; top:76px; width:19px; height:20px; ">명</caption>
- <input id="ipt_internetinwon" ref="/root/main/ordlist/orddrfild/orddrfildlist/internetinwon" style="left:614px; top:77px; width:26px; height:19px; text-align:right; "/>
- <caption id="cap_internetinwon" class="cell_1" style="left:490px; top:75px; width:123px; height:23px; text-align:left; vertical-align:middle; ">인터넷 예약 가능인원</caption>
- <select1 id="radio2" ref="/root/main/ordlist/orddrfild/orddrfildlist/inetrsrvpossyn" appearance="full" cellspacing="4" cols="4" overflow="visible" style="left:220px; top:77px; width:270px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>불가</label>
- <value>N</value>
- </item>
- <item>
- <label>가능</label>
- <value>Y</value>
- </item>
- <item>
- <label>초진만 가능</label>
- <value>F</value>
- </item>
- <item>
- <label>재진만 가능</label>
- <value>R</value>
- </item>
- </choices>
- </select1>
- <select1 id="rdo_etcsche" ref="/root/main/regltempflag" visibility="hidden" appearance="full" cols="1" overflow="visible" style="left:1040px; top:80px; width:140px; height:41px; border-style:none; ">
- <choices>
- <item>
- <label>기타(임시)</label>
- <value>VV</value>
- </item>
- <item>
- <label>기타(검사)</label>
- <value>XX</value>
- </item>
- </choices>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
- model.setValue("/root/main/bfdatadel", '');
-
- var curDate = getCurrentDate();
-
- // model.setValue("/root/main/schecretfromdd", curDate);
- // model.setValue("/root/main/schecrettodd", curDate);
- model.setValue("/root/main/schecretfromdd", curDate);
- model.setValue("/root/main/schecrettodd", "20100228");
- model.refresh();
- ]]>
- </script>
- </select1>
- <button id="button9" class="btn2_letter8" disabled="true" style="left:852px; top:461px; width:108px; height:19px; ">
- <caption>초진정원으로 변경</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var row = grd_ordschecrite.row;
- // var col = grd_ordschecrite.col;
-
- var totalexamcap = parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap")));
- //진료일정기준자료가 섹션일 때만 사용가능
- if( grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("schecretbase") ) == 'T' ){
- messageBox("진료일정 생성기준이 [섹션]일 때만 선택한 상세기준자료를 초진정원으로 변경할 수 있습니다.", "E999", "");
- return false;
- }else if( totalexamcap > 0 ){
- messageBox("기준자료가 [총정원]을 갖을 때는 초진정원으로 변경할 수 없습니다.", "E999", "");
- return false;
- }
-
- //변경할 상세기준자료가 선택되지 않았을 때
- var checkCnt = getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[ check = 'Y' ]");
- if( checkCnt < 1 ) {
- messageBox("상세기준자료가 선택되지 않았습니다.", "E999", "");
- return false;
- }
-
- //선택된 초진 내역 정원 체크
- var fstexamcap = parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap")));
- if( checkCnt != fstexamcap ){
- messageBox("기준자료의 초진정원과 선택된 상세기준내역의 수가 다릅니다.( [초진정원 : " + fstexamcap + "], [선택내역 : " + checkCnt + " ] )" , "E999", "");
- return false;
- }
-
- var cnt = getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- for( var i = 1; i <= cnt; i ++ ){
- if( model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/check") == 'Y' ){
-
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/fstexamcap", 1); //초진정원세팅
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/reexamcap", 0); //재진정원세팅
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/totalexamcap", 0); //총정원세팅
- }else{
-
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/fstexamcap", 0); //초진정원세팅
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/reexamcap", 1); //재진정원세팅
- model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/totalexamcap", 0); //총정원세팅
- }
-
- if( grd_ordschecritedetail.rowStatus( i + 1 ) == 0 ){ //new
- grd_ordschecritedetail.rowStatus( i + 1 ) = 2; //update
- grd_ordschecritedetail.cellStyle("background-image", i + 1, grd_ordschecritedetail.colRef("check")) = "../../../com/commonweb/images/icon_u.gif";
- }else if( grd_ordschecritedetail.rowStatus( i + 1 ) == 2 ){ //update
- grd_ordschecritedetail.cellStyle("background-image", i + 1, grd_ordschecritedetail.colRef("check")) = "../../../com/commonweb/images/icon_u.gif";
- }else if( grd_ordschecritedetail.rowStatus( i + 1 ) == 1 ){ //insert
- grd_ordschecritedetail.rowStatus( i + 1 ) = 3; //insert & new
- grd_ordschecritedetail.cellStyle("background-image", i + 1, grd_ordschecritedetail.colRef("check")) = "../../../com/commonweb/images/icon_u.gif";
- }
- }
-
- model.refresh();
-
- ]]>
- </script>
- </button>
- <line id="line16" class="line_2" style="x1:792px; y1:98px; x2:1037px; y2:98px; "/>
- <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:1194px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption3" class="search_name" style="left:25px; top:9px; width:73px; height:17px; ">진료과 :</caption>
- <select1 id="cmb_orddept" ref="/root/main/orddeptcd" class="combo_search" appearance="minimal" style="left:102px; top:8px; width:150px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddept.value + "' ]";
- grd_orddr.rebuild();
-
- cmb_subdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '" + cmb_orddept.value + "' or dp = '-']";
- model.setValue("/root/main/subdeptcd", "-");
-
- fInitialize();
-
- model.removeNodeset("/root/init/subdeptcd2/subdeptcdlist");
- model.makeNode("/root/init/subdeptcd2/subdeptcdlist");
- copyNodesetType("/root/init/subdeptcd2/subdeptcdlist", "/root/init/subdeptcd/subdeptcdlist[dp = '" + cmb_orddept.value + "' or dp = '-']", "replace");
-
- ]]>
- </script>
- </select1>
- <caption id="caption23" style="left:365px; top:8px; width:414px; height:20px; ">이전자료삭제 시 예약환자유무체크 비활성화, 일정생성시 중복체크 비활성화</caption>
- <select1 id="cmb_subdeptcd" ref="/root/main/subdeptcd" class="combo_search" appearance="minimal" style="left:255px; top:8px; width:100px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /*
- cmb_subdeptcd.refresh();
-
- if( cmb_subdeptcd.value != '-' ){
- grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = '" + cmb_subdeptcd.value + "' ]";
- grd_orddr.rebuild();
- }else{
- grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddept.value + "' ]";
- grd_orddr.rebuild();
- }
-
-
- fInitialize();
- */
-
- ]]>
- </script>
- </select1>
- </group>
- <line id="line5" class="line_1" style="x1:120px; y1:222px; x2:1194px; y2:222px; "/>
- <caption id="caption8" class="tit_2" style="left:125px; top:207px; width:128px; height:13px; ">진료일정기준자료</caption>
- <line id="line12" class="line_1" style="x1:0px; y1:70px; x2:115px; y2:70px; "/>
- <caption id="caption5" class="tit_2" style="left:5px; top:55px; width:111px; height:13px; ">진료의사</caption>
- <datagrid id="grd_ordschecrite" nodeset="/root/main/ordlist/ordschecrite/ordschecritelist" caption="^선택^요일^센터^하위부서^오전진료^오전진료^오전진료^오후진료^오후진료^오후진료^야간진료^야간진료^야간진료^오전 Term^오후 Term^야간 Term^오전정원^오전정원^오후정원^오후정원^야간정원^야간정원^총정원^총정원^총정원^정원
합계^생성기준^특이사항(요일별클리닉)^요일별 비고^최초입력일^최종수정자^진료생성기간^진료의ID^진료과코드^일련번호^일정
번호^이력상태^old_dwcd|^선택^요일^센터^하위부서^진료^시작^종료^진료^시작^종료^진료^시작^종료^오전 Term^오후 Term^야간 Term^초진^재진^초진^재진^초진^재진^오전^오후^야간^정원
합계^섹션/구간^특이사항(요일별클리닉)^요일별 비고^최초입력일^최종수정자^진료생성기간^진료의ID^진료과코드^일련번호^일정
번호^이력상태^old_dwcd" colsep="^" colwidth="20, 35, 44, 85, 90, 35, 40, 40, 32, 40, 40, 33, 40, 40, 36, 36, 36, 35, 35, 36, 35, 35, 35, 35, 35, 35, 35, 65, 140, 135, 100, 100, 120, 59, 65, 32, 50, 59, 100" defaultrows="3" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="free" style="left:120px; top:227px; width:1074px; height:225px; ">
- <col class="update_n" ref="update"/>
- <col checkvalue="Y,N" ref="check" type="checkbox"/>
- <col ref="dwcd" type="combo" style="left:20px; top:43px; width:34px; height:23px; ">
- <choices>
- <itemset nodeset="/root/init/P0033list/P0033">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="centcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/centcd/centcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="subdeptcd" type="combo">
- <choices>
- <itemset nodeset="/root/init/subdeptcd2/subdeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col checkvalue="Y,N" disabled="true" ref="amordyn" type="checkbox" visibility="hidden"/>
- <col disabled="true" ref="amfromtm" type="input" format="hh:nn"/>
- <col disabled="true" ref="amtotm" type="input" format="hh:nn"/>
- <col checkvalue="Y,N" disabled="true" ref="pmordyn" type="checkbox" visibility="hidden"/>
- <col disabled="true" ref="pmfromtm" type="input" format="hh:nn"/>
- <col disabled="true" ref="pmtotm" type="input" format="hh:nn"/>
- <col checkvalue="Y,N" disabled="true" ref="nigtordyn" type="checkbox" visibility="hidden"/>
- <col disabled="true" ref="nigtfromtm" type="input" format="hh:nn"/>
- <col disabled="true" ref="nigttotm" type="input" format="hh:nn"/>
- <col disabled="true" ref="amterm" type="input" format="999"/>
- <col disabled="true" ref="pmterm" type="input" format="999"/>
- <col disabled="true" ref="nigtterm" type="input" format="999"/>
- <col disabled="true" ref="amfstexamcap" type="input" format="999"/>
- <col disabled="true" ref="amreexamcap" type="input" format="999"/>
- <col disabled="true" ref="pmfstexamcap" type="input" format="999"/>
- <col disabled="true" ref="pmreexamcap" type="input" format="999"/>
- <col disabled="true" ref="nigtfstexamcap" type="input" format="999"/>
- <col disabled="true" ref="nigtreexamcap" type="input" format="999"/>
- <col disabled="true" ref="amtotalexamcap" type="input"/>
- <col disabled="true" ref="pmtotalexamcap" type="input"/>
- <col disabled="true" ref="nigttotalexamcap" type="input"/>
- <col disabled="true" ref="totalexamcap"/>
- <col disabled="true" ref="schecretbase" type="combo">
- <choices>
- <itemset nodeset="/root/init/P0356list/P0356">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="clincnm" type="input" maxlength="50"/>
- <col ref="remfact" type="input" maxlength="100"/>
- <col ref="fstrgstdt" format="yyyy-mm-dd"/>
- <col ref="lastupdtrid"/>
- <col disabled="true" ref="fromtodd"/>
- <col ref="orddrid" visibility="hidden"/>
- <col ref="orddeptcd" visibility="hidden"/>
- <col ref="seqno" visibility="hidden"/>
- <col ref="scheno" visibility="hidden"/>
- <col ref="histstat" visibility="hidden"/>
- <col ref="dwcd_old" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- /*
- - 0 : new
- - 1 : insert
- - 2 : update
- - 3 : insert & new
- - 4 : delete
- */
-
- if( grd_ordschecrite.colRef("check") == grd_ordschecrite.col ){
- return false;
- }else if( grd_ordschecrite.colRef("dwcd") == grd_ordschecrite.col ){
-
- if( grd_ordschecrite.valueMatrix(grd_ordschecrite.row, grd_ordschecrite.colRef("dwcd_old")) != '' ){
- grd_ordschecrite.valueMatrix(grd_ordschecrite.row, grd_ordschecrite.colRef("dwcd")) = grd_ordschecrite.valueMatrix(grd_ordschecrite.row, grd_ordschecrite.colRef("dwcd_old"));
- messageBox("진료일정 기준자료에서 요일 정보는 수정할 수 없습니다. 변경하시려는 기준자료를 삭제 후 새로 등록하세요.", "E999", "");
- return false;
- }
- }
-
- var row = grd_ordschecrite.row;
- var curRowStatus = grd_ordschecrite.rowStatus(row);
- if( curRowStatus == 2 ){
- grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_u.gif";
- }
-
- fCalculateTotalExamcap();
-
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
- if (grd_ordschecrite.colType(grd_ordschecrite.col) == "input") {
- grd_ordschecrite.editCell();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- var cur_col = grd_ordschecrite.col;
- var cur_row = grd_ordschecrite.row;
- if( cur_row >= grd_ordschecrite.fixedRows && cur_col >= grd_ordschecrite.fixedCols ){
-
- if (grd_ordschecrite.rowStatus(cur_row) == "1" || grd_ordschecrite.rowStatus(cur_row) == "3"){
-
- return false;
- //messageBox("아직 저장하지 않은 기준자료는 상세기준자료가 없습니다.", "E999", "");
- }
-
-
- var totalexamcap = parseInt(grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("amtotalexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("pmtotalexamcap")))
- + parseInt(grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("nigttotalexamcap")));
- //진료일정기준자료가 섹션일 때만 사용가능
- if( grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("schecretbase") ) == 'T' ){
- //messageBox("진료일정 생성기준이 [섹션]일 때만 선택한 상세기준자료를 초진정원으로 변경할 수 있습니다.", "E999", "");
- //초진정원으로 변경 버튼 비활성화
- button9.disabled = true;
- grd_ordschecritedetail.colDisabled( grd_ordschecritedetail.colRef("check")) = true;
- }else if( totalexamcap > 0 ){
- //messageBox("기준자료가 [총정원]을 갖을 때는 초진정원으로 변경할 수 없습니다.", "E999", "");
- //초진정원으로 변경 버튼 비활성화
- button9.disabled = true;
- grd_ordschecritedetail.colDisabled( grd_ordschecritedetail.colRef("check")) = true;
- }else{
- //초진정원으로 변경 버튼 활성화
- button9.disabled = false;
- grd_ordschecritedetail.colDisabled( grd_ordschecritedetail.colRef("check")) = false;
- }
-
- fGetOrdScheCriteDetail();
-
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onrowchanged">
- <![CDATA[
- //2008-05-26 이동식 추가 다른 기준자료를 선택할때 조회된 상세자료를 삭제한다.
- if( getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist/check") > 0 ){
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- grd_ordschecritedetail.rebuild();
- }
-
- ]]>
- </script>
- </datagrid>
- <datagrid id="grd_orddr" class="datagrid2" backcoloralternate="transparent" caption="의사명^선택진료^진료과코드^진료의ID" colsep="^" colwidth="81, 31, 69, 72" dataheight="25" defaultrows="2" extendlastcol="false" focuscolor="#b9e5fb" mergecellsfixedrows="bycolrec" rowheight="25" rowsep="|" style="left:0px; top:75px; width:115px; height:659px; ">
- <col ref="nm"/>
- <col ref="sp"/>
- <col ref="dp" visibility="hidden"/>
- <col ref="cd" visibility="hidden"/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
- if( isDataCell() ){
- model.resetInstanceNode("/root/send");
- //진료일정기준자료 조회 함수 호출
- fGetOrdShceCrite();
- //최종일정생성일 조회
- // fGetLastOrdScheCretDD();
-
- var cur_row = grd_orddr.row;
- model.setValue("/root/hidden/drcheck","");
-
- if(cur_row > 0){
- model.setValue("/root/hidden/drcheck", grd_orddr.valueMatrix( cur_row, 1 ));
- }
- }
-
- ]]>
- </script>
- </datagrid>
- <caption id="caption7" class="tit_2" style="left:798px; top:55px; width:102px; height:13px; ">진료일정생성</caption>
- <caption id="caption9" class="cell_1" style="left:792px; top:100px; width:113px; height:46px; vertical-align:middle; ">
- <![CDATA[희망일정생성기간
- (From~To)]]>
- </caption>
- <line id="line4" class="line_1" style="x1:792px; y1:70px; x2:1194px; y2:70px; "/>
- <input id="ipt_fromdd" ref="/root/main/schecretfromdd" class="input_default" inputtype="date" style="left:908px; top:101px; width:129px; height:19px; ">
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
-
- var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
- model.resetInstanceNode("/root/main/selectedday");
-
- if (strDay == "월") {
- model.setValue("/root/main/selectedday/mon","Y");
- }else if (strDay == "화") {
- model.setValue("/root/main/selectedday/tue","Y");
- }else if (strDay == "수") {
- model.setValue("/root/main/selectedday/wed","Y");
- }else if (strDay == "목") {
- model.setValue("/root/main/selectedday/thu","Y");
- }else if (strDay == "금") {
- model.setValue("/root/main/selectedday/fri","Y");
- }else if (strDay == "토"){
- model.setValue("/root/main/selectedday/sat","Y");
- }
-
- model.refresh();
- ]]>
- </script>
- </input>
- <input id="ipt_todd" ref="/root/main/schecrettodd" class="input_default" inputtype="date" style="left:908px; top:125px; width:129px; height:19px; "/>
- <line id="line7" class="line_3" style="x1:793px; y1:176px; x2:1194px; y2:176px; "/>
- <line id="line2" class="line_1" style="x1:120px; y1:70px; x2:787px; y2:70px; "/>
- <caption id="caption1" class="tit_2" style="left:125px; top:55px; width:169px; height:13px; ">진료의사별전문분야</caption>
- <button id="btn_search4" class="btn5_letter7" style="left:1007px; top:49px; width:97px; height:19px; ">
- <caption>③진료일정생성</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fOrdScheCriteList();
-
-
- ]]>
- </script>
- </button>
- <button id="btn_copyrow" class="btn2_letter3" style="left:985px; top:201px; width:53px; height:19px; ">
- <caption>행복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- row = grd_ordschecrite.row - grd_ordschecrite.fixedRows + 1;
-
- if( row > 0 ){
- grd_ordschecrite.addRow(false);
- grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_i.gif";
-
- bottom = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
- model.copyNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]", "/root/main/ordlist/ordschecrite/ordschecritelist[" + row + "]");
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/seqno", 1);
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/dwcd_old", '');
-
- grd_ordschecrite.refresh();
- //grd_ordschecrite.rebuild();
- }else messageBox("복사할 행이 선택되지", "E007");
- ]]>
- </script>
- </button>
- <button id="btn_delrow" class="btn5_letter3" style="left:1041px; top:201px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var startRow = grd_ordschecrite.fixedRows;
- var endRow = grd_ordschecrite.rows;
- var checkRow = startRow;
- for( var i = startRow; i < endRow; i++){
-
- //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
- if( grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("check") ) == 'Y' ){
- var Row = i+1;
- //model.alert(Row);
- //model.alert(grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") ));
- if(grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") ) != '' && grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") ) != ' ' && grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") ) != '-' && grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") ) != '~'){
-
- var fromtodd = grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") );
- var todd = fromtodd.substring(9,17);
- var curDate = getCurrentDate();
-
- if(todd > curDate){
- if(messageBox("선택하신 기준자료는 이미 일정이 생성되어 있는 자료 입니다. 삭제하시려면 해당 진료일정을 삭제 후 다시 시도해 주세요", "E999") != 6) return;
- }
- }
- //디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
- if (grd_ordschecrite.rowStatus(i) == "1" || grd_ordschecrite.rowStatus(i) == "3"){
-
- grd_ordschecrite.deleteItem( i );
- continue;
- }else{
-
- grd_ordschecrite.addStatus( i, "delete");
- grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_d.gif";
- checkRow++;
-
- if(messageBox("선택된 행의 진료일정기준자료를", "Q001") != 6) return;
- }
- }
- }
-
- //삭제할 행의 정보를 send에 넣는다.
- model.resetInstanceNode("/root/send/updatedata");
- model.setValue("root/send/updatedata/datalist", grd_ordschecrite.getUpdateData("delete"));
-
- if ( submit("TXPMB00705") ) {
-
- //진료일정기준자료 조회 함수 호출
- //fGetOrdShceCrite();
- startRow = grd_ordschecrite.fixedRows;
- endRow = grd_ordschecrite.rows;
- checkRow = startRow;
- for( var i = startRow; i < endRow; i++){
-
- //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
- if( grd_ordschecrite.valueMatrix( checkRow, grd_ordschecrite.colRef("check") ) == 'Y' ){
- //디비에서 삭제한 데이터를 그리드에서 삭제한다.
- grd_ordschecrite.removeStatus(checkRow, "delete");
- grd_ordschecrite.deleteItem(checkRow);
- }else{
- checkRow++;
- }
- }
- //grd_ordschecrite.deleteItem( cur_row);
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
- }
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
- model.refresh();
- ]]>
- </script>
- </button>
- <button id="btn_save" class="btn5_letter7" style="left:1097px; top:201px; width:97px; height:19px; ">
- <caption>①기준자료저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //전문분야저장 주석처리
- //fSaveDrFild();
- fSave();
-
- //선택요일추가 초기화
- model.resetInstanceNode("/root/main/selectedday");
- ]]>
- </script>
- </button>
- <select1 id="radio1" ref="/root/main/regltempflag" visibility="hidden" appearance="full" cols="2" overflow="visible" style="left:960px; top:180px; width:135px; height:17px; border-style:none; ">
- <choices>
- <item>
- <label>오전진료</label>
- <value>YA</value>
- </item>
- <item>
- <label>오후진료</label>
- <value>YP</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // if( radio1.value == 'YM' || radio1.value == 'YA' ){
- // model.setValue("/root/main/bfdatadel", 'Del');
- //
- // }else{
- // model.setValue("/root/main/bfdatadel", '');
- // }
- //선택요일추가 초기화
- model.resetInstanceNode("/root/main/selectedday");
-
- model.setValue("/root/main/bfdatadel", '');
-
- //달력날짜 가져오기
- //var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
- model.resetInstanceNode("/root/main/selectedday");
-
- var strDay = getCurrentDate().toDate().getDayOfWeek("K");
- var curDate = getCurrentDate();
- model.setValue("/root/main/schecretfromdd", curDate);
- model.setValue("/root/main/schecrettodd", curDate);
-
- //var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
-
- if (strDay == "월") {
- model.setValue("/root/main/selectedday/mon","Y");
- }else if (strDay == "화") {
- model.setValue("/root/main/selectedday/tue","Y");
- }else if (strDay == "수") {
- model.setValue("/root/main/selectedday/wed","Y");
- }else if (strDay == "목") {
- model.setValue("/root/main/selectedday/thu","Y");
- }else if (strDay == "금") {
- model.setValue("/root/main/selectedday/fri","Y");
- }else if (strDay == "토"){
- model.setValue("/root/main/selectedday/sat","Y");
- }
-
- fSetCheckDay();
-
- model.setValue("/root/main/schecretfromdd", curDate);
- model.setValue("/root/main/schecrettodd", curDate);
-
- model.refresh();
- ]]>
- </script>
- </select1>
- <button id="btn_update" class="btn5_letter6" style="left:701px; top:49px; width:86px; height:19px; ">
- <caption>전문분야저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveDrFild();
- ]]>
- </script>
- </button>
- <button id="btn_delete" class="btn5_letter2" style="left:657px; top:49px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(messageBox("진료의사별 전문분야를", "Q001") != 6) return;
- /*
- var status = grd_orddrfild.rowStatus(1);
- //DB에 저장되지 않은 데이터의 경우 그리드에서만 삭제한다.
- if( status == "1" || status == "3"){
- //grd_orddrfild.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- grd_orddrfild.removeItem();
- grd_orddrfild.rebuild();
- //fAddDrFildRow();
- return;
- }
-
- grd_orddrfild.addStatus(1, "delete");
- model.setValue("/root/send/updatedata/datalist", grd_orddrfild.getUpdateData());
- */
- model.copyNode("/root/send/updatedata/datalist", "/root/main/ordlist/orddrfild/orddrfildlist");
- model.makeNode("/root/send/updatedata/datalist/m");
- model.setValue("/root/send/updatedata/datalist/m", "d");
-
- if(messageBox("전문분야를 삭제 하시겠습니까?", "Q999") != 6) return;
-
- if ( submit("TXPMB00704") ) {
-
- model.resetInstanceNode("/root/main/ordlist/orddrfild/orddrfildlist");
- model.refresh();
- //grd_orddrfild.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- //grd_orddrfild.removeItem();
- //grd_orddrfild.rebuild();
- //fAddDrFildRow();
- }
-
- model.removeNodeset("/root/send/updatedata/datalist");
- model.makeNode("/root/send/updatedata/datalist");
- //model.refresh();
-
- ]]>
- </script>
- </button>
- <button id="btn_addrow" class="btn2_letter3" style="left:929px; top:201px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fAddRow();
- grd_ordschecrite.refresh();
- ]]>
- </script>
- </button>
- <caption id="caption2" class="tit_2" style="left:125px; top:467px; width:153px; height:13px; ">요일별상세기준자료</caption>
- <line id="line3" class="line_1" style="x1:120px; y1:482px; x2:1194px; y2:482px; "/>
- <button id="button3" class="btn2_letter6" style="left:788px; top:201px; width:86px; height:19px; ">
- <caption>선택요일추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fAddOrdList();
-
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter3" style="left:963px; top:461px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- fAddRowDetail();
- grd_ordschecrite.refresh();
- ]]>
- </script>
- </button>
- <button id="button5" class="btn5_letter3" style="left:1019px; top:461px; width:53px; height:19px; ">
- <caption>행삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if(messageBox("선택된 행을", "Q001") != 6) return;
-
- var cur_row = grd_ordschecritedetail.row;
-
- if( cur_row > 0 ){
- //디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
- if (grd_ordschecritedetail.rowStatus(cur_row) == "1" || grd_ordschecritedetail.rowStatus(cur_row) == "3"){
-
- grd_ordschecritedetail.deleteItem(cur_row);
- return;
- }
-
- grd_ordschecritedetail.addStatus(cur_row, "delete");
- grd_ordschecritedetail.cellStyle("background-image", grd_ordschecritedetail.row, 1) = "../../../com/commonweb/images/icon_d.gif";
- //삭제할 행의 정보를 send에 넣는다.
- model.setValue("root/send/updatedata/datalist", grd_ordschecritedetail.getUpdateData("delete"));
-
- if ( submit("TXPMB00709") ) {
-
- grd_ordschecritedetail.removeStatus(cur_row, "delete");
- grd_ordschecritedetail.deleteItem( cur_row);
- }
-
-
- }
- ]]>
- </script>
- </button>
- <button id="button6" class="btn5_letter9" style="left:1075px; top:461px; width:119px; height:19px; ">
- <caption>②기준상세자료저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fSaveDetail();
- ]]>
- </script>
- </button>
- <caption id="caption4" class="cell_1" style="left:792px; top:76px; width:113px; height:23px; vertical-align:middle; ">최종진료생성일</caption>
- <output id="input1" ref="/root/main/lastcretdd" class="output_fix" format="yyyy-mm-dd" inputtype="date" appearance="output" style="left:908px; top:77px; width:129px; height:19px; "/>
- <select id="checkbox2" ref="/root/main/bfdatadel" disabled="true" visibility="hidden" overflow="visible" appearance="full" style="left:1098px; top:180px; width:96px; height:19px; border-style:none; ">
- <choices>
- <item>
- <label>이전자료삭제</label>
- <value>Del</value>
- </item>
- </choices>
- </select>
- <caption id="caption10" class="cell_1" style="left:120px; top:100px; width:95px; height:23px; vertical-align:middle; ">전문분야</caption>
- <caption id="caption11" class="cell_1" style="left:120px; top:125px; width:95px; height:23px; vertical-align:middle; ">초진 특이사항</caption>
- <caption id="caption12" class="cell_1" style="left:120px; top:150px; width:95px; height:23px; vertical-align:middle; ">재진 특이사항</caption>
- <line id="line6" class="line_3" style="x1:120px; y1:176px; x2:787px; y2:176px; "/>
- <bool id="bool1" checkvalue="Y,N" ref="/root/main/selectedday/mon" style="left:270px; top:187px; width:20px; height:20px; "/>
- <select id="checkbox1" ref="/root/main/selectedday/monampm" overflow="visible" appearance="full" style="left:305px; top:189px; width:45px; height:35px; border-style:none; ">
- <choices>
- <item>
- <label>오전</label>
- <value>AM</value>
- </item>
- <item>
- <label>오후</label>
- <value>PM</value>
- </item>
- </choices>
- </select>
- <caption id="caption13" style="left:288px; top:187px; width:15px; height:20px; ">월</caption>
- <select id="checkbox3" ref="/root/main/selectedday/tueampm" overflow="visible" appearance="full" style="left:392px; top:189px; width:45px; height:35px; border-style:none; ">
- <choices>
- <item>
- <label>오전</label>
- <value>AM</value>
- </item>
- <item>
- <label>오후</label>
- <value>PM</value>
- </item>
- </choices>
- </select>
- <bool id="bool2" checkvalue="Y,N" ref="/root/main/selectedday/tue" style="left:357px; top:187px; width:20px; height:20px; "/>
- <caption id="caption14" style="left:375px; top:187px; width:15px; height:20px; ">화</caption>
- <select id="checkbox4" ref="/root/main/selectedday/wedampm" overflow="visible" appearance="full" style="left:479px; top:189px; width:45px; height:35px; border-style:none; ">
- <choices>
- <item>
- <label>오전</label>
- <value>AM</value>
- </item>
- <item>
- <label>오후</label>
- <value>PM</value>
- </item>
- </choices>
- </select>
- <bool id="bool3" checkvalue="Y,N" ref="/root/main/selectedday/wed" style="left:444px; top:187px; width:20px; height:20px; "/>
- <caption id="caption15" style="left:462px; top:187px; width:15px; height:20px; ">수</caption>
- <select id="checkbox5" ref="/root/main/selectedday/thuampm" overflow="visible" appearance="full" style="left:566px; top:189px; width:45px; height:35px; border-style:none; ">
- <choices>
- <item>
- <label>오전</label>
- <value>AM</value>
- </item>
- <item>
- <label>오후</label>
- <value>PM</value>
- </item>
- </choices>
- </select>
- <bool id="bool4" checkvalue="Y,N" ref="/root/main/selectedday/thu" style="left:531px; top:187px; width:20px; height:20px; "/>
- <caption id="caption16" style="left:549px; top:187px; width:15px; height:20px; ">목</caption>
- <select id="checkbox6" ref="/root/main/selectedday/friampm" overflow="visible" appearance="full" style="left:653px; top:189px; width:45px; height:35px; border-style:none; ">
- <choices>
- <item>
- <label>오전</label>
- <value>AM</value>
- </item>
- <item>
- <label>오후</label>
- <value>PM</value>
- </item>
- </choices>
- </select>
- <bool id="bool5" checkvalue="Y,N" ref="/root/main/selectedday/fri" style="left:618px; top:187px; width:20px; height:20px; "/>
- <caption id="caption17" style="left:636px; top:187px; width:15px; height:20px; ">금</caption>
- <select id="checkbox7" ref="/root/main/selectedday/satampm" overflow="visible" appearance="full" style="left:740px; top:189px; width:45px; height:35px; border-style:none; ">
- <choices>
- <item>
- <label>오전</label>
- <value>AM</value>
- </item>
- <item>
- <label>오후</label>
- <value>PM</value>
- </item>
- </choices>
- </select>
- <bool id="bool6" checkvalue="Y,N" ref="/root/main/selectedday/sat" style="left:705px; top:187px; width:20px; height:20px; "/>
- <caption id="caption18" style="left:723px; top:187px; width:15px; height:20px; ">토</caption>
- <caption id="caption19" class="cell_1" style="left:120px; top:75px; width:95px; height:23px; text-align:left; vertical-align:middle; ">인터넷예약</caption>
- <button id="button1" class="btn5_letter6" style="left:1108px; top:49px; width:86px; height:19px; ">
- <caption>당일진료생성</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
- var Daytoday = getDateInterval(model.getValue("/root/main/schecretfromdd"),model.getValue("/root/main/schecrettodd"));
-
- //희망일자 생성기간과 진료일정 기준자료의 요일 비교 체크
- if(Daytoday < 7){
- var nodeList = instance1.selectNodes("/root/main/ordlist/ordschecrite/ordschecritelist[check='Y']");
- var rCSV = getNodeListCSV(nodeList);
- var rows = grd_ordschecrite.rows;
-
- if( rCSV == "" || rCSV == null || rCSV == undefined){
- messageBox("일정을 생성할 기준자료가 선택되지", "E007");
- return false;
- }else{
- //그리드 체크
- for( var i = 2; i < rows; i++){
- var cnt = "0";
- var dayinterval = Daytoday;
- var schecretfromdd = model.getValue("/root/main/schecretfromdd");
-
- if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '0' ){
- var dwcd = "일";
- }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '1' ){
- var dwcd = "월";
- }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '2' ){
- var dwcd = "화";
- }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '3' ){
- var dwcd = "수";
- }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '4' ){
- var dwcd = "목";
- }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '5' ){
- var dwcd = "금";
- }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '6' ){
- var dwcd = "토";
- }
-
- //model.alert(rows);
- //model.alert(schecretfromdd);
- //model.alert(dwcd);
-
- if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("check")) == 'Y' ){
- var cnt = "0";
- //model,alert("start");
- //model.alert(dayinterval);
- //요일수 체크
- for( var j = 0; j<dayinterval+1; j++){
- //model.alert(schecretfromdd);
-
- var dd = schecretfromdd.toDate().getDayOfWeek("K");
-
- if(dwcd == dd){
- //model.alert("aa");
- cnt = parseInt(cnt) + parseInt("1");
- }
- schecretfromdd = schecretfromdd.toDate().getAddDate(+1,"D").getDateFormat();
-
- }
-
- if(cnt <= "0"){
- messageBox("진료일정기준자료 "+ (i-1) + " 번째 줄의 요일과 희망일정생성기간이 상이 합니다. 확인 후 다시 시도해 주세요", "E999", "");
- return;
- }
- }
- }
-
- }
- }
-
- //당일진료생성 버튼 선택시 기준자료저장+기준상세자료저장+진료일정생성 버튼을 누른것과 같이 동작한다.
- if (model.getValue("/root/main/regltempflag") == "YY"){
- messageBox("정규일정 생성불가! '임시' 또는 '과임시'를 선택하신 후 '당일진료생성'하세요!", "E999", "");
- return false;
- }
-
- var rows = grd_ordschecrite.rows;
- var fixedRows = grd_ordschecrite.fixedRows;
- var dataRows = rows - fixedRows;
-
- model.removenode("/root/hidden/tmp");
- model.makeNode("/root/hidden/tmp");
- //선택요일추가 초기화
- model.resetInstanceNode("/root/main/selectedday");
-
- //오늘날짜 세팅
- if( model.getValue("/root/main/regltempflag") == 'XX' ){ //검사일정
-
- // model.setValue("/root/main/schecretfromdd", getCurrentDate());
- // model.setValue("/root/main/schecrettodd", model.getValue("/root/main/schecretfromdd"));
-
- }else{
-
- model.setValue("/root/main/schecretfromdd", getCurrentDate());
- model.setValue("/root/main/schecrettodd", getCurrentDate());
- }
-
-
- fOrdScheCriteList();
-
-
- for (var i = dataRows ; i>0; i--){
- // if (model.getValue("/root/hidden/tmp/ordschecritelist["+i+"]/check") == "Y"){
- // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/check", "Y");
- // }
- model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/check", "N");
- }
-
- ]]>
- </script>
- </button>
- <line id="line9" class="line_3" style="x1:1040px; y1:121px; x2:1194px; y2:121px; "/>
- <select1 id="rdo_reglsche" ref="/root/main/regltempflag" visibility="hidden" appearance="full" cols="2" rows="2" overflow="visible" style="left:1040px; top:80px; width:110px; height:31px; border-style:none; ">
- <choices>
- <item>
- <label>정규</label>
- <value>YY</value>
- </item>
- <item>
- <label>임시</label>
- <value>NN</value>
- </item>
- <item>
- <label>대진</label>
- <value>ZZ</value>
- </item>
- <item>
- <label>특별</label>
- <value>SS</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if( rdo_reglsche.value == 'YY' ){
- model.setValue("/root/main/bfdatadel", 'Del');
- var curDate = getCurrentDate();
-
- model.setValue("/root/main/schecretfromdd", curDate);
- model.setValue("/root/main/schecrettodd", "20100228");
-
- }else{
- model.setValue("/root/main/bfdatadel", '');
-
- var curDate = getCurrentDate();
-
- model.setValue("/root/main/schecretfromdd", curDate);
- model.setValue("/root/main/schecrettodd", "20100228");
- // model.setValue("/root/main/schecretfromdd", curDate);
- // model.setValue("/root/main/schecrettodd", curDate);
- }
-
-
- model.refresh();
- ]]>
- </script>
- </select1>
- <select1 id="combo1" ref="/root/send/fromampmflag" appearance="minimal" style="left:406px; top:461px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>오전</label>
- <value>A</value>
- </item>
- <item>
- <label>오후</label>
- <value>P</value>
- </item>
- <item>
- <label>전일</label>
- <value>AP</value>
- </item>
- </choices>
- </select1>
- <select1 id="combo2" ref="/root/send/fromdwcd" appearance="minimal" style="left:328px; top:461px; width:75px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/P0033list/P0033">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <caption id="caption20" style="left:290px; top:463px; width:45px; height:20px; ">From :</caption>
- <caption id="caption21" style="left:489px; top:461px; width:31px; height:20px; ">to :</caption>
- <select1 id="combo3" ref="/root/send/toampmflag" appearance="minimal" style="left:590px; top:460px; width:65px; height:19px; ">
- <choices>
- <item>
- <label>오전</label>
- <value>A</value>
- </item>
- <item>
- <label>오후</label>
- <value>P</value>
- </item>
- <item>
- <label>전일</label>
- <value>AP</value>
- </item>
- </choices>
- </select1>
- <select1 id="combo4" ref="/root/send/todwcd" appearance="minimal" style="left:512px; top:460px; width:75px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/P0033list/P0033">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <button id="button7" class="btn5_letter10" style="left:665px; top:460px; width:130px; height:19px; ">
- <caption>요일상세기준자료 복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var fromdwcd = model.getValue("/root/send/fromdwcd");
- var todwcd = model.getValue(" /root/send/todwcd");
- var fromampmflag = model.getValue("/root/send/fromampmflag");
- var toampmflag = model.getValue("/root/send/toampmflag");
- var fromscheno = "";
- var toscheno = "";
-
- var rows = grd_ordschecrite.rows;
- var fixedRows = grd_ordschecrite.fixedRows;
- var dataRows = rows - fixedRows;
- var check = 0;
- var check2 = 0;
- var flagcheck = 0;
- var flagcheck2 = 0;
- var checkfrom = 0;
- var checkto = 0;
-
- for (var i = dataRows ; i>0; i--){
- if (fromdwcd == model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/dwcd")){
-
-
- if(fromampmflag == 'A'){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y'){
- check = check +1
- checkfrom = 1;
- fromscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- }
- }else if(fromampmflag == 'P'){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
- check = check +1
- checkfrom = 1;
- fromscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- }
- }else if(fromampmflag == 'AP'){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y' && model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
- check = check +1
- checkfrom = 1;
- fromscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- }
- }
-
- if (check > 1 ){
- messageBox("복사기능은 From, To 에 해당하는 요일이 진료일정 기준자료에 하나만 존재할때만 가능합니다. 중복요일을 삭제처리하신 ", "E012");
- return false;
-
- }
- }
- if (todwcd == model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/dwcd") ){
-
- if(toampmflag == 'A'){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y'){
- check2 = check2 +1
- checkto = 1;
- toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- }
- }else if(toampmflag == 'P'){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
- check2 = check2 +1
- checkto = 1;
- toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- }
- }else if(toampmflag == 'AP'){
- if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y' && model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
- check2 = check2 +1
- checkto = 1;
- toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- }
- }
- /*
- check2 = check2 +1
- checkto = 1;
- toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
- */
- if (check2 > 1 ){
- messageBox("복사기능은 From, To 에 해당하는 요일이 진료일정 기준자료에 하나만 존재할때만 가능합니다. 중복요일을 삭제처리하신 ", "E012");
- return false;
- }
- }
- }
-
- if (checkfrom == 0 || checkto == 0){
- messageBox("복사기능은 From, To 에 해당하는 요일이 진료일정 기준자료에 존재하지 않습니다. 요일을 선택하신 ", "E012");
- return false;
- }
-
- var cur_row = grd_orddr.row;
-
- if(cur_row > 0){
- model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
- model.setValue("/root/send/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
- }else{
- messageBox("진료과/진료의사 정보를 가져올 수 없습니다. 진료과/진료의사를 선택해 주세요.", "E999", "");
- return false;
- }
-
- model.setValue("/root/send/fromscheno", fromscheno);
- model.setValue("/root/send/toscheno", toscheno);
-
-
- //2007-10-10 이동식 추가
- if( model.getValue("/root/send/fromampmflag") != model.getValue("/root/send/toampmflag") ){
- messageBox("복사할 요일별 오전오후구분이 같이야합니다.", "E999", "");
- return false;
- }
-
- //END..
-
-
- //return;
-
- if (submit("TXPMB00711")) {
- messageBox("복사처리가 정상적으로", "I002");
- model.setValue("/root/send/fromdwcd", "");
- model.setValue("/root/send/fromampmflag", "");
- model.setValue("/root/send/todwcd", "");
- model.setValue("/root/send/toampmflag", "");
-
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
-
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <select1 id="combo5" ref="/root/main/ordschecretno" class="combo_search" appearance="minimal" style="left:792px; top:151px; width:245px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/ordschecrethist/ordschecrethistlist">
- <label ref="weeks"/>
- <value ref="seqno"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- //2008-06-04 이동식 추가 - 사용자 요구사항 - fGetLastOrdScheCretDD
- //진료일정생성 후 변경이 있을때 기간별진료일정생성내역을 선택시 선택에 따라 진료일정기준자료가 보여지도록
- var seqno = model.getValue("/root/main/ordschecretno");
-
- if( seqno == '0' || seqno == '' || seqno == ' '){
-
- //진료일정기준자료 조회 함수 호출
- fGetOrdShceCrite();
- }else{
- //노드 초기화
- model.removeNodeset("/root/main/ordlist/ordschecrite/ordschecritelist");
- model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
-
- //선택된 일정생성차수에 해당하는 기준자료 조회
- model.setValue("/root/send/orddrid", grd_orddr.valueMatrix( grd_orddr.row, grd_orddr.colRef("cd") ));
- model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
- model.setValue("/root/send/ordcretdegree", model.getValue("/root/init/ordschecrethist/ordschecrethistlist[ seqno = " + seqno + " ]/ordcretdegree"));
-
- submit("TRPMB00712");
- }
- //model.refresh();
- ]]>
- </script>
- </select1>
- <datagrid id="grd_ordschecritedetail" nodeset="/root/main/ordlist/ordschecritedetail/ordschecritedetaillist" caption="^선택^요일^센터^하위부서^시간^시간구분^초진정원^재진정원^총정원^정원합계^예약구분^특이사항(요일별클리닉)^요일별 비고^최종수정일^진료의ID^진료과코드^일련번호^일정
번호^ordtm_old" colsep="^" colwidth="19, 36, 50, 85, 71, 55, 55, 55, 55, 55, 55, 100, 230, 323, 100, 59, 65, 32, 32, 100" defaultrows="2" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" selectionmode="free" subtotalposition="above" style="left:120px; top:485px; width:1074px; height:250px; ">
- <col class="update_n" ref="update"/>
- <col checkvalue="Y,N" ref="check" type="checkbox"/>
- <col disabled="true" ref="dwcd" type="combo" style="left:20px; top:43px; width:34px; height:23px; ">
- <choices>
- <itemset nodeset="/root/init/P0033list/P0033">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="centcd" type="combo" visibility="hidden">
- <choices>
- <itemset nodeset="/root/init/centcd/centcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="subdeptcd" type="combo" visibility="hidden">
- <choices>
- <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
- <label ref="nm"/>
- <value ref="cd"/>
- </itemset>
- </choices>
- </col>
- <col ref="ordtm" type="input" format="hh:nn"/>
- <col ref="ampmflag" type="combo">
- <choices>
- <itemset nodeset="/root/init/P0316list/P0316">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="fstexamcap" type="input" format="999"/>
- <col ref="reexamcap" type="input" format="999"/>
- <col ref="totalexamcap" type="input"/>
- <col ref="examcapsum"/>
- <col ref="etcrsrvflag" type="combo">
- <choices>
- <itemset nodeset="/root/init/P6590list/P6590">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col ref="clincnm" type="input" maxlength="50"/>
- <col ref="remfact" type="input" maxlength="100"/>
- <col ref="lastupdtdt" visibility="visible" format="yyyy-mm-dd"/>
- <col ref="orddrid" visibility="hidden"/>
- <col ref="orddeptcd" visibility="hidden"/>
- <col ref="seqno" visibility="hidden"/>
- <col ref="scheno" visibility="hidden"/>
- <col ref="ordtm_old" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- /*
- - 0 : new
- - 1 : insert
- - 2 : update
- - 3 : insert & new
- - 4 : delete
- */
-
- if( grd_ordschecritedetail.colRef("check") == grd_ordschecritedetail.col ){
- return false;
- }
-
- var row = grd_ordschecritedetail.row;
- var curRowStatus = grd_ordschecritedetail.rowStatus(row);
- if( curRowStatus == 2 ){
- grd_ordschecritedetail.cellStyle("background-image", grd_ordschecritedetail.row, 1) = "../../../com/commonweb/images/icon_u.gif";
- }
-
- fCalculateTotalExamcapDetail();
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
- if (grd_ordschecritedetail.colType(grd_ordschecritedetail.col) == "input") {
- grd_ordschecritedetail.editCell();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- grd_ordschecritedetail.attribute("top") = "180";
- grd_ordschecritedetail.attribute("height") = "554";
- button8.visible = true;
- ]]>
- </script>
- </datagrid>
- <button id="button8" class="btn4_letter3" visibility="hidden" style="left:1125px; top:710px; width:68px; height:22px; ">
- <caption>창축소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_ordschecritedetail.attribute("top") = "485";
- grd_ordschecritedetail.attribute("height") = "249";
- button8.visible = false;
- ]]>
- </script>
- </button>
- <button id="button10" class="btn5_letter6" style="left:1042px; top:150px; width:86px; height:19px; ">
- <caption>진료일정삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- //2008-06-04 이동식 추가 - 사용자 요구사항 - fGetLastOrdScheCretDD
- //진료일정생성 후 변경이 있을때 기간별진료일정생성내역을 선택시 선택에 따라 진료일정기준자료가 보여지도록
- var seqno = model.getValue("/root/main/ordschecretno");
- if( seqno == '0' || seqno == '' || seqno == ' '){
- //진료일정기준자료 조회 함수 호출
- messageBox("삭제할 진료일정생성내역을 선택하세요!", "E999", "");
-
- }else{
- if( messageBox("선택한 진료일정생성내역을 삭제하시겠습니까?", "Q999", "") != 6 ){
- return false;
- }
-
- //선택된 일정생성차수에 해당하는 기준자료 조회
- model.setValue("/root/send/orddrid", grd_orddr.valueMatrix( grd_orddr.row, grd_orddr.colRef("cd") ));
- model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
- model.setValue("/root/send/ordcretdegree", model.getValue("/root/init/ordschecrethist/ordschecrethistlist[ seqno = " + seqno + " ]/ordcretdegree"));
-
- if(submit("TXPMB00713")){
- fGetLastOrdScheCretDD();
- }
- }
- //model.refresh();
-
- ]]>
- </script>
- </button>
- <textarea id="textarea1" ref="/root/main/ordlist/orddrfild/orddrfildlist/ordfild" maxlength="400" style="left:220px; top:102px; width:566px; height:19px; ">
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- textarea1.attribute("top") = "77";
- textarea1.attribute("height") = "98";
-
- textarea1.visible = true;
- textarea2.visible = false;
- textarea3.visible = false;
- button11.visible = true;
-
- caption10.attribute("font-weight") = "bold";
- caption11.initStyle("font-weight");
- caption12.initStyle("font-weight");
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- textarea1.attribute("top") = "102";
- textarea1.attribute("height") = "19";
-
- textarea1.visible = true;
- textarea2.visible = true;
- textarea3.visible = true;
- button11.visible = false;
-
- caption10.initStyle("font-weight");
- caption11.initStyle("font-weight");
- caption12.initStyle("font-weight");
- ]]>
- </script>
- </textarea>
- <textarea id="textarea2" ref="/root/main/ordlist/orddrfild/orddrfildlist/fstexamrem" maxlength="400" style="left:220px; top:126px; width:566px; height:19px; ">
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- textarea2.attribute("top") = "77";
- textarea2.attribute("height") = "98";
-
- textarea1.visible = false;
- textarea2.visible = true;
- textarea3.visible = false;
- button11.visible = true;
-
- caption10.initStyle("font-weight");
- caption11.attribute("font-weight") = "bold";
- caption12.initStyle("font-weight");
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- textarea2.attribute("top") = "126";
- textarea2.attribute("height") = "19";
-
- textarea1.visible = true;
- textarea2.visible = true;
- textarea3.visible = true;
- button11.visible = false;
-
- caption10.initStyle("font-weight");
- caption11.initStyle("font-weight");
- caption12.initStyle("font-weight");
- ]]>
- </script>
- </textarea>
- <textarea id="textarea3" ref="/root/main/ordlist/orddrfild/orddrfildlist/reexamrem" maxlength="400" style="left:220px; top:152px; width:566px; height:19px; ">
- <script type="javascript" ev:event="DOMFocusIn">
- <![CDATA[
- textarea3.attribute("top") = "77";
- textarea3.attribute("height") = "98";
-
- textarea1.visible = false;
- textarea2.visible = false;
- textarea3.visible = true;
- button11.visible = true;
-
- caption10.initStyle("font-weight");
- caption11.initStyle("font-weight");
- caption12.attribute("font-weight") = "bold";
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- textarea3.attribute("top") = "152";
- textarea3.attribute("height") = "19";
-
- textarea1.visible = true;
- textarea2.visible = true;
- textarea3.visible = true;
- button11.visible = false;
-
- caption10.initStyle("font-weight");
- caption11.initStyle("font-weight");
- caption12.initStyle("font-weight");
- ]]>
- </script>
- </textarea>
- <button id="button11" class="btn5_letter3" visibility="hidden" style="left:602px; top:49px; width:53px; height:19px; ">
- <caption>창축소</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- textarea1.attribute("top") = "102";
- textarea1.attribute("height") = "19";
-
- textarea2.attribute("top") = "126";
- textarea2.attribute("height") = "19";
-
- textarea3.attribute("top") = "152";
- textarea3.attribute("height") = "19";
-
- textarea1.visible = true;
- textarea2.visible = true;
- textarea3.visible = true;
- button11.visible = false;
-
- caption10.initStyle("font-weight");
- caption11.initStyle("font-weight");
- caption12.initStyle("font-weight");
- ]]>
- </script>
- </button>
- <caption id="caption24" style="left:635px; top:76px; width:20px; height:20px; "/>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
- <button id="button27" class="btn3_letter6" style="left:0px; top:5px; width:104px; height:22px; ">
- <caption>휴진일정등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- open("SMPMB02500", "1", "50", "50", "SMPMB02500", "", "");
- ]]>
- </script>
- </button>
- <button id="button25" class="btn3_letter4" style="left:106px; top:5px; width:80px; height:22px; ">
- <caption>병원달력</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- open("SPPMB01003", "1", "150", "150", "SPPMB01003", "", "");
- ]]>
- </script>
- </button>
- <button id="btn_addrow5" class="btn4_letter3" style="left:1127px; top:5px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- <button id="button20" class="btn3_letter8" style="left:188px; top:5px; width:130px; height:22px; ">
- <caption>진료일정상세조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- cur_row = grd_orddr.row;
-
- if(cur_row > 0){
- setParameter("SMPMB00800_ORDDEPTCD", model.getValue("/root/main/orddeptcd"));
- setParameter("SMPMB00800_ORDDRID", grd_orddr.valueMatrix( cur_row, 3 ));
- }
-
- open("SMPMB00800", "1", "50", "50", "SMPMB00800", "", "");
- ]]>
- </script>
- </button>
- <button id="button2" class="btn3_letter6" visibility="hidden" style="left:319px; top:5px; width:104px; height:22px; ">
- <caption>의사일정복사</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- cur_row = grd_orddr.row;
-
- if(cur_row > 0){
- model.setValue("/root/temp/source/orddeptcd", model.getValue("/root/main/orddeptcd"));
- model.setValue("/root/temp/source/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
- }
-
- modal("SPPMB01100", "1", "150", "150", "SPPMB01100", "/root/temp/source", "/root/temp");
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|