SMPMB00700_의사진료일정기준관리.xrw 139 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>진료일정 등록</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <schecretfromdd/>
  11. <schecrettodd/>
  12. <bfdatadel>Del</bfdatadel>
  13. <regltempflag/>
  14. <ordlist>
  15. <orddrfild>
  16. <orddrfildlist>
  17. <ordfild/>
  18. <fstexamrem/>
  19. <reexamrem/>
  20. <orddrid/>
  21. <orddeptcd/>
  22. <seqno/>
  23. <inetrsrvpossyn/>
  24. <internetinwon/>
  25. </orddrfildlist>
  26. </orddrfild>
  27. <ordschecrite>
  28. <ordschecritelist/>
  29. </ordschecrite>
  30. <ordschecritedetail>
  31. <ordschecritedetaillist/>
  32. </ordschecritedetail>
  33. </ordlist>
  34. <result/>
  35. <orddeptcd/>
  36. <selectedday>
  37. <mon/>
  38. <monampm/>
  39. <tue/>
  40. <tueampm/>
  41. <wed/>
  42. <wedampm/>
  43. <thu/>
  44. <thuampm/>
  45. <fri/>
  46. <friampm/>
  47. <sat/>
  48. <satampm/>
  49. </selectedday>
  50. <lastcretdd/>
  51. <ordschecrethist/>
  52. <ordschecretno/>
  53. <subdeptcd/>
  54. <holicheck>
  55. <biweeklycheck>
  56. <check/>
  57. </biweeklycheck>
  58. </holicheck>
  59. <biweekcheck>
  60. <fromdd/>
  61. <todd/>
  62. <orddrid/>
  63. <orddeptcd/>
  64. </biweekcheck>
  65. </main>
  66. <send>
  67. <orddeptcd/>
  68. <orddrid/>
  69. <dwcd/>
  70. <seqno/>
  71. <scheno/>
  72. <updatedata>
  73. <datalist/>
  74. </updatedata>
  75. <fromdwcd/>
  76. <fromampmflag/>
  77. <fromscheno/>
  78. <todwcd/>
  79. <toampmflag/>
  80. <toscheno/>
  81. <ordcretdegree/>
  82. <allyn/>
  83. </send>
  84. <init>
  85. <P0033list>
  86. </P0033list>
  87. <orddeptcd>
  88. <orddeptcdlist>
  89. <cd/>
  90. <nm/>
  91. </orddeptcdlist>
  92. </orddeptcd>
  93. <orddrid>
  94. <orddridlist>
  95. <cd/>
  96. <nm/>
  97. <dp/>
  98. <sp/>
  99. </orddridlist>
  100. </orddrid>
  101. <P0316list>
  102. </P0316list>
  103. <P0356list/>
  104. <ordschecrethist>
  105. <ordschecrethistlist/>
  106. </ordschecrethist>
  107. <P6590list/>
  108. </init>
  109. <hidden>
  110. <tmp/>
  111. <rCSV/>
  112. <drcheck/>
  113. <capacheck>
  114. <capachecklist>
  115. <cdid/>
  116. <cdnm/>
  117. </capachecklist>
  118. </capacheck>
  119. </hidden>
  120. <temp>
  121. <source>
  122. <orddeptcd/>
  123. <orddrid/>
  124. </source>
  125. <rCSV/>
  126. </temp>
  127. </root>
  128. </instance>
  129. <submission id="TRZBC00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance"/>
  130. <submission id="TRPMB00701" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordlist/ordschecritedetail"/>
  131. <submission id="TRPMB00702" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  132. <submission id="TRPMB00703" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  133. <submission id="TXPMB00704" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  134. <submission id="TXPMB00705" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  135. <submission id="TXPMB00706" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  136. <submission id="TRPMB00707" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordlist/orddrfild"/>
  137. <submission id="TXPMB00708" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  138. <submission id="TRPAM00101" mediatype="application/x-www-form-urlencoded" method="post" replace="instance" resultref="/root/hidden/tmp"/>
  139. <submission id="TXPMB00709" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  140. <submission id="TXPMB00710" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/updatedata" resultref="/root/main/result"/>
  141. <submission id="TXPMB00711" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  142. <submission id="TRPMB00712" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/ordlist"/>
  143. <submission id="TXPMB00713" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result"/>
  144. <submission id="TRPMB00714" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/biweekcheck" resultref="/root/main/holicheck"/>
  145. <submission id="TXPMB00715" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/main/biweekcheck" resultref="/root/main/result"/>
  146. <submission id="TRPMB00716" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/hidden/capacheck"/>
  147. <submission id="TRPAM00105" mediatype="application/x-www-form-urlencoded" method="post"/>
  148. </model>
  149. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  150. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  151. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  152. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  153. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM.js"/>
  154. <script type="javascript" src="../../../pam/pamcomnweb/js/PAM001.js"/>
  155. <script type="javascript" ev:event="xforms-ready">
  156. <![CDATA[
  157. zbcfGetCodeList(new Array("P0033", "P0316", "P0356"), new Array("/root/init/P0033list", "/root/init/P0316list", "/root/init/P0356list"), true, new Array("cdid", ""), new Array("asc", "") );
  158. pamfGetCodeList(new Array("P6590"), new Array("/root/init/P6590list"));
  159. var menu = 'S'; //getScreenMenuParameter();
  160. fCapaCheck();
  161. /*
  162. var capacheckyn = model.getValue("/root/hidden/capacheck/capachecklist[cdid=10]/cdnm");
  163. var capano = model.getValue("/root/hidden/capacheck/capachecklist[cdid=20]/cdnm");
  164. // var cdid = model.getValue("/root/hidden/capacheck[cdid='" + 변수 +"']/cdnm");
  165. //var cdnm = model.getValue("/root/hidden/capacheck/cdnm");
  166. //model.alert(cdnm);
  167. */
  168. //menu = 'S'
  169. //팝업으로 열릴때 진료일정생성 버튼 비활성화
  170. if (menu != 'S'){ //팝업화면으로 사용될 때
  171. btn_search4.disabled = true;
  172. rdo_reglsche.visible = false;
  173. rdo_etcsche.visible = true;
  174. textarea1.disabled = true;
  175. textarea2.disabled = true;
  176. textarea3.disabled = true;
  177. btn_delete.disabled = true;
  178. btn_update.disabled = true;
  179. button27.disabled = true;
  180. //진료일정삭제버튼
  181. button10.disabled = true;
  182. }else{
  183. rdo_reglsche.visible = true;
  184. rdo_etcsche.visible = false;
  185. }
  186. pamGetDeptCDDrIDList();
  187. model.refresh();
  188. fInitialize();
  189. //grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = " + cmb_orddept.value + "]";
  190. //grd_orddr.rebuild();
  191. ]]>
  192. </script>
  193. <script type="javascript">
  194. <![CDATA[
  195. //최종일정생성일을 조회합니다.
  196. function fGetLastOrdScheCretDD(){
  197. var cur_row = grd_orddr.row;
  198. if( cur_row > 0){
  199. model.setValue("/root/send/orddrid", grd_orddr.valueMatrix(cur_row, 3));
  200. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
  201. if( ! submit("TRPMB00702") ){
  202. messageBox("최종일정생성일을 가져올 수 없습니다.", "E999", "");
  203. }else{
  204. //기간별일정 생성 내역 조회
  205. model.removeNodeset("/root/init/ordschecrethist");
  206. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/weeks", "기간별 진료일정생성 내역");
  207. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/fromdd", "");
  208. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/todd", "");
  209. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/seqno", "0");
  210. model.setValue("/root/main/ordschecrethist", "0");
  211. copyNodeType("/root/init/ordschecrethist", "/root/main/result/ordschecrethist", "after");
  212. var curDate = model.getValue("/root/main/result/lastordschecret/lastcretdd");
  213. model.setValue("/root/main/lastcretdd", curDate);
  214. model.setValue("/root/main/ordschecretno", "0");
  215. if( curDate == '' || curDate == ' '){
  216. curDate = getCurrentDate();
  217. }else{
  218. /* curDate = curDate.toDate().getAddDate(1, "D");
  219. var tmpDate = curDate.getFullYear();
  220. tmpDate = tmpDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  221. curDate = tmpDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ; */
  222. }
  223. // model.setValue("/root/main/schecretfromdd", curDate);
  224. model.setValue("/root/main/schecretfromdd", getCurrentDate());
  225. // curDate = curDate.toDate().getAddDate(1,"Y");
  226. // var nextDate = curDate.getFullYear();
  227. // nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  228. // nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  229. //
  230. // model.setValue("/root/main/schecrettodd", nextDate);
  231. if( isValidDateTime(curDate, "YYYYMMDD") ){
  232. model.setValue("/root/main/schecrettodd", curDate);
  233. }else{
  234. model.setValue("/root/main/schecrettodd", "20100228");
  235. }
  236. // model.setValue("/root/main/schecrettodd", "20100228");
  237. model.refresh();
  238. }
  239. }else return;
  240. }
  241. //진료일정 기준 상세 자료를 조회한다.
  242. function fGetOrdScheCriteDetail(){
  243. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  244. //grd_ordschecritedetail.rebuild();
  245. grd_ordschecritedetail.rebuildStyle();
  246. var cur_row = grd_ordschecrite.row - 1;
  247. if( cur_row > 0){
  248. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/orddeptcd"));
  249. model.setValue("/root/send/orddrid", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/orddrid"));
  250. model.setValue("/root/send/dwcd", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/dwcd"));
  251. //model.setValue("/root/send/seqno", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/seqno"));
  252. model.setValue("/root/send/scheno", model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/scheno"));
  253. if(submit("TRPMB00701")){
  254. grd_ordschecritedetail.backcoloralternate = "transparent";
  255. grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("fstexamcap"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
  256. grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("reexamcap"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
  257. grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("totalexamcap"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
  258. grd_ordschecritedetail.subtotal("sum", -1, grd_ordschecritedetail.colRef("examcapsum"), "format:#,###; roundmode:round; roundpostion:2", "background-color:#f4f4f4; font-weight:bold; ", 5, "합계 : ", true);
  259. setRowStyle("grd_ordschecritedetail", "2", "1", "fstexamcap");
  260. }
  261. }
  262. /*
  263. if( getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist") > 0 ){
  264. grd_ordschecritedetail.attribute("top") = "152";
  265. grd_ordschecritedetail.attribute("height") = "581";
  266. button8.visible = true;
  267. }
  268. */
  269. model.refresh();
  270. }
  271. //진료일정 기준 자료를 조회한다.
  272. function fGetOrdShceCrite(){
  273. var cur_row = grd_orddr.row;
  274. if( cur_row > 0){
  275. model.setValue("/root/send/orddrid", grd_orddr.valueMatrix(cur_row, 3));
  276. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
  277. for( var i = 2; i <= grd_ordschecrite.rows; i++ ){
  278. grd_ordschecrite.cellStyle("background-image", i, 1) = "../../../com/commonweb/images/icon_n.gif";
  279. }
  280. //진료일정기준자료 조회, 진료의사별전문분야 조회
  281. if(submit("TRPMB00703")){
  282. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  283. model.copyNode("/root/main/ordlist/ordschecrite", "/root/main/result/ordschecrite");
  284. model.copyNode("/root/main/ordlist/orddrfild", "/root/main/result/orddrfild");
  285. model.refresh();
  286. //기간별일정 생성 내역 조회
  287. model.removeNodeset("/root/init/ordschecrethist");
  288. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/weeks", "기간별 진료일정생성 내역");
  289. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/fromdd", "");
  290. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/todd", "");
  291. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/seqno", "0");
  292. model.setValue("/root/main/ordschecrethist", "0");
  293. copyNodeType("/root/init/ordschecrethist", "/root/main/result/ordschecrethist", "after");
  294. var curDate = model.getValue("/root/main/result/lastordschecret/lastcretdd");
  295. model.setValue("/root/main/lastcretdd", curDate);
  296. model.setValue("/root/main/ordschecretno", "0");
  297. if( curDate == '' || curDate == ' '){
  298. curDate = getCurrentDate();
  299. }
  300. model.setValue("/root/main/schecretfromdd", getCurrentDate());
  301. if( isValidDateTime(curDate, "YYYYMMDD") ){
  302. model.setValue("/root/main/schecrettodd", curDate);
  303. }else{
  304. model.setValue("/root/main/schecrettodd", "20100228");
  305. }
  306. }
  307. model.refresh();
  308. }else return;
  309. }
  310. //진료일정 요일별 상세기준자료 정원합계 계산
  311. function fCalculateTotalExamcapDetail(){
  312. var cur_row = grd_ordschecritedetail.row -1 ;
  313. var fstexamcap = model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/fstexamcap");
  314. if( fstexamcap == '' ){
  315. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/fstexamcap", 0);
  316. fstexamcap = 0;
  317. }
  318. var reexamcap = model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/reexamcap");
  319. if( reexamcap == '' ){
  320. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/reexamcap", 0);
  321. reexamcap = 0;
  322. }
  323. var totalexamcap = model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/totalexamcap");
  324. if( totalexamcap == '' ){
  325. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/totalexamcap", 0);
  326. totalexamcap = 0;
  327. }
  328. if( (parseInt(fstexamcap) > 0 || parseInt(reexamcap) > 0) && parseInt(totalexamcap) > 0 ){
  329. messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 수정해주십시요.", "E999", "");
  330. }
  331. if( grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("schecretbase")) == 'U' ){
  332. }
  333. var sum = 0;
  334. sum = sum + parseInt( fstexamcap );
  335. sum = sum + parseInt( reexamcap );
  336. sum = sum + parseInt( totalexamcap );
  337. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + cur_row + "]/examcapsum", sum);
  338. model.refresh();
  339. }
  340. //진료일정기준자료테이블에서 '환자수'가 변할 경우 '총환자수'를 새로 계산해 준다.
  341. function fCalculateTotalExamcap(){
  342. var cur_row = grd_ordschecrite.row - 1;
  343. var amfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amfstexamcap");
  344. if( amfstexamcap == '' ){
  345. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amfstexamcap", 0);
  346. amfstexamcap = 0;
  347. }
  348. var amreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amreexamcap");
  349. if( amreexamcap == '' ){
  350. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amreexamcap", 0);
  351. amreexamcap = 0;
  352. }
  353. var amtotalexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amtotalexamcap");
  354. if( amtotalexamcap == '' ){
  355. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/amtotalexamcap", 0);
  356. amtotalexamcap = 0;
  357. }
  358. if( (parseInt(amfstexamcap) > 0 || parseInt(amreexamcap) > 0) && parseInt(amtotalexamcap) > 0 ){
  359. messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 오전정원을 수정해주십시요.", "E999", "");
  360. }
  361. var pmfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmfstexamcap");
  362. if( pmfstexamcap == '' ){
  363. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmfstexamcap", 0);
  364. pmfstexamcap = 0;
  365. }
  366. var pmreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmreexamcap");
  367. if( pmreexamcap == '' ){
  368. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmreexamcap", 0);
  369. pmreexamcap = 0;
  370. }
  371. var pmtotalexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmtotalexamcap");
  372. if( pmtotalexamcap == '' ){
  373. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/pmtotalexamcap", 0);
  374. pmtotalexamcap = 0;
  375. }
  376. if( (parseInt(pmfstexamcap) > 0 || parseInt(pmreexamcap) > 0) && parseInt(pmtotalexamcap) > 0 ){
  377. messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 오후정원을 수정해주십시요.", "E999", "");
  378. }
  379. var nigtfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtfstexamcap");
  380. if( nigtfstexamcap == '' ){
  381. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtfstexamcap", 0);
  382. nigtfstexamcap = 0;
  383. }
  384. var nigtreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtreexamcap");
  385. if( nigtreexamcap == '' ){
  386. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigtreexamcap", 0);
  387. nigtreexamcap = 0;
  388. }
  389. var nigttotalexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigttotalexamcap");
  390. if( nigttotalexamcap == '' ){
  391. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/nigttotalexamcap", 0);
  392. nigttotalexamcap = 0;
  393. }
  394. if( (parseInt(nigtfstexamcap) > 0 || parseInt(nigtreexamcap) > 0) && parseInt(nigttotalexamcap) > 0 ){
  395. messageBox("초/재진정원과 총정원을 동시에 입력하실 수 없습니다. 야간정원을 수정해주십시요.", "E999", "");
  396. }
  397. var sum = 0;
  398. sum = sum + parseInt(amfstexamcap);
  399. sum = sum + parseInt(amreexamcap);
  400. sum = sum + parseInt(amtotalexamcap);
  401. sum = sum + parseInt(pmfstexamcap);
  402. sum = sum + parseInt(pmreexamcap);
  403. sum = sum + parseInt(pmtotalexamcap);
  404. sum = sum + parseInt(nigtfstexamcap);
  405. sum = sum + parseInt(nigtreexamcap);
  406. sum = sum + parseInt(nigttotalexamcap);
  407. if( model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/schecretbase") == 'T' ){
  408. var termCount = fCheckDataForCalc(grd_ordschecrite.row);
  409. if( termCount > 0 ){
  410. sum = sum * termCount;
  411. }else{
  412. sum = 0;
  413. }
  414. }
  415. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + cur_row + "]/totalexamcap", sum);
  416. // model.refresh();
  417. }
  418. //오전/오후/야간 별 총 정원을 계산한다.
  419. function fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ){
  420. var countInterval = 0;
  421. var sumCap = 0;
  422. var returnValue = 0;
  423. if( fromtm == "" && totm == "" ){
  424. return returnValue;
  425. }else{
  426. if( isValidDateTime( fromtm, "hhmm") ){
  427. if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
  428. if( isNaN( term ) || parseInt(term) <= 0 ){
  429. return returnValue;
  430. }
  431. //정원체크 초/재진정원과 총정원 동시입력체크
  432. if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
  433. return returnValue;
  434. }
  435. //총정원 체크
  436. if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
  437. //초진정원 체크
  438. if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
  439. return returnValue;
  440. }
  441. //grd_ordschecrite.valueMatrix( row, 21) = 0;
  442. }else{
  443. //grd_ordschecrite.valueMatrix( row, 15) = 0;
  444. //grd_ordschecrite.valueMatrix( row, 18) = 0;
  445. }
  446. }else{
  447. return returnValue;
  448. }
  449. }else{
  450. return returnValue;
  451. }
  452. //텀 갯수 계산
  453. //sumCap = parseInt(fstexam) + parseInt(reexam) + parseInt(totalexam);
  454. countInterval = getTimeInterval( fromtm, totm ) / 60; //두 시간 차를 초단위로 리턴 / 60 ==> 분단위로 변환
  455. returnValue = Math.ceil(countInterval / parseInt(term) );
  456. return returnValue;
  457. }
  458. }
  459. //오전/오후/야간 별 데이터 무결성 검사 밑 정원 계산을 호출한다.
  460. function fCheckDataForCalc(row){
  461. var TermCnt = 0;
  462. var fromtm = "";
  463. var totm = "";
  464. var term = "";
  465. var fstexam = "";
  466. var reexam = "";
  467. var ampmnigt = "";
  468. //진료시간 체크 -- 오전
  469. fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfromtm"));
  470. totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotm"));
  471. term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm"));
  472. fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap"));
  473. reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap"));
  474. totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap"));
  475. TermCnt = TermCnt + parseInt( fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ) );
  476. //진료시간 체크 -- 오후
  477. fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfromtm"));
  478. totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotm"));
  479. term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm"));
  480. fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap"));
  481. reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap"));
  482. totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap"));
  483. TermCnt = TermCnt + parseInt( fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ) );
  484. //진료시간 체크 -- 야간
  485. fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfromtm"));
  486. totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotm"));
  487. term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm"));
  488. fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap"));
  489. reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap"));
  490. totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap"));
  491. TermCnt = TermCnt + parseInt( fGetTermCnt( fromtm, totm, term, fstexam, reexam, totalexam ) );
  492. return TermCnt;
  493. }
  494. //진료일정기준상세 테이블에 새로운 행을 추가한다.
  495. function fAddRowDetail(){
  496. cur_row = grd_ordschecrite.row;
  497. if( cur_row > 1 ){
  498. grd_ordschecritedetail.addRow(false);
  499. grd_ordschecritedetail.cellStyle("background-image", grd_ordschecritedetail.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  500. var bottom = grd_ordschecritedetail.rows - grd_ordschecritedetail.fixedRows -1;
  501. if( grd_ordschecritedetail.valueMatrix(1, 5) != '합계 : ' ){
  502. // bottom = parseInt(bottom) + 1;
  503. messageBox("기준자료를 더블클릭하여 수정할 상세기준자료를 조회하신 후 작업하세요!!", "E999", "");
  504. return false;
  505. }
  506. //숨겨진 컬럼값 세팅
  507. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/orddrid", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("orddrid") ));
  508. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/orddeptcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("orddeptcd") ));
  509. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/centcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("centcd") ));
  510. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/subdeptcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("subdeptcd") ));
  511. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/seqno", 1);
  512. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/scheno", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("scheno") ));
  513. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/dwcd", grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("dwcd") ));
  514. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/fstexamcap", 0);
  515. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/reexamcap", 0);
  516. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/totalexamcap", 0);
  517. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + bottom + "]/examcapsum", 0);
  518. model.setFocus("grd_ordschecritedetail");
  519. grd_ordschecritedetail.row = grd_ordschecritedetail.rows;
  520. grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("ordtm");
  521. grd_ordschecritedetail.editCell();
  522. //model.refresh();
  523. }else messageBox("진료일정기준 정보를 얻어 올 수", "I004");
  524. }
  525. //진료일정기준자료 테이블에 새로운 행을 추가한다. -- 숨겨진 컬럼 값을 세팅한다.
  526. function fAddRow( dayType ){
  527. cur_row = grd_orddr.row;
  528. if( cur_row > 0 ){
  529. grd_ordschecrite.addRow(false);
  530. grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  531. var bottom = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
  532. //숨겨진 컬럼값 세팅
  533. /* model.removeNodeset("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]");
  534. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/check", 'Y');
  535. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddrid", grd_orddr.valueMatrix( cur_row, grd_orddr.colRef("cd") ));
  536. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddeptcd", grd_orddr.valueMatrix( cur_row, grd_orddr.colRef("dp") ));
  537. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/dwcd", dayType);
  538. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/seqno", 1);
  539. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/scheno", 1);
  540. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/instcd");
  541. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/histstat", 'Y');
  542. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amordyn");
  543. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmordyn");
  544. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtordyn");
  545. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfromtm");
  546. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotm");
  547. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfromtm");
  548. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotm");
  549. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtfromtm");
  550. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigttotm");
  551. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amterm");
  552. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmterm");
  553. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtterm");
  554. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase", 'U');
  555. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfstexamcap", 0);
  556. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amreexamcap", 0);
  557. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotalexamcap", 0);
  558. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfstexamcap", 0);
  559. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmreexamcap", 0);
  560. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotalexamcap", 0);
  561. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtfstexamcap", 0);
  562. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtreexamcap", 0);
  563. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigttotalexamcap", 0);
  564. model.makeValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 0);
  565. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/clincnm");
  566. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/remfact");
  567. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/fstrgstrid");
  568. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/fstrgstdt");
  569. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/lastupdtrid");
  570. model.makeNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/lastupdtdt");
  571. // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase", 'T');
  572. // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/check", 'Y');
  573. // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase","U");
  574. */
  575. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddrid", grd_orddr.valueMatrix( cur_row, grd_orddr.colRef("cd") ));
  576. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/orddeptcd", model.getValue("/root/main/orddeptcd"));
  577. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/centcd", '-');
  578. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/subdeptcd", model.getValue("/root/main/subdeptcd"));
  579. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/seqno", 1);
  580. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/dwcd", dayType);
  581. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfstexamcap", 0);
  582. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amreexamcap", 0);
  583. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotalexamcap", 0);
  584. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfstexamcap", 0);
  585. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmreexamcap", 0);
  586. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotalexamcap", 0);
  587. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtfstexamcap", 0);
  588. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigtreexamcap", 0);
  589. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/nigttotalexamcap", 0);
  590. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 0);
  591. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase", 'T');
  592. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/check", 'Y');
  593. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/schecretbase","U");
  594. if( radio1.value == 'YA' ){
  595. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotalexamcap", 50);
  596. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 50);
  597. }
  598. if (radio1.value == 'YP' ){
  599. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotalexamcap", 50);
  600. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/totalexamcap", 50);
  601. }
  602. model.setFocus("grd_ordschecrite");
  603. grd_ordschecrite.row = grd_ordschecrite.rows;
  604. grd_ordschecrite.col = grd_ordschecrite.colRef("dwcd");
  605. grd_ordschecrite.editCell();
  606. // model.refresh();
  607. return true;
  608. }else{
  609. messageBox("진료과코드와 진료의사코드를 얻어 올 수", "I004");
  610. return false;
  611. }
  612. }
  613. /*
  614. //진료의사별전문분야 테이블에 새로운 행을 추가한다. -- 숨겨진 컬럼 값을 세팅한다.
  615. function fAddDrFildRow(){
  616. cur_row = grd_orddr.row;
  617. if( cur_row > 0 ){
  618. grd_orddrfild.addRow(false);
  619. //숨겨진 컬럼값 세팅
  620. model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
  621. model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/orddeptcd", grd_orddr.valueMatrix( cur_row, 2));
  622. model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/seqno", 1);
  623. }else messageBox("진료과코드와 진료의사코드를 얻어 올 수", "I004");
  624. }
  625. */
  626. function fSaveDrFild(){
  627. cur_row = grd_orddr.row;
  628. if( cur_row > 0 ){
  629. model.copyNode("/root/send/updatedata/datalist", "/root/main/ordlist/orddrfild/orddrfildlist");
  630. if (model.getValue("/root/send/updatedata/datalist/inetrsrvpossyn") == ""){
  631. model.setValue("/root/send/updatedata/datalist/inetrsrvpossyn","N");
  632. }
  633. //2014/07/28
  634. if(ipt_internetinwon.value=="" || ipt_internetinwon.value==null){
  635. model.makeValue("/root/send/updatedata/datalist/internetinwon","0");
  636. }else{
  637. model.makeValue("/root/send/updatedata/datalist/internetinwon", ipt_internetinwon.value);
  638. }
  639. //2014/07/28
  640. model.setValue("/root/send/updatedata/datalist/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
  641. model.setValue("/root/send/updatedata/datalist/orddeptcd", model.getValue("/root/main/orddeptcd"));
  642. model.makeNode("/root/send/updatedata/datalist/m");
  643. model.setValue("/root/send/updatedata/datalist/m", "u");
  644. if( model.getValue("/root/send/updatedata/datalist/orddrid") == '' ||
  645. model.getValue("/root/send/updatedata/datalist/orddeptcd") == ''){
  646. messageBox("진료의사/진료과 정보를 가져올 수 없습니다.","E999","");
  647. return false;
  648. }
  649. if(messageBox("전문분야를 저장 하시겠습니까?", "Q999") != 6) return;
  650. if ( submit("TXPMB00704") ) {
  651. //전문분야 추가/수정 후 재 조회한다.
  652. //submit("TRPMB00707")
  653. //grd_orddrfild.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  654. }
  655. model.removeNodeset("/root/send/updatedata/datalist");
  656. model.makeNode("/root/send/updatedata/datalist");
  657. model.refresh();
  658. }else{
  659. messageBox("진료의사/진료과 정보를 가져올 수 없습니다.","E999","");
  660. }
  661. return true;
  662. }
  663. function fCheckData(){
  664. var cur_row = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
  665. var row = 0;
  666. var fromtm = "";
  667. var totm = "";
  668. var term = "";
  669. var fstexam = "";
  670. var reexam = "";
  671. var schecretbase = "";
  672. var dayCD = "";
  673. var ampmnigt = "";
  674. for(var i = 0; i < cur_row; i++){
  675. row = i + 2;
  676. if( grd_ordschecrite.rowStatus(row) != 0 ){
  677. //요일 데이터 체크
  678. dayCD = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("dwcd"));
  679. if( ! (dayCD == "0" || dayCD == "1" || dayCD == "2" || dayCD == "3" || dayCD == "4" || dayCD == "5" || dayCD == "6")){
  680. messageBox((row-1) + "번째 줄의 " + "요일구분이 정확히 입력되지 않았습니다.", "E999", "");
  681. model.setFocus("grd_ordschecrite");
  682. grd_ordschecrite.row = row;
  683. grd_ordschecrite.col = grd_ordschecrite.colRef("dwcd");
  684. grd_ordschecrite.editCell();
  685. return false;
  686. }
  687. //생성기준 체크
  688. schecretbase = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("schecretbase")).toUpperCase();
  689. if( schecretbase != "U" && schecretbase != "T" ){
  690. messageBox((row-1) + "번째 줄의 " + "생성기준 데이터를 잘못 입력하셨습니다.", "E999", "");
  691. model.setFocus("grd_ordschecrite");
  692. grd_ordschecrite.row = row;
  693. grd_ordschecrite.col = grd_ordschecrite.colRef("schecretbase");
  694. grd_ordschecrite.editCell();
  695. return false;
  696. }
  697. //진료시간 체크 -- 오전
  698. fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfromtm"));
  699. totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotm"));
  700. term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm"));
  701. fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap"));
  702. reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap"));
  703. totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap"));
  704. if( fromtm == "" && totm == "" ){
  705. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amordyn")) = "N";
  706. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm")) = 0;
  707. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap")) = 0;
  708. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap")) = 0;
  709. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap")) = 0;
  710. }else{
  711. if( isValidDateTime( fromtm, "hhmm") ){
  712. if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
  713. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amordyn")) = "Y";
  714. //TERM 체크
  715. if( schecretbase == "U" ){
  716. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amterm")) = 0;
  717. }else{
  718. if( isNaN( term ) || parseInt(term) <= 0 ){
  719. messageBox((row-1) + "번째 줄의 " + "오전 TERM을 잘못 입력하셨습니다.", "E999", "");
  720. model.setFocus("grd_ordschecrite");
  721. grd_ordschecrite.row = row;
  722. grd_ordschecrite.col = grd_ordschecrite.colRef("amterm");
  723. grd_ordschecrite.editCell();
  724. return false;
  725. }
  726. }
  727. //오전정원체크 초/재진정원과 총정원 동시입력체크
  728. if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
  729. messageBox((row-1) + "번째 줄의 오전 초/재진정원과 총정원이 동시에 입력되었습니다. 수정해주십시요.", "E999", "");
  730. model.setFocus("grd_ordschecrite");
  731. grd_ordschecrite.row = row;
  732. grd_ordschecrite.col = grd_ordschecrite.colRef("amfstexamcap");
  733. grd_ordschecrite.editCell();
  734. return false;
  735. }
  736. //오전 총정원 체크
  737. if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
  738. //오전 초진정원 체크
  739. if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
  740. messageBox((row-1) + "번째 줄의 " + "오전 초진/재진 정원을 잘못 입력하셨습니다.", "E999", "");
  741. model.setFocus("grd_ordschecrite");
  742. grd_ordschecrite.row = row;
  743. grd_ordschecrite.col = grd_ordschecrite.colRef("amfstexamcap");
  744. grd_ordschecrite.editCell();
  745. return false;
  746. }
  747. /*
  748. //오전 재진정원 체크
  749. if( parseInt(reexam) <= 0 ){
  750. messageBox((row-1) + "번째 줄의 " + "오전 재진정원을 잘못 입력하셨습니다.", "E999", "");
  751. return false;
  752. }
  753. */
  754. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap")) = 0;
  755. }else{
  756. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap")) = 0;
  757. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amreexamcap")) = 0;
  758. }
  759. }else{
  760. messageBox((row-1) + "번째 줄의 " + "오전진료 종료시간을 잘못 입력하셨습니다.", "E999", "");
  761. model.setFocus("grd_ordschecrite");
  762. grd_ordschecrite.row = row;
  763. grd_ordschecrite.col = grd_ordschecrite.colRef("amtotm");
  764. grd_ordschecrite.editCell();
  765. return false;
  766. }
  767. }else{
  768. messageBox((row-1) + "번째 줄의 " + "오전진료 시작시간을 잘못 입력하셨습니다.", "E999", "");
  769. model.setFocus("grd_ordschecrite");
  770. grd_ordschecrite.row = row;
  771. grd_ordschecrite.col = grd_ordschecrite.colRef("amfromtm");
  772. grd_ordschecrite.editCell();
  773. return false;
  774. }
  775. ampmnigt = "A";
  776. } //오전 데이터 체크 종료
  777. //진료시간 체크 -- 오후
  778. fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfromtm"));
  779. totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotm"));
  780. term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm"));
  781. fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap"));
  782. reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap"));
  783. totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap"));
  784. if( fromtm == "" && totm == "" ){
  785. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmordyn")) = "N";
  786. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm")) = 0;
  787. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap")) = 0;
  788. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap")) = 0;
  789. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap")) = 0;
  790. }else{
  791. if( isValidDateTime( fromtm, "hhmm") ){
  792. if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
  793. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmordyn")) = "Y";
  794. //TERM 체크
  795. if( schecretbase == "U" ){
  796. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmterm")) = 0;
  797. }else{
  798. if( isNaN( term ) || parseInt(term) <= 0 ){
  799. messageBox((row-1) + "번째 줄의 " + "오후 TERM을 잘못 입력하셨습니다.", "E999", "");
  800. model.setFocus("grd_ordschecrite");
  801. grd_ordschecrite.row = row;
  802. grd_ordschecrite.col = grd_ordschecrite.colRef("pmterm");
  803. grd_ordschecrite.editCell();
  804. return false;
  805. }
  806. }
  807. //오후정원체크 초/재진정원과 총정원 동시입력체크
  808. if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
  809. messageBox((row-1) + "번째 줄의 오후 초/재진정원과 총정원이 동시에 입력되었습니다. 수정해주십시요.", "E999", "");
  810. model.setFocus("grd_ordschecrite");
  811. grd_ordschecrite.row = row;
  812. grd_ordschecrite.col = grd_ordschecrite.colRef("pmfstexamcap");
  813. grd_ordschecrite.editCell();
  814. return false;
  815. }
  816. //오전 총정원 체크
  817. if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
  818. //오후 초진정원 체크
  819. if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
  820. messageBox((row-1) + "번째 줄의 " + "오후 초진/재진 정원을 잘못 입력하셨습니다.", "E999", "");
  821. model.setFocus("grd_ordschecrite");
  822. grd_ordschecrite.row = row;
  823. grd_ordschecrite.col = grd_ordschecrite.colRef("pmfstexamcap");
  824. grd_ordschecrite.editCell();
  825. return false;
  826. }
  827. /*
  828. //오후 재진정원 체크
  829. if( isNaN( parseInt(reexam) ) || parseInt(reexam) <= 0 ){
  830. messageBox((row-1) + "번째 줄의 " + "오후 재진정원을 잘못 입력하셨습니다.", "E999", "");
  831. return false;
  832. }
  833. */
  834. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap")) = 0;
  835. }else{
  836. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap")) = 0;
  837. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmreexamcap")) = 0;
  838. }
  839. }else{
  840. messageBox((row-1) + "번째 줄의 " + "오후진료 종료시간을 잘못 입력하셨습니다.", "E999", "");
  841. model.setFocus("grd_ordschecrite");
  842. grd_ordschecrite.row = row;
  843. grd_ordschecrite.col = grd_ordschecrite.colRef("pmtotm");
  844. grd_ordschecrite.editCell();
  845. return false;
  846. }
  847. }else{
  848. messageBox((row-1) + "번째 줄의 " + "오후진료 시작시간을 잘못 입력하셨습니다.", "E999", "");
  849. model.setFocus("grd_ordschecrite");
  850. grd_ordschecrite.row = row;
  851. grd_ordschecrite.col = grd_ordschecrite.colRef("pmfromtm");
  852. grd_ordschecrite.editCell();
  853. return false;
  854. }
  855. ampmnigt = "P";
  856. } //오후 데이터 체크 종료
  857. //진료시간 체크 -- 야간
  858. fromtm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfromtm"));
  859. totm = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotm"));
  860. term = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm"));
  861. fstexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap"));
  862. reexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap"));
  863. totalexam = grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap"));
  864. if( fromtm == "" && totm == "" ){
  865. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtordyn")) = "N";
  866. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm")) = 0;
  867. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap")) = 0;
  868. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap")) = 0;
  869. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap")) = 0;
  870. }else{
  871. if( isValidDateTime( fromtm, "hhmm") ){
  872. if( isValidDateTime( totm, "hhmm") && (fromtm < totm) ){
  873. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtordyn")) = "Y";
  874. //TERM 체크
  875. if( schecretbase == "U" ){
  876. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtterm")) = 0;
  877. }else{
  878. if( isNaN( term ) || parseInt(term) <= 0 ){
  879. messageBox((row-1) + "번째 줄의 " + "야간 TERM을 잘못 입력하셨습니다.", "E999", "");
  880. model.setFocus("grd_ordschecrite");
  881. grd_ordschecrite.row = row;
  882. grd_ordschecrite.col = grd_ordschecrite.colRef("nigtterm");
  883. grd_ordschecrite.editCell();
  884. return false;
  885. }
  886. }
  887. //야간정원체크 초/재진정원과 총정원 동시입력체크
  888. if( parseInt(fstexam) > 0 && parseInt(fstexam) > 0 && parseInt(totalexam) > 0 ){
  889. messageBox((row-1) + "번째 줄의 야간 초/재진정원과 총정원이 동시에 입력되었습니다. 수정해주십시요.", "E999", "");
  890. model.setFocus("grd_ordschecrite");
  891. grd_ordschecrite.row = row;
  892. grd_ordschecrite.col = grd_ordschecrite.colRef("nigtfstexamcap");
  893. grd_ordschecrite.editCell();
  894. return false;
  895. }
  896. //오전 총정원 체크
  897. if( isNaN( totalexam ) || parseInt(totalexam) <= 0 ){
  898. //야간 초진정원 체크
  899. if( isNaN( fstexam ) || isNaN( reexam ) || parseInt(fstexam) + parseInt(reexam) <= 0 ){
  900. messageBox((row-1) + "번째 줄의 " + "야간 초진/재진 정원을 잘못 입력하셨습니다.", "E999", "");
  901. model.setFocus("grd_ordschecrite");
  902. grd_ordschecrite.row = row;
  903. grd_ordschecrite.col = grd_ordschecrite.colRef("nigtfstexamcap");
  904. grd_ordschecrite.editCell();
  905. return false;
  906. }
  907. /*
  908. //야간 재진정원 체크
  909. if( isNaN( parseInt(reexam) ) || parseInt(reexam) <= 0 ){
  910. messageBox((row-1) + "번째 줄의 " + "야간 재진정원을 잘못 입력하셨습니다.", "E999", "");
  911. return false;
  912. }
  913. */
  914. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap")) = 0;
  915. }else{
  916. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap")) = 0;
  917. grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtreexamcap")) = 0;
  918. }
  919. }else{
  920. messageBox((row-1) + "번째 줄의 " + "야간진료 종료시간을 잘못 입력하셨습니다.", "E999", "");
  921. model.setFocus("grd_ordschecrite");
  922. grd_ordschecrite.row = row;
  923. grd_ordschecrite.col = grd_ordschecrite.colRef("nigttotm");
  924. grd_ordschecrite.editCell();
  925. return false;
  926. }
  927. }else{
  928. messageBox((row-1) + "번째 줄의 " + "야간진료 시작시간을 잘못 입력하셨습니다.", "E999", "");
  929. model.setFocus("grd_ordschecrite");
  930. grd_ordschecrite.row = row;
  931. grd_ordschecrite.col = grd_ordschecrite.colRef("nigtfromtm");
  932. grd_ordschecrite.editCell();
  933. return false;
  934. }
  935. ampmnigt = "N";
  936. } //야간 데이터 체크 종료
  937. //진료시간이 오전/오후/야간 모두 안들어가 있을 경우
  938. if( ampmnigt == '' ){
  939. messageBox((row-1) + "번째 줄의 " + "진료시간이 입력되지 않았습니다.", "E999", "");
  940. model.setFocus("grd_ordschecrite");
  941. grd_ordschecrite.row = row;
  942. grd_ordschecrite.col = grd_ordschecrite.colRef("amfromtm");
  943. grd_ordschecrite.editCell();
  944. return false;
  945. }
  946. ampmnigt = "";
  947. } //수정이나 추가가 되었는지를 체크한다.
  948. } //for 루프를 닫는다.
  949. return true;
  950. }
  951. function fSave(){
  952. if( fCheckData() ){
  953. var cur_row = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
  954. if( cur_row > 0 ){
  955. if(messageBox("진료일정기준자료를 저장 하시겠습니까?", "Q999") != 6) return;
  956. model.setValue("/root/send/updatedata/datalist",grd_ordschecrite.getUpdateData());
  957. //grd_ordschecrite.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  958. if ( submit("TXPMB00706") ) {
  959. //진료일정기준자료를 재 조회한다.
  960. fGetOrdShceCrite();
  961. grd_ordschecrite.clearStatus();
  962. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  963. }
  964. model.removeNodeset("/root/send/updatedata/datalist");
  965. model.makeNode("/root/send/updatedata/datalist");
  966. model.refresh();
  967. }
  968. }else{
  969. return false;
  970. }
  971. return true;
  972. }
  973. function fSaveDetail(){
  974. if( fCheckDetailData() ){
  975. var cur_row = grd_ordschecritedetail.rows;
  976. if( cur_row > 0 ){
  977. model.setValue("/root/send/updatedata/datalist",grd_ordschecritedetail.getUpdateData());
  978. grd_ordschecritedetail.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  979. if ( submit("TXPMB00710") ) {
  980. //진료일정기준자료를 재 조회한다.
  981. fGetOrdScheCriteDetail();
  982. grd_ordschecritedetail.clearStatus();
  983. //model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  984. }
  985. model.removeNodeset("/root/send/updatedata/datalist");
  986. model.makeNode("/root/send/updatedata/datalist");
  987. model.refresh();
  988. }
  989. }else{
  990. return false;
  991. }
  992. return true;
  993. }
  994. //기준상세자료 에러 체크
  995. function fCheckDetailData(){
  996. var cur_row = getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist/orddrid");
  997. var selected_row = grd_ordschecrite.row;
  998. var row = 0;
  999. var ordtm = "";
  1000. var ampmflag = "";
  1001. var fstexamcap = "";
  1002. var reexamcap = "";
  1003. var totalexamcap = "";
  1004. //var dayCD = "";
  1005. var checkFstExamCap = 0;
  1006. var checkReExamCap = 0;
  1007. var checkTotalExamCap = 0;
  1008. var checkSumExamCap = 0;
  1009. for(var i = 0; i < cur_row; i++){
  1010. if( grd_ordschecritedetail.valueMatrix(1, 5) != '합계 : ' ){
  1011. row = i + 2;
  1012. // bottom = parseInt(bottom) + 1;
  1013. // messageBox("기준자료를 더블클릭하여 수정할 상세기준자료를 조회하신 후 작업하세요!!", "E999", "");
  1014. // return false;
  1015. }else{
  1016. row = i + 2;
  1017. }
  1018. // if( grd_ordschecritedetail.rowStatus(row) != 0 ){
  1019. /*
  1020. //요일 데이터 체크
  1021. dayCD = grd_ordschecritedetail.valueMatrix( row, 1);
  1022. if( dayCD != grd_ordschecrite.valueMatrix( selected_row, 2) ){
  1023. messageBox( row + "번째 줄의 " + "요일구분이 기준자료의 요일구분과 다릅니다.", "E999", "");
  1024. return false;
  1025. }
  1026. */
  1027. //진료시간 체크
  1028. ordtm = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("ordtm"));
  1029. if( ! isValidDateTime(ordtm, 'hhmm') ){
  1030. messageBox( row + "번째 줄의 " + "진료시간이 잘못 입력되었습니다.", "E999", "");
  1031. model.setFocus("grd_ordschecritedetail");
  1032. grd_ordschecritedetail.row = row;
  1033. grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("ordtm");
  1034. grd_ordschecritedetail.editCell();
  1035. return false;
  1036. }
  1037. //시간구분 체크
  1038. ampmflag = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("ampmflag")).toUpperCase();
  1039. if( ampmflag != 'A' && ampmflag != 'P' && ampmflag != 'N' ){
  1040. messageBox( row + "번째 줄의 " + "시간구분이 잘못 입력되었습니다.", "E999", "");
  1041. model.setFocus("grd_ordschecritedetail");
  1042. grd_ordschecritedetail.row = row;
  1043. grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("ampmflag");
  1044. grd_ordschecritedetail.editCell();
  1045. return false;
  1046. }
  1047. //초진/재진/총정원 체크
  1048. fstexamcap = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("fstexamcap"));
  1049. reexamcap = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("reexamcap"));
  1050. totalexamcap = grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("totalexamcap"));
  1051. checkFstExamCap = parseInt(checkFstExamCap) + parseInt(fstexamcap);
  1052. checkReExamCap = parseInt(checkReExamCap) + parseInt(reexamcap);
  1053. checkTotalExamCap = parseInt(checkTotalExamCap) + parseInt(totalexamcap);
  1054. if( isNaN( totalexamcap ) || parseInt(totalexamcap) <= 0 ){
  1055. //초진정원 체크
  1056. if( isNaN( fstexamcap ) || isNaN( reexamcap) || parseInt(fstexamcap) + parseInt(reexamcap) <= 0 ){
  1057. messageBox((row) + "번째 줄의 " + "초/재진 정원을 잘못 입력하셨습니다.", "E999", "");
  1058. model.setFocus("grd_ordschecritedetail");
  1059. grd_ordschecritedetail.row = row;
  1060. grd_ordschecritedetail.col = grd_ordschecritedetail.colRef("fstexamcap");
  1061. grd_ordschecritedetail.editCell();
  1062. return false;
  1063. }
  1064. /*
  1065. //재진정원 체크
  1066. if( isNaN( parseInt(reexamcap) ) || parseInt(reexamcap) <= 0 ){
  1067. messageBox((row-1) + "번째 줄의 " + "재진정원을 잘못 입력하셨습니다.", "E999", "");
  1068. return false;
  1069. }
  1070. */
  1071. grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("totalexamcap")) = 0;
  1072. }else{
  1073. grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("fstexamcap")) = 0;
  1074. grd_ordschecritedetail.valueMatrix( row, grd_ordschecritedetail.colRef("reexamcap")) = 0;
  1075. }
  1076. // }
  1077. } //for 루프를 닫는다.
  1078. //정원 변경사항 체크
  1079. //정원합계 계산
  1080. checkSumExamCap = parseInt(checkFstExamCap) + parseInt(checkReExamCap) + parseInt(checkTotalExamCap);
  1081. //기준자료가 구간일 경우에는 정원합계만 체크한다.
  1082. if( grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("schecretbase") ) == 'T' ){
  1083. if( grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("totalexamcap") ) != checkSumExamCap ){
  1084. messageBox("변경하신 상세기준자료의 정원합계와 기준자료의 정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
  1085. return false;
  1086. }
  1087. //기준자료가 섹션일 때에는 초진/재진/총정원으로 구분해서 비교한다.
  1088. }else{
  1089. if( checkFstExamCap != parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("amfstexamcap")))
  1090. + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("pmfstexamcap")))
  1091. + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("nigtfstexamcap")))){
  1092. messageBox("변경하신 상세기준자료의 초진정원합계와 기준자료의 초진정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
  1093. return false;
  1094. }else if( checkReExamCap != parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("amreexamcap")))
  1095. + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("pmreexamcap")))
  1096. + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("nigtreexamcap")))){
  1097. messageBox("변경하신 상세기준자료의 재진정원합계와 기준자료의 재진정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
  1098. return false;
  1099. }else if( checkTotalExamCap != parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("amtotalexamcap")))
  1100. + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("pmtotalexamcap")))
  1101. + parseInt(grd_ordschecrite.valueMatrix( grd_ordschecrite.row, grd_ordschecrite.colRef("nigttotalexamcap")))){
  1102. messageBox("변경하신 상세기준자료의 총정원합계와 기준자료의 총정원합계가 다릅니다. 기준자료와 상세기준자료는 정원이 서로 같아야 합니다.", "E999", "");
  1103. return false;
  1104. }
  1105. }
  1106. return true;
  1107. }
  1108. //화면 초기화
  1109. function fInitialize(){
  1110. //model.resetInstanceNode("/root/main");
  1111. model.resetInstanceNode("/root/main/ordlist/orddrfild/orddrfildlist");
  1112. model.removeNodeset("/root/main/ordlist/ordschecrite/ordschecritelist");
  1113. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  1114. //선택요일추가 초기화
  1115. model.resetInstanceNode("/root/main/selectedday");
  1116. if (checkOpener()){ //팝업화면으로 사용될 때
  1117. model.setValue("/root/main/regltempflag", 'XX');
  1118. model.setValue("/root/main/bfdatadel", '-');
  1119. }else{
  1120. model.setValue("/root/main/regltempflag", 'YY');
  1121. model.setValue("/root/main/bfdatadel", 'Del');
  1122. }
  1123. model.setValue("/root/main/selectedday", '');
  1124. model.setValue("/root/main/lastcretdd", '');
  1125. //grd_ordschecritedetail.rebuild();
  1126. //grd_ordschecrite.rebuild();
  1127. //grd_orddrfild.rebuild();
  1128. //model.refresh();
  1129. //날자 입력 항목에 오늘 날자 세팅
  1130. var curDate = getCurrentDate();
  1131. model.setValue("/root/main/schecretfromdd", curDate);
  1132. //기간별일정 생성 내역 조회
  1133. model.removeNodeset("/root/init/ordschecrethist");
  1134. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/weeks", "기간별 진료일정생성 내역");
  1135. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/fromdd", "");
  1136. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/todd", "");
  1137. model.makeValue("/root/init/ordschecrethist/ordschecrethistlist/seqno", "0");
  1138. model.setValue("/root/main/ordschecrethist", "0");
  1139. //2월 마지막날 구하기..
  1140. // if( curDate >= curDate.substring(0,4) + "0301" ){
  1141. //
  1142. // curDate = curDate.toDate().getAddDate(1,"Y");
  1143. // curDate = curDate.getFullYear().toString() + "0301"
  1144. // curDate = curDate.toDate().getAddDate(-1,"D");
  1145. // }else{
  1146. //
  1147. // curDate = curDate.getFullYear().toString() + "0301"
  1148. // curDate = curDate.toDate().getAddDate(-1,"D");
  1149. // }
  1150. // curDate = curDate.toDate().getAddDate(1,"Y");
  1151. // var nextDate = curDate.getFullYear();
  1152. // nextDate = nextDate.toString() + (( curDate.getMonth() + 1 > 9 ) ? curDate.getMonth() + 1 : "0" + (curDate.getMonth() + 1));
  1153. // nextDate = nextDate.toString() + (( curDate.getDate() > 9 ) ? curDate.getDate() : "0" + curDate.getDate()) ;
  1154. //
  1155. // model.setValue("/root/main/schecrettodd", nextDate);
  1156. // model.setValue("/root/main/schecrettodd", curDate);
  1157. model.setValue("/root/main/schecrettodd", "20100228");
  1158. //2007-10-10
  1159. model.setValue("/root/main/ordlist/orddrfild/orddrfildlist/inetrsrvpossyn", "Y");
  1160. model.refresh();
  1161. }
  1162. function fSetTime( ampm ){
  1163. var bottom = grd_ordschecrite.bottomRow - 1;
  1164. if( ampm.search('AM') != -1){
  1165. //오전 시작/종료시간 세팅
  1166. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amfromtm", '0830');
  1167. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/amtotm", '1230'); //1200 -> 1230 수정 파트장님 요청사항
  1168. }
  1169. if( ampm.search('PM') != -1){
  1170. //오후 시작/종료시간 세팅
  1171. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmfromtm", '1330');
  1172. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/pmtotm", '1655');
  1173. }
  1174. }
  1175. //진료일정생성 버튼 선택시
  1176. function fOrdScheCriteList(){
  1177. var nodeList = instance1.selectNodes("/root/main/ordlist/ordschecrite/ordschecritelist[check='Y']");
  1178. var rCSV = getNodeListCSV(nodeList);
  1179. if( rCSV == "" || rCSV == null || rCSV == undefined){
  1180. //messageBox("일정을 생성할 기준자료가 선택되지 않았습니다.", "E999", "");
  1181. messageBox("일정을 생성할 기준자료가 선택되지", "E007");
  1182. return false;
  1183. }
  1184. for( var i = grd_ordschecrite.fixedRows; i <= grd_ordschecrite.rows; i++ ){
  1185. if( grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("check")) == 'Y'){
  1186. if(grd_ordschecrite.rowStatus(i) == '1' || grd_ordschecrite.rowStatus(i) == '3' ){
  1187. messageBox("선택하신 기준자료 중에 저장이 되지 않은 내역이 있습니다. [기준자료저장]을 하신 후에 [진료일정생성]하세요.", "E999", "");
  1188. return false;
  1189. }
  1190. }
  1191. }
  1192. model.resetInstanceNode("/root/send/updatedata");
  1193. model.setValue("/root/send/updatedata/datalist", rCSV);
  1194. model.makeNode("/root/send/updatedata/schecretfromdd");
  1195. model.makeNode("/root/send/updatedata/schecrettodd");
  1196. model.makeNode("/root/send/updatedata/bfdatadel");
  1197. model.makeNode("/root/send/updatedata/regltempflag");
  1198. model.makeNode("/root/send/updatedata/capacheckyn");
  1199. model.makeNode("/root/send/updatedata/capano");
  1200. model.makeNode("/root/send/updatedata/ordschecretno");
  1201. model.setValue("/root/send/updatedata/ordschecretno", model.getValue("/root/main/ordschecretno"));
  1202. var fromdd = model.getValue("/root/main/schecretfromdd");
  1203. if( isValidDateTime(fromdd, "YYYYMMDD") ){
  1204. model.setValue("/root/send/updatedata/schecretfromdd", fromdd);
  1205. }else{
  1206. messageBox("진료일정생성 기간 중 시작일이 유효한 날자가 아닙니다. 확인해 주세요.", "E999");
  1207. model.setFocus("ipt_fromdd");
  1208. return false;
  1209. }
  1210. var todd = model.getValue("/root/main/schecrettodd");
  1211. if( isValidDateTime(todd, "YYYYMMDD") ){
  1212. model.setValue("/root/send/updatedata/schecrettodd", todd);
  1213. }else{
  1214. messageBox("진료일정생성 기간 중 종료일이 유효한 날자가 아닙니다. 확인해 주세요.", "E999");
  1215. model.setFocus("ipt_todd");
  1216. return false;
  1217. }
  1218. if( fromdd > todd){
  1219. messageBox("희망일정 생성 종료일자가 희망일정 생성 시작일자 보다 이전일자 입니다. 확인해 주세요.", "E999");
  1220. model.setFocus("ipt_todd");
  1221. return false;
  1222. }
  1223. //특별 일정외 모든 일정구분 capa수제한
  1224. var regltempflag = model.getValue("/root/main/regltempflag");
  1225. var capacheckyn = model.getValue("/root/hidden/capacheck/capachecklist[cdid=10]/cdnm");
  1226. var capano = parseInt(model.getValue("/root/hidden/capacheck/capachecklist[cdid=20]/cdnm"));
  1227. var endRow = grd_ordschecrite.rows;
  1228. endRow = endRow-1;
  1229. if(capacheckyn == 'Y'){
  1230. if(regltempflag != 'SS' && regltempflag != 'YY'){
  1231. for( var i = 1; i < endRow; i++){
  1232. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/check") == 'Y' ){
  1233. var amfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/amfstexamcap");
  1234. var amreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/amreexamcap");
  1235. var pmfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/pmfstexamcap");
  1236. var pmreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/pmreexamcap");
  1237. var nigtfstexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/nigtfstexamcap");
  1238. var nigtreexamcap = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/nigtreexamcap");
  1239. var amtotalexamcap = parseInt(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/amtotalexamcap"));
  1240. var pmtotalexamcap = parseInt(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/pmtotalexamcap"));
  1241. var nigttotalexamcap = parseInt(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+ i +"]/nigttotalexamcap"));
  1242. var amcapa = parseInt(amfstexamcap) + parseInt(amreexamcap) + parseInt(amtotalexamcap);
  1243. var pmcapa = parseInt(pmfstexamcap) + parseInt(pmreexamcap) + parseInt(pmtotalexamcap);
  1244. var nigtcapa = parseInt(nigtfstexamcap) + parseInt(nigtreexamcap) + parseInt(nigttotalexamcap);
  1245. if(amcapa > capano){
  1246. messageBox(i+"번째 줄의 오전 정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
  1247. return;
  1248. }else if(pmcapa > capano){
  1249. messageBox(i+"번째 줄이 오후 정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
  1250. return;
  1251. }else if(nigtcapa > capano){
  1252. messageBox(i+"번째 줄이 야간 정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
  1253. return;
  1254. }else if(amtotalexamcap > capano){
  1255. messageBox(i+"번째 줄이 오전 총정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
  1256. return;
  1257. }else if(pmtotalexamcap > capano){
  1258. messageBox(i+"번째 줄이 오후 총정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
  1259. return;
  1260. }else if(nigttotalexamcap > capano){
  1261. messageBox(i+"번째 줄이 야간 총정원이 "+ capano +" 명을 초과합니다. 확인 후 다시 시도해 주세요. ","E999");
  1262. return;
  1263. }
  1264. }
  1265. }
  1266. }
  1267. }
  1268. if(capacheckyn == 'Y'){
  1269. model.setValue("/root/send/updatedata/capacheckyn", capacheckyn);
  1270. model.setValue("/root/send/updatedata/capano", capano);
  1271. }
  1272. //정규일정 생성시 기존 내역 삭제여부 체크
  1273. var cnt = getNodesetCount("/root/init/ordschecrethist/ordschecrethistlist/weeks");
  1274. //cnt = cnt -1;
  1275. if(regltempflag == 'YY'){
  1276. for( var i = 1; i <= cnt; i ++ ){
  1277. if( model.getValue("/root/init/ordschecrethist/ordschecrethistlist[" + i + "]/reglscheflag") == 'Y' ){
  1278. var yfromdd = model.getValue("/root/init/ordschecrethist/ordschecrethistlist[" + i + "]/fromdd");
  1279. var ytodd = model.getValue("/root/init/ordschecrethist/ordschecrethistlist[" + i + "]/todd");
  1280. var cfromdd = model.getValue("/root/main/schecretfromdd");
  1281. var ctodd = model.getValue("/root/main/schecrettodd");
  1282. if( yfromdd <= ctodd && ytodd >= cfromdd){
  1283. var rtn = messageBox("기존에 정규일정이 존재 합니다. 기존 일정을 삭제 하시겠습니까? ", "Q999")
  1284. if (rtn == 6) { // Yes : 6 / No : 7 / Cancel : 2
  1285. model.setValue("/root/send/updatedata/bfdatadel", model.getValue("/root/main/bfdatadel"));
  1286. }else{
  1287. model.setValue("/root/send/updatedata/bfdatadel", '');
  1288. }
  1289. }
  1290. }
  1291. }
  1292. }
  1293. var strRegItempFlag = model.getValue("/root/main/regltempflag").substring(0,1);
  1294. model.setValue("/root/send/updatedata/regltempflag", strRegItempFlag);
  1295. if(regltempflag == 'YY'){
  1296. if(messageBox("정규일정을 생성 하시겠습니까?", "Q999") != 6){
  1297. return;
  1298. }
  1299. }else if(regltempflag == 'NN'){
  1300. if(messageBox("임시일정을 생성 하시겠습니까?", "Q999") != 6){
  1301. return;
  1302. }
  1303. }else if(regltempflag == 'ZZ'){
  1304. if(messageBox("대진일정을 생성 하시겠습니까?", "Q999") != 6){
  1305. return;
  1306. }
  1307. }else if(regltempflag == 'SS'){
  1308. if(messageBox("특별일정을 생성 하시겠습니까?", "Q999") != 6){
  1309. return;
  1310. }
  1311. }else if(regltempflag == 'VV'){
  1312. if(messageBox("기타(임시)일정을 생성 하시겠습니까?", "Q999") != 6){
  1313. return;
  1314. }
  1315. }else if(regltempflag == 'XX'){
  1316. if(messageBox("기타(검사)일정을 생성 하시겠습니까?", "Q999") != 6){
  1317. return;
  1318. }
  1319. }
  1320. if (submit("TXPMB00708")){
  1321. messageBox("일정생성", "I002");
  1322. }else{
  1323. messageBox("일정생성이 비정상 종료! 최종진료생성일 확인!", "I999");
  1324. return;
  1325. }
  1326. //진료일정 생성시 격주 휴무 체크
  1327. var cur_row = grd_orddr.row;
  1328. model.setValue("/root/main/biweekcheck/fromdd", model.getValue("/root/main/schecretfromdd"));
  1329. model.setValue("/root/main/biweekcheck/todd", model.getValue("/root/main/schecrettodd"));
  1330. model.setValue("/root/main/biweekcheck/orddeptcd", model.getValue("/root/main/orddeptcd"));
  1331. model.setValue("/root/main/biweekcheck/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
  1332. var cnt = "";
  1333. model.makeNode("/root/main/holicheck/biweeklycheck/check");
  1334. model.makeNode("/root/send/updatedata/datalist");
  1335. //격주 휴무 체크 후 진료일정 생성 -- 추가
  1336. if (submit("TRPMB00714")){
  1337. cnt = model.getValue("/root/main/holicheck/biweeklycheck/check");
  1338. }
  1339. if(cnt != "0"){
  1340. var rtn = messageBox("변경하시려는 일정에 격주휴무가 있습니다. 격주 휴무를 ", "Q001")
  1341. if (rtn == 6) { // Yes : 6 / No : 7 / Cancel : 2
  1342. submit("TXPMB00715")
  1343. }
  1344. }
  1345. fGetLastOrdScheCretDD();
  1346. model.removeNodeset("/root/send/updatedata/datalist");
  1347. model.makeNode("/root/send/updatedata/datalist");
  1348. }
  1349. function fAddOrdList(){
  1350. if( model.getValue("/root/main/selectedday/sun") == 'Y' ){
  1351. if( fAddRow( '0' ) ){
  1352. fSetTime( model.getValue("/root/main/selectedday/sunampm") );
  1353. }
  1354. }
  1355. if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
  1356. if( fAddRow( '1' ) ){
  1357. fSetTime( model.getValue("/root/main/selectedday/monampm") );
  1358. }
  1359. }
  1360. if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
  1361. if( fAddRow( '2' ) ){
  1362. fSetTime( model.getValue("/root/main/selectedday/tueampm") );;
  1363. }
  1364. }
  1365. if( model.getValue("/root/main/selectedday/wed") == 'Y' ){
  1366. if( fAddRow( '3' ) ){
  1367. fSetTime( model.getValue("/root/main/selectedday/wedampm") );
  1368. }
  1369. }
  1370. if( model.getValue("/root/main/selectedday/thu") == 'Y' ){
  1371. if( fAddRow( '4' ) ){
  1372. fSetTime( model.getValue("/root/main/selectedday/thuampm") );
  1373. }
  1374. }
  1375. if( model.getValue("/root/main/selectedday/fri") == 'Y' ){
  1376. if( fAddRow( '5' ) ){
  1377. fSetTime( model.getValue("/root/main/selectedday/friampm") );
  1378. }
  1379. }
  1380. if( model.getValue("/root/main/selectedday/sat") == 'Y' ){
  1381. if( fAddRow( '6' ) ){
  1382. fSetTime( model.getValue("/root/main/selectedday/satampm") );
  1383. }
  1384. }
  1385. //선택요일추가 초기화
  1386. model.resetInstanceNode("/root/main/selectedday");
  1387. model.refresh();
  1388. }
  1389. function fSetCheckDay(){
  1390. //오전
  1391. if (radio1.value == 'NA' || radio1.value == 'YA' || radio1.value == 'ZA'){
  1392. if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
  1393. model.setValue("/root/main/selectedday/monampm", "AM");
  1394. }
  1395. if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
  1396. model.setValue("/root/main/selectedday/tueampm","AM");
  1397. }
  1398. if (model.getValue("/root/main/selectedday/wed") == 'Y'){
  1399. model.setValue("/root/main/selectedday/wedampm", "AM");
  1400. }
  1401. if (model.getValue("/root/main/selectedday/thu") == 'Y'){
  1402. model.setValue("/root/main/selectedday/thuampm", "AM");
  1403. }
  1404. if (model.getValue("/root/main/selectedday/fri") == 'Y'){
  1405. model.setValue("/root/main/selectedday/friampm", "AM");
  1406. }
  1407. if (model.getValue("/root/main/selectedday/sat") == "Y"){
  1408. model.setValue("/root/main/selectedday/satampm", "AM");
  1409. }
  1410. }
  1411. if (radio1.value == 'NP' || radio1.value == 'YP' || radio1.value == 'ZP'){
  1412. if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
  1413. model.setValue("/root/main/selectedday/monampm", "PM");
  1414. }
  1415. if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
  1416. model.setValue("/root/main/selectedday/tueampm","PM");
  1417. }
  1418. if (model.getValue("/root/main/selectedday/wed") == 'Y'){
  1419. model.setValue("/root/main/selectedday/wedampm", "PM");
  1420. }
  1421. if (model.getValue("/root/main/selectedday/thu") == 'Y'){
  1422. model.setValue("/root/main/selectedday/thuampm", "PM");
  1423. }
  1424. if (model.getValue("/root/main/selectedday/fri") == 'Y'){
  1425. model.setValue("/root/main/selectedday/friampm", "PM");
  1426. }
  1427. if (model.getValue("/root/main/selectedday/sat") == "Y"){
  1428. model.setValue("/root/main/selectedday/satampm", "PM");
  1429. }
  1430. }
  1431. // fAddOrdList();
  1432. if( model.getValue("/root/main/selectedday/sun") == 'Y' ){
  1433. if( fAddRow( '0' ) ){
  1434. fSetTime( model.getValue("/root/main/selectedday/sunampm") );
  1435. }
  1436. }
  1437. if( model.getValue("/root/main/selectedday/mon") == 'Y' ){
  1438. if( fAddRow( '1' ) ){
  1439. fSetTime( model.getValue("/root/main/selectedday/monampm") );
  1440. }
  1441. }
  1442. if( model.getValue("/root/main/selectedday/tue") == 'Y' ){
  1443. if( fAddRow( '2' ) ){
  1444. fSetTime( model.getValue("/root/main/selectedday/tueampm") );;
  1445. }
  1446. }
  1447. if( model.getValue("/root/main/selectedday/wed") == 'Y' ){
  1448. if( fAddRow( '3' ) ){
  1449. fSetTime( model.getValue("/root/main/selectedday/wedampm") );
  1450. }
  1451. }
  1452. if( model.getValue("/root/main/selectedday/thu") == 'Y' ){
  1453. if( fAddRow( '4' ) ){
  1454. fSetTime( model.getValue("/root/main/selectedday/thuampm") );
  1455. }
  1456. }
  1457. if( model.getValue("/root/main/selectedday/fri") == 'Y' ){
  1458. if( fAddRow( '5' ) ){
  1459. fSetTime( model.getValue("/root/main/selectedday/friampm") );
  1460. }
  1461. }
  1462. if( model.getValue("/root/main/selectedday/sat") == 'Y' ){
  1463. if( fAddRow( '6' ) ){
  1464. fSetTime( model.getValue("/root/main/selectedday/satampm") );
  1465. }
  1466. }
  1467. }
  1468. function fSave2(){
  1469. if( fCheckData() ){
  1470. var cur_row = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
  1471. if( cur_row > 0 ){
  1472. model.setValue("/root/send/updatedata/datalist",grd_ordschecrite.getUpdateData());
  1473. grd_ordschecrite.colStyle(1, "data","background-image") = "../../../com/commonweb/images/icon_n.gif";
  1474. if ( submit("TXPMB00706") ) {
  1475. //진료일정기준자료를 재 조회한다.
  1476. fGetOrdShceCrite();
  1477. //grd_ordschecrite.clearStatus();
  1478. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  1479. }
  1480. model.removeNodeset("/root/send/updatedata/datalist");
  1481. model.makeNode("/root/send/updatedata/datalist");
  1482. model.refresh();
  1483. }
  1484. }else{
  1485. return false;
  1486. }
  1487. return true;
  1488. }
  1489. ]]>
  1490. </script>
  1491. </xhtml:head>
  1492. <xhtml:body pagewidth="1211" pageheight="784" guideline="1,1194;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  1493. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  1494. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:178px; height:14px; ">진료일정 등록</caption>
  1495. </group>
  1496. <group id="group3" scroll="auto" style="left:0px; top:13px; width:1195px; height:744px; ">
  1497. <caption id="caption22" style="left:895px; top:200px; width:35px; height:20px; ">전체</caption>
  1498. <bool id="bool7" checkvalue="Y,N" ref="/root/send/allyn" style="left:875px; top:200px; width:20px; height:20px; ">
  1499. <script type="javascript" ev:event="xforms-value-changed">
  1500. <![CDATA[
  1501. //진료일정기준자료 조회 함수 호출 by 설승민 20181207
  1502. fGetOrdShceCrite();
  1503. var cur_row = grd_orddr.row;
  1504. model.setValue("/root/hidden/drcheck","");
  1505. if(cur_row > 0){
  1506. model.setValue("/root/hidden/drcheck", grd_orddr.valueMatrix( cur_row, 1 ));
  1507. }
  1508. ]]>
  1509. </script>
  1510. </bool>
  1511. <caption id="caption25" style="left:640px; top:76px; width:19px; height:20px; ">명</caption>
  1512. <input id="ipt_internetinwon" ref="/root/main/ordlist/orddrfild/orddrfildlist/internetinwon" style="left:614px; top:77px; width:26px; height:19px; text-align:right; "/>
  1513. <caption id="cap_internetinwon" class="cell_1" style="left:490px; top:75px; width:123px; height:23px; text-align:left; vertical-align:middle; ">인터넷 예약 가능인원</caption>
  1514. <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; ">
  1515. <choices>
  1516. <item>
  1517. <label>불가</label>
  1518. <value>N</value>
  1519. </item>
  1520. <item>
  1521. <label>가능</label>
  1522. <value>Y</value>
  1523. </item>
  1524. <item>
  1525. <label>초진만 가능</label>
  1526. <value>F</value>
  1527. </item>
  1528. <item>
  1529. <label>재진만 가능</label>
  1530. <value>R</value>
  1531. </item>
  1532. </choices>
  1533. </select1>
  1534. <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; ">
  1535. <choices>
  1536. <item>
  1537. <label>기타(임시)</label>
  1538. <value>VV</value>
  1539. </item>
  1540. <item>
  1541. <label>기타(검사)</label>
  1542. <value>XX</value>
  1543. </item>
  1544. </choices>
  1545. <script type="javascript" ev:event="onclick">
  1546. <![CDATA[
  1547. model.setValue("/root/main/bfdatadel", '');
  1548. var curDate = getCurrentDate();
  1549. // model.setValue("/root/main/schecretfromdd", curDate);
  1550. // model.setValue("/root/main/schecrettodd", curDate);
  1551. model.setValue("/root/main/schecretfromdd", curDate);
  1552. model.setValue("/root/main/schecrettodd", "20100228");
  1553. model.refresh();
  1554. ]]>
  1555. </script>
  1556. </select1>
  1557. <button id="button9" class="btn2_letter8" disabled="true" style="left:852px; top:461px; width:108px; height:19px; ">
  1558. <caption>초진정원으로 변경</caption>
  1559. <script type="javascript" ev:event="DOMActivate">
  1560. <![CDATA[
  1561. var row = grd_ordschecrite.row;
  1562. // var col = grd_ordschecrite.col;
  1563. var totalexamcap = parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amtotalexamcap")))
  1564. + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmtotalexamcap")))
  1565. + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigttotalexamcap")));
  1566. //진료일정기준자료가 섹션일 때만 사용가능
  1567. if( grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("schecretbase") ) == 'T' ){
  1568. messageBox("진료일정 생성기준이 [섹션]일 때만 선택한 상세기준자료를 초진정원으로 변경할 수 있습니다.", "E999", "");
  1569. return false;
  1570. }else if( totalexamcap > 0 ){
  1571. messageBox("기준자료가 [총정원]을 갖을 때는 초진정원으로 변경할 수 없습니다.", "E999", "");
  1572. return false;
  1573. }
  1574. //변경할 상세기준자료가 선택되지 않았을 때
  1575. var checkCnt = getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[ check = 'Y' ]");
  1576. if( checkCnt < 1 ) {
  1577. messageBox("상세기준자료가 선택되지 않았습니다.", "E999", "");
  1578. return false;
  1579. }
  1580. //선택된 초진 내역 정원 체크
  1581. var fstexamcap = parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("amfstexamcap")))
  1582. + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("pmfstexamcap")))
  1583. + parseInt(grd_ordschecrite.valueMatrix( row, grd_ordschecrite.colRef("nigtfstexamcap")));
  1584. if( checkCnt != fstexamcap ){
  1585. messageBox("기준자료의 초진정원과 선택된 상세기준내역의 수가 다릅니다.( [초진정원 : " + fstexamcap + "], [선택내역 : " + checkCnt + " ] )" , "E999", "");
  1586. return false;
  1587. }
  1588. var cnt = getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  1589. for( var i = 1; i <= cnt; i ++ ){
  1590. if( model.getValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/check") == 'Y' ){
  1591. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/fstexamcap", 1); //초진정원세팅
  1592. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/reexamcap", 0); //재진정원세팅
  1593. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/totalexamcap", 0); //총정원세팅
  1594. }else{
  1595. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/fstexamcap", 0); //초진정원세팅
  1596. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/reexamcap", 1); //재진정원세팅
  1597. model.setValue("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist[" + i + "]/totalexamcap", 0); //총정원세팅
  1598. }
  1599. if( grd_ordschecritedetail.rowStatus( i + 1 ) == 0 ){ //new
  1600. grd_ordschecritedetail.rowStatus( i + 1 ) = 2; //update
  1601. grd_ordschecritedetail.cellStyle("background-image", i + 1, grd_ordschecritedetail.colRef("check")) = "../../../com/commonweb/images/icon_u.gif";
  1602. }else if( grd_ordschecritedetail.rowStatus( i + 1 ) == 2 ){ //update
  1603. grd_ordschecritedetail.cellStyle("background-image", i + 1, grd_ordschecritedetail.colRef("check")) = "../../../com/commonweb/images/icon_u.gif";
  1604. }else if( grd_ordschecritedetail.rowStatus( i + 1 ) == 1 ){ //insert
  1605. grd_ordschecritedetail.rowStatus( i + 1 ) = 3; //insert & new
  1606. grd_ordschecritedetail.cellStyle("background-image", i + 1, grd_ordschecritedetail.colRef("check")) = "../../../com/commonweb/images/icon_u.gif";
  1607. }
  1608. }
  1609. model.refresh();
  1610. ]]>
  1611. </script>
  1612. </button>
  1613. <line id="line16" class="line_2" style="x1:792px; y1:98px; x2:1037px; y2:98px; "/>
  1614. <group id="group2" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  1615. <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; "/>
  1616. <caption id="caption3" class="search_name" style="left:25px; top:9px; width:73px; height:17px; ">진료과 :</caption>
  1617. <select1 id="cmb_orddept" ref="/root/main/orddeptcd" class="combo_search" appearance="minimal" style="left:102px; top:8px; width:150px; height:19px; ">
  1618. <choices>
  1619. <itemset nodeset="/root/init/orddeptcd/orddeptcdlist">
  1620. <label ref="nm"/>
  1621. <value ref="cd"/>
  1622. </itemset>
  1623. </choices>
  1624. <script type="javascript" ev:event="xforms-value-changed">
  1625. <![CDATA[
  1626. grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddept.value + "' ]";
  1627. grd_orddr.rebuild();
  1628. cmb_subdeptcd.choices.itemset.attribute("nodeset") = "/root/init/subdeptcd/subdeptcdlist[dp = '" + cmb_orddept.value + "' or dp = '-']";
  1629. model.setValue("/root/main/subdeptcd", "-");
  1630. fInitialize();
  1631. model.removeNodeset("/root/init/subdeptcd2/subdeptcdlist");
  1632. model.makeNode("/root/init/subdeptcd2/subdeptcdlist");
  1633. copyNodesetType("/root/init/subdeptcd2/subdeptcdlist", "/root/init/subdeptcd/subdeptcdlist[dp = '" + cmb_orddept.value + "' or dp = '-']", "replace");
  1634. ]]>
  1635. </script>
  1636. </select1>
  1637. <caption id="caption23" style="left:365px; top:8px; width:414px; height:20px; ">이전자료삭제 시 예약환자유무체크 비활성화, 일정생성시 중복체크 비활성화</caption>
  1638. <select1 id="cmb_subdeptcd" ref="/root/main/subdeptcd" class="combo_search" appearance="minimal" style="left:255px; top:8px; width:100px; height:19px; ">
  1639. <choices>
  1640. <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
  1641. <label ref="nm"/>
  1642. <value ref="cd"/>
  1643. </itemset>
  1644. </choices>
  1645. <script type="javascript" ev:event="xforms-value-changed">
  1646. <![CDATA[
  1647. /*
  1648. cmb_subdeptcd.refresh();
  1649. if( cmb_subdeptcd.value != '-' ){
  1650. grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = '" + cmb_subdeptcd.value + "' ]";
  1651. grd_orddr.rebuild();
  1652. }else{
  1653. grd_orddr.nodeset = "/root/init/orddrid/orddridlist[dp = '" + cmb_orddept.value + "' ]";
  1654. grd_orddr.rebuild();
  1655. }
  1656. fInitialize();
  1657. */
  1658. ]]>
  1659. </script>
  1660. </select1>
  1661. </group>
  1662. <line id="line5" class="line_1" style="x1:120px; y1:222px; x2:1194px; y2:222px; "/>
  1663. <caption id="caption8" class="tit_2" style="left:125px; top:207px; width:128px; height:13px; ">진료일정기준자료</caption>
  1664. <line id="line12" class="line_1" style="x1:0px; y1:70px; x2:115px; y2:70px; "/>
  1665. <caption id="caption5" class="tit_2" style="left:5px; top:55px; width:111px; height:13px; ">진료의사</caption>
  1666. <datagrid id="grd_ordschecrite" nodeset="/root/main/ordlist/ordschecrite/ordschecritelist" caption="^선택^요일^센터^하위부서^오전진료^오전진료^오전진료^오후진료^오후진료^오후진료^야간진료^야간진료^야간진료^오전 Term^오후 Term^야간 Term^오전정원^오전정원^오후정원^오후정원^야간정원^야간정원^총정원^총정원^총정원^정원&#xA;합계^생성기준^특이사항(요일별클리닉)^요일별 비고^최초입력일^최종수정자^진료생성기간^진료의ID^진료과코드^일련번호^일정&#xA;번호^이력상태^old_dwcd|^선택^요일^센터^하위부서^진료^시작^종료^진료^시작^종료^진료^시작^종료^오전 Term^오후 Term^야간 Term^초진^재진^초진^재진^초진^재진^오전^오후^야간^정원&#xA;합계^섹션/구간^특이사항(요일별클리닉)^요일별 비고^최초입력일^최종수정자^진료생성기간^진료의ID^진료과코드^일련번호^일정&#xA;번호^이력상태^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; ">
  1667. <col class="update_n" ref="update"/>
  1668. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  1669. <col ref="dwcd" type="combo" style="left:20px; top:43px; width:34px; height:23px; ">
  1670. <choices>
  1671. <itemset nodeset="/root/init/P0033list/P0033">
  1672. <label ref="cdnm"/>
  1673. <value ref="cdid"/>
  1674. </itemset>
  1675. </choices>
  1676. </col>
  1677. <col ref="centcd" type="combo">
  1678. <choices>
  1679. <itemset nodeset="/root/init/centcd/centcdlist">
  1680. <label ref="nm"/>
  1681. <value ref="cd"/>
  1682. </itemset>
  1683. </choices>
  1684. </col>
  1685. <col ref="subdeptcd" type="combo">
  1686. <choices>
  1687. <itemset nodeset="/root/init/subdeptcd2/subdeptcdlist">
  1688. <label ref="nm"/>
  1689. <value ref="cd"/>
  1690. </itemset>
  1691. </choices>
  1692. </col>
  1693. <col checkvalue="Y,N" disabled="true" ref="amordyn" type="checkbox" visibility="hidden"/>
  1694. <col disabled="true" ref="amfromtm" type="input" format="hh:nn"/>
  1695. <col disabled="true" ref="amtotm" type="input" format="hh:nn"/>
  1696. <col checkvalue="Y,N" disabled="true" ref="pmordyn" type="checkbox" visibility="hidden"/>
  1697. <col disabled="true" ref="pmfromtm" type="input" format="hh:nn"/>
  1698. <col disabled="true" ref="pmtotm" type="input" format="hh:nn"/>
  1699. <col checkvalue="Y,N" disabled="true" ref="nigtordyn" type="checkbox" visibility="hidden"/>
  1700. <col disabled="true" ref="nigtfromtm" type="input" format="hh:nn"/>
  1701. <col disabled="true" ref="nigttotm" type="input" format="hh:nn"/>
  1702. <col disabled="true" ref="amterm" type="input" format="999"/>
  1703. <col disabled="true" ref="pmterm" type="input" format="999"/>
  1704. <col disabled="true" ref="nigtterm" type="input" format="999"/>
  1705. <col disabled="true" ref="amfstexamcap" type="input" format="999"/>
  1706. <col disabled="true" ref="amreexamcap" type="input" format="999"/>
  1707. <col disabled="true" ref="pmfstexamcap" type="input" format="999"/>
  1708. <col disabled="true" ref="pmreexamcap" type="input" format="999"/>
  1709. <col disabled="true" ref="nigtfstexamcap" type="input" format="999"/>
  1710. <col disabled="true" ref="nigtreexamcap" type="input" format="999"/>
  1711. <col disabled="true" ref="amtotalexamcap" type="input"/>
  1712. <col disabled="true" ref="pmtotalexamcap" type="input"/>
  1713. <col disabled="true" ref="nigttotalexamcap" type="input"/>
  1714. <col disabled="true" ref="totalexamcap"/>
  1715. <col disabled="true" ref="schecretbase" type="combo">
  1716. <choices>
  1717. <itemset nodeset="/root/init/P0356list/P0356">
  1718. <label ref="cdnm"/>
  1719. <value ref="cdid"/>
  1720. </itemset>
  1721. </choices>
  1722. </col>
  1723. <col ref="clincnm" type="input" maxlength="50"/>
  1724. <col ref="remfact" type="input" maxlength="100"/>
  1725. <col ref="fstrgstdt" format="yyyy-mm-dd"/>
  1726. <col ref="lastupdtrid"/>
  1727. <col disabled="true" ref="fromtodd"/>
  1728. <col ref="orddrid" visibility="hidden"/>
  1729. <col ref="orddeptcd" visibility="hidden"/>
  1730. <col ref="seqno" visibility="hidden"/>
  1731. <col ref="scheno" visibility="hidden"/>
  1732. <col ref="histstat" visibility="hidden"/>
  1733. <col ref="dwcd_old" visibility="hidden"/>
  1734. <script type="javascript" ev:event="xforms-value-changed">
  1735. <![CDATA[
  1736. /*
  1737. - 0 : new
  1738. - 1 : insert
  1739. - 2 : update
  1740. - 3 : insert & new
  1741. - 4 : delete
  1742. */
  1743. if( grd_ordschecrite.colRef("check") == grd_ordschecrite.col ){
  1744. return false;
  1745. }else if( grd_ordschecrite.colRef("dwcd") == grd_ordschecrite.col ){
  1746. if( grd_ordschecrite.valueMatrix(grd_ordschecrite.row, grd_ordschecrite.colRef("dwcd_old")) != '' ){
  1747. grd_ordschecrite.valueMatrix(grd_ordschecrite.row, grd_ordschecrite.colRef("dwcd")) = grd_ordschecrite.valueMatrix(grd_ordschecrite.row, grd_ordschecrite.colRef("dwcd_old"));
  1748. messageBox("진료일정 기준자료에서 요일 정보는 수정할 수 없습니다. 변경하시려는 기준자료를 삭제 후 새로 등록하세요.", "E999", "");
  1749. return false;
  1750. }
  1751. }
  1752. var row = grd_ordschecrite.row;
  1753. var curRowStatus = grd_ordschecrite.rowStatus(row);
  1754. if( curRowStatus == 2 ){
  1755. grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  1756. }
  1757. fCalculateTotalExamcap();
  1758. ]]>
  1759. </script>
  1760. <script type="javascript" ev:event="onentercell">
  1761. <![CDATA[
  1762. // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
  1763. if (grd_ordschecrite.colType(grd_ordschecrite.col) == "input") {
  1764. grd_ordschecrite.editCell();
  1765. }
  1766. ]]>
  1767. </script>
  1768. <script type="javascript" ev:event="ondblclick">
  1769. <![CDATA[
  1770. var cur_col = grd_ordschecrite.col;
  1771. var cur_row = grd_ordschecrite.row;
  1772. if( cur_row >= grd_ordschecrite.fixedRows && cur_col >= grd_ordschecrite.fixedCols ){
  1773. if (grd_ordschecrite.rowStatus(cur_row) == "1" || grd_ordschecrite.rowStatus(cur_row) == "3"){
  1774. return false;
  1775. //messageBox("아직 저장하지 않은 기준자료는 상세기준자료가 없습니다.", "E999", "");
  1776. }
  1777. var totalexamcap = parseInt(grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("amtotalexamcap")))
  1778. + parseInt(grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("pmtotalexamcap")))
  1779. + parseInt(grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("nigttotalexamcap")));
  1780. //진료일정기준자료가 섹션일 때만 사용가능
  1781. if( grd_ordschecrite.valueMatrix( cur_row, grd_ordschecrite.colRef("schecretbase") ) == 'T' ){
  1782. //messageBox("진료일정 생성기준이 [섹션]일 때만 선택한 상세기준자료를 초진정원으로 변경할 수 있습니다.", "E999", "");
  1783. //초진정원으로 변경 버튼 비활성화
  1784. button9.disabled = true;
  1785. grd_ordschecritedetail.colDisabled( grd_ordschecritedetail.colRef("check")) = true;
  1786. }else if( totalexamcap > 0 ){
  1787. //messageBox("기준자료가 [총정원]을 갖을 때는 초진정원으로 변경할 수 없습니다.", "E999", "");
  1788. //초진정원으로 변경 버튼 비활성화
  1789. button9.disabled = true;
  1790. grd_ordschecritedetail.colDisabled( grd_ordschecritedetail.colRef("check")) = true;
  1791. }else{
  1792. //초진정원으로 변경 버튼 활성화
  1793. button9.disabled = false;
  1794. grd_ordschecritedetail.colDisabled( grd_ordschecritedetail.colRef("check")) = false;
  1795. }
  1796. fGetOrdScheCriteDetail();
  1797. }
  1798. ]]>
  1799. </script>
  1800. <script type="javascript" ev:event="onrowchanged">
  1801. <![CDATA[
  1802. //2008-05-26 이동식 추가 다른 기준자료를 선택할때 조회된 상세자료를 삭제한다.
  1803. if( getNodesetCount("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist/check") > 0 ){
  1804. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  1805. grd_ordschecritedetail.rebuild();
  1806. }
  1807. ]]>
  1808. </script>
  1809. </datagrid>
  1810. <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; ">
  1811. <col ref="nm"/>
  1812. <col ref="sp"/>
  1813. <col ref="dp" visibility="hidden"/>
  1814. <col ref="cd" visibility="hidden"/>
  1815. <script type="javascript" ev:event="onclick">
  1816. <![CDATA[
  1817. if( isDataCell() ){
  1818. model.resetInstanceNode("/root/send");
  1819. //진료일정기준자료 조회 함수 호출
  1820. fGetOrdShceCrite();
  1821. //최종일정생성일 조회
  1822. // fGetLastOrdScheCretDD();
  1823. var cur_row = grd_orddr.row;
  1824. model.setValue("/root/hidden/drcheck","");
  1825. if(cur_row > 0){
  1826. model.setValue("/root/hidden/drcheck", grd_orddr.valueMatrix( cur_row, 1 ));
  1827. }
  1828. }
  1829. ]]>
  1830. </script>
  1831. </datagrid>
  1832. <caption id="caption7" class="tit_2" style="left:798px; top:55px; width:102px; height:13px; ">진료일정생성</caption>
  1833. <caption id="caption9" class="cell_1" style="left:792px; top:100px; width:113px; height:46px; vertical-align:middle; ">
  1834. <![CDATA[희망일정생성기간
  1835. (From~To)]]>
  1836. </caption>
  1837. <line id="line4" class="line_1" style="x1:792px; y1:70px; x2:1194px; y2:70px; "/>
  1838. <input id="ipt_fromdd" ref="/root/main/schecretfromdd" class="input_default" inputtype="date" style="left:908px; top:101px; width:129px; height:19px; ">
  1839. <script type="javascript" ev:event="xforms-value-changed">
  1840. <![CDATA[
  1841. var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
  1842. model.resetInstanceNode("/root/main/selectedday");
  1843. if (strDay == "월") {
  1844. model.setValue("/root/main/selectedday/mon","Y");
  1845. }else if (strDay == "화") {
  1846. model.setValue("/root/main/selectedday/tue","Y");
  1847. }else if (strDay == "수") {
  1848. model.setValue("/root/main/selectedday/wed","Y");
  1849. }else if (strDay == "목") {
  1850. model.setValue("/root/main/selectedday/thu","Y");
  1851. }else if (strDay == "금") {
  1852. model.setValue("/root/main/selectedday/fri","Y");
  1853. }else if (strDay == "토"){
  1854. model.setValue("/root/main/selectedday/sat","Y");
  1855. }
  1856. model.refresh();
  1857. ]]>
  1858. </script>
  1859. </input>
  1860. <input id="ipt_todd" ref="/root/main/schecrettodd" class="input_default" inputtype="date" style="left:908px; top:125px; width:129px; height:19px; "/>
  1861. <line id="line7" class="line_3" style="x1:793px; y1:176px; x2:1194px; y2:176px; "/>
  1862. <line id="line2" class="line_1" style="x1:120px; y1:70px; x2:787px; y2:70px; "/>
  1863. <caption id="caption1" class="tit_2" style="left:125px; top:55px; width:169px; height:13px; ">진료의사별전문분야</caption>
  1864. <button id="btn_search4" class="btn5_letter7" style="left:1007px; top:49px; width:97px; height:19px; ">
  1865. <caption>③진료일정생성</caption>
  1866. <script type="javascript" ev:event="DOMActivate">
  1867. <![CDATA[
  1868. fOrdScheCriteList();
  1869. ]]>
  1870. </script>
  1871. </button>
  1872. <button id="btn_copyrow" class="btn2_letter3" style="left:985px; top:201px; width:53px; height:19px; ">
  1873. <caption>행복사</caption>
  1874. <script type="javascript" ev:event="DOMActivate">
  1875. <![CDATA[
  1876. row = grd_ordschecrite.row - grd_ordschecrite.fixedRows + 1;
  1877. if( row > 0 ){
  1878. grd_ordschecrite.addRow(false);
  1879. grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_i.gif";
  1880. bottom = grd_ordschecrite.rows - grd_ordschecrite.fixedRows;
  1881. model.copyNode("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]", "/root/main/ordlist/ordschecrite/ordschecritelist[" + row + "]");
  1882. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/seqno", 1);
  1883. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + bottom + "]/dwcd_old", '');
  1884. grd_ordschecrite.refresh();
  1885. //grd_ordschecrite.rebuild();
  1886. }else messageBox("복사할 행이 선택되지", "E007");
  1887. ]]>
  1888. </script>
  1889. </button>
  1890. <button id="btn_delrow" class="btn5_letter3" style="left:1041px; top:201px; width:53px; height:19px; ">
  1891. <caption>행삭제</caption>
  1892. <script type="javascript" ev:event="DOMActivate">
  1893. <![CDATA[
  1894. var startRow = grd_ordschecrite.fixedRows;
  1895. var endRow = grd_ordschecrite.rows;
  1896. var checkRow = startRow;
  1897. for( var i = startRow; i < endRow; i++){
  1898. //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
  1899. if( grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("check") ) == 'Y' ){
  1900. var Row = i+1;
  1901. //model.alert(Row);
  1902. //model.alert(grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") ));
  1903. 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") ) != '~'){
  1904. var fromtodd = grd_ordschecrite.valueMatrix( i, grd_ordschecrite.colRef("fromtodd") );
  1905. var todd = fromtodd.substring(9,17);
  1906. var curDate = getCurrentDate();
  1907. if(todd > curDate){
  1908. if(messageBox("선택하신 기준자료는 이미 일정이 생성되어 있는 자료 입니다. 삭제하시려면 해당 진료일정을 삭제 후 다시 시도해 주세요", "E999") != 6) return;
  1909. }
  1910. }
  1911. //디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
  1912. if (grd_ordschecrite.rowStatus(i) == "1" || grd_ordschecrite.rowStatus(i) == "3"){
  1913. grd_ordschecrite.deleteItem( i );
  1914. continue;
  1915. }else{
  1916. grd_ordschecrite.addStatus( i, "delete");
  1917. grd_ordschecrite.cellStyle("background-image", grd_ordschecrite.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  1918. checkRow++;
  1919. if(messageBox("선택된 행의 진료일정기준자료를", "Q001") != 6) return;
  1920. }
  1921. }
  1922. }
  1923. //삭제할 행의 정보를 send에 넣는다.
  1924. model.resetInstanceNode("/root/send/updatedata");
  1925. model.setValue("root/send/updatedata/datalist", grd_ordschecrite.getUpdateData("delete"));
  1926. if ( submit("TXPMB00705") ) {
  1927. //진료일정기준자료 조회 함수 호출
  1928. //fGetOrdShceCrite();
  1929. startRow = grd_ordschecrite.fixedRows;
  1930. endRow = grd_ordschecrite.rows;
  1931. checkRow = startRow;
  1932. for( var i = startRow; i < endRow; i++){
  1933. //model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist[" + (i - 1) + "]/check")
  1934. if( grd_ordschecrite.valueMatrix( checkRow, grd_ordschecrite.colRef("check") ) == 'Y' ){
  1935. //디비에서 삭제한 데이터를 그리드에서 삭제한다.
  1936. grd_ordschecrite.removeStatus(checkRow, "delete");
  1937. grd_ordschecrite.deleteItem(checkRow);
  1938. }else{
  1939. checkRow++;
  1940. }
  1941. }
  1942. //grd_ordschecrite.deleteItem( cur_row);
  1943. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  1944. }
  1945. model.removeNodeset("/root/send/updatedata/datalist");
  1946. model.makeNode("/root/send/updatedata/datalist");
  1947. model.refresh();
  1948. ]]>
  1949. </script>
  1950. </button>
  1951. <button id="btn_save" class="btn5_letter7" style="left:1097px; top:201px; width:97px; height:19px; ">
  1952. <caption>①기준자료저장</caption>
  1953. <script type="javascript" ev:event="DOMActivate">
  1954. <![CDATA[
  1955. //전문분야저장 주석처리
  1956. //fSaveDrFild();
  1957. fSave();
  1958. //선택요일추가 초기화
  1959. model.resetInstanceNode("/root/main/selectedday");
  1960. ]]>
  1961. </script>
  1962. </button>
  1963. <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; ">
  1964. <choices>
  1965. <item>
  1966. <label>오전진료</label>
  1967. <value>YA</value>
  1968. </item>
  1969. <item>
  1970. <label>오후진료</label>
  1971. <value>YP</value>
  1972. </item>
  1973. </choices>
  1974. <script type="javascript" ev:event="xforms-value-changed">
  1975. <![CDATA[
  1976. // if( radio1.value == 'YM' || radio1.value == 'YA' ){
  1977. // model.setValue("/root/main/bfdatadel", 'Del');
  1978. //
  1979. // }else{
  1980. // model.setValue("/root/main/bfdatadel", '');
  1981. // }
  1982. //선택요일추가 초기화
  1983. model.resetInstanceNode("/root/main/selectedday");
  1984. model.setValue("/root/main/bfdatadel", '');
  1985. //달력날짜 가져오기
  1986. //var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
  1987. model.resetInstanceNode("/root/main/selectedday");
  1988. var strDay = getCurrentDate().toDate().getDayOfWeek("K");
  1989. var curDate = getCurrentDate();
  1990. model.setValue("/root/main/schecretfromdd", curDate);
  1991. model.setValue("/root/main/schecrettodd", curDate);
  1992. //var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
  1993. if (strDay == "월") {
  1994. model.setValue("/root/main/selectedday/mon","Y");
  1995. }else if (strDay == "화") {
  1996. model.setValue("/root/main/selectedday/tue","Y");
  1997. }else if (strDay == "수") {
  1998. model.setValue("/root/main/selectedday/wed","Y");
  1999. }else if (strDay == "목") {
  2000. model.setValue("/root/main/selectedday/thu","Y");
  2001. }else if (strDay == "금") {
  2002. model.setValue("/root/main/selectedday/fri","Y");
  2003. }else if (strDay == "토"){
  2004. model.setValue("/root/main/selectedday/sat","Y");
  2005. }
  2006. fSetCheckDay();
  2007. model.setValue("/root/main/schecretfromdd", curDate);
  2008. model.setValue("/root/main/schecrettodd", curDate);
  2009. model.refresh();
  2010. ]]>
  2011. </script>
  2012. </select1>
  2013. <button id="btn_update" class="btn5_letter6" style="left:701px; top:49px; width:86px; height:19px; ">
  2014. <caption>전문분야저장</caption>
  2015. <script type="javascript" ev:event="DOMActivate">
  2016. <![CDATA[
  2017. fSaveDrFild();
  2018. ]]>
  2019. </script>
  2020. </button>
  2021. <button id="btn_delete" class="btn5_letter2" style="left:657px; top:49px; width:42px; height:19px; ">
  2022. <caption>삭제</caption>
  2023. <script type="javascript" ev:event="DOMActivate">
  2024. <![CDATA[
  2025. if(messageBox("진료의사별 전문분야를", "Q001") != 6) return;
  2026. /*
  2027. var status = grd_orddrfild.rowStatus(1);
  2028. //DB에 저장되지 않은 데이터의 경우 그리드에서만 삭제한다.
  2029. if( status == "1" || status == "3"){
  2030. //grd_orddrfild.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  2031. grd_orddrfild.removeItem();
  2032. grd_orddrfild.rebuild();
  2033. //fAddDrFildRow();
  2034. return;
  2035. }
  2036. grd_orddrfild.addStatus(1, "delete");
  2037. model.setValue("/root/send/updatedata/datalist", grd_orddrfild.getUpdateData());
  2038. */
  2039. model.copyNode("/root/send/updatedata/datalist", "/root/main/ordlist/orddrfild/orddrfildlist");
  2040. model.makeNode("/root/send/updatedata/datalist/m");
  2041. model.setValue("/root/send/updatedata/datalist/m", "d");
  2042. if(messageBox("전문분야를 삭제 하시겠습니까?", "Q999") != 6) return;
  2043. if ( submit("TXPMB00704") ) {
  2044. model.resetInstanceNode("/root/main/ordlist/orddrfild/orddrfildlist");
  2045. model.refresh();
  2046. //grd_orddrfild.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  2047. //grd_orddrfild.removeItem();
  2048. //grd_orddrfild.rebuild();
  2049. //fAddDrFildRow();
  2050. }
  2051. model.removeNodeset("/root/send/updatedata/datalist");
  2052. model.makeNode("/root/send/updatedata/datalist");
  2053. //model.refresh();
  2054. ]]>
  2055. </script>
  2056. </button>
  2057. <button id="btn_addrow" class="btn2_letter3" style="left:929px; top:201px; width:53px; height:19px; ">
  2058. <caption>행추가</caption>
  2059. <script type="javascript" ev:event="DOMActivate">
  2060. <![CDATA[
  2061. fAddRow();
  2062. grd_ordschecrite.refresh();
  2063. ]]>
  2064. </script>
  2065. </button>
  2066. <caption id="caption2" class="tit_2" style="left:125px; top:467px; width:153px; height:13px; ">요일별상세기준자료</caption>
  2067. <line id="line3" class="line_1" style="x1:120px; y1:482px; x2:1194px; y2:482px; "/>
  2068. <button id="button3" class="btn2_letter6" style="left:788px; top:201px; width:86px; height:19px; ">
  2069. <caption>선택요일추가</caption>
  2070. <script type="javascript" ev:event="DOMActivate">
  2071. <![CDATA[
  2072. fAddOrdList();
  2073. ]]>
  2074. </script>
  2075. </button>
  2076. <button id="button4" class="btn2_letter3" style="left:963px; top:461px; width:53px; height:19px; ">
  2077. <caption>행추가</caption>
  2078. <script type="javascript" ev:event="DOMActivate">
  2079. <![CDATA[
  2080. fAddRowDetail();
  2081. grd_ordschecrite.refresh();
  2082. ]]>
  2083. </script>
  2084. </button>
  2085. <button id="button5" class="btn5_letter3" style="left:1019px; top:461px; width:53px; height:19px; ">
  2086. <caption>행삭제</caption>
  2087. <script type="javascript" ev:event="DOMActivate">
  2088. <![CDATA[
  2089. if(messageBox("선택된 행을", "Q001") != 6) return;
  2090. var cur_row = grd_ordschecritedetail.row;
  2091. if( cur_row > 0 ){
  2092. //디비에 입력되지 않은 데이터는 그리드에서만 삭제한다.
  2093. if (grd_ordschecritedetail.rowStatus(cur_row) == "1" || grd_ordschecritedetail.rowStatus(cur_row) == "3"){
  2094. grd_ordschecritedetail.deleteItem(cur_row);
  2095. return;
  2096. }
  2097. grd_ordschecritedetail.addStatus(cur_row, "delete");
  2098. grd_ordschecritedetail.cellStyle("background-image", grd_ordschecritedetail.row, 1) = "../../../com/commonweb/images/icon_d.gif";
  2099. //삭제할 행의 정보를 send에 넣는다.
  2100. model.setValue("root/send/updatedata/datalist", grd_ordschecritedetail.getUpdateData("delete"));
  2101. if ( submit("TXPMB00709") ) {
  2102. grd_ordschecritedetail.removeStatus(cur_row, "delete");
  2103. grd_ordschecritedetail.deleteItem( cur_row);
  2104. }
  2105. }
  2106. ]]>
  2107. </script>
  2108. </button>
  2109. <button id="button6" class="btn5_letter9" style="left:1075px; top:461px; width:119px; height:19px; ">
  2110. <caption>②기준상세자료저장</caption>
  2111. <script type="javascript" ev:event="DOMActivate">
  2112. <![CDATA[
  2113. fSaveDetail();
  2114. ]]>
  2115. </script>
  2116. </button>
  2117. <caption id="caption4" class="cell_1" style="left:792px; top:76px; width:113px; height:23px; vertical-align:middle; ">최종진료생성일</caption>
  2118. <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; "/>
  2119. <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; ">
  2120. <choices>
  2121. <item>
  2122. <label>이전자료삭제</label>
  2123. <value>Del</value>
  2124. </item>
  2125. </choices>
  2126. </select>
  2127. <caption id="caption10" class="cell_1" style="left:120px; top:100px; width:95px; height:23px; vertical-align:middle; ">전문분야</caption>
  2128. <caption id="caption11" class="cell_1" style="left:120px; top:125px; width:95px; height:23px; vertical-align:middle; ">초진 특이사항</caption>
  2129. <caption id="caption12" class="cell_1" style="left:120px; top:150px; width:95px; height:23px; vertical-align:middle; ">재진 특이사항</caption>
  2130. <line id="line6" class="line_3" style="x1:120px; y1:176px; x2:787px; y2:176px; "/>
  2131. <bool id="bool1" checkvalue="Y,N" ref="/root/main/selectedday/mon" style="left:270px; top:187px; width:20px; height:20px; "/>
  2132. <select id="checkbox1" ref="/root/main/selectedday/monampm" overflow="visible" appearance="full" style="left:305px; top:189px; width:45px; height:35px; border-style:none; ">
  2133. <choices>
  2134. <item>
  2135. <label>오전</label>
  2136. <value>AM</value>
  2137. </item>
  2138. <item>
  2139. <label>오후</label>
  2140. <value>PM</value>
  2141. </item>
  2142. </choices>
  2143. </select>
  2144. <caption id="caption13" style="left:288px; top:187px; width:15px; height:20px; ">월</caption>
  2145. <select id="checkbox3" ref="/root/main/selectedday/tueampm" overflow="visible" appearance="full" style="left:392px; top:189px; width:45px; height:35px; border-style:none; ">
  2146. <choices>
  2147. <item>
  2148. <label>오전</label>
  2149. <value>AM</value>
  2150. </item>
  2151. <item>
  2152. <label>오후</label>
  2153. <value>PM</value>
  2154. </item>
  2155. </choices>
  2156. </select>
  2157. <bool id="bool2" checkvalue="Y,N" ref="/root/main/selectedday/tue" style="left:357px; top:187px; width:20px; height:20px; "/>
  2158. <caption id="caption14" style="left:375px; top:187px; width:15px; height:20px; ">화</caption>
  2159. <select id="checkbox4" ref="/root/main/selectedday/wedampm" overflow="visible" appearance="full" style="left:479px; top:189px; width:45px; height:35px; border-style:none; ">
  2160. <choices>
  2161. <item>
  2162. <label>오전</label>
  2163. <value>AM</value>
  2164. </item>
  2165. <item>
  2166. <label>오후</label>
  2167. <value>PM</value>
  2168. </item>
  2169. </choices>
  2170. </select>
  2171. <bool id="bool3" checkvalue="Y,N" ref="/root/main/selectedday/wed" style="left:444px; top:187px; width:20px; height:20px; "/>
  2172. <caption id="caption15" style="left:462px; top:187px; width:15px; height:20px; ">수</caption>
  2173. <select id="checkbox5" ref="/root/main/selectedday/thuampm" overflow="visible" appearance="full" style="left:566px; top:189px; width:45px; height:35px; border-style:none; ">
  2174. <choices>
  2175. <item>
  2176. <label>오전</label>
  2177. <value>AM</value>
  2178. </item>
  2179. <item>
  2180. <label>오후</label>
  2181. <value>PM</value>
  2182. </item>
  2183. </choices>
  2184. </select>
  2185. <bool id="bool4" checkvalue="Y,N" ref="/root/main/selectedday/thu" style="left:531px; top:187px; width:20px; height:20px; "/>
  2186. <caption id="caption16" style="left:549px; top:187px; width:15px; height:20px; ">목</caption>
  2187. <select id="checkbox6" ref="/root/main/selectedday/friampm" overflow="visible" appearance="full" style="left:653px; top:189px; width:45px; height:35px; border-style:none; ">
  2188. <choices>
  2189. <item>
  2190. <label>오전</label>
  2191. <value>AM</value>
  2192. </item>
  2193. <item>
  2194. <label>오후</label>
  2195. <value>PM</value>
  2196. </item>
  2197. </choices>
  2198. </select>
  2199. <bool id="bool5" checkvalue="Y,N" ref="/root/main/selectedday/fri" style="left:618px; top:187px; width:20px; height:20px; "/>
  2200. <caption id="caption17" style="left:636px; top:187px; width:15px; height:20px; ">금</caption>
  2201. <select id="checkbox7" ref="/root/main/selectedday/satampm" overflow="visible" appearance="full" style="left:740px; top:189px; width:45px; height:35px; border-style:none; ">
  2202. <choices>
  2203. <item>
  2204. <label>오전</label>
  2205. <value>AM</value>
  2206. </item>
  2207. <item>
  2208. <label>오후</label>
  2209. <value>PM</value>
  2210. </item>
  2211. </choices>
  2212. </select>
  2213. <bool id="bool6" checkvalue="Y,N" ref="/root/main/selectedday/sat" style="left:705px; top:187px; width:20px; height:20px; "/>
  2214. <caption id="caption18" style="left:723px; top:187px; width:15px; height:20px; ">토</caption>
  2215. <caption id="caption19" class="cell_1" style="left:120px; top:75px; width:95px; height:23px; text-align:left; vertical-align:middle; ">인터넷예약</caption>
  2216. <button id="button1" class="btn5_letter6" style="left:1108px; top:49px; width:86px; height:19px; ">
  2217. <caption>당일진료생성</caption>
  2218. <script type="javascript" ev:event="DOMActivate">
  2219. <![CDATA[
  2220. var strDay = model.getValue("/root/main/schecretfromdd").toDate().getDayOfWeek("K");
  2221. var Daytoday = getDateInterval(model.getValue("/root/main/schecretfromdd"),model.getValue("/root/main/schecrettodd"));
  2222. //희망일자 생성기간과 진료일정 기준자료의 요일 비교 체크
  2223. if(Daytoday < 7){
  2224. var nodeList = instance1.selectNodes("/root/main/ordlist/ordschecrite/ordschecritelist[check='Y']");
  2225. var rCSV = getNodeListCSV(nodeList);
  2226. var rows = grd_ordschecrite.rows;
  2227. if( rCSV == "" || rCSV == null || rCSV == undefined){
  2228. messageBox("일정을 생성할 기준자료가 선택되지", "E007");
  2229. return false;
  2230. }else{
  2231. //그리드 체크
  2232. for( var i = 2; i < rows; i++){
  2233. var cnt = "0";
  2234. var dayinterval = Daytoday;
  2235. var schecretfromdd = model.getValue("/root/main/schecretfromdd");
  2236. if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '0' ){
  2237. var dwcd = "일";
  2238. }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '1' ){
  2239. var dwcd = "월";
  2240. }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '2' ){
  2241. var dwcd = "화";
  2242. }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '3' ){
  2243. var dwcd = "수";
  2244. }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '4' ){
  2245. var dwcd = "목";
  2246. }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '5' ){
  2247. var dwcd = "금";
  2248. }else if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("dwcd")) == '6' ){
  2249. var dwcd = "토";
  2250. }
  2251. //model.alert(rows);
  2252. //model.alert(schecretfromdd);
  2253. //model.alert(dwcd);
  2254. if(grd_ordschecrite.valueMatrix(i, grd_ordschecrite.colRef("check")) == 'Y' ){
  2255. var cnt = "0";
  2256. //model,alert("start");
  2257. //model.alert(dayinterval);
  2258. //요일수 체크
  2259. for( var j = 0; j<dayinterval+1; j++){
  2260. //model.alert(schecretfromdd);
  2261. var dd = schecretfromdd.toDate().getDayOfWeek("K");
  2262. if(dwcd == dd){
  2263. //model.alert("aa");
  2264. cnt = parseInt(cnt) + parseInt("1");
  2265. }
  2266. schecretfromdd = schecretfromdd.toDate().getAddDate(+1,"D").getDateFormat();
  2267. }
  2268. if(cnt <= "0"){
  2269. messageBox("진료일정기준자료 "+ (i-1) + " 번째 줄의 요일과 희망일정생성기간이 상이 합니다. 확인 후 다시 시도해 주세요", "E999", "");
  2270. return;
  2271. }
  2272. }
  2273. }
  2274. }
  2275. }
  2276. //당일진료생성 버튼 선택시 기준자료저장+기준상세자료저장+진료일정생성 버튼을 누른것과 같이 동작한다.
  2277. if (model.getValue("/root/main/regltempflag") == "YY"){
  2278. messageBox("정규일정 생성불가! '임시' 또는 '과임시'를 선택하신 후 '당일진료생성'하세요!", "E999", "");
  2279. return false;
  2280. }
  2281. var rows = grd_ordschecrite.rows;
  2282. var fixedRows = grd_ordschecrite.fixedRows;
  2283. var dataRows = rows - fixedRows;
  2284. model.removenode("/root/hidden/tmp");
  2285. model.makeNode("/root/hidden/tmp");
  2286. //선택요일추가 초기화
  2287. model.resetInstanceNode("/root/main/selectedday");
  2288. //오늘날짜 세팅
  2289. if( model.getValue("/root/main/regltempflag") == 'XX' ){ //검사일정
  2290. // model.setValue("/root/main/schecretfromdd", getCurrentDate());
  2291. // model.setValue("/root/main/schecrettodd", model.getValue("/root/main/schecretfromdd"));
  2292. }else{
  2293. model.setValue("/root/main/schecretfromdd", getCurrentDate());
  2294. model.setValue("/root/main/schecrettodd", getCurrentDate());
  2295. }
  2296. fOrdScheCriteList();
  2297. for (var i = dataRows ; i>0; i--){
  2298. // if (model.getValue("/root/hidden/tmp/ordschecritelist["+i+"]/check") == "Y"){
  2299. // model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/check", "Y");
  2300. // }
  2301. model.setValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/check", "N");
  2302. }
  2303. ]]>
  2304. </script>
  2305. </button>
  2306. <line id="line9" class="line_3" style="x1:1040px; y1:121px; x2:1194px; y2:121px; "/>
  2307. <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; ">
  2308. <choices>
  2309. <item>
  2310. <label>정규</label>
  2311. <value>YY</value>
  2312. </item>
  2313. <item>
  2314. <label>임시</label>
  2315. <value>NN</value>
  2316. </item>
  2317. <item>
  2318. <label>대진</label>
  2319. <value>ZZ</value>
  2320. </item>
  2321. <item>
  2322. <label>특별</label>
  2323. <value>SS</value>
  2324. </item>
  2325. </choices>
  2326. <script type="javascript" ev:event="xforms-value-changed">
  2327. <![CDATA[
  2328. if( rdo_reglsche.value == 'YY' ){
  2329. model.setValue("/root/main/bfdatadel", 'Del');
  2330. var curDate = getCurrentDate();
  2331. model.setValue("/root/main/schecretfromdd", curDate);
  2332. model.setValue("/root/main/schecrettodd", "20100228");
  2333. }else{
  2334. model.setValue("/root/main/bfdatadel", '');
  2335. var curDate = getCurrentDate();
  2336. model.setValue("/root/main/schecretfromdd", curDate);
  2337. model.setValue("/root/main/schecrettodd", "20100228");
  2338. // model.setValue("/root/main/schecretfromdd", curDate);
  2339. // model.setValue("/root/main/schecrettodd", curDate);
  2340. }
  2341. model.refresh();
  2342. ]]>
  2343. </script>
  2344. </select1>
  2345. <select1 id="combo1" ref="/root/send/fromampmflag" appearance="minimal" style="left:406px; top:461px; width:65px; height:19px; ">
  2346. <choices>
  2347. <item>
  2348. <label>오전</label>
  2349. <value>A</value>
  2350. </item>
  2351. <item>
  2352. <label>오후</label>
  2353. <value>P</value>
  2354. </item>
  2355. <item>
  2356. <label>전일</label>
  2357. <value>AP</value>
  2358. </item>
  2359. </choices>
  2360. </select1>
  2361. <select1 id="combo2" ref="/root/send/fromdwcd" appearance="minimal" style="left:328px; top:461px; width:75px; height:19px; ">
  2362. <choices>
  2363. <itemset nodeset="/root/init/P0033list/P0033">
  2364. <label ref="cdnm"/>
  2365. <value ref="cdid"/>
  2366. </itemset>
  2367. </choices>
  2368. </select1>
  2369. <caption id="caption20" style="left:290px; top:463px; width:45px; height:20px; ">From :</caption>
  2370. <caption id="caption21" style="left:489px; top:461px; width:31px; height:20px; ">to :</caption>
  2371. <select1 id="combo3" ref="/root/send/toampmflag" appearance="minimal" style="left:590px; top:460px; width:65px; height:19px; ">
  2372. <choices>
  2373. <item>
  2374. <label>오전</label>
  2375. <value>A</value>
  2376. </item>
  2377. <item>
  2378. <label>오후</label>
  2379. <value>P</value>
  2380. </item>
  2381. <item>
  2382. <label>전일</label>
  2383. <value>AP</value>
  2384. </item>
  2385. </choices>
  2386. </select1>
  2387. <select1 id="combo4" ref="/root/send/todwcd" appearance="minimal" style="left:512px; top:460px; width:75px; height:19px; ">
  2388. <choices>
  2389. <itemset nodeset="/root/init/P0033list/P0033">
  2390. <label ref="cdnm"/>
  2391. <value ref="cdid"/>
  2392. </itemset>
  2393. </choices>
  2394. </select1>
  2395. <button id="button7" class="btn5_letter10" style="left:665px; top:460px; width:130px; height:19px; ">
  2396. <caption>요일상세기준자료 복사</caption>
  2397. <script type="javascript" ev:event="DOMActivate">
  2398. <![CDATA[
  2399. var fromdwcd = model.getValue("/root/send/fromdwcd");
  2400. var todwcd = model.getValue(" /root/send/todwcd");
  2401. var fromampmflag = model.getValue("/root/send/fromampmflag");
  2402. var toampmflag = model.getValue("/root/send/toampmflag");
  2403. var fromscheno = "";
  2404. var toscheno = "";
  2405. var rows = grd_ordschecrite.rows;
  2406. var fixedRows = grd_ordschecrite.fixedRows;
  2407. var dataRows = rows - fixedRows;
  2408. var check = 0;
  2409. var check2 = 0;
  2410. var flagcheck = 0;
  2411. var flagcheck2 = 0;
  2412. var checkfrom = 0;
  2413. var checkto = 0;
  2414. for (var i = dataRows ; i>0; i--){
  2415. if (fromdwcd == model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/dwcd")){
  2416. if(fromampmflag == 'A'){
  2417. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y'){
  2418. check = check +1
  2419. checkfrom = 1;
  2420. fromscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2421. }
  2422. }else if(fromampmflag == 'P'){
  2423. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
  2424. check = check +1
  2425. checkfrom = 1;
  2426. fromscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2427. }
  2428. }else if(fromampmflag == 'AP'){
  2429. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y' && model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
  2430. check = check +1
  2431. checkfrom = 1;
  2432. fromscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2433. }
  2434. }
  2435. if (check > 1 ){
  2436. messageBox("복사기능은 From, To 에 해당하는 요일이 진료일정 기준자료에 하나만 존재할때만 가능합니다. 중복요일을 삭제처리하신 ", "E012");
  2437. return false;
  2438. }
  2439. }
  2440. if (todwcd == model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/dwcd") ){
  2441. if(toampmflag == 'A'){
  2442. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y'){
  2443. check2 = check2 +1
  2444. checkto = 1;
  2445. toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2446. }
  2447. }else if(toampmflag == 'P'){
  2448. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
  2449. check2 = check2 +1
  2450. checkto = 1;
  2451. toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2452. }
  2453. }else if(toampmflag == 'AP'){
  2454. if(model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/amordyn") == 'Y' && model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/pmordyn") == 'Y'){
  2455. check2 = check2 +1
  2456. checkto = 1;
  2457. toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2458. }
  2459. }
  2460. /*
  2461. check2 = check2 +1
  2462. checkto = 1;
  2463. toscheno = model.getValue("/root/main/ordlist/ordschecrite/ordschecritelist["+i+"]/scheno");
  2464. */
  2465. if (check2 > 1 ){
  2466. messageBox("복사기능은 From, To 에 해당하는 요일이 진료일정 기준자료에 하나만 존재할때만 가능합니다. 중복요일을 삭제처리하신 ", "E012");
  2467. return false;
  2468. }
  2469. }
  2470. }
  2471. if (checkfrom == 0 || checkto == 0){
  2472. messageBox("복사기능은 From, To 에 해당하는 요일이 진료일정 기준자료에 존재하지 않습니다. 요일을 선택하신 ", "E012");
  2473. return false;
  2474. }
  2475. var cur_row = grd_orddr.row;
  2476. if(cur_row > 0){
  2477. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
  2478. model.setValue("/root/send/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
  2479. }else{
  2480. messageBox("진료과/진료의사 정보를 가져올 수 없습니다. 진료과/진료의사를 선택해 주세요.", "E999", "");
  2481. return false;
  2482. }
  2483. model.setValue("/root/send/fromscheno", fromscheno);
  2484. model.setValue("/root/send/toscheno", toscheno);
  2485. //2007-10-10 이동식 추가
  2486. if( model.getValue("/root/send/fromampmflag") != model.getValue("/root/send/toampmflag") ){
  2487. messageBox("복사할 요일별 오전오후구분이 같이야합니다.", "E999", "");
  2488. return false;
  2489. }
  2490. //END..
  2491. //return;
  2492. if (submit("TXPMB00711")) {
  2493. messageBox("복사처리가 정상적으로", "I002");
  2494. model.setValue("/root/send/fromdwcd", "");
  2495. model.setValue("/root/send/fromampmflag", "");
  2496. model.setValue("/root/send/todwcd", "");
  2497. model.setValue("/root/send/toampmflag", "");
  2498. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  2499. model.refresh();
  2500. }
  2501. ]]>
  2502. </script>
  2503. </button>
  2504. <select1 id="combo5" ref="/root/main/ordschecretno" class="combo_search" appearance="minimal" style="left:792px; top:151px; width:245px; height:19px; ">
  2505. <choices>
  2506. <itemset nodeset="/root/init/ordschecrethist/ordschecrethistlist">
  2507. <label ref="weeks"/>
  2508. <value ref="seqno"/>
  2509. </itemset>
  2510. </choices>
  2511. <script type="javascript" ev:event="xforms-value-changed">
  2512. <![CDATA[
  2513. //2008-06-04 이동식 추가 - 사용자 요구사항 - fGetLastOrdScheCretDD
  2514. //진료일정생성 후 변경이 있을때 기간별진료일정생성내역을 선택시 선택에 따라 진료일정기준자료가 보여지도록
  2515. var seqno = model.getValue("/root/main/ordschecretno");
  2516. if( seqno == '0' || seqno == '' || seqno == ' '){
  2517. //진료일정기준자료 조회 함수 호출
  2518. fGetOrdShceCrite();
  2519. }else{
  2520. //노드 초기화
  2521. model.removeNodeset("/root/main/ordlist/ordschecrite/ordschecritelist");
  2522. model.removeNodeset("/root/main/ordlist/ordschecritedetail/ordschecritedetaillist");
  2523. //선택된 일정생성차수에 해당하는 기준자료 조회
  2524. model.setValue("/root/send/orddrid", grd_orddr.valueMatrix( grd_orddr.row, grd_orddr.colRef("cd") ));
  2525. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
  2526. model.setValue("/root/send/ordcretdegree", model.getValue("/root/init/ordschecrethist/ordschecrethistlist[ seqno = " + seqno + " ]/ordcretdegree"));
  2527. submit("TRPMB00712");
  2528. }
  2529. //model.refresh();
  2530. ]]>
  2531. </script>
  2532. </select1>
  2533. <datagrid id="grd_ordschecritedetail" nodeset="/root/main/ordlist/ordschecritedetail/ordschecritedetaillist" caption="^선택^요일^센터^하위부서^시간^시간구분^초진정원^재진정원^총정원^정원합계^예약구분^특이사항(요일별클리닉)^요일별 비고^최종수정일^진료의ID^진료과코드^일련번호^일정&#xA;번호^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; ">
  2534. <col class="update_n" ref="update"/>
  2535. <col checkvalue="Y,N" ref="check" type="checkbox"/>
  2536. <col disabled="true" ref="dwcd" type="combo" style="left:20px; top:43px; width:34px; height:23px; ">
  2537. <choices>
  2538. <itemset nodeset="/root/init/P0033list/P0033">
  2539. <label ref="cdnm"/>
  2540. <value ref="cdid"/>
  2541. </itemset>
  2542. </choices>
  2543. </col>
  2544. <col ref="centcd" type="combo" visibility="hidden">
  2545. <choices>
  2546. <itemset nodeset="/root/init/centcd/centcdlist">
  2547. <label ref="nm"/>
  2548. <value ref="cd"/>
  2549. </itemset>
  2550. </choices>
  2551. </col>
  2552. <col ref="subdeptcd" type="combo" visibility="hidden">
  2553. <choices>
  2554. <itemset nodeset="/root/init/subdeptcd/subdeptcdlist">
  2555. <label ref="nm"/>
  2556. <value ref="cd"/>
  2557. </itemset>
  2558. </choices>
  2559. </col>
  2560. <col ref="ordtm" type="input" format="hh:nn"/>
  2561. <col ref="ampmflag" type="combo">
  2562. <choices>
  2563. <itemset nodeset="/root/init/P0316list/P0316">
  2564. <label ref="cdnm"/>
  2565. <value ref="cdid"/>
  2566. </itemset>
  2567. </choices>
  2568. </col>
  2569. <col ref="fstexamcap" type="input" format="999"/>
  2570. <col ref="reexamcap" type="input" format="999"/>
  2571. <col ref="totalexamcap" type="input"/>
  2572. <col ref="examcapsum"/>
  2573. <col ref="etcrsrvflag" type="combo">
  2574. <choices>
  2575. <itemset nodeset="/root/init/P6590list/P6590">
  2576. <label ref="cdnm"/>
  2577. <value ref="cdid"/>
  2578. </itemset>
  2579. </choices>
  2580. </col>
  2581. <col ref="clincnm" type="input" maxlength="50"/>
  2582. <col ref="remfact" type="input" maxlength="100"/>
  2583. <col ref="lastupdtdt" visibility="visible" format="yyyy-mm-dd"/>
  2584. <col ref="orddrid" visibility="hidden"/>
  2585. <col ref="orddeptcd" visibility="hidden"/>
  2586. <col ref="seqno" visibility="hidden"/>
  2587. <col ref="scheno" visibility="hidden"/>
  2588. <col ref="ordtm_old" visibility="hidden"/>
  2589. <script type="javascript" ev:event="xforms-value-changed">
  2590. <![CDATA[
  2591. /*
  2592. - 0 : new
  2593. - 1 : insert
  2594. - 2 : update
  2595. - 3 : insert & new
  2596. - 4 : delete
  2597. */
  2598. if( grd_ordschecritedetail.colRef("check") == grd_ordschecritedetail.col ){
  2599. return false;
  2600. }
  2601. var row = grd_ordschecritedetail.row;
  2602. var curRowStatus = grd_ordschecritedetail.rowStatus(row);
  2603. if( curRowStatus == 2 ){
  2604. grd_ordschecritedetail.cellStyle("background-image", grd_ordschecritedetail.row, 1) = "../../../com/commonweb/images/icon_u.gif";
  2605. }
  2606. fCalculateTotalExamcapDetail();
  2607. ]]>
  2608. </script>
  2609. <script type="javascript" ev:event="onentercell">
  2610. <![CDATA[
  2611. // col@type = "input" 일 경우 onentercell시점에 EditMode 상태 만들기
  2612. if (grd_ordschecritedetail.colType(grd_ordschecritedetail.col) == "input") {
  2613. grd_ordschecritedetail.editCell();
  2614. }
  2615. ]]>
  2616. </script>
  2617. <script type="javascript" ev:event="DOMFocusIn">
  2618. <![CDATA[
  2619. grd_ordschecritedetail.attribute("top") = "180";
  2620. grd_ordschecritedetail.attribute("height") = "554";
  2621. button8.visible = true;
  2622. ]]>
  2623. </script>
  2624. </datagrid>
  2625. <button id="button8" class="btn4_letter3" visibility="hidden" style="left:1125px; top:710px; width:68px; height:22px; ">
  2626. <caption>창축소</caption>
  2627. <script type="javascript" ev:event="DOMActivate">
  2628. <![CDATA[
  2629. grd_ordschecritedetail.attribute("top") = "485";
  2630. grd_ordschecritedetail.attribute("height") = "249";
  2631. button8.visible = false;
  2632. ]]>
  2633. </script>
  2634. </button>
  2635. <button id="button10" class="btn5_letter6" style="left:1042px; top:150px; width:86px; height:19px; ">
  2636. <caption>진료일정삭제</caption>
  2637. <script type="javascript" ev:event="DOMActivate">
  2638. <![CDATA[
  2639. //2008-06-04 이동식 추가 - 사용자 요구사항 - fGetLastOrdScheCretDD
  2640. //진료일정생성 후 변경이 있을때 기간별진료일정생성내역을 선택시 선택에 따라 진료일정기준자료가 보여지도록
  2641. var seqno = model.getValue("/root/main/ordschecretno");
  2642. if( seqno == '0' || seqno == '' || seqno == ' '){
  2643. //진료일정기준자료 조회 함수 호출
  2644. messageBox("삭제할 진료일정생성내역을 선택하세요!", "E999", "");
  2645. }else{
  2646. if( messageBox("선택한 진료일정생성내역을 삭제하시겠습니까?", "Q999", "") != 6 ){
  2647. return false;
  2648. }
  2649. //선택된 일정생성차수에 해당하는 기준자료 조회
  2650. model.setValue("/root/send/orddrid", grd_orddr.valueMatrix( grd_orddr.row, grd_orddr.colRef("cd") ));
  2651. model.setValue("/root/send/orddeptcd", model.getValue("/root/main/orddeptcd"));
  2652. model.setValue("/root/send/ordcretdegree", model.getValue("/root/init/ordschecrethist/ordschecrethistlist[ seqno = " + seqno + " ]/ordcretdegree"));
  2653. if(submit("TXPMB00713")){
  2654. fGetLastOrdScheCretDD();
  2655. }
  2656. }
  2657. //model.refresh();
  2658. ]]>
  2659. </script>
  2660. </button>
  2661. <textarea id="textarea1" ref="/root/main/ordlist/orddrfild/orddrfildlist/ordfild" maxlength="400" style="left:220px; top:102px; width:566px; height:19px; ">
  2662. <script type="javascript" ev:event="DOMFocusIn">
  2663. <![CDATA[
  2664. textarea1.attribute("top") = "77";
  2665. textarea1.attribute("height") = "98";
  2666. textarea1.visible = true;
  2667. textarea2.visible = false;
  2668. textarea3.visible = false;
  2669. button11.visible = true;
  2670. caption10.attribute("font-weight") = "bold";
  2671. caption11.initStyle("font-weight");
  2672. caption12.initStyle("font-weight");
  2673. ]]>
  2674. </script>
  2675. <script type="javascript" ev:event="DOMFocusOut">
  2676. <![CDATA[
  2677. textarea1.attribute("top") = "102";
  2678. textarea1.attribute("height") = "19";
  2679. textarea1.visible = true;
  2680. textarea2.visible = true;
  2681. textarea3.visible = true;
  2682. button11.visible = false;
  2683. caption10.initStyle("font-weight");
  2684. caption11.initStyle("font-weight");
  2685. caption12.initStyle("font-weight");
  2686. ]]>
  2687. </script>
  2688. </textarea>
  2689. <textarea id="textarea2" ref="/root/main/ordlist/orddrfild/orddrfildlist/fstexamrem" maxlength="400" style="left:220px; top:126px; width:566px; height:19px; ">
  2690. <script type="javascript" ev:event="DOMFocusIn">
  2691. <![CDATA[
  2692. textarea2.attribute("top") = "77";
  2693. textarea2.attribute("height") = "98";
  2694. textarea1.visible = false;
  2695. textarea2.visible = true;
  2696. textarea3.visible = false;
  2697. button11.visible = true;
  2698. caption10.initStyle("font-weight");
  2699. caption11.attribute("font-weight") = "bold";
  2700. caption12.initStyle("font-weight");
  2701. ]]>
  2702. </script>
  2703. <script type="javascript" ev:event="DOMFocusOut">
  2704. <![CDATA[
  2705. textarea2.attribute("top") = "126";
  2706. textarea2.attribute("height") = "19";
  2707. textarea1.visible = true;
  2708. textarea2.visible = true;
  2709. textarea3.visible = true;
  2710. button11.visible = false;
  2711. caption10.initStyle("font-weight");
  2712. caption11.initStyle("font-weight");
  2713. caption12.initStyle("font-weight");
  2714. ]]>
  2715. </script>
  2716. </textarea>
  2717. <textarea id="textarea3" ref="/root/main/ordlist/orddrfild/orddrfildlist/reexamrem" maxlength="400" style="left:220px; top:152px; width:566px; height:19px; ">
  2718. <script type="javascript" ev:event="DOMFocusIn">
  2719. <![CDATA[
  2720. textarea3.attribute("top") = "77";
  2721. textarea3.attribute("height") = "98";
  2722. textarea1.visible = false;
  2723. textarea2.visible = false;
  2724. textarea3.visible = true;
  2725. button11.visible = true;
  2726. caption10.initStyle("font-weight");
  2727. caption11.initStyle("font-weight");
  2728. caption12.attribute("font-weight") = "bold";
  2729. ]]>
  2730. </script>
  2731. <script type="javascript" ev:event="DOMFocusOut">
  2732. <![CDATA[
  2733. textarea3.attribute("top") = "152";
  2734. textarea3.attribute("height") = "19";
  2735. textarea1.visible = true;
  2736. textarea2.visible = true;
  2737. textarea3.visible = true;
  2738. button11.visible = false;
  2739. caption10.initStyle("font-weight");
  2740. caption11.initStyle("font-weight");
  2741. caption12.initStyle("font-weight");
  2742. ]]>
  2743. </script>
  2744. </textarea>
  2745. <button id="button11" class="btn5_letter3" visibility="hidden" style="left:602px; top:49px; width:53px; height:19px; ">
  2746. <caption>창축소</caption>
  2747. <script type="javascript" ev:event="DOMActivate">
  2748. <![CDATA[
  2749. textarea1.attribute("top") = "102";
  2750. textarea1.attribute("height") = "19";
  2751. textarea2.attribute("top") = "126";
  2752. textarea2.attribute("height") = "19";
  2753. textarea3.attribute("top") = "152";
  2754. textarea3.attribute("height") = "19";
  2755. textarea1.visible = true;
  2756. textarea2.visible = true;
  2757. textarea3.visible = true;
  2758. button11.visible = false;
  2759. caption10.initStyle("font-weight");
  2760. caption11.initStyle("font-weight");
  2761. caption12.initStyle("font-weight");
  2762. ]]>
  2763. </script>
  2764. </button>
  2765. <caption id="caption24" style="left:635px; top:76px; width:20px; height:20px; "/>
  2766. </group>
  2767. <group id="group4" scroll="auto" style="left:0px; top:757px; width:1195px; height:27px; ">
  2768. <button id="button27" class="btn3_letter6" style="left:0px; top:5px; width:104px; height:22px; ">
  2769. <caption>휴진일정등록</caption>
  2770. <script type="javascript" ev:event="DOMActivate">
  2771. <![CDATA[
  2772. open("SMPMB02500", "1", "50", "50", "SMPMB02500", "", "");
  2773. ]]>
  2774. </script>
  2775. </button>
  2776. <button id="button25" class="btn3_letter4" style="left:106px; top:5px; width:80px; height:22px; ">
  2777. <caption>병원달력</caption>
  2778. <script type="javascript" ev:event="DOMActivate">
  2779. <![CDATA[
  2780. open("SPPMB01003", "1", "150", "150", "SPPMB01003", "", "");
  2781. ]]>
  2782. </script>
  2783. </button>
  2784. <button id="btn_addrow5" class="btn4_letter3" style="left:1127px; top:5px; width:68px; height:22px; ">
  2785. <caption>초기화</caption>
  2786. <script type="javascript" ev:event="DOMActivate">
  2787. <![CDATA[
  2788. fInitialize();
  2789. ]]>
  2790. </script>
  2791. </button>
  2792. <button id="button20" class="btn3_letter8" style="left:188px; top:5px; width:130px; height:22px; ">
  2793. <caption>진료일정상세조회</caption>
  2794. <script type="javascript" ev:event="DOMActivate">
  2795. <![CDATA[
  2796. cur_row = grd_orddr.row;
  2797. if(cur_row > 0){
  2798. setParameter("SMPMB00800_ORDDEPTCD", model.getValue("/root/main/orddeptcd"));
  2799. setParameter("SMPMB00800_ORDDRID", grd_orddr.valueMatrix( cur_row, 3 ));
  2800. }
  2801. open("SMPMB00800", "1", "50", "50", "SMPMB00800", "", "");
  2802. ]]>
  2803. </script>
  2804. </button>
  2805. <button id="button2" class="btn3_letter6" visibility="hidden" style="left:319px; top:5px; width:104px; height:22px; ">
  2806. <caption>의사일정복사</caption>
  2807. <script type="javascript" ev:event="DOMActivate">
  2808. <![CDATA[
  2809. cur_row = grd_orddr.row;
  2810. if(cur_row > 0){
  2811. model.setValue("/root/temp/source/orddeptcd", model.getValue("/root/main/orddeptcd"));
  2812. model.setValue("/root/temp/source/orddrid", grd_orddr.valueMatrix( cur_row, 3 ));
  2813. }
  2814. modal("SPPMB01100", "1", "150", "150", "SPPMB01100", "/root/temp/source", "/root/temp");
  2815. ]]>
  2816. </script>
  2817. </button>
  2818. <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:1194px; y2:0px; "/>
  2819. </group>
  2820. </xhtml:body>
  2821. </xhtml:html>