123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089 |
- /*
- 24시간 업무보고 (SMMNB01200.xrw - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var GRD_INPTLIST_FIXCOL = 15;
- var dutplcecd = getUserInfo("dutplcecd");
- var deptcd = "";
- var erdeptflag =""; //칠곡에는 null으로 고정. 값 셋팅해주는 곳 없음.
- var erdeptcd="";
- var erdeptnm="";
- var cnt = 0;
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 외래진료 현황
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch_otptlist(){ // 통합통계 외래환자수 서브미션 태움 수정 by 박영우 20091215
- model.removenodeset("/root/send/reqdata");
- model.removenodeset("/root/main/outpatinfo");
- //messageBox("개발중","I009");
- if ( isNull(model.getValue("/root/temp/srchdd")) ){
- messageBox("기간","I003");//필수입력입니다
- return;
- }
- model.removeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/srchdd", model.getValue("/root/temp/srchdd") );
- model.makeValue("/root/send/reqdata/menu", "SUM");
- if ( !isNull( model.getValue("/root/temp/orddeptcd") ) && model.getValue("/root/temp/orddeptcd") != "%") {
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/temp/orddeptcd"));
- }
- if ( !isNull( model.getValue("/root/temp/orddrid") ) && model.getValue("/root/temp/orddrid") != "%") {
- model.makeValue("/root/send/reqdata/orddrid", model.getValue("/root/temp/orddrid"));
- }
- model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
- submit("TRSNO00101",false);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Unit별 현황
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch_inptlist(){
- for(var i = 1 ; i <= 99 ; i++){
- grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = true;
- }
- model.removenodeset("/root/main/inpt/dept");
- model.removenodeset("/root/main/inpt/inptlist");
- model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
- submit("TRMNB01203",false);
- model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
- submit("TRMNB01202",false);
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 보고 행추가
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAdd_Reptrows(grdflg){
- var wardcd = dutplcecd; //세션에서 받아처리
- var plandd = getCurrentDate();
- var plandt = getCurrentDate()+getCurrentTime().substring(0,4);
- if(grdflg == "psnlist"){
- if(grd_psnlist.rows < 2){
- grd_psnlist.addRow();
- }else{
- grd_psnlist.insertRow(1);
- }
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","insert");
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/plandt",plandt);
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/deliveflagcd","01");
- grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
- }else if(grdflg == "wardlist"){
- if(grd_wardlist.rows < 2){
- grd_wardlist.addRow();
- }else{
- grd_wardlist.insertRow(1);
- }
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","insert");
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt);
- var strTmp = model.getValue("/root/temp/duty");
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/duty", strTmp == "4" ? "1" : strTmp);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId());
- if(erdeptflag == "Y") {
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", erdeptcd);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/posdeptnm", erdeptnm);
- } else {
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/wardcd", wardcd);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/posdeptnm", getUserInfo("dutplcenm"));
- }
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","02");
-
- }else if(grdflg == "edulist"){
- if(grd_edulist.rows < 2){
- grd_edulist.addRow();
- }else{
- grd_edulist.insertRow(1);
- }
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","insert");
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/plandt",plandt);
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/deliveflagcd","03");
- grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
-
- }else if(grdflg == "etclist"){
- if(grd_etclist.rows < 2){
- grd_etclist.addRow();
- }else{
- grd_etclist.insertRow(1);
- }
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","insert");
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/plandt",plandt);
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/deliveflagcd","04");
- grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_i.gif";
-
- }else if(grdflg == "notilist"){
- if(grd_noti.rows < 2){
- grd_noti.addRow();
- }else{
- grd_noti.insertRow(1);
- }
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","insert");
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/plandt",plandt);
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/deliveflagcd","05");
- grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_i.gif";
-
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 보고 행수정
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fUpt_Reptrows(grdflg){
- var wardcd = dutplcecd; //세션에서 받아처리
- var plandd = model.getValue(ipt_orddd2.attribute("ref"));
- var plandt = getCurrentDate()+getCurrentTime().substring(0,4);
- if(grdflg == "psnlist"){
-
- var staiud = model.getValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud");
- if( (staiud =="insert") || (staiud =="delete") ){
- return;
- }
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","update");
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/deliveflagcd","01");
- grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
-
- }else if(grdflg == "wardlist"){
-
- var staiud = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud");
-
- if( (staiud =="insert") || (staiud =="delete") ){
- return;
- }
-
- var dt = model.getValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt");
-
- if(dt == null || dt == "") {
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandd",plandd);
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/plandt",plandt);
- }
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","update");
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/deliveflagcd","02");
-
- }else if(grdflg == "edulist"){
-
- var staiud = model.getValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud");
-
- if( (staiud =="insert") || (staiud =="delete") ){
- return;
- }
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","update");
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/posdeptnm",getUserInfo("dutplcenm"));
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/deliveflagcd","03");
- grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
-
- }else if(grdflg == "etclist"){
-
- var staiud = model.getValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud");
-
- if( (staiud =="insert") || (staiud =="delete") ){
- return;
- }
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","update");
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/deliveflagcd","04");
- grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_u.gif";
- }else if(grdflg == "notilist"){
-
- var staiud = model.getValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud");
-
- if( (staiud =="insert") || (staiud =="delete") ){
- return;
- }
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","update");
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/wardcd",wardcd);
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/usernm",getUserName());
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/userid",getUserId());
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/deliveflagcd","05");
- grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_u.gif";
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 보고 행삭제
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDel_Reptrows(grdflg){
- var reptcnt;
- if(grdflg == "psnlist"){
- reptcnt = grd_psnlist.rows;
- }else if(grdflg == "wardlist"){
- reptcnt = grd_wardlist.rows;
- }else if(grdflg == "edulist"){
- reptcnt = grd_edulist.rows;
- }else if(grdflg == "etclist"){
- reptcnt = grd_etclist.rows;
- }else if(grdflg == "notilist"){
- reptcnt = grd_noti.rows;
- }
- if(reptcnt < 2){
- messageBox("삭제 할 자료가 ","I004");
- return;
- }
- if(grdflg == "psnlist"){
- model.setValue("/root/main/inpt/reptdata/psnlist["+grd_psnlist.row+"]/staiud","delete");
- grd_psnlist.cellStyle("background-image", grd_psnlist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
- }else if(grdflg == "wardlist"){
- model.setValue("/root/main/inpt/reptdata/wardlist["+grd_wardlist.row+"]/staiud","delete");
- grd_wardlist.rowStatus(grd_wardlist.row) = "4";
- }else if(grdflg == "edulist"){
- model.setValue("/root/main/inpt/reptdata/edulist["+grd_edulist.row+"]/staiud","delete");
- grd_edulist.cellStyle("background-image", grd_edulist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
- }else if(grdflg == "etclist"){
- model.setValue("/root/main/inpt/reptdata/etclist["+grd_etclist.row+"]/staiud","delete");
- grd_etclist.cellStyle("background-image", grd_etclist.row, 1) = "../../../com/commonweb/images/icon_d.gif";
- }else if(grdflg == "notilist"){
- model.setValue("/root/main/inpt/reptdata/notilist["+grd_noti.row+"]/staiud","delete");
- grd_noti.cellStyle("background-image", grd_noti.row, 1) = "../../../com/commonweb/images/icon_d.gif";
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 외래진료 현황
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fCaseChange(){
- if(unitflg == 1){
- fSearch_inptlist();
- fSearch_specnurs();
- }else if(unitflg == 2){
- fSearch_otptlist();
- }
- }
- /**
- * @group :
- * @ver : 2008.06.05
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 수술,응급,분만,신생아,HD,APU,주사 각각 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch_specnurs(){
- model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // 수술 (정규,응급,통원,전체)
- model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // 수술 (종류,구분,건수)
- model.removenodeset("/root/main/inpt/specnurs/ernurs"); // 응급
- model.removenodeset("/root/main/inpt/specnurs/partrtn"); // 분만
- model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // 신생아
- model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD
- model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU
- model.removenodeset("/root/main/inpt/specnurs/injction"); // 주사
- model.removenodeset("/root/send");
- //model.refresh();
- model.makeValue("/root/send/plandd",ipt_orddd.value); //업무일자
- model.makeValue("/root/send/deptflg",deptflg); //특수간호
- model.makeValue("/root/send/instcd", getUserInfo("dutplceinstcd")); // 기관코드
- submit("TRMNB01206");
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 보고 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave_Reptrows(grdflg){
-
- if(messageBox("","Q002") != 6) return;
- var xReptPath;
- var reptcnt;
- var num = "";
-
- if(grdflg == "psnlist"){
- xReptPath = "/root/main/inpt/reptdata/psnlist";
- reptcnt = grd_psnlist.rows;
- }else if(grdflg == "wardlist"){
- xReptPath = "/root/main/inpt/reptdata/wardlist";
- reptcnt = grd_wardlist.rows;
- }else if(grdflg == "edulist"){
- xReptPath = "/root/main/inpt/reptdata/edulist";
- reptcnt = grd_edulist.rows;
- }else if(grdflg == "etclist"){
- xReptPath = "/root/main/inpt/reptdata/etclist";
- reptcnt = grd_etclist.rows;
- }else if(grdflg == "notilist"){
- xReptPath = "/root/main/inpt/reptdata/notilist";
- reptcnt = grd_noti.rows;
- }
-
-
- for(i=1; i<reptcnt; i++){
- var state = model.getValue("/root/main/inpt/reptdata/"+grdflg+"["+i+"]/staiud");
- if (state == "insert" || state == "update" || state == "delete"){
- num = "";
- break;
- }else{
- num = "1";
- }
- }
-
- if(reptcnt < 2 || num == "1" ){
- messageBox("저장할 자료가 존재하지 않습니다.","I");
- return;
- }
-
- if(grdflg == "wardlist") {
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/sReptPath" ,getGridUpdateData(grd_wardlist) );
- } else {
- var sReptPath =
- "wardcd" //01병동코드
- + "▦plandd" //02계획일자
- + "▦plandt" //03계획시간
- + "▦deliveflagcd" //04전달구분
- + "▦delivecnts" //05내용
- + "▦userid" //06작성자
- + "▦staiud" //07상태
- + "▦seqno" //08시퀀스번호
- + "▦duty" //09todolist
- + "▦filenm" //파일명
- + "▦filesize" //파일크기
- + "▦filetype" //파일형식
- + "▦filepath" //ftp파일경로
- + "▩" ;
-
- var plandd = "";
- var seqno = "";
-
- for (i=1;i < reptcnt; i++ ) {
- seqno = model.getValue(xReptPath + "["+ i + "]/seqno");
- if(seqno == null || seqno == "") {
- plandd = getCurrentDate();
- } else {
- plandd = model.getValue(xReptPath + "["+ i + "]/plandd");
- }
- sReptPath += model.getValue(xReptPath + "["+ i + "]/wardcd" ) //01병동코드
- + "▦" + plandd //02계획일자
- + "▦" + model.getValue(xReptPath + "["+ i + "]/plandt" ) //03계획시간
- + "▦" + model.getValue(xReptPath + "["+ i + "]/deliveflagcd") //04전달구분
- + "▦" + model.getValue(xReptPath + "["+ i + "]/delivecnts" ) //05내용
- + "▦" + model.getValue(xReptPath + "["+ i + "]/userid" ) //06작성자
- + "▦" + model.getValue(xReptPath + "["+ i + "]/staiud" ) //07상태
- + "▦" + model.getValue(xReptPath + "["+ i + "]/seqno" ) //08시퀀스번호
- + "▦" + model.getValue(xReptPath + "["+ i + "]/duty" ) //09todolist
- + "▦" + model.getValue(xReptPath + "["+ i + "]/filenm" ) //파일명
- + "▦" + model.getValue(xReptPath + "["+ i + "]/filesize" ) //파일크기
- + "▦" + model.getValue(xReptPath + "["+ i + "]/filetype" ) //파일형식
- + "▦" + model.getValue(xReptPath + "["+ i + "]/filepath" ) //ftp파일경로
- + "▩" ;
- }
- model.makeNode("/root/send/sReptPath");
- model.makeValue("/root/send/sReptPath",sReptPath );
- model.refresh();
- }
-
- submit("TXMNB01201");
-
- if(grdflg == "psnlist"){
- for(i= 1 ; i <= grd_psnlist.rows ; i++){
- grd_psnlist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
- }
- button66.dispatch("DOMActivate");
- }else if(grdflg == "wardlist"){
- for(i= 1 ; i <= grd_wardlist.rows ; i++){
- //grd_wardlist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
- }
- button2.dispatch("DOMActivate");
- }else if(grdflg == "edulist"){
- for(i= 1 ; i <= grd_edulist.rows ; i++){
- grd_edulist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
- }
- button3.dispatch("DOMActivate");
- }else if(grdflg == "etclist"){
- for(i= 1 ; i <= grd_etclist.rows ; i++){
- grd_etclist.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
- }
- btn_etc.dispatch("DOMActivate");
- }else if(grdflg == "notilist"){
- for(i= 1 ; i <= grd_noti.rows ; i++){
- grd_noti.cellStyle("background-image", + i , 1) = "../../../com/commonweb/images/icon_n.gif";
- }
- btn_nightnoti.dispatch("DOMActivate");
- }
- cnt = 2;
- btn_srch2.dispatch("DOMActivate"); //MIS DB링크로 인해..조회가 바로되지않아서 2번태움.
- cnt = 0;
- btn_srch2.dispatch("DOMActivate");
-
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 로드시
- * @param :
- * @return : 입력한날짜 + 날자
- * @---------------------------------------------------
- */
- function getAddDay(inputday,addend){
- var backDate ="";
- var rt = 0;
- var yyyy = inputday.substring(0,4) +"";
- var mm = inputday.substring(4,6) +"";
- var dd = inputday.substring(6,8) +"";
- var startDate = new Date(yyyy,(eval(mm)-1),dd);
- startDate.setTime(startDate.getTime()+(86400000*addend));
- NowYear = startDate.getYear();// 년
- NowMonth = startDate.getMonth()+1;// 월
- NowDay = startDate.getDate(); // 일
- backDate += NowYear ; //년도
- if (NowMonth < 10 ) backDate += "0" + NowMonth ;
- else backDate += (startDate.getMonth() + 1);
- if (NowDay < 10 ) backDate += "0" + NowDay ;
- else backDate += (startDate.getDate());
- return backDate ;
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 보고 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch_reptlist(){
- var wardcd = dutplcecd; //세션에서 받아처리
- var jobrespcd = getUserInfo("jobrespcd");
- var jobkindcd = getUserInfo("jobkindcd");
- var jobposcd = getUserInfo("jobposcd");
- var fstdeptnm="";
- var deptnm ="";
- model.removenodeset("/root/main/inpt/reptdata/psnlist");
- model.removenodeset("/root/main/inpt/reptdata/wardlist");
- model.removenodeset("/root/main/inpt/reptdata/edulist");
- model.removenodeset("/root/main/inpt/reptdata/etclist");
- model.removenodeset("/root/send");
-
- model.setValue(opt_certnm.attribute("ref"), "");
- model.setValue(opt_certdt.attribute("ref"), "");
-
- opt_certnm.refresh();
- opt_certdt.refresh();
-
- if ( jobkindcd == "1140" && (jobposcd == "41" || jobposcd == "84" || jobposcd == "41-1" || jobposcd == "89" ||getUserInfo("userid") == "ENR" || dutplcecd == model.getValue("/root/code/codeinfo/codelist[cdgrupid='I11' and cdid='"+ dutplcecd +"']/cdid") || getUserInfo("userid") == model.getValue("/root/code/codeinfo/codelist[cdgrupid='I10' and cdid='"+getUserInfo("userid") +"']/cdid"))){//간호부와 간호행정교육팀도 전체 조회 --> 간호부장과 팀장만 전체로 보도록. 이원희 선생님경우 전부되도록.
- model.makeValue("/root/send/wardcd","%"); //병동코드
- model.makeValue("/root/send/authallyn","Y"); //전부서조회
- } else {
- model.makeValue("/root/send/wardcd",wardcd); //병동코드
- model.makeValue("/root/send/authallyn","N"); //전부서조회
- if(erdeptflag == "Y") {
- model.makeValue("/root/send/authallyn", "E");
- }
- }
-
- model.makeValue("/root/send/plandd",ipt_orddd2.value); //계획일자
- model.makeValue("/root/send/duty", "4"); //todo "4":All 20111018_KNUH_Start 무조건 All로 조회되도록 수정.
- model.makeValue("/root/send/deliveflagcd",reptflg); //전달구분
- model.makeValue("/root/send/deptflag", model.getValue(rdo_deptflag.attribute("ref")));
-
- if(cnt == 2) {
- submit("TRMNB01204", false);
- } else {
- submit("TRMNB01204");
- }
- if(grd_wardlist.rows > grd_wardlist.fixedRows) {
- fstdeptnm = grd_wardlist.valueMatrix(1, grd_wardlist.colRef("posdeptnm"));
- }
- for(var i = grd_wardlist.fixedRows; i < grd_wardlist.rows; i++){
- deptnm = grd_wardlist.valueMatrix(i, grd_wardlist.colRef("posdeptnm"));
- if(fstdeptnm != deptnm) {
- fstdeptnm = deptnm;
- grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#ff0000";
- grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3";
- } else {
- grd_wardlist.rowStyle(i-1, "data", "border-bottom-color") = "#b0b0b0";
- grd_wardlist.rowStyle(i-1, "data", "border-top-width") = "3";
- }
- }
-
- opt_certnm.refresh();
- opt_certdt.refresh();
- }
- /**
- * @group :
- * @ver : 2007.08.21
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공지사항 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave_board(){
- if(messageBox("","Q002") != 6) return;
- var wardcd = "9999999999"; // 병동코드 모든부서가 보이게 임의로 부여.
- var plandd = ipt_orddd2.value; //업무일자->보고일자수정
- var plandt = ipt_orddd.value+"0000"; //계획시간 하루에 1개이기때문에 임의로 부여.
- var deliveflagcd = "00";
- var staiud;
- if(model.getValue("/root/main/inpt/board/boarddetl/staiud")=="update"){
- staiud = "update";
- }else{
- staiud = "insert";
- }
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/wardcd" , wardcd );
- model.makeValue("/root/send/plandd" , plandd );
- model.makeValue("/root/send/plandt" , plandt );
- model.makeValue("/root/send/deliveflagcd" , deliveflagcd );
- model.makeValue("/root/send/delivecnts" ,model.getValue("/root/main/inpt/board/boarddetl/delivecnts") );
- model.makeValue("/root/send/staiud" ,staiud );
- model.makeValue("/root/send/seqno" ,model.getValue("/root/main/inpt/board/boarddetl/seqno") );
- submit("TXMNB01202");
- fSearch_board();
- }
- /**
- * @group :
- * @ver : 2007.08.13
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 공지사항 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch_board(){
- var wardcd = "9999999999"; //임의로 지정.
- // model.makeValue("/root/main/inpt/board/boarddetl/delivecnts","");
- // model.makeValue("/root/main/inpt/board/boarddetl/staiud","");
- //model.refresh();
- model.resetInstanceNode("/root/main/inpt/board/boarddetl");
- model.removenodeset("/root/send");
- model.makeValue("/root/send/wardcd",wardcd); //병동코드
- model.makeValue("/root/send/plandd",ipt_orddd2.value); //업무일자->보고일자로수정
- submit("TRMNB01205");
- if ( isNull(model.getValue("/root/main/inpt/board/boarddetl/delivecnts")) ){
- model.makeValue("/root/main/inpt/board/boarddetl/delivecnts","");
- model.makeValue("/root/main/inpt/board/boarddetl/staiud","");
- model.makeValue("/root/main/inpt/board/boarddetl/seqno","");
- }
- /*
- if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
- model.copyNode("/root/main/inpt/board","/root/temp/board");
- }
- //model.refresh();
- */
- }
- function fSearch_DataList(){
- //병동별 과별
- model.removenodeset("/root/main/inpt/dept/deptlist");
- model.removenodeset("/root/main/inpt/inptlist");
- //특수파트
- model.removenodeset("/root/main/inpt/specnurs/oprsinfo"); // 수술 (정규,응급,통원,전체)
- model.removenodeset("/root/main/inpt/specnurs/oprsdetl"); // 수술 (종류,구분,건수)
- model.removenodeset("/root/main/inpt/specnurs/ernurs"); // 응급
- model.removenodeset("/root/main/inpt/specnurs/partrtn"); // 분만
- model.removenodeset("/root/main/inpt/specnurs/nbabycare"); // 신생아
- model.removenodeset("/root/main/inpt/specnurs/hdroom"); // HD
- model.removenodeset("/root/main/inpt/specnurs/apuroom"); // APU
- model.removenodeset("/root/main/inpt/specnurs/injction"); // 주사
- //보고
- var wardcd = dutplcecd; //세션에서 받아처리
- model.removenodeset("/root/main/inpt/reptdata/psnlist");
- model.removenodeset("/root/main/inpt/reptdata/wardlist");
- model.removenodeset("/root/main/inpt/reptdata/edulist");
- model.removenodeset("/root/main/inpt/reptdata/etclist");
- //공지사항
- model.removenodeset("/root/main/inpt/board/boarddetl");
- model.removenodeset("/root/send");
- model.makeValue("/root/send/orddd",ipt_orddd.value); //보고일자
- model.makeValue("/root/send/plandd",ipt_orddd.value); //업무일자
- model.makeValue("/root/send/deptflg",deptflg); //특수간호
- model.makeValue("/root/send/wardcd",wardcd); //병동코드
- model.makeValue("/root/send/deliveflagcd",reptflg); //전달구분
- submit("TRMNB01207");
- model.refresh();
- var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
- var deptengabbr = "";
- for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
- grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
- deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr");
- inpttitle = inpttitle +"^"+ deptengabbr;
- }
- grd_inptlist.caption = inpttitle;
- if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
- model.copyNode("/root/main/inpt/board","/root/temp/board");
- }
- model.refresh();
- }
- function fSearch_InptDataList(){
- // fSearch_inptlist();
- fCaseChange();
- fSearch_board();
- model.refresh();
- var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
- var deptengabbr = "";
- for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
- grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
- deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr");
- inpttitle = inpttitle +"^"+ deptengabbr;
- }
- grd_inptlist.caption = inpttitle;
- // if(model.getValue("/root/main/inpt/board/boarddetl/staiud")!= "update") {
- // model.copyNode("/root/main/inpt/board","/root/temp/board");
- // }
- // "계"항목 수술건수 포함
- var optotal = 0;
- for(var i=1; i<=grd_inptlist.rows-1; i++){
- optotal += Number(model.getValue("/root/main/inpt/inptlist["+i+"]/opcnfmdd"));
- }
- model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal);
- model.refresh();
- }
- /**
- * @group :
- * @ver :
- * @by : 김기용
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 별 엑셀저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function saveExcelAll(){
- var paramLen = saveExcelAll.arguments.length;
- // 마지막 인자가 Boolean일 경우 처리
- var extendsCaptionBool;
- if( typeof(saveExcelAll.arguments[paramLen - 1]) == "boolean" ) {
- extendsCaptionBool = saveExcelAll.arguments[paramLen - 1];
- paramLen = paramLen - 1;
- }
- else{
- extendsCaptionBool = false;
- }
- var tmpParamArray = new Array();
- if( extendsCaptionBool ) {
- for( var i = 0; i < paramLen; i++ ) {
- tmpParamArray[i] = saveExcelAll.arguments[i];
- }
- saveExcelAllWithCaption(tmpParamArray);
- }
- else{
- for( var i = 0; i < paramLen; i++ ) {
- tmpParamArray[i] = saveExcelAll.arguments[i];
- }
- saveExcelAllWithNotCaption(tmpParamArray);
- }
- }
- function saveExcelAllWithCaption( sheetArray ) {
- // alert(gridCaptionArray);
- var fileName = window.fileDialog("save", ",", false, "excel", "xls", "All Files (*.*)|*.*|Excel Files(*.xls)|*.xls");
- if( fileName == "" )
- return;
- // var sheetArray = new Array("grd_bizprescondstats|업무현황", "grd_patprescondstats|환자현황", "grd_hdstatsinfo|혈액투석현황", "grd_pdstatsinfo|복막투석현황", "grd_pdbizstatsinfo|복막투석업무현황");
- var sheetArrayLen = sheetArray.length;
- var gridId;
- var gridObj;
- for( var i = 0; i < sheetArray.length; i++ ) {
- gridId = sheetArray[i].split("|")[0];
- gridObj = document.all.item(gridId);
- // saveText() 함수는 Caption저장이 불가능 하여 SaveExcel()을 이용한다.
- gridObj.saveExcel("C:\\Temp\\tmp_TFExcel_" + i +".xls");
-
- }
- // excel application 실행함
- tfexcel.launchnewinstance(0);
- //실행된 excel application에서 새로운 workbook을 생성
- tfexcel.createworkbook();
- tfexcel.activatesheet(1);
- var sheetName;
- var nResult;
- for( var i = 0; i < sheetArrayLen; i++ )
- {
- sheetName = sheetArray[i].split("|")[1];
- if( i > 1 ) {
- nResult = tfexcel.activatesheet(i+1);
- tfexcel.sheetname(i+1) = sheetName;
- }
- else {
- nResult = tfexcel.addsheet(i+1, sheetName);
- }
- if( nResult < 0 ) {
- messageBox(sheetName + " 저장을", "E009");
- // alert(sheetName + " 오류발생");
- return;
- }
- tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
- }
- //tfexcel.loadCSV("C:\\Temp\\tmp_TFExcel.xls");
- //workbook을 저장.
- tfexcel.save(fileName);
-
- //excel application을 종료. excel application 생성 후 반드시 close해야함.
- tfexcel.close();
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- for( var i = 0; i < sheetArrayLen; i++ ) {
- fso.DeleteFile("C:\\Temp\\tmp_TFExcel_" + i + ".xls");
- }
- var rmsg = messageBox("저장된 Excel을", "Q004");
- // var rmsg = window.alert("저장된 Excel을 실행하시겠습니까?", "알림", 36);
- if( rmsg == 6 )
- window.exec("excel.exe", '\"' + fileName + '\"');
- }
- // 지표관리 조회
- function fSearch_idctlist(){
- var dept = ""
- model.removenodeset("/root/send/reqdata");
- model.removenodeset("/root/main/idct");
- if ( isNull(model.getValue("/root/temp/recdd")) ){
- messageBox("작성일자","I003");//필수입력입니다
- return;
- }
- if(model.getValue("/root/temp/deptcd") == ""){
- dept = dutplcecd;
- }else{
- dept = model.getValue("/root/temp/deptcd");
- }
- model.makeValue("/root/send/reqdata/deptcd", dept );
- model.makeValue("/root/send/reqdata/recdd", model.getValue("/root/temp/recdd") );
- submit("TRMNB01211");
- }
-
- // 지표관리 저장
- function fSave_Idctrows(grdflg){
-
- if(messageBox("","Q002") != 6) return;
- var xIdctPath;
- var idctgrd;
- var updtdata = "Y";
- var duty = "";
- var recdt = getCurrentDate()+getCurrentTime().substring(0,4);
- var dept = "";
-
- if(grdflg == "idctdlist"){
- xIdctPath = "/root/main/idct/idctdlist";
- idctgrd = grd_idctdlist;
- duty = 1;
- }else if(grdflg == "idctelist"){
- xIdctPath = "/root/main/idct/idctelist";
- idctgrd = grd_idctelist;
- duty = 2;
- }else if(grdflg == "idctnlist"){
- xIdctPath = "/root/main/idct/idctnlist";
- idctgrd = grd_idctnlist;
- duty = 3;
- }
- if(model.getValue("/root/temp/deptcd") == ""){
- dept = dutplcecd;
- }else{
- dept = model.getValue("/root/temp/deptcd");
- }
-
- model.removeNodeset("/root/send/savedata");
- model.makeNode("/root/send/savedata");
- for (i = idctgrd.fixedRows - 1 ; i < idctgrd.rows - 1; i++) {
- model.setValue(xIdctPath + "[" + i + "]/deptcd",dept);
- model.setValue(xIdctPath + "[" + i + "]/duty", duty);
- model.setValue(xIdctPath + "[" + i + "]/recdd", model.getValue("/root/temp/recdd"));
- model.setValue(xIdctPath + "[" + i + "]/recdt", recdt);
- }
-
- if(grdflg == "idctdlist"){
- updtdata = getGridUpdateData(idctgrd);
- }else if(grdflg == "idctelist"){
- updtdata = getGridUpdateData(idctgrd);
- }else if(grdflg == "idctnlist"){
- updtdata = getGridUpdateData(idctgrd);
- }
-
- model.makeValue("/root/send/savedata/idctinfo", updtdata);
-
- submit("TXMNB01211");
-
- btn_idct.dispatch("DOMActivate");
- }
-
- // 지표관리 삭제
- function fDel_Idctrows(grdflg){
- var idctchk;
- var idctgrd;
- var xIdctPath;
-
-
- if(grdflg == "idctdlist"){
- idctchk = grd_idctdlist.row - 1;
- idctgrd = grd_idctdlist;
- xIdctPath = "/root/main/idct/idctdlist";
- }else if(grdflg == "idctelist"){
- idctchk = grd_idctelist.row - 1;
- idctgrd = grd_idctelist;
- xIdctPath = "/root/main/idct/idctelist";
- }else if(grdflg == "idctnlist"){
- idctchk = grd_idctnlist.row - 1;
- idctgrd = grd_idctnlist;
- xIdctPath = "/root/main/idct/idctnlist";
- }
- if(grdflg == "idctdlist"){
- if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") {
- idctgrd.addStatus(grd_idctdlist.row, "delete");
- }else{
- messageBox("삭제 할 자료가 ","I004");
- return;
- }
- }else if(grdflg == "idctelist"){
- if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") {
- idctgrd.addStatus(grd_idctelist.row, "delete");
- }else{
- messageBox("삭제 할 자료가 ","I004");
- return;
- }
- }else if(grdflg == "idctnlist"){
- if ( model.getValue(xIdctPath + "[" + idctchk + "]/seqno") != "") {
- idctgrd.addStatus(grd_idctnlist.row, "delete");
- }else{
- messageBox("삭제 할 자료가 ","I004");
- return;
- }
- }
- model.refresh();
- }
-
- // 본원 NEW 24시간 업무보고 저장
- function fSave_Reptrows2(){
-
- if(messageBox("","Q002") != 6) return;
-
- var updtdata = getGridUpdateData(grd_wardlist) ;
- model.removenode("/root/send");
- model.makeNode("/root/send");
- model.makeValue("/root/send/sReptPath" , updtdata);
-
- if(updtdata == null || updtdata == ""){
- messageBox("저장할 자료가 존재하지 않습니다.","I");
- return;
- }
-
- submit("TXMNB01201");
-
- btn_srch2.dispatch("DOMActivate");
-
- }
-
- // 본원 NEW 일별 부서 현황 조회
- function fSearch_InptDataList2(){
- fCaseChange();
-
- //fSearch_board();
- model.refresh();
-
- var inpttitle = "부서^병상^재원^입원^전입^입실^퇴원^전출^퇴실^사망^수술^가동율^전일\n퇴원예고율^평균\n재원일수^실재원^당일\n입퇴원";
- var deptengabbr = "";
-
- for(var i = 1 ; i <= grd_deptlist.rows-1 ; i++){
- grd_inptlist.colhidden(GRD_INPTLIST_FIXCOL+i) = false;
- deptengabbr = model.getValue("/root/main/inpt/dept/deptlist[" + i + "]/deptengabbr");
- inpttitle = inpttitle +"^"+ deptengabbr;
- }
-
- grd_inptlist.caption = inpttitle;
-
- // "계"항목 수술건수 포함
- var optotal = 0;
- for(var i=1; i<=grd_inptlist.rows-1; i++){
- optotal += Number(model.getValue("/root/main/inpt/inptlist["+i+"]/opcnfmdd"));
- }
- //model.makeValue("/root/main/inpt/inptlist["+(grd_inptlist.rows-1)+"]/opcnfmdd", optotal);
-
- model.refresh();
- }
|