SMMNE05200.xjs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/*
  3. EDCCall관리(SMMNE05200.xfm - JScript )
  4. - Version :
  5. 1) : Ver.1.00.01
  6. - Create : 2009.11.04
  7. */
  8. var seoulinstcd ;//서울성모기관코드
  9. var uijungbuinstcd;//의정부성모기관코드
  10. var bucheoninstcd; //부천성모기관코드
  11. var vincentinstcd; //빈센트기관코드
  12. //초기화
  13. function fInit() {
  14. //20091116 dhkim 기관코드 조회 추가
  15. var pCode = "'077', '104'"; // 조회할 CdGrupID 코드정보 , 104번 추가 중증응급관련 inpt 업데이트 할 코드 조회 : 20110308 김영학
  16. var pDate = utlf_getCurrentDate(); //조회기준일자
  17. fGetNursHardCdInfo(pCode, pDate);
  18. //supcdid : '01' : 서울성모
  19. // model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '01' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid")
  20. var findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '01' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
  21. if( ds_codelist.getColumn(findRow, "cdid") ){
  22. seoulinstcd = ds_codelist.getColumn(findRow, "cdid"); //model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '01' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
  23. }
  24. //supcdid : '02' : 의정부성모
  25. findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '02' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
  26. if( ds_codelist.getColumn(findRow, "cdid") ){
  27. uijungbuinstcd = ds_codelist.getColumn(findRow, "cdid"); //model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '02' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
  28. }
  29. //supcdid : '03' : 부천성모
  30. findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '03' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
  31. if( ds_codelist.getColumn(findRow, "cdid") ){
  32. bucheoninstcd = ds_codelist.getColumn(findRow, "cdid"); // model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '03' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
  33. }
  34. //supcdid : '04' : 빈센트
  35. findRow = ds_codelist.findRowExpr("cdgrupid == '077' && supcdid == '04' && cdid == '" + sysf_getUserInfo("dutplceinstcd") + "'");
  36. if( ds_codelist.getColumn(findRow, "cdid") ){
  37. vincentinstcd = ds_codelist.getColumn(findRow, "cdid"); //model.getValue("/root/code/codeinfo/codelist[cdgrupid = '077' and supcdid = '04' and cdid = '"+ getUserInfo("dutplceinstcd") +"']/cdid");
  38. }
  39. //20091116 dhkim New Brain 추가호출 서울성모만 보여지도록 함
  40. if(seoulinstcd == sysf_getUserInfo("dutplceinstcd")){
  41. //grp_nbsecond.attribute("visibility") = "visible";
  42. grp_nbsecond.visible = false; //grp_nbsecond.attribute("visibility") = "hidden";
  43. }else{
  44. grp_nbsecond.visible = false; //grp_nbsecond.attribute("visibility") = "hidden";
  45. }
  46. var CurrentDate = utlf_getCurrentDate();
  47. //model.makeValue("/root/hidden/con/orddd",CurrentDate);
  48. if( ds_hidden_con.rowcount < 1 ) ds_hidden_con.addRow();
  49. ds_hidden_con.setColumn(0, "orddd", CurrentDate);
  50. //model.removeNodeset("/root/main/ordschelist");
  51. ds_send_reqdata.copyData(ds_hidden_con); //model.copyNode("/root/send/reqdata","/root/hidden/con");
  52. //submit("TRMNE05003"); //센터, 진료과 정보 가져옴
  53. var oParam = {};
  54. oParam.id = "TRMNE05003";
  55. oParam.service = "ercareapp.ERSmsCallBase";
  56. oParam.method = "reqGetComCD";
  57. oParam.inds = "req=ds_send_reqdata";
  58. oParam.outds = "ds_init_centcdlist=centcd ds_init_ordroomlist=ordroomlist ds_init_orddeptcd=orddeptcd";
  59. oParam.async = false;
  60. oParam.callback = "cf_TRMNE05003";
  61. tranf_submit(oParam);
  62. ds_send_reqdata.copyData(ds_hidden_con); //model.copyNode("/root/send/reqdata","/root/hidden/con");
  63. //pameter setting
  64. //pid + "▦" + orddd + "▦" + cretno + "▦" + visitno-20090615
  65. var param = opener.frmf_getParameter("SMMNE05200_param"); //opener.javascript.getParameter("SMMNE05200_param");
  66. param = param.split("▦");
  67. ds_tmp_patinfo.setColumn(0, "pid", param[0]); // model.setValue("/root/tmp/patinfo/pid", param[0]);
  68. ds_tmp_patinfo.setColumn(0, "orddd", param[1]); // model.setValue("/root/tmp/patinfo/orddd", param[1]);
  69. ds_tmp_patinfo.setColumn(0, "cretno", param[2]); // model.setValue("/root/tmp/patinfo/cretno", param[2]);
  70. ds_tmp_patinfo.setColumn(0, "visitno", param[3]); // model.setValue("/root/tmp/patinfo/visitno", param[3]);
  71. //submit("TRMNE05202"); //환자정보 가져옴
  72. var oParam = {};
  73. oParam.id = "TRMNE05202";
  74. oParam.service = "ercareapp.ERSmsCallBase";
  75. oParam.method = "reqGetErPatInfo";
  76. oParam.inds = "req=ds_tmp_patinfo";
  77. oParam.outds = "ds_erpatinfo=erpatinfo";
  78. oParam.async = false;
  79. oParam.callback = "cf_TRMNE05202";
  80. tranf_submit(oParam);
  81. var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
  82. var nm = ds_erpatinfo.getColumn(0, "nm"); //model.getValue("/root/main/erpat/erpatinfo/nm");
  83. var sa = ds_erpatinfo.getColumn(0, "sa"); //model.getValue("/root/main/erpat/erpatinfo/sa");
  84. var indt = ds_erpatinfo.getColumn(0, "indt"); //model.getValue("/root/main/erpat/erpatinfo/indt");
  85. var deptengabbr = ds_erpatinfo.getColumn(0, "deptengabbr"); //model.getValue("/root/main/erpat/erpatinfo/deptengabbr");
  86. grp_sea.caption2.text = nm + "(" + pid + ") " + sa + " " + indt + " " + deptengabbr;
  87. // 하드코드 관리된 내용을 그룹 마스터를 통해서 조회하도록 수정한다. : 20110308 : 김영학
  88. //submit("TRMNE05204");
  89. var oParam = {};
  90. oParam.id = "TRMNE05203";
  91. oParam.service = "ercareapp.ERSmsCallBase";
  92. oParam.method = "reqGetErGrtypeGrnmList";
  93. oParam.inds = "req=ds_main_condition"; // ds_main_condition 확인필요
  94. oParam.outds = "ds_grtypelist=grtypelist";
  95. oParam.async = false;
  96. oParam.callback = "cf_TRMNE05203_1";
  97. tranf_submit(oParam);
  98. //호출구분선택 및 협진과 disabled및 enabled처리
  99. fSetCaptionGrType();
  100. // 체크박스 리스트
  101. var sProp="col=5,row=10,cellspacing=5,vcellspacing=0,itemWidth=-1,itemHeight=20,overflow=''";
  102. cb_checkboxlist.setInitComp(sProp, ds_init_orddeptcd, "cd", "deptengabbr", "fCheckListSet");
  103. }
  104. function fCheckListSet() {
  105. var calldeptcd = cb_checkboxlist.getData();
  106. ds_main.setColumn(0, "chkdeptcdlist", calldeptcd);
  107. }
  108. function cf_TRMNE05003(sSvcId, nErrorCode, sErrorMsg) {
  109. if(nErrorCode < 0) return;
  110. }
  111. function cf_TRMNE05202(sSvcId, nErrorCode, sErrorMsg) {
  112. if(nErrorCode < 0) return;
  113. }
  114. function cf_TRMNE05203_1(sSvcId, nErrorCode, sErrorMsg) {
  115. if(nErrorCode < 0) return;
  116. }
  117. //협진과조회
  118. function fGetCnstDeptList(callflag) {
  119. ds_send_reqdata.setColumn(0, "callflag", callflag); //model.makeValue("/root/send/reqdata/callflag" , callflag);
  120. //submit("TRMNE05201");
  121. var oParam = {};
  122. oParam.id = "TRMNE05201";
  123. oParam.service = "ercareapp.ERSmsCallBase";
  124. oParam.method = "reqGetErCallStaffDept";
  125. oParam.inds = "req=ds_send_reqdata";
  126. oParam.outds = "ds_staffdeptlist=staffdeptlist";
  127. oParam.async = false;
  128. oParam.callback = "cf_TRMNE05201";
  129. tranf_submit(oParam);
  130. var cnt = ds_staffdeptlist.rowcount; //var cnt = getNodesetCnt(model, ref);
  131. var chkorddeptcdlist = "";
  132. for ( var i = 0; i < cnt; i++ ) {
  133. var orddeptcd = ds_staffdeptlist.getColumn(i, "orddeptcd"); //model.getValue(ref + "[" + i + "]/orddeptcd");
  134. chkorddeptcdlist = chkorddeptcdlist + orddeptcd + "|";
  135. }
  136. var deptcdlist = chkorddeptcdlist.split("|");
  137. if (deptcdlist.length > 0) {
  138. chkorddeptcdlist = chkorddeptcdlist.substring(0, chkorddeptcdlist.length -1);
  139. }
  140. ds_main.clearData(); //model.removenode("/root/main/chkdeptcdlist");
  141. ds_main.addRow();
  142. ds_main.setColumn(0, "chkdeptcdlist", chkorddeptcdlist); //model.makeValue("/root/main/chkdeptcdlist", chkorddeptcdlist);
  143. // 콤보 클릭에 따라 체크박스 리스트에 체크해주기
  144. if( utlf_isNull(chkorddeptcdlist) ) {
  145. cb_checkboxlist.setCheckAll(false);
  146. } else {
  147. cb_checkboxlist.setData(chkorddeptcdlist.split("|"), null, false);
  148. }
  149. //chk_orddeptcd.refresh();
  150. }
  151. function cf_TRMNE05201(sSvcId, nErrorCode, sErrorMsg) {
  152. if(nErrorCode < 0) return;
  153. }
  154. //20091104 dhkim
  155. //호출 유효성 체크
  156. function fIsValidErCallDr(params){
  157. var paramArr = params.split('|');
  158. var pid = paramArr[0];
  159. var indd = paramArr[1];
  160. var cretno = paramArr[2];
  161. var visitno = paramArr[3];
  162. var intm = paramArr[4];
  163. var grtype = paramArr[5];
  164. //환자정보가 존재하지 않으면 호출 되지 않게 blocking
  165. if( utlf_isNull(pid) || utlf_isNull(indd) || utlf_isNull(cretno) || utlf_isNull(visitno) || utlf_isNull(intm) ){ // pid == '' || indd == '' || cretno == '' || visitno == '' || intm == ''
  166. sysf_messageBox('환자정보가 존재하지 않아 호출 할 수 없습니다.', 'E');
  167. return false;
  168. }
  169. //호출구분선택
  170. if( utlf_isNull(grtype) ){ // grtype == ''
  171. sysf_messageBox('호출구분을 선택하십시오.', 'E');
  172. return false;
  173. }
  174. //=========================================================================
  175. //호출진행중이면 호출이 되지않게 blocking-20090618
  176. var callingyn = "";
  177. ds_send_reqchk.setColumn(0, "pid", pid); // model.makeValue("/root/send/reqchk/pid", pid);
  178. ds_send_reqchk.setColumn(0, "indd", indd);
  179. ds_send_reqchk.setColumn(0, "cretno", cretno);
  180. ds_send_reqchk.setColumn(0, "visitno", visitno);
  181. ds_send_reqchk.setColumn(0, "grtype", grtype);
  182. var oParam = {};
  183. oParam.id = "TRMNE05203";
  184. oParam.service = "ercareapp.ERSmsCallBase";
  185. oParam.method = "reqGetErCalling";
  186. oParam.inds = "req=ds_send_reqchk";
  187. oParam.outds = "ds_calling=calling";
  188. oParam.async = false;
  189. oParam.callback = "cf_TRMNE05203";
  190. tranf_submit(oParam);
  191. return true;
  192. }
  193. function cf_TRMNE05203(sSvcId, nErrorCode, sErrorMsg) {
  194. if(nErrorCode < 0) {
  195. sysf_messageBox('호출 중 체크를 실패하였습니다.', 'E999');
  196. return false;
  197. } else {
  198. var callingyn = ds_calling.getColumn(0, "callingyn"); //model.getValue("/root/tmp/calling/calling/callingyn");
  199. if(callingyn == "Y"){
  200. sysf_messageBox("호출이 진행중입니다.\n 잠시 후 다시 시도해 주시기 바랍니다.", "I");
  201. return false;
  202. }
  203. }
  204. }
  205. //호출
  206. //20091116 dhkim grtype구분자추가
  207. function fErCallDr(grtype){
  208. //환자정보
  209. var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
  210. var patnm = ds_erpatinfo.getColumn(0, "nm");
  211. var indd = ds_erpatinfo.getColumn(0, "indd");
  212. var cretno = ds_erpatinfo.getColumn(0, "cretno");
  213. var intm = ds_erpatinfo.getColumn(0, "intm");
  214. var visitno = ds_tmp_patinfo.getColumn(0, "visitno");
  215. //응급의학과 전화번호
  216. var cntctel = ds_erpatinfo.getColumn(0, "cntctel"); //model.getValue("/root/main/erpat/erpatinfo/cntctel");
  217. cntctel = cntctel.replace(/-/gi, '');
  218. //주진료과
  219. var maindeptcd = ds_main_condition.getColumn(0, "orddeptcd"); //model.getValue("/root/main/condition/orddeptcd");
  220. if( utlf_isNull(grtype) ){ // grtype == null || grtype == ''
  221. grtype = ds_main_condition.getColumn(0, "grtype"); //model.getValue("/root/main/condition/grtype");
  222. }
  223. var grtypenm = "";
  224. // 하드코딩된 부분 제거 (마스터에서 값 가지고 오도록 수정 : 20110308 김영학
  225. grtypenm = ds_grtypelist.lookup("grtype", grtype, "grname"); //model.getValue("/root/init/grtypeinfo/grtypelist[grtype = '" + grtype + "' ]/grname");
  226. var params = pid + '|'
  227. + indd + '|'
  228. + cretno + '|'
  229. + visitno + '|'
  230. + intm + '|'
  231. + grtype
  232. ;
  233. //호출전 유효성체크
  234. if(!fIsValidErCallDr(params))
  235. return;
  236. //==========================================================================
  237. var sSrchData = "";
  238. var sSrchHeader = "pid" +"▦"
  239. + "patnm" +"▦"
  240. + "indd" +"▦"
  241. + "cretno" +"▦"
  242. + "visitno" +"▦"
  243. + "intm" +"▦"
  244. + "grtype" +"▦"//호출구분 :
  245. + "grtypenm" +"▦"
  246. + "cntctel" +"▦"
  247. + "orddeptcd" +"▩"
  248. ;
  249. //주진진료과셋팅
  250. var sSrchData = pid +"▦"
  251. + patnm +"▦"
  252. + indd +"▦"
  253. + cretno +"▦"
  254. + visitno +"▦"
  255. + intm +"▦"
  256. + grtype +"▦"
  257. + grtypenm +"▦"
  258. + cntctel +"▦"
  259. + maindeptcd +"▩"
  260. ;
  261. //체크된 각 협진과에 환자정보 attach
  262. var calldeptcd = ds_main.getColumn(0, "chkdeptcdlist"); //model.getValue("/root/main/chkdeptcdlist");//체크박스에 들어있는값
  263. var sendcalldeptcd = calldeptcd.split("|");
  264. for(var i = 0; i < sendcalldeptcd.length; i++){
  265. var sSrchData = sSrchData
  266. + pid +"▦"
  267. + patnm +"▦"
  268. + indd +"▦"
  269. + cretno +"▦"
  270. + visitno +"▦"
  271. + intm +"▦"
  272. + grtype +"▦"
  273. + grtypenm +"▦"
  274. + cntctel +"▦"
  275. + sendcalldeptcd[i] +"▩";
  276. }
  277. //model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
  278. ds_inscallinfo.clear();
  279. dsf_setCSVToDs("ds_inscallinfo", sSrchHeader + sSrchData);
  280. var oParam = {};
  281. oParam.id = "TXMNE05201";
  282. oParam.service = "ercareapp.ERSmsCallBase";
  283. oParam.method = "reqInsSmsCallInfo";
  284. oParam.inds = "req=ds_inscallinfo";
  285. oParam.outds = "ds_tmp_result=callinfo";
  286. oParam.async = false;
  287. oParam.callback = "cf_TXMNE05201";
  288. tranf_submit(oParam);
  289. var totcallcnt = ds_tmp_result.getColumn(0, "totcallcnt"); //model.getValue('/root/tmp/temp/rslt/callinfo/totcallcnt');
  290. ds_tmp2.clear();
  291. //-----------------------------------------------------------------------------------------------------------
  292. // inpt테이블에 증증 코드 자동 등록 --> inpt의 명칭이 recovwardcd로 되어있으나 중증등록코드임! 헷갈림 주의!
  293. //-----------------------------------------------------------------------------------------------------------
  294. ds_tmp2.addColumn("pid", "string"); // model.makeValue("/root/tmp2/pid",pid);
  295. ds_tmp2.addColumn("indd", "string"); // model.makeValue("/root/tmp2/indd",indd);
  296. ds_tmp2.addColumn("cretno", "string"); // model.makeValue("/root/tmp2/cretno",cretno);
  297. ds_tmp2.addColumn("visitno", "string"); // model.makeValue("/root/tmp2/visitno",visitno);
  298. ds_tmp2.addRow();
  299. ds_tmp2.setColumn(0, "pid", pid);
  300. ds_tmp2.setColumn(0, "indd", indd);
  301. ds_tmp2.setColumn(0, "cretno", cretno);
  302. ds_tmp2.setColumn(0, "visitno", visitno);
  303. //하드코딩된 부분을 하드코드테이블 이용 하드코딩 제거 : 20110308 김영학
  304. //grname = model.getValue("/root/code/codeinfo/codelist[cdgrupid = '104' and cdnm = '" + cpt_grtype.attribute("text") + "']/cdid");
  305. // if(submit("TXMNE05202")) {
  306. // }
  307. var oParam = {};
  308. oParam.id = "TXMNE05202";
  309. oParam.service = "ercareapp.ERSmsCallBase";
  310. oParam.method = "reqrecovward";
  311. oParam.inds = "req=ds_tmp2";
  312. oParam.outds = "";
  313. oParam.async = false;
  314. //oParam.callback = "cf_TXMNE05202";
  315. tranf_submit(oParam);
  316. sysf_messageBox("호출("+ cpt_grtype.text +")되었습니다.", "I");
  317. }
  318. function cf_TXMNE05201(sSvcId, nErrorCode, sErrorMsg) {
  319. if(nErrorCode < 0) {
  320. var errMsg = utlf_transNullToEmpty(sErrorMsg.split("|")[0]);
  321. if(utlf_isSearchString(errMsg, 'info') == false){ // utlf_isSearchString(model.getValue('/root/properties/error/code'), 'info') == false
  322. sysf_messageBox('호출을 실패하였습니다.', 'E999');
  323. return;
  324. }
  325. }
  326. }
  327. //20091116 dhkim
  328. //호출구분선택시 중증구분 캡션 내용 표시 및 협진과 체크 disable (기존소스를 펑션으로 분리)
  329. function fSetCaptionGrType(){
  330. var grtype = ds_grtypelist.getColumn(group1.rdo_grtype.index, "grtype"); //group1.rdo_grtype.value;
  331. fGetCnstDeptList(grtype);
  332. if( !utlf_isNull(ds_grtypelist.lookup("grtype", grtype, "grtypesym")) ) {
  333. cpt_grtype.text = ds_grtypelist.lookup("grtype", grtype, "grtypesym");
  334. }
  335. //cpt_grtype.attribute("text") = model.getValue("/root/init/grtypeinfo/grtypelist[grtype = '" + grtype + "' ]/grtypesym");
  336. group2.button1.visible = false; //attribute("visibility") = "hidden";
  337. group2.button1.enable = true; //button1.attribute("disabled") = false;
  338. //model.refresh();
  339. }
  340. //20091104 dhkim
  341. //New Brain 2차호출
  342. //2차call: 신경외과 임상강사(fellow), Angio방기사에게 호출 grtype:6
  343. function fSecondCallNB(){
  344. if(sysf_messageBox("New Brain 2차호출을 진행하시겠습니까?", "Q") == 7){
  345. return;
  346. }
  347. //20091118 dhkim
  348. //중증구분캡션 New Brain과 동일하게 적용 --> B★
  349. cpt_grtype.text = "B★";
  350. var grtype = "6";
  351. var grtypenm = "";
  352. //new brain 2차는 서울성모만 적용임
  353. if(seoulinstcd == sysf_getUserInfo("dutplceinstcd")){
  354. grtypenm = "New Brain 2차";
  355. }else{
  356. sysf_messageBox("현재 2차호출은 서울성모에서만 사용하실 수 있습니다.", "E");
  357. return;
  358. }
  359. //환자정보
  360. var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
  361. var patnm = ds_erpatinfo.getColumn(0, "nm"); //model.getValue("/root/main/erpat/erpatinfo/nm");
  362. var indd = ds_erpatinfo.getColumn(0, "indd"); //model.getValue("/root/main/erpat/erpatinfo/indd");
  363. var cretno = ds_erpatinfo.getColumn(0, "cretno"); //model.getValue("/root/main/erpat/erpatinfo/cretno");
  364. var visitno = ds_tmp_patinfo.getColumn(0, "visitno"); //model.getValue("/root/tmp/patinfo/visitno");
  365. var intm = ds_erpatinfo.getColumn(0, "intm"); //model.getValue("/root/main/erpat/erpatinfo/intm");
  366. //응급의학과 전화번호
  367. var cntctel = ds_erpatinfo.getColumn(0, "cntctel"); //model.getValue("/root/main/erpat/erpatinfo/cntctel");
  368. cntctel = cntctel.replace(/-/gi, '');
  369. var params = pid + '|'
  370. + indd + '|'
  371. + cretno + '|'
  372. + visitno + '|'
  373. + intm + '|'
  374. + grtype
  375. ;
  376. //호출전 유효성체크
  377. if(!fIsValidErCallDr(params))
  378. return;
  379. var sSrchData = "";
  380. var sSrchHeader = "pid" +"▦"
  381. + "patnm" +"▦"
  382. + "indd" +"▦"
  383. + "cretno" +"▦"
  384. + "visitno" +"▦"
  385. + "intm" +"▦"
  386. + "grtype" +"▦"//호출구분 :
  387. + "grtypenm" +"▦"
  388. + "cntctel" +"▦"
  389. + "callflag" +"▦"//2차, 종료호출구분
  390. + "orddeptcd" +"▩"
  391. ;
  392. //환자정보셋팅
  393. var sSrchData = pid +"▦"
  394. + patnm +"▦"
  395. + indd +"▦"
  396. + cretno +"▦"
  397. + visitno +"▦"
  398. + intm +"▦"
  399. + grtype +"▦"
  400. + grtypenm +"▦"
  401. + cntctel +"▦"
  402. + "2" +"▦" //2차, 종료호출구분 - 2: 2차호출, 3: 종료호출
  403. + '-' +"▩" //new brain 2차호출은 주/부과 세팅 따로 구분 없음.
  404. ;
  405. //model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
  406. ds_inscallinfo.clear();
  407. dsf_setCSVToDs("ds_inscallinfo", sSrchHeader + sSrchData);
  408. var oParam = {};
  409. oParam.id = "TXMNE05203";
  410. oParam.service = "ercareapp.ERSmsCallBase";
  411. oParam.method = "reqInsNewBrainSecondFinalSmsCallInfo";
  412. oParam.inds = "req=ds_inscallinfo";
  413. oParam.outds = "ds_tmp_result=callinfo";
  414. oParam.async = false;
  415. oParam.callback = "cf_TXMNE05203";
  416. tranf_submit(oParam);
  417. }
  418. function cf_TXMNE05203(sSvcId, nErrorCode, sErrorMsg) {
  419. if(nErrorCode < 0) {
  420. var errMsg = utlf_transNullToEmpty(sErrorMsg.split("|")[0]);
  421. if(utlf_isSearchString(errMsg, 'info') == false){
  422. sysf_messageBox('호출을 실패하였습니다.', 'E999');
  423. return;
  424. }
  425. } else {
  426. //총 호출수
  427. var totcallcnt = ds_tmp_result.getColumn(0, "totcallcnt"); //model.getValue('/root/tmp/temp/rslt/callinfo/totcallcnt');
  428. sysf_messageBox("2차 호출("+ cpt_grtype.text +")되었습니다.", "I");
  429. }
  430. }
  431. //20091104 dhkim
  432. //New Brain 종료호출
  433. function fFinalCallNB(){
  434. //사용시기 : TPA약제 시작전이나 사용후 또는 Angio하기 전에 신경과 의사가 판단하여 호출함.
  435. //호출대상 : 1, 2차 New Brain 호출자 전체
  436. if(sysf_messageBox("New Brain 종료호출을 진행하시겠습니까?", "Q") == 7){
  437. return;
  438. }
  439. //중증구분캡션 New Brain과 동일하게 적용 --> B★
  440. cpt_grtype.text = "B★";
  441. var grtype = "6";
  442. var grtypenm = "";
  443. //new brain 종료는 서울성모만 적용임
  444. if(seoulinstcd == sysf_getUserInfo("dutplceinstcd")){
  445. grtypenm = "New Brain";
  446. }else{
  447. sysf_messageBox("현재 종료호출은 서울성모에서만 사용하실 수 있습니다.", "E");
  448. return;
  449. }
  450. //환자정보
  451. var pid = ds_erpatinfo.getColumn(0, "pid"); //model.getValue("/root/main/erpat/erpatinfo/pid");
  452. var patnm = ds_erpatinfo.getColumn(0, "nm"); //model.getValue("/root/main/erpat/erpatinfo/nm");
  453. var indd = ds_erpatinfo.getColumn(0, "indd");
  454. var cretno = ds_erpatinfo.getColumn(0, "cretno");
  455. var visitno = ds_tmp_patinfo.getColumn(0, "visitno"); //model.getValue("/root/tmp/patinfo/visitno");
  456. var intm = ds_erpatinfo.getColumn(0, "intm");
  457. //응급의학과 전화번호
  458. var cntctel = ds_erpatinfo.getColumn(0, "cntctel"); //model.getValue("/root/main/erpat/erpatinfo/cntctel");
  459. cntctel = cntctel.replace(/-/gi, '');
  460. var params = pid + '|'
  461. + indd + '|'
  462. + cretno + '|'
  463. + visitno + '|'
  464. + intm + '|'
  465. + grtype
  466. ;
  467. //호출전 유효성체크
  468. if(!fIsValidErCallDr(params))
  469. return;
  470. var sSrchData = "";
  471. var sSrchHeader = "pid" +"▦"
  472. + "patnm" +"▦"
  473. + "indd" +"▦"
  474. + "cretno" +"▦"
  475. + "visitno" +"▦"
  476. + "intm" +"▦"
  477. + "grtype" +"▦"//호출구분 :
  478. + "grtypenm" +"▦"
  479. + "cntctel" +"▦"
  480. + "callflag" +"▦"//2차, 종료호출구분
  481. + "orddeptcd" +"▩"
  482. ;
  483. //환자정보셋팅
  484. var sSrchData = pid +"▦"
  485. + patnm +"▦"
  486. + indd +"▦"
  487. + cretno +"▦"
  488. + visitno +"▦"
  489. + intm +"▦"
  490. + grtype +"▦"
  491. + grtypenm +"▦"
  492. + cntctel +"▦"
  493. + "3" +"▦" //2차, 종료호출구분 - 2: 2차호출, 3: 종료호출
  494. + '-' +"▩" //new brain 2차호출은 주/부과 세팅 따로 구분 없음.
  495. ;
  496. //model.makeValue("/root/send/reqdata/inscallinfo", sSrchHeader + sSrchData);
  497. ds_inscallinfo.clear();
  498. dsf_setCSVToDs("ds_inscallinfo", sSrchHeader + sSrchData);
  499. var oParam = {};
  500. oParam.id = "TXMNE05203";
  501. oParam.service = "ercareapp.ERSmsCallBase";
  502. oParam.method = "reqInsNewBrainSecondFinalSmsCallInfo";
  503. oParam.inds = "req=ds_inscallinfo";
  504. oParam.outds = "ds_tmp_result=callinfo";
  505. oParam.async = false;
  506. oParam.callback = "cf_TXMNE05203_1";
  507. tranf_submit(oParam);
  508. }
  509. function cf_TXMNE05203_1(sSvcId, nErrorCode, sErrorMsg) {
  510. if(nErrorCode < 0) {
  511. var errMsg = utlf_transNullToEmpty(sErrorMsg.split("|")[0]);
  512. if(utlf_isSearchString(errMsg, 'info') == false){
  513. sysf_messageBox('호출을 실패하였습니다.', 'E999');
  514. return;
  515. }
  516. } else {
  517. //총 호출수
  518. var totcallcnt = ds_tmp_result.getColumn(0, "totcallcnt"); //model.getValue('/root/tmp/temp/rslt/callinfo/totcallcnt');
  519. sysf_messageBox("종료 호출("+ cpt_grtype.text +")되었습니다.", "I");
  520. }
  521. }
  522. ]]></Script>