123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type="xscript4.0"><![CDATA[/*
-
- EDCCall관리(SMMNE05200.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- - Create : 2009.11.04
- */
- var seoulinstcd ;//서울성모기관코드
- var uijungbuinstcd;//의정부성모기관코드
- var bucheoninstcd; //부천성모기관코드
- var vincentinstcd; //빈센트기관코드
- //초기화
- function fInit() {
- //20091116 dhkim 기관코드 조회 추가
- var pCode = "'077', '104'"; // 조회할 CdGrupID 코드정보 , 104번 추가 중증응급관련 inpt 업데이트 할 코드 조회 : 20110308 김영학
- var pDate = utlf_getCurrentDate(); //조회기준일자
- fGetNursHardCdInfo(pCode, pDate);
-
- //supcdid : '01' : 서울성모
- // model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '01' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid")
- var findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '01' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
- if( ds_codelist.getColumn(findRow, "cdid") ){
- seoulinstcd = ds_codelist.getColumn(findRow, "cdid"); //model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '01' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
- }
-
- //supcdid : '02' : 의정부성모
- findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '02' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
- if( ds_codelist.getColumn(findRow, "cdid") ){
- uijungbuinstcd = ds_codelist.getColumn(findRow, "cdid"); //model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '02' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
- }
-
- //supcdid : '03' : 부천성모
- findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '03' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
- if( ds_codelist.getColumn(findRow, "cdid") ){
- bucheoninstcd = ds_codelist.getColumn(findRow, "cdid"); // model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '03' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
- }
-
- //supcdid : '04' : 빈센트
- findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '04' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
- if( ds_codelist.getColumn(findRow, "cdid") ){
- vincentinstcd = ds_codelist.getColumn(findRow, "cdid"); //model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '04' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
- }
-
- //20091116 dhkim New Brain 추가호출 서울성모만 보여지도록 함
- if(seoulinstcd == sysf_getUserInfo("dutplceinstcd")){
- //grp_nbsecond.attribute("visibility") = "visible";
- grp_nbsecond.visible = false; //grp_nbsecond.attribute("visibility") = "hidden";
- }else{
- grp_nbsecond.visible = false; //grp_nbsecond.attribute("visibility") = "hidden";
- }
-
-
- var CurrentDate = utlf_getCurrentDate();
- //model.makeValue("/root/hidden/con/orddd",CurrentDate);
- if( ds_hidden_con.rowcount < 1 ) ds_hidden_con.addRow();
- ds_hidden_con.setColumn(0, "orddd", CurrentDate);
-
- //model.removeNodeset("/root/main/ordschelist");
-
- ds_send_reqdata.copyData(ds_hidden_con); //model.copyNode("/root/send/reqdata","/root/hidden/con");
-
- //submit("TRMNE05003"); //센터, 진료과 정보 가져옴
- var oParam = {};
- oParam.id = "TRMNE05003";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqGetComCD";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_init_centcdlist=centcd ds_init_ordroomlist=ordroomlist ds_init_orddeptcd=orddeptcd";
- oParam.async = false;
- oParam.callback = "cf_TRMNE05003";
- tranf_submit(oParam);
-
- ds_send_reqdata.copyData(ds_hidden_con); //model.copyNode("/root/send/reqdata","/root/hidden/con");
-
- //pameter setting
- //pid + "▦" + orddd + "▦" + cretno + "▦" + visitno-20090615
- var param = opener.frmf_getParameter("SMMNE05200_param"); //opener.javascript.getParameter("SMMNE05200_param");
- param = param.split("▦");
- ds_tmp_patinfo.setColumn(0, "pid", param[0]); // model.setValue("/root/tmp/patinfo/pid", param[0]);
- ds_tmp_patinfo.setColumn(0, "orddd", param[1]); // model.setValue("/root/tmp/patinfo/orddd", param[1]);
- ds_tmp_patinfo.setColumn(0, "cretno", param[2]); // model.setValue("/root/tmp/patinfo/cretno", param[2]);
- ds_tmp_patinfo.setColumn(0, "visitno", param[3]); // model.setValue("/root/tmp/patinfo/visitno", param[3]);
-
- //submit("TRMNE05202"); //환자정보 가져옴
- var oParam = {};
- oParam.id = "TRMNE05202";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqGetErPatInfo";
- oParam.inds = "req=ds_tmp_patinfo";
- oParam.outds = "ds_erpatinfo=erpatinfo";
- oParam.async = false;
- oParam.callback = "cf_TRMNE05202";
- tranf_submit(oParam);
- var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
- var nm = ds_erpatinfo.getColumn(0, "nm"); //model.getValue("/root/main/erpat/erpatinfo/nm");
- var sa = ds_erpatinfo.getColumn(0, "sa"); //model.getValue("/root/main/erpat/erpatinfo/sa");
- var indt = ds_erpatinfo.getColumn(0, "indt"); //model.getValue("/root/main/erpat/erpatinfo/indt");
- var deptengabbr = ds_erpatinfo.getColumn(0, "deptengabbr"); //model.getValue("/root/main/erpat/erpatinfo/deptengabbr");
-
- grp_sea.caption2.text = nm + "(" + pid + ") " + sa + " " + indt + " " + deptengabbr;
-
- // 하드코드 관리된 내용을 그룹 마스터를 통해서 조회하도록 수정한다. : 20110308 : 김영학
- //submit("TRMNE05204");
-
- var oParam = {};
- oParam.id = "TRMNE05203";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqGetErGrtypeGrnmList";
- oParam.inds = "req=ds_main_condition"; // ds_main_condition 확인필요
- oParam.outds = "ds_grtypelist=grtypelist";
- oParam.async = false;
- oParam.callback = "cf_TRMNE05203_1";
- tranf_submit(oParam);
-
-
- //호출구분선택 및 협진과 disabled및 enabled처리
- fSetCaptionGrType();
-
- // 체크박스 리스트
- var sProp="col=5,row=10,cellspacing=5,vcellspacing=0,itemWidth=-1,itemHeight=20,overflow=''";
- cb_checkboxlist.setInitComp(sProp, ds_init_orddeptcd, "cd", "deptengabbr", "fCheckListSet");
-
- }
- function fCheckListSet() {
- var calldeptcd = cb_checkboxlist.getData();
- ds_main.setColumn(0, "chkdeptcdlist", calldeptcd);
- }
- function cf_TRMNE05003(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TRMNE05202(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TRMNE05203_1(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- //협진과조회
- function fGetCnstDeptList(callflag) {
-
- ds_send_reqdata.setColumn(0, "callflag", callflag); //model.makeValue("/root/send/reqdata/callflag" , callflag);
-
- //submit("TRMNE05201");
- var oParam = {};
- oParam.id = "TRMNE05201";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqGetErCallStaffDept";
- oParam.inds = "req=ds_send_reqdata";
- oParam.outds = "ds_staffdeptlist=staffdeptlist";
- oParam.async = false;
- oParam.callback = "cf_TRMNE05201";
- tranf_submit(oParam);
-
- var cnt = ds_staffdeptlist.rowcount; //var cnt = getNodesetCnt(model, ref);
- var chkorddeptcdlist = "";
- for ( var i = 0; i < cnt; i++ ) {
- var orddeptcd = ds_staffdeptlist.getColumn(i, "orddeptcd"); //model.getValue(ref + "[" + i + "]/orddeptcd");
- chkorddeptcdlist = chkorddeptcdlist + orddeptcd + "|";
- }
- var deptcdlist = chkorddeptcdlist.split("|");
- if (deptcdlist.length > 0) {
- chkorddeptcdlist = chkorddeptcdlist.substring(0, chkorddeptcdlist.length -1);
- }
- ds_main.clearData(); //model.removenode("/root/main/chkdeptcdlist");
- ds_main.addRow();
- ds_main.setColumn(0, "chkdeptcdlist", chkorddeptcdlist); //model.makeValue("/root/main/chkdeptcdlist", chkorddeptcdlist);
-
- // 콤보 클릭에 따라 체크박스 리스트에 체크해주기
- if( utlf_isNull(chkorddeptcdlist) ) {
- cb_checkboxlist.setCheckAll(false);
- } else {
- cb_checkboxlist.setData(chkorddeptcdlist.split("|"), null, false);
- }
-
- //chk_orddeptcd.refresh();
- }
- function cf_TRMNE05201(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- //20091104 dhkim
- //호출 유효성 체크
- function fIsValidErCallDr(params){
- var paramArr = params.split('|');
- var pid = paramArr[0];
- var indd = paramArr[1];
- var cretno = paramArr[2];
- var visitno = paramArr[3];
- var intm = paramArr[4];
- var grtype = paramArr[5];
- //환자정보가 존재하지 않으면 호출 되지 않게 blocking
- if( utlf_isNull(pid) || utlf_isNull(indd) || utlf_isNull(cretno) || utlf_isNull(visitno) || utlf_isNull(intm) ){ // pid == '' || indd == '' || cretno == '' || visitno == '' || intm == ''
- sysf_messageBox('환자정보가 존재하지 않아 호출 할 수 없습니다.', 'E');
- return false;
- }
-
- //호출구분선택
- if( utlf_isNull(grtype) ){ // grtype == ''
- sysf_messageBox('호출구분을 선택하십시오.', 'E');
- return false;
- }
-
-
- //=========================================================================
- //호출진행중이면 호출이 되지않게 blocking-20090618
- var callingyn = "";
- ds_send_reqchk.setColumn(0, "pid", pid); // model.makeValue("/root/send/reqchk/pid", pid);
- ds_send_reqchk.setColumn(0, "indd", indd);
- ds_send_reqchk.setColumn(0, "cretno", cretno);
- ds_send_reqchk.setColumn(0, "visitno", visitno);
- ds_send_reqchk.setColumn(0, "grtype", grtype);
-
- var oParam = {};
- oParam.id = "TRMNE05203";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqGetErCalling";
- oParam.inds = "req=ds_send_reqchk";
- oParam.outds = "ds_calling=calling";
- oParam.async = false;
- oParam.callback = "cf_TRMNE05203";
- tranf_submit(oParam);
-
- return true;
- }
- function cf_TRMNE05203(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) {
- sysf_messageBox('호출 중 체크를 실패하였습니다.', 'E999');
- return false;
- } else {
- var callingyn = ds_calling.getColumn(0, "callingyn"); //model.getValue("/root/tmp/calling/calling/callingyn");
- if(callingyn == "Y"){
- sysf_messageBox("호출이 진행중입니다.\n 잠시 후 다시 시도해 주시기 바랍니다.", "I");
- return false;
- }
- }
- }
- //호출
- //20091116 dhkim grtype구분자추가
- function fErCallDr(grtype){
- //환자정보
- var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
- var patnm = ds_erpatinfo.getColumn(0, "nm");
- var indd = ds_erpatinfo.getColumn(0, "indd");
- var cretno = ds_erpatinfo.getColumn(0, "cretno");
- var intm = ds_erpatinfo.getColumn(0, "intm");
- var visitno = ds_tmp_patinfo.getColumn(0, "visitno");
- //응급의학과 전화번호
- var cntctel = ds_erpatinfo.getColumn(0, "cntctel"); //model.getValue("/root/main/erpat/erpatinfo/cntctel");
- cntctel = cntctel.replace(/-/gi, '');
- //주진료과
- var maindeptcd = ds_main_condition.getColumn(0, "orddeptcd"); //model.getValue("/root/main/condition/orddeptcd");
-
- if( utlf_isNull(grtype) ){ // grtype == null || grtype == ''
- grtype = ds_main_condition.getColumn(0, "grtype"); //model.getValue("/root/main/condition/grtype");
- }
- var grtypenm = "";
- // 하드코딩된 부분 제거 (마스터에서 값 가지고 오도록 수정 : 20110308 김영학
- grtypenm = ds_grtypelist.lookup("grtype", grtype, "grname"); //model.getValue("/root/init/grtypeinfo/grtypelist[grtype = '" + grtype + "' ]/grname");
- var params = pid + '|'
- + indd + '|'
- + cretno + '|'
- + visitno + '|'
- + intm + '|'
- + grtype
- ;
- //호출전 유효성체크
- if(!fIsValidErCallDr(params))
- return;
-
- //==========================================================================
-
- var sSrchData = "";
- var sSrchHeader = "pid" +"▦"
- + "patnm" +"▦"
- + "indd" +"▦"
- + "cretno" +"▦"
- + "visitno" +"▦"
- + "intm" +"▦"
- + "grtype" +"▦"//호출구분 :
- + "grtypenm" +"▦"
- + "cntctel" +"▦"
- + "orddeptcd" +"▩"
- ;
- //주진진료과셋팅
- var sSrchData = pid +"▦"
- + patnm +"▦"
- + indd +"▦"
- + cretno +"▦"
- + visitno +"▦"
- + intm +"▦"
- + grtype +"▦"
- + grtypenm +"▦"
- + cntctel +"▦"
- + maindeptcd +"▩"
- ;
-
- //체크된 각 협진과에 환자정보 attach
- var calldeptcd = ds_main.getColumn(0, "chkdeptcdlist"); //model.getValue("/root/main/chkdeptcdlist");//체크박스에 들어있는값
- var sendcalldeptcd = calldeptcd.split("|");
-
- for(var i = 0; i < sendcalldeptcd.length; i++){
- var sSrchData = sSrchData
- + pid +"▦"
- + patnm +"▦"
- + indd +"▦"
- + cretno +"▦"
- + visitno +"▦"
- + intm +"▦"
- + grtype +"▦"
- + grtypenm +"▦"
- + cntctel +"▦"
- + sendcalldeptcd[i] +"▩";
- }
- //model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
- ds_inscallinfo.clear();
- dsf_setCSVToDs("ds_inscallinfo", sSrchHeader + sSrchData);
-
- var oParam = {};
- oParam.id = "TXMNE05201";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqInsSmsCallInfo";
- oParam.inds = "req=ds_inscallinfo";
- oParam.outds = "ds_tmp_result=callinfo";
- oParam.async = false;
- oParam.callback = "cf_TXMNE05201";
- tranf_submit(oParam);
-
-
- var totcallcnt = ds_tmp_result.getColumn(0, "totcallcnt"); //model.getValue('/root/tmp/temp/rslt/callinfo/totcallcnt');
- ds_tmp2.clear();
-
- //-----------------------------------------------------------------------------------------------------------
- // inpt테이블에 증증 코드 자동 등록 --> inpt의 명칭이 recovwardcd로 되어있으나 중증등록코드임! 헷갈림 주의!
- //-----------------------------------------------------------------------------------------------------------
- ds_tmp2.addColumn("pid", "string"); // model.makeValue("/root/tmp2/pid",pid);
- ds_tmp2.addColumn("indd", "string"); // model.makeValue("/root/tmp2/indd",indd);
- ds_tmp2.addColumn("cretno", "string"); // model.makeValue("/root/tmp2/cretno",cretno);
- ds_tmp2.addColumn("visitno", "string"); // model.makeValue("/root/tmp2/visitno",visitno);
- ds_tmp2.addRow();
-
- ds_tmp2.setColumn(0, "pid", pid);
- ds_tmp2.setColumn(0, "indd", indd);
- ds_tmp2.setColumn(0, "cretno", cretno);
- ds_tmp2.setColumn(0, "visitno", visitno);
-
- //하드코딩된 부분을 하드코드테이블 이용 하드코딩 제거 : 20110308 김영학
- //grname = model.getValue("/root/code/codeinfo/codelist[cdgrupid = '104' and cdnm = '" + cpt_grtype.attribute("text") + "']/cdid");
- // if(submit("TXMNE05202")) {
- // }
- var oParam = {};
- oParam.id = "TXMNE05202";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqrecovward";
- oParam.inds = "req=ds_tmp2";
- oParam.outds = "";
- oParam.async = false;
- //oParam.callback = "cf_TXMNE05202";
- tranf_submit(oParam);
- sysf_messageBox("호출("+ cpt_grtype.text +")되었습니다.", "I");
- }
- function cf_TXMNE05201(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) {
- var errMsg = utlf_transNullToEmpty(sErrorMsg.split("|")[0]);
-
- if(utlf_isSearchString(errMsg, 'info') == false){ // utlf_isSearchString(model.getValue('/root/properties/error/code'), 'info') == false
- sysf_messageBox('호출을 실패하였습니다.', 'E999');
- return;
- }
- }
- }
- //20091116 dhkim
- //호출구분선택시 중증구분 캡션 내용 표시 및 협진과 체크 disable (기존소스를 펑션으로 분리)
- function fSetCaptionGrType(){
- var grtype = ds_grtypelist.getColumn(group1.rdo_grtype.index, "grtype"); //group1.rdo_grtype.value;
- fGetCnstDeptList(grtype);
-
- if( !utlf_isNull(ds_grtypelist.lookup("grtype", grtype, "grtypesym")) ) {
- cpt_grtype.text = ds_grtypelist.lookup("grtype", grtype, "grtypesym");
- }
- //cpt_grtype.attribute("text") = model.getValue("/root/init/grtypeinfo/grtypelist[grtype = '" + grtype + "' ]/grtypesym");
-
- group2.button1.visible = false; //attribute("visibility") = "hidden";
- group2.button1.enable = true; //button1.attribute("disabled") = false;
- //model.refresh();
- }
- //20091104 dhkim
- //New Brain 2차호출
- //2차call: 신경외과 임상강사(fellow), Angio방기사에게 호출 grtype:6
- function fSecondCallNB(){
- if(sysf_messageBox("New Brain 2차호출을 진행하시겠습니까?", "Q") == 7){
- return;
- }
-
- //20091118 dhkim
- //중증구분캡션 New Brain과 동일하게 적용 --> B★
- cpt_grtype.text = "B★";
- var grtype = "6";
- var grtypenm = "";
-
- //new brain 2차는 서울성모만 적용임
- if(seoulinstcd == sysf_getUserInfo("dutplceinstcd")){
- grtypenm = "New Brain 2차";
- }else{
- sysf_messageBox("현재 2차호출은 서울성모에서만 사용하실 수 있습니다.", "E");
- return;
- }
-
- //환자정보
- var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
- var patnm = ds_erpatinfo.getColumn(0, "nm"); //model.getValue("/root/main/erpat/erpatinfo/nm");
- var indd = ds_erpatinfo.getColumn(0, "indd"); //model.getValue("/root/main/erpat/erpatinfo/indd");
- var cretno = ds_erpatinfo.getColumn(0, "cretno"); //model.getValue("/root/main/erpat/erpatinfo/cretno");
- var visitno = ds_tmp_patinfo.getColumn(0, "visitno"); //model.getValue("/root/tmp/patinfo/visitno");
- var intm = ds_erpatinfo.getColumn(0, "intm"); //model.getValue("/root/main/erpat/erpatinfo/intm");
-
- //응급의학과 전화번호
- var cntctel = ds_erpatinfo.getColumn(0, "cntctel"); //model.getValue("/root/main/erpat/erpatinfo/cntctel");
- cntctel = cntctel.replace(/-/gi, '');
-
- var params = pid + '|'
- + indd + '|'
- + cretno + '|'
- + visitno + '|'
- + intm + '|'
- + grtype
- ;
- //호출전 유효성체크
- if(!fIsValidErCallDr(params))
- return;
-
-
- var sSrchData = "";
- var sSrchHeader = "pid" +"▦"
- + "patnm" +"▦"
- + "indd" +"▦"
- + "cretno" +"▦"
- + "visitno" +"▦"
- + "intm" +"▦"
- + "grtype" +"▦"//호출구분 :
- + "grtypenm" +"▦"
- + "cntctel" +"▦"
- + "callflag" +"▦"//2차, 종료호출구분
- + "orddeptcd" +"▩"
- ;
- //환자정보셋팅
- var sSrchData = pid +"▦"
- + patnm +"▦"
- + indd +"▦"
- + cretno +"▦"
- + visitno +"▦"
- + intm +"▦"
- + grtype +"▦"
- + grtypenm +"▦"
- + cntctel +"▦"
- + "2" +"▦" //2차, 종료호출구분 - 2: 2차호출, 3: 종료호출
- + '-' +"▩" //new brain 2차호출은 주/부과 세팅 따로 구분 없음.
- ;
-
- //model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
- ds_inscallinfo.clear();
- dsf_setCSVToDs("ds_inscallinfo", sSrchHeader + sSrchData);
-
- var oParam = {};
- oParam.id = "TXMNE05203";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqInsNewBrainSecondFinalSmsCallInfo";
- oParam.inds = "req=ds_inscallinfo";
- oParam.outds = "ds_tmp_result=callinfo";
- oParam.async = false;
- oParam.callback = "cf_TXMNE05203";
- tranf_submit(oParam);
- }
- function cf_TXMNE05203(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) {
- var errMsg = utlf_transNullToEmpty(sErrorMsg.split("|")[0]);
- if(utlf_isSearchString(errMsg, 'info') == false){
- sysf_messageBox('호출을 실패하였습니다.', 'E999');
- return;
- }
- } else {
- //총 호출수
- var totcallcnt = ds_tmp_result.getColumn(0, "totcallcnt"); //model.getValue('/root/tmp/temp/rslt/callinfo/totcallcnt');
- sysf_messageBox("2차 호출("+ cpt_grtype.text +")되었습니다.", "I");
- }
- }
- //20091104 dhkim
- //New Brain 종료호출
- function fFinalCallNB(){
-
- //사용시기 : TPA약제 시작전이나 사용후 또는 Angio하기 전에 신경과 의사가 판단하여 호출함.
- //호출대상 : 1, 2차 New Brain 호출자 전체
- if(sysf_messageBox("New Brain 종료호출을 진행하시겠습니까?", "Q") == 7){
- return;
- }
-
- //중증구분캡션 New Brain과 동일하게 적용 --> B★
- cpt_grtype.text = "B★";
- var grtype = "6";
- var grtypenm = "";
-
- //new brain 종료는 서울성모만 적용임
- if(seoulinstcd == sysf_getUserInfo("dutplceinstcd")){
- grtypenm = "New Brain";
- }else{
- sysf_messageBox("현재 종료호출은 서울성모에서만 사용하실 수 있습니다.", "E");
- return;
- }
-
- //환자정보
- var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
- var patnm = ds_erpatinfo.getColumn(0, "nm"); //model.getValue("/root/main/erpat/erpatinfo/nm");
- var indd = ds_erpatinfo.getColumn(0, "indd");
- var cretno = ds_erpatinfo.getColumn(0, "cretno");
- var visitno = ds_tmp_patinfo.getColumn(0, "visitno"); //model.getValue("/root/tmp/patinfo/visitno");
- var intm = ds_erpatinfo.getColumn(0, "intm");
-
- //응급의학과 전화번호
- var cntctel = ds_erpatinfo.getColumn(0, "cntctel"); //model.getValue("/root/main/erpat/erpatinfo/cntctel");
- cntctel = cntctel.replace(/-/gi, '');
-
- var params = pid + '|'
- + indd + '|'
- + cretno + '|'
- + visitno + '|'
- + intm + '|'
- + grtype
- ;
- //호출전 유효성체크
- if(!fIsValidErCallDr(params))
- return;
-
- var sSrchData = "";
- var sSrchHeader = "pid" +"▦"
- + "patnm" +"▦"
- + "indd" +"▦"
- + "cretno" +"▦"
- + "visitno" +"▦"
- + "intm" +"▦"
- + "grtype" +"▦"//호출구분 :
- + "grtypenm" +"▦"
- + "cntctel" +"▦"
- + "callflag" +"▦"//2차, 종료호출구분
- + "orddeptcd" +"▩"
- ;
- //환자정보셋팅
- var sSrchData = pid +"▦"
- + patnm +"▦"
- + indd +"▦"
- + cretno +"▦"
- + visitno +"▦"
- + intm +"▦"
- + grtype +"▦"
- + grtypenm +"▦"
- + cntctel +"▦"
- + "3" +"▦" //2차, 종료호출구분 - 2: 2차호출, 3: 종료호출
- + '-' +"▩" //new brain 2차호출은 주/부과 세팅 따로 구분 없음.
- ;
-
- //model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
- ds_inscallinfo.clear();
- dsf_setCSVToDs("ds_inscallinfo", sSrchHeader + sSrchData);
-
- var oParam = {};
- oParam.id = "TXMNE05203";
- oParam.service = "ercareapp.ERSmsCallBase";
- oParam.method = "reqInsNewBrainSecondFinalSmsCallInfo";
- oParam.inds = "req=ds_inscallinfo";
- oParam.outds = "ds_tmp_result=callinfo";
- oParam.async = false;
- oParam.callback = "cf_TXMNE05203_1";
- tranf_submit(oParam);
- }
- function cf_TXMNE05203_1(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) {
- var errMsg = utlf_transNullToEmpty(sErrorMsg.split("|")[0]);
- if(utlf_isSearchString(errMsg, 'info') == false){
- sysf_messageBox('호출을 실패하였습니다.', 'E999');
- return;
- }
- } else {
- //총 호출수
- var totcallcnt = ds_tmp_result.getColumn(0, "totcallcnt"); //model.getValue('/root/tmp/temp/rslt/callinfo/totcallcnt');
- sysf_messageBox("종료 호출("+ cpt_grtype.text +")되었습니다.", "I");
- }
- }
- ]]></Script>
|