SMAHA04041_재검패키지.xfdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMAHA04041" position="absolute 0 0 580 343" titletext="재검패키지" oninit="SMAHA04041_oninit" onload="SMAHA04041_onload">
  5. <Layouts>
  6. <Layout>
  7. <Div position="absolute 0 0 576 316" id="group3" scrollbars="autoboth">
  8. <Layouts>
  9. <Layout>
  10. <Static text="재검패키지" position="absolute 0 0 95 16" id="caption1" class="tit_2"/>
  11. <Shape position="absolute 0 16 576 22" linetype="horizontal" id="line1" class="line_10"/>
  12. <Grid position="absolute 0 21 576 306" id="grd_patlst" binddataset="ds_main_pkgpidinfo_pkgpidlst_item">
  13. <Formats>
  14. <Format id="default">
  15. <Columns>
  16. <Column size="20" band="left"/>
  17. <Column size="42"/>
  18. <Column size="144"/>
  19. <Column size="345"/>
  20. <Column size="0"/>
  21. <Column size="0"/>
  22. <Column size="0"/>
  23. <Column size="0"/>
  24. </Columns>
  25. <Rows>
  26. <Row size="24" band="head"/>
  27. <Row size="24"/>
  28. </Rows>
  29. <Band id="head">
  30. <Cell/>
  31. <Cell col="1" text="선택"/>
  32. <Cell col="2" text="코드"/>
  33. <Cell col="3" text="명칭"/>
  34. <Cell col="4" text="caption1"/>
  35. <Cell col="5" text="caption2"/>
  36. <Cell col="6" text="caption3"/>
  37. <Cell col="7" text="caption4"/>
  38. </Band>
  39. <Band id="body">
  40. <Cell celltype="head" expr="expr:currow + 1"/>
  41. <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:sel" expr="expr:sel == '1' || sel == 'Y' ? '1' : '0'"/>
  42. <Cell col="2" text="bind:pkgcd"/>
  43. <Cell col="3" text="bind:pkgnm"/>
  44. <Cell col="4" text="bind:pkgflag"/>
  45. <Cell col="5" text="bind:calcscorcd"/>
  46. <Cell col="6" text="bind:healexamflag"/>
  47. <Cell col="7" text="bind:healexamdetlflag"/>
  48. </Band>
  49. </Format>
  50. </Formats>
  51. </Grid>
  52. </Layout>
  53. </Layouts>
  54. </Div>
  55. <Div position="absolute 0 316 518 343" id="group1" scrollbars="autoboth">
  56. <Layouts>
  57. <Layout>
  58. <Button position="absolute 402 5 458 27" id="btn_confirm" class="btn4" text="확인" onclick="group1_btn_confirm_onclick"/>
  59. <Button position="absolute 461 5 517 27" id="btn_cancel" class="btn4" text="취소" onclick="group1_btn_cancel_onclick"/>
  60. <Shape position="absolute 0 0 518 6" linetype="horizontal" id="line32" class="line_6"/>
  61. </Layout>
  62. </Layouts>
  63. </Div>
  64. </Layout>
  65. </Layouts>
  66. <Objects>
  67. <Dataset id="ds_main_pkgpidinfo_pkgpidlst_item" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" reversesubsum="false" oncolumnchanged="ds_main_pkgpidinfo_pkgpidlst_item_oncolumnchanged">
  68. <ColumnInfo>
  69. <Column id="sel" type="STRING"/>
  70. <Column id="pkgcd" type="STRING"/>
  71. <Column id="pkgnm" type="STRING"/>
  72. <Column id="pkgflag" type="STRING"/>
  73. <Column id="calcscorcd" type="STRING"/>
  74. <Column id="healexamflag" type="STRING"/>
  75. <Column id="healexamdetlflag" type="STRING"/>
  76. </ColumnInfo>
  77. </Dataset>
  78. <Dataset id="ds_send_testinfo_testdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  79. <ColumnInfo>
  80. <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
  81. <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
  82. <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
  83. <Column id="calcscorcd" type="STRING" size="256" sumtext="수가코드"/>
  84. </ColumnInfo>
  85. </Dataset>
  86. <Dataset id="ds_temp_testinfo_pkg" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  87. <ColumnInfo>
  88. <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
  89. <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
  90. <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
  91. <Column id="testnm" type="STRING" size="256" sumtext="검사명"/>
  92. <Column id="calcscorcd" type="STRING" size="256" sumtext="수가코드"/>
  93. <Column id="gnrlspclamt" type="INT" size="256" sumtext="공단특수금액"/>
  94. <Column id="cmpyspclamt" type="INT" size="256" sumtext="단체특수금액"/>
  95. <Column id="calcspclamt" type="INT" size="256" sumtext="특수금액"/>
  96. <Column id="gnrlamt" type="INT" size="256" sumtext="보험금액"/>
  97. <Column id="discyn" type="STRING" size="256" sumtext="할인여부"/>
  98. <Column id="pkgflag" type="STRING" size="256" sumtext="패키지구분"/>
  99. <Column id="parentcd" type="STRING" size="256" sumtext="부모코드"/>
  100. <Column id="groupyn" type="STRING" size="256" sumtext="그룹여부"/>
  101. </ColumnInfo>
  102. </Dataset>
  103. <Dataset id="ds_temp_testinfo_calc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  104. <ColumnInfo>
  105. <Column id="pkgcd" type="STRING" size="256" sumtext="패키지코드"/>
  106. <Column id="grpcd" type="STRING" size="256" sumtext="그룹코드"/>
  107. <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
  108. <Column id="gnrlspclamt" type="INT" size="256" sumtext="공단특수금액"/>
  109. <Column id="cmpyspclamt" type="INT" size="256" sumtext="단체특수금액"/>
  110. <Column id="calcspclamt" type="INT" size="256" sumtext="계산특수금액"/>
  111. <Column id="gnrlamt" type="INT" size="256" sumtext="보험금액"/>
  112. <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
  113. </ColumnInfo>
  114. </Dataset>
  115. <Dataset id="ds_temp_testinfo_pkg2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
  118. <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
  119. <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
  120. <Column id="testnm" type="STRING" size="256" sumtext="검사명"/>
  121. <Column id="calcscorcd" type="STRING" size="256" sumtext="수가코드"/>
  122. <Column id="gnrlspclamt" type="INT" size="256" sumtext="공단특수금액"/>
  123. <Column id="cmpyspclamt" type="INT" size="256" sumtext="단체특수금액"/>
  124. <Column id="calcspclamt" type="INT" size="256" sumtext="특수금액"/>
  125. <Column id="gnrlamt" type="INT" size="256" sumtext="보험금액"/>
  126. <Column id="discyn" type="STRING" size="256" sumtext="할인여부"/>
  127. <Column id="pkgflag" type="STRING" size="256" sumtext="패키지구분"/>
  128. <Column id="parentcd" type="STRING" size="256" sumtext="부모코드"/>
  129. <Column id="groupyn" type="STRING" size="256" sumtext="그룹여부"/>
  130. </ColumnInfo>
  131. </Dataset>
  132. </Objects>
  133. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  134. * System Name : 경대 의료정보시스템
  135. * Job Name : ast_healthexamrsrvacptxp -> SMAHA04041
  136. * Creator : yjh
  137. * Make Date : 2018-02-02
  138. * Description :
  139. *---------------------------------------------------------------------------------------
  140. * Modify Date Modifier Modify Description
  141. *---------------------------------------------------------------------------------------
  142. * 2018-02-02 yjh TF->XP
  143. *
  144. *---------------------------------------------------------------------------------------
  145. ****************************************************************************************/
  146. //=======================================================================================
  147. // Lib Include
  148. //---------------------------------------------------------------------------------------
  149. include "com_commonxp::comm_main.xjs";
  150. //=======================================================================================
  151. // Global Form Variable
  152. //---------------------------------------------------------------------------------------
  153. var arErrorCode = new HashArray();
  154. //=======================================================================================
  155. // Function
  156. //---------------------------------------------------------------------------------------
  157. var m_vHealexamflag = "";
  158. var m_vHealexamdetlflag = "";
  159. var m_vPlace = "";
  160. var vDestXPath = opener.javascript.getParameter("SPAHA00400_PARAM5");
  161. //=======================================================================================
  162. // Event
  163. //---------------------------------------------------------------------------------------
  164. /****************************************************************************************
  165. * Components : Form
  166. * Components ID : SMAHA04041
  167. * Event : oninit
  168. * Argument : 01.obj : Object Event has occurred
  169. * : 02.e : Event Object
  170. * Description : 화면 처음 초기화시
  171. ****************************************************************************************/
  172. function SMAHA04041_oninit(obj:Form, e:InitEventInfo)
  173. {
  174. frmf_initForm(obj); //폼 초기화
  175. }
  176. /****************************************************************************************
  177. * Components : Form
  178. * Components ID : SMAHA04041
  179. * Event : onload
  180. * Argument : 01.obj : Object Event has occurred
  181. * : 02.e : Event Object
  182. * Description : 화면 로딩 완료시
  183. ****************************************************************************************/
  184. function SMAHA04041_onload(obj:Form, e:LoadEventInfo)
  185. {
  186. grdf_setGridSort(group3.grd_patlst);
  187. // 메뉴파라미터에 따라 건진구분셋팅
  188. if( utlf_isNull(m_vHealexamflag) ) {
  189. var sFlag = frmf_getMenuParam();
  190. if(utlf_isNull(sFlag)) {
  191. m_vHealexamflag = "G";
  192. m_vHealexamdetlflag = "G01";
  193. }else {
  194. m_vHealexamflag = sFlag.substr(0,1);
  195. m_vHealexamdetlflag = sFlag.substr(0,3);
  196. m_vPlace = sFlag.substr(3,4);
  197. }
  198. }
  199. }
  200. /****************************************************************************************
  201. * Components : Button
  202. * Components ID : btn_confirm
  203. * Event : onclick
  204. * Argument : 01.obj : Object Event has occurred
  205. * : 02.e : Event Object
  206. * Description : 확인버튼 클릭시
  207. ****************************************************************************************/
  208. function group1_btn_confirm_onclick(obj:Button, e:ClickEventInfo)
  209. {
  210. var sColSep = "▦";
  211. var sRowSep = "▩";
  212. ds_main_pkgpidinfo_pkgpidlst_item.filter("sel=='Y'"); //pkgNodeList
  213. var CVS = "healexamflag" + sColSep + "healexamdetlflag"+ sColSep + "testcd" + sColSep + "calcscorcd" + sRowSep;
  214. var dataCVS = "";
  215. var duptCd = "";
  216. var acptPkgCd = opener.ds_init_baseinfo_acptcd_G112.lookupExpr("cdid=='01'", "cmt") //접수비 패키지
  217. for(var i=0; i < ds_main_pkgpidinfo_pkgpidlst_item.rowcount; i++) {
  218. var pkgcd = ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "pkgcd");
  219. if(opener.ds_main_info_addlst_item.getCaseCount("sel=='Y' && testcd=='"+pkgcd+"'") > 0) {
  220. duptCd += !utlf_isNull(ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "pkgnm")) ? ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "pkgnm") + "," : "";
  221. continue;
  222. }
  223. dataCVS += ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "healexamflag") + sColSep + ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "healexamdetlflag") + sColSep
  224. + pkgcd + sColSep + ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "calcscorcd") + sRowSep;
  225. }
  226. // 접수비 코드가 있을경우
  227. if(!utlf_isNull(acptPkgCd)) {
  228. //※수가코드가 틀려질 경우 수가코드 가져오는 로직필요
  229. // 검사내역에 있는지 그리고 특검을 선택했는지 확인 그리고 진찰료를 선택했는지 확인
  230. if((opener.ds_main_info_addlst_item.getCaseCount("sel=='Y' && testcd=='"+acptPkgCd+"'") < 1)
  231. && (opener.ds_main_pkgpidinfo_pkgpidlst_item.getCaseCount("sel=='Y' && healexamdetlflag=='G03'") > 0)
  232. && (opener.ds_main_pkgpidinfo_pkgpidlst_item.getCaseCount("sel=='Y' && healexamdetlflag=='G03' && pkgcd=='"+acptPkgCd+"'") < 1)) {
  233. dataCVS += m_vHealexamflag + sColSep + "" + sColSep
  234. + acptPkgCd + sColSep + acptPkgCd + sRowSep;
  235. }
  236. }
  237. if(!utlf_isNull(duptCd)) {
  238. sysf_messageBox("[" + duptCd + "]은 이미 등록 된 패기지","I009");
  239. return false;
  240. }
  241. if(utlf_isNull(dataCVS)) {
  242. return false;
  243. }
  244. ds_send_testinfo_testdata.clear(); // 초기화
  245. dsf_setCSVToDs("ds_send_testinfo_testdata", CVS + dataCVS);
  246. var cmpycd = opener.ds_main_info_rsrvacptinfo_item.getColumn(0, "cmpycd");
  247. var oParam = {};
  248. oParam.id = "TRAHA04042";
  249. oParam.service = "healthexamrsrvacptapp.TotalRsrvAcpt";
  250. oParam.method = "reqGetTestInfo";
  251. oParam.inds = "req=ds_send_testinfo_testdata";
  252. oParam.outds = "ds_temp_testinfo_pkg=pkg ds_temp_testinfo_calc=calc";
  253. oParam.async = false;
  254. oParam.callback = "cf_TRAHA04042";
  255. tranf_submit(oParam);
  256. ds_temp_testinfo_pkg2.assign(ds_temp_testinfo_pkg);
  257. if(arErrorCode.pop("TRAHA04042") > -1) {
  258. var addNodeList = ds_temp_testinfo_pkg;
  259. var delCnt = 0;
  260. while(ds_main_pkgpidinfo_pkgpidlst_item.rowcount > delCnt) {
  261. ds_main_pkgpidinfo_pkgpidlst_item.setColumn(delCnt, "sel", "N");
  262. delCnt++;
  263. }
  264. ds_main_pkgpidinfo_pkgpidlst_item.filter("");
  265. for(var i=0; i < ds_temp_testinfo_pkg.rowcount; i++) {
  266. opener.ds_main_info_addlst_item.addRow();
  267. var idx = opener.ds_main_info_addlst_item.rowcount - 1;
  268. var testcd = ds_temp_testinfo_pkg.getColumn(i, "testcd");
  269. var healexamdetlflag = ds_temp_testinfo_pkg.getColumn(i, "healexamdetlflag");
  270. for( var j=opener.ds_main_calcinfo_pkg.rowcount-1 ; j>=0 ; j-- ){
  271. if( opener.ds_main_calcinfo_pkg.getColumn(j, "testcd") == testcd ){
  272. opener.ds_main_calcinfo_pkg.deleteRow(j);
  273. }
  274. }
  275. for( var j=opener.ds_main_calcinfo_calc.rowcount-1 ; j>=0 ; j-- ){
  276. if( opener.ds_main_calcinfo_calc.getColumn(j, "pkgcd") == testcd ){
  277. opener.ds_main_calcinfo_calc.deleteRow(j);
  278. }
  279. }
  280. ds_temp_testinfo_pkg.filter("testcd=='"+testcd+"'");
  281. opener.ds_main_calcinfo_pkg.appendData(ds_temp_testinfo_pkg);
  282. ds_temp_testinfo_calc.filter("testcd=='"+testcd+"'");
  283. opener.ds_main_calcinfo_calc.appendData(ds_temp_testinfo_calc);
  284. opener.ds_main_info_addlst_item.setColumn(idx, "sel", ds_temp_testinfo_pkg.getColumn(i, "pkgflag") == "P"? "Y" : "N") ;
  285. opener.ds_main_info_addlst_item.setColumn(idx, "testcd", testcd);
  286. opener.ds_main_info_addlst_item.setColumn(idx, "testnm", ds_temp_testinfo_pkg.getColumn(i, "testnm"));
  287. opener.ds_main_info_addlst_item.setColumn(idx, "pkgflag", ds_temp_testinfo_pkg.getColumn(i, "pkgflag"));
  288. opener.ds_main_info_addlst_item.setColumn(idx, "healexamdetlflag", healexamdetlflag);
  289. opener.ds_main_info_addlst_item.setColumn(idx, "calcscorcd", ds_temp_testinfo_pkg.getColumn(i, "calcscorcd"));
  290. opener.ds_main_info_addlst_item.setColumn(idx, "hopedd", opener.ds_main_info_rsrvacptinfo_item.getColumn(0, "hopedd"));
  291. opener.ds_main_info_addlst_item.setColumn(idx, "orddd", opener.ds_main_info_rsrvacptinfo_item.getColumn(0, "orddd"));
  292. if((healexamdetlflag == "G05" || healexamdetlflag == "G11" || healexamdetlflag == "G07") && !utlf_isNull(cmpycd)) {
  293. opener.ds_main_info_addlst_item.setColumn(idx, "uncocd", "V02");
  294. }else if ((healexamdetlflag == "G05" || healexamdetlflag == "G11" || healexamdetlflag == "G07") && utlf_isNull(cmpycd)) {
  295. opener.ds_main_info_addlst_item.setColumn(idx, "uncocd", "V01");
  296. }else {
  297. opener.ds_main_info_addlst_item.setColumn(idx, "uncocd", "");
  298. }
  299. opener.ds_main_info_addlst_item.setColumn(idx, "testdiscyn", ds_temp_testinfo_pkg.getColumn(i, "discyn"));
  300. opener.ds_main_info_addlst_item.setColumn(idx, "totpayamt", 0);
  301. opener.ds_main_info_addlst_item.setColumn(idx, "payinsubamt", 0);
  302. opener.ds_main_info_addlst_item.setColumn(idx, "payhealcntrbamt", 0);
  303. opener.ds_main_info_addlst_item.setColumn(idx, "paycmpybamt", 0);
  304. opener.ds_main_info_addlst_item.setColumn(idx, "payownbamt", 0);
  305. opener.ds_main_info_addlst_item.setColumn(idx, "owndiscamt", 0);
  306. //opener.model.refresh();
  307. }
  308. //1,2차구분의 2차선택체크
  309. opener.ds_main_info_rsrvacptinfo_item.setColumn(0, "dgflag", "2");
  310. //금액을 셋팅
  311. opener.fSetAmt();
  312. opener.fSetChngAmt();
  313. opener.fSetTotalAmt();
  314. if(opener.swt_pkg.tabindex == 1) {
  315. opener.fSetPrcpList();
  316. }
  317. }
  318. this.close();
  319. }
  320. function cf_TRAHA04042(sSvcId, nErrorCode, sErrorMsg) {
  321. arErrorCode.push(sSvcId, nErrorCode);
  322. }
  323. /****************************************************************************************
  324. * Components : Button
  325. * Components ID : btn_cancel
  326. * Event : onclick
  327. * Argument : 01.obj : Object Event has occurred
  328. * : 02.e : Event Object
  329. * Description : 취소버튼 클릭시
  330. ****************************************************************************************/
  331. function group1_btn_cancel_onclick(obj:Button, e:ClickEventInfo)
  332. {
  333. if( frmf_checkOpener() ){
  334. // opener.model.setValue("/root/temp/okflag", "") ;
  335. }
  336. this.close();
  337. }
  338. function ds_main_pkgpidinfo_pkgpidlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
  339. {
  340. switch( e.columnid ){
  341. case "sel" :
  342. if( e.newvalue == "1" || e.newvalue == "Y" ){
  343. obj.setColumn(e.row, e.columnid, "Y");
  344. }else{
  345. obj.setColumn(e.row, e.columnid, "N");
  346. }
  347. break;
  348. default :
  349. break;
  350. }
  351. }
  352. ]]></Script>
  353. </Form>
  354. </FDL>