SMPID20600.xjs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Script type ="xscript4.0"><![CDATA[/* ================================================================================================
  3. - File Name : SMPID20600.js
  4. - Description : 명세서관리
  5. - Create : 2008.08.29 김상진
  6. ================================================================================================== */
  7. /* --------------------------------------------------------------------------------------------------
  8. Fucntion Name || Description
  9. -----------------------------------------------------------------------------------------------------
  10. - fInitialize : 화면 초기화
  11. -------------------------------------------------------------------------------------------------- */
  12. var gToday = new Date();
  13. var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
  14. var gBasemonth = gToday.getDateFormat("MM");
  15. var gBaseday = gToday.getDateFormat("DD");
  16. var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
  17. var gCurrentym = gBaseyear + gBasemonth;
  18. // -----------------------
  19. // ▶ 화면초기화
  20. // -----------------------
  21. function fInitialize() {
  22. // ---------------------------------------------------------------
  23. // 공통코드를 조회한다.
  24. // (ZBC001.js) com.ZBCMCODE 에서 기초코드 값 Get
  25. // ---------------------------------------------------------------
  26. var arrParam = [ {dsNm: "ds_init_P0008list"
  27. ,"ds_init_P0010list"
  28. ,"ds_init_P0291list"
  29. ,"ds_init_P0155list"
  30. ,
  31. cdGrpId: "P0008" // 보험유형
  32. ,"P0010" // 보조유형
  33. ,"P0291" // 진료분야
  34. ,"P0155" // 청구구분
  35. } ];
  36. appf_getCodeList(arrParam, );
  37. /*
  38. // ---------------------------------------------------------------
  39. // 청구과, 심사자, 진료과, 주치의, 청구차수, 삼시자선택 초기화
  40. // ---------------------------------------------------------------
  41. var clamym = ds_send_item1.getColumn(0, "clamym");
  42. ds_send_item1.setColumn( 0, "clamym", "");
  43. // submit("TRPID20201",false);
  44. var oParam = {};
  45. oParam.id = "TRPID20201";
  46. oParam.service = "aftjudgapp.InAftJudgTrgtMan";
  47. oParam.method = "reqGetInitComCd";
  48. oParam.inds = "req=ds_";
  49. oParam.outds = "ds_=judgrid ds_=suppkind ds_=orddrid ds_=orddrid2 ds_=clamdept ds_=orddeptcd ds_=orddeptcd2 ds_=item3 ds_=clamdg ds_=aftjudgerr ds_=uuee";
  50. oParam.async = false;
  51. oParam.callback = "cf_TRPID20201";
  52. tranf_submit(oParam);
  53. /*
  54. function cf_TRPID20201(sSvcId, nErrorCode, sErrorMsg) {
  55. if(nErrorCode < 0) return;
  56. }
  57. function cf_TRPID20201(sSvcId, nErrorCode, sErrorMsg) {
  58. arErrorCode.push(sSvcId, nErrorCode);
  59. }
  60. arErrorCode.pop("TRPID20201") > -1
  61. arErrorCode.pop("TRPID20201") < 0
  62. */
  63. ds_init_judgrid.clearData();
  64. ds_init_suppkind.clearData();
  65. ds_init_orddrid.clearData();
  66. ds_init_clamdept.clearData();
  67. ds_init_orddeptcd.clearData();
  68. ds_init_item3.clearData();
  69. ds_init_clamdg.clearData();
  70. dsf_makeValue( ds_init, "judgrid", "string", "" );
  71. dsf_makeValue( ds_init, "suppkind", "string", "" );
  72. dsf_makeValue( ds_init, "orddrid", "string", "" );
  73. dsf_makeValue( ds_init, "clamdept", "string", "" );
  74. dsf_makeValue( ds_init, "orddeptcd", "string", "" );
  75. dsf_makeValue( ds_init, "item3", "string", "" );
  76. dsf_makeValue( ds_init, "clamdg", "string", "" );
  77. model.copyNode("ds_init_judgrid", "root_init_tmp_judgrid");
  78. model.copyNode("ds_init_suppkind", "root_init_tmp_suppkind");
  79. model.copyNode("ds_init_orddrid", "root_init_tmp_orddrid");
  80. model.copyNode("ds_init_clamdept", "root_init_tmp_clamdept");
  81. model.copyNode("ds_init_orddeptcd", "root_init_tmp_orddeptcd");
  82. model.copyNode("ds_init_item3", "root_init_tmp_item3");
  83. model.copyNode("ds_init_clamdg", "root_init_tmp_clamdg");
  84. ds_init_tmp_judgrid.clearData();
  85. ds_init_tmp_suppkind.clearData();
  86. ds_init_tmp_orddrid.clearData();
  87. ds_init_tmp_clamdept.clearData();
  88. ds_init_tmp_orddeptcd.clearData();
  89. ds_init_tmp_item3.clearData();
  90. ds_init_tmp_clamdg.clearData();
  91. */
  92. // ---------------------------------------------------------------
  93. // 진료과 주치의 초기화
  94. // ---------------------------------------------------------------
  95. // submit("TRPID20309", false);
  96. var oParam = {};
  97. oParam.id = "TRPID20309";
  98. oParam.service = "aftjudgapp.InAftJudgTrgtMan";
  99. oParam.method = "reqGetDeptCDDrID";
  100. oParam.inds = "req=ds_";
  101. oParam.outds = "ds_=orddeptcd ds_=orddeptcd2 ds_=orddrid ds_=orddrid2";
  102. oParam.async = false;
  103. oParam.callback = "cf_TRPID20309";
  104. tranf_submit(oParam);
  105. /*
  106. function cf_TRPID20309(sSvcId, nErrorCode, sErrorMsg) {
  107. if(nErrorCode < 0) return;
  108. }
  109. function cf_TRPID20309(sSvcId, nErrorCode, sErrorMsg) {
  110. arErrorCode.push(sSvcId, nErrorCode);
  111. }
  112. arErrorCode.pop("TRPID20309") > -1
  113. arErrorCode.pop("TRPID20309") < 0
  114. */
  115. dsf_makeValue( ds_hidden_tmp, "orddeptcd", "string", "" );
  116. dsf_makeValue( ds_hidden_tmp, "orddeptcd2", "string", "" );
  117. dsf_makeValue( ds_hidden_tmp, "orddrid", "string", "" );
  118. dsf_makeValue( ds_hidden_tmp, "orddrid2", "string", "" );
  119. ds_init_orddeptcd.clearData();
  120. ds_init_orddeptcd2.clearData();
  121. ds_init_orddrid.clearData();
  122. ds_init_orddrid2.clearData();
  123. dsf_makeValue( ds_init, "orddeptcd", "string", "" );
  124. dsf_makeValue( ds_init, "orddeptcd2", "string", "" );
  125. dsf_makeValue( ds_init, "orddrid", "string", "" );
  126. dsf_makeValue( ds_init, "orddrid2", "string", "" );
  127. model.copyNode("ds_init_orddeptcd", "root_hidden_tmp_orddeptcd");
  128. model.copyNode("ds_init_orddeptcd2", "root_hidden_tmp_orddeptcd2");
  129. model.copyNode("ds_init_orddrid", "root_hidden_tmp_orddrid");
  130. model.copyNode("ds_init_orddrid2", "root_hidden_tmp_orddrid2");
  131. ds_hidden_tmp_orddeptcd.clearData();
  132. ds_hidden_tmp_orddeptcd2.clearData();
  133. ds_hidden_tmp_orddrid.clearData();
  134. ds_hidden_tmp_orddrid2.clearData();
  135. model.refreshpart("ds_send_item1_orddeptcd");
  136. model.refreshpart("ds_send_item1_orddeptcd2");
  137. model.refreshpart("ds_send_item1_orddrid");
  138. model.refreshpart("ds_send_item1_orddrid2");
  139. // 청구월 셋팅
  140. if (ds_send_item1.getColumn(0, "clamym") == "") {
  141. var lv_date = gCurrentym.toDate("YYYYMM" + "01");
  142. lv_date = lv_date.getAddDate(-1, "M")
  143. gCurrentym = lv_date.getDateFormat("YYYYMM")
  144. ds_send_item1.setColumn( 0, "clamym", gCurrentym);
  145. }
  146. //model.refresh();
  147. }
  148. // ----------------------------------------------------------------------
  149. // ▶ 명세서관리 대상조회
  150. // ----------------------------------------------------------------------
  151. function fGetDocuList() {
  152. // -----------------------------------
  153. // 작업구분에 따른 초기정보 ValidCheck
  154. // -----------------------------------
  155. var makeflag = ds_send_item1.getColumn(0, "makeflag");
  156. //합철, 복사, 이동, 자격수정, Donor일때는 등록번호는 필수입력조건
  157. if (makeflag != "4") {
  158. if (ds_send_item1.getColumn(0, "pid") == "") {
  159. sysf_messageBox("등록번호는", "I003"); ///I003=등록번호는 필수입력입니다.
  160. model.dispatch("ipt_patunitsrch");
  161. return;
  162. }
  163. }
  164. //대상자 조회
  165. // if (submit("TRPID20601")) {
  166. var oParam = {};
  167. oParam.id = "TRPID20601";
  168. oParam.service = "aftjudgapp.DocuManage";
  169. oParam.method = "reqGetDocuMngList";
  170. oParam.inds = "req=ds_";
  171. oParam.outds = "ds_=clbs";
  172. oParam.async = false;
  173. oParam.callback = "cf_TRPID20601";
  174. tranf_submit(oParam);
  175. /*
  176. function cf_TRPID20601(sSvcId, nErrorCode, sErrorMsg) {
  177. if(nErrorCode < 0) return;
  178. }
  179. function cf_TRPID20601(sSvcId, nErrorCode, sErrorMsg) {
  180. arErrorCode.push(sSvcId, nErrorCode);
  181. }
  182. arErrorCode.pop("TRPID20601") > -1
  183. arErrorCode.pop("TRPID20601") < 0
  184. */
  185. // 추가청구일경우 최종청구차수 가져온다.
  186. fGetMaxClamdg();
  187. var nodeList = instance1.selectNodes("ds_main_list1_clbs");
  188. if (nodeList.length == 1) {
  189. ds_main_list1.setColumn( 0, "clbs[1]_fromchk", "Y");
  190. //grd_clbsmast.refresh();
  191. grd_clbsmast.row = 1;
  192. g_from_cnt = 1;
  193. }
  194. }
  195. }
  196. // ----------------------------------------------------------------------
  197. // ▶ 명세서관리 자료생성
  198. // ----------------------------------------------------------------------
  199. function fSetDocuMake() {
  200. // 자료생성전 체크
  201. var rslt = fValidcheck();
  202. if (rslt != false) {
  203. ds_send_list1_clbs.clearData(); ds_send_list1_clbs.addRow();
  204. var makeflag = ds_send_item1.getColumn(0, "makeflag");
  205. var fromchk="";
  206. var iCnt=0;
  207. // 1. 합철
  208. if (makeflag == "1") {
  209. for (var i = 1; i < grd_clbsmast.rows; i++) {
  210. fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
  211. tochk = ds_main_list1_clbs.getColumn(i, "tochk");
  212. if (fromchk == "Y" || tochk == "Y") {
  213. iCnt++;
  214. ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
  215. ds_send_list1_clbs.setColumn( iCnt, "ioflag", ds_send_item1.getColumn(0, "ioflag"));
  216. ds_send_list1_clbs.setColumn( iCnt, "fromchk", ds_main_list1_clbs.getColumn(i, "fromchk"));
  217. ds_send_list1_clbs.setColumn( iCnt, "tochk", ds_main_list1_clbs.getColumn(i, "tochk"));
  218. ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
  219. ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
  220. ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
  221. ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
  222. ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
  223. ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
  224. }
  225. }
  226. }
  227. // 2:복사, 3:이동
  228. else if (makeflag == "2" || makeflag == "3") {
  229. for (var i = 1; i < grd_clbsmast.rows; i++) {
  230. fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
  231. if (fromchk == "Y") {
  232. iCnt++;
  233. ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
  234. ds_send_list1_clbs.setColumn( iCnt, "copyflag", ds_send_item1.getColumn(0, "copyflag"));
  235. ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
  236. ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
  237. ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
  238. ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
  239. ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
  240. ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
  241. ds_send_list1_clbs.setColumn( iCnt, "t_clamym", ds_send_item1.getColumn(0, "t_clamym"));
  242. ds_send_list1_clbs.setColumn( iCnt, "t_clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
  243. ds_send_list1_clbs.setColumn( iCnt, "t_clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
  244. }
  245. }
  246. }
  247. // 4:추가청구
  248. else if (makeflag == "4") {
  249. for (var i = 1; i < grd_clbsmast.rows; i++) {
  250. fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
  251. if (fromchk == "Y") {
  252. iCnt++;
  253. ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
  254. ds_send_list1_clbs.setColumn( iCnt, "ioflag", ds_send_item1.getColumn(0, "ioflag"));
  255. ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
  256. ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
  257. ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
  258. ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
  259. ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
  260. ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
  261. ds_send_list1_clbs.setColumn( iCnt, "t_clamym", ds_send_item1.getColumn(0, "t_clamym"));
  262. ds_send_list1_clbs.setColumn( iCnt, "t_clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
  263. ds_send_list1_clbs.setColumn( iCnt, "t_clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
  264. ds_send_list1_clbs.setColumn( iCnt, "acptno", ds_main_list1_clbs.getColumn(i, "acptno"));
  265. ds_send_list1_clbs.setColumn( iCnt, "acptdd", ds_main_list1_clbs.getColumn(i, "acptdd"));
  266. ds_send_list1_clbs.setColumn( iCnt, "docuseqno", ds_main_list1_clbs.getColumn(i, "docuseqno"));
  267. ds_send_list1_clbs.setColumn( iCnt, "adjtresncd", ds_main_list1_clbs.getColumn(i, "adjtresncd"));
  268. ds_send_list1_clbs.setColumn( iCnt, "ms010", ds_send_item1.getColumn(0, "ms010"));
  269. }
  270. }
  271. }
  272. // 5:자격수정
  273. else if (makeflag == "5") {
  274. for (var i = 1; i < grd_clbsmast.rows; i++) {
  275. fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
  276. if (fromchk == "Y") {
  277. iCnt++;
  278. ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
  279. ds_send_list1_clbs.setColumn( iCnt, "ioflag", ds_send_item1.getColumn(0, "ioflag"));
  280. ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
  281. ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
  282. ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
  283. ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
  284. ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
  285. ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
  286. ds_send_list1_clbs.setColumn( iCnt, "insukind", ds_main_list1_clbs.getColumn(i, "insukind"));
  287. ds_send_list1_clbs.setColumn( iCnt, "suppkind", ds_main_list1_clbs.getColumn(i, "suppkind"));
  288. ds_send_list1_clbs.setColumn( iCnt, "t_clamym", ds_send_item1.getColumn(0, "t_clamym"));
  289. ds_send_list1_clbs.setColumn( iCnt, "t_clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
  290. ds_send_list1_clbs.setColumn( iCnt, "t_clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
  291. ds_send_list1_clbs.setColumn( iCnt, "t_insukind", ds_main_list1_clbs.getColumn(i, "t_insukind"));
  292. ds_send_list1_clbs.setColumn( iCnt, "t_suppkind", ds_main_list1_clbs.getColumn(i, "t_suppkind"));
  293. ds_send_list1_clbs.setColumn( iCnt, "insuno", ds_main_list1_clbs.getColumn(i, "insuno"));
  294. ds_send_list1_clbs.setColumn( iCnt, "certno", ds_main_list1_clbs.getColumn(i, "certno"));
  295. ds_send_list1_clbs.setColumn( iCnt, "insdnm", ds_main_list1_clbs.getColumn(i, "insdnm"));
  296. ds_send_list1_clbs.setColumn( iCnt, "acddd", ds_main_list1_clbs.getColumn(i, "acddd"));
  297. ds_send_list1_clbs.setColumn( iCnt, "acdacptno", ds_main_list1_clbs.getColumn(i, "acdacptno"));
  298. ds_send_list1_clbs.setColumn( iCnt, "insucd", ds_main_list1_clbs.getColumn(i, "insucd"));
  299. }
  300. }
  301. }
  302. // 자료생성...
  303. // if (submit("TXPID20601")) {
  304. var oParam = {};
  305. oParam.id = "TXPID20601";
  306. oParam.service = "aftjudgapp.DocuManage";
  307. oParam.method = "reqExeDocuManage";
  308. oParam.inds = "clbs=ds_";
  309. oParam.outds = "";
  310. oParam.async = false;
  311. oParam.callback = "cf_TXPID20601";
  312. tranf_submit(oParam);
  313. /*
  314. function cf_TXPID20601(sSvcId, nErrorCode, sErrorMsg) {
  315. if(nErrorCode < 0) return;
  316. }
  317. function cf_TXPID20601(sSvcId, nErrorCode, sErrorMsg) {
  318. arErrorCode.push(sSvcId, nErrorCode);
  319. }
  320. arErrorCode.pop("TXPID20601") > -1
  321. arErrorCode.pop("TXPID20601") < 0
  322. */
  323. // 2:복사, 3:이동, 4:추가청구이면 변경된 명세서를 조회한다.
  324. if (makeflag == "2" || makeflag =="3" || makeflag == "4") {
  325. ds_send_item1.setColumn( 0, "clamym", ds_send_item1.getColumn(0, "t_clamym"));
  326. ds_send_item1.setColumn( 0, "clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
  327. // ds_send_item1.setColumn( 0, "clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
  328. var clamym = ds_send_item1.getColumn(0, "clamym");
  329. var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
  330. ds_send_item1.setColumn( 0, "clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
  331. var clamdg = ds_send_item1.getColumn(0, "t_clamdg");
  332. if (clamym == t_clamym) {
  333. frmf_addComboItem("cmb_clamdg", clamdg, clamdg, "above");
  334. } else {
  335. frmf_addComboItem("cmb_clamdg", clamdg, clamdg, "init");
  336. }
  337. model.refreshpart("ds_send_item1_clamym");
  338. model.refreshpart("ds_send_item1_clamdg");
  339. // model.refreshpart("ds_send_item1_clamflagcd");
  340. }
  341. btn_select.dispatch("DOMActivate"); // 자료생성 후 바로 조회...
  342. }
  343. }
  344. }
  345. // ----------------------------------------------------------------------
  346. // ▶ 자료생성전 체크
  347. // ----------------------------------------------------------------------
  348. function fValidcheck() {
  349. var makeflag = ds_send_item1.getColumn(0, "makeflag");
  350. // 생성할 명세서 선택되었는지 체크
  351. if (makeflag == "1") {
  352. if (g_from_cnt == 0) {
  353. sysf_messageBox("송신(FROM) 명세서가", "I004"); //송신(FROM) 명세서가 없습니다.
  354. return false;
  355. }
  356. if (g_to_cnt == 0) {
  357. sysf_messageBox("수신(FROM) 명세서가", "I004"); //수신(FROM) 명세서가 없습니다.
  358. return false;
  359. }
  360. } else {
  361. if (g_from_cnt == 0) {
  362. sysf_messageBox("자료생성할 명세서가", "I004"); //I004: 없습니다.
  363. return false;
  364. }
  365. }
  366. // 복사인 경우
  367. if (makeflag == "2") {
  368. var clamym = ds_send_item1.getColumn(0, "clamym");
  369. var clamdg = ds_send_item1.getColumn(0, "clamdg");
  370. var clamflagcd = ds_send_item1.getColumn(0, "clamflagcd");
  371. var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
  372. var t_clamdg = ds_send_item1.getColumn(0, "t_clamdg");
  373. var t_clamflagcd = ds_send_item1.getColumn(0, "t_clamflagcd");
  374. if (t_clamym == "") {
  375. sysf_messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
  376. return false;
  377. }
  378. else if (t_clamdg == "") {
  379. sysf_messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
  380. return false;
  381. }
  382. else if (t_clamflagcd == "") {
  383. sysf_messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
  384. return false;
  385. }
  386. else if (ds_send_item1.getColumn(0, "copyflag") == "") {
  387. sysf_messageBox("생성조건이", "I004"); //I004: 없습니다.
  388. return false;
  389. }
  390. else {
  391. if ( clamym + clamdg + clamflagcd == t_clamym + t_clamdg + t_clamflagcd ) {
  392. sysf_messageBox(" 생성 청구년월, 청구차수, 청구구분중 하나도 변경되지", "E007"); //E007=않았습니다.
  393. ipt_toclamym.setFocus();
  394. return false;
  395. }
  396. }
  397. }
  398. // 이동인 경우
  399. else if (makeflag == "3") {
  400. var clamym = ds_send_item1.getColumn(0, "clamym");
  401. var clamdg = ds_send_item1.getColumn(0, "clamdg");
  402. var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
  403. var t_clamdg = ds_send_item1.getColumn(0, "t_clamdg");
  404. if (t_clamym == "") {
  405. sysf_messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
  406. return false;
  407. }
  408. else if (t_clamdg == "") {
  409. sysf_messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
  410. return false;
  411. }
  412. /*
  413. else if (ds_send_item1.getColumn(0, "t_clamflagcd") == "") {
  414. sysf_messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
  415. }
  416. */
  417. else {
  418. if ( clamym + clamdg == t_clamym + t_clamdg ) {
  419. sysf_messageBox(" 생성 청구년월 또는 청구차수가 변경되지", "E007"); //E007=않았습니다.
  420. ipt_toclamym.setFocus();
  421. return false;
  422. }
  423. }
  424. }
  425. // 추가청구인 경우
  426. else if (makeflag == "4") {
  427. var clamym = ds_send_item1.getColumn(0, "clamym");
  428. var clamdg = ds_send_item1.getColumn(0, "clamdg");
  429. var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
  430. var t_clamdg = ds_send_item1.getColumn(0, "t_clamdg");
  431. if (t_clamym == "") {
  432. sysf_messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
  433. return false;
  434. }
  435. else if (t_clamdg == "") {
  436. sysf_messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
  437. return false;
  438. }
  439. else {
  440. if ( clamym + clamdg == t_clamym + t_clamdg ) {
  441. sysf_messageBox(" 생성 청구년월 또는 청구차수가 변경되지", "E007"); //E007=않았습니다.
  442. ipt_toclamym.setFocus();
  443. return false;
  444. }
  445. }
  446. }
  447. // 자격수정 인 경우
  448. else if (makeflag == "5") {
  449. var fromchkyn;
  450. var insukind;
  451. var suppkind;
  452. var t_insukind;
  453. var t_suppkind;
  454. var nodeList = instance1.selectNodes("ds_main_list1_clbs");
  455. for ( i = 1; i <= nodeList.length; i++) {
  456. fromchkyn = ds_main_list1_clbs.getColumn(i, "fromchk");
  457. if (fromchkyn == "Y") {
  458. insukind = ds_main_list1_clbs.getColumn(i, "insukind");
  459. suppkind = ds_main_list1_clbs.getColumn(i, "suppkind");
  460. t_insukind = ds_main_list1_clbs.getColumn(i, "t_insukind");
  461. t_suppkind = ds_main_list1_clbs.getColumn(i, "t_suppkind");
  462. insuno = ds_main_list1_clbs.getColumn(i, "insuno");
  463. certno = ds_main_list1_clbs.getColumn(i, "certno");
  464. insdnm = ds_main_list1_clbs.getColumn(i, "insdnm");
  465. acddd = ds_main_list1_clbs.getColumn(i, "acddd");
  466. acdacptno = ds_main_list1_clbs.getColumn(i, "acdacptno");
  467. insucd = ds_main_list1_clbs.getColumn(i, "insucd");
  468. if (t_insukind == "") {
  469. sysf_messageBox("변경 보험유형이", "I004"); //I004: 없습니다.
  470. return false;
  471. }
  472. else if (t_suppkind == "") {
  473. sysf_messageBox("변경 보조유형이", "I004"); //I004: 없습니다.
  474. return false;
  475. }
  476. else {
  477. if ( insukind + suppkind == t_insukind + t_suppkind ) {
  478. sysf_messageBox("보험유형 또는 보조유형이 변경되지", "E007"); //E007=않았습니다.
  479. ipt_toclamym.setFocus();
  480. return false;
  481. }
  482. }
  483. if (t_insukind == "11" || t_insukind == "21" || t_insukind == "22") {
  484. if (insuno == "") {
  485. sysf_messageBox("사업장기호가", "I004"); //I004: 없습니다.
  486. return false;
  487. } else if (certno == "") {
  488. sysf_messageBox("증번호가", "I004"); //I004: 없습니다.
  489. return false;
  490. } if (insuno == "") {
  491. sysf_messageBox("피보험자가", "I004"); //I004: 없습니다.
  492. return false;
  493. }
  494. } else if (t_insukind == "31") {
  495. if (acddd == "") {
  496. sysf_messageBox("사고일자가", "I004"); //I004: 없습니다.
  497. return false;
  498. } else if (acdacptno == "") {
  499. sysf_messageBox("접수번호가", "I004"); //I004: 없습니다.
  500. return false;
  501. } if (insucd == "") {
  502. sysf_messageBox("보험회사가", "I004"); //I004: 없습니다.
  503. return false;
  504. }
  505. } else if (t_insukind == "41" || t_insukind == "42") {
  506. if (acdacptno == "") {
  507. sysf_messageBox("산재관리번호가", "I004"); //I004: 없습니다.
  508. return false;
  509. } if (insucd == "") {
  510. sysf_messageBox("산재지사가", "I004"); //I004: 없습니다.
  511. return false;
  512. }
  513. }
  514. }
  515. }
  516. }
  517. }
  518. // ----------------------------------------------------------------------
  519. // ▶ 환자조회
  520. // ----------------------------------------------------------------------
  521. function fGetSrchPid() {
  522. var ipt_pid = ds_send_item1.getColumn(0, "pid");
  523. if (ipt_pid.charCodeAt(0) > 255) {
  524. ds_hidden_sppmc02500_cond.setColumn( 0, "srchcond", "2"); // 검색조건 : 환자명으로 설정
  525. ds_hidden_sppmc02500_cond.setColumn( 0, "hngnm", ipt_pid);
  526. } else {
  527. ds_hidden_sppmc02500_cond.setColumn( 0, "srchcond", "1"); // 검색조건 : 등록번호로 설정
  528. ds_hidden_sppmc02500_cond.setColumn( 0, "pid", ipt_pid);
  529. }
  530. // pam_commonweb_xrw_SPPMC02500_환자조회.xrw
  531. frmf_modal("SPPMC02500", "SPPMC02500", "ds_hidden_sppmc02500_cond""-"ds_send"", "", "1", "150", "150", "", "", "", "", "", "M"); // SPPMC02500_환자조회.xrw
  532. var srch_pid = ds_main_patinfo_patinfolist.getColumn(0, "pid");
  533. if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
  534. ds_main_patinfo_patinfolist.clearData(); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
  535. dsf_makeValue( ds_main_patinfo, "patinfolist", "string", "" ); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
  536. ds_send_item1.setColumn( 0, "pid", srch_pid);
  537. }
  538. //model.refresh();
  539. }
  540. // ----------------------------------
  541. // ▶추가청구일때만 청구차수를 조회
  542. // ----------------------------------
  543. function fGetClamdg() {
  544. var makeflag = ds_send_item1.getColumn(0, "makeflag");
  545. if (makeflag == "4") {
  546. //pidfGetClamdg();
  547. }
  548. }
  549. // ----------------------------------
  550. // ▶추가청구시 그리드 전체선택,해제
  551. // ----------------------------------
  552. function fChkAll(chkflag) {
  553. var i=0;
  554. var nodeList = instance1.selectNodes("ds_main_list1_clbs");
  555. g_from_cnt = 0;
  556. for ( i = 1; i <= nodeList.length; i++) {
  557. if (chkflag == "Y") {
  558. ds_main_list1.setColumn( i , "fromchk", "Y");
  559. g_from_cnt++;
  560. } else {
  561. ds_main_list1.setColumn( i , "fromchk", "N");
  562. }
  563. }
  564. //grd_clbsmast.refresh();
  565. }
  566. // ----------------------------------
  567. // ▶추가청구시 추가청구 max차수 조회
  568. // ----------------------------------
  569. function fGetMaxClamdg() {
  570. var makeflag = ds_send_item1.getColumn(0, "makeflag");
  571. // "추가청구"일경우에는 최종 청구차수를 조회한다.
  572. if (makeflag == "4") {
  573. dsf_makeValue( ds_send_item1, "clamflag", "string", "2");
  574. // if (submit("TRPID20602")) {
  575. var oParam = {};
  576. oParam.id = "TRPID20602";
  577. oParam.service = "aftjudgapp.DocuManage";
  578. oParam.method = "reqGetPidmclamMaxClamdg";
  579. oParam.inds = "req=ds_";
  580. oParam.outds = "ds_=clbs";
  581. oParam.async = false;
  582. oParam.callback = "cf_TRPID20602";
  583. tranf_submit(oParam);
  584. /*
  585. function cf_TRPID20602(sSvcId, nErrorCode, sErrorMsg) {
  586. if(nErrorCode < 0) return;
  587. }
  588. function cf_TRPID20602(sSvcId, nErrorCode, sErrorMsg) {
  589. arErrorCode.push(sSvcId, nErrorCode);
  590. }
  591. arErrorCode.pop("TRPID20602") > -1
  592. arErrorCode.pop("TRPID20602") < 0
  593. */
  594. ds_send_item1.setColumn( 0, "t_clamdg", ds_hidden_item1.getColumn(0, "maxclamdg"));
  595. model.refreshpart("ds_send_item1_t_clamdg");
  596. }
  597. }
  598. }
  599. ]]></Script>