123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- /*
-
- 외래Acting 관리(SMMNO00900.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var sACTPRCPLIST_PATH = "/root/main/prcpendlist/prcpendlist";
- var g_initGrdData; // 리스트 관련 초기 Instance값
- /**
- * @group :
- * @ver : 2007.10.14
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- model.setValue("/root/main/cond/prcpdd", getCurrentDate());
- zbcfGetDeptCodeList("012", "orduseyn", "D", "/root/init/orddept", "depthngnm", "asc"); //부서코드 콤보조회
-
- model.setValue("/root/main/cond/orddeptcd", getUserInfo("dutplcecd")); // 근무지부서코드
- model.refresh();
- //if(cmb_orddept.label != "") fOrddridSearch();
- }
- /**
- * @group :
- * @ver : 2007.10.14
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료과의 해당하는 진료의 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fOrddridSearch() {
- //cmb_orddr.disabled = false;
- model.makeNode("/root/send");
-
- model.makeValue("/root/send/enddd", model.getValue("/root/main/cond/enddd"));
- model.makeValue("/root/send/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
-
- var sordclsdeptflag = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/ordclsdeptflag"); // 센터/대표/분과/서브 구분
- var sorddeptkind = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/orddeptkind"); // 센터/대표 구분
- var ssupdeptcd = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/supdeptcd"); // 상위부서코드
- var sorddeptflag = "";
- if (sorddeptkind == "C") { // 센터이면
- sorddeptflag = "C";
- //} else if (sorddeptkind != "C" && sordclsdeptflag == "A") { // 센터가 아니면서 분과이면
- // sorddeptflag = "A";
- } else { // 그외에 기타과
- sorddeptflag = "etc";
- }
-
-
- model.setValue("/root/main/cond/ordclsdeptflag",sorddeptflag);
- model.setValue("/root/main/cond/supdeptcd",ssupdeptcd);
-
- model.makeValue("/root/send/ordclsdeptflag", model.getValue("/root/main/cond/ordclsdeptflag"));
- model.makeValue("/root/send/supdeptcd", model.getValue("/root/main/cond/supdeptcd"));
-
-
-
- submit("TRMNO00902");
- //진료의콤보 전체추가-kys-20091116
- if(getNodesetCount("/root/init/orddr/orddr") > 0){
- if(getUserInfo("dutplceinstcd") == seoulinstcd && model.getValue("/root/main/cond/orddeptcd") == Eyedeptcd){
- //서울성모이면서 안센터이면 전체의사 추가 제외-20091116-kys
- }else{
- addComboInstance("/root/init/orddr", "deptcd^userid^usernm", "0000000000^00000000^전체의사", "orddr");
- model.resetInstanceNode("/root/main/cond/orddrid");
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.10.14
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 외래 Actng 관리 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch() {
-
- model.removeNodeset("/root/main/prcpendlist/prcpendlist");
-
- grd_prcpendlist.fixedcellischeck(0,0) = false;
-
- model.removeNodeset("/root/send");
- model.makeNode("/root/send");
-
- model.makeValue("/root/send/enddd" , model.getValue("/root/main/cond/enddd"));
- model.makeValue("/root/send/orddeptcd" , model.getValue("/root/main/cond/orddeptcd"));
- model.makeValue("/root/send/orddrid" , model.getValue("/root/main/cond/orddrid"));
- model.makeValue("/root/send/execflag" , model.getValue("/root/main/cond/execflag"));
-
- /* 센터개념으로 인해 추가 - 20090305 */
- model.makeValue("/root/send/ordclsdeptflag", model.getValue("/root/main/cond/ordclsdeptflag"));
- model.makeValue("/root/send/supdeptcd", model.getValue("/root/main/cond/supdeptcd"));
- //20090811-kys(서울성모인경우 수납전에도 진료예약일시가 조회되어야 한다)
- if(getUserInfo("dutplceinstcd") == seoulinstcd){
- model.makeValue("/root/send/seoulyn" , "Y");
- }
- submit("TRMNO00901");
-
- for(var i = 1 ; i <= grd_prcpendlist.rows ; i++ ){
- if(model.getValue("/root/main/prcpendlist/prcpendlist["+i+"]/endacptdt") !=""){
- grd_prcpendlist.isReadOnly(i, grd_prcpendlist.colRef("chk")) = true;
- } else {
- grd_prcpendlist.isReadOnly(i, grd_prcpendlist.colRef("chk")) = false;
- }
- }
- //fSetGridData();// 구분에 따른 마감버튼 제어기능
- fSetBackColor() //20090226추가(미수납자에 대한 색표시)
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.10.14
- * @by : 하재륜
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 외래 Actng 관리 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSave() {
-
- //var grdData = getGridUpdateData(grd_prcpendlist);
-
- //model.removeNodeset("/root/send/data");
- //model.makeValue("/root/send/data", grdData);
-
- var Row = grd_prcpendlist.rows;
- var prcpdetlPATH = "/root/main/prcpendlist/prcpendlist"
- var iRow = grd_prcpendlist.row;
- var sSrchData = "";
-
- var chek = 0;
- var kRow = 0;
- for (i=1; i<Row; i++){
- chek = chek + grd_prcpendlist.textmatrix(i,0);
- if(grd_prcpendlist.textmatrix(i,0) == "true"){
- kRow = kRow +","+ i
- }
- }
- if(chek==0){
- messageBox("하나 이상의 처방내역을", "C002")
- return;
- }
- for (i=1; i<Row; i++){
- //alert(grd_prcpendlist.textmatrix(i,0));
- if(grd_prcpendlist.textmatrix(i,0) == "true"){
- //var sSrchData = "";
- var sSrchHeader = "m▦rownum▦chk▦pid▦patnm▦sexage▦prcpstat▦prcpkindcd▦prcpclscd▦prcpcd▦prcpnm▦prcpvol▦prcpqty▦prcpdayno▦calcflag▦payflagcd▦prcprgstdt▦execdd▦endacptdt▦endid▦enddd▦prcpdd▦prcpno▦prcphistno▦instcd▩";
- var sSrchData = sSrchData
- + "u" +"▦"
- + i +"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/chk" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/pid" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/patnm" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/sexage" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpstat" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpkindcd" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpclscd" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpcd" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpnm" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpvol" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpqty" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpdayno" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/calcflag " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/payflagcd " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcprgstdt" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/execdd " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/endacptdt " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/endid " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/enddd " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpdd " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcpno " )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/prcphistno" )+"▦"
- + model.getValue(prcpdetlPATH+ "["+i+"]/instcd" )+"▩";
- } // if end
- } // for end
-
- model.removenode("/root/send/data");
- model.makeValue("/root/send/data", sSrchHeader + sSrchData);
-
-
- model.makeValue("/root/send/enddd", model.getValue("/root/main/cond/enddd"));
- model.makeValue("/root/send/enddeptcd", model.getValue("/root/main/cond/orddeptcd"));
-
-
- submit("TXMNO00901");
-
- fSearch();
- }
- /**
- * @group :
- * @ver : 2009.02.26
- * @by : 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 미수납환자 백그라운드 색표시
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSetBackColor() {
-
- var calcflag;
- for(var i = 1; i < grd_prcpendlist.rows; i++) {
- calcflag = model.getValue("/root/main/prcpendlist/prcpendlist[" + i + "]/calcflag");
-
- if(calcflag != "Y" ) { //미수납환자
- grd_prcpendlist.cellstyle("background-color", i, 1, i, grd_prcpendlist.cols-1) ="#ffff00";
- }else {
- grd_prcpendlist.cellstyle("background-color", i, 1, i, grd_prcpendlist.cols-1) ="#FFFFF8";
- }
-
- }
- grd_prcpendlist.refresh();
- }
- /**
- * @group :
- * @ver : 2009.11.16
- * @by :
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : Add Combo
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function addComboInstance(combopath, nodename, nodeval, parentnode){
- nodename = nodename.split("^");
- nodeval = nodeval.split("^");
- if(nodename.length != nodeval.length){
- return;
- }
-
- var label = model.instances(0).createElement(nodename[0]);
- var val = model.instances(0).createElement(nodename[1]);
- var val2 = model.instances(0).createElement(nodename[2]);
- var combo = model.instances(0).createElement(parentnode);
- label.value = "" + nodeval[0] + "";
- val.value = "" + nodeval[1] + "";
- val2.value = "" + nodeval[2] + "";
-
- combo.appendChild(label);
- combo.appendChild(val);
- combo.appendChild(val2);
-
- chkNode = model.instances(0).selectSingleNode(combopath);
- if(chkNode == null){
- model.makeNode(combopath);
- srcNode = model.instances(0).selectSingleNode(combopath);
- }else{
- srcNode = model.instances(0).selectSingleNode(combopath);
- }
-
- desNode = model.instances(0).selectSingleNode(combopath + "/" + parentnode);
- srcNode.insertBefore(combo, desNode);
- model.refresh();
- }
|