SMMMO04800.xjs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  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(sortcol != "" && orderby != "")
  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.btn_srch.onclick.fireEvent(curExamRsltObj.btn_srch, new ClickEventInfo);
  191. } //검사결과 화면 refresh;
  192. if(!utlf_isNull(curNurTprObj)){ //간호 TPR 화면 refresh : 2008-11-28 : 김영학 ;
  193. curNurTprObj.fInitialize("init");
  194. } //간호 TPR 화면 refresh;
  195. if(!utlf_isNull(curNurBSEMRObj)){ //혈당간호기록 refresh : 2008-12-24 : 김영학 ;
  196. curNurBSEMRObj.fInitialize("init");
  197. } //혈당간호기록 refresh;
  198. if(!utlf_isNull(curGrphObj)){ //그래프 서식 refresh : 2009-01-02 : 박민규 SW 요청 : 김영학 ;
  199. curGrphObj.fInitialize();
  200. } //그래프 서식 refresh;
  201. // if(curCunsultObj != null && consulyn !="T"){
  202. if(!utlf_isNull(curCunsultObj) && consulyn !="T"){
  203. curCunsultObj.fInitalize();
  204. } //그래프 서식 refresh;
  205. if(!utlf_isNull(curExamRsltNewObj)){
  206. curExamRsltNewObj.ds_singdata.setColumn(0, "srchpid", pid );
  207. curExamRsltNewObj.btn_srch.onclick.fireEvent(curExamRsltNewObj.btn_srch, new ClickEventInfo);
  208. } //검사결과 화면 NEW refresh;
  209. curCpObj = mainObj.frmf_findPopup("SMMMP00800"); //활성화된 CP Main 화면 object loading
  210. curPrcpObj = mainObj.frmf_findPopup("SMMMO00100"); //활성화된 처방Main 화면 object loading
  211. curCpSrchObj = mainObj.frmf_findPopup("SPMMP01200"); //활성화된 CP 검색 화면 object loading
  212. if(!utlf_isNull(curPrcpObj)) {curPrcpObj.fPrcpWndClose(); } ////활성화된 처방Main 화면이 있는 경우 close
  213. if(!utlf_isNull(curCpObj)){curCpObj.fCloseGPS();} //활성화된 CP Main화면이 있는 경우 close
  214. if(!utlf_isNull(curCpSrchObj)){curCpSrchObj.fCpSrchWndClose();} //활성화된 CP검색화면이 있는 경우 close
  215. frmf_clearParameter("SMMMO04100_ANSWCNT");
  216. parent.parent.fChngEMRScrn();// 진료기록 Open
  217. } else {
  218. parent.parent.fOpenPrcpMainWnd();
  219. //mainObj.window.javascript.openEmrScrn("SMMMO00100"); //처방화면 open
  220. }
  221. }
  222. /*
  223. if(fReqCnstPatPamInfo(currow)==true){
  224. opener.javascript.fOpenPrcpMainWnd();
  225. }
  226. */
  227. /*
  228. if(fReqCnstPatPamInfo()== true){
  229. if(ordrecflag == "N"){ //기록지연결 여부 Y인 경우, main화면 진료기록지 교체, 화면상단정보 설정 및 처방화면 OPEN
  230. fOpenOrdRecMainWnd();
  231. }else{
  232. fOpenEmptyWnd(); //기록지연결 여부 N인 경우, main화면 빈화면 교체, 화면상단정보 설정 및 처방화면 OPEN
  233. }
  234. }*/
  235. }
  236. /**
  237. * @desc : 그리드 data 엑셀화일로 저장
  238. * @
  239. * @param :
  240. * @return :
  241. * @author : 오지훈
  242. * @---------------------------------------------------
  243. */
  244. function fSaveGridToExcel(){
  245. grdf_exportExcel(grd_cnstpatlist, "의뢰환자리스트", "의뢰");
  246. }
  247. /**
  248. * @desc : CP환자 여부 검사
  249. * @
  250. * @param :
  251. * @return :
  252. * @author : 오지훈
  253. * @---------------------------------------------------
  254. */
  255. function fChkCPPatValid(currow){
  256. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  257. var orddd = ds_grd_cnstpatlist.getColumn(currow, "orddd");
  258. var cretno = ds_grd_cnstpatlist.getColumn(currow, "cretno");
  259. var ioflag = ds_grd_cnstpatlist.getColumn(currow, "ioflag");
  260. var hngnm = ds_grd_cnstpatlist.getColumn(currow, "hngnm");
  261. var orddeptcd = "";//ds_grd_cnstpatlist.getColumn(currow, "orddeptcd");
  262. var acptorddd = ds_grd_cnstpatlist.getColumn(currow, "acptorddd");
  263. var acptcretno = ds_grd_cnstpatlist.getColumn(currow, "acptcretno");
  264. if(ioflag == "O"){ //외래인 경우, 외래접수, 외래생성번호 있는지 확인 후에 처방화면을 open
  265. if(acptorddd != "" && acptcretno != ""){
  266. parent.parent.SMMMO04100_setDSRoot("cpflag", "N");
  267. return true;
  268. }else{
  269. sysf_messageBox("[" + hngnm + "]환자는 외래접수가 되지", "E007");
  270. return false;
  271. }
  272. }
  273. ds_reqPatValid.clearData();
  274. ds_reqPatValid.addRow();
  275. ds_reqPatValid.setColumn(0, "pid" , pid);
  276. ds_reqPatValid.setColumn(0, "orddd" , orddd);
  277. ds_reqPatValid.setColumn(0, "cretno" , cretno);
  278. ds_reqPatValid.setColumn(0, "hngnm" , hngnm); //추가(2008.08.25)
  279. ds_reqPatValid.setColumn(0, "prcpgenrflag", ioflag);
  280. ds_reqPatValid.setColumn(0, "srchtabflag" , "D"); //대상자리스트탭(I/D):조회결과orddd,cretno는 외래이력의 수전정보임
  281. var oParam = {};
  282. oParam.id = "TRMMO04303";
  283. oParam.service = "prcpbaseapp.CpMngt";
  284. oParam.method = "reqGePattValidity";
  285. oParam.inds = "req=" + "ds_reqPatValid";
  286. oParam.outds = "ds_rsltgetdata=getdata";
  287. oParam.async = false;
  288. oParam.callback = "cf_TRMMO04303"; //CP적용 여부 확인
  289. tranf_submit(oParam);
  290. if(arErrorCode.pop("TRMMO04303") >= 0){
  291. if(ds_rsltgetdata.rowcount < 1){ //cp적용환자 tbl에 유효한 데이터가 없는 경우
  292. parent.parent.SMMMO04100_setDSRoot("cpflag", "N"); //처방open
  293. return true;
  294. } else { //CP적용환자 tbl에 유효한 데이터가 있는 경우
  295. dsf_setDefaultVal(ds_rsltgetdata, "appyn:Y");
  296. var appstat = ds_rsltgetdata.getColumn(0, "appstat");
  297. var cpgnm = ds_rsltgetdata.getColumn(0, "cpgnm");
  298. var cpgappno = ds_rsltgetdata.getColumn(0, "cpgappno");
  299. var msgcnts = ds_rsltgetdata.getColumn(0, "msgcnts");
  300. var msgflag = ds_rsltgetdata.getColumn(0, "msgflag");
  301. var prtlflagcd = ds_rsltgetdata.getColumn(0, "prtlflagcd"); //01:CP,02:CPG
  302. if(appstat == 52){
  303. //case52: 입원장 CP
  304. var rtnval = sysf_messageBox(msgcnts, msgflag);
  305. if(rtnval == 6){
  306. parent.parent.SMMMO04100_setDSRoot("cpflag", "X"); // CP Main open
  307. return true;
  308. } else {
  309. parent.parent.SMMMO04100_setDSRoot("cpflag", "N");
  310. // if(fUpdtCPPatAppStatVal(41) != false && !utlf_isNull(ds_grd_cnstpatlist.getColumn(currow, "cpyn"))){ //41 : CP 취소
  311. // ds_grd_cnstpatlist.setColumn(currow, "cpyn", "N");
  312. // return;
  313. // } else {
  314. return false;
  315. // }
  316. }
  317. } else {
  318. if( prtlflagcd == "02" && utlf_isNull(appstat) && msgflag == "P" ){ //모니터링구분:대상자탐색 Case. CPG & 호출flag:Popup(appyn:평가용여부)
  319. //CPG적용대상자 알림 팝업 호출 (2009.05.04)
  320. frmf_setParameter("SMMMO041_hngnm" , hngnm);
  321. frmf_setParameter("SMMMO041_pid" , pid);
  322. frmf_setParameter("SMMMO041_cretno" , cretno);
  323. frmf_setParameter("SMMMO041_orddd" , orddd);
  324. frmf_setParameter("SMMMO041_ordtype" , ioflag);
  325. frmf_setParameter("SMMMO041_orddeptcd" , orddeptcd);
  326. frmf_setParameter("SMMMO041_slipnm" , msgcnts); //cpgno▦cpghistseq▦cpgnm▦slipno▦slipnm▦valusgeyn▦valunm▦guidedocucnts
  327. frmf_setParameter("SMMMO041_cpgmntrflag", appstat); //null, SPMMP03200화면에서 cpgmntrflag(M or S)으로 따짐
  328. frmf_setParameter("SMMMO041_cpgappno" , cpgappno); //적용중인 CP가 존재하면 값이 있음
  329. frmf_setParameter("SMMMO041_cpgnm" , cpgnm); //적용중인 CP가 존재하면 값이 있음
  330. frmf_modal("SPMMP03200", "SPMMP03200", null, null, null, null, null, null, null, null, null, null, "P"); //CP대상자 알람 팝업
  331. // if( cpgappno > 0 && cpgappno != frmf_getParameter("SPMMP032_cpgappno") && !utlf_isNull(ds_grd_cnstpatlist.getColumn(currow, "cpyn"))){ //진행중인 CP가 있는데 팝업에서 Drop한 경우 CP여부 N으로..
  332. // ds_grd_cnstpatlist.setColumn(currow, "cpyn", "N");
  333. // }
  334. if( !utlf_isNull(frmf_getParameter("SPMMP032_cpgappno")) && frmf_getParameter("SPMMP032_cpgappno") > 0 ){
  335. parent.parent.SMMMO04100_setDSRoot("cpflag", "Y"); //CPG적용한 경우, MGPS 호출
  336. } else {
  337. parent.parent.SMMMO04100_setDSRoot("cpflag", "N"); //미적용 시 처방 화면 호출
  338. }
  339. frmf_clearParameter("SPMMP032_cpgappno");
  340. frmf_clearParameter("SMMMO041_hngnm");
  341. frmf_clearParameter("SMMMO041_pid");
  342. frmf_clearParameter("SMMMO041_cretno");
  343. frmf_clearParameter("SMMMO041_orddd");
  344. frmf_clearParameter("SMMMO041_ordtype");
  345. frmf_clearParameter("SMMMO041_orddeptcd");
  346. frmf_clearParameter("SMMMO041_slipnm");
  347. frmf_clearParameter("SMMMO041_cpgmntrflag");
  348. frmf_clearParameter("SMMMO041_cpgappno");
  349. frmf_clearParameter("SMMMO041_cpgnm");
  350. return true;
  351. } else {
  352. //case 12 : D0 ~ D1 CP
  353. //그외 case : (10 : 진행중...)
  354. if( !utlf_isNull(msgcnts) && !utlf_isNull(msgflag) ){
  355. //12: D0 처방일과 == 입원일 -> Drop 유도
  356. //그외: 오늘날짜 > CP퇴원예정일 -> Drop 유도
  357. sysf_messageBox(msgcnts, msgflag);
  358. frmf_setParameter("SMMMO043_cpgappno", cpgappno); //drop 팝업에서 인식할 수 있는 param
  359. frmf_setParameter("SMMMO043_drop" , "N"); //drop 팝업에서 인식할 수 있는 param
  360. frmf_modal("SPMMP02300", "SPMMP02300", null, null, null, null, null, null, null, null, null, null, "M"); //Drop 팝업 호출
  361. parent.parent.SMMMO04100_setDSRoot("cpflag", "N");
  362. if( frmf_getParameter("SMMMO043_drop") == "Y" ){
  363. //ds_grd_erpatlist.setColumn(currow, "cpyn", "N");
  364. }else{
  365. return false;
  366. }
  367. frmf_clearParameter("SMMMO043_cpgappno");
  368. frmf_clearParameter("SMMMO043_drop");
  369. return true;
  370. }
  371. parent.parent.SMMMO04100_setDSRoot("cpflag", "Y");
  372. return true;
  373. }
  374. }
  375. }
  376. }
  377. }
  378. function cf_TRMMO04303(sSvcId, nErrorCode, sErrorMsg) {
  379. arErrorCode.push(sSvcId, nErrorCode);
  380. }
  381. /**
  382. * @desc : 미수행처방관리 화면 Open
  383. * @
  384. * @param :
  385. * @return :
  386. * @author : 오지훈
  387. * @---------------------------------------------------
  388. */
  389. function fOpenInFinPrcp(){
  390. var currow = ds_grd_cnstpatlist.rowposition;
  391. if(currow < 0){
  392. return;
  393. }
  394. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  395. var orddeptcd = ds_cond.getColumn(0, "orddeptcd");
  396. var orddrid = ds_cond.getColumn(0, "orddrid");
  397. frmf_setParameter("SMMMO02800_pid" , pid);
  398. frmf_setParameter("SMMMO02800_ioflag" , "I");
  399. frmf_setParameter("SMMMO02800_orddeptcd", orddeptcd);
  400. frmf_setParameter("SMMMO02800_orddrid" , orddrid);
  401. frmf_open("SMMMO02800", "SMMMO02800", null, null, null, null, null, null, null, null, null, null, "M");
  402. }
  403. /**
  404. * @desc : (의뢰)관심환자등록창 호출
  405. * @
  406. * @param :
  407. * @return :
  408. * @author : 오지훈
  409. * @---------------------------------------------------
  410. */
  411. function fCallWndConcPatRgst(){
  412. var currow = ds_grd_cnstpatlist.rowposition;
  413. var pid = ds_grd_cnstpatlist.getColumn(currow, "pid");
  414. var hngnm = ds_grd_cnstpatlist.getColumn(currow, "hngnm");
  415. var orddd = ds_grd_cnstpatlist.getColumn(currow, "orddd");
  416. var cretno = ds_grd_cnstpatlist.getColumn(currow, "cretno");
  417. var seqno = "";//ds_grd_cnstpatlist.getColumn(currow, "seqno");
  418. var instcd = "";//ds_grd_cnstpatlist.getColumn(currow, "instcd");
  419. var param = "I" + "▩" + pid + "▩" + hngnm + "▩" + orddd + "▩" + cretno + "▩" + seqno + "▩" + instcd;
  420. frmf_setParameter("param", param);
  421. frmf_modal("SPMMO08200", "SPMMO08200", null, null, null, null, null, null, null, null, null, null, "M");
  422. fReqCnstPatList(ds_cond.getColumn(0, "queryflag"));
  423. }
  424. /**
  425. * @desc : (의뢰)주의요망환자창 호출
  426. * @
  427. * @param :
  428. * @return :
  429. * @author : 엄영만
  430. * @---------------------------------------------------
  431. */
  432. function fCallWndWarnPat(){
  433. var nCurRow = ds_grd_cnstpatlist.rowposition;
  434. var sPid = ds_grd_cnstpatlist.getColumn(nCurRow, "pid");
  435. var sHngnm = ds_grd_cnstpatlist.getColumn(nCurRow, "hngnm");
  436. frmf_setParameter("SMMMO19100_warncd" , sPid);
  437. frmf_setParameter("SMMMO19100_warnnm" , sHngnm);
  438. frmf_modal("SMMMO19100", "SMMMO19100", null, null, null, null, null, null, null, null, null, null, "M");
  439. frmf_clearParameter("SMMMO19100_warncd");
  440. frmf_clearParameter("SMMMO19100_warnnm");
  441. }
  442. function fPrtPatList() {
  443. if(utlf_isNull(ds_cond.getColumnInfo("orddeptnm"))) ds_cond.addColumn("orddeptnm", "string");
  444. if(utlf_isNull(ds_cond.getColumnInfo("reqflagnm"))) ds_cond.addColumn("reqflagnm", "string");
  445. if(utlf_isNull(ds_cond.getColumnInfo("replynnm"))) ds_cond.addColumn("replynnm", "string");
  446. if(utlf_isNull(ds_cond.getColumnInfo("ioflagnm"))) ds_cond.addColumn("ioflagnm", "string");
  447. if(utlf_isNull(ds_cond.getColumnInfo("orddrnm"))) ds_cond.addColumn("orddrnm", "string");
  448. ds_cond.setColumn(0, "orddeptnm", Div00.cmb_orddept.text);
  449. ds_cond.setColumn(0, "reqflagnm", Div00.cmb_reqflag.text);
  450. ds_cond.setColumn(0, "replynnm", Div00.cmb_replyn.text);
  451. ds_cond.setColumn(0, "ioflagnm", Div00.combo1.text);
  452. ds_cond.setColumn(0, "orddrnm", Div00.cmb_orddrid.text);
  453. var objDOM = rptf_createDOM(); // DOM 객체 설정
  454. rptf_setNodeListToDOM(objDOM, "/root/main/cnstpatinfo/cnstpatlist", ds_grd_cnstpatlist); // 데이터셋 1
  455. rptf_setNodeListToDOM(objDOM, "/root/main/cond", ds_cond); // 데이터셋 2
  456. //sysf_trace(objDOM.documentElement.source); // XML 내용출력
  457. var objParam = new Object();
  458. objParam.xml_data_XML1 = objDOM.documentElement.source; // 최상의노드 XML 스트링 추출
  459. var option = "open=1;save=1;directprint=0;print=1;zoom=0;callback=cbf_rpt_onFinishPrintXML";
  460. rptf_exeReportPreview30(["RPMMO04108"],[objParam], option);
  461. }]]></Script>