123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- /*
- 초진환자_진료부도_지표관리 (SMMNO03200.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- /**
- * @group :
- * @ver : 2009.10.19
- * @by : 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInitialize(){
- model.removenode("/root/main/outrsrvpatlist");
- model.refresh();
- var instcd = getUserInfo("dutplceinstcd");
- var rslt_ref = "/root/init/orddept";
- var dt = getCurrentDate();
- //오늘 날짜로 초기화 하는 부분.(진료일자를 default로 오늘 날짜로 선택함)
- model.setValue("/root/main/cond/ordfromdd", dt);
- model.setValue("/root/main/cond/ordtodd", dt);
- // 간호외래진료부서콤보 (특정하위부서를 포함- 분만실, 육아상담실, 인공신장실)
- zsdfGetCareOutOrderDepartmentList(instcd, rslt_ref, dt);
- addComboInstance("/root/init/orddept", "deptcd^depthngnm", "0000000000^전체진료과", "dept"); //진료부서 콤보 전체추가
- model.resetInstanceNode("/root/main/cond/orddept");
- // 공통코드 스크립트 호출
- //zbcfGetCodeList( new Array("Z0008"), new Array("/root/init/comcd"));
- var dutplcecd = getUserInfo("dutplcecd"); // 근무지부서코드
- if (dutplcecd != "") {
- model.setValue("/root/main/cond/orddeptcd", dutplcecd); // 근무지부서코드
- fDeptDoctSearch(); // 의사리스트조회
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.09.17
- * @by : 문창곤
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진료과의 의사 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fDeptDoctSearch(){
- cmb_orddr.disabled = false;
- model.removenode("/root/main/outrsrvpatlist");
- model.refresh();
- model.makeValue("/root/send/reqdata/orddd", model.getValue("/root/main/cond/ordfromdd"));
- model.makeValue("/root/send/reqdata/orddeptcd", model.getValue("/root/main/cond/orddeptcd"));
- var sordclsdeptflag = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/ordclsdeptflag"); // 센터/대표/분과/서브 구분
- var ssupdeptcd = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/supdeptcd"); // 상위부서코드
- var sorddeptkind = model.getValue("/root/init/orddept/dept[deptcd = '"+model.getValue("/root/main/cond/orddeptcd")+"']/orddeptkind"); // 센터/대표 구분
- 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/reqdata/ordclsdeptflag", sorddeptflag);
- model.makeValue("/root/send/reqdata/supdeptcd", ssupdeptcd);
- submit("TRMNO00104");
- if(getNodesetCount("/root/init/orddr/orddr") > 0){
- for(var i = 0; i < grd_OutRsrvPatList.cols;i++) {
- grd_OutRsrvPatList.colsort(i) = "asc";
- }
- } else {
- model.makenode("/root/init/orddr");
- model.makenode("/root/init/orddr/orddr");
- model.makenode("/root/init/orddr/orddr/userid");
- model.makenode("/root/init/orddr/orddr/usernm");
- }
- addComboInstance("/root/init/orddr", "userid^userdepthngnm", "00000000^전체의사", "orddr"); //진료의콤보 전체추가
- model.resetInstanceNode("/root/main/cond/orddr");
- cmb_orddr.refresh();
- }
- /**
- * @group :
- * @ver : 2009.10.19
- * @by : 김양수
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 초진 환자리스트 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBtnRefClicked(){
- model.removenode("/root/main/outrsrvpatlist");
- model.refresh();
- var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2;
- if(cmb_orddept.value == "") {
- messageBox("진료과를 선택하지 ","E007");
- return;
- }
- //진료의 확인추가(진료의선택하지않아도 전체의사조회됨)-20090910-kys
- if(cmb_orddr.value == "") {
- messageBox("진료의를 선택하지 ","E007");
- return;
- }
- model.makeValue("/root/main/cond/tabflag", switch1.selectedIndex);
- model.makenode("/root/send/req");
- model.copynode("/root/send/req", "/root/main/cond");
- if(submit("TRMNO03201")){
- model.setValue("/root/main/cond/cnt", objGrid.rows - objGrid.fixedRows);
- for ( var nCnt = objGrid.fixedRows; nCnt < objGrid.rows; nCnt++ ) {
- var strVal = model.getValue("/root/main/outrsrvpatlist/outrsrvpatinfo[" + (nCnt - objGrid.fixedRows + 1) + "]/ordddbf");
- if ( strVal == "예약대기" )
- objGrid.cellstyle("font-weight", nCnt, 9) = "bold";
- }
- opt_cnt.refresh();
- }
- objGrid.refresh();
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2010.02.05
- * @by : 이원태
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 통계 데이터 저장
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBtnSaveClicked(){
- if ( messageBox("진료일이 현재일 이상일 경우 저장 가능합니다.\n","Q002") == "7" )
- return;
- model.makeValue("/root/main/cond/tabflag", switch1.selectedIndex);
- var sReq = "chk▦instcd▦pid▦orddd▦cretno▦indxitem▦status▦remark▦status_old▦remark_old▩";
- var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2;
- var strPath = "/root/main/outrsrvpatlist/outrsrvpatinfo";
- for ( var nCnt = objGrid.fixedRows; nCnt < objGrid.rows; nCnt++ ) {
- sReq += model.getValue(strPath + "[" + nCnt + "]/chk") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/instcd") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/pid") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/orddd") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/cretno") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/indxitem") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/status") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/remark") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/status_old") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/remark_old") + "▩";
- }
- model.removenode("/root/send/req");
- model.makeValue("/root/send/req" , sReq);
- submit("TRMNO03202")
- fBtnRefClicked();
- }
- /**
- * @group :
- * @ver : 2010.02.05
- * @by : 이원태
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 통계 데이터 수정 취소
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fBtnResetClicked(){
- if ( messageBox("진료일이 현재일 이상일 경우 취소 가능합니다.\n","Q007") == "7" )
- return;
- model.makeValue("/root/main/cond/tabflag", switch1.selectedIndex);
- var sReq = "chk▦instcd▦pid▦orddd▦cretno▦indxitem▦status▦remark▦status_old▦remark_old▩";
- var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2;
- var strPath = "/root/main/outrsrvpatlist/outrsrvpatinfo";
- for ( var nCnt = objGrid.fixedRows; nCnt < objGrid.rows; nCnt++ ) {
- sReq += model.getValue(strPath + "[" + nCnt + "]/chk") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/instcd") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/pid") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/orddd") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/cretno") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/indxitem") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/status") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/remark") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/status_old") + "▦"
- + model.getValue(strPath + "[" + nCnt + "]/remark_old") + "▩";
- }
- model.removenode("/root/send/req");
- model.makeValue("/root/send/req" , sReq);
- submit("TRMNO03203")
- fBtnRefClicked();
- }
- /**========================================================================================================================================
- * 엑셀저장 버튼 클릭시
- =========================================================================================================================================*/
- function fBtnExcelClicked() {
- var objGrid = switch1.selectedIndex == 0 ? grd_OutRsrvPatList : grd_OutRsrvPatList2;
- if ( objGrid.rows == objGrid.fixedRows ) {
- messageBox("엑셀파일로 저장할 리스트 내역이", "I004");
- return;
- }
- var fileName = window.fileDialog("save", ",", false, "해피콜관리", "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- if (fileName != "")
- objGrid.saveExcel(fileName, "SheetName", false, false, "", "", false);
- }
- /**
- * @desc : 콤보박스에 원하는 instance node와 value를 설정
- * @
- * @param :
- * @event :
- * @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 combo = model.instances(0).createElement(parentnode);
- label.value = "" + nodeval[0] + "";
- val.value = "" + nodeval[1] + "";
- combo.appendChild(label);
- combo.appendChild(val);
- 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();
- }
|