123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861 |
- /**
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- 의료정보 - 챠트분석관리 ( SMMRD01200_챠트분석관리.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- - Author : 박종훈
- - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
- **/
- /**
- * @ver : 2007/12/05 -> 2008/01/21
- * @desc : 화면초기화
- * @
- * @by : 박종훈 -> 이창록(수정)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize()
- {
- todd = getCurrentDate();
- var today = new Date();
- var frday = new Date();
- var diffdt = -1;
- model.removeNodeset("/root/main/list/chrtanaly/patlist");
- model.removeNodeset("/root/main/list/templist/dschpat");
- model.removeNodeset("/root/main/list/templist1/dschanaly");
- model.removeNodeset("/root/main/list/templist2/dschindxlist");
- model.removeNodeset("/root/main/list/templist3/dschunprep");
-
- fDisabled("dsch");
-
- frday = today.getAddDate(diffdt , "D");
- frdd = frday.getDateFormat();
- model.setValue("/root/cond/srchfrdd", frdd);
- model.setValue("/root/cond/srchtodd", todd);
- zsdfGetInOrdDeptList(getUserInfo("dutplceinstcd"), "/root/init/orddept", "depthngnm", "asc");//입원과
- mmbfGetDeptCodeComboList("/root/send/reqdata", "/root/init/ward", "W"); //병동코드 콤보
- addComboInstance("/root/init/orddept" , "deptcd^depthngnm", "-^전체", "dept"); //부서콤보 전체항목 추가
- addComboInstance("/root/init/ward" , "deptcd^depthngnm", "-^전체", "dept"); //병동콤보 전체항목 추가
- addComboItem("cmb_medispc","전체", "-", "above"); //주치의 전체 추가
- cmb_medispc.value="-";
- model.setValue("/root/cond/orddeptcd", "-");
- model.setValue("/root/cond/ward", "-");
- model.removeNodeset("/root/temp/flag/excelflag");
- model.makeValue("/root/temp/flag/excelflag","2"); //각 그리드별 엑셀저장시 flag값 1:수거,2:분석,3:미반납건수현황
-
- btn_flag.dispatch("DOMActivate");
-
- //model.refresh();
- }
- /**
- * @ver : 2007-12-05
- * @desc : 진료과 선택시 주치의 명단 가져오기
- * @
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fGetDrList(ref, rsltRef, orddeptcd, queryflag,stflag)
- {
- model.makeValue(ref + "/orddeptcd" , orddeptcd);
- model.makeValue(ref + "/queryflag" , queryflag);
- model.makeValue(ref + "/stflag" , stflag);//스태프구분
- submit("TRMRF02303", true, ref, rsltRef);
- model.removeNodeset("/root/send/reqdata");
- }
- /**
- * @ver : 2008/07/30
- * @desc : 진료과 선택시 분과정보 및 주치의조회(Staff만)
- * @ :
- * @by : 이창록
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChgUserListClsDept()
- {
- if(model.getValue("/root/temp/flag/excelflag")=="2"){
- model.removeNodeset("/root/init/clsdeptlist/dept");
- model.makeNode("/root/init/clsdeptlist/dept");
- zsdfGetInClsDeptList(getUserInfo("dutplceinstcd"), cmb_orddept.value, "/root/init/clsdeptlist", "depthngnm", "asc");//분과
- if( getNodesetCnt(model,"/root/init/clsdeptlist/dept/deptcd") > 0){
- model.removeNodeset("root/cond/clsdeptflag");
- model.makeValue("root/cond/clsdeptflag","Y");
- }else
-
- model.removeNodeset("root/cond/clsdeptflag");
- model.resetInstanceNode("/root/init/userlist/drlist");
- fGetDrList("/root/send/reqdata", "/root/init/userlist/drlist", cmb_orddept.value, "total","staff");//주치의 staff만 조회
- if(getNodesetCnt(model, "/root/init/userlist/drlist") > 0){
- if(model.getValue("/root/cond/orddeptcd")=="-"){
- model.setValue("/root/cond/atdoctid", model.getValue("/root/init/userlist/drlist/drid[1]"));
- cmb_medispc.refresh();
- }else
- model.setValue("/root/cond/atdoctid", model.getValue("/root/init/userlist/drlist/drid[1]"));
- }
- }else if(model.getValue("/root/temp/flag/excelflag")=="1"){
- model.removeNodeset("root/cond/clsdeptflag");
- model.removeNodeset("/root/init/clsdeptlist/dept");
- model.resetInstanceNode("/root/init/userlist/drlist");
- fGetDrList("/root/send/reqdata", "/root/init/userlist/drlist", cmb_orddept.value, "total","staff");//주치의 staff만 조회
- if(getNodesetCnt(model, "/root/init/userlist/drlist") > 0){
- model.setValue("/root/cond/atdoctid", model.getValue("/root/init/userlist/drlist/drid[1]"));
- cmb_medispc.refresh();
- }
- }
- model.refresh();
- }
- /**
- * @ver : 2007-12-06
- * @desc : 환자리스트 가져오기(수거,분석)
- * @
- * @by : 박종훈
- * @param :
- * @return :수정 이창록
- * @---------------------------------------------------
- */
- function fGetPatList()
- {
- var rem = model.getValue("/root/init/rem"); //수거
- var urem = model.getValue("/root/init/urem"); //미수거
- var indelyn=model.getValue("/root/cond/indelyn"); //입원 삭제
- var orddeptcd = model.getValue("/root/cond/orddeptcd");//진료과
- var clsdeptcd = model.getValue("/root/hidden/clsdeptcd");//분과
- var remyn = "";
- var sRemFlag = model.getValue("/root/cond/remanalyflag"); //수거,분석 구분
- if(sRemFlag == "rem"){
- model.removeNodeset("/root/main/list/chrtanaly/patlist");
- if(submit("TRMRD01201"))
- {
- grd_chrtanaly.rebuild();
- grd_chrtanaly.rebuildStyle();
- setRowStyle("grd_chrtanaly","4","Y","readprtflag","equal"); // 출력/미출력구분 RowStyle변경
- var Mflag = model.getValue("/root/hidden/mflag");
- if(Mflag=="1"){
- }else
- messageBox("검색이","I002");
- model.setValue("/root/search/srchcnt", grd_chrtanaly.rows - 1);//해당그리드의 건수 보여주기
- model.removeNodeset("/root/hidden/mflag");
- }
-
- }else{
- var reqflag = model.getValue("/root/init/reqflag");
- model.makeValue("/root/cond/reqflag",reqflag);
-
- reqflag = reqflag.substr(0,4);
- if( "dsch" == reqflag){
- model.removeNodeset("/root/main/list/templist");
- }else if( "anly" == reqflag){
- model.removeNodeset("/root/main/list/templist1");
- }else if( "indx" == reqflag){
- model.removeNodeset("/root/main/list/templist2");
- }else if( "unpr" == reqflag){
- model.removeNodeset("/root/main/list/templist3");
- }
- model.makeValue("/root/cond/cntflag",model.getValue("/root/init/remanalyflag/cntflag"));
- if(submit("TRMRD01202")==true)
- {
- if(reqflag=="dsch"){
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,grd_dschpat.rows - 1);
- }else if(reqflag=="anly"){
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,grd_dschanaly.rows - 1);
- }else if(reqflag=="indx"){
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,grd_indxlist.rows - 1);
- }else if(reqflag == "unpr"){
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,grd_unprep.rows - 1);
- }
- }
- }
- model.refresh();
- }
-
-
- /**
- * @ver : 2007-12-06
- * @desc : 저장
- * @
- * @by : 박종훈
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fSave()
- {
- var sPid = model.getValue("/root/main/list/chrtanaly/patlist["+ grd_chrtanaly.row +"]/pid");
- if(sPid==""){
- messageBox("환자를 선택","I008");
- return;
- }
- var updateData = grd_chrtanaly.getUpdateData();
- model.makeValue("/root/hidden/mflag","1");
- model.makeValue("/root/send/reqdata/chrtanaly" , updateData);
- model.makeValue("/root/send/reqdata/idflag" , model.getValue("/root/cond/idflag"));
- model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/cond/pid"));
- model.makeValue("/root/send/reqdata/srchfrdd" , model.getValue("/root/cond/srchfrdd"));
- model.makeValue("/root/send/reqdata/srchtodd" , model.getValue("/root/cond/srchtodd"));
- model.makeValue("/root/send/reqdata/orddeptcd" , model.getValue("/root/cond/orddeptcd"));
- model.makeValue("/root/send/reqdata/atdoctid" , model.getValue("/root/cond/atdoctid"));
- model.makeValue("/root/send/reqdata/ward" , model.getValue("/root/cond/ward"));
- model.makeValue("/root/send/reqdata/longinhosp" , model.getValue("/root/cond/longinhosp"));
- model.makeValue("/root/send/reqdata/remyn" , model.getValue("/root/cond/remyn"));
- model.makeValue("/root/send/reqdata/inhospdd" , model.getValue("/root/cond/inhospdd"));
-
- if(submit("TXMRD01201")==true){
- var Mflag = model.getValue("/root/hidden/mflag");
- if(Mflag=="1"){
- messageBox("저장이","I002");
- }
- }
- //저장한 후 다시 조회 하기 (이창록)수정
- model.removeNodeset("/root/temp/tmp/autoprtlist");
- model.makeValue("/root/cond/remanalyflag","dsch"); //수거,분석 구분
- fGetPatList();
- }
- /**
- * @ver : 2007-12-06
- * @desc : 퇴원 재원 조건에따른 저장버튼 disable 및 caption text 상태 변화
- * @ : 퇴원시->퇴원일자 .입원시-> 입원환자,수거시 ->수거일자
- * @
- * @by : 박종훈
- * @param : 수정(이창록)2008-02-11
- * @return :
- * @---------------------------------------------------
- */
- function fSaveDisable()
- {
- var idflag = model.getValue("/root/cond/idflag");
- if ( idflag== "I")
- {
- btn_save.disabled = true;
- cap_snm.text="재원기간";
- chk_rflag.disabled = true;
- chk_rflag.value="";
- grd_chrtanaly.colHidden(grd_chrtanaly.colRef("sixdethflag"))=true;
- }
- else if(idflag=="D")
- {
- btn_save.disabled = false;
- cap_snm.text="퇴원일자 :";
- chk_rflag.disabled = false;
- grd_chrtanaly.colHidden(grd_chrtanaly.colRef("sixdethflag"))=false;
- }
- }
- /**
- * @ver : 2007-12-06
- * @desc : 수거체크시 저장버튼 disable 및 caption text 상태 변화
- * @ :
- * @
- * @by : 박종훈
- * @param : 수정(이창록)2008-02-11,이창록 작업 flag 값 추가->2009-02-06
- * @return :
- * @---------------------------------------------------
- */
- function fRflagChg()
- {
- var rflag = model.getValue("/root/cond/rflag");
- var userflag = model.getValue("/root/cond/userflag");
- var Todd = getCurrentDate();
-
- if(rflag =="R")
- {
- //btn_save.disabled = true;
- model.setValue("/root/cond/srchfrdd", Todd);
- model.setValue("/root/cond/srchtodd", Todd);
- ipt_srchfrdd.refresh();
- ipt_srchtodd.refresh();
- cap_snm.text="수거일자 :";
- }else if(rflag =="")
- {
- //btn_save.disabled = false;
- var todd = getCurrentDate();
- var today = new Date();
- var frday = new Date();
- var diffdt = -1;
- frday = today.getAddDate(diffdt , "D");
- frdd = frday.getDateFormat();
- model.setValue("/root/cond/srchfrdd", frdd);
- model.setValue("/root/cond/srchtodd", todd);
- ipt_srchfrdd.refresh();
- ipt_srchtodd.refresh();
- fSaveDisable();
- }
- if(userflag=="dsch"){
- model.setValue("/root/cond/srchfrdd", Todd);
- model.setValue("/root/cond/srchtodd", Todd);
- ipt_srchfrdd.refresh();
- ipt_srchtodd.refresh();
- cap_snm.text="작업일자 :";
- }else if(userflag==""){
- var todd = getCurrentDate();
- var today = new Date();
- var frday = new Date();
- var diffdt = -1;
- frday = today.getAddDate(diffdt , "D");
- frdd = frday.getDateFormat();
- model.setValue("/root/cond/srchfrdd", frdd);
- model.setValue("/root/cond/srchtodd", todd);
- ipt_srchfrdd.refresh();
- ipt_srchtodd.refresh();
- fSaveDisable();
- }
-
- }
- /**
- * @ver : 2008/01/21
- * @desc : 차트분석 조회한 것을 엑셀에 저장
- * @
- * @by : 이창록
- * @param :(추가)
- * @return :
- * @---------------------------------------------------
- */
- function fChrtanalySaveExcel(){
- var excelflag = model.getValue("/root/temp/flag/excelflag");
- var reqflag = model.getValue("/root/init/reqflag");
- if(excelflag=="1"){
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_chrtanaly.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(excelflag=="2"){
- if(reqflag=="dsch1"){
- var fileName = window.fileDialog("save", ",", false, "퇴원환자", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_dschpat.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="anly1"){
- var fileName = window.fileDialog("save", ",", false, "퇴원분석", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_dschanaly.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="anly2"){
- var fileName = window.fileDialog("save", ",", false, "미퇴원분석", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_dschanaly.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="indx1"){
- var fileName = window.fileDialog("save", ",", false, "코딩", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_indxlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="indx2"){
- var fileName = window.fileDialog("save", ",", false, "가코딩", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_indxlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="indx3"){
- var fileName = window.fileDialog("save", ",", false, "미코딩", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_indxlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="unpr"){
- var fileName = window.fileDialog("save", ",", false, "미비관리", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_unprep.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }else if(reqflag=="indx4"){
- var fileName = window.fileDialog("save", ",", false, "재검토", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_indxlist.saveExcel(fileName, "SheetName", false, false, "", "", "false");
- }
- }
- }else if(excelflag=="3"){
- var UnrtnFlag =model.getValue("/root/cond/unrtnflag");
- if(UnrtnFlag=="wardunremcnt"){
- var fileName = window.fileDialog("save", ",", false, "병동별(미수거)", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_wardunremcntlist.saveExcel(fileName, "SheetName", true, true, "", "", "false");
- }
- }else if(UnrtnFlag=="deptunremcnt"){
- var fileName = window.fileDialog("save", ",", false, "진료과별(미수거)", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_deptunremcntlist.saveExcel(fileName, "SheetName", true, true, "", "", "false");
- }
- }else if(UnrtnFlag=="deptuntrncnt"){
- var fileName = window.fileDialog("save", ",", false, "진료과별미반납건수현황", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_deptunrtncntlist.saveExcel(fileName, "SheetName", true, true, "", "", "false");
- }
- }else if(UnrtnFlag == "warduntrncnt"){
- var fileName = window.fileDialog("save", ",", false, "병동별미반납건수현황", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != ""){
- grd_wardunrtncntlist.saveExcel(fileName, "SheetName", true, true, "", "", "false");
- }
- }
- }
- }
- /**
- * @ver : 2008/01/21
- * @desc : 등록번호로 차트분석을 조회(등록번호 앞에 0이 붙어도 앞에 0을 없애고 조회)
- * @ 예)00000098077755 - > 98077755 (getRemoveLeftChar)함수 사용
- * @by : 이창록
- * @param :(추가)
- * @return :
- * @---------------------------------------------------
- */
- function fPidKeyPress()
- {
- var Pid = model.getValue("/root/cond/pid");
- var str_pid = Pid;
-
- if ( getUserInfo("dutplceinstcd") != "017" ) //20091031, hkjoo 추가
- str_pid = getRemoveLeftChar(Pid, '0');
-
- if(model.getValue("/root/cond/checknum/value") == "true"){
- str_pid = getCretCheckNo(str_pid, getUserInfo("dutplceinstcd"));
- } else {
- str_pid = model.getValue("/root/cond/pid");
- }
- model.setValue("/root/cond/pid",str_pid);
- fGetPatList();
-
- }
- /**
- * @ver : 2008/01/21
- * @desc : 장기재원일수 선택시 input disable 및 값 없애기
- * @
- * @by : 이창록
- * @param :(추가)
- * @return :
- * @---------------------------------------------------
- */
- function fChgInhospdd()
- {
- var xCondpath ="/root/cond";
- var longinhosp=model.getValue("/root/cond/longinhosp");
- if(longinhosp=="H")
- {
- ipt_inhospdd.disabled=false;
- }else if(longinhosp==false)
- {
- ipt_inhospdd.disabled=true;
- ipt_inhospdd.value="";
- }
- }
- /**
- * @ver : 2008/01/21
- * @desc : 삭제시 수거랑 같이 체크 ,미반납시 수거 상태 풀기
- * @
- * @by : 이창록(추가)
- * @param :
- * @return :
- * @---------------------------------------------------
- */
-
- function fChgUnrtnyn()
- {
- if(grd_chrtanaly.isCell(event.target) && grd_chrtanaly.mouserow >= grd_chrtanaly.fixedrows)
-
- var iRow = grd_chrtanaly.row - grd_chrtanaly.fixedRows + 1;
- var remyn = model.getValue("/root/main/list/chrtanaly/patlist[" + iRow + "]/remyn"); //수거
- var delyn = model.getValue("/root/main/list/chrtanaly/patlist[" + iRow + "]/delyn"); //삭제
- var unrtnyn = model.getValue("/root/main/list/chrtanaly/patlist[" + iRow + "]/unrtnyn"); //미반납
-
- if(unrtnyn == "N")
- {
- if(delyn=="N")
- {
- //alert(remyn);
- if((remyn == "Y")&&(delyn == "N"))
- {
- model.setValue("/root/main/list/chrtanaly/patlist[" + iRow + "]/remyn", "Y");
- } else {
- model.setValue("/root/main/list/chrtanaly/patlist[" + iRow + "]/remyn", "N");
- grd_chrtanaly.refresh();
- return;
- }
-
- } else if(delyn=="Y"){
- model.setValue("/root/main/list/chrtanaly/patlist[" + iRow + "]/remyn", "Y");
- grd_chrtanaly.refresh();
- return;
- }
- }
- }
- /**
- * @desc : 사용자 정보 얻기(사용자 팝업 연계)
- * @id : 안종수(추가)
- * @event : xforms-select()
- * @return : void
- * @authur :
- */
- function fGetUserInfo(userid,usernm,deptcd ,instcd){
- model.makeValue("/root/temp/userinfo/userid", userid);
- model.makeValue("/root/temp/userinfo/usernm", usernm.getTrim());
- model.makeValue("/root/temp/userinfo/deptcd", deptcd);
- model.makeValue("/root/temp/userinfo/instcd", instcd);
- model.makeValue("/root/temp/userinfo/userid", userid);
- model.makeValue("/root/temp/userinfo/usernm", usernm.getTrim());
- model.makeValue("/root/temp/userinfo/deptcd", deptcd);
- model.makeValue("/root/temp/userinfo/instcd", instcd);
- }
- /**
- * @desc : 수거시 입퇴원요약지,수술기록지 출력
- * @by : 이창록(추가)
- * @id : E->EMR차트 ,I->영상차트
- * @event : xforms-onmousedown
- * @return : void
- * @authur :
- */
- function fMouseRightchrt(){
-
- if(event.button == 3){
- window.setPopupMenu(true, "/root/hidden/menu/chrtanaly", "label", "func", false);
- return;
- }
-
- }
- //입퇴원요약지
- function fPrint_Chrt()
- {
- model.makeNode("/root/temp/keyinfo/keylist");
- var iRow = grd_chrtanaly.row - grd_chrtanaly.fixedRows + 1;
- var removedd = model.getValue("/root/main/list/chrtanaly/patlist["+iRow+"]/removedd");
- var remyn = model.getValue("/root/main/list/chrtanaly/patlist["+iRow+"]/remyn");
- if(iRow < 1){
- return;
- }
- if((remyn=="N")&&(removedd=='-')){
- messageBox("차트수거된 환자만 출력이","I006");
- return;
- }
- var msg = "";
- var Pid = model.getValue("/root/init/tmp/pid");
- var indd = model.getValue("/root/init/tmp/indd");
- var cretno = model.getValue("/root/init/tmp/cretno");
- clearParameter("SPMRI02400_prtrecinfo");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" ,Pid);
- model.makeValue("/root/send/reqdata/indd" ,indd);
- model.makeValue("/root/send/reqdata/cretno" ,cretno);
- model.makeValue("/root/send/reqdata/formflag","S");
- submit("TRMRD01203")
- var Chrtflag = model.getValue("/root/temp/keyinfo/keylist/chrtflag");
- var sFormcd = model.getValue("/root/temp/keyinfo/keylist/formcd");
- if(Chrtflag =="E"){
- msg = Chrtflag + "▦" + model.getValue("/root/temp/keyinfo/keylist/signno") + "▦"+sFormcd+"▩";
- setParameter("SPMRI02400_prtrecinfo", msg); //oldflag▦signno▦formcd▩//통합기록출력창 파라미터
- modal("SPMRI02400");
- }else{
- messageBox("입퇴원요약기록이","I004");
- return;
- }
- model.removeNodeset("/root/temp/keyinfo/keylist");
-
- }
- //수술기록지
- function fPrint_OpChrt()
- {
- model.makeNode("/root/temp/keyinfo/keylist");
- var iRow = grd_chrtanaly.row - grd_chrtanaly.fixedRows + 1;
- var Pid = model.getValue("/root/init/tmp/pid");
- var indd = model.getValue("/root/init/tmp/indd");
- var cretno = model.getValue("/root/init/tmp/cretno");
- var remyn = model.getValue("/root/main/list/chrtanaly/patlist["+iRow+"]/remyn");
- var removedd = model.getValue("/root/main/list/chrtanaly/patlist["+iRow+"]/removedd");
- var msg = "";
- if(iRow < 1){
- return;
- }
- if((remyn=="N")&&(removedd=='-')){
- messageBox("차트수거된 환자만 출력이","I006");
- return;
- }
- clearParameter("SPMRI02400_prtrecinfo");
- model.removeNodeset("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/pid" ,Pid);
- model.makeValue("/root/send/reqdata/indd" ,indd);
- model.makeValue("/root/send/reqdata/cretno" ,cretno);
- model.makeValue("/root/send/reqdata/formflag","P");
- submit("TRMRD01203")
- var opflag = model.getValue("/root/temp/keyinfo/keylist/opflag");
- var opFormcd = model.getValue("/root/temp/keyinfo/keylist/formcd");
- if(opflag == "E"){
- msg = opflag + "▦" + model.getValue("/root/temp/keyinfo/keylist/opsignno") +"▦"+opFormcd+"▩";
- setParameter("SPMRI02400_prtrecinfo", msg); //oldflag▦opsignno▦formcd▩//통합기록출력창 파라미터
- modal("SPMRI02400");
- }else if(opflag ==""){
- messageBox("수술기록이","I004");
- return;
- }
- model.removeNodeset("/root/temp/keyinfo/keylist");
- }
- /**
- * @desc : 그리드에서 선택한 환자정보 가져오기
- * @by : 이창록(추가)2008-09-17
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur :
- */
- function fSelectPatInfo(flag)
- {
- model.removeNodeset("/root/init/tmp");
- model.makeNode("/root/init/tmp");
- if(flag=="rem"){
- var dschdt =model.getValue("/root/main/list/chrtanaly/patlist["+ grd_chrtanaly.row +"]/dschdt")
- var dschdd = dschdt.substring(0,8);
- if(grd_chrtanaly.isCell(event.target) && grd_chrtanaly.mouserow >= grd_chrtanaly.fixedrows){//그리드에서 데이타영역만 선택
- model.makeValue("/root/init/tmp/pid" ,model.getValue("/root/main/list/chrtanaly/patlist["+ grd_chrtanaly.row +"]/pid"));
- //이창록 수정20090211 indd ->orgindd
- model.makeValue("/root/init/tmp/indd" ,model.getValue("/root/main/list/chrtanaly/patlist["+ grd_chrtanaly.row +"]/orgindd"));
- model.makeValue("/root/init/tmp/cretno" ,model.getValue("/root/main/list/chrtanaly/patlist["+ grd_chrtanaly.row +"]/cretno"));
- model.makeValue("/root/init/tmp/dschdd" ,dschdd);
- }
- }else if(flag=="dsch1"){
- if(grd_dschpat.isCell(event.target) && grd_dschpat.mouserow >= grd_dschpat.fixedrows) {//그리드에서 데이타영역만 선택
- var dschdt =model.getValue("/root/main/list/templist/dschpat["+ grd_dschpat.row +"]/dschdt")
- var dschdd = dschdt.substring(0,8);
- model.makeValue("/root/init/tmp/pid" ,model.getValue("/root/main/list/templist/dschpat["+ grd_dschpat.row +"]/pid"));
- model.makeValue("/root/init/tmp/indd ",model.getValue("/root/main/list/templist/dschpat["+ grd_dschpat.row +"]/indd"));
- model.makeValue("/root/init/tmp/dschdd" ,dschdd);
- }
- }else if(flag=="analy"){
- if(grd_dschanaly.isCell(event.target) && grd_dschanaly.mouserow >= grd_dschanaly.fixedrows) {//그리드에서 데이타영역만 선택
- model.makeValue("/root/init/tmp/pid" ,grd_dschanaly.valueMatrix(grd_dschanaly.row,grd_dschanaly.colRef("pid")));
- model.makeValue("/root/init/tmp/indd" ,grd_dschanaly.valueMatrix(grd_dschanaly.row,grd_dschanaly.colRef("indd")));
- model.makeValue("/root/init/tmp/dschdd",grd_dschanaly.valueMatrix(grd_dschanaly.row,grd_dschanaly.colRef("dschdt")).substring(0,8));
- }
- }else if(flag=="indx"){
- if(grd_indxlist.isCell(event.target) && grd_indxlist.mouserow >= grd_indxlist.fixedrows) {//그리드에서 데이타영역만 선택
- model.makeValue("/root/init/tmp/pid" ,grd_indxlist.valueMatrix(grd_indxlist.row,grd_indxlist.colRef("pid")));
- model.makeValue("/root/init/tmp/indd" ,grd_indxlist.valueMatrix(grd_indxlist.row,grd_indxlist.colRef("indd")));
- model.makeValue("/root/init/tmp/dschdd" ,grd_indxlist.valueMatrix(grd_indxlist.row,grd_indxlist.colRef("dschdt")).substring(0,8));
- }
- }else if(flag=="unpr"){
- if(grd_unprep.isCell(event.target) && grd_unprep.mouserow >= grd_unprep.fixedrows) {//그리드에서 데이타영역만 선택
- model.makeValue("/root/init/tmp/pid" ,grd_unprep.valueMatrix(grd_unprep.row,grd_unprep.colRef("pid")));
- model.makeValue("/root/init/tmp/indd" ,grd_unprep.valueMatrix(grd_unprep.row,grd_unprep.colRef("indd")));
- model.makeValue("/root/init/tmp/dschdd" ,grd_unprep.valueMatrix(grd_unprep.row,grd_unprep.colRef("dschdd")));
- }
- }
- model.refresh();
- }
-
- /**
- * @desc : 미반납건수현황조회(통계)
- * @by : 이창록(추가)
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur :
- */
- function fChrtUnrtnRemCntPresCondList()
- {
- var UnrtnFlag =model.getValue("/root/cond/unrtnflag");
- if(UnrtnFlag=="wardunremcnt"){
- model.removeNodeset("/root/main/chrtunrtnlist1/wardunremcntlist");
- }else if(UnrtnFlag=="deptunremcnt"){
- model.removeNodeset("/root/main/chrtunrtnlist2/deptunremcntlist");
- }else if(UnrtnFlag=="deptuntrncnt"){
- model.removeNodeset("/root/main/chrtunrtnlist3/deptunrtncntlist");
- }else if(UnrtnFlag=="warduntrncnt"){
- model.removeNodeset("/root/main/chrtunrtnlist4/wardunrtncntlist");
- }
- model.makeValue("/root/send/reqdata/unrtnflag" ,model.getValue("/root/cond/unrtnflag"));
- model.makeValue("/root/send/reqdata/srchfrdd" ,model.getValue("/root/cond/srchfrdd"));
- model.makeValue("/root/send/reqdata/srchtodd" ,model.getValue("/root/cond/srchtodd"));
-
- if(submit("TRMRD01204")){
- if(UnrtnFlag=="wardunremcnt"){
- var wumRow = grd_wardunremcntlist.rows-1;
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,wumRow);
- }else if(UnrtnFlag=="deptunremcnt"){
- var durRow = grd_deptunremcntlist.rows-1;
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,durRow);
- }else if(UnrtnFlag=="deptuntrncnt"){
- var dutRow = grd_deptunrtncntlist.rows-1;
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,dutRow);
- }else if(UnrtnFlag == "warduntrncnt"){
- var wutRow = grd_wardunrtncntlist.rows-1;
- model.removeNodeset("root/search");
- model.makeNode("root/search");
- messageBox("검색이","I002");
- model.makeValue("/root/search/srchcnt" ,wutRow);
- }
- }
- model.refresh();
- }
- /**
- * @desc : 탭별조회조건 visble flag값 ->rem->수거,dsch->분석,unrtn->미반납 건수
- * @by : 이창록(추가)
- * @id :
- * @event : DOMActivate
- * @return : void
- * @authur :
- */
- function fDisabled(flag){
- if(flag=="rem"){
- btn_save.disabled =false;
- cap_indschflag.visible =true;
- rdo_ioflag.visible =true;
- chk_rflag.visible =true;
- chk_userflag.visible =false;
- cap_pid.visible =true;
- ipt_pid.visible =true;
- chb_value.visible =true;
- btn_srchpid.visible =true;
- cap_dept.visible =true;
- cap_dept.value ="진 료 과 :";
- cmb_orddept.visible =true;
- cap_medispc.visible =true;
- cmb_medispc.visible =true;
- cap_ward.visible =true;
- cbo_ward.visible =true;
- cap_user.visible =false;
- ipt_unprepdrnm.visible =false;
- cap_remyn.visible =true;
- cap_remyn.attribute("top") =220;
- rdo_remyn.visible =true;
- rdo_remyn.attribute("top") =220;
- cap_reqflag.visible =false;
- rdo_reqflag.visible =false;
- chk_longinhosp.visible =true;
- ipt_inhospdd.visible =true;
- btn_r_chrtmovelist.visible =true;
- cap_unrtnflag.visible =false;
- rdo_unrtnflag.visible =false;
- btn_chrtuncntprescond.visible =false;
- btn_patdinfo.disabled =false;
- btn_search.disabled =false;
- btn_dsch.disabled =false;
- btn_indx.disabled =false;
- btn_unprep.disabled =false;
- btn_cncr.disabled =false;
- btn_save.visible =true;
- btn_excel.attribute("left") =1097;
- btn_cncr.attribute("left") =1041;
- btn_unprep.attribute("left") =974;
- btn_indx.attribute("left") =875;
- btn_dsch.attribute("left") =808;
- btn_search.attribute("left") =719;
- }else if(flag=="dsch"){
- cap_indschflag.visible =true;
- rdo_ioflag.visible =true;
- chk_rflag.visible =false;
- chk_userflag.visible =true;
- cap_pid.visible =true;
- ipt_pid.visible =true;
- chb_value.visible =true;
- btn_srchpid.visible =true;
- cap_dept.visible =true;
- cap_dept.value ="퇴 원 과 :";
- cmb_orddept.visible =true;
- cap_medispc.visible =true;
- cmb_medispc.visible =true;
- cap_ward.visible =true;
- cbo_ward.visible =true;
- cap_user.visible =true;
- ipt_unprepdrnm.visible =true;
- cap_remyn.visible =false;
- rdo_remyn.visible =false;
- cap_reqflag.visible =true;
- cap_reqflag.attribute("top") =255;
- rdo_reqflag.visible =true;
- rdo_reqflag.attribute("top") =255;
- chk_longinhosp.visible =true;
- ipt_inhospdd.visible =true;
- btn_r_chrtmovelist.visible =true;
- cap_unrtnflag.visible =false;
- rdo_unrtnflag.visible =false;
- btn_chrtuncntprescond.visible =false;
- btn_patdinfo.disabled =false;
- btn_search.disabled =false;
- btn_dsch.disabled =false;
- btn_indx.disabled =false;
- btn_unprep.disabled =false;
- btn_cncr.disabled =false;
- btn_save.visible =false;
- btn_excel.attribute("left") =1152;
- btn_cncr.attribute("left") =1090;
- btn_unprep.attribute("left") =1028;
- btn_indx.attribute("left") =932;
- btn_dsch.attribute("left") =867;
- btn_search.attribute("left") =780;
- }else if(flag=="unrtn"){
- cap_indschflag.visible =false;
- rdo_ioflag.visible =false;
- chk_rflag.visible =false;
- chk_userflag.visible =false;
- cap_pid.visible =false;
- ipt_pid.visible =false;
- chb_value.visible =false;
- btn_srchpid.visible =false;
- cap_dept.visible =false;
- cmb_orddept.visible =false;
- cap_medispc.visible =false;
- cmb_medispc.visible =false;
- cap_ward.visible =false;
- cbo_ward.visible =false;
- cap_user.visible =false;
- cap_remyn.visible =false;
- ipt_unprepdrnm.visible =false;
- rdo_remyn.visible =false;
- cap_reqflag.visible =false;
- rdo_reqflag.visible =false;
- chk_longinhosp.visible =false;
- ipt_inhospdd.visible =false;
- btn_r_chrtmovelist.visible =false;
- cap_unrtnflag.visible =true;
- rdo_unrtnflag.visible =true;
- btn_chrtuncntprescond.visible =true;
- btn_chrtuncntprescond.visible =true;
- btn_chrtuncntprescond.attribute("top")=439;
- btn_patdinfo.disabled =true;
- btn_search.disabled =true;
- btn_dsch.disabled =true;
- btn_indx.disabled =true;
- btn_unprep.disabled =true;
- btn_cncr.disabled =true;
- btn_save.visible =false;
- btn_excel.attribute("left") =1152;
- btn_cncr.attribute("left") =1090;
- btn_unprep.attribute("left") =1028;
- btn_indx.attribute("left") =932;
- btn_dsch.attribute("left") =867;
- btn_search.attribute("left") =780;
- }
- model.refresh();
- }
|