123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669 |
- /*
- EMC메인, ER Census(SMMNE00100.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var sSrchToolStatus = "";
- var xPathUser = "/root/UserData/list";
- var xPathUserPop = "/root/main/list";
- /* 20090116(ByJA)
- var pid = ""; //환자라벨출력 변수
- var patnm = ""; //환자라벨출력 변수
- var sexage = ""; //환자라벨출력 변수
- var rgstno = ""; //환자라벨출력 변수
- var orddd = ""; //환자라벨출력 변수
- var prtcnt = ""; //환자라벨출력 변수
- var scrnid = ""; //환자라벨출력 변수
- var barcdRef = ""; //환자라벨출력 변수
- */
- var gOrddd ="";
- var MemoUseYn = "";
- var ColorUseYn = "";
- var LabelPntCnt = "";
- var instUseForJci = "";
- var xOldPosflagcd = "";
- var xOldPosflag = "";
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기 검색 조건 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(pFlag){
- // parameter 로 센서스 조회
- //lzzfMakeBrcdPrntObj("CommAX");
- var instcd = getUserInfo("dutplceinstcd");
-
- // 간호하드코딩 테이블 조회_20090415(ByJA)
- var pCode = "'110', '131', '133','201'"; // 조회할 CdGrupID 코드정보
- var pDate = getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo(pCode, pDate);
-
- MemoUseYn = model.getValue("/root/code/codeinfo/codelist[cdgrupid ="+"131"+"]/cdid");
- ColorUseYn = model.getValue("/root/code/codeinfo/codelist[cdgrupid ="+"131"+"]/supcdid");
- LabelPntCnt = model.getValue("/root/code/codeinfo/codelist[cdgrupid ="+"133"+"]/cdid");
- instUseForJci = model.getValue("/root/code/codeinfo/codelist[cdgrupid ='201']/cdid");
-
- nursemaininfo.colHidden(nursemaininfo.colRef("dschdt"))= true;
- //출력장수 세팅이 안되어 있을 경우 Default 1장 세팅
- if(LabelPntCnt == ""){
- LabelPntCnt = "1";
- }
-
- //병원별 적용(환자 메모 입력 추가 기능)
- if(MemoUseYn == "Y"){
- grid01Cnt = eval(getNodesetCount("/root/codedata/popupmenu/grid01/item"));
- grid02Cnt = eval(getNodesetCount("/root/codedata/popupmenu/grid02/item"));
- for(i = 1 ; i <= 4 ; i++){
- var sPopupName = "";
- var sPopupFunc = "";
- switch(i){
- case 1:
- sPopupName = "--------------";
- sPopupFunc = "";
- break;
- case 2:
- sPopupName = "메모 삽입";
- sPopupFunc = "fErPatInsmemo";
- break;
- case 3:
- sPopupName = "메모 편집";
- sPopupFunc = "fErPatSetmemo";
- break;
- case 4:
- sPopupName = "메모 삭제";
- sPopupFunc = "fErPatDelmemo";
- break;
- }
-
- model.makeValue("/root/codedata/popupmenu/grid01/item["+(i+grid01Cnt)+"]/name", sPopupName);
- model.makeValue("/root/codedata/popupmenu/grid01/item["+(i+grid01Cnt)+"]/func", sPopupFunc);
- model.makeValue("/root/codedata/popupmenu/grid02/item["+(i+grid02Cnt)+"]/name", sPopupName);
- model.makeValue("/root/codedata/popupmenu/grid02/item["+(i+grid02Cnt)+"]/func", sPopupFunc);
- }
- }
- if(checkOpener()){
- var sParamInfo = opener.javascript.getParameter("SMMNE001_Param");
- if(sParamInfo.length > 0 ){
- var sPid = getArrayData(sParamInfo,0,0,"▩","▦"); // 환자번호
- var sIndd = getArrayData(sParamInfo,0,1,"▩","▦"); // 입원일자
- var sCretno = getArrayData(sParamInfo,0,2,"▩","▦"); // 생성번호
- var sPageflag = getArrayData(sParamInfo,0,3,"▩","▦"); // OM 오더매니지 20090511 김홍점 추가
- gOrddd = getArrayData(sParamInfo,0,4,"▩","▦"); // OM 오더매니지 20090511 김홍점 추가
- if ( sPageflag == "om"){
- model.setValue("/root/main/cond/indschacptstat" ,"1");
-
- model.setValue("/root/main/pageflag", sPageflag );
- model.setValue("/root/main/cond/orddd", gOrddd );
- }else{
- model.setValue("/root/main/cond/pid", sPid);
- model.setValue("/root/main/cond/indd", sIndd);
- model.setValue("/root/main/cond/cretno", sCretno);
- model.setValue("/root/main/cond/indschacptstat" ,"4");
-
- model.setValue("/root/main/pageflag", "ec" );
-
- }
- }else{ // 상단정보 세팅
- model.setValue("/root/main/pageflag",getScreenMenuParameter() );
- model.setValue("/root/main/cond/orddd", getCurrentDate());
- }
- }else{
- model.setValue("/root/main/pageflag",getScreenMenuParameter() );
- model.setValue("/root/main/cond/orddd", getCurrentDate());
- }
-
- //model.setValue("/root/main/cond/wardcd", "2280200000");20090630 김홍점 하드코딩수정
- model.setValue("/root/main/cond/wardcd", (model.getValue("/root/code/codeinfo/codelist[cdgrupid='110']/cdid")).substring(0,10));//응급의료센터병동코드
- model.setValue("/root/main/cond/srchinstcd", (model.getValue("/root/code/codeinfo/codelist[cdgrupid='110']/cdid")).substring(11));//조회순서용 기관코드
- model.setValue("/root/main/cond/outdt", getCurrentDate()); // 재원구분 퇴원시 퇴원일자 Setting
- var sStat = pFlag
- fInitNode(sStat);
- model.removenode("/root/send");
- model.makeValue("/root/send/searchitem", "all");
-
- submit("TRMNE00203", false);
-
- fSelctionOutRmCombo();
-
- zbcfGetCodeList(
- new Array("M0117", "M0118", "M0119", "M0120", "P0008", "P0378", "M0378", "M0720"),
- new Array("/root/init/M0117list","/root/init/M0118list","/root/init/M0119list","/root/init/M0120list","/root/init/P0008list", "/root/init/P0378list", "/root/init/M0378list", "/root/init/M0720list"));
-
-
- var standard_yn = "orduseyn";
- var ord_deptflag = 'D';
- var rslt_ref = "/root/hidden/orddeptlist";
- var sort_field = "dispseq";
- var sort_method = "asc";
- zbcfGetDeptCodeList(instcd, standard_yn, ord_deptflag, rslt_ref, sort_field, sort_method);
-
- var deptcd = model.getValue("/root/main/cond/orddeptcd");
- var resultRef = "/root/main/userlist";
- var flag = "_D";
- zsufGetUserInfoCombo(deptcd, resultRef, flag);
-
- model.makevalue("/root/hidden/erorddeptlist/dept/depthngnm", "-");
- model.makevalue("/root/hidden/erorddeptlist/dept/deptcd", "");
- for(i = 0 ; i < getNodesetCount("/root/hidden/orddeptlist/dept") ; i ++ ) {
- model.makevalue("/root/hidden/erorddeptlist/dept["+(i+2)+"]/depthngnm", model.getValue("/root/hidden/orddeptlist/dept["+(i+1)+"]/depthngnm") );
- model.makevalue("/root/hidden/erorddeptlist/dept["+(i+2)+"]/deptcd" , model.getValue("/root/hidden/orddeptlist/dept["+(i+1)+"]/deptcd") );
- }
-
- //입원대기사유구분 세팅
- group2.attribute("height") = 0;
- datagrid3.rowhidden(0) = true;
- datagrid3.deleteRow(1, true);
-
- fSeletedSrcTool();
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SWITCH화면별 노드 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitNode(pFlag){
- if ( pFlag == "F" ){
- model.removeNodeset("/root/main/nursemainlist/nursemaininfo");
-
- model.removeNodeset("/root/main/ercensuslist/erpatientlist");
- fClearChildNodeSet("/root/main/ercensusinfo/patinfo");
- fClearChildNodeSet("/root/main/ercensusinfo/erorddrlist");
- fClearChildNodeSet("/root/main/ercensusinfo/erorddrlist1");
- fClearChildNodeSet("/root/main/ercensusinfo/erorddrlist2");
- }
-
- if ( pFlag == "nm" ){
- model.removeNodeset("/root/main/nursemainlist/nursemaininfo");
- }
- if ( pFlag == "ec" ){
- model.removeNodeset("/root/main/ercensuslist/erpatientlist");
-
- if(getNodesetCount("/root/main/ercensusinfo/patinfo/pid") > 0 ){
- fClearChildNodeSet("/root/main/ercensusinfo/patinfo");
- }
- model.removeNodeset("/root/main/ercensusinfo/erorddrlist");
- model.removeNodeset("/root/main/ercensusinfo/erorddrlist1");
- model.removeNodeset("/root/main/ercensusinfo/erorddrlist2");
-
- fButtonSettion("A");
- }
- model.refresh();
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : SWITCH화면별 속성값 부여
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSeletedSrcTool(){
- //byCY
-
-
-
- //byCY
- model.removenode("/root/send");
- var rendcd=model.getValue("/root/main/cond/section");
- var chkdata=checkbox1.value;
- var rendcdlist=rendcd.split(" ");
- if (chkdata.substr(0,1) != "-") {
- if (rendcd.length>0) {
- for (var i=0; i<rendcdlist.length;i++) {
- rendcd=rendcd.replace(" ","','");
- }
- rendcd="('" + rendcd + "')";
- }
- } else {
- rendcd = "-";
- }
- //-----(20110427)
- // 구역정보를 선택하지 않으면 조회되지 않도록 한다.
- if (rendcd == "") {
- messageBox("구역정보를 선택하십시오.","E");
- model.setFocus("checkbox1");
- return;
- }
- //-----(20110427)
- var sSrchData = "";
- var sSrchHeader = "flag▦orddept▦orddrid▦section▦fromorddd▦orddd▦wardcd▦outdt▦srchinstcd▦settingrnid▩";
- var sSrchData = model.getValue("/root/main/cond/indschacptstat") +"▦"
- + model.getValue("/root/main/cond/orddeptcd") +"▦"
- + model.getValue("/root/main/cond/medispclid") +"▦"
- //+ model.getValue("/root/main/cond/section") +"▦" //20110224 이선경 경북대 : 멀티체크기능 추가
- + rendcd +"▦"
- + getDateCalc(getCurrentDate().substr(0,8), 3, "-")+"▦"
- + getCurrentDate().substr(0,8) +"▦"
- + model.getValue("/root/main/cond/wardcd") +"▦"
- + model.getValue("/root/main/cond/outdt") +"▦"
- + model.getValue("/root/main/cond/srchinstcd") +"▦"
- + model.getValue("/root/main/cond/settingrnid") +"▩";
-
- model.makeValue("/root/send/mainsearchinfo", sSrchHeader + sSrchData);
- sSrchToolStatus = model.getValue("/root/main/pageflag");
-
- //alert("tool : "+sSrchToolStatus);
- //혈액준비환자 & 입원대기 환자 조회
- submit("TRMNE00107", false);
- submit("TRMNE00108", false);
- submit("TRMNE00109", false); // 부적합 환자 조회 _ 손성훈.
-
- if(model.getValue("/root/main_om/cond/hopedd")==""){
- model.setValue("/root/main_om/cond/hopedd",'4');
- model.setValue("/root/main_om/cond/hopefmdd", '');
- model.setValue("/root/main_om/cond/hopetodd", '');
- }
-
- model.makeValue("/root/send/settingrnid", model.getValue("/root/main/cond/settingrnid"));
- switch(sSrchToolStatus){
- case "td":
- fInitNode(sSrchToolStatus);
- btn_todolistmv.selected = true;
- group8.visible = false;
- group9.visible = false;
- group10.visible = false;
- model.toggle("case2");
- break;
- case "om":
- fInitNode(sSrchToolStatus);
- btn_ordermngmv.selected = true;
- group8.visible = false;
- group9.visible = true;
- group10.visible = false;
- model.toggle("case3");
- model.setValue("/root/main_om/cond/pid", "등록번호");
- model.setValue("/root/main_om/cond/roomcd", "병실");
- model.setValue("/root/main_om/cond/sexage", "S/A");
- model.setValue("/root/main_om/cond/patnm", "환자명");
-
- fGetOMPatList("emc", gOrddd);
- break;
- case "ec":
-
- fInitNode(sSrchToolStatus);
- btn_ercensusmv.selected = true;
- group8.visible = false;
- group9.visible = false;
- group10.visible = false;
- model.toggle("case4");
- model.removeNodeset("/root/main/nursemainlist/nursemaininfo");
- model.makeNode("/root/send/reqcensus");
-
- if(model.getValue("/root/main/cond/pid") == ""){
- submit("TRMNE00103");
- fGetParamSetting();
- }else{
- //기간별 내원환자 pop_up
- btn_mainmv.disabled = true;
- btn_ordermngmv.disabled = true;
- cmb_Zone.disabled = true;
- cmb_OrdDept2.disabled = true;
- cmb_OrdDR.disabled = true;
- rdo_Flag.disabled = true;
- fSearchPatienInfo("p_ec");
- }
- model.refresh();
- break;
- case "prn":
- fInitNode(sSrchToolStatus);
- btn_ordermngmv.selected = true;
- group8.visible = false;
- group9.visible = true;
- group10.visible = false;
- model.toggle("case3");
- model.setValue("/root/main_om/cond/pid", "등록번호");
- model.setValue("/root/main_om/cond/roomcd", "병실");
- model.setValue("/root/main_om/cond/sexage", "S/A");
- model.setValue("/root/main_om/cond/patnm", "환자명");
- fSetPrnMode();
- fGetOMPatList("emc");
- break;
- default :
- fInitNode(sSrchToolStatus);
-
- btn_mainmv.selected = true;
- group8.visible = true;
- group9.visible = false;
- group10.visible = false;
- model.toggle("case1");
-
- //model.removeNodeset("/root/main/nursemainlist/nursemaininfo");
- model.makeNode("/root/send/reqdata");
- nursemaininfo.allstyle("all", "background-color") = "white";
- if(MemoUseYn == "Y"){
- nursemaininfo.colHidden(nursemaininfo.colRef("memoyn")) = false;
- }else{
- nursemaininfo.colHidden(nursemaininfo.colRef("memoyn")) = true;
- }
- //nursemaininfo.refresh();
-
- submit("TRMNE00101");
-
- var paminfo = getGlobalVariable("paminfo");
-
- if(paminfo.length > 0) { //원무 정보(기본 정보)가 있는 경우
-
- //설정된 상단정보를 불러옴
- model.removenode("/root/main/paminfo");
- model.makeNode("/root/main/paminfo");
- setCSVToNode("/root/main/paminfo", paminfo);
-
- var pid = model.getValue("/root/main/paminfo/list/pid");
-
- if (pid != "") {
- for(var i = nursemaininfo.fixedRows; i < nursemaininfo.rows; i++) {
- var main_pid = nursemaininfo.valueMatrix(i, nursemaininfo.colRef("pid"));
-
- if(pid ==main_pid ) {
- model.setFocus("nursemaininfo");
- nursemaininfo.row = i;
- break;
- }
-
- }
- }
- }
- //model.refresh();
- //byCY 4-6-24시간이상 체류환자 체크
- /*
- var count4 = 0; //4시간이상체류환자
- var count6 = 0; //6시간이상체류환자
- var count24 = 0; //24시간이상체류환자
-
- for(var i=0; i<nursemaininfo.rows;i++) {
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck4") =="Y"
- && model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck") == "N"
- && model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck24") =="N")
- {
- //체류시간 4시간 이상 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("stattmck")) = "#0099FF";
- count4++;
- }
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck4") =="Y"
- && model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck") == "Y"
- && model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck24") =="N")
- {
- //체류시간 6시간 이상 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("stattmck")) = "#deffde";
- count6++;
- }
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck4") =="Y"
- && model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck") == "Y"
- && model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/stattmck24") =="Y")
- {
- //체류시간 24시간 이상 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("stattmck")) = "#FFFF66";
- count24++;
- }
- }
-
- model.makeValue("/root/main/cntpat/count4","("+count4+")");
- model.makeValue("/root/main/cntpat/count6","("+count6+")");
- model.makeValue("/root/main/cntpat/count24","("+count24+")");
- */
- //byCY
-
- // 부적합검체 등록 환자 조회_손성훈
- /* var spcPatnm = "";
- if(getNodesetCount("/root/main/topunablspc/nursemainspclist") > 0) {
- for( var k = 1 ; k <= getNodesetCount("/root/main/topunablspc/nursemainspclist") ; k++){
- if(spcPatnm == ""){
- spcPatnm += model.getValue("/root/main/topunablspc/nursemainspclist["+k+"]/patnm");
- }else{
- spcPatnm += ", "+ model.getValue("/root/main/topunablspc/nursemainspclist["+k+"]/patnm");
- }
- }
- tar_unablspc.value = spcPatnm;
- }
- */
- //혈액준비 환자 리스트
- /*var blodlist ="";
- for( i = 0 ; i < getNodesetCount("/root/main/nursemainlist/nursemainblodlist") ; i ++){
- if(blodlist != ""){
- blodlist += ", ";
- }
- blodlist += model.getValue("/root/main/nursemainlist/nursemainblodlist["+(i+1)+"]/patnm");
- }
- tar_blodprep.value = blodlist;
- model.setFocus("nursemaininfo");*/
-
- var iRows = getNodesetCount("/root/main/nursemainlist/nursemaininfo");
- var nodePath = "/root/main/nursemainlist/nursemaininfo";
-
- //20120109_KNUH_Start 감염정보img추가
- for(var i = 1; i<=iRows; i++) {
-
- if (model.getValue(nodePath + "["+i+"]/disp1") == "Y") {
- nursemaininfo.cellstyle("background-image", i, nursemaininfo.colRef("disp1img")) = "../../../com/hismainweb/images/btn_top_infection0.gif";
- }else{
- nursemaininfo.cellstyle("background-image", i, nursemaininfo.colRef("disp1img")) = "";
- }
- if (model.getValue(nodePath + "["+i+"]/disp2") == "Y") {
- nursemaininfo.cellstyle("background-image", i, nursemaininfo.colRef("disp2img")) = "../../../com/hismainweb/images/btn_top_infection1.gif";
- }else{
- nursemaininfo.cellstyle("background-image", i, nursemaininfo.colRef("disp2img")) = "";
- }
- if (model.getValue(nodePath + "["+i+"]/disp3") == "Y") {
- nursemaininfo.cellstyle("background-image", i, nursemaininfo.colRef("disp3img")) = "../../../com/hismainweb/images/btn_top_infection2.gif";
- }else{
- nursemaininfo.cellstyle("background-image", i, nursemaininfo.colRef("disp3img")) = "";
- }
- }
-
- var iRow = nursemaininfo.rows;
-
- /*
- for(i= 1 ; i < iRow ; i ++ ){
- // 혈액준비환자 아이콘표시
- var blodprep = model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn");
-
- if (blodprep == "Y") {
- model.setValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn", "");
- nursemaininfo.cellstyle("background-image", i , 9) = "../../../emr/commonweb/images/blood.gif";
- } else {
- //model.setValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn", "");
- nursemaininfo.cellstyle("background-image", i , 9) = "";
- }
-
- }
- */
-
-
- /*
- for(i= 0 ; i < iRow ; i ++ ){
- if(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/stattmck") == "Y"){
- //체류시간 6시간 이상 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("stattmck")) = "#deffde";
- }
- }
-
- for(i= 0 ; i < iRow ; i ++ ){
- if(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/censusck") == "Y"){
- //Census 미등록 환자
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("stattmck")) = "#ffefd6";
- }
- }
-
-
- for(i = 0; i < iRow; i++) {
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/recovwardcd") != "") {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("recovwardcd") , i, nursemaininfo.colRef("patnm")) = "#ff0000";
-
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/actsymp") == "Y") {
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("bedposcnts") , i, nursemaininfo.colRef("bedposcnts")) = "#ff0000";
-
- }
-
- }
- */
-
- //병원별 적용 임시 하드코딩 부분(추후 환경설정 화면 적용 필요)
- if(ColorUseYn == "Y"){
- grup_help1.visible = true;
- for(i= 1 ; i < iRow ; i ++ ){
- /*+ 글자색 지정 */
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/prcpcnt") == "0") {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("bedposcnts") , i, nursemaininfo.colRef("staytime")) = "#0033CC";
- }else{
- if( eval(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/staytime")) > 150 &&
- (model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/dschdclrtyn") == "N" &&
- model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/inreq") == "" )) {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("vipyn") , i, nursemaininfo.colRef("staytime")) = "#ff0000";
- }
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/recovwardcd") != "") {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("recovwardcd") , i, nursemaininfo.colRef("patnm")) = "#ff0000";
- }
- // 입원장 발행 의사가 타과 의사 지정을 할 경우 처리
- //20110617_KNUH_Start dark9258 입원장 빨간색 칠하는 부분 삭제.
- /*
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/erdocyn") == "Y") {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("inreq") , i, nursemaininfo.colRef("inreq")) = "#ff0000";
- }
- */
-
- /*+ 배경색 지정 */
- if( eval(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/staytime")) >= 240 && eval(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/staytime")) < 360 ){
- //체류시간 4~6시간 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#DDBBFF";
- }else if(eval(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/staytime")) >= 360 && eval(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/staytime")) < 1440 ){
- //체류시간 6~24시간 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#deffde";
- }else if(eval(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/staytime")) >= 1440 ){
- //체류시간 24시간 이상 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#99ccff";
- }
-
- //Census 미등록 환자
- if(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/censusck") == "Y"){
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#ffefd6";
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/recovwardcd") != ""){
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#ffff99";
- }
-
- //활력징후 대상자
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/actsymp") == "Y") {
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("bedposcnts") , i, nursemaininfo.colRef("bedposcnts")) = "#ff0000";
- }
-
- /*+ 기호표시 */
- // 혈액준비환자 아이콘표시
- var blodprep = model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn");
-
- if (blodprep == "Y") {
- model.setValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn", "");
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("blodprepyn")) = "../../../emr/commonweb/images/blood.gif";
- } else {
- //model.setValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn", "");
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("blodprepyn")) = "";
- }
-
- //메모기호 표시
- if(MemoUseYn == "Y"){
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/memo") == "Y"){
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("memoyn")) = "../../../com/commonweb/images/icon_list.gif";
- }else{
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("memoyn")) = "";
- }
- }
-
- // 외래입원장 기로 표시를 함으로써 삭제 처리
- // 외래입원장표시
- //if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/outreq") == "Y") {
- //nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("patnm") , i, nursemaininfo.colRef("patnm")) = "#999999";
- //}
-
- // 부척합 검체 컬럼 색상 변경_손성훈.
- if (nursemaininfo.valueMatrix(i,nursemaininfo.colRef("unablspc")) == "[부]") {
-
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("unablspc") , i, nursemaininfo.colRef("unablspc")) = "#ff9900";
- } else {
- if ( nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("unablspc") , i, nursemaininfo.colRef("unablspc")) == "#ff9900") {
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("unablspc") , i, nursemaininfo.colRef("unablspc")) = "#ffffff"
- }
- }
- }
- }else{
- if ( instUseForJci == "Y" ){
- grup_help012.visible = true;
-
- } else {
- grup_help2.visible = true;
- }
- for(i= 1 ; i < iRow ; i ++ ){
- if ( instUseForJci == "Y" ){
-
- //체류시간 별 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#"+ model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/color012");
- } else {
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/stattmck") == "Y"){
- //체류시간 6시간 이상 체류한 환자에 대해 셀 색상 지정
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#deffde";
- }
- }
- if(model.getValue("/root/main/nursemainlist/nursemaininfo["+i+"]/censusck") == "Y"){
- //Census 미등록 환자
- nursemaininfo.cellstyle("background-color", i, 0, i, nursemaininfo.colRef("nplan")) = "#ffefd6";
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/recovwardcd") != "") {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("recovwardcd") , i, nursemaininfo.colRef("patnm")) = "#ff0000";
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/actsymp") == "Y") {
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("bedposcnts") , i, nursemaininfo.colRef("bedposcnts")) = "#ff0000";
- }
-
- // 입원장 발행 의사가 타과 의사 지정을 할 경우 처리
- //20110617_KNUH_Start dark9258 입원장 빨간색 칠하는 부분 삭제.
- /*
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/erdocyn") == "Y") {
- nursemaininfo.cellstyle("color", i,nursemaininfo.colRef("inreq") , i, nursemaininfo.colRef("inreq")) = "#ff0000";
- }
- */
-
- // 혈액준비환자 아이콘표시
- var blodprep = model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn");
-
- if (blodprep == "Y") {
- model.setValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn", "");
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("blodprepyn")) = "../../../emr/commonweb/images/blood.gif";
- } else {
- //model.setValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/blodprepyn", "");
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("blodprepyn")) = "";
- }
-
- //메모기호 표시
- if(MemoUseYn == "Y"){
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + i + "]/memo") == "Y"){
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("memoyn")) = "../../../com/commonweb/images/icon_list.gif";
- }else{
- nursemaininfo.cellstyle("background-image", i , nursemaininfo.colRef("memoyn")) = "";
- }
- }
-
- // 부척합 검체 컬럼 색상 변경_손성훈.
- if (nursemaininfo.valueMatrix(i,nursemaininfo.colRef("unablspc")) == "[부]") {
-
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("unablspc") , i, nursemaininfo.colRef("unablspc")) = "#ff9900";
- } else {
- if ( nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("unablspc") , i, nursemaininfo.colRef("unablspc")) == "#ff9900") {
- nursemaininfo.cellstyle("background-color", i,nursemaininfo.colRef("unablspc") , i, nursemaininfo.colRef("unablspc")) = "#ffffff"
- }
- }
- }
- }
- }
-
- //혈액준비환자 & 입원대기 환자 조회
- //submit("TRMNE00107");
- //submit("TRMNE00108");
-
- var patnm = "";
- if(getNodesetCount("/root/main/topinfolistblod/nursemainblodlist") > 0 ){
- for( i = 1 ; i <= getNodesetCount("/root/main/topinfolistblod/nursemainblodlist") ; i ++ ){
- if(patnm == ""){
- patnm += model.getValue("/root/main/topinfolistblod/nursemainblodlist["+i+"]/patnm");
- }else{
- patnm += ", " + model.getValue("/root/main/topinfolistblod/nursemainblodlist["+i+"]/patnm");
- }
- }
- tar_blodprep.value = patnm;
- }
-
- // 부적합검체 등록 환자 조회_손성훈
- var spcPatnm = "";
- if(getNodesetCount("/root/main/topunablspc/nursemainspclist") > 0) {
- for( var k = 1 ; k <= getNodesetCount("/root/main/topunablspc/nursemainspclist") ; k++){
- if(spcPatnm == ""){
- spcPatnm += model.getValue("/root/main/topunablspc/nursemainspclist["+k+"]/patnm");
- var patcnt = 1;
- }else{
- spcPatnm += ", "+ model.getValue("/root/main/topunablspc/nursemainspclist["+k+"]/patnm");
- patcnt += 1;
- }
- }
- cap_spcnt.text = "["+patcnt+"]";
- tar_unablspc.value = spcPatnm;
- } else {
- cap_spcnt.text = "";
- tar_unablspc.value = "";
- }
-
-
- //20110209 경북대
- setParameter("SMMNR00600_Param", model.getValue("/root/main/cond/section"));
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면상단정보설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSetParam(pFlag){
-
- if(pFlag == "nm"){
- // 입원환자 화면상단정보 설정
- if(nursemaininfo.row < 1){
- return;
- } else {
- var sindschacptstat = model.getValue("/root/main/cond/indschacptstat" ); // 재원구분
-
- var sOrdtype = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/ordtype" );
- var sPid = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/pid" );
- var sIndd = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/indd" );
- var sCretno = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/cretno" );
- var sInstcd = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/instcd" );
- var sSrchdd = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/dschdd" );
-
- var param = sOrdtype + "▦"
- + sPid + "▦"
- + sIndd + "▦"
- + sCretno + "▦"
- + sInstcd + "▦"
- + sSrchdd + "▦" ;
-
- setParameter("condparam", param);
-
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
-
- //-------------------------------------------------------------
- // 간호 일지 Type 2
- // 상단 정보 수정할때 간호 일지 정보도 같이 변경
- // 2009 09 15
- //-------------------------------------------------------------
-
-
-
- //-------------------------------------------
- var curNurType2Obj = getOpenWindow("SMMNR03400"); //간호 타입2 화면 object loading
- if(curNurType2Obj != null){ //간호 타입2 화면 refresh ;
- curNurType2Obj.javascript.fInitialize("init");
-
- } //간호 타입2 화면 refresh;
- var curNurOpCnfmObj = getOpenWindow("SMMNP00200");
- if(curNurOpCnfmObj != null){//준비확인이 열려있으면 상단 환자로 재조회2010.01.04 K.J.M
- curNurOpCnfmObj.javascript.fFormInit();
- }
-
- //부적합 검체 더블 클릭 시 검체확인 화면 _손성훈.
- if (nursemaininfo.valueMatrix(nursemaininfo.row,nursemaininfo.col) == "[부]"){
- setParameter("SMMNW00129_PARM_PID", model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/pid"));
- setParameter("SMMNW00129_PARM_INDD", model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/indd"));
- modal("SMMNW00129");
- fSeletedSrcTool()
- }
- }
- }else if(pFlag == "ec"){
- if(grd_patlist.row < 1){
- return;
- } else {
- var sOrdtype = model.getValue("/root/main/ercensuslist/erpatientlist["+grd_patlist.row+"]/ordtype" );
- var sPid = model.getValue("/root/main/ercensuslist/erpatientlist["+grd_patlist.row+"]/pid" );
- var sIndd = model.getValue("/root/main/ercensuslist/erpatientlist["+grd_patlist.row+"]/indd" );
- var sCretno = model.getValue("/root/main/ercensuslist/erpatientlist["+grd_patlist.row+"]/cretno" );
- var sInstcd = model.getValue("/root/main/ercensuslist/erpatientlist["+grd_patlist.row+"]/instcd" );
- var sSrchdd = model.getValue("/root/main/ercensuslist/erpatientlist["+grd_patlist.row+"]/dschdd" );
-
- var param = sOrdtype + "▦"
- + sPid + "▦"
- + sIndd + "▦"
- + sCretno + "▦"
- + sInstcd + "▦"
- + sSrchdd + "▦" ;
-
- setParameter("condparam", param);
-
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- //-------------------------------------------------------------
- // 간호 일지 Type 2
- // 상단 정보 수정할때 간호 일지 정보도 같이 변경
- // 2009 09 15
- //-------------------------------------------------------------
-
-
-
- //-------------------------------------------
- var curNurType2Obj = getOpenWindow("SMMNR03400"); //간호 타입2 화면 object loading
- if(curNurType2Obj != null){ //간호 타입2 화면 refresh ;
- curNurType2Obj.javascript.fInitialize("init");
-
- } //간호 타입2 화면 refresh;
- var curNurOpCnfmObj = getOpenWindow("SMMNP00200");
- if(curNurOpCnfmObj != null){//준비확인이 열려있으면 상단 환자로 재조회2010.01.04 K.J.M
- curNurOpCnfmObj.javascript.fFormInit();
- }
- }
- }
- //20110905_KNUH_Start
- var curNurKadexObj = getOpenWindow("SMMNB00200");
- if(curNurKadexObj != null){//카덱스
- curNurKadexObj.javascript.fInitialize();
- }
-
-
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 속성 조회
- * @param : Census 그리드 클릭시 정보 조회
- * @return :
- * @---------------------------------------------------
- */
-
- function fSearchPatienInfo(pFlag){
-
- var xPathPationList = "/root/main/ercensuslist/erpatientlist";
- var iRow = grd_patlist.row;
- var sRow = grd_patlist.rows;
-
- if(pFlag == ""){
- pFlag = "ec";
- }
- // 의사호출
- if(pFlag == "refresh"){
- var sSrchData = "";
- var sSrchHeader = "pid▦indd▦cretno▩";
- var sSrchData = model.getValue("/root/main/ercensusinfo/patinfo/pid" )+"▦"
- + model.getValue("/root/main/ercensusinfo/patinfo/indd" )+"▦"
- + model.getValue("/root/main/ercensusinfo/patinfo/cretno")+"▩";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/srchinfo",sSrchHeader+sSrchData );
-
- submit("TRMNE00104");
-
- var chosddck = model.getValue("/root/main/ercensusinfo/patinfo/chosdd") ;
- var bedinck = model.getValue("/root/main/ercensusinfo/patinfo/bedposflag");
- if(chosddck == "" && bedinck != "") {
- model.setValue("/root/main/ercensusinfo/patinfo/chosdd", model.getValue("/root/main/ercensusinfo/patinfo/indd") );
- model.setValue("/root/main/ercensusinfo/patinfo/chostm", model.getValue("/root/main/ercensusinfo/patinfo/intm") );
- }
-
- model.refresh();
-
- fButtonSettion("A");
- fInputRefresh();
-
- return;
- }
-
- // ER Census
- if(pFlag == "ec") {
- if(sRow == "1"){
- return;
- } else {
- var sSrchData = "";
- var sSrchHeader = "pid▦indd▦cretno▦instcd▩";
- var sSrchData = model.getValue(xPathPationList+"["+iRow+"]/pid" )+"▦"
- + model.getValue(xPathPationList+"["+iRow+"]/indd" )+"▦"
- + model.getValue(xPathPationList+"["+iRow+"]/cretno")+"▦"
- + model.getValue(xPathPationList+"["+iRow+"]/instcd")+"▩";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/srchinfo",sSrchHeader+sSrchData );
-
- submit("TRMNE00104");
-
- var chosddck = model.getValue("/root/main/ercensusinfo/patinfo/chosdd") ;
- var bedinck = model.getValue("/root/main/ercensusinfo/patinfo/bedposflag");
- if(chosddck == "" && bedinck != "") {
- model.setValue("/root/main/ercensusinfo/patinfo/chosdd", model.getValue("/root/main/ercensusinfo/patinfo/indd") );
- model.setValue("/root/main/ercensusinfo/patinfo/chostm", model.getValue("/root/main/ercensusinfo/patinfo/intm") );
- }
-
- // 삭제된 경우는 삭제처리 보이도록
- opt_delyn.visible = false;
- var delyn = model.getValue("/root/main/ercensusinfo/patinfo/incncldtcheck"); // 삭제여부
- if (delyn == "Y") {
- opt_delyn.visible = true;
- }
-
- model.refresh();
-
- fButtonSettion("A");
- fInputRefresh();
-
- return;
- }
-
- // Nurse Main
- } else if (pFlag == "nm") {
- //alert("test N");
- } else if (pFlag == "p_ec") {
- var sSrchData = "";
- var sSrchHeader = "pid▦indd▦cretno▩";
- var sSrchData = model.getValue("/root/main/cond/pid" )+"▦"
- + model.getValue("/root/main/cond/indd" )+"▦"
- + model.getValue("/root/main/cond/cretno")+"▩";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/srchinfo",sSrchHeader+sSrchData );
-
- submit("TRMNE00104");
-
- var chosddck = model.getValue("/root/main/ercensusinfo/patinfo/chosdd") ;
- var bedinck = model.getValue("/root/main/ercensusinfo/patinfo/bedposflag");
- if(chosddck == "" && bedinck != "") {
- model.setValue("/root/main/ercensusinfo/patinfo/chosdd", model.getValue("/root/main/ercensusinfo/patinfo/indd") );
- model.setValue("/root/main/ercensusinfo/patinfo/chostm", model.getValue("/root/main/ercensusinfo/patinfo/intm") );
- }
-
- // 삭제된 경우는 삭제처리 보이도록
- opt_delyn.visible = false;
- var delyn = model.getValue("/root/main/ercensusinfo/patinfo/incncldtcheck"); // 삭제여부
- if (delyn == "Y") {
- opt_delyn.visible = true;
- }
-
- model.refresh();
-
- fButtonSettion("A");
- fInputRefresh();
-
- return;
- }
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Census 화면 버튼,입력 창 컨트롤
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fButtonSettion(pFlag){
- if( model.getValue("/root/main/cond/indschacptstat") == "4" ){
-
- btn_save.disabled = true; //상단 저장 버튼 비활성화
-
- //퇴실취소 버튼 비활성화
- btn_outrmcncl1.disabled = true;
- btn_outrmcncl2.disabled = true;
- btn_outrmcncl3.disabled = true;
-
- //재방방 체크박스 비활성화
- chk_revisit1.disabled = true;
- chk_revisit2.disabled = true;
-
- //방문일지 비활성화
- int_chosdd1.disabled = true;
- int_chostm1.disabled = true;
- btn_saverow1.disabled = true;
- btn_updtrow1.disabled = true;
- btn_callpop1.disabled = true;
-
- //방문일지 1차 재방문 비활성화
- int_chosdd2.disabled = true;
- int_chostm2.disabled = true;
- btn_saverow2.disabled = true;
- btn_updtrow2.disabled = true;
- btn_callpop2.disabled = true;
-
- //방문일지 2차 재방문 비활성화
- int_chosdd3.disabled = true;
- int_chostm3.disabled = true;
- btn_saverow3.disabled = true;
- btn_updtrow3.disabled = true;
- btn_callpop3.disabled = true;
-
- //의사 호출 부분 메인진료과 변경 부분 비활성화
- for(var i = 1 ; i <= grd_calldoc1.rows ; i ++){
- grd_calldoc1.isReadOnly(i, grd_calldoc1.colRef("mainyn")) = true;
- }
-
- for(var i = 1 ; i <= grd_calldoc2.rows ; i ++){
- grd_calldoc2.isReadOnly(i, grd_calldoc2.colRef("mainyn")) = true;
- }
-
- for(var i = 1 ; i <= grd_calldoc3.rows ; i ++){
- grd_calldoc3.isReadOnly(i, grd_calldoc3.colRef("mainyn")) = true;
- }
-
-
- }else{
- if(model.getValue("/root/main/ercensusinfo/patinfo/stattm") == ""){
- btn_updtrow1.visible = false;
- btn_saverow1.visible = true;
- }else{
- btn_updtrow1.visible = true;
- btn_saverow1.visible = false;
- }
-
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit1stattm") == ""){
- btn_updtrow2.visible = false;
- btn_saverow2.visible = true;
- }else{
- btn_updtrow2.visible = true;
- btn_saverow2.visible = false;
- }
-
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit2stattm") == ""){
- btn_updtrow3.visible = false;
- btn_saverow3.visible = true;
- }else{
- btn_updtrow3.visible = true;
- btn_saverow3.visible = false;
- }
-
-
- if(model.getValue("/root/main/ercensusinfo/patinfo/outrmdt") == ""){
- btn_outrmcncl1.disabled = true;
- chk_revisit1.disabled = true;
- }else{
- btn_outrmcncl1.disabled = false;
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit1stattm") == ""){
- chk_revisit1.disabled = false;
- } else {
- chk_revisit1.disabled = true;
- }
- }
-
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit1outrmdt") == ""){
- btn_outrmcncl2.disabled = true;
- chk_revisit2.disabled = true;
- }else{
- btn_outrmcncl2.disabled = false;
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit2stattm") == ""){
- chk_revisit2.disabled = false;
- } else {
- chk_revisit2.disabled = true;
- }
- }
-
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit2outrmdt") == ""){
- btn_outrmcncl3.disabled = true;
- }else{
- btn_outrmcncl3.disabled = false;
- }
- if(pFlag = "A"){
- if( model.getValue("/root/main/ercensusinfo/patinfo/bedposflag") == ""){
- int_chosdd1.disabled = true;
- int_chostm1.disabled = true;
- btn_addrow1.disabled = true;
- btn_delrow1.disabled = true;
- btn_introw1.disabled = true;
- btn_updtrow1.disabled = true;
- btn_saverow1.disabled = true;
- } else {
- int_chosdd1.disabled = false;
- int_chostm1.disabled = false;
- btn_addrow1.disabled = false;
- btn_delrow1.disabled = false;
- btn_introw1.disabled = false;
- btn_updtrow1.disabled = false;
- btn_saverow1.disabled = false;
- }
-
- if( model.getValue("/root/main/ercensusinfo/patinfo/revisit1") == "Y" ) {
- int_chosdd2.disabled = false;
- int_chostm2.disabled = false;
- btn_addrow2.disabled = false;
- btn_delrow2.disabled = false;
- btn_introw2.disabled = false;
- btn_updtrow2.disabled = false;
- btn_saverow2.disabled = false;
- btn_callpop2.disabled = false;
- } else {
- int_chosdd2.disabled = true;
- int_chostm2.disabled = true;
- btn_addrow2.disabled = true;
- btn_delrow2.disabled = true
- btn_introw2.disabled = true
- btn_updtrow2.disabled = true;
- btn_saverow2.disabled = true;
- btn_callpop2.disabled = true;
- }
- if( model.getValue("/root/main/ercensusinfo/patinfo/revisit2") == "Y" ) {
- int_chosdd3.disabled = false;
- int_chostm3.disabled = false;
- btn_introw3.disabled = false;
- btn_delrow3.disabled = false;
- btn_addrow3.disabled = false;
- btn_saverow3.disabled = false;
- btn_updtrow3.disabled = false;
- btn_callpop3.disabled = false;
- } else {
- int_chosdd3.disabled = true;
- int_chostm3.disabled = true;
- btn_introw3.disabled = true;
- btn_delrow3.disabled = true;
- btn_addrow3.disabled = true;
- btn_saverow3.disabled = true;
- btn_updtrow3.disabled = true;
- btn_callpop3.disabled = true;
- }
- }
- if(pFlag == "R1"){
- int_chosdd2.disabled = true;
- int_chostm2.disabled = true;
- int_chosdd3.disabled = true;
- int_chostm3.disabled = true;
- btn_addrow2.disabled = true;
- btn_delrow2.disabled = true;
- btn_introw2.disabled = true;
- btn_updtrow2.disabled = true;
- btn_saverow2.disabled = true;
- btn_introw3.disabled = true;
- btn_delrow3.disabled = true;
- btn_addrow3.disabled = true;
- btn_saverow3.disabled = true;
- btn_updtrow3.disabled = true;
- btn_callpop2.disabled = true;
- btn_callpop3.disabled = true;
- }
-
- if(pFlag == "R2"){
- int_chosdd3.disabled = true;
- int_chostm3.disabled = true;
- btn_introw3.disabled = true;
- btn_delrow3.disabled = true;
- btn_addrow3.disabled = true;
- btn_saverow3.disabled = true;
- btn_updtrow3.disabled = true;
- btn_callpop2.disabled = true;
- btn_callpop3.disabled = true;
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Census 화면 입력창 Refresh 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInputRefresh(){
- int_chosdd2.refresh();
- int_chostm2.refresh();
- int_chosdd3.refresh();
- int_chostm3.refresh();
- }
-
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 왼쪽 마우스 클릭 메뉴
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopupMenuInfo(){
- var sCol = nursemaininfo.mouseCol;
- if(event.button == 3){
- if(sCol == nursemaininfo.colRef("orddrid")){
- if(nursemaininfo.isCell(event.target) && nursemaininfo.mouseRow >= nursemaininfo.fixedrows){
- setPopupMenu("nursemaininfo", false, "/root/codedata/popupmenu/grid01/item", "name", "func");
- }else{
- window.setPopupMenu(false);
- }
- }else{
- if(nursemaininfo.isCell(event.target) && nursemaininfo.mouseRow >= nursemaininfo.fixedrows){
- setPopupMenu("nursemaininfo", false, "/root/codedata/popupmenu/grid02/item", "name", "func");
- }else{
- window.setPopupMenu(false);
- }
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : publicㅑㄹ
- * @desc : Exel 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveExcel(){
- var fileName = "";
- var sIndschacptstat = model.getValue("/root/main/cond/indschacptstat");
- if(sIndschacptstat == "1"){
- fileName = window.fileDialog("save", ",", false, "EMC 메인(재원)_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- }else if (sIndschacptstat == "2"){
- fileName = window.fileDialog("save", ",", false, "EMC 메인(퇴원진행)_"+getCurrentDate(), "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- }else if (sIndschacptstat == "3"){
- fileName = window.fileDialog("save", ",", false, "EMC 메인(퇴원)_"+int_outdt.value, "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- }
-
- if (fileName != "") {
- nursemaininfo.saveExcel(fileName, "SheetName", true, true, "", "", false);
- }
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Bed 정보 선택 Popup
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopupBed(){
-
- xOldPosflagcd = model.getValue("/root/main/ercensusinfo/patinfo/bedposflagcd");
- xOldPosflag = model.getValue("/root/main/ercensusinfo/patinfo/bedposflag");
- var vktas = model.getValue("/root/main/ercensusinfo/patinfo/ktas");
- if(vktas != ""){
- setParameter("ktas", model.getValue("/root/main/ercensusinfo/patinfo/ktas"));
- }
- window.load( "SMMNE03600_Bed위치.xrw", "modeless" , "test", "left:"+ event.screenX+"px; top:"+event.screenY+"px; width:600px; height:600px;");
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Census 저장, 수정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveCensusInfo(pFlag){
-
- // 키값 정의
- var sPid = model.getValue("/root/main/ercensusinfo/patinfo/pid" ); // 등록번호
- var sIndd = model.getValue("/root/main/ercensusinfo/patinfo/indd" ); // 입원일자
- var sOrddd = model.getValue("/root/main/ercensusinfo/patinfo/orddd" ); // 진료일자
- var sCretno = model.getValue("/root/main/ercensusinfo/patinfo/cretno"); // 생성번호
- var sIntm = model.getValue("/root/main/ercensusinfo/patinfo/intm" ); // 입원시간
-
-
- // 실제 입력값 설정
- var sBedposflag = model.getValue("/root/main/ercensusinfo/patinfo/bedposflag" ); // Bed위치내용
- var sOutcureyn = model.getValue("/root/main/ercensusinfo/patinfo/outcureyn" ); // 외래처치여부
- var sCpryn = model.getValue("/root/main/ercensusinfo/patinfo/cpryn" ); // CPR여부
- var sElbulbodpatnm = model.getValue("/root/main/ercensusinfo/patinfo/elbulbodpatnm" ); // 전광판용 환자명
- var sElbulbodcccnts = model.getValue("/root/main/ercensusinfo/patinfo/elbulbodcccnts"); // 전광판용주호소
- var sNurscccnts = model.getValue("/root/main/ercensusinfo/patinfo/nurscccnts" ); // 간호사 입력 주호소
- var sInwaitresncnts = model.getValue("/root/main/ercensusinfo/patinfo/inwaitresncnts"); // 입원대기사유내용
- var sSkilfact = model.getValue("/root/main/ercensusinfo/patinfo/skilfact" ); // remart
- var sSpcltest = model.getValue("/root/main/ercensusinfo/patinfo/spcltest" ); // 특수검사
- var sBedposflagcd = model.getValue("/root/main/ercensusinfo/patinfo/bedposflagcd" ); // Bed위치
- var sBedcd = model.getValue("/root/main/ercensusinfo/patinfo/bedcd" ); // 원무bed위치내용
- var sExtrecyn = model.getValue("/root/main/ercensusinfo/patinfo/extrecyn" ); // 외부 의무기록 여부 y,n _ 손성훈.
- var sExtrecsaveyn = model.getValue("/root/main/ercensusinfo/patinfo/extrecsaveyn" ); // 외부 의무기록 저장 여부 y,n _ 손성훈.
- var sExtrecrtnyn = model.getValue("/root/main/ercensusinfo/patinfo/extrecrtnyn" ); // 외부 의무기록 반환 여부 y,n _ 손성훈.
- var sExtemryn = model.getValue("/root/main/ercensusinfo/patinfo/extemryn" ); // 외부 영상기록 여부 y,n _ 손성훈.
- var sExtemrsaveyn = model.getValue("/root/main/ercensusinfo/patinfo/extemrsaveyn" ); // 외부 영상기록 저장 여부 y,n _ 손성훈.
- var sExtemrrtnyn = model.getValue("/root/main/ercensusinfo/patinfo/extemrrtnyn" ); // 외부 영상기록 반환 여부 y,n _ 손성훈.
- var sBedGrupcd = model.getValue("/root/main/ercensusinfo/patinfo/bedgrupcd" ); // bed그룹코드(응급입원실/EICU인 경우(I)와 응급실인 경우(E) 구분)_20110127_SMY
- var sCprTims = model.getValue("/root/main/ercensusinfo/patinfo/cprtims" ); // CPR횟수
-
- // 161020_ 칠곡 응급실 구역변경 관련 수정
- var spamroomcd = model.getValue("/root/main/ercensusinfo/patinfo/pamroomcd" ); // 응급실 구역정보(roomcd)
- var spambedcd = model.getValue("/root/main/ercensusinfo/patinfo/pambedcd" ); // 응급실 병상정보(bedcd)
- var spamroomtypecd = model.getValue("/root/main/ercensusinfo/patinfo/pamroomtypecd" ); // 병실형태 코드
- var spamroomgrdecd = model.getValue("/root/main/ercensusinfo/patinfo/pamroomgrdecd" ); // 병실등급 코드
- var spamflag = model.getValue("/root/main/ercensusinfo/patinfo/pamflag" ); // 구역변경 flag
-
- //alert("spamroomcd : " + spamroomcd + " / spambedcd : " + spambedcd + " / spamroomtypecd : " + spamroomtypecd + "/ spamroomgrdecd : " + spamroomgrdecd);
-
- if(sPid == "" || sPid == null ) {
- messageBox("환자가 선택되지", "E007");
- model.setFocus("grd_patlist");
- return;
- }
-
- if((sBedposflag == "" || sBedposflag == null) && (pFlag == "patinfoU" || pFlag == "patinfoI")) {
- messageBox("Bed위치는", "I003");
- model.setFocus("int_bedposflag");
- return;
- }
-
- var cpryn = rdo_cpryn.value;
- var cprtims = cmb_cprtims.value;
-
- if(cpryn == "Y" && cprtims == 0) {
- messageBox("CPR 횟수를 입력하세요", "I");
- model.setFocus("cmb_cprtims");
- return;
- }
-
- var sCensusInfoHeader1 = "stat▦pid▦orddd▦cretno▦indd▦intm▦elbulbodpatnm▦nurscccnts▦bedposflag▦outcureyn▦cpryn▦elbulbodcccnts▦inwaitresncnts▦skilfact▦spcltest▦bedposflagcd▦bedcd▦extrecyn▦extrecsaveyn▦extrecrtnyn▦extemryn▦extemrsaveyn▦extemrrtnyn▦bedgrupcd▦cprtims▦pamroomcd▦pambedcd▦pamroomtypecd▦pamroomgrdecd▦pamflag▩";
- var sCensusInfoHeader = "stat▦pid▦orddd▦cretno▦indd▦intm▦elbulbodpatnm▦nurscccnts▦bedposflag▦outcureyn▦cpryn▦elbulbodcccnts▦inwaitresncnts▦skilfact▦spcltest▦bedposflagcd▦bedcd▦extrecyn▦extrecsaveyn▦extrecrtnyn▦extemryn▦extemrsaveyn▦extemrrtnyn▦bedgrupcd▦cprtims▩";
-
- // census 수정
- if(pFlag == "patinfoU" ){
-
- var sInsertdata = "U▦" // 상태
- + sPid +"▦" // 등록번호
- + sOrddd +"▦" // 진료일자
- + sCretno +"▦" // 생성번호
- + sIndd +"▦" // 입원일자
- + sIntm +"▦" // 입원시간
- + sElbulbodpatnm +"▦" // 전광판용 환자명
- + sNurscccnts +"▦" // 간호사 입력 주호소
- + sBedposflag +"▦" // Bed 위치
- + sOutcureyn +"▦" // 외래처치 여부
- + sCpryn +"▦" // CPR 여부
- + sElbulbodcccnts +"▦" // 전광판용 주호소
- + sInwaitresncnts +"▦" // 입원지원사유내역
- + sSkilfact +"▦" // remart
- + sSpcltest +"▦" // 특수검사
- + sBedposflagcd +"▦" // bed 위치코드
- + sBedcd +"▦" // 원무병상코드
- + sExtrecyn +"▦" // 외부 의무기록 지참여부
- + sExtrecsaveyn +"▦" // 외부 의무기록 저장여부 확인
- + sExtrecrtnyn +"▦" // 외부 의무기록 반환 여부
- + sExtemryn +"▦" // 외부 영상자료 지참여부
- + sExtemrsaveyn +"▦" // 외부 영상자료 저장여부 확인
- + sExtemrrtnyn +"▦" // 외부 영상자료 반환 여부
- + sBedGrupcd +"▦"
- + sCprTims +"▦" // Bed그룹코드
- + spamroomcd +"▦" // 응급실 구역정보
- + spambedcd +"▦" // 응급실 병상정보
- + spamroomtypecd +"▦" // 병실형태 코드
- + spamroomgrdecd +"▦" // 병실등급 코드
- + spamflag +"▩"; // 병실등급 코드
-
-
-
- model.removenode("/root/send");
- model.makeValue("/root/send/censusinfo",sCensusInfoHeader1 + sInsertdata );
- }
- // census 등록
- if(pFlag == "patinfoI"){
-
- var sInsertdata = "I▦" // 상태
- + sPid +"▦" // 등록번호
- + sOrddd +"▦" // 진료일자
- + sCretno +"▦" // 생성번호
- + sIndd +"▦" // 입원일자
- + sIntm +"▦" // 입원시간
- + sElbulbodpatnm +"▦" // 전광판용 환자명
- + sNurscccnts +"▦" // 간호사 입력 주호소
- + sBedposflag +"▦" // Bed 위치
- + sOutcureyn +"▦" // 외래처치 여부
- + sCpryn +"▦" // CPR 여부
- + sElbulbodcccnts +"▦" // 전광판용 주호소
- + sInwaitresncnts +"▦" // 입원지원사유내역
- + sSkilfact +"▦" // remart
- + sSpcltest +"▦" // 특수검사
- + sBedposflagcd +"▦" // bed 위치코드
- + sBedcd +"▦" // 원무병상코드
- + sExtrecyn +"▦" // 외부 의무기록 지참여부
- + sExtrecsaveyn +"▦" // 외부 의무기록 저장여부 확인
- + sExtrecrtnyn +"▦" // 외부 의무기록 반환 여부
- + sExtemryn +"▦" // 외부 영상자료 지참여부
- + sExtemrsaveyn +"▦" // 외부 영상자료 저장여부 확인
- + sExtemrrtnyn +"▦" // 외부 영상자료 반환 여부
- + sBedGrupcd +"▦"
- + sCprTims +"▦" // Bed그룹코드
- + spamroomcd +"▦" // 응급실 구역정보
- + spambedcd +"▦" // 응급실 병상정보
- + spamroomtypecd +"▦" // 병실형태 코드
- + spamroomgrdecd +"▦" // 병실등급 코드
- + spamflag +"▩"; // 병실등급 코드
-
-
- model.removenode("/root/send");
- model.makeValue("/root/send/censusinfo",sCensusInfoHeader1 + sInsertdata );
-
- var chosddck = model.getValue("/root/main/ercensusinfo/patinfo/chosdd") ;
- // 내원일시
- if(chosddck == "") {
- model.setValue("/root/main/ercensusinfo/patinfo/chosdd", model.getValue("/root/main/ercensusinfo/patinfo/indd") );
- model.setValue("/root/main/ercensusinfo/patinfo/chostm", model.getValue("/root/main/ercensusinfo/patinfo/intm") );
- }
- }
- // Triage/census 삭제 2008.09.10
- if(pFlag == "patinfoD" ){
-
- var sInsertdata = "D▦" // 상태
- + sPid +"▦" // 등록번호
- + sOrddd +"▦" // 진료일자
- + sCretno +"▦" // 생성번호
- + sIndd +"▦" // 입원일자
- + sIntm +"▦" // 입원시간
- + sElbulbodpatnm +"▦" // 전광판용 환자명
- + sNurscccnts +"▦" // 간호사 입력 주호소
- + sBedposflag +"▦" // Bed 위치
- + sOutcureyn +"▦" // 외래처치 여부
- + sCpryn +"▦" // CPR 여부
- + sElbulbodcccnts +"▦" // 전광판용 주호소
- + sInwaitresncnts +"▦" // 입원지원사유내역
- + sSkilfact +"▦" // remart
- + sSpcltest +"▦" // 특수검사
- + sBedposflagcd +"▦" // bed 위치코드
- + sBedcd +"▦" // 원무병상코드
- + sExtrecyn +"▦" // 외부 의무기록 지참여부
- + sExtrecsaveyn +"▦" // 외부 의무기록 저장여부 확인
- + sExtrecrtnyn +"▦" // 외부 의무기록 반환 여부
- + sExtemryn +"▦" // 외부 영상자료 지참여부
- + sExtemrsaveyn +"▦" // 외부 영상자료 저장여부 확인
- + sExtemrrtnyn +"▦" // 외부 영상자료 반환 여부
- + sBedGrupcd +"▦"
- + sCprTims +"▩"; // Bed그룹코드
-
- model.removenode("/root/send");
- model.makeValue("/root/send/censusinfo",sCensusInfoHeader + sInsertdata );
- }
-
- // Triage/census 삭제취소 2008.09.10
- if(pFlag == "patinfoC" ){
-
- var sInsertdata = "C▦" // 상태
- + sPid +"▦" // 등록번호
- + sOrddd +"▦" // 진료일자
- + sCretno +"▦" // 생성번호
- + sIndd +"▦" // 입원일자
- + sIntm +"▦" // 입원시간
- + sElbulbodpatnm +"▦" // 전광판용 환자명
- + sNurscccnts +"▦" // 간호사 입력 주호소
- + sBedposflag +"▦" // Bed 위치
- + sOutcureyn +"▦" // 외래처치 여부
- + sCpryn +"▦" // CPR 여부
- + sElbulbodcccnts +"▦" // 전광판용 주호소
- + sInwaitresncnts +"▦" // 입원지원사유내역
- + sSkilfact +"▦" // remart
- + sSpcltest +"▦" // 특수검사
- + sBedposflagcd +"▦" // bed 위치코드
- + sBedcd +"▦" // 원무병상코드
- + sExtrecyn +"▦" // 외부 의무기록 지참여부
- + sExtrecsaveyn +"▦" // 외부 의무기록 저장여부 확인
- + sExtrecrtnyn +"▦" // 외부 의무기록 반환 여부
- + sExtemryn +"▦" // 외부 영상자료 지참여부
- + sExtemrsaveyn +"▦" // 외부 영상자료 저장여부 확인
- + sExtemrrtnyn +"▦" // 외부 영상자료 반환 여부
- + sBedGrupcd +"▩"; // Bed그룹코드
-
- model.removenode("/root/send");
- model.makeValue("/root/send/censusinfo",sCensusInfoHeader + sInsertdata );
- }
- //20110225 이선경 경북대 : 응급실 구역 멀티체크
- var rendcd=model.getValue("/root/main/cond/section");
- var chkdata=checkbox1.value;
- var rendcdlist=rendcd.split(" ");
- if (chkdata.substr(0,1) != "-") {
- if (rendcd.length>0) {
- for (var i=0; i<rendcdlist.length;i++) {
- rendcd=rendcd.replace(" ","','");
- }
- rendcd="('" + rendcd + "')";
- }
- } else {
- rendcd = "-";
- }
- var sSrchData = "";
- var sSrchHeader = "flag▦section▦orddept▦orddrid▩";
- var sSrchData = model.getValue("/root/main/cond/indschacptstat" ) +"▦"
- //+ model.getValue("/root/main/cond/section" ) +"▦"
- + rendcd +"▦"
- + model.getValue("/root/main/cond/orddeptcd" ) +"▦"
- + model.getValue("/root/main/cond/medispclid" ) +"▩";
-
- model.makeValue("/root/send/mainsearchinfo", sSrchHeader + sSrchData);
-
- if(submit("TXMNE00101")== true){
- fSaveCallDoc("/chosdd", "/chostm", "/stattm", "0", "R1");
- }else{
- return;
- }
-
- //---------------------------------------------------------------------------------
- //ER-EICU간 구역 변경이 이루어졌을 경우 간호기록으로 남긴다. 2013.10.22 KJS
- //xOldPosflagcd VS sBedposflagcd
- var oldSupCD = xOldPosflagcd.substr(0, 3) ;
- var newSupCD = sBedposflagcd.substr(0, 3) ;
- var recdt = getCurrentDate() + getCurrentTime().substr(0, 4);
-
- if ( xOldPosflagcd != "" && oldSupCD != newSupCD && (oldSupCD == "BDD" || newSupCD == "BDD" || oldSupCD == "BDE" || newSupCD == "BDE" || oldSupCD == "BDT" || newSupCD == "BDT") ) {
- fSetNrRecord ("move", oldSupCD, newSupCD, recdt);
- }
-
- //---------------------------------------------------------------------------------
-
- //alert(sSrchToolStatus);
- // 저장후 재조회
- //fSearchPatienInfo("ec");
- fSeletedSrcTool();
-
-
- fButtonSettion("A");
- grd_patlist.refresh();
-
- var iRow = grd_patlist.rows;
- var cRow = "";
-
- for( i = 1 ; i < iRow + 1 ; i++ ){
- if ( model.getValue("/root/main/ercensuslist/erpatientlist["+ i +"]/pid" ) == sPid){
- cRow = i;
- }
- }
-
- if(cRow == "" ){
- return;
- }else{
- grd_patlist.row = cRow;
- grd_patlist.topRow = cRow;
- }
-
-
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자 조회popup
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUserEnter(pPath, pNodeID,pNodeNM, pNodeDept, pNodeDeptNM, pDOC, pFlag) {
-
- var pParam = fUseridPopupData("TRMNE00105","SMMNE00101", pDOC, pFlag);
- //var pParam = fUseridPopupData("TRMNE00105","SMMNE00101", pDOC);
- fUserDataSet(pParam, pPath+pNodeID,pPath+pNodeNM, pPath+pNodeDept, pPath+pNodeDeptNM, pDOC);
- }
- function fUseridPopup(pPath, pNodeID, pNodeNM, pNodeDept, pNodeDeptNM, pDOC, pFlag) {
-
- var pParam = fShowModal("SMMNE00101", pFlag);
- fUserDataSet(pParam, pPath+pNodeID,pPath+pNodeNM, pPath+pNodeDept, pPath+pNodeDeptNM, pDOC);
- }
-
- function fUseridFlag(pFlag){
- setParameter("SPMNE00101_Param", pFlag);
- }
-
- function fGetValue(node, row, element) {
-
- var rtnValue = model.getValue(node + "[" + row + "]/" + element);
- return rtnValue;
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 사용자 조회popup
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUseridPopupData(pMapID, pProgID, pData, pFlag) {
- var iParam="";
- if (pData == "") {
- return iParam;
- }
- model.removenode("/root/send");
- model.makeValue("/root/send/searchitem", pData);
- model.makeValue("/root/send/flag" , "all");
- model.makeValue("/root/send/srchflag" , pFlag);
- submit(pMapID);
- var NodeCnt = instance1.selectSingleNode(xPathUser).childNodes.length;
- var iNode = xPathUser + "/userlist";
- switch(NodeCnt) {
- case 0 : messageBox(pData + "에 해당하는 자료가", "I004");
- break;
- case 1 : iParam = fGetValue(iNode, 1, "userid" ) + "|"
- + fGetValue(iNode, 1, "usernm" ) + "|"
- + fGetValue(iNode, 1, "posinstnm") + "|"
- + fGetValue(iNode, 1, "posinstcd") + "|"
- + fGetValue(iNode, 1, "posdeptnm") + "|"
- + fGetValue(iNode, 1, "posdeptcd") ;
- break;
- default : iParam = fShowModal(pProgID, pFlag);
- }
-
- return iParam;
- }
-
-
- function fShowModal(pProgID, pFlag) {
- var xpos = event.screenX-100;
- var ypos = event.screenY-100;
-
- fUseridFlag(pFlag);
- modal(pProgID, 1, xpos, ypos,pProgID, xPathUser, xPathUserPop);
- var iProperties = getParameter("SendData");
-
- return iProperties
- }
- function fUserDataSet(pData, pNodeID,pNodeNM, pNodeDept, pNodeDeptNM, pDoc, pFlag) {
- var iSplit_Value = pData.split("|");
-
- if (pData == "") {
- model.setValue(pNodeNM, iSplit_Value[1]);
- model.setValue(pNodeDeptNM, iSplit_Value[4]);
-
- return;
- }
-
- // iParam_userid 0 사용자ID
- // iParam_usernm 1 사용자명
- // iParam_posinstnm 2 소속기관명
- // iParam_posinstcd 3 소속기관코드
- // iParam_posdeptnm 4 소속부서명
- // iParam_posdeptcd 5 소속부서코드
-
- if (iSplit_Value.length > 0) {
- model.setValue(pNodeID, iSplit_Value[0]); // 사용자ID
- model.setValue(pNodeNM, iSplit_Value[1]); // 사용자명
-
- if (pNodeDept !="") {
- model.setValue(pNodeDeptNM, iSplit_Value[4]); // 소속부서명
- model.setValue(pNodeDept , iSplit_Value[5]); // 소속부서코드
-
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 조회조건 콤보 데이터 셋팅
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSelctionOutRmCombo(){
-
- model.removeNodeset("/root/hidden/item");
-
- for(i=1; i <= getNodesetCount("/root/init/erbaselist/outrminfo");i++ ) {
- model.makeValue("/root/hidden/item["+i+"]/label", model.getValue("/root/init/erbaselist/outrminfo["+i+"]/typenm") );
- model.makeValue("/root/hidden/item["+i+"]/value", model.getValue("/root/init/erbaselist/outrminfo["+i+"]/basetypecd"));
- }
- }
-
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 퇴원취소 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOutrmCancel(xCancelpath, fVisitno){
-
- if(model.getValue("/root/main/cond/indschacptstat") == "3"){
- messageBox("퇴원환자는 퇴실 취소를", "E001");
- return;
- }
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit1") == "Y" && fVisitno == "0"){
- messageBox("Revisit1 내역이 있어 퇴실 취소를", "E001");
- return;
- }
-
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit2") == "Y" && fVisitno == "1"){
- messageBox("Revisit2 내역이 있어 퇴실 취소를", "E001");
- return;
- }
-
- var jPid = model.getValue("/root/main/ercensusinfo/patinfo/pid"); // 등록번호
- var jIndd = model.getValue("/root/main/ercensusinfo/patinfo/indd"); // 입원일자
- var jCretno = model.getValue("/root/main/ercensusinfo/patinfo/cretno"); // 생성번호
-
- model.removenode("/root/send/judginfo");
- model.makeValue("/root/send/judginfo/pid", jPid);
- model.makeValue("/root/send/judginfo/indd", jIndd);
- model.makeValue("/root/send/judginfo/cretno", jCretno);
- submit("TRMNE00113");
-
- var jJudginfo = model.getValue("/root/judginfo/dschjudgprcsstat");
- if (jJudginfo != "A") {
- messageBox(" 심사상태를 해제하고 퇴실취소를 진행하세요.\r\n\r\n" +
- "※ 일과시간 중 - 심사실로 연락, 일과시간 외 - 응급수납으로 연락", "E999");
- return;
- }
-
- if(model.getValue(xCancelpath) == "" ) {
- messageBox("퇴원 내역이", "I004");
- } else {
- var vbYes = messageBox("퇴실취소를 ", "Q004");
-
- if(vbYes == 6){
- var sPid = model.getValue("/root/main/ercensusinfo/patinfo/pid"); // 등록번호
- var sIndd = model.getValue("/root/main/ercensusinfo/patinfo/indd"); // 입원일자
- var sCretno = model.getValue("/root/main/ercensusinfo/patinfo/cretno"); // 생성번호
- var sVistno = fVisitno ; // visitno
- //byCY revisit 여부체크
- if(model.getValue("/root/main/ercensusinfo/patinfo/revisit1")=='Y' ||model.getValue("/root/main/ercensusinfo/patinfo/revisit2")=='Y' ) {
- model.makeValue("/root/send/ourrmcancel/revisit","Y");
- var sRevisit = model.getValue("/root/send/ourrmcancel/revisit");
- }
- //byCY
- var sCensusInfoHeader = "pid▦indd▦cretno▦revisit▦visitno▩"
-
- var sCancelData = sPid + "▦"
- + sIndd + "▦"
- + sCretno + "▦"
- + sRevisit + "▦"
- + sVistno + "▩";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/ourrmcancel",sCensusInfoHeader + sCancelData );
-
- messageBox("퇴실정리시 자동으로 기록된 간호기록이 존재하오니 삭제하여 주시기 바랍니다.", "I");
-
-
- if(submit("TXMNE00103") == true){
- model.removenode("/root/send");
-
- //20110225 이선경 경북대 : 응급실 구역 멀티체크
- var rendcd=model.getValue("/root/main/cond/section");
- var chkdata=checkbox1.value;
- var rendcdlist=rendcd.split(" ");
- if (chkdata.substr(0,1) != "-") {
- if (rendcd.length>0) {
- for (var i=0; i<rendcdlist.length;i++) {
- rendcd=rendcd.replace(" ","','");
- }
- rendcd="('" + rendcd + "')";
- }
- } else {
- rendcd = "-";
- }
- var sSrchHeader = "flag▦orddept▦orddrid▦section▩";
- var sSrchData = model.getValue("/root/main/cond/indschacptstat") +"▦"
- + model.getValue("/root/main/cond/orddeptcd") +"▦"
- + model.getValue("/root/main/cond/medispclid") +"▦"
- //+ model.getValue("/root/main/cond/section") +"▩";
- + rendcd + "▩";
- model.makeValue("/root/send/mainsearchinfo", sSrchHeader + sSrchData);
- fInitNode(sSrchToolStatus);
- model.makeNode("/root/send/reqcensus");
-
- submit("TRMNE00103");
- fButtonSettion("A");
- model.refresh();
- }
- } else {
- return;
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출의사 삭제 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelCallDoc(xPathDelCallDoc, sDelCheckRow, sRows, sVisit, sBtnSet ){
- if(model.getValue(xPathDelCallDoc+"["+sRows+"]/main") == "Y"){
- messageBox("Main 진료과는 삭제할 수 없습니다.","E");
- return;
- }
-
- if(sRows== "1"){
- messageBox("삭제할 데이터가", "I004");
- return;
- } else {
- if(model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/status") == "I"){
- fDelGridRow(sVisit, sDelCheckRow );
- return;
- } else {
- if ( sDelCheckRow != null || sDelCheckRow != "" ){
- var vbYes = messageBox("데이터를 ", "Q001");
-
- if (vbYes == 6) {
- sPid = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/pid" );
- sIndd = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/indd" );
- sCretno = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/cretno" );
- sVisitno = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/visitno" );
- sInstcd = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/instcd" );
- sErorddoctcd = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/erorddoctcd");
- sCallno = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/callno" );
- sRefseq = model.getValue(xPathDelCallDoc+"["+sDelCheckRow+"]/refseq" );
-
- var sCallVisitSaveHeader = "status▦pid▦indd▦cretno▦visitno▦instcd▦erorddoctcd▦callno▦refseq▩";
-
- var sCallVisitSaveData = "D▦"
- + sPid +"▦" // 등록번호
- + sIndd +"▦" // 입원일자
- + sCretno +"▦"
- + sVisitno +"▦"
- + sInstcd +"▦"
- + sErorddoctcd +"▦"
- + sCallno +"▦"
- + sRefseq +"▩";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/calldocinfo", sCallVisitSaveHeader + sCallVisitSaveData);
- model.makeValue("/root/send/cond",sCallVisitSaveHeader + sCallVisitSaveData );
-
- if(sBtnSet != ""){
- fButtonSettion(sBtnSet);
- }
-
- submit("TXMNE00102");
- //model.refresh();
- fInputRefresh();
- //fDelGridRow(sVisit, sDelCheckRow );
-
- } else {
- return;
- }
- }
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출의사 삭제 부분(선택 그리드 row삭제)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDelGridRow(pFlag, pRow){
- if(pFlag == "0") {
- grd_calldoc1.deleteRow(pRow);
- } else if(pFlag == "1") {
- grd_calldoc2.deleteRow(pRow);
- } else if(pFlag == "2") {
- grd_calldoc3.deleteRow(pRow);
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 방문일지 수정 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetCallDoc(sNode1, sNode2, sNode3, sVisit, sBtnSet){
-
- xPathSetCallDoc = "/root/main/ercensusinfo/patinfo";
-
- if ( model.getValue(xPathSetCallDoc + sNode3) == "" ){
- messageBox("수정할 수 없습니다.", "E");
- return;
- }
-
- if( sVisit == "0" &&
- model.getValue(xPathSetCallDoc+ "/revisit1stattm") == "" &&
- model.getValue(xPathSetCallDoc+ "/revisit1") =="Y" ){
- messageBox("Revisit 저장을 먼저 실행하십시요","E");
- return;
- }
- if ( sVisit == "1" &&
- model.getValue(xPathSetCallDoc+ "/revisit2stattm") == "" &&
- model.getValue(xPathSetCallDoc+ "/revisit2") =="Y" ){
- messageBox("Revisit 저장을 먼저 실행하십시요","E");
- return;
- }
-
- var sPid = model.getValue(xPathSetCallDoc+"/pid" );
- var sIndd = model.getValue(xPathSetCallDoc+"/indd" );
- var sCretno = model.getValue(xPathSetCallDoc+"/cretno");
- var sVisitno = sVisit;
- // 입력 필드(ER방문일지)
- sChosdd = model.getValue(xPathSetCallDoc+sNode1);
- sChostm = model.getValue(xPathSetCallDoc+sNode2);
-
- var sCallVisitSaveHeader = "stat▦pid▦indd▦cretno▦visitno▦chosdd▦chostm▩";
-
- var sCallVisitSaveData = "U▦"
- + sPid +"▦" // 등록번호
- + sIndd +"▦" // 입원일자
- + sCretno +"▦"
- + sVisitno +"▦"
- + sChosdd +"▦"
- + sChostm +"▩";
- model.removenode("/root/send");
- model.makeValue("/root/send/chosinfo", sCallVisitSaveHeader + sCallVisitSaveData);
-
- //fGridUpdateSeleced(sVisit);
-
- model.makeValue("/root/send/cond",sCallVisitSaveHeader + sCallVisitSaveData );
- if(sBtnSet != ""){
- fButtonSettion(sBtnSet);
- }
-
- submit("TXMNE00102");
- fInputRefresh();
- fGridRebuild(sVisit);
-
- //---------------------------------------------------------------------------------
- //최초 입실 기록이 없을 경우 간호기록을 발생시킨다. 2013.10.22 KJS
- var sRecdt = sChosdd + sChostm.substr(0, 4);
- model.removenode("/root/send/recinfo");
- model.makeValue("/root/send/recinfo/pid", sPid);
- model.makeValue("/root/send/recinfo/indd", sIndd);
- model.makeValue("/root/send/recinfo/cretno", sCretno);
- model.makeValue("/root/send/recinfo/recdt", sRecdt);
-
- if (submit("TRMNE00112")) {
- var reccnt = model.getValue("/root/init/recinfo/recinfo/reccnt");
- var bedpos = model.getValue("/root/main/ercensusinfo/patinfo/bedposflagcd").substr(0, 3);
- if (reccnt == 0) {
- fSetNrRecord ("new", "", bedpos, sRecdt);
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 방문일지 저장 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveCallDoc(sNode1, sNode2, sNode3, sVisit, sBtnSet){
- xPathSaveCallDoc = "/root/main/ercensusinfo/patinfo";
-
- if( sVisit == "0" &&
- model.getValue(xPathSaveCallDoc+ "/revisit1stattm") == "" &&
- model.getValue(xPathSaveCallDoc+ "/revisit1") =="Y" ){
- messageBox("Revisit 저장을 먼저 실행하십시요","E");
- return;
- }
- if ( sVisit == "1" &&
- model.getValue(xPathSaveCallDoc+ "/revisit2stattm") == "" &&
- model.getValue(xPathSaveCallDoc+ "/revisit2") =="Y" ){
- messageBox("Revisit 저장을 먼저 실행하십시요","E");
- return;
- }
-
-
- var sPid = model.getValue(xPathSaveCallDoc+"/pid" );
- var sIndd = model.getValue(xPathSaveCallDoc+"/indd" );
- var sCretno = model.getValue(xPathSaveCallDoc+"/cretno");
- var sVisitno = sVisit;
- // 입력 필드(ER방문일지)
- sChosdd = model.getValue(xPathSaveCallDoc+sNode1);
- sChostm = model.getValue(xPathSaveCallDoc+sNode2);
-
- var sChosddCheck = model.getValue(xPathSaveCallDoc+sNode1);
- if ( sChosddCheck == null || sChosddCheck == "" ){
- messageBox("내원일시는", "I003");
- if ( sVisitno == "0"){
- model.setFocus("int_chosdd1");
- }else if ( sVisitno == "1"){
- model.setFocus("int_chosdd2");
- }else if ( sVisitno == "2"){
- model.setFocus("int_chosdd3");
- }
- return;
- }
-
- if(sVisit == "1"){
- var outrmdt = model.getValue("/root/main/ercensusinfo/patinfo/outrmdt");
- var rechosdt = model.getValue("/root/main/ercensusinfo/patinfo/revisit1chosdd")
- + model.getValue("/root/main/ercensusinfo/patinfo/revisit1chostm") ;
- if( outrmdt > rechosdt ){
- messageBox("내원일시가 이전 방문 퇴실일시 보다 이전입니다. \n내원일시를 정확하게 입력하십시요","I");
- model.setFocus("int_chosdd2");
- return;
- }
- }
-
- if(sVisit == "2"){
- var outrmdt = model.getValue("/root/main/ercensusinfo/patinfo/revisit1outrmdt");
- var rechosdt = model.getValue("/root/main/ercensusinfo/patinfo/revisit2chosdd")
- + model.getValue("/root/main/ercensusinfo/patinfo/revisit2chostm") ;
- if( outrmdt > rechosdt ){
- messageBox("내원일시가 이전 방문 퇴실일시 보다 이전입니다. \n내원일시를 정확하게 입력하십시요","I");
- model.setFocus("int_chosdd3");
- return;
- }
- }
-
-
- model.removenode("/root/send");
- var sCallVisitSaveHeader = "stat▦pid▦indd▦cretno▦visitno▦chosdd▦chostm▩";
-
- var sCallVisitSaveData = "I▦"
- + sPid +"▦" // 등록번호
- + sIndd +"▦" // 입원일자
- + sCretno +"▦"
- + sVisitno +"▦"
- + sChosdd +"▦"
- + sChostm +"▩";
-
- if ( model.getValue(xPathSaveCallDoc+sNode1) != "" ) {
- if(model.getValue(xPathSaveCallDoc+sNode3) == "" ) {
- model.makeValue("/root/send/chosinfo", sCallVisitSaveHeader + sCallVisitSaveData);
- }
- }
-
- //fGridUpdateSeleced(sVisit);
- model.makeValue("/root/send/cond",sCallVisitSaveHeader + sCallVisitSaveData );
- var chkStattm = model.getValue(xPathSaveCallDoc + sNode3);
-
- if(submit("TXMNE00102") == true ){
-
- // Revisit의 경우에 OLDOUTRMDD, TM을 Update해준다. 2012.07.27 KJS
- if(sVisit != "0"){
- submit("TXMNE00105");
- }
-
- if ( model.getValue("/root/main/cond/indschacptstat") == "2" && chkStattm == "" ){
- //20110225 이선경 경북대 : 응급실 구역 멀티체크
- var rendcd=model.getValue("/root/main/cond/section");
- var chkdata=checkbox1.value;
- var rendcdlist=rendcd.split(" ");
- if (chkdata.substr(0,1) != "-") {
- if (rendcd.length>0) {
- for (var i=0; i<rendcdlist.length;i++) {
- rendcd=rendcd.replace(" ","','");
- }
- rendcd="('" + rendcd + "')";
- }
- } else {
- rendcd = "-";
- }
- var sSrchHeader = "flag▦orddept▦orddrid▦section▩";
- var sSrchData = model.getValue("/root/main/cond/indschacptstat") +"▦"
- + model.getValue("/root/main/cond/orddeptcd") +"▦"
- + model.getValue("/root/main/cond/medispclid") +"▦"
- //+ model.getValue("/root/main/cond/section") +"▩";
- + rendcd + "▩";
-
- fInitNode(sSrchToolStatus);
- model.makeValue("/root/send/mainsearchinfo", sSrchHeader + sSrchData);
- model.makeNode("/root/send/reqcensus");
- submit("TRMNE00103");
- }
- }
-
- if(sBtnSet != ""){
- fButtonSettion(sBtnSet);
- }
-
- fInputRefresh();
- fGridRebuild(sVisit);
-
- //---------------------------------------------------------------------------------
- //최초 입실 기록이 없을 경우 간호기록을 발생시킨다. 2013.10.22 KJS
- var sRecdt = sChosdd + sChostm.substr(0, 4);
- model.removenode("/root/send/recinfo");
- model.makeValue("/root/send/recinfo/pid", sPid);
- model.makeValue("/root/send/recinfo/indd", sIndd);
- model.makeValue("/root/send/recinfo/cretno", sCretno);
- model.makeValue("/root/send/recinfo/recdt", sRecdt);
-
- if (submit("TRMNE00112")) {
- var reccnt = model.getValue("/root/init/recinfo/recinfo/reccnt");
- var bedpos = model.getValue("/root/main/ercensusinfo/patinfo/bedposflagcd").substr(0, 3);
- if (reccnt == 0) {
- fSetNrRecord ("new", "", bedpos, sRecdt);
- }
- }
-
- }
-
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출의사 수정 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGridUpdateSeleced(pFlag){
- var checkvalue = "I";
- if(pFlag == "0"){
- var rRow1 = grd_calldoc1.rows;
- for(i=1 ; i < rRow1 ; i ++ ) {
- if(model.getValue("/root/main/ercensusinfo/erorddrlist["+ i +"]/status") == "S"){
- checkvalue = "S";
- }
- }
-
- if(checkvalue == "I"){
- if(rRow1 != 1) {
- for(i=1 ; i < rRow1 ; i++){
- model.setValue("/root/main/ercensusinfo/erorddrlist["+ i +"]/refseq", i);
- }
- }
- }
-
- model.makeValue("/root/send/calldocinfo", grd_calldoc1.getUpdateDataAll("i"));
-
- } else if(pFlag == "1"){
- var rRow2 = grd_calldoc2.rows;
- for(i=1 ; i < rRow2 ; i ++ ) {
- if(model.getValue("/root/main/ercensusinfo/erorddrlist1["+ i +"]/status") == "S"){
- checkvalue = "S";
- }
- }
- if(checkvalue == "I"){
- if(rRow2 != 1) {
- for(i=1 ; i < rRow2 ; i++){
- model.setValue("/root/main/ercensusinfo/erorddrlist1["+ i +"]/refseq", i);
- }
- }
- }
- model.makeValue("/root/send/calldocinfo", grd_calldoc2.getUpdateDataAll("i"));
-
- } else if(pFlag == "2"){
- var rRow3 = grd_calldoc3.rows;
- for(i=1 ; i < rRow3 ; i ++ ) {
- if(model.getValue("/root/main/ercensusinfo/erorddrlist2["+ i +"]/status") == "S"){
- checkvalue = "S";
- }
- }
- if(checkvalue == "I"){
- if(rRow3 != 1) {
- for(i=1 ; i < rRow3 ; i++){
- model.setValue("/root/main/ercensusinfo/erorddrlist2["+ i +"]/refseq", i);
- }
- }
- }
- model.makeValue("/root/send/calldocinfo", grd_calldoc3.getUpdateDataAll("i"));
- }
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출의사 그리드 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGridRebuild(pFlag){
- if(pFlag == "0"){
- grd_calldoc1.rebuild();
- } else if(pFlag == "1"){
- grd_calldoc2.rebuild();
- } else if(pFlag == "2"){
- grd_calldoc3.rebuild();
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Revisit 설정 부분 처리
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fRevisitSeting(sPath1, sNode1, sNode2, sVisit){
- model.removeNodeset("/root/temp/calldoclist/calldocinfo");
- xPathRevisitSeting = "/root/main/ercensusinfo/patinfo";
-
- if(model.getValue("/root/main/cond/indschacptstat") == "3"){
- messageBox("퇴원환자는 Revisit 처리를", "E001");
- model.setValue(xPathRevisitSeting+sNode2, "N");
- if(sVisit == "1"){
- chk_revisit1.refresh();
- }else if (sVisit == "2"){
- chk_revisit2.refresh();
- }
- return;
- }
- var sPid = model.getValue(xPathRevisitSeting+"/pid" ); // 등록번호
- var sIndd = model.getValue(xPathRevisitSeting+"/indd" ); // 입원일자
- var sCretno = model.getValue(xPathRevisitSeting+"/cretno"); // 생성번호
- var sVistno = sVisit;
- var sOutrmdt = model.getValue(xPathRevisitSeting+sNode1);
- var sCensusInfoHeader = "pid▦indd▦cretno▦visitno▦outrmdt▩"
-
- var sCancelData = sPid + "▦"
- + sIndd + "▦"
- + sCretno + "▦"
- + sVistno + "▦"
- + sOutrmdt + "▩";
-
- //byCY Revisit환자 처리시 당일로 Blocking
- var sRevisitdd = getCurrentDate(); //현재일자
- var sOutrmdd = sOutrmdt.substr(0,8); //퇴원일자
- if(sRevisitdd != sOutrmdd) {
- chk_revisit1.value = 'N';
- chk_revisit1.refresh();
- messageBox("퇴원일이 당일인 경우만 REVISIT처리 가능합니다.", "I");
- return;
- }
- //byCY
-
- if( model.getValue(xPathRevisitSeting + sNode2) == "Y" ) {
-
- var vbYes = messageBox("Revisit 처리를 ", "Q004");
-
- if(vbYes == 6){
- model.removenode("/root/send");
- model.makeValue("/root/send/serchcalldoc",sCensusInfoHeader + sCancelData );
-
- if(submit("TRMNE00106") == true ){
-
- for(i=0 ; i < getNodesetCount("/root/temp/calldoclist/calldocinfo") ; i++){
- model.makeNode(sPath1+"["+(i+1)+"]");
- model.copyNode(sPath1+"["+(i+1)+"]","/root/temp/calldoclist/calldocinfo["+(i+1)+"]");
- }
- model.refresh();
-
- if(sVisit == "1"){
- int_chosdd2.value = getCurrentDate();
- int_chostm2.value = getCurrentTime().substr(0,4) ;
- int_chosdd2.disabled = false;
- int_chostm2.disabled = false;
- btn_addrow2.disabled = false;
- btn_delrow2.disabled = false;
- btn_introw2.disabled = false;
- btn_updtrow2.disabled = false;
- btn_saverow2.disabled = false;
- } else if (sVisit == "2"){
- int_chosdd3.value = getCurrentDate();
- int_chostm3.value = getCurrentTime().substr(0,4) ;
- int_chosdd3.disabled = false;
- int_chostm3.disabled = false;
- btn_introw3.disabled = false;
- btn_delrow3.disabled = false;
- btn_addrow3.disabled = false;
- btn_saverow3.disabled = false;
- btn_updtrow3.disabled = false;
- }
-
- } else {
- model.setValue(xPathRevisitSeting+sNode2, "N");
- if(sVisit == "1"){
- chk_revisit1.refresh();
- }else if (sVisit == "2"){
- chk_revisit2.refresh();
- }
- return;
- }
- } else {
- model.setValue(xPathRevisitSeting+sNode2, "N");
- if(sVisit == "1"){
- chk_revisit1.refresh();
- }else if (sVisit == "2"){
- chk_revisit2.refresh();
- }
- return;
- }
-
- } else {
-
- if( (sVisit == "1" && model.getValue("/root/main/ercensusinfo/patinfo/revisit1stattm") != "") ||
- (sVisit == "2" && model.getValue("/root/main/ercensusinfo/patinfo/revisit2stattm") != "") ){
- messageBox("Revisit 취소 처리를", "E001");
- return;
- }
-
- var vbYes = messageBox("Revisit 취소 처리를 ", "Q004");
-
- if(vbYes == 6){
- model.removenode(sPath1);
-
- if(sVisit == "1"){
- int_chosdd2.value = "";
- int_chostm2.value = "";
-
- int_chosdd2.disabled = true;
- int_chostm2.disabled = true;
- btn_addrow2.disabled = true;
- btn_delrow2.disabled = true;
- btn_introw2.disabled = true;
- btn_updtrow2.disabled = true;
- btn_saverow2.disabled = true;
-
- }
-
- if (sVisit == "2"){
- int_chosdd3.value = "";
- int_chostm3.value = "";
-
- int_chosdd3.disabled = true;
- int_chostm3.disabled = true;
- btn_introw3.disabled = true;
- btn_delrow3.disabled = true;
- btn_addrow3.disabled = true;
- btn_saverow3.disabled = true;
- btn_updtrow3.disabled = true;
- }
- } else {
- model.setValue(xPathRevisitSeting + sNode2, "Y");
- if(sVisit == "1"){
- chk_revisit1.refresh();
- }else if (sVisit == "2"){
- chk_revisit2.refresh();
- }
- return;
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출의사 Call, Visit Time 제한
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCallVisitTimeSet(pPath, pNode, pRow){
- var crtDate = getCurrentDate();
- var chkop = "D";
- var chkDate = model.getValue(pPath + "["+pRow+"]" + pNode).substr(0,8) ;
- var chkTime = model.getValue(pPath + "["+pRow+"]" + pNode).substr(8,4) ;
-
- if(isValidDateTime(chkDate, "YYYYMMDD") == false){
- chkop = "C";
- model.setValue(pPath + "["+pRow+"]" + pNode, crtDate +""+ chkTime);
- messageBox("기록 일자가 유효하지","E007");
- }
- if(isValidDateTime(chkTime, "hhmm") == false){
- if(chkop== "C"){
- model.setValue(pPath + "["+pRow+"]" + pNode, crtDate + "" + getCurrentTime.substr(0,4));
- }else{
- model.setValue(pPath + "["+pRow+"]" + pNode, chkDate + "" + getCurrentTime.substr(0,4));
- }
- messageBox("기록 시간이 유효하지","E007");
- }
- }
-
- /**
- * @group :
- * @ver : 2007.07.03
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 주진료과 변경 부분
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChangMainOdrdept(xPathChangeRow, pRow, pVisitno){
- var chgrow = "";
- j =0;
-
- if( (pVisitno == "0" && model.getValue("/root/main/ercensusinfo/patinfo/stattm" ) == "" ) ||
- (pVisitno == "1" && model.getValue("/root/main/ercensusinfo/patinfo/revisit1stattm") == "" ) ||
- (pVisitno == "2" && model.getValue("/root/main/ercensusinfo/patinfo/revisit2stattm") == "" ) ){
- messageBox("내원 일시를 먼저 저장하십시요","E");
- return;
- }
- if(getNodesetCount(xPathChangeRow) == 1){
- messageBox("메인 진료과 취소를 할 수 없습니다.","E");
- model.setValue(xPathChangeRow+"["+ pRow +"]/mainyn", "M");
- return;
- }
-
- for(i=1 ; i <= getNodesetCount(xPathChangeRow) ; i++){
- if(model.getValue(xPathChangeRow+"["+i+"]/mainyn") == "M" ){
- j = j + 1;
- }
- }
-
- if(j == 0){
- messageBox("메인 진료과는 반드시 존재해야 합니다.","E");
- model.setValue(xPathChangeRow+"["+ pRow +"]/mainyn", "M");
- return;
- }
-
- //진료 변경 부분
- if( j > 1){
- var vbYes = messageBox("메인 진료과 변경을 ", "Q004");
- if(vbYes == 6){
- for(i=1 ; i <= getNodesetCount(xPathChangeRow) ; i++){
- if(model.getValue(xPathChangeRow+"["+i+"]/mainyn") == "M" && i != pRow){
- chgrow = i;
- model.setValue(xPathChangeRow+"["+i+"]/mainyn","S");
- }
- }
- model.setValue(xPathChangeRow+"["+pRow+"]/mainyn" , "M" );
- }else{
- model.setValue(xPathChangeRow+"["+pRow+"]/mainyn" , "S" );
- return;
- }
- }
-
- //수정 전 주진료과 상태 변경
- if(chgrow != ""){
- var sStatus = "";
- var sStatus = model.getValue(xPathChangeRow+"["+chgrow+"]/status");
- if( sStatus == "S" ){
- model.setValue(xPathChangeRow+"["+chgrow+"]/status", "U");
- }
- }
-
- //수정 후 주진료과 상태 변경
- var sStatus = "";
- var sStatus = model.getValue(xPathChangeRow+"["+pRow+"]/status");
- if( sStatus == "S" ){
- model.setValue(xPathChangeRow+"["+pRow+"]/status", "U");
- }
-
- if(pVisitno == "0"){
- model.makeValue("/root/send/calldocinfo", grd_calldoc1.getUpdateDataAll("i"));
- }
- if(pVisitno == "1"){
- model.makeValue("/root/send/calldocinfo", grd_calldoc2.getUpdateDataAll("i"));
- }
- if(pVisitno == "2"){
- model.makeValue("/root/send/calldocinfo", grd_calldoc3.getUpdateDataAll("i"));
- }
-
- if( submit("TXMNE00104") ){
- fSearchPatienInfo("refresh");
- }
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출의사 그리드 상태 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChangeStatus(xPathChangeRow, pRow){
-
- //수정 후 주진료과 상태 변경
- var sStatus = "";
- var sStatus = model.getValue(xPathChangeRow+"["+pRow+"]/status");
- if( sStatus == "S" ){
- model.setValue(xPathChangeRow+"["+pRow+"]/status", "U");
- }
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 상단 정보 이용 환자 선택
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetParamSetting(){
- var chkPid = getPatientInfo("pid");
- var iTgPatRow = 0;
-
- if(chkPid != ""){
- var iRow = grd_patlist.rows;
-
- if(iRow == "1"){
- return;
- }else{
- for( i =0 ; i < iRow ; i++ ){
- iTgPatRow = grd_patlist.findRow(chkPid ,1,1,true,true);
- }
- }
- }
- if(iTgPatRow > 0){
- grd_patlist.row = iTgPatRow;
- grd_patlist.topRow = iTgPatRow;
- fSearchPatienInfo(sSrchToolStatus);
- }
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 내원일자 체크
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChosdtChk(pFlag, pData){
- var crtDate = getCurrentDate();
- var crtTime = getCurrentTime().substr(0,4);
- var sChkEndData = "";
-
- if(pFlag =="D"){
- if(isValidDateTime(pData, "YYYYMMDD") == false){
- sChkEndData = crtDate;
- messageBox("입력한 내원 일자가 유효하지","E007");
- }else{
- sChkEndData = pData;
- }
- }
-
- if(pFlag =="T"){
- if(isValidDateTime(pData, "hhmm") == false){
- sChkEndData = crtTime;
- messageBox("입력한 내원 시간이 유효하지","E007");
- }else{
- sChkEndData = pData;
- }
- }
-
- return sChkEndData;
- }
- /**
- * @group :
- * @ver : 2007.06.07
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 담당의 부분 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fShowPopupMenu(gridID, menuPath)
- {
- var gridObj = document.controls.item(gridID);
-
- if(event.button == 3) {
- if(gridObj.isCell(event.target) && gridObj.mouseRow >= gridObj.fixedrows){
- window.setPopupMenu(true, menuPath, "name", "func", false);
- }else{
- window.setPopupMenu(false);
- }
- }
- }
- /* ------------------------------------------------- */
- /* desc : 선택 NODE 하위의 내용을 CLEAR한다. */
- /* return : */
- /* -------------------------------------------------- */
- function fClearChildNodeSet(pNode){
-
- var nLen = instance1.selectSingleNode(pNode).childNodes.length;
- var xNode = instance1.selectSingleNode(pNode);
-
- for (var i=0;i<nLen; i++){
- xNode.childNodes(i).text = '';
- }
- }
-
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 투약기록 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDrugRecPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMMNR00600","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 응급실 퇴실정리 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fEROutPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMMNE00200","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 차트대출신청 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChartPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- //open("SPMRC01500","1","15","128");
- open("SMMRC00300","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 통합검사결과조회 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTestResultPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMAER00800","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 간호처방 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fNursPrcpPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMMNW10900","1","15","128"); // 차후 결정
- //open("SMMNW01000","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 병동채혈관리 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInBCollMngtPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMLLC00200","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Name Label출력 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fNameLabelPopup(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMAER00800","1","15","128");
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 담당의 프로필보기 화면 팝업 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAtdoctlist(){
- setParameter("atdoctid",model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/atdocid"));
- setParameter("orddd",model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/indd"));
- var left = event.screenX;
- var top = event.screenY;
- modal("SPMNW11300",1,left,top);
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 메세지 보내기 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendMessage(){
- model.removeNodeset("/root/main_om/temp/atdoctlist");
- model.removenode("/root/send");
- model.makeValue("/root/send/atdoctid", model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/atdocid"));
- model.makeValue("/root/send/orddd", getCurrentDate());
- model.makeValue("/root/send/deptcd", model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/deptcd"));
- submit("TRMNW00202");
- var nodecnts = getNodesetCount("/root/main_om/temp/atdoctlist") ;
- if( nodecnts < 1){
- messageBox('담당의 정보가 ', 'I004');
- return;
- }
- model.setValue("/root/main_om/temp/atdoctlist/calltype","msg");
- model.setValue("/root/main_om/temp/atdoctlist/msgcnts","응급의료센터 호출");
- zmifOpenUserMessagePopup("/root/main_om/temp/atdoctlist", event.ScreenX, event.ScreenY);
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 호출 설정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSendCall(){
- model.removeNodeset("/root/main_om/temp/atdoctlist");
- model.removenode("/root/send");
- model.makeValue("/root/send/atdoctid", model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/atdocid"));
- model.makeValue("/root/send/orddd", getCurrentDate());
- model.makeValue("/root/send/deptcd", model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/deptcd"));
- submit("TRMNW00202");
- if(getNodesetCount("/root/main_om/temp/atdoctlist") < 1){
- messageBox('담당의 정보가 ', 'I004');
- return;
- }
- model.setValue("/root/main_om/temp/atdoctlist/calltype","call");
- model.setValue("/root/main_om/temp/atdoctlist/msgcnts","응급의료센터 호출");
- zmifOpenUserMessagePopup("/root/main_om/temp/atdoctlist", event.ScreenX, event.ScreenY);
- }
- /**
- * @group :
- * @ver : 2008.01.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 라벨 출력
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOpenLabelPrint(){
- /* 20090116(ByJA)
- pid = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/pid");
- patnm = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/patnm");
- sexage = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/grdrage");
- rgstno = model.getValue("/root/main/nursemainlist/nursemaininfo["+nursemaininfo.row+"]/rgstno");
- orddd = getCurrentDate();
- */
- model.setValue("/root/printcnt", LabelPntCnt);
-
- /* 20090116(ByJA)
- scrnid = "SMMNR00600";
- // barcdRef = "/root/barcdprntsetup/prntsetupinfo/setupinfo"; // 원본_20090106(ByJA)
- barcdRef = "/root/main/barcdprntsetup/prntsetupinfo/setupinfo"; // 수정_20090106(ByJA)
- */
-
- //group10.attribute("left") = event.ScreenX - 30;
- //group10.attribute("top") = event.ScreenY - 290;
- model.setFocus("ipt_patcntctel");
- model.refresh();
- group10.visible = true;
- }
- /**
- * @group :
- * @ver : 2009.07.15
- * @by : 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 임상관찰기록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClinicObserRec(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMMNR00900","1","15","128");
- }
- /**
- * @group :
- * @ver : 2009.07.15
- * @by : 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자진료정보조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOpenPrcpSpec(){
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("nm");
- }
-
- open("SMMMO02500","1","15","128");
- }
- /**
- * @group :
- * @ver : 2009.08.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 응급실 환자 메모 삽입
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fErPatInsmemo(){
- var insMemoRow = nursemaininfo.row;
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/censusck") == "Y"){
- messageBox("입실저장을 하지 않은 환자는 Memo를 저장 및 수정을 할 수 없습니다.","I");
- return;
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/memo") == "Y"){
- messageBox("Memo가 이미 등록되어 있습니다.","I");
- return;
- }
-
- var insMemoPid = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/pid" );
- var insMemoIndd = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/indd" );
- var insMemoCretno = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/cretno" );
- var insMemoVisitno = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/visitno" );
- var insMemoStatus = "U";
-
- setParameter("pid" , insMemoPid );
- setParameter("indd" , insMemoIndd );
- setParameter("cretno" , insMemoCretno );
- setParameter("visitno" , insMemoVisitno );
- setParameter("status" , insMemoStatus );
- modal("SPMNE07600", 1, 200, 100);
- }
- /**
- * @group :
- * @ver : 2009.08.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 응급실 환자 메모 편집
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fErPatSetmemo(){
- var insMemoRow = nursemaininfo.row;
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/censusck") == "Y"){
- messageBox("입실저장을 하지 않은 환자는 Memo를 저장 및 수정을 할 수 없습니다.","I");
- return;
- }
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/memo") != "Y"){
- messageBox("등록된 Memo가 없습니다.","I");
- return;
- }
-
- var insMemoPid = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/pid" );
- var insMemoIndd = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/indd" );
- var insMemoCretno = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/cretno" );
- var insMemoVisitno = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/visitno" );
- var insMemoStatus = "U";
-
- setParameter("pid" , insMemoPid );
- setParameter("indd" , insMemoIndd );
- setParameter("cretno" , insMemoCretno );
- setParameter("visitno" , insMemoVisitno );
- setParameter("status" , insMemoStatus );
- modal("SPMNE07600", 1, 200, 100);
- }
- /**
- * @group :
- * @ver : 2009.08.17
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 응급실 환자 메모 삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fErPatDelmemo(){
- var insMemoRow = nursemaininfo.row;
-
- if(model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/memo") != "Y"){
- messageBox("등록된 Memo가 없습니다.","I");
- return;
- }
-
- var insMemoPid = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/pid" );
- var insMemoIndd = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/indd" );
- var insMemoCretno = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/cretno" );
- var insMemoVisitno = model.getValue("/root/main/nursemainlist/nursemaininfo[" + insMemoRow + "]/visitno" );
- var insMemoStatus = "D";
-
- model.removenode("/root/send");
- model.makeValue("/root/send/pid" , insMemoPid );
- model.makeValue("/root/send/indd" , insMemoIndd );
- model.makeValue("/root/send/cretno" , insMemoCretno );
- model.makeValue("/root/send/visitno" , insMemoVisitno );
- model.makeValue("/root/send/status" , insMemoStatus );
- submit("TXMNE07601", false);
- fSeletedSrcTool();
- }
- function ErreqOrderInfoOfCol(scrnid, grdid, compscd){
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/scrnid" , scrnid);
- model.makeValue("/root/send/reqdata/compscd" , compscd);
- if(submit("TRMNB02401", false)){
- var refdata = model.getValue("/root/init/userscrnenvinfo/gridseq/compsrefcnts");
- var sizedata = model.getValue("/root/init/userscrnenvinfo/gridseq/compssizecnts");
-
- if(refdata != "" || sizedata != ""){
- ErsetOrderInfoOfCol(grdid , refdata, sizedata);
- }
- }
- }
-
- function ErsetOrderInfoOfCol(grdID, refdata, sizedata){
- var grdObj = document.controls.item(grdID);
- var refArray = refdata.split("^");
- var sizeArray = sizedata.split("^");
- for(var i = 0; i < refArray.length; i++){
- var colcnt = grdObj.colref("" + refArray[i] + "");
- if (colcnt <0 ) colcnt = 0;
- // 이동 컬럼과 대상컬럼의 인덱스가 같지 않은 경우만 이동.
- if (colcnt != i) {
- grdObj.colMove(i, colcnt, "before", false);
- }
- var size = sizeArray[i];
- if(size == 0){ // size of column 0 -> hidden
- grdObj.colHidden(i) = true;
- }else{
- grdObj.colHidden(i) = false;
- }
- grdObj.colWidth(i) = eval(size);
-
- }
- model.refresh();
- }
-
- //-----------------(20101018) 경북대
- //카덱스 오픈
- function fOpenCardex()
- {
- //fSetPatInfo();
-
-
- if(btn_ordermngmv.selected == true) {
- fSetPatInfo();
- }else{
- fSetParam("ec");
- }
-
- fSearchPatienInfo(sSrchToolStatus);
- open("SMMNB00200","1","20","128");
- }
-
- //20110208_KNUH_Start
- function fPrtVital() {
- if(nursemaininfo.rows < 1) {
- messageBox("Vital Sign을 출력할 정보가 존재하지 않습니다.", "E");
- return;
- } else {
- model.makeValue("/root/main/cond/wardnm", getUserInfo("dutplcenm"));
- exeReportPreview("RPMNE00130", "XMLSTR", "", "","true","","","","","true");
- }
- }
-
- //20111125_환자메모_응급실 허광자 선생님 요청.
- function fPatMemo() {
-
- var pid = "";
- var hngnm = "";
- var orddeptcd = "" ;
-
- if(btn_ordermngmv.selected == true) {
- pid = grd_ompatlist.valueMatrix(grd_ompatlist.row,grd_ompatlist.colRef("pid"));
- hngnm = grd_ompatlist.valueMatrix(grd_ompatlist.row,grd_ompatlist.colRef("patnm"));
- orddeptcd = grd_ompatlist.valueMatrix(grd_ompatlist.row,grd_ompatlist.colRef("orddeptcd"));
- }else{
- pid = nursemaininfo.valueMatrix(nursemaininfo.row,nursemaininfo.colRef("pid"));
- hngnm = nursemaininfo.valueMatrix(nursemaininfo.row,nursemaininfo.colRef("patnm"));
- orddeptcd = nursemaininfo.valueMatrix(nursemaininfo.row,nursemaininfo.colRef("deptcd"));
- }
- setParameter("SPMNO02300_PARM", pid + "▦" + hngnm + "▦" + orddeptcd);
- modal("../../../emr/outcareweb/xrw/SPMNO02300", "","", "", "SPMNO02300", "", "");
- }
- //병동간호의 상단올리는 기능이나 응급간호의 상단올리는 기능으로 사용
- //Nurse Main /Order Manage에서 상단환자정보세팅하기
- // function fSetPatInfo()
- // {
- // // 상단 세팅을 위한 파라미터
- // if(btn_om.selected == true) {
- // if (model.getValue("/root/main_om/cond/unitflag") == "emc") {
- // var param = "E▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- // + "▦" ;
- // setParameter("condparam", param);
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- // } else if (model.getValue("/root/main_om/cond/unitflag") == "dsc") {
- // //------------(20071114)
- // if (model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oprsrvno") != "") {
- // var param = "T" + "▦" // 01 O:외래, I:입원구분, T:수술예약
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid") + "▦" // 02 등록번호
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/opcnfmdd") + "▦" // 03 수술시작일자
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno") + "▦" // 04 cretno(없는 경우 ""로 처리)
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd") + "▦" // 05 기관코드
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdeptcd") + "▦" // 06 집도과부서
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdrid") + "▦" // 07 집도의ID
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oppatflagcd") + "▦"
- // + "F" + "▦"
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oprsrvno") + "▦"
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/ophistno") + "▦"
- // + model.getValue("/root/main/cond/orddd")+ "▦" ;
- // } else {
- // var param = "I" + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- // }
- // //------------
- // setParameter("condparam", param);
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- //
- // } else if (model.getValue("/root/main_om/cond/unitflag") == "chemo") {
- // //------------(20071114)
- // condparam = "I"+ "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- // + "▦" + model.getValue("/root/main/cond/orddd");
- // //------------
- // setParameter("condparam", condparam);
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- // } else if (model.getValue("/root/main_om/cond/unitflag") == "op") {
- // var param = "T" + "▦" // 01 O:외래, I:입원구분, T:수술예약
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid") + "▦" // 02 등록번호
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/opcnfmdd") + "▦" // 03 수술시작일자
- // + "▦" // 04 cretno(없는 경우 ""로 처리)
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd") + "▦" // 05 기관코드
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdeptcd") + "▦" // 06 집도과부서
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdrid") + "▦" // 07 집도의ID
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oppatflagcd") + "▦"
- // + "F" + "▦"
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oprsrvno") + "▦"
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/ophistno") + "▦"
- // + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/opcnfmdd") + "▦" ;
- //
- // setParameter("condparam", param);
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- // } else if (model.getValue("/root/main_om/cond/unitflag") == "apu") {
- // condparam = "I"+ "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- // + "▦" + model.getValue("/root/main/cond/orddd");
- // setParameter("condparam", condparam);
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- //
- // } else {
- // condparam = "I"+ "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- // + "▦" + model.getValue("/root/main/cond/orddd");
- //
- // setParameter("condparam", condparam);
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- // }
- // } else {
- // condparam = "I"+ "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
- // + "▦" + model.getValue("/root/main/cond/orddd");
- //
- // setParameter("condparam", condparam);
- //
- // //상단 세팅 화면 사이즈 작게 띄움
- // modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- // /*
- // var indschacptstat = model.getValue("/root/main/cond/indschacptstat");
- // if(indschacptstat == "1" || indschacptstat == "3"){ // 조회조건이 재원,퇴원진행 일 경우
- // condparam = "I"+ "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
- // + "▦" + getCurrentDate();
- // }else{
- // condparam = "I"+ "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
- // + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
- // + "▦" + model.getValue("/root/main/cond/orddd");
- // }
- // */
- //
- // }
- // }
- //
- //-----------------(20101018) 경북대
- //--------------(20101226) 경북대
- //환자이름표출력
- function fOpenNamePrint(){
-
- if(btn_ordermngmv.selected == true) { // OrderManage 에서 호출
- group23.visible = true;
- } else {
- group5.visible = true;
- }
- }
-
- //정보호출
- function fGetPatName() {
-
- var instcd = getUserInfo("dutplceinstcd");
-
- if(btn_ordermngmv.selected == true) { // OrderManage 에서 호출
-
- var row_om = grd_ompatlist.row;
-
- if (row_om >= 1) {
- var pid = model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+row_om+"]/pid");
- var wardcd = model.getValue("/root/main/cond/wardcd");
- model.removenode("/root/send");
-
- model.makeValue("/root/send/patnameinfo/pid", pid);
- model.makeValue("/root/send/patnameinfo/wardcd", wardcd);
- submit("TRMNE00110");
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/temp2");
- model.makeNode("/root/send/temp2/patnamelist");
- model.makeNode("/root/send/temp2/patnamelist/method");
-
- model.copyNode("/root/send/temp2/patnamelist", "/root/main_nm/temp2/patnamelist");
- model.makeNode("/root/send/temp2/patnamelist/method");
- model.setValue("/root/send/temp2/patnamelist/method", model.getValue("/root/main_om/method"));
-
- if(instcd == '031') {
- exeReportPreview("RPMNE00111", "XMLSTR"); //미리보기출력(본원)
- } else {
- exeReportPreview("RPMNE00110", "XMLSTR"); //미리보기출력(칠곡)
- }
-
- //exeReportPreview("RPMNR06302", "XMLSTR", "/root/main/prtinfo", "", "true", "", "", "", "", "", "", "grp_report"); //미리보기 없이 출력
- }
- }else { // NurseMain 에서 호출
-
- var row_nr = nursemaininfo.row;
-
- if (row_nr >= 1) {
- var pid = model.getValue("/root/main/nursemainlist/nursemaininfo["+row_nr+"]/pid");
- var wardcd = model.getValue("/root/main/cond/wardcd");
- model.removenode("/root/send");
- model.makeValue("/root/send/patnameinfo/pid", pid);
- model.makeValue("/root/send/patnameinfo/wardcd", wardcd);
- submit("TRMNE00110");
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send/temp2");
- model.makeNode("/root/send/temp2/patnamelist");
- model.makeNode("/root/send/temp2/patnamelist/method");
-
- model.copyNode("/root/send/temp2/patnamelist", "/root/main_nm/temp2/patnamelist");
- model.makeNode("/root/send/temp2/patnamelist/method");
- model.setValue("/root/send/temp2/patnamelist/method", model.getValue("/root/main/cond/method"));
-
- if(instcd == '031') {
- exeReportPreview("RPMNE00111", "XMLSTR"); //미리보기출력(본원)
- } else {
- exeReportPreview("RPMNE00110", "XMLSTR"); //미리보기출력(칠곡)
- }
-
- //exeReportPreview("RPMNR06302", "XMLSTR", "/root/main/prtinfo", "", "true", "", "", "", "", "", "", "grp_report"); //미리보기 없이 출력
- }
- }
- }
-
- function fChangeHopeBed () {
- //희망 병실 등급 변경
-
- if(btn_ordermngmv.selected == true) { // OrderManage 에서 호출
-
- var row_om = grd_ompatlist.row;
- if (row_om >= 1) {
- var pid = model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+row_om+"]/pid");
- var indd = model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+row_om+"]/indd");
- var cretno = model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+row_om+"]/cretno");
- var instcd = model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+row_om+"]/instcd");
-
- model.removenode("/root/send");
- model.makeValue("/root/send/patadrvinfo/pid", pid);
- model.makeValue("/root/send/patadrvinfo/indd", indd);
- model.makeValue("/root/send/patadrvinfo/cretno", cretno);
-
- var param = pid + "▦"
- + indd + "▦"
- + cretno + "▦"
- + instcd +"▦" ;
-
- setParameter("condparam", param);
- modal("SMMNE00102", 1, "", "", "", "", "", "left:100; right:0; width:0; height:0; min:hidden;");
- }
- }else{
- var row = nursemaininfo.row;
- if (row >= 1) {
- var pid = model.getValue("/root/main/nursemainlist/nursemaininfo["+row+"]/pid");
- var indd = model.getValue("/root/main/nursemainlist/nursemaininfo["+row+"]/indd");
- var cretno = model.getValue("/root/main/nursemainlist/nursemaininfo["+row+"]/cretno");
- var instcd = model.getValue("/root/main/nursemainlist/nursemaininfo["+row+"]/instcd");
-
- model.removenode("/root/send");
- model.makeValue("/root/send/patadrvinfo/pid", pid);
- model.makeValue("/root/send/patadrvinfo/indd", indd);
- model.makeValue("/root/send/patadrvinfo/cretno", cretno);
-
- var param = pid + "▦"
- + indd + "▦"
- + cretno + "▦"
- + instcd +"▦" ;
-
- setParameter("condparam", param);
- modal("SMMNE00102", 1, "", "", "", "", "", "left:100; right:0; width:0; height:0; min:hidden;");
-
- }
- }
- }
-
-
- //Nurse Main /Order Manage에서 상단환자정보세팅하기
- function fSetPatInfo()
- {
- // 상단 세팅을 위한 파라미터
- if(btn_ordermngmv.selected == true) {
- if (model.getValue("/root/main_om/cond/unitflag") == "emc") {
- var param = "E▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- + "▦" ;
- setParameter("condparam", param);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- } else if (model.getValue("/root/main_om/cond/unitflag") == "dsc") {
- //------------(20071114)
- if (model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oprsrvno") != "") {
- var param = "T" + "▦" // 01 O:외래, I:입원구분, T:수술예약
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid") + "▦" // 02 등록번호
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/opcnfmdd") + "▦" // 03 수술시작일자
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno") + "▦" // 04 cretno(없는 경우 ""로 처리)
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd") + "▦" // 05 기관코드
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdeptcd") + "▦" // 06 집도과부서
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdrid") + "▦" // 07 집도의ID
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oppatflagcd") + "▦"
- + "F" + "▦"
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oprsrvno") + "▦"
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/ophistno") + "▦"
- + model.getValue("/root/main/cond/orddd")+ "▦" ;
- } else {
- var param = "I" + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- }
- //------------
- setParameter("condparam", param);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- } else if (model.getValue("/root/main_om/cond/unitflag") == "chemo") {
- //------------(20071114)
- condparam = "I"+ "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- + "▦" + model.getValue("/root/main/cond/orddd");
- //------------
- setParameter("condparam", condparam);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- } else if (model.getValue("/root/main_om/cond/unitflag") == "op") {
- var param = "T" + "▦" // 01 O:외래, I:입원구분, T:수술예약
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid") + "▦" // 02 등록번호
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/opcnfmdd") + "▦" // 03 수술시작일자
- + "▦" // 04 cretno(없는 경우 ""로 처리)
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd") + "▦" // 05 기관코드
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdeptcd") + "▦" // 06 집도과부서
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/perfdrid") + "▦" // 07 집도의ID
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oppatflagcd") + "▦"
- + "F" + "▦"
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/oprsrvno") + "▦"
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/ophistno") + "▦"
- + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/opcnfmdd") + "▦" ;
- setParameter("condparam", param);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- } else if (model.getValue("/root/main_om/cond/unitflag") == "apu") {
- condparam = "I"+ "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- + "▦" + model.getValue("/root/main/cond/orddd");
- setParameter("condparam", condparam);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
-
- } else {
- condparam = "I"+ "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_om/ominfo/ompatinfo/ompatlist["+grd_ompatlist.row+"]/instcd")
- + "▦" + model.getValue("/root/main/cond/orddd");
-
- setParameter("condparam", condparam);
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- }
- } else {
- condparam = "I"+ "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
- + "▦" + model.getValue("/root/main/cond/orddd");
-
- setParameter("condparam", condparam);
- //상단 세팅 화면 사이즈 작게 띄움
- modal("SPMMO08900", 1, "", "", "", "", "", "left:0; right:0; width:0; height:0; sysmenu:hidden; caption:hidden; min:hidden, max:hidden;");
- /*
- var indschacptstat = model.getValue("/root/main/cond/indschacptstat");
- if(indschacptstat == "1" || indschacptstat == "3"){ // 조회조건이 재원,퇴원진행 일 경우
- condparam = "I"+ "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
- + "▦" + getCurrentDate();
- }else{
- condparam = "I"+ "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/pid")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/indd")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/cretno")
- + "▦" + model.getValue("/root/main_nm/wardpatinfo/wardpatlist["+grd_wardpatlist.row+"]/instcd")
- + "▦" + model.getValue("/root/main/cond/orddd");
- }
- */
-
- }
-
-
- //20110901_KNUH_End
- }
- //--------------(20101226) 경북대
-
-
- function fSetNrRecord (flag, oldSupCD, newSupCD, recdt) {
-
- var oldBedPos, newBedPos;
-
- if (oldSupCD == "BDD") {
- oldBedPos = "EICU";
- } else if (oldSupCD == "BDE") {
- oldBedPos = "응급입원실";
- } else if (oldSupCD == "BDT") {
- oldBedPos = "[TR]외상소생구역";
- } else {
- oldBedPos = "응급실";
- }
-
- if (newSupCD == "BDD") {
- newBedPos = "EICU";
- } else if (newSupCD == "BDE") {
- newBedPos = "응급입원실";
- } else if (newSupCD == "BDT") {
- newBedPos = "[TR]외상소생구역";
- } else {
- newBedPos = "응급실";
- }
-
- if (flag == "new") {
- TextStmtInfo = newBedPos + " 입실함.";
- } else {
- TextStmtInfo = oldBedPos + " 퇴실, " + newBedPos + " 입실함.";
- }
- var sPid = model.getValue("/root/main/ercensusinfo/patinfo/pid");
- var sIndd = model.getValue("/root/main/ercensusinfo/patinfo/indd");
- var sCretno = model.getValue("/root/main/ercensusinfo/patinfo/cretno");
- var sInstcd = getUserInfo("dutplceinstcd");
- var sRecdt = recdt;
-
- setParameter("SMMNR03400_ParamBase", "recflag▦dutplaccd▦reclnkkey▩E▦010▦"+ sPid + "," + sIndd + "," + sCretno + "," + sInstcd+"▩");
- setParameter("SMMNR03400_ParamSaveText", "S▦A▦"+sRecdt+"▦"+TextStmtInfo+"▩");
- modal("SMMNR03400");
- }
- function fPatQi(){
- var pid = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/pid");
- var hngnm = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/patnm");
- var orddeptcd = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/deptcd");
- var medispclid = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/juorddrid2");
- var diagnm = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/diagnm");
- var diagcd = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/diagcd");
- var sexagestr = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/grdrage").split("/");
- if( sexagestr[0] == "F" ) { var sex = "여자"; }
- if( sexagestr[0] == "M" ){ var sex = "남자"; }
- var age = sexagestr[1];
- var wardcd = model.getValue("/root/main/cond/wardcd");
- var roomcd = "ERBD";
- var ioflag = model.getValue("/root/main/nursemainlist/nursemaininfo[" + nursemaininfo.row + "]/ordtype");
-
- setParameter("SMMQR00100_PARAM", pid + "▦" + hngnm + "▦" + orddeptcd + "▦" + medispclid + "▦" + diagnm + "▦" + diagcd + "▦" + sex + "▦" + age + "▦" + wardcd + "▦" + roomcd + "▦" + ioflag);
- modal("../../../emr/qiweb/xrw/SMMQR00100", "","", "", "SMMQR00100", "", "");
- }
|