SMMRC00100.xjs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  3. * System Name : DBS
  4. * Job Name :
  5. * File Name : SMMRC00100.xjs
  6. * Creator :
  7. * Make Date : 2014-11-21
  8. *
  9. * Description :
  10. *---------------------------------------------------------------------------------------
  11. * Modify Date Modifier Modify Description
  12. *---------------------------------------------------------------------------------------
  13. * 2014-11-21 DBS Converting Program(TF->XP)
  14. *
  15. *---------------------------------------------------------------------------------------
  16. ****************************************************************************************/
  17. //=======================================================================================
  18. // Transaction Callback
  19. //---------------------------------------------------------------------------------------
  20. /****************************************************************************************
  21. * Argument : 01.sSvcId : 서비스 ID
  22. * : 02.nErrorCode : 에러코드
  23. * : 03.sErrorMsg : 에러메시지
  24. * Description : tr_getCodeList의 콜백함수
  25. ****************************************************************************************/
  26. function cf_TRPMC02500(sSvcId, nErrorCode, sErrorMsg) {
  27. if(nErrorCode < 0) return;
  28. arErrorCode.push(sSvcId, nErrorCode);
  29. //sysf_trace("***** cf_TRPMC02500 *****");
  30. }
  31. function cf_TRMRC00144(sSvcId, nErrorCode, sErrorMsg) {
  32. if(nErrorCode < 0) return;
  33. //sysf_trace("***** cf_TRMRC00144 *****");
  34. ds_grd_chrtlist.enableevent = false;
  35. ds_grd_chrtlist.rowposition = -1;
  36. ds_grd_chrtlist.enableevent = true;
  37. if(ds_grd_chrtlist.rowcount > 0){
  38. var medirecno = ds_grd_chrtlist.getColumn(0, "medirecno");
  39. if (!utlf_isNull(medirecno)) {
  40. ds_send_reqdata.setColumn(0, "ioflag" , "O");
  41. ds_send_reqdata.setColumn(0, "medirecno", medirecno);
  42. ds_send_reqdata.setColumn(0, "pid" , ds_grd_chrtlist.getColumn(0, "pid"));
  43. var oParam = {};
  44. oParam.id = "TRMRC00170";
  45. oParam.service = "chrtmngtapp.ChrtRendMngt";
  46. oParam.method = "reqGetChrtLendList";
  47. oParam.inds = "req=ds_send_reqdata";
  48. oParam.outds = "ds_grd_chrtlendlist=chrtlendlist";
  49. oParam.async = false;
  50. oParam.callback = "cf_TRMRC00170";
  51. tranf_submit(oParam);
  52. }
  53. }
  54. }
  55. function cf_TRMRC00145(sSvcId, nErrorCode, sErrorMsg) {
  56. if(nErrorCode < 0) return;
  57. //sysf_trace("***** cf_TRMRC00145 *****");
  58. ds_grd_emrlist.rowposition = -1;
  59. }
  60. function cf_TRMRC00146(sSvcId, nErrorCode, sErrorMsg) {
  61. if(nErrorCode < 0) return;
  62. //sysf_trace("***** cf_TRMRC00146 *****");
  63. ds_grd_healexam.rowposition = -1;
  64. }
  65. function cf_TRMRC00170(sSvcId, nErrorCode, sErrorMsg) {
  66. if(nErrorCode < 0) return;
  67. //sysf_trace("***** cf_TRMRC00170 *****");
  68. ds_grd_chrtlendlist.rowposition = -1;
  69. }
  70. function cf_TRMRC00147(sSvcId, nErrorCode, sErrorMsg) {
  71. if(nErrorCode < 0) return;
  72. //sysf_trace("***** cf_TRMRC00147 *****");
  73. var msgER = "";
  74. var msgAH = "";
  75. var dataCnt = ds_main_chrtinfo_oldimglist.rowcount;
  76. for (var i = 0 ; i < dataCnt ; i++)
  77. {
  78. var cls = ds_main_chrtinfo_oldimglist.getColumn(i, "cls");
  79. var cnt = ds_main_chrtinfo_oldimglist.getColumn(i, "cnt");
  80. // 구영상 응급의학과
  81. if (cls == "E") {
  82. msgER = "▣ 구영상 응급의학과 (" + cnt + "건)";
  83. }
  84. // 구영상 건진
  85. if (cls == "S") {
  86. msgAH = "▣ 구영상 건진 (" + cnt + "건)";
  87. }
  88. }
  89. ds_hidden.setColumn(0, "cap_oldimgER", msgER);
  90. ds_hidden.setColumn(0, "cap_oldimgAH", msgAH);
  91. }
  92. function cf_TRMRC00143(sSvcId, nErrorCode, sErrorMsg) {
  93. if(nErrorCode < 0) return;
  94. //sysf_trace("***** cf_TRMRC00143 *****");
  95. ds_grd_chngroom.rowposition = -1;
  96. }
  97. function cf_TRMRC00141(sSvcId, nErrorCode, sErrorMsg) {
  98. if(nErrorCode < 0) return;
  99. //sysf_trace("***** cf_TRMRC00141 *****");
  100. ds_grd_pamlist.rowposition = -1;
  101. }
  102. function cf_TRMRC00142(sSvcId, nErrorCode, sErrorMsg) {
  103. if(nErrorCode < 0) return;
  104. //sysf_trace("***** cf_TRMRC00142 *****");
  105. ds_grd_inpam.rowposition = -1;
  106. }
  107. function cf_TXMRC00151(sSvcId, nErrorCode, sErrorMsg) {
  108. if(nErrorCode < 0) return;
  109. //sysf_trace("***** cf_TXMRC00151 *****");
  110. var e = new ClickEventInfo;
  111. frmf_inputEnterKey("group2.switch1.ChrtInfo.btn_SrchChrtInfo", "onclick", e);
  112. }
  113. function cf_TRMRC00100(sSvcId, nErrorCode, sErrorMsg) {
  114. if(nErrorCode < 0) return;
  115. //sysf_trace("***** cf_TRMRC00100 *****");
  116. // Default Value Setting!
  117. var nRow = ds_init_lendmastinfo_rendcdlist.insertRow(0);
  118. ds_init_lendmastinfo_rendcdlist.setColumn(nRow, "rendcd", "ALL");
  119. ds_init_lendmastinfo_rendcdlist.setColumn(nRow, "rendresn", "전체");
  120. nRow = ds_init_lendmastinfo_lenddeptlist.insertRow(0);
  121. ds_init_lendmastinfo_lenddeptlist.setColumn(nRow, "lenddeptcd", "ALL");
  122. ds_init_lendmastinfo_lenddeptlist.setColumn(nRow, "lenddeptnm", "전체");
  123. nRow = ds_init_lendmastinfo_chrtdeptlist.insertRow(0);
  124. ds_init_lendmastinfo_chrtdeptlist.setColumn(nRow, "chrtdeptcd", "ALL");
  125. ds_init_lendmastinfo_chrtdeptlist.setColumn(nRow, "chrtdeptnm", "전체");
  126. nRow = ds_init_lendmastinfo_chrtchgrlist.insertRow(0);
  127. ds_init_lendmastinfo_chrtchgrlist.setColumn(nRow, "chgruserid", "ALL");
  128. ds_init_lendmastinfo_chrtchgrlist.setColumn(nRow, "chgrusernm", "전체");
  129. nRow = ds_init_lendmastinfo_keepplcelist.insertRow(0);
  130. ds_init_lendmastinfo_keepplcelist.setColumn(nRow, "keepno", "ALL");
  131. ds_init_lendmastinfo_keepplcelist.setColumn(nRow, "keepplce", "전체");
  132. //공통코드 가져오기...
  133. //M0392:챠트미대출사유코드
  134. group2.switch1.Receipt.iv_Receipt.ds_init_M0392.copyData(ds_init_M0392);
  135. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_M0392.copyData(ds_init_M0392);
  136. // copyNode(iv_Receipt.model , model, "/root/init/M0392", "/root/init/M0392");
  137. // copyNode(iv_ChrtLend.model, model, "/root/init/M0392", "/root/init/M0392");
  138. //M0412:과보관사유코드
  139. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_M0412.copyData(ds_init_M0412);
  140. // copyNode(iv_ChrtRtn.model , model, "/root/init/M0412", "/root/init/M0412");
  141. //M0424:차트상태(분실)코드
  142. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_M0424.copyData(ds_init_M0424);
  143. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_M0424.copyData(ds_init_M0424);
  144. // copyNode(iv_ChrtLend.model , model, "/root/init/M0424", "/root/init/M0424");
  145. // copyNode(iv_ChrtRtn.model , model, "/root/init/M0424", "/root/init/M0424");
  146. //대출마스터정보 가져오기...
  147. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_rendcdlist.copyData(ds_init_lendmastinfo_rendcdlist);
  148. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_lenddeptlist.copyData(ds_init_lendmastinfo_lenddeptlist);
  149. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_chrtdeptlist.copyData(ds_init_lendmastinfo_chrtdeptlist);
  150. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_chrtchgrlist.copyData(ds_init_lendmastinfo_chrtchgrlist);
  151. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist.copyData(ds_init_lendmastinfo_keepplcelist);
  152. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist_filter.copyData(ds_init_lendmastinfo_keepplcelist);
  153. group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist_filter.filter("keepno != 'ALL'");
  154. group2.switch1.Receipt.iv_Receipt.chk_prnplce.setBindDataset(group2.switch1.Receipt.iv_Receipt.ds_init_lendmastinfo_keepplcelist_filter,"keepno","keepplce");
  155. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_rendcdlist.copyData(ds_init_lendmastinfo_rendcdlist);
  156. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_lenddeptlist.copyData(ds_init_lendmastinfo_lenddeptlist);
  157. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_chrtdeptlist.copyData(ds_init_lendmastinfo_chrtdeptlist);
  158. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_chrtchgrlist.copyData(ds_init_lendmastinfo_chrtchgrlist);
  159. group2.switch1.ChrtLend.iv_ChrtLend.ds_init_lendmastinfo_keepplcelist.copyData(ds_init_lendmastinfo_keepplcelist);
  160. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_rendcdlist.copyData(ds_init_lendmastinfo_rendcdlist);
  161. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_lenddeptlist.copyData(ds_init_lendmastinfo_lenddeptlist);
  162. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_chrtdeptlist.copyData(ds_init_lendmastinfo_chrtdeptlist);
  163. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_chrtchgrlist.copyData(ds_init_lendmastinfo_chrtchgrlist);
  164. group2.switch1.ChrtRtn.iv_ChrtRtn.ds_init_lendmastinfo_keepplcelist.copyData(ds_init_lendmastinfo_keepplcelist);
  165. // copyNode(iv_Receipt.model , model, "/root/init/lendmastinfo", "/root/init/lendmastinfo");
  166. // copyNode(iv_ChrtLend.model, model, "/root/init/lendmastinfo", "/root/init/lendmastinfo");
  167. // copyNode(iv_ChrtRtn.model , model, "/root/init/lendmastinfo", "/root/init/lendmastinfo");
  168. }
  169. //=======================================================================================
  170. // Global Form Variable
  171. //---------------------------------------------------------------------------------------
  172. var ClickTab = false;
  173. var displayflag = "N";
  174. var arErrorCode = new HashArray();
  175. //=======================================================================================
  176. // Function
  177. //---------------------------------------------------------------------------------------
  178. /****************************************************************************************
  179. * Argument : 01. :
  180. * : 02. :
  181. * Description : 화면 초기화
  182. ****************************************************************************************/
  183. /**
  184. * @desc : 사용자의 권한을 체크하여 버튼셋팅.
  185. * btn_r 조회버튼, btn_x 저장 및 수정 버튼, btn_p : 출력버튼
  186. * @
  187. * @param :
  188. * @return :
  189. * @authur : 김선태 2007. 5. 8
  190. * @---------------------------------------------------
  191. */
  192. function fchkAuth()
  193. {
  194. ds_checkAuth.setColumn(0, "btn_r_", frmf_checkAuth("R"));
  195. ds_checkAuth.setColumn(0, "btn_x_", frmf_checkAuth("X"));
  196. ds_checkAuth.setColumn(0, "btn_p_", frmf_checkAuth("P"));
  197. // for(var i=0; i<= document.controls.length-1 ; i++){
  198. // if(document.controls.item(i).elementName == "xforms:button"){
  199. // if(document.controls.item(i).attribute("id").substr(0,6) == "btn_r_"){
  200. // document.controls.item(i).disabled = !checkAuth("R");
  201. // }
  202. //
  203. // if(document.controls.item(i).attribute("id").substr(0,6) == "btn_x_"){
  204. // document.controls.item(i).disabled = !checkAuth("X");
  205. // }
  206. //
  207. // if(document.controls.item(i).attribute("id").substr(0,6) == "btn_p_"){
  208. // document.controls.item(i).disabled = !checkAuth("P");
  209. // }
  210. //
  211. // }
  212. // }
  213. }
  214. /**
  215. * @desc : excel 저장 하기
  216. * @
  217. * @param :
  218. * @return :
  219. * @authur : 이은영 2008.07.14
  220. * @---------------------------------------------------
  221. */
  222. function fExcel(gridObj, title){
  223. if (title == null) { title = "" }
  224. // var fileName = window.fileDialog("save", ",", false, title + "_" + getCurrentDate(), "xls", "Excel Files(*.xls)|*.xls|All Files (*.*)|*.*");
  225. // if (fileName != "") {
  226. // gridObj.saveExcel(fileName, "SheetName", true, true, "", "", true);
  227. // }
  228. grdf_exportExcel(gridObj, title, "SheetName");
  229. }
  230. /**
  231. * @desc : 폼초기화
  232. * @
  233. * @param :
  234. * @return :
  235. * @authur : 이은영 2008.03.18
  236. * @---------------------------------------------------
  237. */
  238. function fFormInit()
  239. {
  240. // 2007.12.20. 부서코드가 의료정보(3230000000)가 아닌 경우 : 현위치조회 텝만 가능함...
  241. var deptcd = sysf_getUserInfo("dutplcecd");
  242. // KNUH_20101207_박성호_start_의무기록 부서코드 가져오기
  243. lf_getHardCDList("N", 5501, null, ds_temp_hardcd);
  244. //mmbfGetHardCodeInfo("/root/send/reqdata", "/root/temp/hardcd", 5501);
  245. if(!utlf_isNull(ds_temp_hardcd.lookup("hardcd", deptcd, "hardcd")))
  246. {
  247. // KNUH_20101207_박성호_end
  248. // btn_ChrtLend.visible= true ;
  249. // btn_ChrtRtn.visible = true ;
  250. // btn_Receipt.visible = true ;
  251. displayflag = "Y";
  252. // 체크번호생성제외 보여주기 (default : 'Y')
  253. group2.switch1.ChrtInfo.chkyn.visible = true ;
  254. ds_hidden.setColumn(0, "chkyn", "Y");
  255. } else {
  256. group2.switch1.removeTabpage(3);
  257. group2.switch1.removeTabpage(2);
  258. group2.switch1.removeTabpage(1);
  259. // btn_ChrtLend.visible= false ;
  260. // btn_ChrtRtn.visible = false ;
  261. // btn_Receipt.visible = false ;
  262. // 체크번호생성제외 안 보여주기 (default : '')
  263. group2.switch1.ChrtInfo.chkyn.visible = false ;
  264. ds_hidden.setColumn(0, "chkyn", "N"); // "" -> "N"
  265. }
  266. //컨트롤 권한 설정
  267. fchkAuth();
  268. group2.switch1.tabindex = 0;
  269. //btn_ChrtInfo.dispatch("onclick");
  270. //공통코드 가져오기...
  271. //M0392:챠트미대출사유코드
  272. //M0412:과보관사유코드
  273. //M0424:차트상태(분실)코드
  274. //zbcfGetCodeList(new Array("M0392","M0412","M0424"), new Array("/root/init/M0392","/root/init/M0412","/root/init/M0424"));
  275. appf_getCodeList([{dsNm: "ds_init_M0392", cdGrpId: "M0392"}, {dsNm: "ds_init_M0412", cdGrpId: "M0412"}, {dsNm: "ds_init_M0424", cdGrpId: "M0424"}], true);
  276. if (displayflag == "Y") {
  277. // 2009.01.28. 단축키 처리를 위해 로딩 처리..
  278. fClickTab();
  279. }
  280. var pid ;
  281. if (frmf_isPopup() == true) {
  282. // param 환자정보
  283. pid = opener.frmf_getParameter("pid");
  284. }
  285. if ( utlf_isNull(pid) ) {
  286. // 상단 환자정보
  287. var paminfo =sysf_getGlobalVariable("paminfo");
  288. ds_init_paminfo.clearData();
  289. dsf_setCSVToDs("ds_init_paminfo", paminfo);
  290. pid = ds_init_paminfo.getColumn(0, "pid");
  291. }
  292. if ( pid == null ) { pid == ""; }
  293. if ( !utlf_isNull(pid) ) {
  294. ds_send_reqdata.setColumn(0, "pid", pid);
  295. group2.switch1.ChrtInfo.ipt_pid.updateToDataset();
  296. fGetPidNo(group2.switch1.ChrtInfo.ipt_pid, ds_hidden.getColumn(0, "chkyn"));
  297. fChartHistory();
  298. // keycode readonly!!!
  299. // var e = new KeyEventInfo;
  300. // frmf_inputEnterKey("group2.switch1.ChrtInfo.ipt_pid", "onkeydown", e);
  301. }
  302. }
  303. /**
  304. * @desc : 접수 탭 클릭...
  305. * @
  306. * @param :
  307. * @return :
  308. * @authur : 이은영 2008.03.18
  309. * @---------------------------------------------------
  310. */
  311. function fClickTab()
  312. {
  313. if (ClickTab == false)
  314. {
  315. ClickTab = true;
  316. // 대출용도, 대출과, 차트과, 차트담당자, 보관장소
  317. ds_send_reqdata.setColumn(0, "ioflag" , "A"); //2010,12,28, 주희경 입원/외래 모두 조회 하도록 변경
  318. ds_send_reqdata.setColumn(0, "useyn" , "");
  319. ds_send_reqdata.setColumn(0, "allwardyn", "");
  320. var oParam = {};
  321. oParam.id = "TRMRC00100";
  322. oParam.service = "chrtmngtapp.ChrtRendMngt";
  323. oParam.method = "reqGetLendMastInfo";
  324. oParam.inds = "req=ds_send_reqdata";
  325. oParam.outds = "ds_init_lendmastinfo_rendcdlist=rendcdlist ds_init_lendmastinfo_lenddeptlist=lenddeptlist ds_init_lendmastinfo_chrtdeptlist=chrtdeptlist ds_init_lendmastinfo_chrtchgrlist=chrtchgrlist ds_init_lendmastinfo_keepplcelist=keepplcelist";
  326. oParam.async = true;
  327. oParam.callback = "cf_TRMRC00100";
  328. tranf_submit(oParam);
  329. // sysf_trace(ds_init_lendmastinfo_rendcdlist.saveXML());
  330. // sysf_trace(ds_init_lendmastinfo_lenddeptlist.saveXML());
  331. // sysf_trace(ds_init_lendmastinfo_chrtdeptlist.saveXML());
  332. // sysf_trace(ds_init_lendmastinfo_chrtchgrlist.saveXML());
  333. // sysf_trace(ds_init_lendmastinfo_keepplcelist.saveXML());
  334. // 외래차트접수현황
  335. group2.switch1.Receipt.iv_Receipt.url = "emr_chrtmngtxp::SSMRC03200_외래차트접수현황.xfdl";
  336. //group2.switch1.Receipt.iv_Receipt.fFormInit();
  337. // 외래차트대출
  338. group2.switch1.ChrtLend.iv_ChrtLend.url = "emr_chrtmngtxp::SSMRC03300_외래차트대출.xfdl";
  339. //group2.switch1.ChrtLend.iv_ChrtLend.fFormInit();
  340. // 외래차트반납
  341. group2.switch1.ChrtRtn.iv_ChrtRtn.url = "emr_chrtmngtxp::SSMRC03400_외래차트반납.xfdl";
  342. //group2.switch1.ChrtRtn.iv_ChrtRtn.fFormInit();
  343. }
  344. }
  345. /**
  346. * @desc : 현위치조회
  347. * @
  348. * @param :
  349. * @return :
  350. * @authur : 이은영 2008.03.18
  351. * @---------------------------------------------------
  352. */
  353. function fChartHistory()
  354. {
  355. if(utlf_isNull(ds_send_reqdata.getColumn(0, "pid"))){
  356. sysF_messageBox("환자번호를 입력해 주세요.", "I999", "");
  357. return;
  358. }
  359. ds_grd_chrtlist.clearData();
  360. ds_grd_emrlist.clearData();
  361. ds_grd_pamlist.clearData();
  362. ds_grd_inpam.clearData();
  363. ds_grd_chngroom.clearData();
  364. ds_grd_healexam.clearData();
  365. ds_grd_chrtlendlist.clearData();
  366. var result = fCheckPid(group2.switch1.ChrtInfo.ipt_pid, ds_send_reqdata, "pnm", "rrgstno");
  367. if (result.length > 0) {
  368. // 종이 차트 조회
  369. ds_grd_chrtlist.enableevent = false;
  370. var oParam = {};
  371. oParam.id = "TRMRC00144";
  372. oParam.service = "chrtmngtapp.ChrtRendMngt";
  373. oParam.method = "reqGetPaperList";
  374. oParam.inds = "req=ds_send_reqdata";
  375. oParam.outds = "ds_grd_chrtlist=chrtlist";
  376. oParam.async = true;
  377. oParam.callback = "cf_TRMRC00144";
  378. tranf_submit(oParam);
  379. // EMR 기록 조회
  380. var oParam = {};
  381. oParam.id = "TRMRC00145";
  382. oParam.service = "chrtmngtapp.ChrtRendMngt";
  383. oParam.method = "reqGetEMRList";
  384. oParam.inds = "req=ds_send_reqdata";
  385. oParam.outds = "ds_grd_emrlist=emrlist";
  386. oParam.async = true;
  387. oParam.callback = "cf_TRMRC00145";
  388. tranf_submit(oParam);
  389. // 건진내역조회
  390. var oParam = {};
  391. oParam.id = "TRMRC00146";
  392. oParam.service = "chrtmngtapp.ChrtRendMngt";
  393. oParam.method = "reqGetHealExam";
  394. oParam.inds = "req=ds_send_reqdata";
  395. oParam.outds = "ds_grd_healexam=healexam";
  396. oParam.async = true;
  397. oParam.callback = "cf_TRMRC00146";
  398. tranf_submit(oParam);
  399. }
  400. // 2008.12.17. 상태에 따라 로우 색상 지정해 주기..
  401. /*
  402. initGridStyle("grd_chrtlist");
  403. var gridObj = grd_chrtlist;
  404. for ( var i = 1 ; i < gridObj.rows ; i++)
  405. {
  406. if(gridObj.valueMatrix(i , gridObj.colRef("lendyn")) == "Y"){
  407. gridObj.rowstyle(i, "data", "background-color") = "#ffccff"; // 대출중 (핑크색)
  408. }
  409. if(gridObj.valueMatrix(i , gridObj.colRef("chrtstat")) == "01"){
  410. gridObj.rowstyle(i, "data", "color") = "#ff0000"; // 분실차트 (빨간색)
  411. }
  412. }
  413. // 2008.12.17. 상태에 따라 로우 색상 지정해 주기..
  414. initGridStyle("grd_chrtlendlist");
  415. var gridObj = grd_chrtlendlist;
  416. for ( var i = 1 ; i < gridObj.rows ; i++)
  417. {
  418. if(gridObj.valueMatrix(i , gridObj.colRef("rtndt")) == ""){
  419. gridObj.rowstyle(i, "data", "background-color") = "#ffccff"; // 대출중 (핑크색)
  420. }
  421. }
  422. */
  423. // 2009.06.02. 의정부인 경우.. 응급실, 건진센터 구영상 조회하기..
  424. var instcd = sysf_getUserInfo("dutplceinstcd");
  425. if (instcd == "013") {
  426. var oParam = {};
  427. oParam.id = "TRMRC00147";
  428. oParam.service = "chrtmngtapp.ChrtRendMngt";
  429. oParam.method = "reqGetOldImgRec";
  430. oParam.inds = "req=ds_send_reqdata";
  431. oParam.outds = "ds_main_chrtinfo_oldimglist=oldimglist";
  432. oParam.async = true;
  433. oParam.callback = "cf_TRMRC00147";
  434. tranf_submit(oParam);
  435. }
  436. }
  437. /**
  438. * @desc : 등록된 환자번호인지 체킹한다..
  439. * @
  440. * @param : iptObj - 환자번호 입력 컨트롤 (pid)
  441. * @return :
  442. * @authur : 이은영 2008.09.17
  443. * @---------------------------------------------------
  444. */
  445. function fGetPidNo(iptObj, refVal)
  446. {
  447. var chkyn = refVal;
  448. if (chkyn == "Y") {
  449. if (iptObj.text.length > 0) {
  450. var pid = iptObj.text;
  451. pid = getCretCheckNo(pid, sysf_getUserInfo("dutplceinstcd"));
  452. ds_send_reqdata.setColumn(0, "pid", pid);
  453. }
  454. }
  455. }
  456. /**
  457. * @desc : 등록된 환자번호인지 체킹한다..
  458. * @
  459. * @param : iptObj - 환자번호 입력 컨트롤 (pid)
  460. * @return : pnm - 환자명
  461. * @authur : 이은영 2008.03.18
  462. * @---------------------------------------------------
  463. */
  464. function fCheckPid(iptObj, reqODs:Dataset, refPnm, refRrgstno)
  465. {
  466. ds_send_req.setColumn(0, "srchcond", "1");
  467. ds_send_req.setColumn(0, "pid", iptObj.text);
  468. //환자등록번호 체크
  469. if(iptObj.text.length > 0 ){
  470. // 2008.12.11. 초기화 없애기..
  471. reqODs.setColumn(0, refRrgstno, "");
  472. ds_main_result_patinfo_patinfolist.clearData();
  473. var oParam = {};
  474. oParam.id = "TRPMC02500";
  475. oParam.service = "patinfomngtapp.PatBaseInfo";
  476. oParam.method = "reqGetPatInfo";
  477. oParam.inds = "req=ds_send_req";
  478. oParam.outds = "ds_main_result_patinfo_patinfolist=patinfolist";
  479. oParam.async = false;
  480. oParam.callback = "cf_TRPMC02500";
  481. tranf_submit(oParam);
  482. if(arErrorCode.pop("TRPMC02500") > -1){
  483. //fSearch는 인적사항 화면을 임포트 해간 화면에서 구현해 주어야 하는 함수이다.
  484. if( ds_main_result_patinfo_patinfolist.rowcount > 0 ){
  485. ds_patinfolist.copyData(ds_main_result_patinfo_patinfolist);
  486. //* 2009.04.07. 이중번호 메세지 ( 14257937 박용석 -> 13275912 신옥순 )
  487. var sBindPid = ds_main_result_patinfo_patinfolist.getColumn(0, "bindpid");
  488. if( sBindPid != '-' && !utlf_isNull(sBindPid) && sBindPid != ' ' ){
  489. //합번된 등록번호 메세지 처리
  490. var sPid = ds_main_result_patinfo_patinfolist.getColumn(0, "pid");
  491. var sHngnm = ds_main_result_patinfo_patinfolist.getColumn(0, "hngnm");
  492. var retValue = sysf_messageBox(sPid + " (" + sHngnm + ") 환자의 등록번호가 [ " + sBindPid + " ] 로 합번 되었습니다. 합번된 등록번호로 재조회 하시겠습니까?", "Q999", "");
  493. if( retValue == '6' ){
  494. reqODs.setColumn(0, "pid", sBindPid);
  495. fCheckPid(iptObj, reqODs, refPnm, refRrgstno);
  496. return "";
  497. }
  498. }
  499. var pid = ds_main_result_patinfo_patinfolist.getColumn(0, "pid");
  500. var pnm = ds_main_result_patinfo_patinfolist.getColumn(0, "hngnm");
  501. // 2008.12.11. 주민번호 표시하기..
  502. var rrgstno1 = ds_main_result_patinfo_patinfolist.getColumn(0, "rrgstno1");
  503. var rrgstno2 = ds_main_result_patinfo_patinfolist.getColumn(0, "rrgstno2");
  504. var rrgstno = rrgstno1 + "-" + rrgstno2.substring(0,3) + "****" ;
  505. if (refPnm != null)
  506. {
  507. reqODs.setColumn(0, refPnm, pnm);
  508. }
  509. if (refRrgstno != null)
  510. {
  511. reqODs.setColumn(0, refRrgstno, rrgstno);
  512. }
  513. return pnm;
  514. } else {
  515. ds_patinfolist.clearData();
  516. sysf_messageBox("없는 환자 번호 입니다.", "E999", "");
  517. return "";
  518. }
  519. } else { // 2009.01.14. 합본처리 에러메세지 처리후..
  520. return "";
  521. }
  522. }else{
  523. sysf_messageBox("환자등록번호를 정확히", "C001");
  524. return "";
  525. }
  526. }
  527. /**
  528. * @desc : 환자등록번호 조회 팝업
  529. * @
  530. * @param : refPid - 환자번호 참고 node path
  531. * refPnm - 환자명 참고 node path
  532. * @return :
  533. * @authur : 이은영 2008.03.18
  534. * @---------------------------------------------------
  535. */
  536. function fGetPid(refoDs:Dataset, refPid, refPnm, refRrgstno)
  537. {
  538. //조회건수가 1건일 경우 팝업창을 바로 닫는다.
  539. var objColInfo = new Array();
  540. objColInfo.push({col: "pid", type:"string", size:256, val:""});
  541. objColInfo.push({col: "hngnm", type:"string", size:256, val:""});
  542. objColInfo.push({col: "srchcond", type:"string", size:256, val:"2"});
  543. objColInfo.push({col: "autoflag", type:"string", size:256, val:"N"});
  544. objColInfo.push({col: "rrgstno1", type:"string", size:256, val:""});
  545. objColInfo.push({col: "rrgstno2", type:"string", size:256, val:""});
  546. objColInfo.push({col: "checkfnexam", type:"string", size:256, val:"1"});
  547. dsf_createDsRow("ds_hidden_tmp_pidpopupinfo", objColInfo);
  548. var objArgs = new Object();
  549. objArgs.ds_SPPMC02500 = ds_hidden_tmp_pidpopupinfo;
  550. frmf_modal("SPPMC02500", "SPPMC02500", objArgs, null, "1", "10", "10", null, null, null, null, null, "M");
  551. // model.resetInstanceNode("/root/source");
  552. //환자번호 copy
  553. ds_main.setColumn(0, "popupendflag", frmf_getParameter("SPPMC02500_popupendflag"));
  554. var popupendflag = ds_main.getColumn(0, "popupendflag");
  555. if (popupendflag == "ok")
  556. {
  557. refoDs.setColumn(0, refPid, ds_patinfolist.getColumn(0, "pid"));
  558. if (refPnm == null) { refPnm = "" }
  559. if (!utlf_isNull(refPnm)) {
  560. refoDs.setColumn(0, refPnm, ds_patinfolist.getColumn(0, "hngnm"));
  561. }
  562. if (refRrgstno == null) { refRrgstno = "" }
  563. if (!utlf_isNull(refRrgstno)) {
  564. var rrgstno1 = ds_patinfolist.getColumn(0, "rrgstno1");
  565. var rrgstno2 = ds_patinfolist.getColumn(0, "rrgstno2");
  566. var rrgstno = rrgstno1 + "-" + rrgstno2.substring(0,3) + "****";
  567. refoDs.setColumn(0, refRrgstno, rrgstno);
  568. }
  569. }
  570. }
  571. /**
  572. * @desc : 단축키 선택시 커서이동
  573. * @
  574. * @param :
  575. * @return :
  576. * @authur : 이은영 2009.01.28
  577. * @---------------------------------------------------
  578. */
  579. function fKeyDown(e){
  580. if (displayflag == "Y")
  581. {
  582. // F7 : 118, F8 : 119 , F9 : 120, F10 : 121
  583. var keyCode = e.keycode;
  584. if (keyCode == "118") {
  585. fAccessKey1();
  586. } else if (keyCode == "119") {
  587. fAccessKey2();
  588. } else if (keyCode == "120") {
  589. fAccessKey3();
  590. } else if (keyCode == "121") {
  591. fAccessKey4();
  592. }
  593. }
  594. }
  595. /**
  596. * @desc : 단축키 선택시 커서이동
  597. * @
  598. * @param :
  599. * @return :
  600. * @authur : 이은영 2009.01.28
  601. * @---------------------------------------------------
  602. */
  603. function fAccessKey1(){
  604. // 2009.01.28. 단축키 처리..
  605. group2.switch1.tabindex = 0;
  606. // 커서위치 - 등록번호..
  607. group2.switch1.ChrtInfo.ipt_pid.setFocus();
  608. }
  609. /**
  610. * @desc : 단축키 선택시 커서이동
  611. * @
  612. * @param :
  613. * @return :
  614. * @authur : 이은영 2009.01.28
  615. * @---------------------------------------------------
  616. */
  617. function fAccessKey2(){
  618. // 2009.01.28. 단축키 처리..
  619. group2.switch1.tabindex = 1;
  620. // 2009.01.28. 단축키 처리..
  621. group2.switch1.Receipt.iv_Receipt.btn_r_receipt.setFocus();
  622. // 접수이력조회
  623. group2.switch1.Receipt.iv_Receipt.fGetReqRendAppList();
  624. }
  625. /**
  626. * @desc : 단축키 선택시 커서이동
  627. * @
  628. * @param :
  629. * @return :
  630. * @authur : 이은영 2009.01.28
  631. * @---------------------------------------------------
  632. */
  633. function fAccessKey3(){
  634. // 2009.01.28. 단축키 처리..
  635. group2.switch1.tabindex = 2;
  636. // 커서위치 - 대출 바코드..
  637. group2.switch1.ChrtLend.iv_ChrtLend.fMoveCursor();
  638. }
  639. /**
  640. * @desc : 단축키 선택시 커서이동
  641. * @
  642. * @param :
  643. * @return :
  644. * @authur : 이은영 2009.01.28
  645. * @---------------------------------------------------
  646. */
  647. function fAccessKey4(){
  648. // 2009.01.28. 단축키 처리..
  649. group2.switch1.tabindex = 3;
  650. // 커서위치 - 반납 바코드..
  651. group2.switch1.ChrtRtn.iv_ChrtRtn.fMoveCursor();
  652. }
  653. /**
  654. * @desc : 하드코드 조회
  655. * @
  656. * @param : ref - reference path
  657. * rsltref - result reference path
  658. * hardcd - 하드코드
  659. * @return :
  660. * @author : 오지훈
  661. * @---------------------------------------------------
  662. */
  663. /*
  664. function mmbfGetHardCodeInfo(ref, rsltref, hardcd){
  665. var mmb_rsltref = "/root/hidden/mmb/hardcd";
  666. model.removeNode(mmb_rsltref);
  667. model.makeNode(mmb_rsltref);
  668. model.removeNode(ref);
  669. model.makeValue(ref + "/hardcd", hardcd);
  670. if(submit("TRMMB04103", "false", ref, mmb_rsltref)==true){
  671. model.copyNode(rsltref, mmb_rsltref);
  672. model.removeNode(mmb_rsltref);
  673. }
  674. model.refresh();
  675. }
  676. */
  677. /**
  678. * @desc : 영상전환 설정
  679. * @
  680. * @param :
  681. * @return :
  682. * @authur : 정창혁 20121126
  683. * @---------------------------------------------------
  684. */
  685. function fTransFilm() {
  686. var nRow = ds_grd_chrtlist.rowposition;
  687. if (nRow < 0)
  688. return;
  689. var sMsg = "영상전환 하시겠습니까?";
  690. if (ds_grd_chrtlist.getColumn(nRow, "chrtflag") == "I") {
  691. sMsg = "영상전환을 취소하시겠습니까?";
  692. ds_send_reqtrans.setColumn(0, "transyn", "N");
  693. } else if (ds_grd_chrtlist.getColumn(nRow, "chrtflag") == "P" || utlf_isNull(ds_grd_chrtlist.getColumn(nRow, "chrtflag"))) {
  694. sMsg = "영상전환 하시겠습니까?";
  695. ds_send_reqtrans.setColumn(0, "transyn", "Y");
  696. } else {
  697. ds_send_reqtrans.setColumn(0, "transyn", "");
  698. return;
  699. }
  700. ds_send_reqtrans.setColumn(0, "medirecno", ds_grd_chrtlist.getColumn(nRow, "medirecno"));
  701. if (sysf_messageBox(sMsg, "Q000") == 7) {
  702. return;
  703. }
  704. var oParam = {};
  705. oParam.id = "TXMRC00151";
  706. oParam.service = "chrtmngtapp.ChrtRendMngt";
  707. oParam.method = "reqSetTransChartFilmYn";
  708. oParam.inds = "req=ds_send_reqtrans";
  709. //oParam.outds = "null";
  710. oParam.async = true;
  711. oParam.callback = "cf_TXMRC00151";
  712. tranf_submit(oParam);
  713. }]]></Script>