SMMMO04800.xjs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/*
  3. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  4. CONSULT ( SMMMO04800_CONSULT.xfdl - JScript )
  5. - ▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩▩
  6. */
  7. var arErrorCode = new HashArray();
  8. /**
  9. * @desc : 화면 초기화
  10. * @
  11. * @param :
  12. * @return :
  13. * @author : 오지훈
  14. * @---------------------------------------------------
  15. */
  16. function fInitialize_SMMMO04800(){
  17. var currentDate = utlf_getCurrentDate();
  18. ds_cond.setColumn(0, "fromdd" ,((currentDate.toDate()).getAddDate(-3)).getDateFormat()); //시작일자는 3일 전
  19. ds_cond.setColumn(0, "todd" , currentDate); // 종료일자
  20. lf_gethardcdArrayList(new Array(
  21. "hardcd|445"
  22. ),
  23. new Array(
  24. "ds_hardcd"
  25. )
  26. );
  27. var dutplcecd = sysf_getUserInfo("dutplcecd");
  28. var orddrid = sysf_getUserInfo("userid");
  29. var reopenflag = parent.parent.ds_reopen.getColumn(0, "reopenflag"); //진료대상자 리스트 open여부
  30. if(reopenflag == "Y") { //다시 열린 경우, main에 ordtab의 condlist(화면이 닫힐때 설정된 정보)를 그대로 재설정
  31. try {
  32. ds_cond.copyData(parent.parent.ds_reopen_condlist);
  33. dutplcecd = ds_cond.getColumn(0, "orddeptcd");
  34. orddrid = ds_cond.getColumn(0, "orddrid");
  35. } catch(E) {
  36. }
  37. parent.parent.ds_reopen.setColumn(0, "reopenflag", "N");
  38. }
  39. setDeptCodeList(dutplcecd);
  40. setUserList(dutplcecd, orddrid);
  41. reqOrderInfoOfCol(ds_reqdata1, ds_gridseq, "SMMMO04800", grd_cnstpatlist); //외래환자리스트 컬럼 조회 및 설정
  42. fReqCnstPatList(ds_cond.getColumn(0, "queryflag"));
  43. }
  44. function setDeptCodeList(sDeptcd, sOrddd){
  45. lf_mmbfGetDeptCodeComboList(ds_orddept, "A", sOrddd);
  46. if(!utlf_isNull(sDeptcd))
  47. Div00.cmb_orddept.value = sDeptcd;
  48. }
  49. function setUserList(sOrddeptcd, sUserid, sOrddd){
  50. lf_mmbfGetUserComboList(ds_userlist, sOrddeptcd, "0330", "", "", sOrddd);
  51. frmf_addComboItem("Div00.cmb_orddrid"); //의사콤보 전체항목 추가
  52. if(!utlf_isNull(sUserid)) {
  53. Div00.cmb_orddrid.value = sUserid;
  54. }
  55. }
  56. /**
  57. * @desc : 의뢰(CONSULT)환자 조회
  58. * @
  59. * @param : queryflag - 쿼리구분
  60. * orgin 조회버튼 클릭
  61. * recv 과별받은 건
  62. * req 과별보낸 건
  63. * pid 환자별 보낸 건
  64. * @return :
  65. * @author : 오지훈
  66. * @---------------------------------------------------
  67. */
  68. function fReqCnstPatList(queryflag){
  69. ds_cond.setColumn(0, "queryflag", queryflag);
  70. parent.parent.ds_cond_cnstpatlist.copyData(ds_cond);
  71. ds_reqCnstPat.copyData(ds_cond);
  72. var compsrefcnts = ds_gridseq.getColumn(0, "compsrefcnts");
  73. var compssizecnts = ds_gridseq.getColumn(0, "compssizecnts");
  74. if(utlf_isNull(compsrefcnts)) compsrefcnts = "";
  75. if(utlf_isNull(compssizecnts)) compssizecnts = "";
  76. ds_reqCnstPat.addColumn("compsrefcnts", "string", 1024);
  77. ds_reqCnstPat.addColumn("compssizecnts", "string", 1024);
  78. ds_reqCnstPat.setColumn(0, "compsrefcnts", compsrefcnts);
  79. ds_reqCnstPat.setColumn(0, "compssizecnts", compssizecnts);
  80. var oParam = {};
  81. oParam.id = "TRMMO04801";
  82. oParam.service = "prcpmngtapp.EtcPrcpMngt";
  83. oParam.method = "reqGetCnstPatList";
  84. oParam.inds = "req=" + "ds_reqCnstPat";
  85. oParam.outds = "ds_grd_cnstpatlist=cnstpatlist" + " ds_cnsttotcnt=cnsttotcnt";
  86. oParam.async = true;
  87. oParam.callback = "cf_TRMMO04801";
  88. tranf_submit(oParam);
  89. }
  90. function cf_TRMMO04801(sSvcId, nErrorCode, sErrorMsg) {
  91. var orderby = ds_cond.getColumn(0, "orderby");
  92. var sortcol = ds_cond.getColumn(0, "sortcol");
  93. if(!utlf_isNull(orderby) && !utlf_isNull(sortcol))
  94. ds_grd_cnstpatlist.keystring.current = "S:" + orderby + sortcol;
  95. }
  96. /**
  97. * @desc : 의뢰(consult)환자 환자기본정보설정
  98. * @
  99. * @param :
  100. * @return :
  101. * @author : 오지훈
  102. * @---------------------------------------------------
  103. */
  104. function fReqCnstPatPamInfo(){
  105. var currow = ds_grd_cnstpatlist.rowposition;
  106. var ioflag = ds_grd_cnstpatlist.getColumn(currow, "ioflag");
  107. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  108. var instcd = "";//ds_grd_cnstpatlist.getColumn(currow, "instcd");
  109. var formrecseq = ds_grd_cnstpatlist.getColumn(currow, "formrecseq");
  110. if(ioflag == "O" || ioflag == "S"){
  111. var orddd = ds_grd_cnstpatlist.getColumn(currow, "acptorddd");
  112. var cretno= ds_grd_cnstpatlist.getColumn(currow, "acptcretno");
  113. return; //외래는 현재 협의 중
  114. }else{
  115. var orddd = ds_grd_cnstpatlist.getColumn(currow, "orddd");
  116. var cretno= ds_grd_cnstpatlist.getColumn(currow, "cretno");
  117. }
  118. var param = "C" + "▦" + ioflag + "▦" + pid + "▦" + orddd + "▦" + cretno + "▦" + instcd + "▦" + formrecseq;
  119. return appf_initPatientInfo(param);
  120. }
  121. /**
  122. * @desc : 환자 선택 후, 환자 정보 조회 및 기록지 화면 연동
  123. * @
  124. * @param :
  125. * @return :
  126. * @author : 오지훈
  127. * @---------------------------------------------------
  128. */
  129. function fSelectCnstPat(){
  130. var currow = ds_grd_cnstpatlist.rowposition;
  131. if(currow < 0){
  132. return;
  133. }
  134. var ioflag = ds_grd_cnstpatlist.getColumn(currow, "ioflag");
  135. //var reqptype = ds_grd_cnstpatlist.getColumn(currow, "reqptype"); // 해당 컬럼 없음
  136. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  137. var hngnm = ds_grd_cnstpatlist.getColumn(currow, "hngnm");
  138. if( sysf_getGlobalVariable("able_sel_patlist", "M") == "N" ) { // 환자 선택 가능 여부 체크 2012.09.03 엄영만
  139. sysf_messageBox("현재 로그인한 '"+ sysf_getUserInfo("dutplcenm") +"' 부서는 기록저장 및 처방발행이 불가능한 부서 입니다.\n\n다시 로그인 후 진행 하십시오.","E");
  140. return false;
  141. }
  142. if(ioflag == "O"){
  143. sysf_messageBox("의뢰환자리스트에서 외래환자의 처방 및 진료기록을 작성", "E001");
  144. return;
  145. }
  146. //처방, CP화면에 modal 또는 modaless가 뜬 경우, 환자 선택 불가
  147. if(fChkScrnDisable()==false){
  148. return;
  149. }
  150. //CP환자 여부 확인
  151. if(fChkCPPatValid(currow)==false){
  152. return;
  153. }
  154. // 진료기록에 수정된 사항이 있을 경우 저장할 것인지 묻는 함수 호출 : 2009. 07. 27 김영학
  155. var mainObj = frmf_getMainViewer();
  156. var mainscrnid = mainObj.frmf_getScreenID(); //메인화면의 기록지 ID
  157. if(mainscrnid == "SMMMR00100"){
  158. var prvIntRecPamInfRtn = mainObj.fPrevInitRecPamInfo();
  159. if(prvIntRecPamInfRtn == false){
  160. return;
  161. }// 기록지에 필수 입력사항을 입력하지 않았을 때 그냥 넘어가 버리는 오류 수정 20100305 LYJ
  162. }
  163. //상단정보 설정
  164. //var mainObj = getViewer("sysMessage");
  165. if(fReqCnstPatPamInfo()==true){
  166. //parent.parent.frmf_setParameter("SMMMO04100_reqptype", reqptype);
  167. var cpflag = parent.parent.SMMMO04100_getDSRoot("cpflag");
  168. var ordrecflag = parent.parent.SMMMO04100_getDSMainCond("ordrecflag");
  169. var recflag = parent.parent.SMMMO04100_getDSMainCond("recflag");
  170. var chngflag = parent.parent.SMMMO04100_getDSMainCond("chngflag");
  171. if (recflag == "Y") {
  172. curEmrRecObj = frmf_findPopup("SMMRI00400"); //활성화된 진료기록 화면 object loading
  173. curExamRsltObj = frmf_findPopup("SMAER00800"); //활성화된 검사결과 화면 object loading
  174. curNurTprObj = frmf_findPopup("SMMNR00900"); //활성화된 간호 TPR 화면 object loading
  175. curNurBSEMRObj = frmf_findPopup("SMMNR02500"); //활성화된 간호 TPR 화면 object loading
  176. curGrphObj = frmf_findPopup("SPMRF05200"); //활성화된 그래프 서식 화면 object loading
  177. curCunsultObj = frmf_findPopup("SMMMR05000"); //활성화된 Consult 화면 object loading
  178. curExamRsltNewObj = frmf_findPopup("SMMMI00100"); //활성화된 검사결과 화면 object loading
  179. //if(curEmrRecObj != null){curEmrRecObj.javascript.fClose();} //진료기록 화면 close
  180. var wndobj = frmf_findPopup("SMMRI00400");
  181. if(!utlf_isNull(wndobj))
  182. {
  183. frmf_setParameter("SMMRI00400_param_pid" , parent.parent.SMMMO04100_getPid());
  184. frmf_setParameter("SMMRI00400_param_chosflag", "");//model.getValue("/root/main/paminfo/list/ordtype")); 어디에 있는 노드지?
  185. wndobj.fInitalize();
  186. frmf_setFocusPop("SMMRI00400");
  187. }
  188. if(!utlf_isNull(curExamRsltObj)){
  189. curExamRsltObj.ds_singdata.setColumn(0, "srchpid", pid);
  190. curExamRsltObj.group3.grp_sea.btn_srch.click();
  191. } //검사결과 화면 refresh;
  192. if(!utlf_isNull(curNurTprObj)){ //간호 TPR 화면 refresh : 2008-11-28 : 김영학 ;
  193. curNurTprObj.fInitialize("init");
  194. curNurTprObj.fInitViewer();
  195. curNurTprObj.lf_emrSetTimer();
  196. } //간호 TPR 화면 refresh;
  197. if(!utlf_isNull(curNurBSEMRObj)){ //혈당간호기록 refresh : 2008-12-24 : 김영학 ;
  198. curNurBSEMRObj.fInitialize("init");
  199. } //혈당간호기록 refresh;
  200. if(!utlf_isNull(curGrphObj)){ //그래프 서식 refresh : 2009-01-02 : 박민규 SW 요청 : 김영학 ;
  201. curGrphObj.fInitialize();
  202. } //그래프 서식 refresh;
  203. // [요청번호:20180905021] 성장곡선(2017) 관련 요청드립니다.
  204. var curGrphNewObj = frmf_findPopup("SPMRF06100");
  205. if(!utlf_isNull(curGrphNewObj)){
  206. curGrphNewObj.fInitialize();
  207. }
  208. // if(curCunsultObj != null && consulyn !="T"){
  209. if(!utlf_isNull(curCunsultObj) && consulyn !="T"){
  210. curCunsultObj.fInitalize();
  211. } //그래프 서식 refresh;
  212. if(!utlf_isNull(curExamRsltNewObj)){
  213. curExamRsltNewObj.ds_singdata.setColumn(0, "srchpid", pid );
  214. curExamRsltNewObj.btn_srch.onclick.fireEvent(curExamRsltNewObj.btn_srch, new ClickEventInfo);
  215. } //검사결과 화면 NEW refresh;
  216. curCpObj = mainObj.frmf_findPopup("SMMMP00800"); //활성화된 CP Main 화면 object loading
  217. curPrcpObj = mainObj.frmf_findPopup("SMMMO00100"); //활성화된 처방Main 화면 object loading
  218. curCpSrchObj = mainObj.frmf_findPopup("SPMMP01200"); //활성화된 CP 검색 화면 object loading
  219. if(!utlf_isNull(curPrcpObj)) {curPrcpObj.fPrcpWndClose(); } ////활성화된 처방Main 화면이 있는 경우 close
  220. if(!utlf_isNull(curCpObj)){curCpObj.fCloseGPS();} //활성화된 CP Main화면이 있는 경우 close
  221. if(!utlf_isNull(curCpSrchObj)){curCpSrchObj.fCpSrchWndClose();} //활성화된 CP검색화면이 있는 경우 close
  222. frmf_clearParameter("SMMMO04100_ANSWCNT");
  223. parent.parent.fChngEMRScrn();// 진료기록 Open
  224. } else {
  225. parent.parent.fOpenPrcpMainWnd();
  226. //mainObj.window.javascript.openEmrScrn("SMMMO00100"); //처방화면 open
  227. }
  228. }
  229. /*
  230. if(fReqCnstPatPamInfo(currow)==true){
  231. opener.javascript.fOpenPrcpMainWnd();
  232. }
  233. */
  234. /*
  235. if(fReqCnstPatPamInfo()== true){
  236. if(ordrecflag == "N"){ //기록지연결 여부 Y인 경우, main화면 진료기록지 교체, 화면상단정보 설정 및 처방화면 OPEN
  237. fOpenOrdRecMainWnd();
  238. }else{
  239. fOpenEmptyWnd(); //기록지연결 여부 N인 경우, main화면 빈화면 교체, 화면상단정보 설정 및 처방화면 OPEN
  240. }
  241. }*/
  242. }
  243. /**
  244. * @desc : 그리드 data 엑셀화일로 저장
  245. * @
  246. * @param :
  247. * @return :
  248. * @author : 오지훈
  249. * @---------------------------------------------------
  250. */
  251. function fSaveGridToExcel(){
  252. grdf_exportExcel(grd_cnstpatlist, "의뢰환자리스트", "의뢰");
  253. }
  254. /**
  255. * @desc : CP환자 여부 검사
  256. * @
  257. * @param :
  258. * @return :
  259. * @author : 오지훈
  260. * @---------------------------------------------------
  261. */
  262. function fChkCPPatValid(currow){
  263. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  264. var orddd = ds_grd_cnstpatlist.getColumn(currow, "orddd");
  265. var cretno = ds_grd_cnstpatlist.getColumn(currow, "cretno");
  266. var ioflag = ds_grd_cnstpatlist.getColumn(currow, "ioflag");
  267. var hngnm = ds_grd_cnstpatlist.getColumn(currow, "hngnm");
  268. var orddeptcd = "";//ds_grd_cnstpatlist.getColumn(currow, "orddeptcd");
  269. var acptorddd = ds_grd_cnstpatlist.getColumn(currow, "acptorddd");
  270. var acptcretno = ds_grd_cnstpatlist.getColumn(currow, "acptcretno");
  271. if(ioflag == "O"){ //외래인 경우, 외래접수, 외래생성번호 있는지 확인 후에 처방화면을 open
  272. if(acptorddd != "" && acptcretno != ""){
  273. parent.parent.SMMMO04100_setDSRoot("cpflag", "N");
  274. return true;
  275. }else{
  276. sysf_messageBox("[" + hngnm + "]환자는 외래접수가 되지", "E007");
  277. return false;
  278. }
  279. }
  280. ds_reqPatValid.clearData();
  281. ds_reqPatValid.addRow();
  282. ds_reqPatValid.setColumn(0, "pid" , pid);
  283. ds_reqPatValid.setColumn(0, "orddd" , orddd);
  284. ds_reqPatValid.setColumn(0, "cretno" , cretno);
  285. ds_reqPatValid.setColumn(0, "hngnm" , hngnm); //추가(2008.08.25)
  286. ds_reqPatValid.setColumn(0, "prcpgenrflag", ioflag);
  287. ds_reqPatValid.setColumn(0, "srchtabflag" , "D"); //대상자리스트탭(I/D):조회결과orddd,cretno는 외래이력의 수전정보임
  288. var oParam = {};
  289. oParam.id = "TRMMO04303";
  290. oParam.service = "prcpbaseapp.CpMngt";
  291. oParam.method = "reqGePattValidity";
  292. oParam.inds = "req=" + "ds_reqPatValid";
  293. oParam.outds = "ds_rsltgetdata=getdata";
  294. oParam.async = false;
  295. oParam.callback = "cf_TRMMO04303"; //CP적용 여부 확인
  296. tranf_submit(oParam);
  297. if(arErrorCode.pop("TRMMO04303") >= 0){
  298. if(ds_rsltgetdata.rowcount < 1){ //cp적용환자 tbl에 유효한 데이터가 없는 경우
  299. parent.parent.SMMMO04100_setDSRoot("cpflag", "N"); //처방open
  300. return true;
  301. } else { //CP적용환자 tbl에 유효한 데이터가 있는 경우
  302. dsf_setDefaultVal(ds_rsltgetdata, "appyn:Y");
  303. var appstat = ds_rsltgetdata.getColumn(0, "appstat");
  304. var cpgnm = ds_rsltgetdata.getColumn(0, "cpgnm");
  305. var cpgappno = ds_rsltgetdata.getColumn(0, "cpgappno");
  306. var msgcnts = ds_rsltgetdata.getColumn(0, "msgcnts");
  307. var msgflag = ds_rsltgetdata.getColumn(0, "msgflag");
  308. var prtlflagcd = ds_rsltgetdata.getColumn(0, "prtlflagcd"); //01:CP,02:CPG
  309. if(appstat == 52){
  310. //case52: 입원장 CP
  311. var rtnval = sysf_messageBox(msgcnts, msgflag);
  312. if(rtnval == 6){
  313. parent.parent.SMMMO04100_setDSRoot("cpflag", "X"); // CP Main open
  314. return true;
  315. } else {
  316. parent.parent.SMMMO04100_setDSRoot("cpflag", "N");
  317. // if(fUpdtCPPatAppStatVal(41) != false && !utlf_isNull(ds_grd_cnstpatlist.getColumn(currow, "cpyn"))){ //41 : CP 취소
  318. // ds_grd_cnstpatlist.setColumn(currow, "cpyn", "N");
  319. // return;
  320. // } else {
  321. return false;
  322. // }
  323. }
  324. } else {
  325. if( prtlflagcd == "02" && utlf_isNull(appstat) && msgflag == "P" ){ //모니터링구분:대상자탐색 Case. CPG & 호출flag:Popup(appyn:평가용여부)
  326. //CPG적용대상자 알림 팝업 호출 (2009.05.04)
  327. frmf_setParameter("SMMMO041_hngnm" , hngnm);
  328. frmf_setParameter("SMMMO041_pid" , pid);
  329. frmf_setParameter("SMMMO041_cretno" , cretno);
  330. frmf_setParameter("SMMMO041_orddd" , orddd);
  331. frmf_setParameter("SMMMO041_ordtype" , ioflag);
  332. frmf_setParameter("SMMMO041_orddeptcd" , orddeptcd);
  333. frmf_setParameter("SMMMO041_slipnm" , msgcnts); //cpgno▦cpghistseq▦cpgnm▦slipno▦slipnm▦valusgeyn▦valunm▦guidedocucnts
  334. frmf_setParameter("SMMMO041_cpgmntrflag", appstat); //null, SPMMP03200화면에서 cpgmntrflag(M or S)으로 따짐
  335. frmf_setParameter("SMMMO041_cpgappno" , cpgappno); //적용중인 CP가 존재하면 값이 있음
  336. frmf_setParameter("SMMMO041_cpgnm" , cpgnm); //적용중인 CP가 존재하면 값이 있음
  337. frmf_modal("SPMMP03200", "SPMMP03200", null, null, null, null, null, null, null, null, null, null, "P"); //CP대상자 알람 팝업
  338. // if( cpgappno > 0 && cpgappno != frmf_getParameter("SPMMP032_cpgappno") && !utlf_isNull(ds_grd_cnstpatlist.getColumn(currow, "cpyn"))){ //진행중인 CP가 있는데 팝업에서 Drop한 경우 CP여부 N으로..
  339. // ds_grd_cnstpatlist.setColumn(currow, "cpyn", "N");
  340. // }
  341. if( !utlf_isNull(frmf_getParameter("SPMMP032_cpgappno")) && frmf_getParameter("SPMMP032_cpgappno") > 0 ){
  342. parent.parent.SMMMO04100_setDSRoot("cpflag", "Y"); //CPG적용한 경우, MGPS 호출
  343. } else {
  344. parent.parent.SMMMO04100_setDSRoot("cpflag", "N"); //미적용 시 처방 화면 호출
  345. }
  346. frmf_clearParameter("SPMMP032_cpgappno");
  347. frmf_clearParameter("SMMMO041_hngnm");
  348. frmf_clearParameter("SMMMO041_pid");
  349. frmf_clearParameter("SMMMO041_cretno");
  350. frmf_clearParameter("SMMMO041_orddd");
  351. frmf_clearParameter("SMMMO041_ordtype");
  352. frmf_clearParameter("SMMMO041_orddeptcd");
  353. frmf_clearParameter("SMMMO041_slipnm");
  354. frmf_clearParameter("SMMMO041_cpgmntrflag");
  355. frmf_clearParameter("SMMMO041_cpgappno");
  356. frmf_clearParameter("SMMMO041_cpgnm");
  357. return true;
  358. } else {
  359. //case 12 : D0 ~ D1 CP
  360. //그외 case : (10 : 진행중...)
  361. if( !utlf_isNull(msgcnts) && !utlf_isNull(msgflag) ){
  362. //12: D0 처방일과 == 입원일 -> Drop 유도
  363. //그외: 오늘날짜 > CP퇴원예정일 -> Drop 유도
  364. sysf_messageBox(msgcnts, msgflag);
  365. frmf_setParameter("SMMMO043_cpgappno", cpgappno); //drop 팝업에서 인식할 수 있는 param
  366. frmf_setParameter("SMMMO043_drop" , "N"); //drop 팝업에서 인식할 수 있는 param
  367. frmf_modal("SPMMP02300", "SPMMP02300", null, null, null, null, null, null, null, null, null, null, "M"); //Drop 팝업 호출
  368. parent.parent.SMMMO04100_setDSRoot("cpflag", "N");
  369. if( frmf_getParameter("SMMMO043_drop") == "Y" ){
  370. //ds_grd_erpatlist.setColumn(currow, "cpyn", "N");
  371. }else{
  372. return false;
  373. }
  374. frmf_clearParameter("SMMMO043_cpgappno");
  375. frmf_clearParameter("SMMMO043_drop");
  376. return true;
  377. }
  378. parent.parent.SMMMO04100_setDSRoot("cpflag", "Y");
  379. return true;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. function cf_TRMMO04303(sSvcId, nErrorCode, sErrorMsg) {
  386. arErrorCode.push(sSvcId, nErrorCode);
  387. }
  388. /**
  389. * @desc : 미수행처방관리 화면 Open
  390. * @
  391. * @param :
  392. * @return :
  393. * @author : 오지훈
  394. * @---------------------------------------------------
  395. */
  396. function fOpenInFinPrcp(){
  397. var currow = ds_grd_cnstpatlist.rowposition;
  398. if(currow < 0){
  399. return;
  400. }
  401. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  402. var orddeptcd = ds_cond.getColumn(0, "orddeptcd");
  403. var orddrid = ds_cond.getColumn(0, "orddrid");
  404. frmf_setParameter("SMMMO02800_pid" , pid);
  405. frmf_setParameter("SMMMO02800_ioflag" , "I");
  406. frmf_setParameter("SMMMO02800_orddeptcd", orddeptcd);
  407. frmf_setParameter("SMMMO02800_orddrid" , orddrid);
  408. frmf_open("SMMMO02800", "SMMMO02800", null, null, null, null, null, null, null, null, null, null, "M");
  409. }
  410. /**
  411. * @desc : (의뢰)관심환자등록창 호출
  412. * @
  413. * @param :
  414. * @return :
  415. * @author : 오지훈
  416. * @---------------------------------------------------
  417. */
  418. function fCallWndConcPatRgst(){
  419. var currow = ds_grd_cnstpatlist.rowposition;
  420. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  421. var hngnm = ds_grd_cnstpatlist.getColumn(currow, "hngnm");
  422. var orddd = ds_grd_cnstpatlist.getColumn(currow, "orddd");
  423. var cretno = ds_grd_cnstpatlist.getColumn(currow, "cretno");
  424. var seqno = "";//ds_grd_cnstpatlist.getColumn(currow, "seqno");
  425. var instcd = "";//ds_grd_cnstpatlist.getColumn(currow, "instcd");
  426. var param = "I" + "▩" + pid + "▩" + hngnm + "▩" + orddd + "▩" + cretno + "▩" + seqno + "▩" + instcd;
  427. frmf_setParameter("param", param);
  428. frmf_open("SPMMO08200", "SPMMO08200", null, null, null, null, null, null, null, null, null, null, "M");
  429. //frmf_modal("SPMMO08200", "SPMMO08200", null, null, null, null, null, null, null, null, null, null, "M");
  430. //fReqCnstPatList(ds_cond.getColumn(0, "queryflag"));
  431. }
  432. /**
  433. * @desc : (의뢰)주의요망환자창 호출
  434. * @
  435. * @param :
  436. * @return :
  437. * @author : 엄영만
  438. * @---------------------------------------------------
  439. */
  440. function fCallWndWarnPat(){
  441. var nCurRow = ds_grd_cnstpatlist.rowposition;
  442. var sPid = ds_grd_cnstpatlist.getColumn(nCurRow, "pid");
  443. var sHngnm = ds_grd_cnstpatlist.getColumn(nCurRow, "hngnm");
  444. frmf_setParameter("SMMMO19100_warncd" , sPid);
  445. frmf_setParameter("SMMMO19100_warnnm" , sHngnm);
  446. frmf_modal("SMMMO19100", "SMMMO19100", null, null, null, null, null, null, null, null, null, null, "M");
  447. frmf_clearParameter("SMMMO19100_warncd");
  448. frmf_clearParameter("SMMMO19100_warnnm");
  449. }
  450. function fPrtPatList() {
  451. if(utlf_isNull(ds_cond.getColumnInfo("orddeptnm"))) ds_cond.addColumn("orddeptnm", "string");
  452. if(utlf_isNull(ds_cond.getColumnInfo("reqflagnm"))) ds_cond.addColumn("reqflagnm", "string");
  453. if(utlf_isNull(ds_cond.getColumnInfo("replynnm"))) ds_cond.addColumn("replynnm", "string");
  454. if(utlf_isNull(ds_cond.getColumnInfo("ioflagnm"))) ds_cond.addColumn("ioflagnm", "string");
  455. if(utlf_isNull(ds_cond.getColumnInfo("orddrnm"))) ds_cond.addColumn("orddrnm", "string");
  456. ds_cond.setColumn(0, "orddeptnm", Div00.cmb_orddept.text);
  457. ds_cond.setColumn(0, "reqflagnm", Div00.cmb_reqflag.text);
  458. ds_cond.setColumn(0, "replynnm", Div00.cmb_replyn.text);
  459. ds_cond.setColumn(0, "ioflagnm", Div00.combo1.text);
  460. ds_cond.setColumn(0, "orddrnm", Div00.cmb_orddrid.text);
  461. var objDOM = rptf_createDOM(); // DOM 객체 설정
  462. rptf_setNodeListToDOM(objDOM, "/root/main/cnstpatinfo/cnstpatlist", ds_grd_cnstpatlist); // 데이터셋 1
  463. rptf_setNodeListToDOM(objDOM, "/root/main/cond", ds_cond); // 데이터셋 2
  464. //sysf_trace(objDOM.documentElement.source); // XML 내용출력
  465. var objParam = new Object();
  466. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  467. var option = "open=1;save=1;directprint=0;print=1;zoom=0;";
  468. rptf_exeReportPreview30(["RPMMO04108"],[objParam], option);
  469. }
  470. function fChngColorCnstPatList_Eryn(eryn) {
  471. var sColor = "#000000";
  472. if(!utlf_isNull(eryn) && eryn == "Y"){
  473. sColor = "#ff0000";
  474. }
  475. return sColor;
  476. }
  477. function fSendSmsCnstPat(){
  478. fSendSmsPatList(grd_cnstpatlist, ds_grd_cnstpatlist);
  479. }
  480. ]]></Script>