123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : DBS
- * Job Name :
- * File Name : SMMRC00100.xjs
- * Creator :
- * Make Date : 2014-11-21
- *
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-11-21 DBS Converting Program(TF->XP)
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Transaction Callback
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01.sSvcId : 서비스 ID
- * : 02.nErrorCode : 에러코드
- * : 03.sErrorMsg : 에러메시지
- * Description : tr_getCodeList의 콜백함수
- ****************************************************************************************/
- function cf_TRPMC02500(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- arErrorCode.push(sSvcId, nErrorCode);
- //sysf_trace("***** cf_TRPMC02500 *****");
- }
- function cf_TRMRC00144(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00144 *****");
- ds_grd_chrtlist.enableevent = false;
- ds_grd_chrtlist.rowposition = -1;
- ds_grd_chrtlist.enableevent = true;
- if(ds_grd_chrtlist.rowcount > 0){
- var medirecno = ds_grd_chrtlist.getColumn(0, "medirecno");
- if (!utlf_isNull(medirecno)) {
- ds_send_reqdata.setColumn(0, "ioflag" , "O");
- ds_send_reqdata.setColumn(0, "medirecno", medirecno);
- ds_send_reqdata.setColumn(0, "pid" , ds_grd_chrtlist.getColumn(0, "pid"));
-
- var oParam = {};
- oParam.id = "TRMRC00170";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqGetChrtLendList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_grd_chrtlendlist=chrtlendlist";
- oParam.async = false;
- oParam.callback = "cf_TRMRC00170";
- tranf_submit(oParam);
- }
- }
-
- }
- function cf_TRMRC00145(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00145 *****");
-
- ds_grd_emrlist.rowposition = -1;
- }
- function cf_TRMRC00146(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00146 *****");
-
- ds_grd_healexam.rowposition = -1;
- }
- function cf_TRMRC00170(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00170 *****");
-
- ds_grd_chrtlendlist.rowposition = -1;
- }
- function cf_TRMRC00147(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00147 *****");
-
- var msgER = "";
- var msgAH = "";
- var dataCnt = ds_main_chrtinfo_oldimglist.rowcount;
- for (var i = 0 ; i < dataCnt ; i++)
- {
- var cls = ds_main_chrtinfo_oldimglist.getColumn(i, "cls");
- var cnt = ds_main_chrtinfo_oldimglist.getColumn(i, "cnt");
- // 구영상 응급의학과
- if (cls == "E") {
- msgER = "▣ 구영상 응급의학과 (" + cnt + "건)";
- }
- // 구영상 건진
- if (cls == "S") {
- msgAH = "▣ 구영상 건진 (" + cnt + "건)";
- }
- }
- ds_hidden.setColumn(0, "cap_oldimgER", msgER);
- ds_hidden.setColumn(0, "cap_oldimgAH", msgAH);
- }
- function cf_TRMRC00143(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00143 *****");
-
- ds_grd_chngroom.rowposition = -1;
- }
-
- function cf_TRMRC00141(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00141 *****");
-
- ds_grd_pamlist.rowposition = -1;
- }
-
- function cf_TRMRC00142(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00142 *****");
-
- ds_grd_inpam.rowposition = -1;
- }
- function cf_TXMRC00151(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TXMRC00151 *****");
-
- var e = new ClickEventInfo;
- frmf_inputEnterKey("group2.switch1.ChrtInfo.btn_SrchChrtInfo", "onclick", e);
- }
- function cf_TRMRC00100(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- //sysf_trace("***** cf_TRMRC00100 *****");
-
- // Default Value Setting!
- var nRow = ds_init_lendmastinfo_rendcdlist.insertRow(0);
- ds_init_lendmastinfo_rendcdlist.setColumn(nRow, "rendcd", "ALL");
- ds_init_lendmastinfo_rendcdlist.setColumn(nRow, "rendresn", "전체");
- nRow = ds_init_lendmastinfo_lenddeptlist.insertRow(0);
- ds_init_lendmastinfo_lenddeptlist.setColumn(nRow, "lenddeptcd", "ALL");
- ds_init_lendmastinfo_lenddeptlist.setColumn(nRow, "lenddeptnm", "전체");
- nRow = ds_init_lendmastinfo_chrtdeptlist.insertRow(0);
- ds_init_lendmastinfo_chrtdeptlist.setColumn(nRow, "chrtdeptcd", "ALL");
- ds_init_lendmastinfo_chrtdeptlist.setColumn(nRow, "chrtdeptnm", "전체");
- nRow = ds_init_lendmastinfo_chrtchgrlist.insertRow(0);
- ds_init_lendmastinfo_chrtchgrlist.setColumn(nRow, "chgruserid", "ALL");
- ds_init_lendmastinfo_chrtchgrlist.setColumn(nRow, "chgrusernm", "전체");
- nRow = ds_init_lendmastinfo_keepplcelist.insertRow(0);
- ds_init_lendmastinfo_keepplcelist.setColumn(nRow, "keepno", "ALL");
- ds_init_lendmastinfo_keepplcelist.setColumn(nRow, "keepplce", "전체");
-
-
-
- //공통코드 가져오기...
- //M0392:챠트미대출사유코드
- group2.switch1.Receipt.iv_Receipt.ds_init_M0392.copyData(ds_init_M0392);
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_M0392.copyData(ds_init_M0392);
- // copyNode(iv_Receipt.model , model, "/root/init/M0392", "/root/init/M0392");
- // copyNode(iv_ChrtLend.model, model, "/root/init/M0392", "/root/init/M0392");
- //M0412:과보관사유코드
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_M0412.copyData(ds_init_M0412);
- // copyNode(iv_ChrtRtn.model , model, "/root/init/M0412", "/root/init/M0412");
- //M0424:차트상태(분실)코드
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_M0424.copyData(ds_init_M0424);
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_M0424.copyData(ds_init_M0424);
- // copyNode(iv_ChrtLend.model , model, "/root/init/M0424", "/root/init/M0424");
- // copyNode(iv_ChrtRtn.model , model, "/root/init/M0424", "/root/init/M0424");
-
-
-
-
- //대출마스터정보 가져오기...
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_rendcdlist.copyData(ds_init_lendmastinfo_rendcdlist);
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_lenddeptlist.copyData(ds_init_lendmastinfo_lenddeptlist);
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_chrtdeptlist.copyData(ds_init_lendmastinfo_chrtdeptlist);
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_chrtchgrlist.copyData(ds_init_lendmastinfo_chrtchgrlist);
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist.copyData(ds_init_lendmastinfo_keepplcelist);
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist_filter.copyData(ds_init_lendmastinfo_keepplcelist);
- group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist_filter.filter("keepno != 'ALL'");
- group2.switch1.Receipt.iv_Receipt.chk_prnplce.setBindDataset(group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist_filter,"keepno","keepplce");
-
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_rendcdlist.copyData(ds_init_lendmastinfo_rendcdlist);
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_lenddeptlist.copyData(ds_init_lendmastinfo_lenddeptlist);
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_chrtdeptlist.copyData(ds_init_lendmastinfo_chrtdeptlist);
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_chrtchgrlist.copyData(ds_init_lendmastinfo_chrtchgrlist);
- group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_keepplcelist.copyData(ds_init_lendmastinfo_keepplcelist);
-
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_rendcdlist.copyData(ds_init_lendmastinfo_rendcdlist);
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_lenddeptlist.copyData(ds_init_lendmastinfo_lenddeptlist);
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_chrtdeptlist.copyData(ds_init_lendmastinfo_chrtdeptlist);
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_chrtchgrlist.copyData(ds_init_lendmastinfo_chrtchgrlist);
- group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_keepplcelist.copyData(ds_init_lendmastinfo_keepplcelist);
-
- // copyNode(iv_Receipt.model , model, "/root/init/lendmastinfo", "/root/init/lendmastinfo");
- // copyNode(iv_ChrtLend.model, model, "/root/init/lendmastinfo", "/root/init/lendmastinfo");
- // copyNode(iv_ChrtRtn.model , model, "/root/init/lendmastinfo", "/root/init/lendmastinfo");
-
-
- }
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var ClickTab = false;
- var displayflag = "N";
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01. :
- * : 02. :
- * Description : 화면 초기화
- ****************************************************************************************/
- /**
- * @desc : 사용자의 권한을 체크하여 버튼셋팅.
- * btn_r 조회버튼, btn_x 저장 및 수정 버튼, btn_p : 출력버튼
- * @
- * @param :
- * @return :
- * @authur : 김선태 2007. 5. 8
- * @---------------------------------------------------
- */
- function fchkAuth()
- {
- ds_checkAuth.setColumn(0, "btn_r_", frmf_checkAuth("R"));
- ds_checkAuth.setColumn(0, "btn_x_", frmf_checkAuth("X"));
- ds_checkAuth.setColumn(0, "btn_p_", frmf_checkAuth("P"));
-
- // for(var i=0; i<= document.controls.length-1 ; i++){
- // if(document.controls.item(i).elementName == "xforms:button"){
- // if(document.controls.item(i).attribute("id").substr(0,6) == "btn_r_"){
- // document.controls.item(i).disabled = !checkAuth("R");
- // }
- //
- // if(document.controls.item(i).attribute("id").substr(0,6) == "btn_x_"){
- // document.controls.item(i).disabled = !checkAuth("X");
- // }
- //
- // if(document.controls.item(i).attribute("id").substr(0,6) == "btn_p_"){
- // document.controls.item(i).disabled = !checkAuth("P");
- // }
- //
- // }
- // }
- }
- /**
- * @desc : excel 저장 하기
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.07.14
- * @---------------------------------------------------
- */
- function fExcel(gridObj, title){
- if (title == null) { title = "" }
- // var fileName = window.fileDialog("save", ",", false, title + "_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
- // if (fileName != "") {
- // gridObj.saveExcel(fileName, "SheetName", true, true, "", "", true);
- // }
- grdf_exportExcel(gridObj, title, "SheetName");
- }
- /**
- * @desc : 폼초기화
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
-
- function fFormInit()
- {
- // 2007.12.20. 부서코드가 의료정보(3230000000)가 아닌 경우 : 현위치조회 텝만 가능함...
- var deptcd = sysf_getUserInfo("dutplcecd");
-
- // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
- lf_getHardCDList("N", 5501, null, ds_temp_hardcd);
- //mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/hardcd", 5501);
- if(!utlf_isNull(ds_temp_hardcd.lookup("hardcd", deptcd, "hardcd")))
- {
- // KNUH_20101207_박성호_end
- // btn_ChrtLend.visible= true ;
- // btn_ChrtRtn.visible = true ;
- // btn_Receipt.visible = true ;
- displayflag = "Y";
- // 체크번호생성제외 보여주기 (default : 'Y')
- group2.switch1.ChrtInfo.chkyn.visible = true ;
- ds_hidden.setColumn(0, "chkyn", "Y");
- } else {
- group2.switch1.removeTabpage(3);
- group2.switch1.removeTabpage(2);
- group2.switch1.removeTabpage(1);
-
- // btn_ChrtLend.visible= false ;
- // btn_ChrtRtn.visible = false ;
- // btn_Receipt.visible = false ;
- // 체크번호생성제외 안 보여주기 (default : '')
- group2.switch1.ChrtInfo.chkyn.visible = false ;
- ds_hidden.setColumn(0, "chkyn", "N"); // "" -> "N"
- }
- //컨트롤 권한 설정
- fchkAuth();
-
- group2.switch1.tabindex = 0;
-
- //btn_ChrtInfo.dispatch("onclick");
-
- //공통코드 가져오기...
- //M0392:챠트미대출사유코드
- //M0412:과보관사유코드
- //M0424:차트상태(분실)코드
- //zbcfGetCodeList(new Array("M0392","M0412","M0424"), new Array("/root/init/M0392","/root/init/M0412","/root/init/M0424"));
- appf_getCodeList([{dsNm: "ds_init_M0392", cdGrpId: "M0392"}, {dsNm: "ds_init_M0412", cdGrpId: "M0412"}, {dsNm: "ds_init_M0424", cdGrpId: "M0424"}], true);
-
- if (displayflag == "Y") {
- // 2009.01.28. 단축키 처리를 위해 로딩 처리..
- fClickTab();
- }
- var pid ;
- if (frmf_isPopup() == true) {
- // param 환자정보
- pid = opener.frmf_getParameter("pid");
- }
- if ( utlf_isNull(pid) ) {
- // 상단 환자정보
- var paminfo =sysf_getGlobalVariable("paminfo");
- ds_init_paminfo.clearData();
- dsf_setCSVToDs("ds_init_paminfo", paminfo);
- pid = ds_init_paminfo.getColumn(0, "pid");
- }
- if ( pid == null ) { pid == ""; }
- if ( !utlf_isNull(pid) ) {
- ds_send_reqdata.setColumn(0, "pid", pid);
-
- group2.switch1.ChrtInfo.ipt_pid.updateToDataset();
-
- fGetPidNo(group2.switch1.ChrtInfo.ipt_pid, ds_hidden.getColumn(0, "chkyn"));
- fChartHistory();
-
- // keycode readonly!!!
- // var e = new KeyEventInfo;
- // frmf_inputEnterKey("group2.switch1.ChrtInfo.ipt_pid", "onkeydown", e);
- }
- }
- /**
- * @desc : 접수 탭 클릭...
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fClickTab()
- {
-
- if (ClickTab == false)
- {
- ClickTab = true;
- // 대출용도, 대출과, 차트과, 차트담당자, 보관장소
- ds_send_reqdata.setColumn(0, "ioflag" , "A"); //2010,12,28, 주희경 입원/외래 모두 조회 하도록 변경
- ds_send_reqdata.setColumn(0, "useyn" , "");
- ds_send_reqdata.setColumn(0, "allwardyn", "");
-
-
- var oParam = {};
- oParam.id = "TRMRC00100";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqGetLendMastInfo";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_init_lendmastinfo_rendcdlist=rendcdlist ds_init_lendmastinfo_lenddeptlist=lenddeptlist ds_init_lendmastinfo_chrtdeptlist=chrtdeptlist ds_init_lendmastinfo_chrtchgrlist=chrtchgrlist ds_init_lendmastinfo_keepplcelist=keepplcelist";
- oParam.async = true;
- oParam.callback = "cf_TRMRC00100";
- tranf_submit(oParam);
-
- // sysf_trace(ds_init_lendmastinfo_rendcdlist.saveXML());
- // sysf_trace(ds_init_lendmastinfo_lenddeptlist.saveXML());
- // sysf_trace(ds_init_lendmastinfo_chrtdeptlist.saveXML());
- // sysf_trace(ds_init_lendmastinfo_chrtchgrlist.saveXML());
- // sysf_trace(ds_init_lendmastinfo_keepplcelist.saveXML());
-
- // 외래차트접수현황
- group2.switch1.Receipt.iv_Receipt.url = "emr_chrtmngtxp::SSMRC03200_외래차트접수현황.xfdl";
- //group2.switch1.Receipt.iv_Receipt.fFormInit();
-
- // 외래차트대출
- group2.switch1.ChrtLend.iv_ChrtLend.url = "emr_chrtmngtxp::SSMRC03300_외래차트대출.xfdl";
- //group2.switch1.ChrtLend.iv_ChrtLend.fFormInit();
- // 외래차트반납
- group2.switch1.ChrtRtn.iv_ChrtRtn.url = "emr_chrtmngtxp::SSMRC03400_외래차트반납.xfdl";
- //group2.switch1.ChrtRtn.iv_ChrtRtn.fFormInit();
-
- }
- }
- /**
- * @desc : 현위치조회
- * @
- * @param :
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fChartHistory()
- {
- if(utlf_isNull(ds_send_reqdata.getColumn(0, "pid"))){
- sysF_messageBox("환자번호를 입력해 주세요.", "I999", "");
- return;
- }
-
- ds_grd_chrtlist.clearData();
- ds_grd_emrlist.clearData();
- ds_grd_pamlist.clearData();
- ds_grd_inpam.clearData();
- ds_grd_chngroom.clearData();
- ds_grd_healexam.clearData();
- ds_grd_chrtlendlist.clearData();
-
- var result = fCheckPid(group2.switch1.ChrtInfo.ipt_pid, ds_send_reqdata, "pnm", "rrgstno");
- if (result.length > 0) {
- // 종이 차트 조회
- ds_grd_chrtlist.enableevent = false;
- var oParam = {};
- oParam.id = "TRMRC00144";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqGetPaperList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_grd_chrtlist=chrtlist";
- oParam.async = true;
- oParam.callback = "cf_TRMRC00144";
- tranf_submit(oParam);
-
- // EMR 기록 조회
- var oParam = {};
- oParam.id = "TRMRC00145";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqGetEMRList";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_grd_emrlist=emrlist";
- oParam.async = true;
- oParam.callback = "cf_TRMRC00145";
- tranf_submit(oParam);
- // 건진내역조회
- var oParam = {};
- oParam.id = "TRMRC00146";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqGetHealExam";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_grd_healexam=healexam";
- oParam.async = true;
- oParam.callback = "cf_TRMRC00146";
- tranf_submit(oParam);
-
-
- }
-
-
- // 2008.12.17. 상태에 따라 로우 색상 지정해 주기..
- /*
- initGridStyle("grd_chrtlist");
- var gridObj = grd_chrtlist;
- for ( var i = 1 ; i < gridObj.rows ; i++)
- {
- if(gridObj.valueMatrix(i , gridObj.colRef("lendyn")) == "Y"){
- gridObj.rowstyle(i, "data", "background-color") = "#ffccff"; // 대출중 (핑크색)
- }
- if(gridObj.valueMatrix(i , gridObj.colRef("chrtstat")) == "01"){
- gridObj.rowstyle(i, "data", "color") = "#ff0000"; // 분실차트 (빨간색)
- }
- }
- // 2008.12.17. 상태에 따라 로우 색상 지정해 주기..
- initGridStyle("grd_chrtlendlist");
- var gridObj = grd_chrtlendlist;
- for ( var i = 1 ; i < gridObj.rows ; i++)
- {
- if(gridObj.valueMatrix(i , gridObj.colRef("rtndt")) == ""){
- gridObj.rowstyle(i, "data", "background-color") = "#ffccff"; // 대출중 (핑크색)
- }
- }
- */
- // 2009.06.02. 의정부인 경우.. 응급실, 건진센터 구영상 조회하기..
- var instcd = sysf_getUserInfo("dutplceinstcd");
- if (instcd == "013") {
- var oParam = {};
- oParam.id = "TRMRC00147";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqGetOldImgRec";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_main_chrtinfo_oldimglist=oldimglist";
- oParam.async = true;
- oParam.callback = "cf_TRMRC00147";
- tranf_submit(oParam);
- }
-
-
- }
- /**
- * @desc : 등록된 환자번호인지 체킹한다..
- * @
- * @param : iptObj - 환자번호 입력 컨트롤 (pid)
- * @return :
- * @authur : 이은영 2008.09.17
- * @---------------------------------------------------
- */
- function fGetPidNo(iptObj, refVal)
- {
- var chkyn = refVal;
- if (chkyn == "Y") {
- if (iptObj.text.length > 0) {
- var pid = iptObj.text;
- pid = getCretCheckNo(pid, sysf_getUserInfo("dutplceinstcd"));
- ds_send_reqdata.setColumn(0, "pid", pid);
- }
- }
- }
- /**
- * @desc : 등록된 환자번호인지 체킹한다..
- * @
- * @param : iptObj - 환자번호 입력 컨트롤 (pid)
- * @return : pnm - 환자명
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fCheckPid(iptObj, reqODs:Dataset, refPnm, refRrgstno)
- {
- ds_send_req.setColumn(0, "srchcond", "1");
- ds_send_req.setColumn(0, "pid", iptObj.text);
-
- //환자등록번호 체크
- if(iptObj.text.length > 0 ){
-
- // 2008.12.11. 초기화 없애기..
- reqODs.setColumn(0, refRrgstno, "");
- ds_main_result_patinfo_patinfolist.clearData();
-
- var oParam = {};
- oParam.id = "TRPMC02500";
- oParam.service = "patinfomngtapp.PatBaseInfo";
- oParam.method = "reqGetPatInfo";
- oParam.inds = "req=ds_send_req";
- oParam.outds = "ds_main_result_patinfo_patinfolist=patinfolist";
- oParam.async = false;
- oParam.callback = "cf_TRPMC02500";
- tranf_submit(oParam);
-
- if(arErrorCode.pop("TRPMC02500") > -1){
- //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
- if( ds_main_result_patinfo_patinfolist.rowcount > 0 ){
-
- ds_patinfolist.copyData(ds_main_result_patinfo_patinfolist);
- //* 2009.04.07. 이중번호 메세지 ( 14257937 박용석 -> 13275912 신옥순 )
- var sBindPid = ds_main_result_patinfo_patinfolist.getColumn(0, "bindpid");
- if( sBindPid != '-' && !utlf_isNull(sBindPid) && sBindPid != ' ' ){
- //합번된 등록번호 메세지 처리
- var sPid = ds_main_result_patinfo_patinfolist.getColumn(0, "pid");
- var sHngnm = ds_main_result_patinfo_patinfolist.getColumn(0, "hngnm");
- var retValue = sysf_messageBox(sPid + " (" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
- if( retValue == '6' ){
- reqODs.setColumn(0, "pid", sBindPid);
- fCheckPid(iptObj, reqODs, refPnm, refRrgstno);
- return "";
- }
- }
- var pid = ds_main_result_patinfo_patinfolist.getColumn(0, "pid");
- var pnm = ds_main_result_patinfo_patinfolist.getColumn(0, "hngnm");
- // 2008.12.11. 주민번호 표시하기..
- var rrgstno1 = ds_main_result_patinfo_patinfolist.getColumn(0, "rrgstno1");
- var rrgstno2 = ds_main_result_patinfo_patinfolist.getColumn(0, "rrgstno2");
- var rrgstno = rrgstno1 + "-" + rrgstno2.substring(0,3) + "****" ;
- if (refPnm != null)
- {
- reqODs.setColumn(0, refPnm, pnm);
- }
- if (refRrgstno != null)
- {
- reqODs.setColumn(0, refRrgstno, rrgstno);
- }
- return pnm;
- } else {
- ds_patinfolist.clearData();
- sysf_messageBox("없는 환자 번호 입니다.", "E999", "");
- return "";
- }
- } else { // 2009.01.14. 합본처리 에러메세지 처리후..
- return "";
- }
-
- }else{
- sysf_messageBox("환자등록번호를 정확히", "C001");
- return "";
- }
- }
- /**
- * @desc : 환자등록번호 조회 팝업
- * @
- * @param : refPid - 환자번호 참고 node path
- * refPnm - 환자명 참고 node path
- * @return :
- * @authur : 이은영 2008.03.18
- * @---------------------------------------------------
- */
- function fGetPid(refoDs:Dataset, refPid, refPnm, refRrgstno)
- {
-
- //조회건수가 1건일 경우 팝업창을 바로 닫는다.
- var objColInfo = new Array();
- objColInfo.push({col: "pid", type:"string", size:256, val:""});
- objColInfo.push({col: "hngnm", type:"string", size:256, val:""});
- objColInfo.push({col: "srchcond", type:"string", size:256, val:"2"});
- objColInfo.push({col: "autoflag", type:"string", size:256, val:"N"});
- objColInfo.push({col: "rrgstno1", type:"string", size:256, val:""});
- objColInfo.push({col: "rrgstno2", type:"string", size:256, val:""});
- objColInfo.push({col: "checkfnexam", type:"string", size:256, val:"1"});
- dsf_createDsRow("ds_hidden_tmp_pidpopupinfo", objColInfo);
-
-
- var objArgs = new Object();
- objArgs.ds_SPPMC02500 = ds_hidden_tmp_pidpopupinfo;
- frmf_modal("SPPMC02500", "SPPMC02500", objArgs, null, "1", "10", "10", null, null, null, null, null, "M");
-
- // model.resetInstanceNode("/root/source");
- //환자번호 copy
- ds_main.setColumn(0, "popupendflag", frmf_getParameter("SPPMC02500_popupendflag"));
- var popupendflag = ds_main.getColumn(0, "popupendflag");
-
- if (popupendflag == "ok")
- {
- refoDs.setColumn(0, refPid, ds_patinfolist.getColumn(0, "pid"));
- if (refPnm == null) { refPnm = "" }
- if (!utlf_isNull(refPnm)) {
- refoDs.setColumn(0, refPnm, ds_patinfolist.getColumn(0, "hngnm"));
- }
- if (refRrgstno == null) { refRrgstno = "" }
- if (!utlf_isNull(refRrgstno)) {
- var rrgstno1 = ds_patinfolist.getColumn(0, "rrgstno1");
- var rrgstno2 = ds_patinfolist.getColumn(0, "rrgstno2");
- var rrgstno = rrgstno1 + "-" + rrgstno2.substring(0,3) + "****";
- refoDs.setColumn(0, refRrgstno, rrgstno);
- }
- }
- }
- /**
- * @desc : 단축키 선택시 커서이동
- * @
- * @param :
- * @return :
- * @authur : 이은영 2009.01.28
- * @---------------------------------------------------
- */
- function fKeyDown(e){
- if (displayflag == "Y")
- {
- // F7 : 118, F8 : 119 , F9 : 120, F10 : 121
- var keyCode = e.keycode;
- if (keyCode == "118") {
- fAccessKey1();
- } else if (keyCode == "119") {
- fAccessKey2();
- } else if (keyCode == "120") {
- fAccessKey3();
- } else if (keyCode == "121") {
- fAccessKey4();
- }
- }
- }
- /**
- * @desc : 단축키 선택시 커서이동
- * @
- * @param :
- * @return :
- * @authur : 이은영 2009.01.28
- * @---------------------------------------------------
- */
- function fAccessKey1(){
- // 2009.01.28. 단축키 처리..
- group2.switch1.tabindex = 0;
- // 커서위치 - 등록번호..
- group2.switch1.ChrtInfo.ipt_pid.setFocus();
-
- }
- /**
- * @desc : 단축키 선택시 커서이동
- * @
- * @param :
- * @return :
- * @authur : 이은영 2009.01.28
- * @---------------------------------------------------
- */
- function fAccessKey2(){
- // 2009.01.28. 단축키 처리..
- group2.switch1.tabindex = 1;
- // 2009.01.28. 단축키 처리..
- group2.switch1.Receipt.iv_Receipt.btn_r_receipt.setFocus();
- // 접수이력조회
- group2.switch1.Receipt.iv_Receipt.fGetReqRendAppList();
- }
- /**
- * @desc : 단축키 선택시 커서이동
- * @
- * @param :
- * @return :
- * @authur : 이은영 2009.01.28
- * @---------------------------------------------------
- */
- function fAccessKey3(){
- // 2009.01.28. 단축키 처리..
- group2.switch1.tabindex = 2;
- // 커서위치 - 대출 바코드..
- group2.switch1.ChrtLend.iv_ChrtLend.fMoveCursor();
- }
- /**
- * @desc : 단축키 선택시 커서이동
- * @
- * @param :
- * @return :
- * @authur : 이은영 2009.01.28
- * @---------------------------------------------------
- */
- function fAccessKey4(){
- // 2009.01.28. 단축키 처리..
- group2.switch1.tabindex = 3;
- // 커서위치 - 반납 바코드..
- group2.switch1.ChrtRtn.iv_ChrtRtn.fMoveCursor();
- }
- /**
- * @desc : 하드코드 조회
- * @
- * @param : ref - reference path
- * rsltref - result reference path
- * hardcd - 하드코드
- * @return :
- * @author : 오지훈
- * @---------------------------------------------------
- */
- /*
- function mmbfGetHardCodeInfo(ref, rsltref, hardcd){
- var mmb_rsltref = "/root/hidden/mmb/hardcd";
- model.removeNode(mmb_rsltref);
- model.makeNode(mmb_rsltref);
- model.removeNode(ref);
- model.makeValue(ref + "/hardcd", hardcd);
- if(submit("TRMMB04103", "false", ref, mmb_rsltref)==true){
- model.copyNode(rsltref, mmb_rsltref);
- model.removeNode(mmb_rsltref);
- }
- model.refresh();
- }
- */
- /**
- * @desc : 영상전환 설정
- * @
- * @param :
- * @return :
- * @authur : 정창혁 20121126
- * @---------------------------------------------------
- */
- function fTransFilm() {
- var nRow = ds_grd_chrtlist.rowposition;
- if (nRow < 0)
- return;
- var sMsg = "영상전환 하시겠습니까?";
- if (ds_grd_chrtlist.getColumn(nRow, "chrtflag") == "I") {
- sMsg = "영상전환을 취소하시겠습니까?";
- ds_send_reqtrans.setColumn(0, "transyn", "N");
- } else if (ds_grd_chrtlist.getColumn(nRow, "chrtflag") == "P" || utlf_isNull(ds_grd_chrtlist.getColumn(nRow, "chrtflag"))) {
- sMsg = "영상전환 하시겠습니까?";
- ds_send_reqtrans.setColumn(0, "transyn", "Y");
- } else {
- ds_send_reqtrans.setColumn(0, "transyn", "");
- return;
- }
-
- ds_send_reqtrans.setColumn(0, "medirecno", ds_grd_chrtlist.getColumn(nRow, "medirecno"));
-
- if (sysf_messageBox(sMsg, "Q000") == 7) {
- return;
- }
-
- var oParam = {};
- oParam.id = "TXMRC00151";
- oParam.service = "chrtmngtapp.ChrtRendMngt";
- oParam.method = "reqSetTransChartFilmYn";
- oParam.inds = "req=ds_send_reqtrans";
- //oParam.outds = "null";
- oParam.async = true;
- oParam.callback = "cf_TXMRC00151";
- tranf_submit(oParam);
- }]]></Script>
|