123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590 |
- /* ================================================================================================
- - 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
- // ---------------------------------------------------------------
- zbcfGetCodeList(
- new Array("P0008" // 보험유형
- ,"P0010" // 보조유형
- ,"P0291" // 진료분야
- ,"P0155" // 청구구분
- ),
- new Array("/root/init/P0008list"
- ,"/root/init/P0010list"
- ,"/root/init/P0291list"
- ,"/root/init/P0155list"
- ) );
-
-
- /*
- // ---------------------------------------------------------------
- // 청구과, 심사자, 진료과, 주치의, 청구차수, 삼시자선택 초기화
- // ---------------------------------------------------------------
- var clamym = model.getValue("/root/send/item1/clamym");
- model.setValue("/root/send/item1/clamym", "");
- submit("TRPID20201",false);
-
- model.removeNodeset("root/init/judgrid");
- model.removeNodeset("root/init/suppkind");
- model.removeNodeset("root/init/orddrid");
- model.removeNodeset("root/init/clamdept");
- model.removeNodeset("root/init/orddeptcd");
- model.removeNodeset("root/init/item3");
- model.removeNodeset("root/init/clamdg");
-
- model.makeNode("root/init/judgrid");
- model.makeNode("root/init/suppkind");
- model.makeNode("root/init/orddrid");
- model.makeNode("root/init/clamdept");
- model.makeNode("root/init/orddeptcd");
- model.makeNode("root/init/item3");
- model.makeNode("root/init/clamdg");
-
- model.copyNode("root/init/judgrid", "root/init/tmp/judgrid");
- model.copyNode("root/init/suppkind", "root/init/tmp/suppkind");
- model.copyNode("root/init/orddrid", "root/init/tmp/orddrid");
- model.copyNode("root/init/clamdept", "root/init/tmp/clamdept");
- model.copyNode("root/init/orddeptcd", "root/init/tmp/orddeptcd");
- model.copyNode("root/init/item3", "root/init/tmp/item3");
- model.copyNode("root/init/clamdg", "root/init/tmp/clamdg");
-
- model.removeNodeset("root/init/tmp/judgrid");
- model.removeNodeset("root/init/tmp/suppkind");
- model.removeNodeset("root/init/tmp/orddrid");
- model.removeNodeset("root/init/tmp/clamdept");
- model.removeNodeset("root/init/tmp/orddeptcd");
- model.removeNodeset("root/init/tmp/item3");
- model.removeNodeset("root/init/tmp/clamdg");
- */
-
- // ---------------------------------------------------------------
- // 진료과 주치의 초기화
- // ---------------------------------------------------------------
- submit("TRPID20309", false);
- model.makeNode("root/hidden/tmp/orddeptcd");
- model.makeNode("root/hidden/tmp/orddeptcd2");
- model.makeNode("root/hidden/tmp/orddrid");
- model.makeNode("root/hidden/tmp/orddrid2");
-
- model.removeNodeset("root/init/orddeptcd");
- model.removeNodeset("root/init/orddeptcd2");
- model.removeNodeset("root/init/orddrid");
- model.removeNodeset("root/init/orddrid2");
- model.makeNode("root/init/orddeptcd");
- model.makeNode("root/init/orddeptcd2");
- model.makeNode("root/init/orddrid");
- model.makeNode("root/init/orddrid2");
- model.copyNode("root/init/orddeptcd", "root/hidden/tmp/orddeptcd");
- model.copyNode("root/init/orddeptcd2", "root/hidden/tmp/orddeptcd2");
- model.copyNode("root/init/orddrid", "root/hidden/tmp/orddrid");
- model.copyNode("root/init/orddrid2", "root/hidden/tmp/orddrid2");
-
- model.removeNodeset("root/hidden/tmp/orddeptcd");
- model.removeNodeset("root/hidden/tmp/orddeptcd2");
- model.removeNodeset("root/hidden/tmp/orddrid");
- model.removeNodeset("root/hidden/tmp/orddrid2");
-
- model.refreshpart("/root/send/item1/orddeptcd");
- model.refreshpart("/root/send/item1/orddeptcd2");
- model.refreshpart("/root/send/item1/orddrid");
- model.refreshpart("/root/send/item1/orddrid2");
-
- // 청구월 셋팅
- if (model.getValue("/root/send/item1/clamym") == "") {
- var lv_date = gCurrentym.toDate("YYYYMM" + "01");
- lv_date = lv_date.getAddDate(-1, "M")
- gCurrentym = lv_date.getDateFormat("YYYYMM")
- model.setValue("/root/send/item1/clamym", gCurrentym);
- }
-
- model.refresh();
- }
- // ----------------------------------------------------------------------
- // ▶ 명세서관리 대상조회
- // ----------------------------------------------------------------------
- function fGetDocuList() {
- // -----------------------------------
- // 작업구분에 따른 초기정보 ValidCheck
- // -----------------------------------
- var makeflag = model.getValue("/root/send/item1/makeflag");
- //합철, 복사, 이동, 자격수정, Donor일때는 등록번호는 필수입력조건
- if (makeflag != "4") {
- if (model.getValue("/root/send/item1/pid") == "") {
- messageBox("등록번호는", "I003"); ///I003=등록번호는 필수입력입니다.
- model.dispatch("ipt_patunitsrch");
- return;
- }
- }
-
- //대상자 조회
- if (submit("TRPID20601")) {
- // 추가청구일경우 최종청구차수 가져온다.
- fGetMaxClamdg();
-
- var nodeList = instance1.selectNodes("/root/main/list1/clbs");
-
- if (nodeList.length == 1) {
- model.setValue("/root/main/list1/clbs[1]/fromchk", "Y");
- grd_clbsmast.refresh();
- grd_clbsmast.row = 1;
- g_from_cnt = 1;
- }
-
- }
- }
- // ----------------------------------------------------------------------
- // ▶ 명세서관리 자료생성
- // ----------------------------------------------------------------------
- function fSetDocuMake() {
- // 자료생성전 체크
- var rslt = fValidcheck();
- if (rslt != false) {
-
- model.resetInstanceNode("root/send/list1/clbs");
-
- var makeflag = model.getValue("root/send/item1/makeflag");
- var fromchk="";
- var iCnt=0;
-
- // 1. 합철
- if (makeflag == "1") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = model.getValue("/root/main/list1/clbs[" + i + "]/fromchk");
- tochk = model.getValue("/root/main/list1/clbs[" + i + "]/tochk");
- if (fromchk == "Y" || tochk == "Y") {
- iCnt++;
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/makeflag", model.getValue("/root/send/item1/makeflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/ioflag", model.getValue("/root/send/item1/ioflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/fromchk", model.getValue("/root/main/list1/clbs[" + i + "]/fromchk"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/tochk", model.getValue("/root/main/list1/clbs[" + i + "]/tochk"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamym", model.getValue("/root/main/list1/clbs[" + i + "]/clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamdg", model.getValue("/root/main/list1/clbs[" + i + "]/clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pid", model.getValue("/root/main/list1/clbs[" + i + "]/pid"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pidsn", model.getValue("/root/main/list1/clbs[" + i + "]/pidsn"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/workflag", model.getValue("/root/main/list1/clbs[" + i + "]/workflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamkey", model.getValue("/root/main/list1/clbs[" + i + "]/clamkey"));
-
- }
- }
- }
- // 2:복사, 3:이동
- else if (makeflag == "2" || makeflag == "3") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = model.getValue("/root/main/list1/clbs[" + i + "]/fromchk");
- if (fromchk == "Y") {
- iCnt++;
-
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/makeflag", model.getValue("/root/send/item1/makeflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/copyflag", model.getValue("/root/send/item1/copyflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamym", model.getValue("/root/main/list1/clbs[" + i + "]/clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamdg", model.getValue("/root/main/list1/clbs[" + i + "]/clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pid", model.getValue("/root/main/list1/clbs[" + i + "]/pid"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pidsn", model.getValue("/root/main/list1/clbs[" + i + "]/pidsn"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/workflag", model.getValue("/root/main/list1/clbs[" + i + "]/workflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamkey", model.getValue("/root/main/list1/clbs[" + i + "]/clamkey"));
-
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamym", model.getValue("/root/send/item1/t_clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamdg", model.getValue("/root/send/item1/t_clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamflagcd", model.getValue("/root/send/item1/t_clamflagcd"));
- }
- }
- }
- // 4:추가청구
- else if (makeflag == "4") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = model.getValue("/root/main/list1/clbs[" + i + "]/fromchk");
- if (fromchk == "Y") {
- iCnt++;
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/makeflag", model.getValue("/root/send/item1/makeflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/ioflag", model.getValue("/root/send/item1/ioflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamym", model.getValue("/root/main/list1/clbs[" + i + "]/clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamdg", model.getValue("/root/main/list1/clbs[" + i + "]/clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pid", model.getValue("/root/main/list1/clbs[" + i + "]/pid"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pidsn", model.getValue("/root/main/list1/clbs[" + i + "]/pidsn"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/workflag", model.getValue("/root/main/list1/clbs[" + i + "]/workflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamkey", model.getValue("/root/main/list1/clbs[" + i + "]/clamkey"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamym", model.getValue("/root/send/item1/t_clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamdg", model.getValue("/root/send/item1/t_clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamflagcd", model.getValue("/root/send/item1/t_clamflagcd"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/acptno", model.getValue("/root/main/list1/clbs[" + i + "]/acptno"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/acptdd", model.getValue("/root/main/list1/clbs[" + i + "]/acptdd"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/docuseqno", model.getValue("/root/main/list1/clbs[" + i + "]/docuseqno"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/adjtresncd", model.getValue("/root/main/list1/clbs[" + i + "]/adjtresncd"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/ms010", model.getValue("/root/send/item1/ms010"));
- }
- }
- }
- // 5:자격수정
- else if (makeflag == "5") {
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- fromchk = model.getValue("/root/main/list1/clbs[" + i + "]/fromchk");
- if (fromchk == "Y") {
- iCnt++;
-
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/makeflag", model.getValue("/root/send/item1/makeflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/ioflag", model.getValue("/root/send/item1/ioflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamym", model.getValue("/root/main/list1/clbs[" + i + "]/clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamdg", model.getValue("/root/main/list1/clbs[" + i + "]/clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pid", model.getValue("/root/main/list1/clbs[" + i + "]/pid"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/pidsn", model.getValue("/root/main/list1/clbs[" + i + "]/pidsn"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/workflag", model.getValue("/root/main/list1/clbs[" + i + "]/workflag"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/clamkey", model.getValue("/root/main/list1/clbs[" + i + "]/clamkey"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/insukind", model.getValue("/root/main/list1/clbs[" + i + "]/insukind"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/suppkind", model.getValue("/root/main/list1/clbs[" + i + "]/suppkind"));
-
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamym", model.getValue("/root/send/item1/t_clamym"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamdg", model.getValue("/root/send/item1/t_clamdg"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_clamflagcd", model.getValue("/root/send/item1/t_clamflagcd"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_insukind", model.getValue("/root/main/list1/clbs[" + i + "]/t_insukind"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/t_suppkind", model.getValue("/root/main/list1/clbs[" + i + "]/t_suppkind"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/insuno", model.getValue("/root/main/list1/clbs[" + i + "]/insuno"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/certno", model.getValue("/root/main/list1/clbs[" + i + "]/certno"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/insdnm", model.getValue("/root/main/list1/clbs[" + i + "]/insdnm"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/acddd", model.getValue("/root/main/list1/clbs[" + i + "]/acddd"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/acdacptno", model.getValue("/root/main/list1/clbs[" + i + "]/acdacptno"));
- model.makeValue("/root/send/list1/clbs[" + iCnt + "]/insucd", model.getValue("/root/main/list1/clbs[" + i + "]/insucd"));
- }
- }
- }
-
- // 자료생성...
- if (submit("TXPID20601")) {
-
- // 2:복사, 3:이동, 4:추가청구이면 변경된 명세서를 조회한다.
- if (makeflag == "2" || makeflag =="3" || makeflag == "4") {
- model.setValue("/root/send/item1/clamym", model.getValue("/root/send/item1/t_clamym"));
- model.setValue("/root/send/item1/clamdg", model.getValue("/root/send/item1/t_clamdg"));
- // model.setValue("/root/send/item1/clamflagcd", model.getValue("/root/send/item1/t_clamflagcd"));
-
- var clamym = model.getValue("/root/send/item1/clamym");
- var t_clamym = model.getValue("/root/send/item1/t_clamym");
- model.setValue("/root/send/item1/clamdg", model.getValue("/root/send/item1/t_clamdg"));
-
- var clamdg = model.getValue("/root/send/item1/t_clamdg");
- if (clamym == t_clamym) {
- addComboItem("cmb_clamdg", clamdg, clamdg, "above");
- } else {
- addComboItem("cmb_clamdg", clamdg, clamdg, "init");
- }
-
- model.refreshpart("/root/send/item1/clamym");
- model.refreshpart("/root/send/item1/clamdg");
- // model.refreshpart("/root/send/item1/clamflagcd");
- }
-
- btn_select.dispatch("DOMActivate"); // 자료생성 후 바로 조회...
- }
- }
-
- }
-
-
- // ----------------------------------------------------------------------
- // ▶ 자료생성전 체크
- // ----------------------------------------------------------------------
- function fValidcheck() {
- var makeflag = model.getValue("root/send/item1/makeflag");
-
- // 생성할 명세서 선택되었는지 체크
- if (makeflag == "1") {
- if (g_from_cnt == 0) {
- messageBox("송신(FROM) 명세서가", "I004"); //송신(FROM) 명세서가 없습니다.
- return false;
- }
- if (g_to_cnt == 0) {
- messageBox("수신(FROM) 명세서가", "I004"); //수신(FROM) 명세서가 없습니다.
- return false;
- }
- } else {
- if (g_from_cnt == 0) {
- messageBox("자료생성할 명세서가", "I004"); //I004: 없습니다.
- return false;
- }
- }
-
- // 복사인 경우
- if (makeflag == "2") {
- var clamym = model.getValue("/root/send/item1/clamym");
- var clamdg = model.getValue("/root/send/item1/clamdg");
- var clamflagcd = model.getValue("/root/send/item1/clamflagcd");
- var t_clamym = model.getValue("/root/send/item1/t_clamym");
- var t_clamdg = model.getValue("/root/send/item1/t_clamdg");
- var t_clamflagcd = model.getValue("/root/send/item1/t_clamflagcd");
-
- if (t_clamym == "") {
- messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamdg == "") {
- messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamflagcd == "") {
- messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (model.getValue("/root/send/item1/copyflag") == "") {
- messageBox("생성조건이", "I004"); //I004: 없습니다.
- return false;
- }
- else {
- if ( clamym + clamdg + clamflagcd == t_clamym + t_clamdg + t_clamflagcd ) {
- messageBox(" 생성 청구년월, 청구차수, 청구구분중 하나도 변경되지", "E007"); //E007=않았습니다.
- model.setFocus("ipt_toclamym");
- return false;
- }
- }
- }
- // 이동인 경우
- else if (makeflag == "3") {
-
- var clamym = model.getValue("/root/send/item1/clamym");
- var clamdg = model.getValue("/root/send/item1/clamdg");
- var t_clamym = model.getValue("/root/send/item1/t_clamym");
- var t_clamdg = model.getValue("/root/send/item1/t_clamdg");
-
- if (t_clamym == "") {
- messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamdg == "") {
- messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
- return false;
- }
- /*
- else if (model.getValue("/root/send/item1/t_clamflagcd") == "") {
- messageBox("생성 청구구분이", "I004"); //I004: 없습니다.
- }
- */
- else {
- if ( clamym + clamdg == t_clamym + t_clamdg ) {
- messageBox(" 생성 청구년월 또는 청구차수가 변경되지", "E007"); //E007=않았습니다.
- model.setFocus("ipt_toclamym");
- return false;
- }
- }
- }
- // 추가청구인 경우
- else if (makeflag == "4") {
-
- var clamym = model.getValue("/root/send/item1/clamym");
- var clamdg = model.getValue("/root/send/item1/clamdg");
- var t_clamym = model.getValue("/root/send/item1/t_clamym");
- var t_clamdg = model.getValue("/root/send/item1/t_clamdg");
-
- if (t_clamym == "") {
- messageBox("생성 청구년월이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_clamdg == "") {
- messageBox("생성 청구차수가", "I004"); //I004: 없습니다.
- return false;
- }
- else {
- if ( clamym + clamdg == t_clamym + t_clamdg ) {
- messageBox(" 생성 청구년월 또는 청구차수가 변경되지", "E007"); //E007=않았습니다.
- model.setFocus("ipt_toclamym");
- return false;
- }
- }
- }
- // 자격수정 인 경우
- else if (makeflag == "5") {
-
- var fromchkyn;
- var insukind;
- var suppkind;
- var t_insukind;
- var t_suppkind;
- var nodeList = instance1.selectNodes("/root/main/list1/clbs");
-
-
- for ( i = 1; i <= nodeList.length; i++) {
- fromchkyn = model.getValue("/root/main/list1/clbs[ " + i + "]/fromchk");
- if (fromchkyn == "Y") {
- insukind = model.getValue("/root/main/list1/clbs[ " + i + "]/insukind");
- suppkind = model.getValue("/root/main/list1/clbs[ " + i + "]/suppkind");
- t_insukind = model.getValue("/root/main/list1/clbs[ " + i + "]/t_insukind");
- t_suppkind = model.getValue("/root/main/list1/clbs[ " + i + "]/t_suppkind");
-
- insuno = model.getValue("/root/main/list1/clbs[ " + i + "]/insuno");
- certno = model.getValue("/root/main/list1/clbs[ " + i + "]/certno");
- insdnm = model.getValue("/root/main/list1/clbs[ " + i + "]/insdnm");
- acddd = model.getValue("/root/main/list1/clbs[ " + i + "]/acddd");
- acdacptno = model.getValue("/root/main/list1/clbs[ " + i + "]/acdacptno");
- insucd = model.getValue("/root/main/list1/clbs[ " + i + "]/insucd");
- if (t_insukind == "") {
- messageBox("변경 보험유형이", "I004"); //I004: 없습니다.
- return false;
- }
- else if (t_suppkind == "") {
- messageBox("변경 보조유형이", "I004"); //I004: 없습니다.
- return false;
- }
- else {
- if ( insukind + suppkind == t_insukind + t_suppkind ) {
- messageBox("보험유형 또는 보조유형이 변경되지", "E007"); //E007=않았습니다.
- model.setFocus("ipt_toclamym");
- return false;
- }
- }
-
- if (t_insukind == "11" || t_insukind == "21" || t_insukind == "22") {
- if (insuno == "") {
- messageBox("사업장기호가", "I004"); //I004: 없습니다.
- return false;
- } else if (certno == "") {
- messageBox("증번호가", "I004"); //I004: 없습니다.
- return false;
- } if (insuno == "") {
- messageBox("피보험자가", "I004"); //I004: 없습니다.
- return false;
- }
- } else if (t_insukind == "31") {
- if (acddd == "") {
- messageBox("사고일자가", "I004"); //I004: 없습니다.
- return false;
- } else if (acdacptno == "") {
- messageBox("접수번호가", "I004"); //I004: 없습니다.
- return false;
- } if (insucd == "") {
- messageBox("보험회사가", "I004"); //I004: 없습니다.
- return false;
- }
- } else if (t_insukind == "41" || t_insukind == "42") {
- if (acdacptno == "") {
- messageBox("산재관리번호가", "I004"); //I004: 없습니다.
- return false;
- } if (insucd == "") {
- messageBox("산재지사가", "I004"); //I004: 없습니다.
- return false;
- }
- }
- }
- }
- }
- }
- // ----------------------------------------------------------------------
- // ▶ 환자조회
- // ----------------------------------------------------------------------
- function fGetSrchPid() {
- var ipt_pid = model.getValue("/root/send/item1/pid");
-
- if (ipt_pid.charCodeAt(0) > 255) {
- model.setValue("/root/hidden/sppmc02500/cond/srchcond", "2"); // 검색조건 : 환자명으로 설정
- model.setValue("/root/hidden/sppmc02500/cond/hngnm", ipt_pid);
- } else {
- model.setValue("/root/hidden/sppmc02500/cond/srchcond", "1"); // 검색조건 : 등록번호로 설정
- model.setValue("/root/hidden/sppmc02500/cond/pid", ipt_pid);
- }
-
-
- // pam/commonweb/xrw/SPPMC02500_환자조회.xrw
- modal("SPPMC02500", "1", "150", "150", "SPPMC02500", "/root/hidden/sppmc02500/cond", "/root/send", "", ""); // SPPMC02500_환자조회.xrw
- var srch_pid = model.getValue("/root/main/patinfo/patinfolist/pid");
- if (srch_pid) { // SPPMC02500_환자조회 화면에서 조회한 경우임
- model.removeNodeset("/root/main/patinfo/patinfolist"); // patinfolist가 제거됨 (resetInstanceNode의 경우 값은 지우고 노드는 남아있음)
- model.makeNode("/root/main/patinfo/patinfolist"); // SPPMC02500_환자조회 팝업을 다시 조회할 경우를 위해 다시 노드를 추가함
- model.setValue("/root/send/item1/pid", srch_pid);
- }
- model.refresh();
- }
- // ----------------------------------
- // ▶추가청구일때만 청구차수를 조회
- // ----------------------------------
- function fGetClamdg() {
- var makeflag = model.getValue("/root/send/item1/makeflag");
- if (makeflag == "4") {
- //pidfGetClamdg();
- }
- }
- // ----------------------------------
- // ▶추가청구시 그리드 전체선택,해제
- // ----------------------------------
- function fChkAll(chkflag) {
- var i=0;
- var nodeList = instance1.selectNodes("/root/main/list1/clbs");
- g_from_cnt = 0;
- for ( i = 1; i <= nodeList.length; i++) {
- if (chkflag == "Y") {
- model.setValue("/root/main/list1/clbs[" + i + "]/fromchk", "Y");
- g_from_cnt++;
- } else {
- model.setValue("/root/main/list1/clbs[" + i + "]/fromchk", "N");
- }
- }
- grd_clbsmast.refresh();
-
- }
- // ----------------------------------
- // ▶추가청구시 추가청구 max차수 조회
- // ----------------------------------
- function fGetMaxClamdg() {
- var makeflag = model.getValue("/root/send/item1/makeflag");
- // "추가청구"일경우에는 최종 청구차수를 조회한다.
- if (makeflag == "4") {
- model.makeValue("/root/send/item1/clamflag", "2");
- if (submit("TRPID20602")) {
- model.setValue("/root/send/item1/t_clamdg", model.getValue("/root/hidden/item1/maxclamdg"));
- model.refreshpart("/root/send/item1/t_clamdg");
- }
- }
- }
|