123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의료정보 - 퇴원분석관리 ( SMMRD00400_퇴원분석관리.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- - Author : 박종훈 수정->이창록
-
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- var xDschAnalyListPath = "/root/main/dschanalyhist/dschanalyinfo";
- var xPatBaseInfoListPath = "/root/temp/patinfo/patbaseinfo";
- var xDschDDListPath = "/root/temp/patinfo/dschddlist";
- var xICUTotListPath = "/root/main/dschanalyhist/icutotlist/icudept";
- /**
- * @ver : 2007-12-05
- * @desc : 화면초기화
- * @
- * @by : 박종훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize()
- {
- //2010/01/06 hkjoo 추가
- //입원취소 환자 처리 시 데이터 복원을 위해 빈노드를 카피해 놓는다.
- model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist");
-
- //btn_icuinfo.selected ="true";
- //btn_addrow3.visible = false;
- //btn_delrow3.visible = false;
- // 공통코드 목록 가져오기/root/init/opclrsinfo2
- //체킹번호 true -> false 변경
- chk_cretchknum.value = "false";
- zbcfGetCodeList(new Array("M0149", "M0070", "M0151", "M0153",
- "M0155","M0152","M0157","M0156",
- "M0158","M0159","M0086","M0167",
- "M0165","M0013","P0006","M0417",
- "A0130","P0008","M0413","M0484",
- "A0145","M0414","M0415","M0416",
- "M0543"
- ),
- new Array("/root/init/jobList", "/root/init/relignList", "/root/init/maryStatList", "/root/init/inPathList",
- "/root/init/dethTypeList","/root/init/cureRsltList" ,"/root/init/DschTypeList","/root/init/chosProgList",
- "/root/init/reInResnList","/root/init/reOpResnList","/root/init/partrtntypeList","/root/init/brthtypeList",
- "/root/init/womntypeList","/root/init/optypeList","/root/init/mskindList","/root/init/unprepstatlist",
- "/root/init/infdisflaglist","/root/init/insukindList","/root/init/opDethTypeList","/root/init/infccaselist",
- "/root/init/infdcpartlist","/root/init/cmpllist","/root/init/wundcasclslist","/root/init/disposstatlist",
- "/root/init/nbabyList"
- )
- , true);
-
- // 진료과
- /* var instcd = getUserInfo("dutplceinstcd");
- var standard_yn = "orduseyn";
- var ord_deptflag = 'D';
- var rslt_ref = "/root/init/deptlist";
- var sort_method = "depthngnm";
- zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_method);*/
- model.removeNodeset("/root/main/dschanalyhist/oplist");
- model.removeNodeset("/root/main/dschanalyhist/cnstlist");
- model.removeNodeset("/root/main/dschanalyhist/wnmblist");
- model.removeNodeset("/root/main/dschanalyhist/chngdeptlist");
- model.removeNodeset("/root/main/dschanalyhist/iculist");
- model.removeNodeset("/root/main/dschanalyhist/infdislist");
- model.removeNodeset("/root/main/dschanalyhist/indxlist");
- if(checkOpener()){
- var parampid = opener.javascript.getParameter("SMMRD00400_param_pid");
- if(parampid != "")
- {
- ipt_pid.value = parampid;
- chk_cretchknum.value = "false";
- fPidKeyPress("init"); //등록번호로 환자 정보조회
-
- }
- }
-
- model.refresh();
-
-
-
- }
- /**
- * @desc : 이중번호 체크
- * @id :
- * @event : onkeypress
- * @return : void
- * @authur : 박성호 추가
- */
- function fDoublePidChk()
- {
- model.resetInstanceNode("/root/main/patinfo");
- model.makeNode("/root/main/patinfo");
-
- if(submit("TRPMC02500")){
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCount("/root/main/patinfo/patinfolist") > 0 ){
- //* 2009.04.07. 이중번호 메세지 ( 14257937 박용석 -> 13275912 신옥순 )
- var sBindPid = model.getValue("/root/main/patinfo/patinfolist/bindpid");
-
- //alert(sBindPid);
-
- if( sBindPid != '-' && sBindPid != '' && sBindPid != ' ' ){
- //합번된 등록번호 메세지 처리
- var sPid = model.getValue("/root/main/patinfo/patinfolist/pid");
- var sHngnm = model.getValue("/root/main/patinfo/patinfolist/hngnm");
- var retValue = messageBox(sPid + " (" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
- if( retValue == '6' ){
- /* 이벤트 다시 처리해서 재조회 처리함..
- model.makeValue(iptObj.attribute("ref"), sBindPid);
- iptObj.refresh();
- fCheckPid(iptObj, refPnm, refRrgstno);
- return "";
- //*/
- //model.makeValue(ipt_pid.attribute("ref"), sBindPid);
- model.setValue("/root/main/dschanalyhist/dschanalyinfo/pid", sBindPid);
- model.makeValue("/root/send/pid", sBindPid);
- ipt_pid.refresh();
-
- return true;
- }
- return false;
- }
- return true;
- //*/
- } else {
- model.resetInstanceNode("/root/main/patinfo/patinfolist");
- messageBox("없는 환자 번호 입니다.", "E999", "");
- model.refresh();
- return false;
- }
- }
-
-
- return true;
- }
- /**
- * @desc : 환자번호 정보조회
- * @id :
- * @event : onkeypress
- * @return : void
- * @authur : 박종훈 추가->이창록
- */
- function fPidKeyPress(pFlag)
- {
- cpt_patdethinfo.visible = false;
- var fromtime = getCurrentDateTime();
- model.removeNodeset("/root/send");
- var paramdschdd = "";
- model.makeValue("/root/send/srchcond", "1");
- if(model.getValue("/root/init/checknum/value") == "true"){
- model.makeValue("/root/send/pid", getCretCheckNo(ipt_pid.currentText, getUserInfo("dutplceinstcd")));
- model.makeValue("/root/main/dschanalyhist/dschanalyinfo/pid", model.getValue("/root/send/pid"));
- } else {
-
- model.makeValue("/root/send/pid", ipt_pid.currentText);
- }
-
- // 이중번호 체크 관련
- //model.setValue("/root/send/srchcond", "1");
- //model.setValue("/root/send/pid", ipt_pid.currentText);
-
- //환자등록번호 체크
- if(ipt_pid.currentText.length >= 1 ){
-
- model.resetInstanceNode("/root/main/patinfo");
- model.makeNode("/root/main/patinfo");
-
- //if(submit("TRPMC02500"))
- var pidchk = fDoublePidChk();
- //alert(pidchk);
-
- if ( pidchk == true )
- {
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
-
- if(submit("TRMRD00401", false)){
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCnt(model, xPatBaseInfoListPath) > 0 ){
- model.resetInstanceNode(xDschAnalyListPath);
- model.setValue(xDschAnalyListPath+"/pid" ,model.getValue(xPatBaseInfoListPath+"/pid"));
- model.setValue(xDschAnalyListPath+"/hngnm" ,model.getValue(xPatBaseInfoListPath+"/hngnm"));
- model.setValue(xDschAnalyListPath+"/rrgstno1" ,model.getValue(xPatBaseInfoListPath+"/rrgstno1"));
- model.setValue(xDschAnalyListPath+"/rrgstno2" ,model.getValue(xPatBaseInfoListPath+"/rrgstno2"));
- model.setValue(xDschAnalyListPath+"/age" ,model.getValue(xPatBaseInfoListPath+"/age"));
- model.setValue(xDschAnalyListPath+"/sexflag" ,model.getValue(xPatBaseInfoListPath+"/sex"));
- model.setValue(xDschAnalyListPath+"/btype" ,model.getValue(xPatBaseInfoListPath+"/btype"));
- model.setValue(xDschAnalyListPath+"/rh" ,model.getValue(xPatBaseInfoListPath+"/rh"));
- model.setValue(xDschAnalyListPath+"/forgeryn" ,model.getValue(xPatBaseInfoListPath+"/forgeryn"));
- model.setValue(xDschAnalyListPath+"/telno" ,model.getValue(xPatBaseInfoListPath+"/hometel"));
- model.setValue(xDschAnalyListPath+"/mpphontel",model.getValue(xPatBaseInfoListPath+"/mpphontel"));
- model.setValue(xDschAnalyListPath+"/zipcd1" ,model.getValue(xPatBaseInfoListPath+"/zipcd1"));
- model.setValue(xDschAnalyListPath+"/zipcd2" ,model.getValue(xPatBaseInfoListPath+"/zipcd2"));
- model.setValue(xDschAnalyListPath+"/addr" ,model.getValue(xPatBaseInfoListPath+"/addr"));
- model.setValue(xDschAnalyListPath+"/detladdr" ,model.getValue(xPatBaseInfoListPath+"/detladdr"));
- model.removeNodeset("/root/main/dschanalyhist/oplist");
- model.removeNodeset("/root/main/dschanalyhist/cnstlist");
- model.removeNodeset("/root/main/dschanalyhist/wnmblist");
- model.removeNodeset("/root/main/dschanalyhist/chngdeptlist");
- model.removeNodeset("/root/main/dschanalyhist/iculist");
- model.removeNodeset("/root/main/dschanalyhist/infdislist");
- model.removeNodeset("/root/main/dschanalyhist/indxlist");
- model.setValue("/root/main/cond/statcnts","");
-
-
-
- if( (getNodesetCnt(model,"/root/temp/patinfo/chgdschddlist") > 0)
- ||(getNodesetCnt(model,"/root/temp/patinfo/dschddlist") > 0)){
- if(pFlag == "init"){
- if(checkOpener()){
- paramdschdd = opener.javascript.getParameter("SMMRD00400_param_dschdd");
- }
- if(paramdschdd != ""){
- model.setValue(xDschAnalyListPath+"/dschdd", paramdschdd);
- }else{
- model.setValue(xDschAnalyListPath+"/dschdd" , model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd"));
- }
- }else{
- model.setValue(xDschAnalyListPath+"/dschdd", model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd"));
- }
-
- // 20081218 수정
- //cmb_dschdd.refresh();
-
- fGetDschAnalyInfo();
- model.setValue(xDschAnalyListPath+"/orgdschdd", model.getValue("/root/temp/patinfo/dschddlist[1]/dschdd"));
-
- // 20081218 수정
- //cmb_orgdschdd.refresh();
-
- }
-
- // 2013.09.23 CYW START ---------------------------------------------------------------
- var pid = model.getValue(xPatBaseInfoListPath+"/pid");
- model.makeValue("/root/send/dethinfo/pid" , pid );
- model.makeValue("/root/send/dethinfo/instdcd" , getUserInfo("dutplceinstcd") );
- if( submit("TRMRD00418") ){
- var patdethcnt = getNodesetCount("/root/main/patdethinfo/patdethlist");
- if( patdethcnt > 0 ){
- cpt_patdethinfo.visible = true;
- }else{
- cpt_patdethinfo.visible = false;
- }
-
- }
- // 2013.09.23 CYW END ------------------------------------------------------------------
-
- }else{
- messageBox("없는 환자 번호 입니다.", "E999", "");
- }
- }
- model.refresh();
- }
- else
- {
- model.setFocus("ipt_pid");
- model.refresh();
- }
-
- /*
- if(submit("TRMRD00401", false)){
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( getNodesetCnt(model, xPatBaseInfoListPath) > 0 ){
- model.resetInstanceNode(xDschAnalyListPath);
- model.setValue(xDschAnalyListPath+"/pid" ,model.getValue(xPatBaseInfoListPath+"/pid"));
- model.setValue(xDschAnalyListPath+"/hngnm" ,model.getValue(xPatBaseInfoListPath+"/hngnm"));
- model.setValue(xDschAnalyListPath+"/rrgstno1" ,model.getValue(xPatBaseInfoListPath+"/rrgstno1"));
- model.setValue(xDschAnalyListPath+"/rrgstno2" ,model.getValue(xPatBaseInfoListPath+"/rrgstno2"));
- model.setValue(xDschAnalyListPath+"/age" ,model.getValue(xPatBaseInfoListPath+"/age"));
- model.setValue(xDschAnalyListPath+"/sexflag" ,model.getValue(xPatBaseInfoListPath+"/sex"));
- model.setValue(xDschAnalyListPath+"/btype" ,model.getValue(xPatBaseInfoListPath+"/btype"));
- model.setValue(xDschAnalyListPath+"/rh" ,model.getValue(xPatBaseInfoListPath+"/rh"));
- model.setValue(xDschAnalyListPath+"/forgeryn" ,model.getValue(xPatBaseInfoListPath+"/forgeryn"));
- model.setValue(xDschAnalyListPath+"/telno" ,model.getValue(xPatBaseInfoListPath+"/hometel"));
- model.setValue(xDschAnalyListPath+"/mpphontel",model.getValue(xPatBaseInfoListPath+"/mpphontel"));
- model.setValue(xDschAnalyListPath+"/zipcd1" ,model.getValue(xPatBaseInfoListPath+"/zipcd1"));
- model.setValue(xDschAnalyListPath+"/zipcd2" ,model.getValue(xPatBaseInfoListPath+"/zipcd2"));
- model.setValue(xDschAnalyListPath+"/addr" ,model.getValue(xPatBaseInfoListPath+"/addr"));
- model.setValue(xDschAnalyListPath+"/detladdr" ,model.getValue(xPatBaseInfoListPath+"/detladdr"));
- model.removeNodeset("/root/main/dschanalyhist/oplist");
- model.removeNodeset("/root/main/dschanalyhist/cnstlist");
- model.removeNodeset("/root/main/dschanalyhist/wnmblist");
- model.removeNodeset("/root/main/dschanalyhist/chngdeptlist");
- model.removeNodeset("/root/main/dschanalyhist/iculist");
- model.removeNodeset("/root/main/dschanalyhist/infdislist");
- model.removeNodeset("/root/main/dschanalyhist/indxlist");
- model.setValue("/root/main/cond/statcnts","");
- if( getNodesetCnt(model,"/root/temp/patinfo/dschddlist") > 0){
- if(pFlag == "init"){
- if(checkOpener()){
- paramdschdd = opener.javascript.getParameter("SMMRD00400_param_dschdd");
- }
- if(paramdschdd != ""){
- model.setValue(xDschAnalyListPath+"/dschdd", paramdschdd);
- }else{
- model.setValue(xDschAnalyListPath+"/dschdd" , model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd"));
- }
- }else{
- model.setValue(xDschAnalyListPath+"/dschdd", model.getValue("/root/temp/patinfo/chgdschddlist[1]/dschdd"));
- }
-
- // 20081218 수정
- //cmb_dschdd.refresh();
-
- fGetDschAnalyInfo();
- model.setValue(xDschAnalyListPath+"/orgdschdd", model.getValue("/root/temp/patinfo/dschddlist[1]/dschdd"));
-
- // 20081218 수정
- //cmb_orgdschdd.refresh();
- }
- }else{
- messageBox("없는 환자 번호 입니다.", "E999", "");
- }
- }
- model.refresh();
- */
- }else{
- messageBox("환자등록번호를 정확히", "C001");
- }
-
- var totime = getCurrentDateTime();
- //alert("from: " + fromtime + " to:" + totime);
-
- }
- /**
- * @desc : 퇴원분석 정보 조회
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fGetDschAnalyInfo(){
-
- var sDschDD = model.getValue(xDschAnalyListPath+"/dschdd");
- var sInDD = model.getValue("/root/temp/patinfo/chgdschddlist[dschdd='"+sDschDD+"']/indd");
-
- //2010.03.31. 이은영 : 퇴원일자 기준으로 분과정보 가져옴. (서울성모만 - 외과분과 때문에 퇴원일 기준으로 분과코드를 가져옴.)
- if (getUserInfo("dutplceinstcd") == "000") {
- model.makeValue("/root/send/gsdeptcd", "");
- model.makeValue("/root/send/stndd", sDschDD);
- submit("TRMRD00417");
- copyNodeset("/root/temp/patinfo/clrsdeptinfo/opclrsdeptlist" , "/root/init/gsclrsinfo/gsclrsdeptlist");
- copyNodeset("/root/temp/patinfo/clrsdeptinfo/chngclrsdeptlist", "/root/init/gsclrsinfo/gsclrsdeptlist");
- copyNodeset("/root/temp/patinfo/clrsdeptinfo/cnsclrsdeptlist1", "/root/init/gsclrsinfo/gsclrsdeptlist");
- copyNodeset("/root/temp/patinfo/clrsdeptinfo/cnsclrsdeptlist2", "/root/init/gsclrsinfo/gsclrsdeptlist");
- copyNodeset("/root/temp/patinfo/clrsdeptinfo/icuclrsdeptlist" , "/root/init/gsclrsinfo/gsclrsdeptlist");
- }
-
- // 퇴원당시 진료과전체
- model.removeNodeset("/root/init/dschdeptlist/dept");
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/dschdeptlist", "depthngnm", "asc", sDschDD);
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/stntodd", sDschDD);
- //증환자실 기준일자 변경(퇴원일자 -> 입원,퇴원일자로변경 (20090408))
- model.makeValue("/root/send/stnfromdd", sInDD);
- // 중환자실 코드 조회
- if(submit("TRMRD00404", false)){
- copyNodesetType("/root/init/icudeptlist/icudept","/root/temp/initlist/icudept","replace", model, model);
- }
- //2009-05-15 오전 9:40:22 강지훈 수정 : 퇴원일자 기준으로 지표관리 항목을 보여준다.
- model.removeNodeset("/root/init/indxlist/indx");
- chk_indxlist.refresh();
- submit("TRMRD00407");
- chk_indxlist.refresh();
-
- model.removeNodeset("/root/send");
- var sIndx = cmb_dschdd.focusIndex+1;
- model.makeValue("/root/send/pid", model.getValue(xDschAnalyListPath+"/pid"));
- model.makeValue("/root/send/indd", model.getValue(xDschDDListPath+"["+sIndx+"]/indd"));
- model.makeValue("/root/send/careinrmtm", model.getValue(xDschDDListPath+"["+sIndx+"]/careinrmtm")); //2010.01.11, hkjoo 추가
- model.makeValue("/root/send/cretno", model.getValue(xDschDDListPath+"["+sIndx+"]/cretno"));
- model.makeValue("/root/send/dschdd", sDschDD);
- model.makeValue("/root/send/dschtm", model.getValue(xDschDDListPath+"["+sIndx+"]/dschtm"));//2010.01.11, hkjoo 추가
- if(submit("TRMRD00402", false)){
-
- var pid = model.getValue(xDschAnalyListPath+"/pid");
- if ( pid != "" )
- {
- var sIndd = model.getValue(xDschAnalyListPath+"/indd");
- // 2008-10-21 나종천 수정 실제 입원일자로 재원일수를 구함
- var sInroomdd = model.getValue(xDschAnalyListPath+"/inrmdd");
- var sDschdd = model.getValue(xDschAnalyListPath+"/dschdd");
- var code = model.getValue(xDschAnalyListPath+"/infccascd");
- //입원당시 진료과전체
- model.removeNodeset("/root/init/indeptlist/dept");
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/indeptlist", "depthngnm", "asc", sInroomdd);
- fInDschClrsDeptSearch("dsch");//퇴원과분과
- fInDschClrsDeptSearch("indd");//입원과분과
- fGetInFcCas(code);//감염종류 체크
- // 입력 여부 체크
- fCheckItemInputYN();
- // ER내원일시, 체류시간 체크
- var sInPathCd = model.getValue(xDschAnalyListPath+"/inpathcd");
- if(sInPathCd == "02"){
- ipt_erchosdt.disabled = false;
- ipt_erstaytm.disabled = false;
- }else{
- ipt_erchosdt.disabled = true;
- ipt_erstaytm.disabled = true;
- }
- // 중환자실 전체 재원일수
- model.removeNodeset("/root/main/dschanalyhist/icutotlist");
- if(grd_iculist.rows > grd_iculist.fixedrows){
- var sTotInHospDayNo = 0;
- var iRow = 0;
- var iICUTotRow = 0;
- var sICUCd = "";
- for(var iStndRow = grd_iculist.fixedrows; iStndRow<=(grd_iculist.rows-grd_iculist.fixedrows); iStndRow++){
- sICUCd = model.getValue("/root/main/dschanalyhist/iculist["+iStndRow+"]/icucd");
- iICUTotRow = grd_icutotlist.findRow(sICUCd, grd_icutotlist.fixedrows, 1);
- sTotInHospDayNo = 0;
- if(iICUTotRow < 1){
- for(var iRow = grd_iculist.fixedrows; iRow <= (grd_iculist.rows-grd_iculist.fixedrows); iRow++){
- if(model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/icucd") == sICUCd){
- sInHospDayNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/inhospdayno");
- if(sInHospDayNo == "") sInHospDayNo = 0;
- sTotInHospDayNo += eval(sInHospDayNo);
- }
- }
- grd_icutotlist.addRow();
- iRow = grd_icutotlist.rows - grd_icutotlist.fixedrows;
- model.setValue(xICUTotListPath+"["+iRow+"]/deptcd",sICUCd);
- model.setValue(xICUTotListPath+"["+iRow+"]/totinhospdayno", sTotInHospDayNo);
- }
- }
- }
-
- if(model.getValue(xDschAnalyListPath+"/status") == "i"){ // 신규
- // 총 재원일수 계산
- if(sInroomdd != "" && sDschdd != ""){ /* if(sIndd != "" && sDschdd != ""){ 2008-10-21 나종천 수정 실제 재원일수를 구함 */
- var totinhospdayno = getDateInterval(sInroomdd,sDschdd); /* 2008-10-21 나종천 수정 실제 재원일수를 구함 var totinhospdayno = getDateInterval(sIndd,sDschdd); */
- // //이윤주수정(20131121) - 시작
- // var erdays = model.getValue(xDschAnalyListPath+"/erdays");
- // totinhospdayno -= eval(erdays);
- // //이윤주수정(20131121) - 종료
- if(totinhospdayno < 1) totinhospdayno = 1;
- model.setValue(xDschAnalyListPath+"/totinhospdayno", totinhospdayno);
- }
- // 회차
- /* var indg = cmb_dschdd.length-cmb_dschdd.focusIndex;
- model.setValue(xDschAnalyListPath+"/indg",indg);
- if(indg == 1){
- ipt_reinresn.disabled = true;
- cmb_reinresncd.disabled = true;
- ipt_reinyncd.disabled = true;
- cmb_reinyn.disabled = true;
- }*/
- var bfindg = model.getValue(xDschAnalyListPath+"/bfindg");
- if(bfindg==""){
- model.setValue(xDschAnalyListPath+"/indg",1);
- ipt_reinresn.disabled = true;
- cmb_reinresncd.disabled = true;
- ipt_reinyncd.disabled = true;
- cmb_reinyn.disabled = true;
- }else{
- model.setValue(xDschAnalyListPath+"/indg",parseInt(bfindg)+1);
- }
- //재입원 일수
- var bfdschdd = model.getValue(xDschAnalyListPath+"/bfdschdd");
- var totbfdayno = getDateInterval(bfdschdd,sInroomdd);
- if(bfdschdd!=""){
- if((totbfdayno >=0)&&(totbfdayno <= 30)){
- model.setValue("/root/main/dschanalyhist/dschanalyinfo/reinyn","01");
- model.setValue(xDschAnalyListPath+"/reinyncd", model.getValue(xDschAnalyListPath+"/reinyn"));
-
- // 20081218 수정
- //ipt_reinyncd.refresh();
-
- fCheckItemInputYN("reinyn");
- }else{
- model.setValue("/root/main/dschanalyhist/dschanalyinfo/reinyn","02");
- model.setValue(xDschAnalyListPath+"/reinyncd", model.getValue(xDschAnalyListPath+"/reinyn"));
-
- // 20081218 수정
- //ipt_reinyncd.refresh();
-
-
- ipt_reinresn.disabled = false;
- cmb_reinresncd.disabled = false;
- }
- }else{
- model.setValue("/root/main/dschanalyhist/dschanalyinfo/reinyn","02");
- model.setValue(xDschAnalyListPath+"/reinyncd", model.getValue(xDschAnalyListPath+"/reinyn"));
-
- // 20081218 수정
- //ipt_reinyncd.refresh();
- }
- model.setValue(xDschAnalyListPath+"/orgdschdd", model.getValue(xDschAnalyListPath+"/dschdd"));
-
- //2013/01/08 Start
- fnbabychk();
- //2013/01/08 End
- model.setValue("/root/main/cond/statcnts","퇴원분석이 이루어지지 않았습니다.");
- model.makeValue("/root/main/detldeptcdsaveyn", "Y");
- // 20081218 수정
- //model.refresh();
-
- // 수술내역
- for(var iRow = grd_oplist.fixedrows; iRow <= grd_oplist.rows-grd_oplist.fixedrows; iRow++){
- grd_oplist.rowStatus(iRow) = 1;
- }
- // 협의진단
- for(var iRow = grd_cnstlist.fixedrows; iRow <= grd_cnstlist.rows-grd_cnstlist.fixedrows; iRow++){
- grd_cnstlist.rowStatus(iRow) = 1;
- }
-
- for(var iRow = grd_wnmblist.fixedrows; iRow <= grd_wnmblist.rows-grd_wnmblist.fixedrows+1; iRow++){
- grd_wnmblist.rowStatus(iRow) = 1;
- }
- // 전과정보
- for(var iRow = grd_chngdeptlist.fixedrows; iRow <= grd_chngdeptlist.rows-grd_chngdeptlist.fixedrows; iRow++){
- grd_chngdeptlist.rowStatus(iRow) = 1;
- }
- // 중환자실
- for(var iRow = grd_iculist.fixedrows; iRow <= grd_iculist.rows-grd_iculist.fixedrows; iRow++){
- grd_iculist.rowStatus(iRow) = 1;
- }
- // 전염병2008-11-23 사용자 요구에 따라 막음(이창록)
- /*for(var iRow = grd_infdislist.fixedrows; iRow <= grd_infdislist.rows-grd_infdislist.fixedrows; iRow++){
- grd_infdislist.rowStatus(iRow) = 1;
- }*/
- }else{
- dPid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid");
- dDschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd");
- sDschDD = dDschdd.substr(0,4)+"/"+dDschdd.substr(4,2)+"/"+dDschdd.substr(6,2);
-
- //2013/01/08 Start
- fnbabychk();
- //2013/01/08 End
-
- model.setValue("/root/main/cond/statcnts",dPid+"환자의"+sDschDD+"의 퇴원분석이 되어 있습니다.");
-
- // 20081218 수정
- //model.refresh();
-
- messageBox(dPid + "환자의" + sDschDD +"의 퇴원분석이 되어","I010");
-
- model.makeValue("/root/main/detldeptcdsaveyn", "N");
- }
- // 산모/신생아
- grd_wnmblist.mergeCells = "bycol";
- /*
- grd_wnmblist.mergeCol(6) = false;
- grd_wnmblist.mergeCol(7) = false;
- grd_wnmblist.mergeCol(8) = false;
- grd_wnmblist.mergeCol(9) = false;
- grd_wnmblist.mergeCol(10) = false;
- grd_wnmblist.mergeCol(11) = false;
- */
-
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("partrtneprccd")) = false;
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("nbabyflag")) = false;
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("partrtnkindcd")) = false;
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("prgweekcnt")) = false;
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("prgdayno")) = false;
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("nbabybdwtqty")) = false;
- grd_wnmblist.mergeCol(grd_wnmblist.colRef("womnid")) = false;
-
- model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist");
- }
- else //2010/01/06 hkjoo 추가
- {
- messageBox("입원취소 된 건","I009");
-
- model.copyNode("/root/main/dschanalyhist", "/root/temp/dschanalyhist");
- model.resetInstanceNode("/root/main/dschanalyhist");
- model.setValue(xDschAnalyListPath + "/dschdd", sDschDD);
- model.setValue(xDschAnalyListPath + "/pid", model.getValue("/root/send/pid"));
- }
-
- }
-
- // 20081218 수정
- //model.refresh();
- chk_indxlist.refresh();
-
-
- }
- /**
- * @desc : 초기화
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fClearDschInfo(){
-
- model.resetInstanceNode(xDschAnalyListPath);
- model.removeNodeset("/root/main/dschanalyhist/oplist");
- model.removeNodeset("/root/main/dschanalyhist/cnstlist");
- model.removeNodeset("/root/main/dschanalyhist/wnmblist");
- model.removeNodeset("/root/main/dschanalyhist/chngdeptlist");
- model.removeNodeset("/root/main/dschanalyhist/iculist");
- model.removeNodeset("/root/main/dschanalyhist/infdislist");
- model.removeNodeset("/root/main/dschanalyhist/indxlist");
- model.removeNodeset("/root/main/dschanalyhist/icutotlist");
- // 입원병실정보
- model.removeNodeset("/root/init/inroomlist/room");
- // 퇴원병실정보
- model.removeNodeset("/root/init/dschroomlist/room");
- //감염종류2
- model.removeNodeset("/root/init/infdcpartinfo/infdcpartlist");
- model.refresh();
- }
- /**
- * @desc : 병동 정보 조회
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fGetWardInfo(ref, pFlag, pCtrlID){
- var resultRef = "/root/temp/wardinfo";
- model.removenode(resultRef);
- model.removenode(ref);
- model.makeNode(resultRef);
- var sCtrlID = document.controls(pCtrlID);
- var roomcd = sCtrlID.currentText;
- model.makeValue(ref+"/roomcd",roomcd);
- model.makeValue(ref+"/stnddd", model.getValue(xDschAnalyListPath+"/dschdd"));
- if(submit("TRMRD00403", "false", ref, resultRef)==true){
- if(getNodesetCnt(model, resultRef+"/ward") > 0){
- if(pFlag == "in"){
- model.setValue(xDschAnalyListPath+"/inwardcd", model.getValue(resultRef+"/ward/wardcd"));
- model.setValue(xDschAnalyListPath+"/inwardnm", model.getValue(resultRef+"/ward/wardnm"));
- model.setValue(xDschAnalyListPath+"/inroomcd",roomcd);
- }else if(pFlag == "dsch"){
- model.setValue(xDschAnalyListPath+"/dschwardcd", model.getValue(resultRef+"/ward/wardcd"));
- model.setValue(xDschAnalyListPath+"/dschwardnm", model.getValue(resultRef+"/ward/wardnm"));
- model.setValue(xDschAnalyListPath+"/dschroomcd",roomcd);
- }
- }else{
- if(pFlag == "in"){
- model.setValue(xDschAnalyListPath+"/inwardcd","");
- model.setValue(xDschAnalyListPath+"/inwardnm","");
- model.setValue(xDschAnalyListPath+"/inroomcd","");
- }else if(pFlag == "dsch"){
- model.setValue(xDschAnalyListPath+"/dschwardcd","");
- model.setValue(xDschAnalyListPath+"/dschwardnm","");
- model.setValue(xDschAnalyListPath+"/dschroomcd","");
- }
- }
- }
- model.refresh();
- }
- /**
- * @desc : 줄 추가
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fAddGridRow(pGrid){
- var sPid = model.getValue(xDschAnalyListPath+"/pid");
- var sDschDD = model.getValue(xDschAnalyListPath+"/dschdd");
- if(sPid == "" && sDschDD == ""){
- messageBox("퇴원일자를 입력 후에 추가","I006");
- return;
- }
- var sGridID = document.controls(pGrid);
- var ref = sGridID.attribute("nodeset");
- sGridID.addRow();
- var iRow = sGridID.rows - sGridID.fixedrows;
- model.setValue(ref+"["+iRow+"]/pid", sPid);
- model.setValue(ref+"["+iRow+"]/dschdd", sDschDD.split('-').join("")); //'-'문자가 들어가 있는 숫자일 경우 '-'문자를 분할(split())한 다음에 다시 결합(join)
- }
- /**
- * @desc : 줄 삭제
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fDelGridRow(pGrid){
- var sGridID = document.controls(pGrid);
- var ref = sGridID.attribute("nodeset");
- var iRow = sGridID.row;
- if(iRow < 1) return;
- var iStatus = sGridID.rowStatus(iRow);
- if(iStatus == 1 || iStatus == 3){
- sGridID.deleteRow(iRow);
- }else{
- sGridID.rowStatus(iRow) = 4;
- sGridID.deleteRow(iRow);
- }
-
- }
- /**
- * @desc : 항목별 입력 여부 체크
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fCheckItemInputYN(pFlag){
- // 치료결과 체크
- if(pFlag == "curerslt" || pFlag == null){
- var sCureRsltCD = model.getValue(xDschAnalyListPath+"/curersltcd");
- if(sCureRsltCD == "07" || sCureRsltCD == "08"){
- ipt_dethtype.disabled = false;
- cmb_dethtypecd.disabled = false;
- ipt_opdethtype.disabled = false;
- cmb_opdethtypecd.disabled = false;
- }else{
- ipt_dethtype.disabled = true;
- cmb_dethtypecd.disabled = true;
- ipt_opdethtype.disabled = true;
- cmb_opdethtypecd.disabled = true;
- model.makeValue(xDschAnalyListPath+"/dethtype","");
- model.makeValue(xDschAnalyListPath+"/dethtypecd","");
-
- // 20081218 수정
- //ipt_dethtype.refresh();
- //cmb_dethtypecd.refresh();
- //ipt_opdethtype.refresh();
- //cmb_opdethtypecd.refresh();
-
- }
- }
- // 입원경로 체크
- if(pFlag == "inpath"){
- var sInPathCd = model.getValue(xDschAnalyListPath+"/inpathcd");
- if(sInPathCd == "02"){
- ipt_erchosdt.disabled = false;
- ipt_erstaytm.disabled = false;
- }else{
- ipt_erchosdt.disabled = true;
- ipt_erstaytm.disabled = true;
- model.setValue(xDschAnalyListPath+"/erchosdt","");
- model.setValue(xDschAnalyListPath+"/erstaytm","");
-
- // 20081218 수정
- //ipt_erchosdt.refresh();
- //ipt_erstaytm.refresh();
- }
-
- }
-
- // 재입원(Unplan) 체크
- if(pFlag == "reinresn" || pFlag == null){
- var sReInResnCd = model.getValue(xDschAnalyListPath+"/reinresncd");
- if(sReInResnCd != ""){
- model.setValue(xDschAnalyListPath+"/reinyncd","");
- model.setValue(xDschAnalyListPath+"/reinyn","");
- ipt_reinyncd.disabled = true;
- cmb_reinyn.disabled = true;
-
- // 20081218 수정
- //ipt_reinyncd.refresh();
- //cmb_reinyn.refresh();
- }else{
- ipt_reinyncd.disabled = false;
- cmb_reinyn.disabled = false;
- }
- }
- // 재입원(plan) 체크
- if(pFlag == "reinyn" || pFlag == null){
- var sReInYN = model.getValue(xDschAnalyListPath+"/reinyn");
- if(sReInYN != ""){
- model.setValue(xDschAnalyListPath+"/reinresncd","");
- model.setValue(xDschAnalyListPath+"/reinresn","");
- ipt_reinresn.disabled = true;
- cmb_reinresncd.disabled = true;
-
- // 20081218 수정
- //ipt_reinresn.refresh();
- //cmb_reinresncd.refresh();
- }else{
- ipt_reinresn.disabled = false;
- cmb_reinresncd.disabled = false;
- }
- }
- }
- /**
- * @desc : 저장
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fSave()
- {
- //등록번호
- if(model.getValue(xDschAnalyListPath+"/pid") == ""){
- messageBox("등록번호는", "I003");
- model.setFocus("ipt_pid");
- return;
- }
- // 종교
- if(model.getValue(xDschAnalyListPath+"/religncd") == ""){
- messageBox("종교는", "I003");
- model.setFocus("cmb_religncd");
- return;
- }
-
- // 결혼상태
- if(model.getValue(xDschAnalyListPath+"/marystatcd") == ""){
- messageBox("결혼상태는", "I003");
- model.setFocus("cmb_marystatcd");
- return;
- }
-
- // 직업
- if(model.getValue(xDschAnalyListPath+"/jobcd") == ""){
- messageBox("직업은", "I003");
- model.setFocus("cmb_jobcd");
- return;
- }
-
- // 치료결과
- if(model.getValue(xDschAnalyListPath+"/curersltcd") == ""){
- messageBox("치료결과는", "I003");
- model.setFocus("cmb_curersltcd");
- return;
- }
- // 퇴원형태
- if(model.getValue(xDschAnalyListPath+"/dschtypecd") == ""){
- messageBox("퇴원형태는", "I003");
- model.setFocus("cmb_dschtypecd");
- return;
- }
- // 내원경위
- if(model.getValue(xDschAnalyListPath+"/chosprogcd") == ""){
- messageBox("내원경위는", "I003");
- model.setFocus("cmb_chosprogcd");
- return;
- }
- // 입원경로
- if(model.getValue(xDschAnalyListPath+"/inpathcd") == ""){
- messageBox("입원경로는", "I003");
- model.setFocus("cmb_inpathcd");
- return;
- }
-
- mmbfGetHardCodeInfoNm("/root/send/hardcode","/root/hidden/deptchklist", 4001);
-
- // 2009.06.06 박성호
- // 입원,퇴원과에 해당하는 분과를 선택 여부 체크
- var DeptList = findNodeset(model, "/root/hidden/deptchklist/hardcd");
-
- for(var idx = 0; idx < DeptList.length; idx++)
- {
- var DeptNode = model.getValue("/root/hidden/deptchklist/hardcd[" + (idx+1) + "]/hardcd");
- var ChkYN = model.getValue("/root/hidden/deptchklist/hardcd[" + (idx+1) + "]/hardcdnm");
-
- var indeptcd = model.getValue(xDschAnalyListPath+"/indeptcd");
-
- var dschdeptcd = model.getValue(xDschAnalyListPath+"/dschdeptcd");
-
- //alert("과:" + DeptNode + " :||| 체크여부:" + ChkYN);
-
- if (indeptcd == DeptNode)
- {
-
- if (ChkYN == "Y")
- {
- if(cmb_inclrsdeptcd.label==""){
- messageBox(caption12.attribute("text")+" 분과를","C002");
- model.setFocus("cmb_inclrsdeptcd");
- return;
- }
- }
-
- }
-
- if (dschdeptcd == DeptNode)
- {
- if (ChkYN == "Y")
- {
- if(cmb_dschclrsdeptcd.label==""){
- messageBox(caption23.attribute("text")+" 분과를","C002");
- model.setFocus("cmb_dschclrsdeptcd");
- return;
- }
- }
-
- }
- }
-
- /*
- //입원,퇴원과에 해당하는 분과를 선택 여부 체크
- var indeptcd = model.getValue(xDschAnalyListPath+"/indeptcd");
- var dschdeptcd = model.getValue(xDschAnalyListPath+"/dschdeptcd");
- if((indeptcd=="2010000000")||(indeptcd=="2040000000")||(indeptcd=="2100000000")||(indeptcd=="2110000000")){
- if(cmb_inclrsdeptcd.label==""){
- messageBox(caption12.attribute("text")+" 분과를","C002");
- model.setFocus("cmb_inclrsdeptcd");
- return;
- }
- }
- if((dschdeptcd=="2010000000")||(dschdeptcd=="2040000000")||(dschdeptcd=="2100000000")||(dschdeptcd=="2110000000")){
- if(cmb_dschclrsdeptcd.label==""){
- messageBox(caption23.attribute("text")+" 분과를","C002");
- model.setFocus("cmb_dschclrsdeptcd");
- return;
- }
- }
- */
-
- //수술정보에서 마취방법 체크 여부
- var anstmthdcd1 = model.getValue("/root/main/dschanalyhist/oplist["+grd_oplist.rows-grd_oplist.fixedrows+"]/anstmthdcd1");
- var gnrlanstcnt = model.getValue("/root/main/dschanalyhist/dschanalyinfo/gnrlanstcnt");
- var prtanstcnt = model.getValue("/root/main/dschanalyhist/dschanalyinfo/prtanstcnt");
- var tpclanstcnt = model.getValue("/root/main/dschanalyhist/dschanalyinfo/tpclanstcnt");
- if(getNodesetCnt(model,"/root/main/dschanalyhist/oplist")>0){
- if(grd_oplist.valueMatrix(grd_oplist.rows-grd_oplist.fixedrows,grd_oplist.colRef("anstmthdcd1"))==""){
- messageBox("수술정보에 마취방법은 ","I003");
- return;
- }
- if(((gnrlanstcnt=="0")||(gnrlanstcnt==""))&&((prtanstcnt=="0")||(prtanstcnt==""))&&((tpclanstcnt=="0")||(tpclanstcnt==""))){
- messageBox("수술정보에 전신,부분,국소 건수를 ","C001");
- return;
- }
- }
- //치료결과에 48이전(후)(07,08)사망시 퇴원형태가 사망퇴원(06)인지 체크,반대도 동일
- var curersltcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/curersltcd");
- var dschtypecd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschtypecd");
- if((curersltcd=="07")||(curersltcd=="08")){
- if(dschtypecd!="06"){
- messageBox("사망환자일 경우에 퇴원형태를 ","I007");
- model.setFocus("cmb_dschtypecd");
- return;
- }
- }else if((curersltcd!="07")||(curersltcd!="08")){
- if(dschtypecd=="06"){
- messageBox(cmb_dschtypecd.label+" 환자일 경우에 치료결과를 ","I007");
- model.setFocus("cmb_curersltcd");
- return;
- }
- }
- // 입원분과나 퇴원분과든 산과일때 산모/신생아정보가 없을시 체크
- var inclrsdeptcd = model.getValue(xDschAnalyListPath+"/inclrsdeptcd");
- var dschclrsdeptcd = model.getValue(xDschAnalyListPath+"/dschclrsdeptcd");
- if((inclrsdeptcd =="2100600000")||(dschclrsdeptcd =="2100600000")){
- if(getNodesetCnt(model,"/root/main/dschanalyhist/wnmblist")< 1){
- messageBox("산모 / 신생아정보를 ","C001");
- return;
- }
- }
- // 입원분과나 퇴원분과든 산과일때 산모/신생아정보에 산모형테 미입력시 체크
- if((inclrsdeptcd =="2100600000")||(dschclrsdeptcd =="2100600000")){
- if(grd_wnmblist.valueMatrix(grd_wnmblist.rows-grd_wnmblist.fixedrows+1,grd_wnmblist.colRef("womntypecd"))==""){
- messageBox("산모 / 신생아정보에 산모형태를 ","C001");
- return;
- }
- }
- // 조회한 등록번호랑 저장할 등록번호 일치 여부
- if(model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid")!=(model.getValue(xPatBaseInfoListPath+"/pid"))){
- messageBox("조회한 등록번호랑 저장할 등록번호가 ","E004");
- model.setFocus("ipt_pid");
- return;
- }
- var inrmdd= model.getValue(xDschAnalyListPath+"/inrmdd");
- var inrmDD = inrmdd.replace("-","") ;
- model.setValue(xDschAnalyListPath+"/inrmdd",inrmDD);
- var dschdd= model.getValue(xDschAnalyListPath+"/dschdd");
- if(dschdd.indexOf("-")> 0){
- model.makeValue(xDschAnalyListPath+"/dschdd",dschdd.split('-').join(""));
- }
-
- // 2012/10/17 Start
- var rows = grd_cnstlist.rows-grd_cnstlist.fixedRows;
- // 협력의뢰의 의뢰과가 소아청소년과 또는 산부인과일 경우 의뢰분과를 필수로 입력토록 수정
- for(var i=1; i<=rows; i++){
- var reqdept = model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/reqdeptcd");
- if(reqdept=="2110000000" || reqdept=="2100000000"){
- if(model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/reqclrsdeptcd")==""){
- messageBox("의뢰과가 소아청소년과 또는 산부인과일 경우 의뢰분과는", "I003");
- return;
- }
- }
- // 협력의뢰의 회신과과 소아청소년과 또는 산부인과일 경우 회신분과를 필수로 입력토록 수정
- var ansdept = model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/execdeptcd");
- if(ansdept=="2110000000" || ansdept=="2100000000"){
- if(model.getValue("/root/main/dschanalyhist/cnstlist[" + i + "]/execlrsdeptcd")==""){
- messageBox("회신과가 소아청소년과 또는 산부인과일 경우 회신분과는", "I003");
- return;
- }
- }
- }
- // 퇴원형태가 사망퇴원인 경우 사망형태는 필수로 입력토록 수정
- if(model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschtypecd")=="06"){
- if(model.getValue("/root/main/dschanalyhist/dschanalyinfo/dethtypecd")==""){
- messageBox("퇴원형태가 사망퇴원인 경우 사망형태는", "I003");
- return;
- }
- }
- // 2012/10/17 End
-
- // 2013/01/07 Start
- var rows = grd_oplist.rows-grd_oplist.fixedRows;
- // 수술정보의 수술과가 소아청소년과 또는 산부인과 일 경우 수술분과는 필수로 입력토록 수정
- for(var i=1; i<=rows; i++){
- var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist[" + i + "]/perfdeptcd");
- if(perfdeptcd=="2110000000" || perfdeptcd=="2100000000"){
- if(model.getValue("/root/main/dschanalyhist/oplist[" + i + "]/opclrsdeptcd")==""){
- messageBox("수술과가 소아청소년과 또는 산부인과일 경우 수술분과는", "I003");
- return;
- }
- }
- }
-
- var inpath=model.getValue("/root/main/dschanalyhist/dschanalyinfo/inpath");
- if(inpath=="01"){ // 입원경로가 외래일경우
- var erchosdt=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erchosdt"); //ER내원일시
- var erstaytm=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erstaytm"); //ER체류시간
- if(erchosdt!="" || erstaytm!=""){
- messageBox("입원경로가 외래인 경우 ER내원일시 또는 ER체류시간은\n 입력할 수", "I004");
- return;
- }
- }else if(inpath=="02"){ // 입원경로가 응급실일경우
- var erchosdt=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erchosdt"); //ER내원일시
- var erstaytm=model.getValue("/root/main/dschanalyhist/dschanalyinfo/erstaytm"); //ER체류시간
- if(erchosdt==""){
- messageBox("입원경로가 응급실인 경우 ER내원일시는", "I003");
- return;
- }
- }
-
-
- // 2013/01/07 End
- // 2013/01/08 Start
- var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- var clrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd");
- var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid");
- var nbabyflag=model.getValue("/root/main/dschanalyhist/wnmblist/nbabyflag");
- if(deptcd=="2110000000" && clrsdeptcd!=""){ // 소아청소년과이면서 분과가 존재할 시에
- var nodecnt = getNodesetCount("/root/main/dschanalyhist/wnmblist");
- var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid");
- if(nodecnt > 0 && womnid!="" && nbabyflag==""){ // 산모번호가 존재시
- messageBox("산모/신생아 정보를 확인 후", "C003");
- return;
- }else if(nodecnt > 0 && womnid=="" && nbabyflag!="" && nbabyflag!="-"){// 산모번호가 존재하지 않을시
- messageBox("산모/신생아 정보를 확인 후", "C003");
- return;
- }
- }
- // 2013/01/08 End
-
- var dethdd = model.getValue("/root/main/patdethinfo/patdethlist/dethdd");
- var dethtm = model.getValue("/root/main/patdethinfo/patdethlist/dethtm");
- dethtm = dethtm.substr(0,4);
- var dschtm = model.getValue("/root/send/dschtm");
- if(dethtm == " "){
- dethtm = "";
- }
- if(dschtm == " "){
- dschtm = "";
- }
-
- var dethddtm = dethdd + dethtm;
- var dschddtm = dschdd + dschtm;
- // 2013.09.23 CYW START
- var patdethcnt = getNodesetCount("/root/main/patdethinfo/patdethlist");
- if( patdethcnt > 0 ){
- var dethdd = model.getValue("/root/main/patdethinfo/patdethlist/dethdd");
- // 사망일자가 퇴원일 이후인 경우 제외
- //if( dschdd >= dethdd ){
- if( dschddtm >= dethddtm ){
- if(dschtypecd!="06"){
- messageBox("사망등록된 환자입니다! 퇴원형태를 ","I007");
- model.setFocus("cmb_dschtypecd");
- return;
- }
- if( curersltcd != "07" && curersltcd != "08"){
- messageBox("사망등록된 환자입니다! 치료결과를 ","I007");
- model.setFocus("cmb_curersltcd");
- return;
- }
- }
- }
- // 사망등록된 환자입니다! 치료결과/퇴원형태 재확인 바랍니다.
- // 2013.09.23 END
-
- ////////////////////////////////////////////////////////////////////////
- // 퇴원분석 미비분과 설정
- fSetUnPrepDetlDeptInfo();
-
- ////////////////////////////////////////////////////////////////////////
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/dschanalyinfo");
- model.copyNode("/root/send/dschanalyinfo", xDschAnalyListPath);
- model.makeValue("/root/send/oplist", grd_oplist.getUpdateData()); // 수술내역
- model.makeValue("/root/send/cnstlist", grd_cnstlist.getUpdateData()); // 협의진단
- model.makeValue("/root/send/wnmblist", grd_wnmblist.getUpdateData()); // 산모/신생아
- model.makeValue("/root/send/chngdeptlist", grd_chngdeptlist.getUpdateData()); // 전과정보
- model.makeValue("/root/send/iculist", grd_iculist.getUpdateData()); // 중환자실
- model.makeValue("/root/send/detldeptcdinfo", grd_detldeptlist.getUpdateData()); // 미비분과정보
-
- // model.makeValue("/root/send/infdislist", grd_infdislist.getUpdateData()); // 전염병2008-11-23 사용자 요구에 따라 막음(이창록)
- var sIndxInfo = model.getValue(xDschAnalyListPath+"/indxinfo").getTrim().split(" ");
- var sSaveData = "status▦kpicd▦dsqino▦pid▦dschdd▩";
- var indxCnt = 0;
- var kpicd = "";
- if(sIndxInfo.length > 0){
- for(var i=0; i<sIndxInfo.length; i++){
- if( sIndxInfo[i] != ""){
- if(model.getValue("/root/main/dschanalyhist/indxlist[kpicd = '"+sIndxInfo[i]+"']/dsqino") == ""){
- sSaveData += "i▦"
- + sIndxInfo[i]+"▦"
- + "▦"
- + model.getValue(xDschAnalyListPath+"/pid")+"▦"
- + model.getValue(xDschAnalyListPath+"/dschdd")+"▩";
- }
- }
- }
-
- }
- indxCnt = getNodesetCnt(model, "/root/main/dschanalyhist/indxlist");
- if(indxCnt > 0){
- for(var iRow=1; iRow <= indxCnt; iRow++){
- kpicd = model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/kpicd");
- if(model.getValue(xDschAnalyListPath+"/indxinfo").indexOf(kpicd) == -1){
- sSaveData += "d▦"
- + kpicd+"▦"
- + model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/dsqino")+"▦"
- + model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/pid")+"▦"
- + model.getValue("/root/main/dschanalyhist/indxlist["+iRow+"]/dschdd")+"▩";
- }
-
- }
- }
- model.makeValue("/root/send/indxlist", sSaveData); // 전염병
-
- if(submit("TXMRD00401")){
- messageBox("저장","I002");
- // 입력 여부 체크
- fCheckItemInputYN();
- //model.refresh();
- // 중환자실 전체 재원일수
- model.removeNodeset("/root/main/dschanalyhist/icutotlist");
- grd_icutotlist.refresh();
- if(grd_iculist.rows > grd_iculist.fixedrows){
- var sTotInHospDayNo = 0;
- var iRow = 0;
- var iICUTotRow = 0;
- var sICUCd = "";
- for(var iStndRow = grd_iculist.fixedrows; iStndRow<=(grd_iculist.rows-grd_iculist.fixedrows); iStndRow++){
- sICUCd = model.getValue("/root/main/dschanalyhist/iculist["+iStndRow+"]/icucd");
- iICUTotRow = grd_icutotlist.findRow(sICUCd, grd_icutotlist.fixedrows, 1);
- sTotInHospDayNo = 0;
- if(iICUTotRow < 1){
- for(var iRow = grd_iculist.fixedrows; iRow <= (grd_iculist.rows-grd_iculist.fixedrows); iRow++){
- if(model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/icucd") == sICUCd){
- sInHospDayNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/inhospdayno");
- if(sInHospDayNo == "") sInHospDayNo = 0;
- sTotInHospDayNo += eval(sInHospDayNo);
- }
- }
- grd_icutotlist.addRow();
- iRow = grd_icutotlist.rows - grd_icutotlist.fixedrows;
- model.setValue(xICUTotListPath+"["+iRow+"]/deptcd",sICUCd);
- model.setValue(xICUTotListPath+"["+iRow+"]/totinhospdayno", sTotInHospDayNo);
- }
- }
- }
- if(model.getValue(xDschAnalyListPath+"/status") == "u"){
- dPid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid");
- dDschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd");
- sDschDD = dDschdd.substr(0,4)+"/"+dDschdd.substr(4,2)+"/"+dDschdd.substr(6,2)
- model.setValue("/root/main/cond/statcnts",dPid+"환자의"+sDschDD+"의 퇴원분석이 되어 있습니다.");
- model.makeValue("/root/main/detldeptcdsaveyn", "N");
- // model.refresh();
- }
- model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist");
- model.setValue("/root/main/dschanalyhist/dschanalyinfo/pid", "");
- model.setFocus("ipt_pid");
- }
- model.refresh();
- }
- /**
- * @desc : 진단 검색 팝업
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fPopUpDiag(pGrid, srchCol, rsltCol){
- var sGridID = document.controls(pGrid);
- var ref = sGridID.attribute("nodeset");
- var iRow = sGridID.row;
- var sRtnMsg = "";
- model.setFocus(pGrid);
- if(sGridID.valueMatrix(iRow,srchCol) == "") return;
- setParameter ( "SPMMO00800_cond1" , "1" );
- setParameter ( "SPMMO00800_cond2" , "1" );
- setParameter ( "SPMMO00800_cond3" , "H" );
- setParameter ( "SPMMO00800_cond4" , model.getValue(xDschAnalyListPath+"/dschdd"));
- setParameter ( "SPMMO00800_cond5" , sGridID.valueMatrix(iRow,srchCol));
- modal("SPMMO00800");
- sRtnMsg = getParameter("SPMMO00800_rtn");
-
- if(sRtnMsg != ""){
- sGridID.valueMatrix(iRow,srchCol) = getArrayData(sRtnMsg,1,1,"▩","▦");
- sGridID.valueMatrix(iRow,rsltCol) = getArrayData(sRtnMsg,1,2,"▩","▦");
- }
- }
- /**
- * @desc : 사용자 검색 팝업
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur : 수정 ->이창록 2008-10-10 12:29오전
- */
- function fPopUpUserInfo(pGrid,srchCol,rsltCol){
-
- var sGridID = document.controls(pGrid);
- var ref = sGridID.attribute("nodeset");
- var iRow = sGridID.row;
- var sKeyNo = 0; // 각 그리드의 key
- var opdd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdd"); //수술일자
- var reqdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdd");//의뢰일
- var execdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdd");//시행일
- var chngdeptdd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdd");//전출일
- model.setFocus(pGrid);
- setParameter("reqflag", "usernm");
- setParameter("usernm", sGridID.valueMatrix(iRow,srchCol));
- if(pGrid=="grd_oplist"){
- setParameter("stnddd", opdd);
- }else if(("grd_cnstlist")&&(srchCol==5)){
- setParameter("stnddd", reqdd);
- }else if(("grd_cnstlist")&&(srchCol==11)){
- setParameter("stnddd", execdd);
- }else if(pGrid=="grd_chngdeptlist"){
- setParameter("stnddd", chngdeptdd);
- }
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- sGridID.valueMatrix(iRow,rsltCol) = model.getValue("/root/temp/userinfo/userid");
- sGridID.valueMatrix(iRow,srchCol) = model.getValue("/root/temp/userinfo/usernm");
- if(model.getValue("/root/temp/userinfo/userid") == "") return false;
- else return true;
- }
- /**
- * @desc : 사용자 정보 얻기
- * @id :
- * @event : xforms-select
- * @return : void
- * @authur :
- */
- function fGetUserInfo(userid,usernm,deptcd ,instcd){
- model.setValue("/root/temp/userinfo/userid", userid);
- model.setValue("/root/temp/userinfo/usernm", usernm.getTrim());
- model.setValue("/root/temp/userinfo/deptcd", deptcd);
- model.setValue("/root/temp/userinfo/instcd", instcd);
- }
- /**
- * @ver : 2008-08-25
- * @desc : 감염종류1의 감염종류2의 하부항목들 조회
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetInFcCas(code){
- switch(code){
-
- case "01":
- zbcfGetCodeList(new Array("M0485"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0485");
- break;
- case "02":
- zbcfGetCodeList(new Array("M0486"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0486");
- break;
- case "03":
- zbcfGetCodeList(new Array("M0487"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0487");
- break;
- case "04":
- zbcfGetCodeList(new Array("M0488"),new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0488");
- break;
- case "05":
- zbcfGetCodeList(new Array("M0489"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0489");
- break;
- case "06":
- zbcfGetCodeList(new Array("M0490"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0490");
- break;
- case "07":
- zbcfGetCodeList(new Array("M0491"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0491");
- break;
- case "08":
- zbcfGetCodeList(new Array("M0492"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0492");
- break;
- case "09":
- zbcfGetCodeList(new Array("M0493"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0493");
- break;
- case "10":
- zbcfGetCodeList(new Array("M0494"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0494");
- break;
- case "11":
- zbcfGetCodeList(new Array("M0495"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0495");
- break;
- case "12":
- zbcfGetCodeList(new Array("M0496"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0496");
- break;
- case "13":
- zbcfGetCodeList(new Array("M0497"), new Array("/root/hidden/infdcpartinfo/infdcpartlist"));
- copyNodeset("/root/init/infdcpartinfo/infdcpartlist", "/root/hidden/infdcpartinfo/infdcpartlist/M0497");
- break;
- }
-
- // 20081218 수정
- //model.refresh();
-
- model.removeNodeset("/root/hidden/infdcpartinfo/infdcpartlist");
- model.makeNode("/root/hidden/infdcpartinfo/infdcpartlist");
- }
- /**
- * @ver : 2008-10-30
- * @desc : 입원과 및 퇴원과 분과 조회
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInDschClrsDeptSearch(flag)
- {
- var sDschDD = model.getValue(xDschAnalyListPath+"/dschdd");
- var sInDD = model.getValue("/root/temp/patinfo/chgdschddlist[dschdd='"+sDschDD+"']/indd");
- if(flag=="dsch"){
- model.removeNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist");
- model.makeNode("/root/hidden/dschclrsinfo/dschclrsdeptlist");
- var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- switch(deptcd){
- case "2010000000":
- zbcfGetCodeList(new Array("M0500"), new Array("/root/tmp/hidden/dschclrsdeptlist"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0500");
- break;
- case "2040000000":
- //2010.03.31. 이은영 : 퇴원일자 기준으로 분과정보 가져옴. (서울성모만 - 외과분과 때문에 퇴원일 기준으로 분과코드를 가져옴.)
- if (getUserInfo("dutplceinstcd") == "000") {
- model.makeValue("/root/send/gsdeptcd", "2040000000");
- model.makeValue("/root/send/stndd", sDschDD);
- submit("TRMRD00417");
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/init/gsclrsinfo/gsclrsdeptlist");
- } else {
- zbcfGetCodeList(new Array("M0501"), new Array("/root/tmp/hidden/dschclrsdeptlist"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0501");
- }
- break;
- case "2100000000":
- zbcfGetCodeList(new Array("M0502"), new Array("/root/tmp/hidden/dschclrsdeptlist"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0502");
- break;
- case "2110000000":
- zbcfGetCodeList(new Array("M0503"),new Array("/root/tmp/hidden/dschclrsdeptlist"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0503");
- break;
- }
- model.removeNodeset("/root/tmp/hidden/dschclrsdeptlist");
- model.makeNode("/root/tmp/hidden/dschclrsdeptlist");
- }else if(flag=="indd"){
- model.removeNodeset("/root/hidden/inclrsinfo/inclrsdeptlist");
- model.makeNode("/root/hidden/inclrsinfo/inclrsdeptlist");
- var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- switch(deptcd){
- case "2010000000":
- zbcfGetCodeList(new Array("M0500"), new Array("/root/tmp/hidden/inclrsdeptlist"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0500");
- break;
- case "2040000000":
- //2010.03.31. 이은영 : 퇴원일자 기준으로 분과정보 가져옴. (서울성모만 - 외과분과 때문에 퇴원일 기준으로 분과코드를 가져옴.)
- if (getUserInfo("dutplceinstcd") == "000") {
- model.makeValue("/root/send/gsdeptcd", "2040000000");
- model.makeValue("/root/send/stndd", sInDD);
- submit("TRMRD00417");
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/init/gsclrsinfo/gsclrsdeptlist");
- } else {
- zbcfGetCodeList(new Array("M0501"), new Array("/root/tmp/hidden/inclrsdeptlist"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0501");
- }
- break;
- case "2100000000":
- zbcfGetCodeList(new Array("M0502"), new Array("/root/tmp/hidden/inclrsdeptlist"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0502");
- break;
- case "2110000000":
- zbcfGetCodeList(new Array("M0503"),new Array("/root/tmp/hidden/inclrsdeptlist"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0503");
- break;
- }
- model.removeNodeset("/root/tmp/hidden/inclrsdeptlist");
- model.makeNode("/root/tmp/hidden/inclrsdeptlist");
- }
-
- // 20081218 수정
- //model.refresh();
- }
- function fOpGridStatusChg()
- {
- var iRow = grd_oplist.row;
- var iCol = grd_oplist.col;
- var iStatus = grd_oplist.rowStatus(iRow);
- var sDsopNo = "";
- if(iCol != 7 && iStatus == 2){
- sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno='"+sDsopNo+"']").xml){
- grd_oplist.rowStatus(iRow) = 0;
- }
- }
- }
- /**
- * @ver : 2008-12-07
- * @desc : 입원과 및 퇴원과 분과 선택시 그리드 분과 변경
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClrsDeptSelected(flag)
- {
- if(flag =="dsch"){
- // 수술내역
- for(var iRow = grd_oplist.fixedrows; iRow <= grd_oplist.rows-grd_oplist.fixedrows; iRow++){
- var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd");
- var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- var iStatus = grd_oplist.rowStatus(iRow);
- if(dschdeptcd==perfdeptcd){
- if((perfdeptcd=="2010000000")||(perfdeptcd=="2040000000")||(perfdeptcd=="2100000000")||(perfdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/oplist["+iRow+"]/opclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"));
- if(iStatus == 0){
- grd_oplist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno='"+sDsopNo+"']").xml){
- grd_oplist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
-
- // 20081218 수정
- //grd_oplist.refresh();
- // 협의진단
- for(var iRow = grd_cnstlist.fixedrows; iRow <= grd_cnstlist.rows-grd_cnstlist.fixedrows; iRow++){
- var reqdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd");
- var execdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd");
- var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- var iStatus = grd_cnstlist.rowStatus(iRow);
- if(dschdeptcd==reqdeptcd){
- if((reqdeptcd=="2010000000")||(reqdeptcd=="2040000000")||(reqdeptcd=="2100000000")||(reqdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"));
- if(iStatus == 0){
- grd_cnstlist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){
- grd_cnstlist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- if(dschdeptcd==execdeptcd){
- if((execdeptcd=="2010000000")||(execdeptcd=="2040000000")||(execdeptcd=="2100000000")||(execdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execlrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"));
- if(iStatus == 0){
- grd_cnstlist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){
- grd_cnstlist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
- // 20081218 수정
- //grd_cnstlist.refresh();
-
- // 전과정보
- for(var iRow = grd_chngdeptlist.fixedrows; iRow <= grd_chngdeptlist.rows-grd_chngdeptlist.fixedrows; iRow++){
- var chngdeptcd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd");
- var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- var iStatus = grd_chngdeptlist.rowStatus(iRow);
- if(dschdeptcd==chngdeptcd){
- if((chngdeptcd=="2010000000")||(chngdeptcd=="2040000000")||(chngdeptcd=="2100000000")||(chngdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"));
- if(iStatus == 0){
- grd_chngdeptlist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDscdNo = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/dscdno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno='"+sDscdNo+"']").xml){
- grd_chngdeptlist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
- // 20081218 수정
- //grd_chngdeptlist.refresh();
-
- // 중환자실
- for(var iRow = grd_iculist.fixedrows; iRow <= grd_iculist.rows-grd_iculist.fixedrows; iRow++){
- var orddeptcd = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/orddeptcd");
- var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- var iStatus = grd_iculist.rowStatus(iRow);
- if(dschdeptcd==orddeptcd){
- if((orddeptcd=="2010000000")||(orddeptcd=="2040000000")||(orddeptcd=="2100000000")||(orddeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/iculist["+iRow+"]/ordclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"));
- if(iStatus == 0){
- grd_iculist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDsicuNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/dsicuno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/iculist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/iculist[dsicuno='"+sDsicuNo+"']").xml){
- grd_iculist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
-
- // 20081218 수정
- //grd_iculist.refresh();
-
- }else if(flag =="in"){
- // 수술내역
- for(var iRow = grd_oplist.fixedrows; iRow <= grd_oplist.rows-grd_oplist.fixedrows; iRow++){
- var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd");
- var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- var iStatus = grd_oplist.rowStatus(iRow);
- if(indeptcd==perfdeptcd){
- if((perfdeptcd=="2010000000")||(perfdeptcd=="2040000000")||(perfdeptcd=="2100000000")||(perfdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/oplist["+iRow+"]/opclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"));
- if(iStatus == 0){
- grd_oplist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno='"+sDsopNo+"']").xml){
- grd_oplist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
- // 20081218 수정
- //grd_oplist.refresh();
-
- // 협의진단
- for(var iRow = grd_cnstlist.fixedrows; iRow <= grd_cnstlist.rows-grd_cnstlist.fixedrows; iRow++){
- var reqdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd");
- var execdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd");
- var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- var iStatus = grd_cnstlist.rowStatus(iRow);
- if(indeptcd==reqdeptcd){
- if((reqdeptcd=="2010000000")||(reqdeptcd=="2040000000")||(reqdeptcd=="2100000000")||(reqdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"));
- if(iStatus == 0){
- grd_cnstlist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){
- grd_cnstlist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- if(indeptcd==execdeptcd){
- if((execdeptcd=="2010000000")||(execdeptcd=="2040000000")||(execdeptcd=="2100000000")||(execdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execlrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"));
- if(iStatus == 0){
- grd_cnstlist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno='"+sDscnstNo+"']").xml){
- grd_cnstlist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
- // 20081218 수정
- //grd_cnstlist.refresh();
-
- // 전과정보
- for(var iRow = grd_chngdeptlist.fixedrows; iRow <= grd_chngdeptlist.rows-grd_chngdeptlist.fixedrows; iRow++){
- var chngdeptcd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd");
- var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- var iStatus = grd_chngdeptlist.rowStatus(iRow);
- if(indeptcd==chngdeptcd){
- if((chngdeptcd=="2010000000")||(chngdeptcd=="2040000000")||(chngdeptcd=="2100000000")||(chngdeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"));
- if(iStatus == 0){
- grd_chngdeptlist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDscdNo = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/dscdno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno='"+sDscdNo+"']").xml){
- grd_chngdeptlist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
- // 20081218 수정
- //grd_chngdeptlist.refresh();
-
- // 중환자실
- for(var iRow = grd_iculist.fixedrows; iRow <= grd_iculist.rows-grd_iculist.fixedrows; iRow++){
- var orddeptcd = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/orddeptcd");
- var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- var iStatus = grd_iculist.rowStatus(iRow);
- if(indeptcd==orddeptcd){
- if((orddeptcd=="2010000000")||(orddeptcd=="2040000000")||(orddeptcd=="2100000000")||(orddeptcd=="2110000000")){
- model.makeValue("/root/main/dschanalyhist/iculist["+iRow+"]/ordclrsdeptcd",model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"));
- if(iStatus == 0){
- grd_iculist.rowStatus(iRow) = 2;
- }else if(iStatus == 2){
- var sDsicuNo = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/dsicuno");
- if(instance1.selectSingleNode("/root/main/dschanalyhist/iculist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/iculist[dsicuno='"+sDsicuNo+"']").xml){
- grd_iculist.rowStatus(iRow) = 0;
- }
- }
- }
- }
- }
- // 20081218 수정
- //grd_iculist.refresh();
-
- }
-
- //2013/01/08 Start
- fnbabychk();
- //2013/01/08 End
- }
- /**
- * @ver : 2008-12-09
- * @desc : 각 그리드정보의 의사 정보 조회
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGridGetDeptUserInfo(pGrid)
- {
- if(pGrid =="grd_oplist"){//수술정보
- var iRow = grd_oplist.row - grd_oplist.fixedRows + 1;
- var opdd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdd");
- var iStatus = grd_oplist.rowStatus(iRow);
- var opdeptengabbr = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdeptengabbr");
- var perfdrnm = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm");
- var perfdeptcd = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd");
- var opdepthngnm = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdepthngnm");
- var perfdrid = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid");
- var sDsopNo = model.getValue("/root/main/dschanalyhist/oplist["+iRow+"]/dsopno");
- if(event.keyCode == 13){
- if(opdd==""){
- messageBox("수술일자를 먼저","C001");
- return;
- }
- if(grd_oplist.col==3){
- if(opdeptengabbr==""){
- return;
- }
- model.makeValue("root/send/stnddd" ,opdd);
- model.makeValue("root/send/deptengabbr" ,opdeptengabbr);
- if(submit("TRMRD00405", false)){
- if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdepthngnm" ,model.getValue("/root/temp/stndeptlist/stndept/depthngnm"));
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdeptcd" ,model.getValue("/root/temp/stndeptlist/stndept/deptcd"));
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/opdeptengabbr ",model.getValue("/root/temp/stndeptlist/stndept/deptengabbr"));
- }else{
- messageBox("입력하신 해당과가","I004");
- return;
- }
- }
- model.removeNodeset("/root/send");
- }else if(grd_oplist.col==7){
- if(perfdeptcd==""){
- messageBox("해당수술과를 먼저","C001");
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm","");
- return;
- }
- if(perfdrnm==""){
- return;
- }
- model.makeValue("root/send/stndd" ,opdd);
- model.makeValue("root/send/usernm" ,perfdrnm);
- model.makeValue("root/send/stndeptcd" ,perfdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- var sRtnMsg = fPopUpUserInfo("grd_oplist", 7, 19);
- if(sRtnMsg == false && iStatus == 2){
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm", model.getValue("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']/perfdrnm"));
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid", model.getValue("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']/perfdrid"));
- }
- }else{
- messageBox(opdepthngnm+"에는 입력하신 의사정보가","I004");
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrnm","");
- model.setValue("/root/main/dschanalyhist/oplist["+iRow+"]/perfdrid","");
- return;
- }
- if(iStatus == 2){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']").xml ){
- grd_oplist.rowStatus(iRow) = 0;
- }
- }else if(iStatus == 0){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/oplist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/oplist[dsopno ='"+sDsopNo+"']").xml ){
- grd_oplist.rowStatus(iRow) = 2;
- }
- }
- }
- model.removeNodeset("/root/send");
- }
- }
- // 20081218 수정
- //grd_oplist.refresh();
- }else if(pGrid =="grd_cnstlist"){//협의정보
- var iRow = grd_cnstlist.row - grd_cnstlist.fixedRows + 1;
- var reqdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdd");
- var reqdrnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm");
- var reqdeptengabbr = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptengabbr");
- var reqdepthngnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdepthngnm");
- var reqdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd");
- var execdd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdd");
- var execdrnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm");
- var execdeptengabbr = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptengabbr");
- var execdepthngnm = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdepthngnm");
- var execdeptcd = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd");
- var iStatus = grd_cnstlist.rowStatus(iRow);
- var sDscnstNo = model.getValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/dscnstno");
- if(event.keyCode == 13){
- if(grd_cnstlist.col==1){
- if(reqdeptengabbr==""){
- return;
- }
- if(reqdd==""){
- messageBox("의뢰일을 먼저","C001");
- return;
- }
- model.makeValue("root/send/stnddd" ,reqdd);
- model.makeValue("root/send/deptengabbr" ,reqdeptengabbr);
- if(submit("TRMRD00405", false)){
- if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdepthngnm" ,model.getValue("/root/temp/stndeptlist/stndept/depthngnm"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptcd" ,model.getValue("/root/temp/stndeptlist/stndept/deptcd"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdeptengabbr" ,model.getValue("/root/temp/stndeptlist/stndept/deptengabbr"));
- }else{
- messageBox("입력하신 해당과가","I004");
- return;
- }
- }
- model.removeNodeset("/root/send");
- }else if(grd_cnstlist.col==7){
- if(execdeptengabbr==""){
- return;
- }
- if(execdd==""){
- messageBox("회신일을 먼저","C001");
- return;
- }
- model.makeValue("root/send/stnddd",execdd);
- model.makeValue("root/send/deptengabbr",execdeptengabbr);
- if(submit("TRMRD00405", false)){
- if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdepthngnm" ,model.getValue("/root/temp/stndeptlist/stndept/depthngnm"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptcd" ,model.getValue("/root/temp/stndeptlist/stndept/deptcd"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdeptengabbr",model.getValue("/root/temp/stndeptlist/stndept/deptengabbr"));
- }else{
- messageBox("입력하신 해당과가","I004");
- return;
- }
- }
- model.removeNodeset("/root/send");
- }else if(grd_cnstlist.col==5){
- if(reqdeptcd==""){
- messageBox("해당의뢰과를 먼저","C001");
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm","");
- return;
- }
- if(reqdrnm==""){
- return;
- }
- model.makeValue("root/send/stndd" ,reqdd);
- model.makeValue("root/send/usernm" ,reqdrnm);
- model.makeValue("root/send/stndeptcd" ,reqdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- var sRtnMsg = fPopUpUserInfo("grd_cnstlist", 5, 18);
- if(sRtnMsg == false && iStatus == 2){
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/reqdrnm"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrid", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/reqdrid"));
- }
- }else{
- messageBox(reqdepthngnm+"에는 입력하신 의사정보가","I004");
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrnm","");
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/reqdrid","");
- return;
- }
- if(iStatus == 2){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){
- grd_cnstlist.rowStatus(iRow) = 0;
- }
- }else if(iStatus == 0){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){
- grd_cnstlist.rowStatus(iRow) = 2;
- }
- }
- }
- model.removeNodeset("/root/send");
- }else if(grd_cnstlist.col==11){
- if(execdeptcd==""){
- messageBox("해당회신과를 먼저","C001");
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm","");
- return;
- }
- if(execdrnm==""){
- return;
- }
- model.makeValue("root/send/stndd" ,execdd);
- model.makeValue("root/send/usernm" ,execdrnm);
- model.makeValue("root/send/stndeptcd" ,execdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- var sRtnMsg = fPopUpUserInfo("grd_cnstlist", 11, 19);
- if(sRtnMsg == false && iStatus == 2){
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/execdrnm"));
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrid", model.getValue("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']/execdrid"));
- }
- }else{
- messageBox(execdepthngnm+"에는 입력하신 의사정보가","I004");
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrnm","");
- model.setValue("/root/main/dschanalyhist/cnstlist["+iRow+"]/execdrid","");
- return;
- }
- if(iStatus == 2){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){
- grd_cnstlist.rowStatus(iRow) = 0;
- }
- }else if(iStatus == 0){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/cnstlist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/cnstlist[dscnstno ='"+sDscnstNo+"']").xml ){
- grd_cnstlist.rowStatus(iRow) = 2;
- }
- }
- }
- model.removeNodeset("/root/send");
- }
- }
- // 20081218 수정
- //grd_cnstlist.refresh();
- }else if(pGrid =="grd_chngdeptlist"){//전과정보
- if(event.keyCode == 13){
- var iRow = grd_chngdeptlist.row - grd_chngdeptlist.fixedRows + 1;
- var chngdeptdd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdd");
- var chngdeptengabbr = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptengabbr");
- var chngdeptdrnm = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm");
- var chngdeptcd = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd");
- var chngdepthngnm = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdepthngnm");
- var iStatus = grd_chngdeptlist.rowStatus(iRow);
- var sDscdNo = model.getValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/dscdno");
- if(grd_chngdeptlist.col==2){
- if(chngdeptengabbr==""){
- return;
- }
- if(chngdeptdd==""){
- messageBox("전출일자를 먼저","C001");
- return;
- }
- model.makeValue("root/send/stnddd" ,chngdeptdd);
- model.makeValue("root/send/deptengabbr" ,chngdeptengabbr);
- if(submit("TRMRD00405", false)){
- if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdepthngnm",model.getValue("/root/temp/stndeptlist/stndept/depthngnm"));
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptcd",model.getValue("/root/temp/stndeptlist/stndept/deptcd"));
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptengabbr",model.getValue("/root/temp/stndeptlist/stndept/deptengabbr"));
- }else{
- messageBox("입력하신 해당과가","I004");
- return;
- }
- }
- model.removeNodeset("/root/send");
- }else if(grd_chngdeptlist.col==6){
- if(chngdeptcd==""){
- messageBox("해당전출과를 먼저","C001");
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm","");
- return;
- }
- if(chngdeptdrnm==""){
- return;
- }
- model.makeValue("root/send/stndd" ,chngdeptdd);
- model.makeValue("root/send/usernm" ,chngdeptdrnm);
- model.makeValue("root/send/stndeptcd" ,chngdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrid" ,model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- var sRtnMsg = fPopUpUserInfo("grd_chngdeptlist", 6, 14);
- if(sRtnMsg == false && iStatus == 2){
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm", model.getValue("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']/chngdeptdrnm"));
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrid", model.getValue("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']/chngdeptdrid"));
- }
- }else{
- messageBox(chngdepthngnm+"에는 입력하신 의사정보가","I004");
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrnm","");
- model.setValue("/root/main/dschanalyhist/chngdeptlist["+iRow+"]/chngdeptdrid","");
- return;
- }
- if(iStatus == 2){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml == instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']").xml ){
- grd_chngdeptlist.rowStatus(iRow) = 0;
- }
- }else if(iStatus == 0){
- if(instance1.selectSingleNode("/root/main/dschanalyhist/chngdeptlist["+iRow+"]").xml != instance1.selectSingleNode("/root/temp/dschanalyhist/chngdeptlist[dscdno ='"+sDscdNo+"']").xml ){
- grd_chngdeptlist.rowStatus(iRow) = 2;
- }
- }
- }
- model.removeNodeset("/root/send");
- }
- // 20081218 수정
- //grd_chngdeptlist.refresh();
- }
- }else if(pGrid =="grd_iculist"){//중환자실정보
- var iRow = grd_iculist.row - grd_iculist.fixedRows + 1;
- var inrmdd = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/inrmdd");
- var orddeptengabbr = model.getValue("/root/main/dschanalyhist/iculist["+iRow+"]/orddeptengabbr");
- if(event.keyCode == 13){
- if(grd_iculist.col==2){
- if(grd_iculist.valueMatrix(iRow,2)==""){
- return;
- }
- if(inrmdd==""){
- messageBox("입실일자를 먼저","C001");
- return;
- }
- model.makeValue("root/send/stnddd",inrmdd);
- model.makeValue("root/send/deptengabbr",grd_iculist.valueMatrix(iRow,2));
- if(submit("TRMRD00405", false)){
- if(getNodesetCnt(model,"/root/temp/stndeptlist/stndept")>0){
- var depthngnm = model.getValue("/root/temp/stndeptlist/stndept/depthngnm")
- var deptcd = model.getValue("/root/temp/stndeptlist/stndept/deptcd")
- var deptengabbr =model.getValue("/root/temp/stndeptlist/stndept/deptengabbr")
- grd_iculist.valueMatrix(iRow,2)=deptengabbr;
- grd_iculist.valueMatrix(iRow,3)=depthngnm;
- grd_iculist.valueMatrix(iRow,4)=deptcd;
- }else{
- messageBox("입력하신 해당과가","I004");
- return;
- }
- }
- model.removeNodeset("/root/send");
- }
- }
- // 20081218 수정
- //grd_iculist.refresh();
- }
- }
- /**
- * @ver : 2008-12-09
- * @desc : 각 input정보의 의사 정보 조회
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fIptGetDeptUserInfo(flag)
- {
- var inrmdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inrmdd");
- var indeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- var dschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd");
- var dschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd");
- if(flag =="ipt_indrid"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,inrmdd);
- model.makeValue("root/send/userid" ,ipt_indrid.currentText);
- model.makeValue("root/send/stndeptcd" ,indeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_indrid.refresh();
- //ipt_indrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "userid");
- setParameter("userid", ipt_indrid.currentText);
- setParameter("stnddd", inrmdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_indrid.refresh();
- //ipt_indrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_indeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_indrid.refresh();
- //ipt_indrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }else if(flag =="ipt_indrnm"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,inrmdd);
- model.makeValue("root/send/usernm" ,ipt_indrnm.currentText);
- model.makeValue("root/send/stndeptcd" ,indeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_indrid.refresh();
- //ipt_indrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "usernm");
- setParameter("userid", ipt_indrnm.currentText);
- setParameter("stnddd", inrmdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/indrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/indrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_indrid.refresh();
- //ipt_indrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_indeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_indrid.refresh();
- //ipt_indrnm.refresh();
- model.refresh();
-
- return;
- }
- }
- }
- }else if(flag =="ipt_inapprtcdrid"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,inrmdd);
- model.makeValue("root/send/userid" ,ipt_inapprtcdrid.currentText);
- model.makeValue("root/send/stndeptcd" ,indeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_inapprtcdrid.refresh();
- //ipt_inapprtcdrnm.refresh();
- model.refresh();
-
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "userid");
- setParameter("userid", ipt_inapprtcdrid.currentText);
- setParameter("stnddd", inrmdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_inapprtcdrid.refresh();
- //ipt_inapprtcdrnm.refresh();
- model.refresh();
-
- }else{
- return;
- }
- }else{
- messageBox(cmb_indeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_inapprtcdrid.refresh();
- //ipt_inapprtcdrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }else if(flag =="ipt_inapprtcdrnm"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,inrmdd);
- model.makeValue("root/send/usernm" ,ipt_inapprtcdrnm.currentText);
- model.makeValue("root/send/stndeptcd" ,indeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_inapprtcdrid.refresh();
- //ipt_inapprtcdrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "usernm");
- setParameter("userid", ipt_inapprtcdrnm.currentText);
- setParameter("stnddd", inrmdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/inapprtcdrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/inapprtcdrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_inapprtcdrid.refresh();
- //ipt_inapprtcdrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_indeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_inapprtcdrid.refresh();
- //ipt_inapprtcdrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }else if(flag =="ipt_dschdrid"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,dschdd);
- model.makeValue("root/send/userid" ,ipt_dschdrid.currentText);
- model.makeValue("root/send/stndeptcd" ,dschdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_dschdrid.refresh();
- //ipt_dschdrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "userid");
- setParameter("userid", ipt_dschdrid.currentText);
- setParameter("stnddd", dschdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_dschdrid.refresh();
- //ipt_dschdrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_dschdeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_dschdrid.refresh();
- //ipt_dschdrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }else if(flag =="ipt_dschdrnm"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,dschdd);
- model.makeValue("root/send/usernm" ,ipt_dschdrnm.currentText);
- model.makeValue("root/send/stndeptcd" ,dschdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_dschdrid.refresh();
- //ipt_dschdrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "usernm");
- setParameter("userid", ipt_dschdrnm.currentText);
- setParameter("stnddd", dschdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/dschdrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/dschdrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_dschdrid.refresh();
- //ipt_dschdrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_dschdeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_dschdrid.refresh();
- //ipt_dschdrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }else if(flag =="ipt_dschapprtcdrid"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,dschdd);
- model.makeValue("root/send/userid" ,ipt_dschapprtcdrid.currentText);
- model.makeValue("root/send/stndeptcd" ,dschdeptcd);
- if(submit("TRMRD00406", false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_dschapprtcdrid.refresh();
- //ipt_dschapprtcdrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "userid");
- setParameter("userid", ipt_dschapprtcdrid.currentText);
- setParameter("stnddd", dschdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_dschapprtcdrid.refresh();
- //ipt_dschapprtcdrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_dschdeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_dschapprtcdrid.refresh();
- //ipt_dschapprtcdrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }else if(flag =="ipt_dschapprtcdrnm"){
- if(event.keyCode == 13){
- model.makeValue("root/send/stndd" ,dschdd);
- model.makeValue("root/send/usernm" ,ipt_dschapprtcdrnm.currentText);
- model.makeValue("root/send/stndeptcd" ,dschdeptcd);
- if(submit("TRMRD00406",false)){
- if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")==1){
- model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/stnuserinfo/stnuserlist/userid"));
- model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/stnuserinfo/stnuserlist/usernm"));
-
- // 20081218 수정
- //ipt_dschapprtcdrid.refresh();
- //ipt_dschapprtcdrnm.refresh();
- model.refresh();
- }else if(getNodesetCnt(model,"/root/temp/stnuserinfo/stnuserlist")>1){
- clearParameter("reqflag");
- clearParameter("usernm");
- clearParameter("stnddd");
- clearParameter("autortnyn");
- setParameter("reqflag", "usernm");
- setParameter("usernm", ipt_dschapprtcdrnm.currentText);
- setParameter("stnddd", dschdd);
- setParameter("autortnyn","Y");
- model.resetInstanceNode("/root/temp/userinfo");
- modal("SPMRF03200");
- var userid = model.getValue("/root/temp/userinfo/userid")
- if(userid!=""){
- model.setValue(xDschAnalyListPath+"/dschapprtcdrid", model.getValue("/root/temp/userinfo/userid"));
- model.setValue(xDschAnalyListPath+"/dschapprtcdrnm", model.getValue("/root/temp/userinfo/usernm"));
-
- // 20081218 수정
- //ipt_dschapprtcdrid.refresh();
- //ipt_dschapprtcdrnm.refresh();
- model.refresh();
- }else{
- return;
- }
- }else{
- messageBox(cmb_dschdeptcd.label+"에는 입력하신 의사정보가","I004");
-
- // 20081218 수정
- //ipt_dschapprtcdrid.refresh();
- //ipt_dschapprtcdrnm.refresh();
- model.refresh();
- return;
- }
- }
- }
- }
- model.removeNodeset("/root/send");
- }
- function fSetUnPrepDetlDeptInfo()
- {
- try
- {
- var saveyn = model.getValue("/root/main/detldeptcdsaveyn");
- var adapt = model.getValue("/root/hidden/adaptdetldeptcd/hardcd/hardcd"); // 하드코드 테이블 미비분과 적용 병원에만 동작하도록 함.
-
- if(adapt == "Y")
- {
- if(saveyn != "N")
- {
- /////////////////////////////////////////////////////////////////////////
- // 미비기록관리 미비분과 설정
- // 2009.09.21 이경희
- model.removeNodeset("/root/main/dschanalyhist/detldeptcdinfo");
- model.makeNode("/root/main/dschanalyhist/detldeptcdinfo");
-
- var detldeptcd = "";
- var indxCnt = 0;
- var detldeptcdinfoCnt = 0;
- var upmrindd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inrmdd");
- var upmrdschdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd");
-
- var upmrpid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid");
- var upmrindd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indd");
- var upmrcretno = model.getValue("/root/main/dschanalyhist/dschanalyinfo/cretno");
-
- ////////////////////////////////////////////////////////////////////////////
- // 1) 재원기간중 수술 시행한 경우 수술정보 내 수술분과 연동
- indxCnt = getNodesetCnt(model, "/root/main/dschanalyhist/oplist");
-
- if(indxCnt > 0)
- {
- var upmropdd = ""; // 수술일자
- var upmrperfdrid = "";// 집도의
- var upmrperfdeptcd = "";// 수술과
- var upmropclrsdeptcd = ""; // 수술분과
-
- var OpDeptList = findNodeset(model, "/root/main/dschanalyhist/oplist");
-
- var OpDeptNode = "";
- for(var idx = 0; idx < OpDeptList.length; idx++)
- {
- OpDeptNode = OpDeptList.item(idx);
-
- upmropdd = OpDeptNode.selectSingleNode("opdd").text;
- upmrperfdeptcd = OpDeptNode.selectSingleNode("perfdeptcd").text;
- upmrperfdrid = OpDeptNode.selectSingleNode("perfdrid").text;
- upmropclrsdeptcd = OpDeptNode.selectSingleNode("opclrsdeptcd").text;
-
- if(upmropclrsdeptcd == "") // 미비분과가 설정되어 있지 않은 경우 미비과로 동일하게 적용함.
- upmropclrsdeptcd = upmrperfdeptcd;
-
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "OP"); // gubun: N(일반), OP(수술)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", upmropdd); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", ""); // 전출 시작일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", "");
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrperfdeptcd); // 수술과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmropclrsdeptcd); // 수술분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", upmrperfdrid); // 집도의ID
-
- //detldeptcdinfoCnt++;
- }
- }
-
- ////////////////////////////////////////////////////////////////////////////
- // 2) 전과내역 없이 입퇴원과가 동일한 경우 퇴원분과를 기준으로 연동함.
- // 전과정보 확인 (grd_chngdeptlist)
- indxCnt = getNodesetCnt(model, "/root/main/dschanalyhist/chngdeptlist");
-
- if(indxCnt == 0) // 2-1)전과내역이 없는 경우
- {
- var upmrindeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd"); // 입원과
- var upmrinclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd"); // 입원분과
-
- var upmrdschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); // 퇴원과
- var upmrdschclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); // 퇴원분과
-
- ////////////////////////////////////////////////////////////////////////////
- // 퇴원과가 미비분과인지 확인
- var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrdschdeptcd + "']");
- if(InDeptList > 0)
- {
- upmrdschclrsdeptcd = upmrdschdeptcd; // 미비분과 코드를 적용
- }
- ////////////////////////////////////////////////////////////////////////////
-
- // 퇴원과가 미비분과 적용과가 아닌 경우
- if(upmrdschclrsdeptcd == "") // 미비분과가 없을 경우 상위과와 동일하게 처리함.
- upmrdschclrsdeptcd = upmrdschdeptcd;
-
- ////////////////////////////////////////////////////////////////////////////
- // 1-1) 입원과, 퇴원과가 같은 경우 퇴원과 미비분과를 기준으로 반영
- //
- if(upmrindeptcd == upmrdschdeptcd)
- {
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/status", 1); // 상태
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "N"); // gubun: N(일반), OP(수술)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", ""); // 전출 시작일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", "");
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrdschdeptcd); // 퇴원과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrdschclrsdeptcd); // 퇴원분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // 집도의ID
- }
- }
- else // 2-2)전과 내역이 있는 경우
- {
- // 1회 전과한 경우
- // - 입원일부터 전출일까지 전출분과를 분과적용
- // - 전출일 다음날부터 퇴원일까지 퇴원분과로 적용
-
- // 2회 이상 전과한 경우
- // - 입원일부터 1회 전출일까지 1회 전출분과 적용
- // - 1회 전출일부터 2회 전출일까지 2회 전출분과 적용
- // (여러번 전과한 경우도 동일한 기준으로 적용)
-
- // 전과정보 내 전출분과가 없을 경우 분과에 해당되지 않는 상위과와 세부과가 동일하다는 의미로 미비분과 컬럼에 미비과와 동일하게 처리함.
-
- // 전과정보가 있을 경우
- // 전과정보의 과와 미비내역의 미비과를 조회하여 비교한 후,
- // 전과정보의 과와 미비내역의 미비과가 다른 경우 미비내역의 미비과를 그대로 두고,
- // 전과정보의 과와 미비내역의 미비과가 같은 경우 전과정보를 따라감.
- var upmrchdd = ""; // 전출일자
- var upmrchbefrdd = "" // 전출일 전날짜
- var upmrchnextdd = ""; // 전출일 다음날자
- var upmrchdeptcd = "";// 전출과
- var upmrchdetldeptcd = ""; // 전출분과
-
- var chDeptList = findNodeset(model, "/root/main/dschanalyhist/chngdeptlist");
-
- var chDeptNode = ""; // 전과정보
- var chNextDeptNode = ""; // 다음 전과정보
- var bfupmrchdd = "";
-
- if(chDeptList.length == 1) // 전출과 정보가 1건인 경우
- {
- chDeptNode = chDeptList.item(0);
-
- upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text; // 전출일자
- upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text;
- upmrchdetldeptcd = chDeptNode.selectSingleNode("chngclrsdeptcd").text;
-
- if(upmrchdetldeptcd == "") // 미비분과가 공란인 경우 미비과와 동일하게 적용함.
- upmrchdetldeptcd = upmrchdeptcd;
-
- ////////////////////////////////////////////////////////////////////////////
- //// 1. 전출일자에 해당하는 미비분과를 저장 - Start
- // 전출일자에 해당하는 미비내역을 조회해서 전출일자에 해당 하는 미비분과를 저장한다.
- fGetUnPrepRecListByDay(upmrchdd);
-
- // 미비내역의 미비과와 전출과를 비교한다.
- var UnPrepRecListCnt = getNodesetCnt(model, "/root/main/unpreprecinfo/unprepreclist");
- var UnPrepRecList = findNodeset(model, "/root/main/unpreprecinfo/unprepreclist");
- var UnPrepItem = "";
-
- for(var unidx = 0; unidx < UnPrepRecListCnt; unidx++)
- {
- UnPrepItem = UnPrepRecList.item(unidx);
- var unPrepDeptcd = UnPrepItem.selectSingleNode("orddeptcd").text; // 미비과
- var upmrchdetldeptcdnm = UnPrepItem.selectSingleNode("detldeptnm").text; // 미비분과
-
- if(unPrepDeptcd == upmrchdeptcd) // 전출과와 미비과가 같은 경우에만 미비분과를 적용
- {
- model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/status", "l");
- model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/detldeptcd", upmrchdetldeptcd);
- /*
- grd_unprepreclist.isselected(unidx+1) = true;
- grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("status")) = "l";
- grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("detldeptcd")) = upmrchdetldeptcd;
- */
- }
- }
-
- var savenodelist = model.instances(0).selectNodes("/root/main/unpreprecinfo/unprepreclist[status!='']");
-
- if(savenodelist.length > 0)
- {
- var srchflag = model.getValue("/root/main/cond/srchflag");
- if(srchflag == "pat")
- {
- var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unpreppatbase");
- }
- else
- {
- var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unprepdrbase");
- }
-
- var savedata = getNodeListCSV(savenodelist);
- var srchdata = getNodeListCSV(srchnodelist);
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- model.makeValue("/root/send/savedata", savedata);
- model.makeValue("/root/send/srchdata", srchdata);
-
- submit("TXMRI02101"); // 전출일자에 해당하는 미비분과 업데이트
-
- }
- //// 전출일자에 해당하는 미비분과를 저장 - End
- ////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////
- //// 2 .퇴원과가 내과 세부과인지 확인
- var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrchdeptcd + "']");
- if(InDeptList > 0)
- {
- upmrchdetldeptcd = upmrchdeptcd;
- }
- ////////////////////////////////////////////////////////////////////////////
-
- if(upmrchdetldeptcd == "") // 미비분과가 없을 경우 상위과와 동일하게 처리함.
- upmrchdetldeptcd = upmrchdeptcd;
-
- /////////////////////////////////////////////////////////////////////////////////
- //// 3. 입원일부터 전출일까지 설정
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(일반), OP(수술), CH(전출)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrindd); // 전출 시작일자
-
- upmrchbefrdd = upmrchdd.toDate("YYYYMMDD").getAddDate(-1, "D").getDateFormat("YYYYMMDD"); // 전출일자 전날.
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrchbefrdd);
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrchdeptcd); // 전출과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrchdetldeptcd); // 전출분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // 집도의ID
-
- bfupmrchdd = upmrchdd;
- upmrchnextdd = bfupmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // 전출일자 다음날.
- ////
- ////////////////////////////////////////////////////////////////////////////
-
- ////////////////////////////////////////////////////////////////////////////
- //// 4. 마지막 전출일부터 퇴원일까지 설정
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
-
- // 퇴원미비분과를 가져옴.
- var upmrdschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); // 퇴원과
- var upmrdschclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); // 퇴원분과
-
- ////////////////////////////////////////////////////////////////////////////
- // 퇴원과가 내과 세부과인지 확인
- var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrdschdeptcd + "']");
- if(InDeptList > 0)
- {
- upmrdschclrsdeptcd = upmrdschdeptcd;
- }
- ////////////////////////////////////////////////////////////////////////////
-
- if(upmrdschclrsdeptcd == "") // 미비분과가 없을 경우 상위과와 동일하게 처리함.
- upmrdschclrsdeptcd = upmrdschdeptcd;
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(일반), OP(수술), CH(전출)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrchnextdd); // 전출 시작일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrdschdd);
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrdschdeptcd); // 퇴원과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrdschclrsdeptcd); // 퇴원미비분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // 집도의ID
-
- }
-
- if(chDeptList.length > 1) // 전출과 정보가 여러 건인 경우
- {
- // 입원일부터 전출일까지 설정
- var chidx = 0; // 전과정보 인덱스
-
- chDeptNode = chDeptList.item(chidx);
- upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text;
- upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text;
- upmrchdetldeptcd = chDeptNode.selectSingleNode("chngclrsdeptcd").text;
-
- if(upmrchdetldeptcd == "") // 미비분과가 공란인 경우 미비과와 동일하게 적용함.
- upmrchdetldeptcd = upmrchdeptcd;
- ////////////////////////////////////////////////////////////////////////////
- // 전출일자가 중복된게 여러건인 조회 - Start
- // 여러 건인 경우 마지막 전출일자의 미비과, 미비분과를 얻어옴.
- for(var cidx = chidx; cidx < chDeptList.length; cidx++)
- {
- chDeptNode = chDeptList.item(cidx);
- chNextDeptNode = chDeptList.item(cidx+1);
-
- // 다음 노드가 null 인지 확인(즉, 현재 노드가 마지막노드인지..)
- if(chDeptNode == null || chNextDeptNode == null)
- {
- chidx = cidx;
- break;
- }
- // 전과정보 날짜 비교
- // 동일 날짜에 2번 이상 전과한 경우는 최종 분과내용으로 반영되게 함.
- var bfchdeptday = chDeptNode.selectSingleNode("chngdeptdd").text;
- var nxchdeptday = chNextDeptNode.selectSingleNode("chngdeptdd").text;
-
- if(bfchdeptday == nxchdeptday)
- {
- upmrchdeptcd = chNextDeptNode.selectSingleNode("chngdeptcd").text;
- upmrchdetldeptcd = chNextDeptNode.selectSingleNode("chngclrsdeptcd").text;
- continue;
- }
- else
- {
- chidx = cidx;
- break;
- }
- }
- // 전출일자가 중복된게 여러건인 조회 - End
- ////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////
- //// 전출일자에 해당하는 미비분과를 저장 - Start
- // 전출일자에 해당하는 미비내역을 조회해서 전출일자에 해당 하는 미비분과를 저장한다.
- for(var x = 0; x < chDeptList.length; x++)
- {
- var tmpNode = chDeptList.item(x);
- var tmpNextNode = chDeptList.item(x+1);
-
- if(tmpNode != null)
- var tmpupmrchdd = tmpNode.selectSingleNode("chngdeptdd").text;
-
- if(tmpNextNode != null)
- var tmpupmrchNextdd = tmpNextNode.selectSingleNode("chngdeptdd").text;
- else
- tmpupmrchNextdd = "";
-
- if(tmpupmrchdd == tmpupmrchNextdd)
- continue;
-
- var tmpupmrchdeptcd = tmpNode.selectSingleNode("chngdeptcd").text;
- var tmpupmrchdetldeptcd = tmpNode.selectSingleNode("chngclrsdeptcd").text;
-
- if(tmpupmrchdetldeptcd == "")
- tmpupmrchdetldeptcd = tmpupmrchdeptcd;
-
- fGetUnPrepRecListByDay(tmpupmrchdd);
-
- // 미비내역의 미비과와 전출과를 비교한다.
- var UnPrepRecListCnt = getNodesetCnt(model, "/root/main/unpreprecinfo/unprepreclist");
- var UnPrepRecList = findNodeset(model, "/root/main/unpreprecinfo/unprepreclist");
- var UnPrepItem = "";
-
- for(var unidx = 0; unidx < UnPrepRecListCnt; unidx++)
- {
- UnPrepItem = UnPrepRecList.item(unidx);
- var unPrepDeptcd = UnPrepItem.selectSingleNode("orddeptcd").text; // 미비과
- var upmrchdetldeptcdnm = UnPrepItem.selectSingleNode("detldeptnm").text; // 미비분과
-
- if(unPrepDeptcd == tmpupmrchdeptcd) // 전출과와 미비과가 같은 경우에만 미비분과를 적용
- {
- model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/status", "l");
- model.makeValue("/root/main/unpreprecinfo/unprepreclist[" + (unidx+1) + "]/detldeptcd", tmpupmrchdetldeptcd);
- /*
- grd_unprepreclist.isselected(unidx+1) = true;
- grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("status")) = "l";
- grd_unprepreclist.valueMatrix(grd_unprepreclist.selectedRow(unidx), grd_unprepreclist.colRef("detldeptcd")) = upmrchdetldeptcd;
- */
- }
- }
-
- var savenodelist = model.instances(0).selectNodes("/root/main/unpreprecinfo/unprepreclist[status!='']");
-
- if(savenodelist.length > 0)
- {
- var srchflag = model.getValue("/root/main/cond/srchflag");
- if(srchflag == "pat")
- {
- var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unpreppatbase");
- }
- else
- {
- var srchnodelist = model.instances(0).selectNodes("/root/main/cond/unprepdrbase");
- }
-
- var savedata = getNodeListCSV(savenodelist);
- var srchdata = getNodeListCSV(srchnodelist);
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- model.makeValue("/root/send/savedata", savedata);
- model.makeValue("/root/send/srchdata", srchdata);
-
- submit("TXMRI02101"); // 전출일자에 해당하는 미비분과 업데이트
-
- }
- }
- //// 전출일자에 해당하는 미비분과를 저장 - End
- ////////////////////////////////////////////////////////////////////////////
-
-
- ////////////////////////////////////////////////////////////////////////////
- // 퇴원과가 내과 세부과인지 확인
- var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrchdeptcd + "']");
- if(InDeptList > 0)
- {
- upmrchdetldeptcd = upmrchdeptcd;
- }
- ////////////////////////////////////////////////////////////////////////////
-
- if(upmrchdetldeptcd == "") // 미비분과가 없을 경우 상위과와 동일하게 처리함.
- upmrchdetldeptcd = upmrchdeptcd;
-
- // 입원일자부터 전출일 전날까지 미비분과를 설정
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(일반), OP(수술), CH(전출)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrindd); // 전출 시작일자
-
- upmrchbefrdd = upmrchdd.toDate("YYYYMMDD").getAddDate(-1, "D").getDateFormat("YYYYMMDD"); // 전출일자 전날.
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrchbefrdd);
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrchdeptcd); // 전출과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrchdetldeptcd); // 전출분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // 집도의ID
-
- ////////////////////////////////////////////////////////////////////////////////
- // 전출일 다음날부터 마지막 전출일까지 loop - Start
- // 입원일부터 첫번째 전출일까지가 1회 전출분과 적용이므로,
- // loop 구문은 첫번째 전출일 다음날부터 두번째 전출일 전날까지 두번째 전출과를 적용
- var upmrchtommorow = ""; // 현재노드 전출일자 다음날
- var upmrchyesterday = ""; // 다음노드 전출일자 전날
- var tmpCurupmrcddd = "";
- for(var midx= chidx; midx < chDeptList.length; midx++)
- {
- //bfupmrchdd = upmrchdd;
- //upmrchnextdd = bfupmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // 전출일자 다음날.
-
- chDeptNode = chDeptList.item(midx);
- chNextDeptNode = chDeptList.item(midx+1);
-
- if(chDeptNode == null || chNextDeptNode == null)
- {
- chidx = midx;
- break;
- }
- var cur_upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text;
- var nex_upmrchdd = chNextDeptNode.selectSingleNode("chngdeptdd").text;
-
- upmrchtommorow = cur_upmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // 현재노드 전출일자 다음날.
- upmrchyesterday = nex_upmrchdd.toDate("YYYYMMDD").getAddDate(-1, "D").getDateFormat("YYYYMMDD"); // 다음노드 전출일자 전날.
- tmpCurupmrcddd = cur_upmrchdd;
-
- // 현재 노드 전출일의 다음날이
- // 다음 노드 전출일과 동일한 경우 현재노드는 넘어가고 다음 노드가 현재노드가 되도록 처리
- // 3/9 GS-PSN <-- 현재노드
- // 3/10 GS-THS
- // 3/12 PD-NR
- if(upmrchtommorow == nex_upmrchdd)
- continue;
-
- // 전출일자가 중복된게 여러건인 조회
- // 3/9 GS-PSN <-- 현재노드
- // 3/9 GS-THS
- // 3/12 PD-NR
- // 중복된 전출일자가 여러건인 경우 마지막 전출일자의 미비과, 미비분과를 얻어옴.
- for(var cidx = midx; cidx < chDeptList.length; cidx++)
- {
- var chDeptNode = chDeptList.item(cidx);
- var chNextDeptNode = chDeptList.item(cidx+1);
-
- // 다음 노드가 null 인지 확인(즉, 현재 노드가 마지막노드인지..)
- if(chDeptNode == null || chNextDeptNode == null)
- {
- //midx = cidx + 1;
- break;
- }
-
- // 전과정보 날짜 비교
- // 동일 날짜에 2번 이상 전과한 경우는 최종 분과내용으로 반영되게 함.
- var bfchdeptday = chDeptNode.selectSingleNode("chngdeptdd").text;
- var nxchdeptday = chNextDeptNode.selectSingleNode("chngdeptdd").text;
-
- if(bfchdeptday == nxchdeptday) // 다음 전출정보도 전출일자가 동일함.
- {
- upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text;
- upmrchdetldeptcd = chNextDeptNode.selectSingleNode("chngclrsdeptcd").text;
- continue;
- }
- else // 다음 전출정보의 전출일자가 동일하지 않음.
- {
- //midx = cidx + 1;
- break;
- }
- }
- //upmrchdeptcd = chDeptNode.selectSingleNode("chngdeptcd").text;
- //upmrchdetldeptcd = chDeptNode.selectSingleNode("chngclrsdeptcd").text;
- upmrchdeptcd = chNextDeptNode.selectSingleNode("chngdeptcd").text;
- upmrchdetldeptcd = chNextDeptNode.selectSingleNode("chngclrsdeptcd").text;
-
- ////////////////////////////////////////////////////////////////////////////
- // 퇴원과가 내과 세부과인지 확인
- var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrchdeptcd + "']");
- if(InDeptList > 0)
- {
- upmrchdetldeptcd = upmrchdeptcd;
- }
- ////////////////////////////////////////////////////////////////////////////
-
- if(upmrchdetldeptcd == "") // 미비분과가 없을 경우 상위과와 동일하게 처리함.
- upmrchdetldeptcd = upmrchdeptcd;
-
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(일반), OP(수술), CH(전출)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrchtommorow); // 전출 시작일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrchyesterday); // 전출 종료일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrchdeptcd); // 전출과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrchdetldeptcd); // 전출분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // 집도의ID
-
- }
- // 전출일 다음날부터 마지막 전출일까지 loop - End
- ////////////////////////////////////////////////////////////////////////////////
-
- // 전출일부터 퇴원일까지 설정
- grd_detldeptlist.addItem();
- detldeptcdinfoCnt = grd_detldeptlist.rows - grd_detldeptlist.fixedrows;
-
- chDeptNode = chDeptList.item(chidx);
- upmrchdd = chDeptNode.selectSingleNode("chngdeptdd").text;
-
- bfupmrchdd = upmrchdd;
- upmrchnextdd = bfupmrchdd.toDate("YYYYMMDD").getAddDate(1, "D").getDateFormat("YYYYMMDD"); // 전출일자 다음날.
-
- // 퇴원미비분과를 가져옴.
- var upmrdschdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdeptcd"); // 퇴원과
- var upmrdschclrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschclrsdeptcd"); // 퇴원분과
-
- ////////////////////////////////////////////////////////////////////////////
- // 퇴원과가 내과 세부과인지 확인
- var InDeptList = getNodesetCnt(model, "/root/hidden/indeptchklist/hardcd[hardcd = '" + upmrdschdeptcd + "']");
- if(InDeptList > 0)
- {
- upmrdschclrsdeptcd = upmrdschdeptcd;
- }
- ////////////////////////////////////////////////////////////////////////////
-
- if(upmrdschclrsdeptcd == "") // 미비분과가 없을 경우 상위과와 동일하게 처리함.
- upmrdschclrsdeptcd = upmrdschdeptcd;
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/gubun", "CH"); // gubun: N(일반), OP(수술), CH(전출)
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdschdd", upmrdschdd); // 퇴원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmropdd", ""); // 수술일자
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrchst", upmrchnextdd); // 전출 시작일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrched", upmrdschdd);
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrordeptcd", upmrdschdeptcd); // 퇴원과
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrdetldeptcd", upmrdschclrsdeptcd); // 퇴원분과
-
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrpid", upmrpid); // 환자번호
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrindd", upmrindd); // 입원일자
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/upmrcretno", upmrcretno); // cretno
- model.makeValue("/root/main/dschanalyhist/detldeptcdinfo[" + detldeptcdinfoCnt + "]/perfdrid", ""); // 집도의ID
- }
- }
-
- grd_detldeptlist.refresh();
- grd_detldeptlist.rebuild();
- for(var gidx = 1; gidx < grd_detldeptlist.rows; gidx++)
- {
- if(grd_detldeptlist.valueMatrix(gidx, 1) != "")
- grd_detldeptlist.addStatus(gidx, "insert");
- }
- }
- }
- }
- catch(e)
- {
- return false;
- }
- return true;
- }
- // 전출일자에 잡힌 미비내역을 조회한다.
- function fGetUnPrepRecListByDay(upmrchdd)
- {
- // 전출일자에 해당하는 미비내역을 조회한다.
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/reqdata");
- model.makeNode("/root/send/dschanalyinfo");
-
- model.makeValue("/root/main/cond/unpreppatbase/pid" , model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid") );
- model.makeValue("/root/main/cond/unpreppatbase/indd" , model.getValue("/root/main/dschanalyhist/dschanalyinfo/indd") );
- model.makeValue("/root/main/cond/unpreppatbase/cretno", model.getValue("/root/main/dschanalyhist/dschanalyinfo/cretno") );
- model.makeValue("/root/main/cond/unpreppatbase/upmrchdd", upmrchdd );
-
- model.makeValue("/root/main/cond/srchflag", "pat");
- model.makeValue("/root/main/cond/unpreppatbase/scrnflag", "dschunpreppatbase"); // 퇴원분석에서 조회
- model.copyNode("/root/send/reqdata", "/root/main/cond/unpreppatbase");
-
- submit("TRMRI02106");
- }
- //퇴원분석 한 환자를 삭제한다.
- function fDelete(){
- var sPid = model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid");
- var sHngnm;
- var retValue;
- if(sPid==""){
- return;
- }else{
- sHngnm = model.getValue("/root/main/dschanalyhist/dschanalyinfo/hngnm");
- retValue= messageBox(sHngnm + "님의 퇴원 분석된 데이터를 삭제하시겠습니까?", "Q999", "");
- if(retValue=="6"){
- model.makeValue("/root/send/reqdata/pid", model.getValue("/root/main/dschanalyhist/dschanalyinfo/pid"));
- model.makeValue("/root/send/reqdata/dschdd", model.getValue("/root/main/dschanalyhist/dschanalyinfo/dschdd"));
- if(submit("TXMRD00480")){
- messageBox("삭제 ", "I001");
- model.resetInstanceNode("/root/main");
- model.resetInstanceNode("/root/send");
- //model.resetInstanceNode("/root/init");
- model.resetInstanceNode("/root/temp");
- model.resetInstanceNode("/root/hidden");
- model.resetInstanceNode("/root/tmp");
- model.refresh();
- }
- }
- }
- }
- //2013/01/08 Start
- /*
- * 1. 퇴원과가 소아청소년과
- * 2. 퇴원분과가 PD(환자) 또는 NR(정상)
- * 3. 산모/신생아 정보가 존재하면서 신생아의 산모번호가 존재
- * 4. 신생아의 구분이 자동으로 퇴원과의 분과와 동일하게 세팅(경대병원에서 신생아 낳은 경우)
- * 5. (2번까지 동일) 산모/신생아 정보가 존재하면서 산모번호가 존재하지 않음
- * 6. 신생아의 구분이 존재할 경우 블록킹(타병원에서 이송되어 온 환자임)
- */
- function fnbabychk(){
- var deptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/indeptcd");
- var clrsdeptcd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inclrsdeptcd");
- /*
- // NR : 2110500000(정상) PD : 2110000000(환아)
- if(deptcd=="2110000000" && clrsdeptcd!=""){ // 소아청소년과이면서 분과가 존재할 시에
- var nodecnt = getNodesetCount("/root/main/dschanalyhist/wnmblist");
- var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid");
- if(nodecnt > 0 && womnid!=""){ // 산모번호가 존재시
- if(clrsdeptcd=="2110500000"){ //NR(정상아)
- model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", 1);
- }else if(clrsdeptcd=="2110000000"){ //PD(환아)
- model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", 2);
- }
- }else if(nodecnt > 0 && womnid==""){// 산모번호가 존재하지 않을시
- model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", "");
- grd_wnmblist.colDisabled(grd_wnmblist.colRef("nbabyflag"))=true;
- }
- }else if(deptcd!="2100000000"){ //입원과가 소아청소년과가 아닌데 산모번호가 존재시에 무조건 SB(환아)로 세팅(산부인과는 제외)
- var nodecnt = getNodesetCount("/root/main/dschanalyhist/wnmblist");
- var womnid=model.getValue("/root/main/dschanalyhist/wnmblist/womnid");
- if(nodecnt > 0 && womnid!=""){ // 산모번호가 존재시
- model.setValue("/root/main/dschanalyhist/wnmblist/nbabyflag", 2);
- }
- }
- */
- model.refresh();
- }
- // 원무 전과전실 승인정보
- function fPamTranInfo() {
- model.makeValue("/root/main/dschanalyhist/dschanalyinfo/histstat","N");
- modal("SPMRD02300", 1, 810, 340, "SPMRD02300", "/root/main/dschanalyhist", "/root/main/dschanalyhist");
-
- }
|