123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- /**
- * 파 일 명 : SMADC00100.js
- * 설 명 : 의뢰관리 Javascriot
- * 설 계 자 : 공두경
- * 작 성 자 : 공두경
- * 수정이력 : 2007.07.09 / 최초작성 / 공두경
- */
- /**
- * 초기화
- */
- function fInit() {
- // 날짜 초기화
- var pre_startreqdd = new Date();
- var pre_startrepldd = new Date();
-
- fChoiADRRept("2");
-
- model.setValue("/root/hidden/srchinfo/startreqdd", pre_startreqdd.getAddDate(-1).getDateFormat()); // 상대일자 (로컬PC의 시간기준)
- model.setValue("/root/hidden/srchinfo/endreqdd", getCurrentDate());
- model.setValue("/root/hidden/srchinfo/startrepldd", pre_startrepldd.getAddDate(-1).getDateFormat());// 상대일자 (로컬PC의 시간기준)
- model.setValue("/root/hidden/srchinfo/endrepldd", getCurrentDate());
-
- // 20100119_laboru_약제팀 이외에는 조회만 가능하게 막기
- fCheckPharm();
-
-
- //진료과/병동 조회
- fGetDeptCombo();
- astfAddCombo("/root/hidden/deptlist", "dept", "deptcd,deptnm", "A,전체선택"); //2010-01-25 진료과 멀티선택 가능하도록 추가처리
- astfAddCombo("/root/hidden/deptlist", "ward", "wardcd,wardnm", ",");
-
- model.refresh();
- }
- /**
- * 진료과 조회
- */
- function fGetDeptCombo() {
- submit("TRADC00101");
- }
- /**
- * 의뢰 조회
- */
- function fReqMngtData() {
-
- //2010-01-22 검체접수일자 조회
- if (model.getValue("/root/hidden/srchinfo/lisddchk") == "L") {
- model.setValue("/root/hidden/srchinfo/tdmreqnochk" , model.getValue("/root/init/srchinfo/tdmreqnochk")); //2010-01-22 의뢰/미의뢰/전체 구분추가
- }
-
- //2010-01-25 진료과 멀티선택 가능하도록 처리
- if (model.getValue("/root/hidden/srchinfo/reqdeptcd") !="") {
- var reqdeptData = (model.getValue("/root/hidden/srchinfo/reqdeptcd")).split("|");
- var reqdept="";
- for(var i = 0; i < reqdeptData.length; ++i) {
- if (reqdeptData[i]!="") { //전체선택시 맨끝부분이 Null이 들어감
- if (i == 0) reqdept = reqdeptData[i];
- else reqdept += "','" + reqdeptData[i] ;
- }
- }
- if (reqdept !="") {
- model.setValue("/root/hidden/srchinfo/reqdeptcd" , reqdept);
- }
- }
-
- //2010-01-25 TDM 의뢰약물 멀티선택 가능하도록 처리
- if (model.getValue("/root/hidden/srchinfo/tdmdrugcd") !="") {
- var tdmdrugData = (model.getValue("/root/hidden/srchinfo/tdmdrugcd")).split("|");
- var tdmdrug="";
- for(var i = 0; i < tdmdrugData.length; ++i) {
- if (tdmdrugData[i]!="") { //전체선택시 맨끝부분이 Null이 들어감
- if (i == 0) tdmdrug = tdmdrugData[i];
- else tdmdrug += "','" + tdmdrugData[i] ;
- }
- }
- if (tdmdrug !="") {
- model.setValue("/root/hidden/srchinfo/tdmdrugcd" , tdmdrug);
- }
- }
-
- model.copyNode("/root/send/srchinfo","/root/hidden/srchinfo");
-
- if(model.getValue("/root/send/srchinfo/pidonly") != ""){
- if(model.getValue("/root/send/srchinfo/reqpid") == ""){
- messageBox("등록번호를","C001");
- return;
- }
- }
-
- submit("TRADC00102");
-
- }
- /**
- * 의뢰구분에 따라 팝업 생성
- */
- function fOpenPopup() {
- modal("SMADC01600",0,100,100,"SMADC01600","/root/main/reqlist/reqlist["+grd_reqlist.row+"]","/root/hidden/srchinfo");
- }
- /**
- * 입원외래 구분 변경시
- */
- function fChgIOFlag() {
- var ioflag = model.getValue("/root/hidden/srchinfo/ioflag");
- if(ioflag == "O"){
- model.setValue("/root/hidden/srchinfo/reqwardcd", "");
- combo1.disabled = true;
- } else {
- combo1.disabled = false;
- }
- model.refresh();
- }
- /**
- * 약제팀 이외에는 조회만 가능하게 막기
- */
- function fCheckPharm() {
- model.setValue("/root/send/chkpid", getUserInfo("userid"));
-
- submit("TRADC00104");
-
- if(model.getValue("/root/hidden/chkpid/pharm/pharmflag") != "Y") {
-
- grd_reqlist.valueMatrix(0, grd_reqlist.colRef("replpharmst")) = "회신자"; // 20110907_laboru_약제부가 아니면 회신약사 컬럼을 회신자로 변경
- model.setValue("/root/temp/cnstinfo/pidchkflag", "Y");
- } else {
- }
- }
-
- //ADR보고 선택
- function fChoiADRRept(pFlag) {
- if(pFlag == "1") {
- model.setValue("/root/hidden/srchinfo/tdmreqnochk", "N");
- chk_fstvaluyn.visible = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("fstvalunm")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("fstvaludd")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("fstvalutm")) = false;
-
- grd_reqlist.colHidden(grd_reqlist.colRef("drugcd")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("drugnm")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("symp")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("casrslt")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("serigrde")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("sympmnftgrde")) = false;
-
- grd_reqlist.colHidden(grd_reqlist.colRef("advscnts")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("cmt")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("adrcntssmm")) = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("srchcnts")) = false;
-
- } else if(pFlag == "2"){
- chk_fstvaluyn.visible = false;
- grd_reqlist.colHidden(grd_reqlist.colRef("fstvalunm")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("fstvaludd")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("fstvalutm")) = true;
-
- grd_reqlist.colHidden(grd_reqlist.colRef("drugcd")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("drugnm")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("symp")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("casrslt")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("serigrde")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("sympmnftgrde")) = true;
-
- grd_reqlist.colHidden(grd_reqlist.colRef("advscnts")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("cmt")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("adrcntssmm")) = true;
- grd_reqlist.colHidden(grd_reqlist.colRef("srchcnts")) = true;
- }
- }
|