123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686 |
- <?xml version="1.0" encoding="utf-8"?>
- <Script type ="xscript4.0"><![CDATA[/* ================================================================================================
- - File Name : SMPID20600.js
- - Description : 명세서관리
- - Create : 2008.08.29 김상진
- ================================================================================================== */
- /* --------------------------------------------------------------------------------------------------
- Fucntion Name || Description
- -----------------------------------------------------------------------------------------------------
- - fInitialize : 화면 초기화
- -------------------------------------------------------------------------------------------------- */
- var gToday = new Date();
- var gBaseyear = gToday.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
- var gBasemonth = gToday.getDateFormat("MM");
- var gBaseday = gToday.getDateFormat("DD");
- var gCurrentdd = gBaseyear + gBasemonth + gBaseday;
- var gCurrentym = gBaseyear + gBasemonth;
- // -----------------------
- // ▶ 화면초기화
- // -----------------------
- function fInitialize() {
- // ---------------------------------------------------------------
- // 공통코드를 조회한다.
- // (ZBC001.js) com.ZBCMCODE 에서 기초코드 값 Get
- // ---------------------------------------------------------------
- var arrParam = [ {dsNm: "ds_init_P0008list"
- ,"ds_init_P0010list"
- ,"ds_init_P0291list"
- ,"ds_init_P0155list"
- ,
- cdGrpId: "P0008" // 보험유형
- ,"P0010" // 보조유형
- ,"P0291" // 진료분야
- ,"P0155" // 청구구분
- } ];
- appf_getCodeList(arrParam, );
- /*
- // ---------------------------------------------------------------
- // 청구과, 심사자, 진료과, 주치의, 청구차수, 삼시자선택 초기화
- // ---------------------------------------------------------------
- var clamym = ds_send_item1.getColumn(0, "clamym");
- ds_send_item1.setColumn( 0, "clamym", "");
- // submit("TRPID20201",false);
- var oParam = {};
- oParam.id = "TRPID20201";
- oParam.service = "aftjudgapp.InAftJudgTrgtMan";
- oParam.method = "reqGetInitComCd";
- oParam.inds = "req=ds_";
- oParam.outds = "ds_=judgrid ds_=suppkind ds_=orddrid ds_=orddrid2 ds_=clamdept ds_=orddeptcd ds_=orddeptcd2 ds_=item3 ds_=clamdg ds_=aftjudgerr ds_=uuee";
- oParam.async = false;
- oParam.callback = "cf_TRPID20201";
- tranf_submit(oParam);
- /*
- function cf_TRPID20201(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TRPID20201(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- arErrorCode.pop("TRPID20201") > -1
- arErrorCode.pop("TRPID20201") < 0
- */
- ds_init_judgrid.clearData();
- ds_init_suppkind.clearData();
- ds_init_orddrid.clearData();
- ds_init_clamdept.clearData();
- ds_init_orddeptcd.clearData();
- ds_init_item3.clearData();
- ds_init_clamdg.clearData();
- dsf_makeValue( ds_init, "judgrid", "string", "" );
- dsf_makeValue( ds_init, "suppkind", "string", "" );
- dsf_makeValue( ds_init, "orddrid", "string", "" );
- dsf_makeValue( ds_init, "clamdept", "string", "" );
- dsf_makeValue( ds_init, "orddeptcd", "string", "" );
- dsf_makeValue( ds_init, "item3", "string", "" );
- dsf_makeValue( ds_init, "clamdg", "string", "" );
- model.copyNode("ds_init_judgrid", "root_init_tmp_judgrid");
- model.copyNode("ds_init_suppkind", "root_init_tmp_suppkind");
- model.copyNode("ds_init_orddrid", "root_init_tmp_orddrid");
- model.copyNode("ds_init_clamdept", "root_init_tmp_clamdept");
- model.copyNode("ds_init_orddeptcd", "root_init_tmp_orddeptcd");
- model.copyNode("ds_init_item3", "root_init_tmp_item3");
- model.copyNode("ds_init_clamdg", "root_init_tmp_clamdg");
- ds_init_tmp_judgrid.clearData();
- ds_init_tmp_suppkind.clearData();
- ds_init_tmp_orddrid.clearData();
- ds_init_tmp_clamdept.clearData();
- ds_init_tmp_orddeptcd.clearData();
- ds_init_tmp_item3.clearData();
- ds_init_tmp_clamdg.clearData();
- */
- // ---------------------------------------------------------------
- // 진료과 주치의 초기화
- // ---------------------------------------------------------------
- // submit("TRPID20309", false);
- var oParam = {};
- oParam.id = "TRPID20309";
- oParam.service = "aftjudgapp.InAftJudgTrgtMan";
- oParam.method = "reqGetDeptCDDrID";
- oParam.inds = "req=ds_";
- oParam.outds = "ds_=orddeptcd ds_=orddeptcd2 ds_=orddrid ds_=orddrid2";
- oParam.async = false;
- oParam.callback = "cf_TRPID20309";
- tranf_submit(oParam);
- /*
- function cf_TRPID20309(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TRPID20309(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- arErrorCode.pop("TRPID20309") > -1
- arErrorCode.pop("TRPID20309") < 0
- */
- dsf_makeValue( ds_hidden_tmp, "orddeptcd", "string", "" );
- dsf_makeValue( ds_hidden_tmp, "orddeptcd2", "string", "" );
- dsf_makeValue( ds_hidden_tmp, "orddrid", "string", "" );
- dsf_makeValue( ds_hidden_tmp, "orddrid2", "string", "" );
- ds_init_orddeptcd.clearData();
- ds_init_orddeptcd2.clearData();
- ds_init_orddrid.clearData();
- ds_init_orddrid2.clearData();
- dsf_makeValue( ds_init, "orddeptcd", "string", "" );
- dsf_makeValue( ds_init, "orddeptcd2", "string", "" );
- dsf_makeValue( ds_init, "orddrid", "string", "" );
- dsf_makeValue( ds_init, "orddrid2", "string", "" );
- model.copyNode("ds_init_orddeptcd", "root_hidden_tmp_orddeptcd");
- model.copyNode("ds_init_orddeptcd2", "root_hidden_tmp_orddeptcd2");
- model.copyNode("ds_init_orddrid", "root_hidden_tmp_orddrid");
- model.copyNode("ds_init_orddrid2", "root_hidden_tmp_orddrid2");
- ds_hidden_tmp_orddeptcd.clearData();
- ds_hidden_tmp_orddeptcd2.clearData();
- ds_hidden_tmp_orddrid.clearData();
- ds_hidden_tmp_orddrid2.clearData();
- model.refreshpart("ds_send_item1_orddeptcd");
- model.refreshpart("ds_send_item1_orddeptcd2");
- model.refreshpart("ds_send_item1_orddrid");
- model.refreshpart("ds_send_item1_orddrid2");
- // 청구월 셋팅
- if (ds_send_item1.getColumn(0, "clamym") == "") {
- var lv_date = gCurrentym.toDate("YYYYMM" + "01");
- lv_date = lv_date.getAddDate(-1, "M")
- gCurrentym = lv_date.getDateFormat("YYYYMM")
- ds_send_item1.setColumn( 0, "clamym", gCurrentym);
- }
- //model.refresh();
- }
- // ----------------------------------------------------------------------
- // ▶ 명세서관리 대상조회
- // ----------------------------------------------------------------------
- function fGetDocuList() {
- // -----------------------------------
- // 작업구분에 따른 초기정보 ValidCheck
- // -----------------------------------
- var makeflag = ds_send_item1.getColumn(0, "makeflag");
- //합철, 복사, 이동, 자격수정, Donor일때는 등록번호는 필수입력조건
- if (makeflag != "4") {
- if (ds_send_item1.getColumn(0, "pid") == "") {
- sysf_messageBox("등록번호는", "I003"); ///I003=등록번호는 필수입력입니다.
- model.dispatch("ipt_patunitsrch");
- return;
- }
- }
- //대상자 조회
- // if (submit("TRPID20601")) {
- var oParam = {};
- oParam.id = "TRPID20601";
- oParam.service = "aftjudgapp.DocuManage";
- oParam.method = "reqGetDocuMngList";
- oParam.inds = "req=ds_";
- oParam.outds = "ds_=clbs";
- oParam.async = false;
- oParam.callback = "cf_TRPID20601";
- tranf_submit(oParam);
- /*
- function cf_TRPID20601(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TRPID20601(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- arErrorCode.pop("TRPID20601") > -1
- arErrorCode.pop("TRPID20601") < 0
- */
- // 추가청구일경우 최종청구차수 가져온다.
- fGetMaxClamdg();
- var nodeList = instance1.selectNodes("ds_main_list1_clbs");
- if (nodeList.length == 1) {
- ds_main_list1.setColumn( 0, "clbs[1]_fromchk", "Y");
- //grd_clbsmast.refresh();
- grd_clbsmast.row = 1;
- g_from_cnt = 1;
- }
- }
- }
- // ----------------------------------------------------------------------
- // ▶ 명세서관리 자료생성
- // ----------------------------------------------------------------------
- function fSetDocuMake() {
- // 자료생성전 체크
- var rslt = fValidcheck();
- if (rslt != false) {
- ds_send_list1_clbs.clearData(); ds_send_list1_clbs.addRow();
- var makeflag = ds_send_item1.getColumn(0, "makeflag");
- var fromchk="";
- var iCnt=0;
- // 1. 합철
- if (makeflag == "1") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
- tochk = ds_main_list1_clbs.getColumn(i, "tochk");
- if (fromchk == "Y" || tochk == "Y") {
- iCnt++;
- ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
- ds_send_list1_clbs.setColumn( iCnt, "ioflag", ds_send_item1.getColumn(0, "ioflag"));
- ds_send_list1_clbs.setColumn( iCnt, "fromchk", ds_main_list1_clbs.getColumn(i, "fromchk"));
- ds_send_list1_clbs.setColumn( iCnt, "tochk", ds_main_list1_clbs.getColumn(i, "tochk"));
- ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
- ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
- ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
- }
- }
- }
- // 2:복사, 3:이동
- else if (makeflag == "2" || makeflag == "3") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
- if (fromchk == "Y") {
- iCnt++;
- ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
- ds_send_list1_clbs.setColumn( iCnt, "copyflag", ds_send_item1.getColumn(0, "copyflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
- ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
- ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamym", ds_send_item1.getColumn(0, "t_clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
- }
- }
- }
- // 4:추가청구
- else if (makeflag == "4") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
- if (fromchk == "Y") {
- iCnt++;
- ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
- ds_send_list1_clbs.setColumn( iCnt, "ioflag", ds_send_item1.getColumn(0, "ioflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
- ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
- ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamym", ds_send_item1.getColumn(0, "t_clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
- ds_send_list1_clbs.setColumn( iCnt, "acptno", ds_main_list1_clbs.getColumn(i, "acptno"));
- ds_send_list1_clbs.setColumn( iCnt, "acptdd", ds_main_list1_clbs.getColumn(i, "acptdd"));
- ds_send_list1_clbs.setColumn( iCnt, "docuseqno", ds_main_list1_clbs.getColumn(i, "docuseqno"));
- ds_send_list1_clbs.setColumn( iCnt, "adjtresncd", ds_main_list1_clbs.getColumn(i, "adjtresncd"));
- ds_send_list1_clbs.setColumn( iCnt, "ms010", ds_send_item1.getColumn(0, "ms010"));
- }
- }
- }
- // 5:자격수정
- else if (makeflag == "5") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = ds_main_list1_clbs.getColumn(i, "fromchk");
- if (fromchk == "Y") {
- iCnt++;
- ds_send_list1_clbs.setColumn( iCnt, "makeflag", ds_send_item1.getColumn(0, "makeflag"));
- ds_send_list1_clbs.setColumn( iCnt, "ioflag", ds_send_item1.getColumn(0, "ioflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamym", ds_main_list1_clbs.getColumn(i, "clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "clamdg", ds_main_list1_clbs.getColumn(i, "clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "pid", ds_main_list1_clbs.getColumn(i, "pid"));
- ds_send_list1_clbs.setColumn( iCnt, "pidsn", ds_main_list1_clbs.getColumn(i, "pidsn"));
- ds_send_list1_clbs.setColumn( iCnt, "workflag", ds_main_list1_clbs.getColumn(i, "workflag"));
- ds_send_list1_clbs.setColumn( iCnt, "clamkey", ds_main_list1_clbs.getColumn(i, "clamkey"));
- ds_send_list1_clbs.setColumn( iCnt, "insukind", ds_main_list1_clbs.getColumn(i, "insukind"));
- ds_send_list1_clbs.setColumn( iCnt, "suppkind", ds_main_list1_clbs.getColumn(i, "suppkind"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamym", ds_send_item1.getColumn(0, "t_clamym"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
- ds_send_list1_clbs.setColumn( iCnt, "t_clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
- ds_send_list1_clbs.setColumn( iCnt, "t_insukind", ds_main_list1_clbs.getColumn(i, "t_insukind"));
- ds_send_list1_clbs.setColumn( iCnt, "t_suppkind", ds_main_list1_clbs.getColumn(i, "t_suppkind"));
- ds_send_list1_clbs.setColumn( iCnt, "insuno", ds_main_list1_clbs.getColumn(i, "insuno"));
- ds_send_list1_clbs.setColumn( iCnt, "certno", ds_main_list1_clbs.getColumn(i, "certno"));
- ds_send_list1_clbs.setColumn( iCnt, "insdnm", ds_main_list1_clbs.getColumn(i, "insdnm"));
- ds_send_list1_clbs.setColumn( iCnt, "acddd", ds_main_list1_clbs.getColumn(i, "acddd"));
- ds_send_list1_clbs.setColumn( iCnt, "acdacptno", ds_main_list1_clbs.getColumn(i, "acdacptno"));
- ds_send_list1_clbs.setColumn( iCnt, "insucd", ds_main_list1_clbs.getColumn(i, "insucd"));
- }
- }
- }
- // 자료생성...
- // if (submit("TXPID20601")) {
- var oParam = {};
- oParam.id = "TXPID20601";
- oParam.service = "aftjudgapp.DocuManage";
- oParam.method = "reqExeDocuManage";
- oParam.inds = "clbs=ds_";
- oParam.outds = "";
- oParam.async = false;
- oParam.callback = "cf_TXPID20601";
- tranf_submit(oParam);
- /*
- function cf_TXPID20601(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TXPID20601(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- arErrorCode.pop("TXPID20601") > -1
- arErrorCode.pop("TXPID20601") < 0
- */
- // 2:복사, 3:이동, 4:추가청구이면 변경된 명세서를 조회한다.
- if (makeflag == "2" || makeflag =="3" || makeflag == "4") {
- ds_send_item1.setColumn( 0, "clamym", ds_send_item1.getColumn(0, "t_clamym"));
- ds_send_item1.setColumn( 0, "clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
- // ds_send_item1.setColumn( 0, "clamflagcd", ds_send_item1.getColumn(0, "t_clamflagcd"));
- var clamym = ds_send_item1.getColumn(0, "clamym");
- var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
- ds_send_item1.setColumn( 0, "clamdg", ds_send_item1.getColumn(0, "t_clamdg"));
- var clamdg = ds_send_item1.getColumn(0, "t_clamdg");
- if (clamym == t_clamym) {
- frmf_addComboItem("cmb_clamdg", clamdg, clamdg, "above");
- } else {
- frmf_addComboItem("cmb_clamdg", clamdg, clamdg, "init");
- }
- model.refreshpart("ds_send_item1_clamym");
- model.refreshpart("ds_send_item1_clamdg");
- // model.refreshpart("ds_send_item1_clamflagcd");
- }
- btn_select.dispatch("DOMActivate"); // 자료생성 후 바로 조회...
- }
- }
- }
- // ----------------------------------------------------------------------
- // ▶ 자료생성전 체크
- // ----------------------------------------------------------------------
- function fValidcheck() {
- var makeflag = ds_send_item1.getColumn(0, "makeflag");
- // 생성할 명세서 선택되었는지 체크
- if (makeflag == "1") {
- if (g_from_cnt == 0) {
- sysf_messageBox("송신(FROM) 명세서가", "I004"); //송신(FROM) 명세서가 없습니다.
- return false;
- }
- if (g_to_cnt == 0) {
- sysf_messageBox("수신(FROM) 명세서가", "I004"); //수신(FROM) 명세서가 없습니다.
- return false;
- }
- } else {
- if (g_from_cnt == 0) {
- sysf_messageBox("자료생성할 명세서가", "I004"); //I004: 없습니다.
- return false;
- }
- }
- // 복사인 경우
- if (makeflag == "2") {
- var clamym = ds_send_item1.getColumn(0, "clamym");
- var clamdg = ds_send_item1.getColumn(0, "clamdg");
- var clamflagcd = ds_send_item1.getColumn(0, "clamflagcd");
- var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
- var t_clamdg = ds_send_item1.getColumn(0, "t_clamdg");
- var t_clamflagcd = ds_send_item1.getColumn(0, "t_clamflagcd");
- if (t_clamym == "") {
- sysf_messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamdg == "") {
- sysf_messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamflagcd == "") {
- sysf_messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (ds_send_item1.getColumn(0, "copyflag") == "") {
- sysf_messageBox("생성조건이", "I004"); //I004: 없습니다.
- return false;
- }
- else {
- if ( clamym + clamdg + clamflagcd == t_clamym + t_clamdg + t_clamflagcd ) {
- sysf_messageBox(" 생성 청구년월, 청구차수, 청구구분중 하나도 변경되지", "E007"); //E007=않았습니다.
- ipt_toclamym.setFocus();
- return false;
- }
- }
- }
- // 이동인 경우
- else if (makeflag == "3") {
- var clamym = ds_send_item1.getColumn(0, "clamym");
- var clamdg = ds_send_item1.getColumn(0, "clamdg");
- var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
- var t_clamdg = ds_send_item1.getColumn(0, "t_clamdg");
- if (t_clamym == "") {
- sysf_messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamdg == "") {
- sysf_messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
- return false;
- }
- /*
- else if (ds_send_item1.getColumn(0, "t_clamflagcd") == "") {
- sysf_messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
- }
- */
- else {
- if ( clamym + clamdg == t_clamym + t_clamdg ) {
- sysf_messageBox(" 생성 청구년월 또는 청구차수가 변경되지", "E007"); //E007=않았습니다.
- ipt_toclamym.setFocus();
- return false;
- }
- }
- }
- // 추가청구인 경우
- else if (makeflag == "4") {
- var clamym = ds_send_item1.getColumn(0, "clamym");
- var clamdg = ds_send_item1.getColumn(0, "clamdg");
- var t_clamym = ds_send_item1.getColumn(0, "t_clamym");
- var t_clamdg = ds_send_item1.getColumn(0, "t_clamdg");
- if (t_clamym == "") {
- sysf_messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamdg == "") {
- sysf_messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
- return false;
- }
- else {
- if ( clamym + clamdg == t_clamym + t_clamdg ) {
- sysf_messageBox(" 생성 청구년월 또는 청구차수가 변경되지", "E007"); //E007=않았습니다.
- ipt_toclamym.setFocus();
- return false;
- }
- }
- }
- // 자격수정 인 경우
- else if (makeflag == "5") {
- var fromchkyn;
- var insukind;
- var suppkind;
- var t_insukind;
- var t_suppkind;
- var nodeList = instance1.selectNodes("ds_main_list1_clbs");
- for ( i = 1; i <= nodeList.length; i++) {
- fromchkyn = ds_main_list1_clbs.getColumn(i, "fromchk");
- if (fromchkyn == "Y") {
- insukind = ds_main_list1_clbs.getColumn(i, "insukind");
- suppkind = ds_main_list1_clbs.getColumn(i, "suppkind");
- t_insukind = ds_main_list1_clbs.getColumn(i, "t_insukind");
- t_suppkind = ds_main_list1_clbs.getColumn(i, "t_suppkind");
- insuno = ds_main_list1_clbs.getColumn(i, "insuno");
- certno = ds_main_list1_clbs.getColumn(i, "certno");
- insdnm = ds_main_list1_clbs.getColumn(i, "insdnm");
- acddd = ds_main_list1_clbs.getColumn(i, "acddd");
- acdacptno = ds_main_list1_clbs.getColumn(i, "acdacptno");
- insucd = ds_main_list1_clbs.getColumn(i, "insucd");
- if (t_insukind == "") {
- sysf_messageBox("변경 보험유형이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_suppkind == "") {
- sysf_messageBox("변경 보조유형이", "I004"); //I004: 없습니다.
- return false;
- }
- else {
- if ( insukind + suppkind == t_insukind + t_suppkind ) {
- sysf_messageBox("보험유형 또는 보조유형이 변경되지", "E007"); //E007=않았습니다.
- ipt_toclamym.setFocus();
- return false;
- }
- }
- if (t_insukind == "11" || t_insukind == "21" || t_insukind == "22") {
- if (insuno == "") {
- sysf_messageBox("사업장기호가", "I004"); //I004: 없습니다.
- return false;
- } else if (certno == "") {
- sysf_messageBox("증번호가", "I004"); //I004: 없습니다.
- return false;
- } if (insuno == "") {
- sysf_messageBox("피보험자가", "I004"); //I004: 없습니다.
- return false;
- }
- } else if (t_insukind == "31") {
- if (acddd == "") {
- sysf_messageBox("사고일자가", "I004"); //I004: 없습니다.
- return false;
- } else if (acdacptno == "") {
- sysf_messageBox("접수번호가", "I004"); //I004: 없습니다.
- return false;
- } if (insucd == "") {
- sysf_messageBox("보험회사가", "I004"); //I004: 없습니다.
- return false;
- }
- } else if (t_insukind == "41" || t_insukind == "42") {
- if (acdacptno == "") {
- sysf_messageBox("산재관리번호가", "I004"); //I004: 없습니다.
- return false;
- } if (insucd == "") {
- sysf_messageBox("산재지사가", "I004"); //I004: 없습니다.
- return false;
- }
- }
- }
- }
- }
- }
- // ----------------------------------------------------------------------
- // ▶ 환자조회
- // ----------------------------------------------------------------------
- function fGetSrchPid() {
- var ipt_pid = ds_send_item1.getColumn(0, "pid");
- if (ipt_pid.charCodeAt(0) > 255) {
- ds_hidden_sppmc02500_cond.setColumn( 0, "srchcond", "2"); // 검색조건 : 환자명으로 설정
- ds_hidden_sppmc02500_cond.setColumn( 0, "hngnm", ipt_pid);
- } else {
- ds_hidden_sppmc02500_cond.setColumn( 0, "srchcond", "1"); // 검색조건 : 등록번호로 설정
- ds_hidden_sppmc02500_cond.setColumn( 0, "pid", ipt_pid);
- }
- // pam_commonweb_xrw_SPPMC02500_환자조회.xrw
- frmf_modal("SPPMC02500", "SPPMC02500", "ds_hidden_sppmc02500_cond""-"ds_send"", "", "1", "150", "150", "", "", "", "", "", "M"); // SPPMC02500_환자조회.xrw
- var srch_pid = ds_main_patinfo_patinfolist.getColumn(0, "pid");
- if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
- ds_main_patinfo_patinfolist.clearData(); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
- dsf_makeValue( ds_main_patinfo, "patinfolist", "string", "" ); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
- ds_send_item1.setColumn( 0, "pid", srch_pid);
- }
- //model.refresh();
- }
- // ----------------------------------
- // ▶추가청구일때만 청구차수를 조회
- // ----------------------------------
- function fGetClamdg() {
- var makeflag = ds_send_item1.getColumn(0, "makeflag");
- if (makeflag == "4") {
- //pidfGetClamdg();
- }
- }
- // ----------------------------------
- // ▶추가청구시 그리드 전체선택,해제
- // ----------------------------------
- function fChkAll(chkflag) {
- var i=0;
- var nodeList = instance1.selectNodes("ds_main_list1_clbs");
- g_from_cnt = 0;
- for ( i = 1; i <= nodeList.length; i++) {
- if (chkflag == "Y") {
- ds_main_list1.setColumn( i , "fromchk", "Y");
- g_from_cnt++;
- } else {
- ds_main_list1.setColumn( i , "fromchk", "N");
- }
- }
- //grd_clbsmast.refresh();
- }
- // ----------------------------------
- // ▶추가청구시 추가청구 max차수 조회
- // ----------------------------------
- function fGetMaxClamdg() {
- var makeflag = ds_send_item1.getColumn(0, "makeflag");
- // "추가청구"일경우에는 최종 청구차수를 조회한다.
- if (makeflag == "4") {
- dsf_makeValue( ds_send_item1, "clamflag", "string", "2");
- // if (submit("TRPID20602")) {
- var oParam = {};
- oParam.id = "TRPID20602";
- oParam.service = "aftjudgapp.DocuManage";
- oParam.method = "reqGetPidmclamMaxClamdg";
- oParam.inds = "req=ds_";
- oParam.outds = "ds_=clbs";
- oParam.async = false;
- oParam.callback = "cf_TRPID20602";
- tranf_submit(oParam);
- /*
- function cf_TRPID20602(sSvcId, nErrorCode, sErrorMsg) {
- if(nErrorCode < 0) return;
- }
- function cf_TRPID20602(sSvcId, nErrorCode, sErrorMsg) {
- arErrorCode.push(sSvcId, nErrorCode);
- }
- arErrorCode.pop("TRPID20602") > -1
- arErrorCode.pop("TRPID20602") < 0
- */
- ds_send_item1.setColumn( 0, "t_clamdg", ds_hidden_item1.getColumn(0, "maxclamdg"));
- model.refreshpart("ds_send_item1_t_clamdg");
- }
- }
- }
- ]]></Script>
|