123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- /*
-
- 응급센터 의사소통Pg(SPMNE04800.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var xCmpgInfoPath = "/root/main/patcmpginfo";
- var xPatInfoPath = "/root/main/cond/patinfo";
- var xCmpglistPath = "/root/main/cmpginfo/cmpglist";
- var iPid = "";
- var iCretno = "";
- var iIndd = "";
- var iPname = "";
- /**
- * @group :
- * @ver : 2009.06.05
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- //이전 화면에서 넘어온 환자정보 param/상단에 환자정보가 존재하면 그 값을 셋팅해줌(2009.06.14 JJE)
- var grb_patinfo1 = opener.javascript.getParameter ( "SPMNE04800_patinfo" );
- var grb_patinfo2 = opener.javascript.getParameter ( "SPMNE04900_patinfo" );
- var grb_patinfo3 = getPatientInfo("pid");
-
- if( !isNull(grb_patinfo1) ){
- iPid = grb_patinfo1.split("▩")[0];
- iCretno = grb_patinfo1.split("▩")[1];
- iIndd = grb_patinfo1.split("▩")[2];
- iPname = grb_patinfo1.split("▩")[3];
-
- }else if( !isNull(grb_patinfo2) ){
- iPid = grb_patinfo2.split("▩")[0];
- iCretno = grb_patinfo2.split("▩")[1];
- iIndd = grb_patinfo2.split("▩")[2];
- iPname = grb_patinfo2.split("▩")[3];
-
- }else{
- if( !isNull(grb_patinfo3) ){
- iPid = grb_patinfo3;
- iCretno = getPatientInfoDetail("cretno");
- iIndd = getPatientInfoDetail("indd");
- iPname = getPatientInfo("pname");
- }
- }
-
- if( !isNull(iPid) && !isNull(iCretno) && !isNull(iIndd) ){
- model.setValue(xPatInfoPath + "/selpatinfo", iPid);
- model.setValue(xPatInfoPath + "/pid", iPid);
- model.setValue(xPatInfoPath + "/bedposcnts", "");
- model.setValue(xPatInfoPath + "/patinfo", iPname + " " + iPid);
- }
-
- model.setValue("/root/main/cond/patlist/endyn" , "N");
- model.setValue(xPatInfoPath + "/srchtype", "X");
- model.setValue(xPatInfoPath + "/fromdd", getCurrentDate());
- model.setValue(xPatInfoPath + "/todd" , getCurrentDate());
-
- submit("TRMNE04801");
- fGetNursHardCdInfo("'096'", getCurrentDate());
- fSrchCMPGList("A");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009.06.05
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 메시지 콤보 리스트 변경
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChngMsgList(){
-
- model.setValue(xCmpgInfoPath+"/trscnts", model.getValue(xCmpgInfoPath+"/selmsginfo"));
- model.setFocus("ipt_trscnts");
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009.06.05
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 환자 리스트 변경시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fChngERPatList(){
- var pid = model.getValue(xPatInfoPath+"/selpatinfo");
- model.setValue(xPatInfoPath+"/pid", pid);
- model.setValue(xPatInfoPath+"/bedposcnts",model.getValue("/root/main/erpatinfo/erpatlist[pid='"+pid+"']/bedposcnts"));
- model.setValue(xPatInfoPath+"/patinfo",model.getValue("/root/main/erpatinfo/erpatlist[pid='"+pid+"']/patinfo"));
- model.setValue("/root/main/patcmpginfo/selmsginfo", "");
- model.setValue("/root/main/patcmpginfo/ugcyyn", "");
- model.setValue("/root/main/patcmpginfo/trscnts", "");
- model.setValue(xPatInfoPath+"/histno",""); //키 초기화 (2009.06.14 JJE)
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2009.06.05
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 저장
- * @param :flag(I:insert or update, D:delete)
- * @return :
- * @---------------------------------------------------
- */
- function fSave(flag){
- if( isNull(flag) ) flag = "I";
-
- var pid = model.getValue(xPatInfoPath+"/pid");
- var trscnts = model.getValue(xCmpgInfoPath+"/trscnts");
- if( flag == "T" ){
-
- model.removenodeset("/root/send");
- model.makeNode("/root/send/savedata");
- copyNodeListType("/root/send/savedata", "/root/main/cmpginfo/cmpglist", "replace", model, model);
- }else{
- if(pid == ""){
- messageBox("환자를 선택","I008");
- model.setFocus("cmb_selpatinfo");
- return;
- }
- if(trscnts == ""){
- messageBox("전달한 내용을 입력","I008");
- model.setFocus("cmb_selmsginfo");
- return;
- }
-
- model.removenodeset("/root/send");
- model.makeNode("/root/send/savedata");
- model.makeValue("/root/send/savedata/pid",pid);
- model.makeValue("/root/send/savedata/ugcyyn",model.getValue(xCmpgInfoPath+"/ugcyyn"));
- model.makeValue("/root/send/savedata/trscnts",trscnts);
- model.makeValue("/root/send/savedata/histcd","O");
- model.makeValue("/root/send/savedata/bedposcnts", model.getValue(xPatInfoPath+"/bedposcnts"));
- model.makeValue("/root/send/savedata/histno", model.getValue(xPatInfoPath+"/histno"));
- }
- model.makeNode("/root/send/reqdata");
- model.makeValue("/root/send/reqdata/endyn", model.getValue("/root/main/cond/patlist/endyn"));
- model.makeValue("/root/send/reqdata/pid" , model.getValue("/root/main/cond/patlist/pid"));
- if( flag == "I" && !isNull(model.getValue(xPatInfoPath+"/histno")) ) flag = "U";
- model.makeValue("/root/send/savedata/status", flag);
-
- if(submit("TXMNE04801") == true){
- if(model.getValue("/root/main/cond/patinfo/status") != "T" ){
- cmb_selmsginfo.value = "";
- txt_trscnts.value = "";
- model.setValue("/root/main/cond/patinfo/histno", "");
- }
-
- fGridSetting();
- }
- }
- /**
- * @group :
- * @ver : 2009.06.05
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 의사소통 관련 환자 리스트
- * @param : flag(P:수동조회, A:자동조회)
- * @return :
- * @---------------------------------------------------
- */
- function fSrchCMPGList(flag){
-
- if( isNull(flag) ) flag = "A";
-
- if( submit("TRMNE04802") ){
-
- fGridSetting();
- if( flag != "A" ){
- //fClear(); //재조회 후 상단 입력부 초기화 (2009.06.14 JJE)
- }
- }
- }
- function fGridSetting(){
- grd_userlist.rebuildStyle();
- for(var i = 1 ; i <= getNodesetCount("/root/main/cmpginfo/cmpglist") ; i++){
- if(model.getValue("/root/main/cmpginfo/cmpglist["+i+"]/ugcyyn") == "Y"){
- //grd_userlist.cellstyle("background-color", i, 0, i, grd_userlist.colRef("trscnts")) = "#ff0000";
- grd_userlist.cellstyle("font-weight", i, 0, i, grd_userlist.colRef("trscnts")) = "bold";
- grd_userlist.cellstyle("color", i, 0, i, grd_userlist.colRef("trscnts")) = "#ff5500";
- }
- }
- }
-
- /**
- * @group :
- * @ver : 2009.06.14
- * @by : 전지은
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 의사소통 관련 환자 리스트를 더블클릭하면 상단 입력부에 값을 셋팅
- * @param : falg (A:간호사-신청, R:사원-전송)
- * @return :
- * @---------------------------------------------------
- */
- function fDblclick(flag){
- if( isNull(flag) ) flag = "A";
-
- var iRow = grd_userlist.row;
-
- if( iRow > 0 && iRow <= grd_userlist.rows ){
- var pid = model.getValue( xCmpglistPath + "[" + iRow + "]/pid");
- var pname = model.getValue( xCmpglistPath + "[" + iRow + "]/hngnm");
- var bedposcnts = model.getValue( xCmpglistPath + "[" + iRow + "]/bedposcnts");
- var patinfo = pname + " " + pid;
- var trscnts = model.getValue( xCmpglistPath + "[" + iRow + "]/trscnts");
- var ugcyyn = model.getValue( xCmpglistPath + "[" + iRow + "]/ugcyyn");
- var histno = model.getValue( xCmpglistPath + "[" + iRow + "]/histno");
-
- if( flag == "A" ){
- model.setValue(xPatInfoPath + "/selpatinfo", pid);
- model.setValue(xPatInfoPath + "/pid", pid);
- model.setValue(xPatInfoPath + "/bedposcnts", bedposcnts);
- model.setValue(xPatInfoPath + "/patinfo", patinfo);
- model.setValue(xPatInfoPath + "/histno", histno);
- model.setValue(xCmpgInfoPath + "/trscnts", trscnts);
- model.setValue(xCmpgInfoPath + "/ugcyyn", ugcyyn);
-
- cmb_selpatinfo.refresh();
- ipt_pid.refresh();
- ipt_bedno.refresh();
- ipt_patinfo.refresh();
- txt_trscnts.refresh();
- chk_ugcyyn.refresh();
-
- }
- else if( flag == "T" ){
- if(model.getValue(xCmpglistPath + "[" + iRow + "]/empid") != "" && rdo_endyn.value == "N"){
- model.setValue(xCmpglistPath + "[" + iRow + "]/empid", "");
- model.setValue(xCmpglistPath + "[" + iRow + "]/empnm", "");
- model.setValue(xCmpglistPath + "[" + iRow + "]/status", "");
- }else{
- model.setValue(xCmpglistPath + "[" + iRow + "]/empid", getUserInfo("userid"));
- model.setValue(xCmpglistPath + "[" + iRow + "]/empnm", getUserInfo("usernm"));
- model.setValue(xCmpglistPath + "[" + iRow + "]/status", "T");
- }
- }
- }
-
- }
- /**
- * @group :
- * @ver : 2009.06.14
- * @by : 전지은
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 입력부 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fClear(){
- model.resetInstanceNode(xPatInfoPath);
- model.resetInstanceNode(xCmpgInfoPath);
- cmb_selmsginfo.refresh();
- cmb_selpatinfo.refresh();
- ipt_pid.refresh();
- ipt_bedno.refresh();
- ipt_patinfo.refresh();
- txt_trscnts.refresh();
- chk_ugcyyn.refresh();
- }
|