123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- /* ---------------------------------------------------------------------
-
- SMRSD07200_진단검사과 처방집계 출력(경북대).xrw (SMRSD07200.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- : Create By Chungpd.
- : 2010.12.08
- ---------------------------------------------------------------------- */
- var vProgramCls = "SMRSD07100";
- //
- var vGoodReqPath = "/root/main/list/goodreq/goodreqlist";
- var xAuth = !(checkAuth("X"));
- var pAuth = !(checkAuth("P"));
- var DataPath = "/root/main/RscmggbnEmpData";
- var MainPath = "/root/main/RscmggbnLists/rscmggbnlist";
- var ListsPath = "/root/main/RscmggbnEmpLists";
- var ListPath = "/root/main/RscmggbnEmpLists/rscmggbnemplist";
-
- var HidePath = "/root/WorkData/HideData";
-
- var TreePath = "/root/main/RscmgubnLists/TreeList";
- var WorkPath = "/root/init/WorkInit";
- var CompPath = "/root/init/CompareInit";
-
- var TreeSendPath = "/root/send/SearchTree";
- // --------------------------------------------------
- // Tree정보 가져오기
- // --------------------------------------------------
- function fInit() {
-
- // 화면 Control을 초기화한다
- fInitialize();
-
- return;
- }
-
- // --------------------------------------------------------------
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- // --------------------------------------------------------------
- function fInitialize() {
-
- model.setValue(opt_instcd.attribute("ref") , getUserInfo("dutplceinstcd")); // 기관코드
- model.setValue(opt_instcdnm.attribute("ref") , getUserInfo("dutplceinstnm")); // 기관코드명
- // model.setValue(ipt_prcpdeptcd.attribute("ref"), getUserInfo("dutplcecd")); // 시행부서
- // model.setValue(ipt_prcpdeptnm.attribute("ref"), getUserInfo("dutplcenm")); // 시행부서명
- var curdate = getCurrentDate();
- var cvtdate = curdate.toDate("YYYYMMDD");
-
- model.setValue(ipt_prcpdd.attribute("ref") , curdate);
- model.setValue(ipt_prcpdd2.attribute("ref"), curdate);
- model.setValue(rdo_sumflag.attribute("ref") , "Y");
- //model.setValue(rdo_ioflag.attribute("ref") , "");
- //model.setValue(rdo_prntmthd.attribute("ref") , "G");
-
- model.removeNodeset("/root/main/list/prcpgoodcase/prcpgoodcaselist");
- model.removeNodeset("/root/main/list/prcppatcase/prcppatcaselist");
- //ipt_prcpdd.dispatch("xforms-value-changed");
- model.refresh();
- }
-
- function fDataSearchTree() {
-
- // if (fCheckRetrieveData(false) == false) return;
-
- submit("TRRSD07103");
-
- trv_setcode.rebuild();
- }
-
- // 처방전달물품내역조회
- function fDataSearchDetail(pIdx)
- {
- var rPath = "/root/send/SearchTree";
- var dPath = "/root/send/prcppatcaseinfo";
- var tPath = "/root/main/PrcpGoodTrees/TreeList";
-
- var vCaption = " 처방전달물품";
-
- // if (fCheckRetrieveData(false) == false)return; // 입력항목 Check
-
- var Idx = pIdx + 1;
- var sDepth = model.getValue(tPath +"["+Idx+"]/depth" );
- var vCodeCd = model.getValue(tPath +"["+Idx+"]/codecd" );
- var vCodeNm = model.getValue(tPath +"["+Idx+"]/codenm" );
- var vBaseCd = model.getValue(tPath +"["+Idx+"]/basecode");
- var Tree2 = trv_setcode.item(pIdx);
- //var ioflag = model.getValue(rdo_ioflag.attribute("ref"));
-
- //cpt_disp.value = "";
- //cpt_disp.refresh();
-
- if (vCodeCd == "") return;
-
- model.setValue(dPath + "/instcd" , model.getValue(rPath + "/instcd" )); // 01 기관코드
- model.setValue(dPath + "/prcpdd" , model.getValue(rPath + "/prcpdd" )); // 02 처방일자
- model.setValue(dPath + "/prcpdd2" , model.getValue(rPath + "/prcpdd2" )); // 02 처방일자
- model.setValue(dPath + "/sumflag" , model.getValue(rPath + "/sumflag" )); // 04 집계여부
- model.setValue(dPath + "/reqflag" , model.getValue(rPath + "/reqflag" )); // 05 청구구분
- model.setValue(dPath + "/reqdeptcd" , "" ); // 06 처방부서
- model.setValue(dPath + "/reqprid" , model.getValue(rPath + "/reqprid" )); // 07 청구주기
- model.setValue(dPath + "/prcpdeptcd" , "" ); // 08 시행부서
- model.setValue(dPath + "/goodcd" , model.getValue(rPath + "/goodcd" )); // 09 물품코드
- //model.setValue(dPath + "/ioflag" , model.getValue(rPath + "/ioflag" )); // 10 입외구분
- model.setValue(dPath + "/deptgr" , "" ); // 11 부서그룹
- model.setValue(dPath + "/pid" , model.getValue(rPath + "/pid" )); // 12 환자번호
- model.setValue(dPath + "/patnm" , model.getValue(rPath + "/patnm" )); // 13 환자명
- model.setValue(dPath + "/purcflag" , model.getValue(rPath + "/purcflag" )); // 14 구매구분
- model.setValue(dPath + "/prodcmpynm" , model.getValue(rPath + "/prodcmpynm" )); // 15 제조회사명
- model.setValue(dPath + "/suplplcecdnm", model.getValue(rPath + "/suplplcecdnm" )); // 16 주거래처명
- model.setValue(dPath + "/suppcustnm" , model.getValue(rPath + "/suppcustnm" )); // 17 보조거래처명
- model.setValue(dPath + "/prntmthd" , 'G' ); // 18 출력형식
- model.setValue(dPath + "/sumcnt" , model.getValue(rPath + "/sumcnt" )); // 19 집계횟수
-
- // 선불출 조회조건 추가 이창록
- model.makeValue(dPath + "/querycls" , model.getValue("/root/send/SearchTree/querycls")); // 19 라디오박스 선불출코드
- // 물류창고 조회조건 추가
- model.setValue(dPath + "/wareflag" , model.getValue(rPath + "/wareflag" )); // 창고구분(물류창고)
- model.setValue(dPath + "/scrnid" , "SMRSD07200" ); // 창고구분(물류창고)
-
- var vCls = parseInt(rdo_viewcls.value+sDepth);
-
- switch(vCls) {
- case 01 : vCaption = " :: 전체" ;
- break;
- case 02 :
- model.setValue(dPath + "/prcpdeptcd" , vCodeCd );
- vCaption = "시행부서 : "+vCodeCd + " - " + vCodeNm;
- // grd_goodreq.colwidth(3) = "74";
- break;
- case 11 : model.setValue(dPath + "/reqdeptcd" , vCodeCd);
-
- vCaption = "처방부서 : "+ vCodeCd + " - " + vCodeNm;
- // grd_goodreq.colwidth(3) = "74";
-
- break;
- case 12 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd );
-
- vCode = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codecd" );
- vName = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codenm" );
-
- model.setValue(dPath + "/reqdeptcd" , vCode );
-
- vCaption = "처방부서 : "+vCode + " - " + vName + " >> 시행부서 : "+vCodeCd+ " - "+vCodeNm;
-
- // grd_goodreq.colwidth(3) = "0";
- break;
- case 21 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd );
-
- vCaption = "시행부서 : "+vCodeCd + " - " + vCodeNm;
- // grd_goodreq.colwidth(3) = "74";
- break;
- case 22 : model.setValue(dPath + "/reqdeptcd" , vCodeCd);
- vCode = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codecd" );
- vName = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codenm" );
-
- model.setValue(dPath + "/prcpdeptcd" , vCode );
- vCaption = "시행부서 : "+vCode + " - " + vName + " >> 처방부서 : "+vCodeCd+ " - "+vCodeNm ;
- break;
- case 31 : model.setValue(dPath + "/prcpdeptcd" , vCodeCd );
-
- vCaption = "시행부서 : "+vCodeCd + " - " + vCodeNm;
- // grd_goodreq.colwidth(3) = "74";
- break;
- case 32 : model.setValue(dPath + "/goodcd" , vCodeCd);
- vCode = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codecd" );
- vName = model.getValue(tPath +"["+(Tree2.parentindex + 1)+"]/codenm" );
-
- model.setValue(dPath + "/prcpdeptcd" , vCode );
- vCaption = "시행부서 : "+vCode + " - " + vName + " >> 물품코드 : "+vCodeCd+ " - "+vCodeNm ;
- }
-
- //
- ////cpt_disp.value = vCaption; // + " 처방전달물품";
- if (model.getValue(dPath + "/prntmthd") == "P"){
- submit("TRRSD07101"); //환자별 집계내역
- }else{
- submit("TRRSD07102"); //물품별 집계내역
- }
-
- //fGrdiDataValid();
- ////cpt_disp.refresh();
-
- }
-
- // 조회 결과 Count Setting
- function fAfterRetrieve() {
- // case 1 count
- model.setValue(opt_goodreqcnt.attribute("ref"),(grd_goodreq.rows-grd_goodreq.fixedRows));
-
- model.refresh();
- }
-
- /***********************************************************
- * 물품 처방 집계에서 사용한 Script
- ************************************************************/
- // 부서코드 읽어오기...
- function fDeptValidationCheck(pData1, pData2, pCodeName) {
-
- if (pData1.value.length == 0) {
- pData2.value = "";
- } else {
- rszfValidationCheck("TRRPZ00201", "deptcodelist", "refcond,deptnm","deptnm," + pData1.value,"", pCodeName, pData1, "SPRPZ00200", "","");
- }
-
- model.refresh();
- }
-
-
-
- /* ------------------------------------------------- */
- /* ------End Of List ------------------------------- */
- /* -------------------------------------------------- */
|