123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMAHA04041" position="absolute 0 0 580 343" titletext="재검패키지" oninit="SMAHA04041_oninit" onload="SMAHA04041_onload">
- <Layouts>
- <Layout>
- <Div position="absolute 0 0 576 316" id="group3" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Static text="재검패키지" position="absolute 0 0 95 16" id="caption1" class="tit_2"/>
- <Shape position="absolute 0 16 576 22" linetype="horizontal" id="line1" class="line_10"/>
- <Grid position="absolute 0 21 576 306" id="grd_patlst" binddataset="ds_main_pkgpidinfo_pkgpidlst_item">
- <Formats>
- <Format id="default">
- <Columns>
- <Column size="20" band="left"/>
- <Column size="42"/>
- <Column size="144"/>
- <Column size="345"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- <Column size="0"/>
- </Columns>
- <Rows>
- <Row size="24" band="head"/>
- <Row size="24"/>
- </Rows>
- <Band id="head">
- <Cell/>
- <Cell col="1" text="선택"/>
- <Cell col="2" text="코드"/>
- <Cell col="3" text="명칭"/>
- <Cell col="4" text="caption1"/>
- <Cell col="5" text="caption2"/>
- <Cell col="6" text="caption3"/>
- <Cell col="7" text="caption4"/>
- </Band>
- <Band id="body">
- <Cell celltype="head" expr="expr:currow + 1"/>
- <Cell col="1" displaytype="checkbox" edittype="checkbox" text="bind:sel" expr="expr:sel == '1' || sel == 'Y' ? '1' : '0'"/>
- <Cell col="2" text="bind:pkgcd"/>
- <Cell col="3" text="bind:pkgnm"/>
- <Cell col="4" text="bind:pkgflag"/>
- <Cell col="5" text="bind:calcscorcd"/>
- <Cell col="6" text="bind:healexamflag"/>
- <Cell col="7" text="bind:healexamdetlflag"/>
- </Band>
- </Format>
- </Formats>
- </Grid>
- </Layout>
- </Layouts>
- </Div>
- <Div position="absolute 0 316 518 343" id="group1" scrollbars="autoboth">
- <Layouts>
- <Layout>
- <Button position="absolute 402 5 458 27" id="btn_confirm" class="btn4" text="확인" onclick="group1_btn_confirm_onclick"/>
- <Button position="absolute 461 5 517 27" id="btn_cancel" class="btn4" text="취소" onclick="group1_btn_cancel_onclick"/>
- <Shape position="absolute 0 0 518 6" linetype="horizontal" id="line32" class="line_6"/>
- </Layout>
- </Layouts>
- </Div>
- </Layout>
- </Layouts>
- <Objects>
- <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">
- <ColumnInfo>
- <Column id="sel" type="STRING"/>
- <Column id="pkgcd" type="STRING"/>
- <Column id="pkgnm" type="STRING"/>
- <Column id="pkgflag" type="STRING"/>
- <Column id="calcscorcd" type="STRING"/>
- <Column id="healexamflag" type="STRING"/>
- <Column id="healexamdetlflag" type="STRING"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_send_testinfo_testdata" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
- <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
- <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
- <Column id="calcscorcd" type="STRING" size="256" sumtext="수가코드"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_testinfo_pkg" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
- <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
- <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
- <Column id="testnm" type="STRING" size="256" sumtext="검사명"/>
- <Column id="calcscorcd" type="STRING" size="256" sumtext="수가코드"/>
- <Column id="gnrlspclamt" type="INT" size="256" sumtext="공단특수금액"/>
- <Column id="cmpyspclamt" type="INT" size="256" sumtext="단체특수금액"/>
- <Column id="calcspclamt" type="INT" size="256" sumtext="특수금액"/>
- <Column id="gnrlamt" type="INT" size="256" sumtext="보험금액"/>
- <Column id="discyn" type="STRING" size="256" sumtext="할인여부"/>
- <Column id="pkgflag" type="STRING" size="256" sumtext="패키지구분"/>
- <Column id="parentcd" type="STRING" size="256" sumtext="부모코드"/>
- <Column id="groupyn" type="STRING" size="256" sumtext="그룹여부"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_testinfo_calc" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="pkgcd" type="STRING" size="256" sumtext="패키지코드"/>
- <Column id="grpcd" type="STRING" size="256" sumtext="그룹코드"/>
- <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
- <Column id="gnrlspclamt" type="INT" size="256" sumtext="공단특수금액"/>
- <Column id="cmpyspclamt" type="INT" size="256" sumtext="단체특수금액"/>
- <Column id="calcspclamt" type="INT" size="256" sumtext="계산특수금액"/>
- <Column id="gnrlamt" type="INT" size="256" sumtext="보험금액"/>
- <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_temp_testinfo_pkg2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="healexamflag" type="STRING" size="256" sumtext="건진구분"/>
- <Column id="healexamdetlflag" type="STRING" size="256" sumtext="건진상세구분"/>
- <Column id="testcd" type="STRING" size="256" sumtext="검사코드"/>
- <Column id="testnm" type="STRING" size="256" sumtext="검사명"/>
- <Column id="calcscorcd" type="STRING" size="256" sumtext="수가코드"/>
- <Column id="gnrlspclamt" type="INT" size="256" sumtext="공단특수금액"/>
- <Column id="cmpyspclamt" type="INT" size="256" sumtext="단체특수금액"/>
- <Column id="calcspclamt" type="INT" size="256" sumtext="특수금액"/>
- <Column id="gnrlamt" type="INT" size="256" sumtext="보험금액"/>
- <Column id="discyn" type="STRING" size="256" sumtext="할인여부"/>
- <Column id="pkgflag" type="STRING" size="256" sumtext="패키지구분"/>
- <Column id="parentcd" type="STRING" size="256" sumtext="부모코드"/>
- <Column id="groupyn" type="STRING" size="256" sumtext="그룹여부"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : 경대 의료정보시스템
- * Job Name : ast_healthexamrsrvacptxp -> SMAHA04041
- * Creator : yjh
- * Make Date : 2018-02-02
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2018-02-02 yjh TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var arErrorCode = new HashArray();
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- var m_vHealexamflag = "";
- var m_vHealexamdetlflag = "";
- var m_vPlace = "";
- var vDestXPath = opener.javascript.getParameter("SPAHA00400_PARAM5");
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SMAHA04041
- * Event : oninit
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 처음 초기화시
- ****************************************************************************************/
- function SMAHA04041_oninit(obj:Form, e:InitEventInfo)
- {
- frmf_initForm(obj); //폼 초기화
- }
- /****************************************************************************************
- * Components : Form
- * Components ID : SMAHA04041
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 로딩 완료시
- ****************************************************************************************/
- function SMAHA04041_onload(obj:Form, e:LoadEventInfo)
- {
- grdf_setGridSort(group3.grd_patlst);
-
- // 메뉴파라미터에 따라 건진구분셋팅
- if( utlf_isNull(m_vHealexamflag) ) {
- var sFlag = frmf_getMenuParam();
-
- if(utlf_isNull(sFlag)) {
- m_vHealexamflag = "G";
- m_vHealexamdetlflag = "G01";
- }else {
- m_vHealexamflag = sFlag.substr(0,1);
- m_vHealexamdetlflag = sFlag.substr(0,3);
- m_vPlace = sFlag.substr(3,4);
- }
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_confirm
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 확인버튼 클릭시
- ****************************************************************************************/
- function group1_btn_confirm_onclick(obj:Button, e:ClickEventInfo)
- {
- var sColSep = "▦";
- var sRowSep = "▩";
-
- ds_main_pkgpidinfo_pkgpidlst_item.filter("sel=='Y'"); //pkgNodeList
-
- var CVS = "healexamflag" + sColSep + "healexamdetlflag"+ sColSep + "testcd" + sColSep + "calcscorcd" + sRowSep;
- var dataCVS = "";
- var duptCd = "";
- var acptPkgCd = opener.ds_init_baseinfo_acptcd_G112.lookupExpr("cdid=='01'", "cmt") //접수비 패키지
-
- for(var i=0; i < ds_main_pkgpidinfo_pkgpidlst_item.rowcount; i++) {
- var pkgcd = ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "pkgcd");
-
- if(opener.ds_main_info_addlst_item.getCaseCount("sel=='Y' && testcd=='"+pkgcd+"'") > 0) {
-
- duptCd += !utlf_isNull(ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "pkgnm")) ? ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "pkgnm") + "," : "";
- continue;
- }
-
- dataCVS += ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "healexamflag") + sColSep + ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "healexamdetlflag") + sColSep
- + pkgcd + sColSep + ds_main_pkgpidinfo_pkgpidlst_item.getColumn(i, "calcscorcd") + sRowSep;
- }
-
- // 접수비 코드가 있을경우
- if(!utlf_isNull(acptPkgCd)) {
- //※수가코드가 틀려질 경우 수가코드 가져오는 로직필요
- // 검사내역에 있는지 그리고 특검을 선택했는지 확인 그리고 진찰료를 선택했는지 확인
- if((opener.ds_main_info_addlst_item.getCaseCount("sel=='Y' && testcd=='"+acptPkgCd+"'") < 1)
- && (opener.ds_main_pkgpidinfo_pkgpidlst_item.getCaseCount("sel=='Y' && healexamdetlflag=='G03'") > 0)
- && (opener.ds_main_pkgpidinfo_pkgpidlst_item.getCaseCount("sel=='Y' && healexamdetlflag=='G03' && pkgcd=='"+acptPkgCd+"'") < 1)) {
- dataCVS += m_vHealexamflag + sColSep + "" + sColSep
- + acptPkgCd + sColSep + acptPkgCd + sRowSep;
- }
- }
-
-
- if(!utlf_isNull(duptCd)) {
- sysf_messageBox("[" + duptCd + "]은 이미 등록 된 패기지","I009");
- return false;
- }
-
- if(utlf_isNull(dataCVS)) {
- return false;
- }
-
- ds_send_testinfo_testdata.clear(); // 초기화
- dsf_setCSVToDs("ds_send_testinfo_testdata", CVS + dataCVS);
- var cmpycd = opener.ds_main_info_rsrvacptinfo_item.getColumn(0, "cmpycd");
-
- var oParam = {};
- oParam.id = "TRAHA04042";
- oParam.service = "healthexamrsrvacptapp.TotalRsrvAcpt";
- oParam.method = "reqGetTestInfo";
- oParam.inds = "req=ds_send_testinfo_testdata";
- oParam.outds = "ds_temp_testinfo_pkg=pkg ds_temp_testinfo_calc=calc";
- oParam.async = false;
- oParam.callback = "cf_TRAHA04042";
- tranf_submit(oParam);
-
- ds_temp_testinfo_pkg2.assign(ds_temp_testinfo_pkg);
-
- if(arErrorCode.pop("TRAHA04042") > -1) {
- var addNodeList = ds_temp_testinfo_pkg;
- var delCnt = 0;
- while(ds_main_pkgpidinfo_pkgpidlst_item.rowcount > delCnt) {
- ds_main_pkgpidinfo_pkgpidlst_item.setColumn(delCnt, "sel", "N");
- delCnt++;
- }
-
- ds_main_pkgpidinfo_pkgpidlst_item.filter("");
-
-
- for(var i=0; i < ds_temp_testinfo_pkg.rowcount; i++) {
- opener.ds_main_info_addlst_item.addRow();
- var idx = opener.ds_main_info_addlst_item.rowcount - 1;
-
- var testcd = ds_temp_testinfo_pkg.getColumn(i, "testcd");
- var healexamdetlflag = ds_temp_testinfo_pkg.getColumn(i, "healexamdetlflag");
-
- for( var j=opener.ds_main_calcinfo_pkg.rowcount-1 ; j>=0 ; j-- ){
- if( opener.ds_main_calcinfo_pkg.getColumn(j, "testcd") == testcd ){
- opener.ds_main_calcinfo_pkg.deleteRow(j);
- }
- }
- for( var j=opener.ds_main_calcinfo_calc.rowcount-1 ; j>=0 ; j-- ){
- if( opener.ds_main_calcinfo_calc.getColumn(j, "pkgcd") == testcd ){
- opener.ds_main_calcinfo_calc.deleteRow(j);
- }
- }
-
- ds_temp_testinfo_pkg.filter("testcd=='"+testcd+"'");
- opener.ds_main_calcinfo_pkg.appendData(ds_temp_testinfo_pkg);
- ds_temp_testinfo_calc.filter("testcd=='"+testcd+"'");
- opener.ds_main_calcinfo_calc.appendData(ds_temp_testinfo_calc);
-
- opener.ds_main_info_addlst_item.setColumn(idx, "sel", ds_temp_testinfo_pkg.getColumn(i, "pkgflag") == "P"? "Y" : "N") ;
- opener.ds_main_info_addlst_item.setColumn(idx, "testcd", testcd);
- opener.ds_main_info_addlst_item.setColumn(idx, "testnm", ds_temp_testinfo_pkg.getColumn(i, "testnm"));
- opener.ds_main_info_addlst_item.setColumn(idx, "pkgflag", ds_temp_testinfo_pkg.getColumn(i, "pkgflag"));
- opener.ds_main_info_addlst_item.setColumn(idx, "healexamdetlflag", healexamdetlflag);
- opener.ds_main_info_addlst_item.setColumn(idx, "calcscorcd", ds_temp_testinfo_pkg.getColumn(i, "calcscorcd"));
- opener.ds_main_info_addlst_item.setColumn(idx, "hopedd", opener.ds_main_info_rsrvacptinfo_item.getColumn(0, "hopedd"));
- opener.ds_main_info_addlst_item.setColumn(idx, "orddd", opener.ds_main_info_rsrvacptinfo_item.getColumn(0, "orddd"));
- if((healexamdetlflag == "G05" || healexamdetlflag == "G11" || healexamdetlflag == "G07") && !utlf_isNull(cmpycd)) {
- opener.ds_main_info_addlst_item.setColumn(idx, "uncocd", "V02");
- }else if ((healexamdetlflag == "G05" || healexamdetlflag == "G11" || healexamdetlflag == "G07") && utlf_isNull(cmpycd)) {
- opener.ds_main_info_addlst_item.setColumn(idx, "uncocd", "V01");
- }else {
- opener.ds_main_info_addlst_item.setColumn(idx, "uncocd", "");
- }
- opener.ds_main_info_addlst_item.setColumn(idx, "testdiscyn", ds_temp_testinfo_pkg.getColumn(i, "discyn"));
- opener.ds_main_info_addlst_item.setColumn(idx, "totpayamt", 0);
- opener.ds_main_info_addlst_item.setColumn(idx, "payinsubamt", 0);
- opener.ds_main_info_addlst_item.setColumn(idx, "payhealcntrbamt", 0);
- opener.ds_main_info_addlst_item.setColumn(idx, "paycmpybamt", 0);
- opener.ds_main_info_addlst_item.setColumn(idx, "payownbamt", 0);
- opener.ds_main_info_addlst_item.setColumn(idx, "owndiscamt", 0);
- //opener.model.refresh();
- }
- //1,2차구분의 2차선택체크
- opener.ds_main_info_rsrvacptinfo_item.setColumn(0, "dgflag", "2");
-
- //금액을 셋팅
- opener.fSetAmt();
- opener.fSetChngAmt();
- opener.fSetTotalAmt();
- if(opener.swt_pkg.tabindex == 1) {
- opener.fSetPrcpList();
- }
-
- }
-
- this.close();
- }
- function cf_TRAHA04042(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_cancel
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 취소버튼 클릭시
- ****************************************************************************************/
- function group1_btn_cancel_onclick(obj:Button, e:ClickEventInfo)
- {
- if( frmf_checkOpener() ){
- // opener.model.setValue("/root/temp/okflag", "") ;
- }
- this.close();
- }
- function ds_main_pkgpidinfo_pkgpidlst_item_oncolumnchanged(obj:Dataset, e:DSColChangeEventInfo)
- {
- switch( e.columnid ){
- case "sel" :
- if( e.newvalue == "1" || e.newvalue == "Y" ){
- obj.setColumn(e.row, e.columnid, "Y");
- }else{
- obj.setColumn(e.row, e.columnid, "N");
- }
- break;
-
- default :
- break;
- }
- }
- ]]></Script>
- </Form>
- </FDL>
|