123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의료정보 - 퇴원분석관리 ( 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()
- {
- //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"),
- 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")
- , 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 fPidKeyPress(pFlag)
- {
- 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"))
- {
- //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/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
- {
- 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");
- // 퇴원당시 진료과전체
- model.removeNodeset("/root/init/dschdeptlist/dept");
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/dschdeptlist", "depthngnm", "asc", sDschDD);
- model.removeNodeset("/root/send");
- model.makeValue("/root/send/stnddd", sDschDD);
-
- // 중환자실 코드 조회
- if(submit("TRMRD00404", false)){
- copyNodesetType("/root/init/icudeptlist/icudept","/root/temp/initlist/icudept","replace", model, model);
- }
-
- 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/cretno", model.getValue(xDschDDListPath+"["+sIndx+"]/cretno"));
- model.makeValue("/root/send/dschdd", sDschDD);
- if(submit("TRMRD00402", false)){
- 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); */
- 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"));
- model.setValue("/root/main/cond/statcnts","퇴원분석이 이루어지지 않았습니다.");
-
- // 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)
- model.setValue("/root/main/cond/statcnts",dPid+"환자의"+sDschDD+"의 퇴원분석이 되어 있습니다.");
-
- // 20081218 수정
- //model.refresh();
-
- messageBox(dPid + "환자의" + sDschDD +"의 퇴원분석이 되어","I010");
- }
- // 산모/신생아
- 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;
- model.copyNode("/root/temp/dschanalyhist", "/root/main/dschanalyhist");
-
- }
-
- // 20081218 수정
- //model.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;
- }
- //입원,퇴원과에 해당하는 분과를 선택 여부 체크
- 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(""));
- }
- 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/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=0; 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.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 : 20090317 수정 분과공통코드를 분과유형코드로 변경
- * @return :
- * @---------------------------------------------------
- */
- function fInDschClrsDeptSearch(flag)
- {
- var inrmdd = model.getValue("/root/main/dschanalyhist/dschanalyinfo/inrmdd");
- 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":
- zbcfGetKindCodeList(new Array("M0030"),new Array("M0500"),new Array("/root/tmp/hidden/dschclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0030M0500");
- break;
- case "2040000000":
- if(inrmdd < "20090323"){
- zbcfGetKindCodeList(new Array("M0031"),new Array("M0501"),new Array("/root/tmp/hidden/dschclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0031M0501");
- }else{
- zbcfGetKindCodeList(new Array("M0034"),new Array("M0531"),new Array("/root/tmp/hidden/dschclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0034M0531");
- }
- break;
- case "2100000000":
- zbcfGetKindCodeList(new Array("M0032"),new Array("M0502"),new Array("/root/tmp/hidden/dschclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0032M0502");
- break;
- case "2110000000":
- zbcfGetKindCodeList(new Array("M0033"),new Array("M0503"),new Array("/root/tmp/hidden/dschclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/dschclrsinfo/dschclrsdeptlist", "/root/tmp/hidden/dschclrsdeptlist/M0033M0503");
- 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":
- zbcfGetKindCodeList(new Array("M0030"),new Array("M0500"),new Array("/root/tmp/hidden/inclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0030M0500");
- break;
- case "2040000000":
- if(inrmdd < "20090323"){
- zbcfGetKindCodeList(new Array("M0031"),new Array("M0501"),new Array("/root/tmp/hidden/inclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0031M0501");
- break;
- }else{
- zbcfGetKindCodeList(new Array("M0034"),new Array("M0531"),new Array("/root/tmp/hidden/inclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0034M0531");
- break;
- }
- case "2100000000":
- zbcfGetKindCodeList(new Array("M0032"),new Array("M0502"),new Array("/root/tmp/hidden/inclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0032M0502");
- break;
- case "2110000000":
- zbcfGetKindCodeList(new Array("M0033"),new Array("M0503"),new Array("/root/tmp/hidden/inclrsdeptlist"),true
- ,new Array("dispseq"), new Array("asc"));
- copyNodeset("/root/hidden/inclrsinfo/inclrsdeptlist", "/root/tmp/hidden/inclrsdeptlist/M0033M0503");
- break;
- }
- model.removeNodeset("/root/tmp/hidden/inclrsdeptlist");
- model.makeNode("/root/tmp/hidden/inclrsdeptlist");
- }
- }
- 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();
-
- }
- }
- /**
- * @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");
- }
|