123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793 |
- /* =================================================================================================
- - 외래등록 PMO001.js
- - 작성자 : 유정란
- - 작성시작일자 : 2007.03.13
- ================================================================================================== */
- var gs_olnw = "O" ; //구환 'O' 신환 'N'
- var gs_fdrc = "R" ; //신환 'F' 초진 'D' 재진 'R'
- var gs_rgtp = "OO"; //접수구분 + 진료형태(외래[O],응급[E])
- var gs_prcs = "0" ; //처리단계
- var init_ptbs;
- var init_otpt;
- var init_ptin;
- //var init_ptdc;
- var init_opmi;
- var init_oscl;
- var grid_init_h_ptsp;
- var grid_init_h_otpt;
- var grid_init_h_unco;
- var grid_init_h_card;
- var grid_init_h_dcgm;
- var grid_init_h_dcgm2;
- var grid_init_h_cnst;
- var grid_init_h_inbs;
- var grid_init_h_hndc;
- var grid_init_h_cash;
- var grid_init_h_onln;
- var grid_init_m_ptin;
- //var grid_init_m_ptdc;
- var grid_init_m_otpt;
- var grid_init_m_opmi;
- var grid_init_m_oscl;
- var grid_init_m_card;
- var grid_init_m_cash;
- var grid_init_m_dcgm;
- var grid_init_c_otpt;
- var grid_init_t_otpt;
- /**---------------------------------------------------
- * @desc : 단일구조 인스턴스 초기화
- * @---------------------------------------------------
- */
- function fOneInstanceReset(gubn){
- if (gubn == "ptbs") {
- model.resetInstanceNode("/root/main/ptbs");
- model.resetInstanceNode("/root/main/patinfo");
- }
- else if (gubn == "ptin") model.resetInstanceNode("/root/main/ptin");
- //else if (gubn == "ptdc") model.resetInstanceNode("/root/main/ptdc");
- else if (gubn == "otpt") model.resetInstanceNode("/root/main/otpt");
- else if (gubn == "opmi") model.resetInstanceNode("/root/main/opmi");
- else if (gubn == "all"){
- model.resetInstanceNode("/root/main/ptbs");
- model.resetInstanceNode("/root/main/patinfo");
- model.resetInstanceNode("/root/main/ptin");
- //model.resetInstanceNode("/root/main/ptdc");
- model.resetInstanceNode("/root/main/otpt");
- model.resetInstanceNode("/root/main/otpt_old");
- model.resetInstanceNode("/root/main/opmi");
- model.resetInstanceNode("/root/main/aipm");
- model.resetInstanceNode("/root/main/icpm");
- model.resetInstanceNode("/root/hidden/com");
- model.resetInstanceNode("/root/hidden/flag");
-
- //2015/05/07 이정택 추가
- model.resetInstanceNode("/root/main/oscl");
- model.resetInstanceNode("/root/main/bogj");
- model.resetInstanceNode("/root/main/h_chrt");
- model.resetInstanceNode("/root/send");
- model.resetInstanceNode("/root/temp");
- model.resetInstanceNode("/root/cmp");
- model.resetInstanceNode("/root/hidden/temp");
- model.resetInstanceNode("/root/hidden/rcv");
- model.resetInstanceNode("/root/send2");
- model.resetInstanceNode("/root/jinchalryotemp");
- model.resetInstanceNode("/root/hidden/rcv");
- model.resetInstanceNode("/root/checkdrscheSend");
- //2015/05/07 이정택 추가
-
- }
-
- //각종 버튼 color 초기화, 콤보박스 활성화 여부, 버튼 활성화 여부
-
- //선택진료여부 버튼 활성화
- rdo_specordyn.disabled = false;
-
- //특이환자여부 버튼색 초기화
- btn_patspcfyn.attribute("background-color") = "#c0c0c0";
- }
- /**---------------------------------------------------
- * @desc : 멀티구조 인스턴스 초기화
- * @---------------------------------------------------
- */
- function fMultiInstanceReset(){
- model.removeNodeset("/root/main/h_otpt/otpt");
- model.removeNodeset("/root/main/h_unco/unco"); //error
- model.removeNodeset("/root/main/h_card/card"); //error
- model.removeNodeset("/root/main/h_dcgm/dcgm"); //error
- model.removeNodeset("/root/main/h_dcgm2/dcgm");
- model.removeNodeset("/root/main/h_cash/cash"); //error
- model.removeNodeset("/root/main/h_onln/onln");
-
- model.removeNodeset("/root/main/h_ptsp/ptsp");
- model.removeNodeset("/root/main/h_cnst/cnst"); //error
- model.removeNodeset("/root/main/h_srdg/srdg");
- //model.removeNodeset("/root/main/h_inbs/inbs");
- //model.removeNodeset("/root/main/h_jabo/jabo");
- model.removeNodeset("/root/main/h_hndc/hndc");
-
- model.removeNodeset("/root/main/m_ptin/ptin");
- //model.removeNodeset("/root/main/m_ptdc/ptdc");
- model.removeNodeset("/root/main/m_otpt/otpt");
- model.removeNodeset("/root/main/m_opmi/opmi");
- model.removeNodeset("/root/main/m_oscl/oscl");
- model.removeNodeset("/root/main/m_card/card");
- model.removeNodeset("/root/main/m_cash/cash");
- model.removeNodeset("/root/main/m_dcgm/dcgm");
-
- model.removeNodeset("/root/main/c_otpt/otpt");
- model.removeNodeset("/root/main/t_otpt/otpt");
- }
- /**---------------------------------------------------
- * @desc : 단일 인스턴스 backup
- * @---------------------------------------------------
- */
-
- function fOneInstanceBackUp(){
- init_ptbs = instance1.selectSingleNode("/root/main/ptbs").xml;
- init_otpt = instance1.selectSingleNode("/root/main/otpt").xml;
- init_ptin = instance1.selectSingleNode("/root/main/ptin").xml;
- //init_ptdc = instance1.selectSingleNode("/root/main/ptdc").xml;
- init_opmi = instance1.selectSingleNode("/root/main/opmi").xml;
- init_oscl = instance1.selectSingleNode("/root/main/oscl").xml;
- }
- /**---------------------------------------------------
- * @desc : 멀티 인스턴스 backup
- * @---------------------------------------------------
- */
-
- function fMultiInstanceBackUp(){
- grid_init_h_otpt = instance1.selectSingleNode("/root/main/h_otpt");
- grid_init_h_unco = instance1.selectSingleNode("/root/main/h_unco");
- grid_init_h_card = instance1.selectSingleNode("/root/main/h_card");
- grid_init_h_dcgm = instance1.selectSingleNode("/root/main/h_dcgm");
- grid_init_h_dcgm2 = instance1.selectSingleNode("/root/main/h_dcgm2");
- grid_init_h_cash = instance1.selectSingleNode("/root/main/h_cash");
- grid_init_h_onln = instance1.selectSingleNode("/root/main/h_onln");
- grid_init_h_ptsp = instance1.selectSingleNode("/root/main/h_ptsp");
- grid_init_h_cnst = instance1.selectSingleNode("/root/main/h_cnst");
- grid_init_h_srdg = instance1.selectSingleNode("/root/main/h_srdg");
-
- grid_init_m_ptin = instance1.selectSingleNode("/root/main/m_ptin");
- //grid_init_m_ptdc = instance1.selectSingleNode("/root/main/m_ptdc");
- grid_init_m_otpt = instance1.selectSingleNode("/root/main/m_otpt");
- grid_init_m_opmi = instance1.selectSingleNode("/root/main/m_opmi");
- grid_init_m_oscl = instance1.selectSingleNode("/root/main/m_oscl");
- grid_init_m_card = instance1.selectSingleNode("/root/main/m_card");
- grid_init_m_cash = instance1.selectSingleNode("/root/main/m_cash");
- grid_init_m_dcgm = instance1.selectSingleNode("/root/main/m_dcgm");
-
- grid_init_c_otpt = instance1.selectSingleNode("/root/main/c_otpt");
- grid_init_t_otpt = instance1.selectSingleNode("/root/main/t_otpt");
- }
- /**---------------------------------------------------
- * @desc : 멀티 인스턴스 Copy
- * @---------------------------------------------------
- */
- function fMultiInstanceCopy(){
-
- var curNode_otpt = instance1.selectSingleNode("/root/main/h_otpt");
- if(curNode_otpt != null)
- model.removeNodeset("/root/main/h_otpt/otpt");
-
- //grid1.rebuild();
-
- var curNode_unco = instance1.selectSingleNode("/root/main/h_unco");
- if(curNode_unco != null)
- model.removeNodeset("/root/main/h_unco/unco");
-
- var curNode_card = instance1.selectSingleNode("/root/main/h_card");
- if(curNode_card != null)
- model.removeNodeset("/root/main/h_card/card");
-
- var curNode_dcgm = instance1.selectSingleNode("/root/main/h_dcgm");
- if(curNode_dcgm != null)
- model.removeNodeset("/root/main/h_dcgm/dcgm");
-
- var curNode_dcgm2 = instance1.selectSingleNode("/root/main/h_dcgm2");
- if(curNode_dcgm2 != null)
- model.removeNodeset("/root/main/h_dcgm2/dcgm");
-
- var curNode_cash = instance1.selectSingleNode("/root/main/h_cash");
- if(curNode_cash != null)
- model.removeNodeset("/root/main/h_cash/cash");
-
- var curNode_onln = instance1.selectSingleNode("/root/main/h_onln");
- if(curNode_onln != null)
- model.removeNodeset("/root/main/h_onln/onln");
-
- var curNode_cnst = instance1.selectSingleNode("/root/main/h_cnst");
- if(curNode_cnst != null)
- model.removeNodeset("/root/main/h_cnst/cnst");
-
- //var curNode_inbs = instance1.selectSingleNode("/root/main/h_inbs");
- //if(curNode_inbs != null)
- // model.removeNodeset("/root/main/h_inbs/inbs");
- var curNode_srdg = instance1.selectSingleNode("/root/main/h_srdg");
- if(curNode_srdg != null)
- model.removeNodeset("/root/main/h_srdg/srdg");
- //var curNode_jabo = instance1.selectSingleNode("/root/main/h_jabo");
- //if(curNode_jabo != null)
- // model.removeNodeset("/root/main/h_jabo/jabo");
-
- //grid2.Rebuild();
-
- var curNode_hndc = instance1.selectSingleNode("/root/main/h_hndc");
- if(curNode_hndc != null)
- model.removeNodeset("/root/main/h_hndc/hndc");
-
- var curNode_ptsp = instance1.selectSingleNode("/root/main/h_ptsp");
- if(curNode_ptsp != null)
- model.removeNodeset("/root/main/h_ptsp/ptsp");
-
- //model.removeNodeset("/root/main/h_inpt");
-
- //model.removeNodeset("/root/main/h_inpt2");
-
- var curNode_m_ptin = instance1.selectSingleNode("/root/main/m_ptin");
- if(curNode_m_ptin != null)
- model.removeNodeset("/root/main/m_ptin/ptin");
-
- //var curNode_m_ptdc = instance1.selectSingleNode("/root/main/m_ptdc");
- // if(curNode_m_ptdc != null)
- // model.removeNodeset("/root/main/m_ptdc/ptdc");
-
- var curNode_m_otpt = instance1.selectSingleNode("/root/main/m_otpt");
- if(curNode_m_otpt != null)
- model.removeNodeset("/root/main/m_otpt/otpt");
-
- var curNode_m_opmi = instance1.selectSingleNode("/root/main/m_opmi");
- if(curNode_m_opmi != null)
- model.removeNodeset("/root/main/m_opmi/opmi");
-
- var curNode_m_oscl = instance1.selectSingleNode("/root/main/m_oscl");
- if(curNode_m_oscl != null)
- model.removeNodeset("/root/main/m_oscl/oscl");
-
- var curNode_m_card = instance1.selectSingleNode("/root/main/m_card");
- if(curNode_m_card != null)
- model.removeNodeset("/root/main/m_card/card");
-
- var curNode_m_cash = instance1.selectSingleNode("/root/main/m_cash");
- if(curNode_m_cash != null)
- model.removeNodeset("/root/main/m_cash/cash");
-
- var curNode_m_dcgm = instance1.selectSingleNode("/root/main/m_dcgm");
- if(curNode_m_dcgm != null)
- model.removeNodeset("/root/main/m_dcgm/dcgm");
-
- var curNode_c_otpt = instance1.selectSingleNode("/root/main/c_otpt");
- if(curNode_c_otpt != null)
- model.removeNodeset("/root/main/c_otpt/otpt");
-
- //2008-01-10 이동식 추가 - 당일접수내역 초기화
- var curNode_t_otpt = instance1.selectSingleNode("/root/main/t_otpt");
- if(curNode_t_otpt != null)
- model.removeNodeset("/root/main/t_otpt/otpt");
- }
- /**---------------------------------------------------
- * @desc : 기본 데이터 초기화
- * : 각 단위별로 초기화 가능하도록 함수 분리
- * @---------------------------------------------------
- */
- function fBaseDataInit(gubn){
- gs_olnw = "O" ; //구환 'O' 신환 'N'
- gs_fdrc = "R" ; //신환 'F' 초진 'D' 재진 'R'
- gs_rgtp = "OO"; //접수구분 + 진료형태(외래[O],응급[E])
- gs_prcs = "0" ; //처리단계
-
- //com, ptbs, otpt, ptin, ptdc, opmi
- if (gubn == "com") fBaseDataInitCom();
- else if (gubn == "ptbs") fBaseDataInitPtbs();
- else if (gubn == "otpt") fBaseDataInitOtpt();
- else if (gubn == "ptin") fBaseDataInitPtin();
- //else if (gubn == "ptdc") fBaseDataInitPtdc();
- else if (gubn == "opmi") fBaseDataInitOpmi();
- else if (gubn == "all"){
- fBaseDataInitCom();
- fBaseDataInitPtbs();
- fBaseDataInitOtpt();
- fBaseDataInitPtin();
- //fBaseDataInitPtdc();
- if (instance1.selectSingleNode("/root/main/opmi/opmi_payamt") != null) fBaseDataInitOpmi();
-
- cmb_suppkind.disabled = true;
- cmb_suppkindresn.disabled = true;
- cmb_medamtfreeresn.disabled = true;
- cmb_fsexamflag.disabled = true;
-
- btn_calcscorcalc.disabled = false;
- btn_save.disabled = true;
- btn_updt.disabled = true;
- btn_cncl.disabled = false;
-
- btn_stat.attribute("background-color") = "#c0c0c0";
-
- //btn_otpt.selected = false;
- //btn_m_otpt.selected = true;
- //btn_c_otpt.selected = false;
- //model.toggle("case6");
-
- //2016/07/18 치과 화면 초기화시 카드가 선택되도록 요청함에 따라서 기준자료로 체크하도록 수정(이정택)
- var chk_value= model.getValue("/root/paminit/P6587list/P6587[cdid='01']/cdnm");
- if(isNull(chk_value)){
- model.makeValue("/root/hidden/com/cardcashflag" , "C"); //Y-카드, N-현금영수증, C-현금
- }else{
- model.makeValue("/root/hidden/com/cardcashflag" , chk_value); //Y-카드, N-현금영수증, C-현금
- }
- //model.setValue("/root/hidden/com/cardcashflag" , "C"); //Y-카드, N-현금영수증, C-현금
- model.setValue("/root/hidden/com/cash_indinstflag" , "00"); //00-소득공제, 01-지출증비, 02-미승인
- //20100401 현금영수증 의무화
- //rdo_indyn.disabled = true;
-
- model.setFocus("ipt_pid");
-
- //필요에 따라 추가
- }
- }
- function fBaseDataInitCom(){
- //그대로 사용할지 미정 FInit_detail0()
-
- //진료시간 세팅
- model.setValue("/root/main/otpt/otpt_ordtm",(getCurrentTime()).substring(0,4));
-
- model.setValue("/root/hidden/com/menu_erflag","");
-
- //2009-06-06 이동식 수정 - 환자카드발행 구분을 원무공통코드 'P0022' 에 넣고 관리함.
- if( model.getValue("/root/init/P0022/P0022list[cd = '110']/nm") != 'N' ){
- model.setValue("/root/hidden/com/idcard","Y");
- }
- model.setValue("/root/hidden/com/rcptpapr","Y");
- model.setValue("/root/hidden/com/engrcptpapr","");
- model.setValue("/root/hidden/com/orgflag","N"); //영수증 원본이 디폴트
- model.setValue("/root/hidden/com/histstat","R");
- //2008-11-27 이동식추가
- //자격조회 유무
- //2009-07-27 이동식 수정 - 자격조회여부를 원무공통코드 'P0022' 에 넣고 관리함.
- if( model.getValue("/root/init/P0022/P0022list[cd = '150']/nm") != 'N' ){
- model.setValue("/root/hidden/com/searchInsuInfoYN", 'Y');
- }
- model.setValue("/root/hidden/com/rsrvdesc","당일접수");
-
- //임의감면, 미수액 코드 초기화.
- model.resetInstanceNode("/root/hidden/m_etc");
-
- //현금영수증 자동승인 여부
- if( model.getValue("/root/init/P0022/P0022list[cd = '160' ]/nm") == 'Y'){
- model.setValue("/root/hidden/com/autocashyn", model.getvalue("/root/init/P0022/P0022list[cd = '160' ]/nm"));
-
- }
- }
- function fBaseDataInitPtbs(){
- model.setValue("/root/main/ptbs/ptbs_engnm","-");
- model.setValue("/root/main/ptbs/ptbs_chinm","-");
- model.setValue("/root/main/ptbs/ptbs_btype","-");
- model.setValue("/root/main/ptbs/ptbs_rh","-");
- model.setValue("/root/main/ptbs/ptbs_hometel","-");
- model.setValue("/root/main/ptbs/ptbs_mpphontel","-");
- model.setValue("/root/main/ptbs/ptbs_etctel1","-");
- model.setValue("/root/main/ptbs/ptbs_etctel2","-");
- model.setValue("/root/main/ptbs/ptbs_zipcd1","000");
- model.setValue("/root/main/ptbs/ptbs_zipcd2","00");
- model.setValue("/root/main/ptbs/ptbs_zipcdseq","1");
- model.setValue("/root/main/ptbs/ptbs_highaddr","-");
- model.setValue("/root/main/ptbs/ptbs_detladdr","-");
- model.setValue("/root/main/ptbs/ptbs_recmerrela","-");
- model.setValue("/root/main/ptbs/ptbs_viprem","-");
- model.setValue("/root/main/ptbs/ptbs_inhospyn","N");
- model.setValue("/root/hidden/flag/ptbs_flag","-");
- }
- function fBaseDataInitOtpt(){
- model.setValue("/root/main/otpt/otpt_orddeptcd","-"); //진료과
- model.setValue("/root/main/otpt/otpt_orddrid","-"); //진료의사
- model.setValue("/root/main/otpt/otpt_orddd",PMO001_TODAY); //진료일자
- model.setValue("/root/main/otpt/otpt_ordtype","O"); //진료형태 =>공통코드 참조
- model.setValue("/root/main/otpt/otpt_specordyn","N"); //선택진료여부
- model.setValue("/root/main/otpt/otpt_mskind","M"); //주부유형
- model.setValue("/root/main/otpt/otpt_insucd","-"); //보험자기호
- model.setValue("/root/main/otpt/otpt_insukind","-"); //보험유형
- model.setValue("/root/main/otpt/otpt_suppkind","00"); //보조유형
- model.setValue("/root/main/otpt/otpt_suppkindresn","-"); //보조유형사유
- model.setValue("/root/main/otpt/otpt_medamtestmyn","Y"); //진찰료산정여부
- model.setValue("/root/main/otpt/otpt_medamtfreeresn","00"); //진찰료미산정사유
- model.setValue("/root/main/otpt/otpt_medamtpostyn","N"); //진찰료선후불 => 확인필요 N 선불, Y 후불
- //2015/08/17 이정택 주석처리(멀티 입력추가 후 재진으로 초재진 돌아가는 현상 수정)
- //model.setValue("/root/main/otpt/otpt_fsexamflag","R"); //초재진
- //2015/08/17 이정택 주석처리
- model.setValue("/root/main/otpt/otpt_hosoutexptresncd","00"); //분업예외
- model.setValue("/root/main/otpt/otpt_updtcnclresn","-"); //변경취소사유
- model.setValue("/root/main/otpt/otpt_disccd","-"); //할인
- model.setValue("/root/main/otpt/otpt_etcordflag","-"); //연속/기타구분
- model.setValue("/root/main/otpt/otpt_calcmthdflag","N"); //수가계산형태 : 개별
- model.setValue("/root/main/otpt/otpt_calcbaseflag",""); //계산기준 : 진료일자, 실시일자 => 확인필요
- model.setValue("/root/main/otpt/otpt_clincstdyacptflag","N"); //임상시험(연구용)
- //2007.07.28 이동식 추가
- model.setValue("/root/main/otpt/otpt_chrtlendyn","Y"); //차트대출여부
- model.setValue("/root/hidden/flag/otpt_flag","-");
- model.setValue("/root/main/otpt/otpt_handicaprbookpossnyn","N");
- model.setValue("/root/main/otpt/otpt_outercdrgstyn","N");
- //2007-10-18 이동식 추가
- model.setValue("/root/main/otpt/otpt_ordreqformflag", "-"); //수급절차 - '-'
- }
- function fBaseDataInitPtin(){
- model.setValue("/root/main/ptin/ptin_insukind","-");
- model.setValue("/root/main/ptin/ptin_insucd","-");
- model.setValue("/root/main/ptin/ptin_insunm","-");
- model.setValue("/root/main/ptin/ptin_insuno","-");
- model.setValue("/root/main/ptin/ptin_insdnm","-");
- model.setValue("/root/main/ptin/ptin_insdrrgstno1","-");
- model.setValue("/root/main/ptin/ptin_insdrrgstno2","-");
- model.setValue("/root/main/ptin/ptin_insdrela","-");
- model.setValue("/root/main/ptin/ptin_fromdd",PMO001_TODAY);
- model.setValue("/root/main/ptin/ptin_todd",PMO001_MAXDATE);
- model.setValue("/root/hidden/flag/ptin_flag","-");
- }
- //function fBaseDataInitPtdc(){
- // model.setValue("/root/main/ptdc/ptdc_disccd","-"); //할인코드
- // //model.setValue("/root/main/ptdc/ptdc_disccd2","-"); //할인코드2 : 코드입력값
- // model.setValue("/root/main/ptdc/ptdc_discflag","D"); //할인구분 : 공통코드 확인후 세팅 필요
- // model.setValue("/root/main/ptdc/ptdc_disccls","-"); //할인분류구분 : 공통코드 확인후 세팅 필요
- // model.setValue("/root/main/ptdc/ptdc_fromdd",PMO001_TODAY); //시작일자
- // model.setValue("/root/main/ptdc/ptdc_todd",PMO001_MAXDATE); //종료일자
- // model.setValue("/root/main/ptdc/ptdc_empid","-"); //직원사번
- // model.setValue("/root/main/ptdc/ptdc_emprela","-"); //직원과의 관계
- // model.setValue("/root/main/ptdc/ptdc_discappacptyn","N"); //할인신청서접수여부
- // model.setValue("/root/main/ptdc/ptdc_profacptyn","N"); //증명서접수여부
- // model.setValue("/root/main/ptdc/ptdc_profacptdd","-"); //증명서접수일자
- // model.setValue("/root/main/ptdc/ptdc_remfact","-"); //참고사항
- // model.setValue("/root/hidden/flag/ptdc_flag","-");
- //}
- function fBaseDataInitOpmi(){
- model.setValue("/root/main/opmi/opmi_payamt","0");
- model.setValue("/root/main/opmi/opmi_payownbamt","0");
- model.setValue("/root/main/opmi/opmi_payinsubamt","0");
- model.setValue("/root/main/opmi/opmi_handcapfund","0");
- model.setValue("/root/main/opmi/opmi_procsubtamt","0");
- model.setValue("/root/main/opmi/opmi_ersubtamt","0");
- model.setValue("/root/main/opmi/opmi_nopyamt","0");
- model.setValue("/root/main/opmi/opmi_specamt","0");
- model.setValue("/root/main/opmi/opmi_discamt","0");
- model.setValue("/root/main/opmi/opmi_reduamt","0");
- model.setValue("/root/main/opmi/opmi_bloddiscamt","0");
- model.setValue("/root/main/opmi/opmi_totownbamt","0");
- model.setValue("/root/main/opmi/opmi_precardamt","0");
- model.setValue("/root/main/opmi/opmi_precashamt","0");
- model.setValue("/root/main/opmi/opmi_preonlineamt","0");
- model.setValue("/root/main/opmi/opmi_mdlrcptamt","0");
- model.setValue("/root/main/opmi/opmi_premdlrcptamt","0");
- model.setValue("/root/main/opmi/opmi_uncoamt","0");
- model.setValue("/root/main/opmi/opmi_cashamt","0");
- model.setValue("/root/main/opmi/opmi_cardamt","0");
- model.setValue("/root/main/opmi/opmi_onlineamt","0");
- model.setValue("/root/main/opmi/opmi_restamt","0");
- model.setValue("/root/main/opmi/opmi_paydepoamt","0"); //납입금
-
- model.setValue("/root/main/opmi/opmi_totamt","0");
- model.setValue("/root/main/opmi/opmi_totnopyamt","0");
- model.setValue("/root/main/opmi/opmi_subtamt","0");
- model.setValue("/root/main/opmi/opmi_totreduamt","0");
-
- model.setValue("/root/main/opmi/opmi_pregdmndamt","0");
- model.setValue("/root/main/opmi/opmi_prepregdmndamt","0");
-
- model.setValue("/root/main/opmi/opmi_suppamt","0");
- model.setValue("/root/main/opmi/opmi_heallifeamtclamamt","0");
-
- //20090701 1.단수처리 고시적용
- model.setValue("/root/main/opmi/opmi_payinsurestamt","0");
- model.setValue("/root/main/opmi/opmi_payownbamt100","0");
- model.setValue("/root/main/opmi/opmi_payinsubamt100","0");
- model.setValue("/root/main/opmi/opmi_totownbamt100","0");
-
- // 20110701 미용목적성형 부가가치세 적용
- model.setValue("/root/main/opmi/opmi_taxamt","0");
-
- if (instance1.selectSingleNode("/root/main/opmi/opmi_targetamt") == null)
- {
- model.makeNode("/root/main/opmi/opmi_targetamt");
- }
-
- model.setValue("/root/main/opmi/opmi_targetamt","0");
-
- model.setValue("/root/main/opmi/opmi_paypsnflag","1"); //납부자 세팅 : 본인
-
- model.setValue("/root/hidden/flag/opmi_flag","-");
- }
- //재원환자인지 체크합니다.2007/05/22 조영상
- function fInhospynCheck()
- {
- if (model.getValue("/root/main/ptbs/ptbs_inhospyn") == "M"){
- //보험유형이 일반인 경우에는 메세지로 확인 후 접수 가능하게 한다.
- if( model.getValue("/root/main/otpt/otpt_insukind") == gsInsu_IlBan){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 입원수납할 내역이 있습니다. \n입원수납 후 진행하세요!","I999","");
- /*
- var retValue = messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 입원수납할 내역이 있습니다. \n입원수납 후 진행하세요! 계속 진행 하시겠습니까?","Q999","");
- if( retValue != '6' ){
- return false;
- }
- */
- }else{
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 입원수납할 내역이 있습니다. \n입원수납 후 진행하세요!","E999","");
- //return false;
- }
-
- }else if (model.getValue("/root/main/ptbs/ptbs_inhospyn") == "I")
- {
- //보험유형이 일반인 경우에는 메세지로 확인 후 접수 가능하게 한다.
- if( model.getValue("/root/main/otpt/otpt_insukind") == gsInsu_IlBan){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 현재 재원 중입니다!","I999","");
- /*
- var retValue = messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 현재 재원 중입니다! 계속 진행 하시겠습니까?","Q999","");
- if( retValue != '6' ){
- return false;
- }
- */
- }else{
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 현재 재원 중입니다!","E999","");
- //return false;
- }
-
- }else if (model.getValue("/root/main/ptbs/ptbs_inhospyn") == "D")
- {
- if( model.getValue("/root/main/otpt/otpt_insukind") == gsInsu_IlBan){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일 DSC/CHEMO 환자입니다!","I999","");
- /*
- var retValue = messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일 DSC/CHEMO 환자입니다! 계속 진행 하시겠습니까?","Q999","");
- if( retValue != '6' ){
- return false;
- }
- */
- }else{
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일 DSC/CHEMO 환자입니다! 입원수납에서 수납하세요!","E999","");
- //return false;
- }
- }else if (model.getValue("/root/main/ptbs/ptbs_inhospyn") == "E")
- {
- if( model.getValue("/root/main/otpt/otpt_insukind") == gsInsu_IlBan){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 응급 환자입니다!","I999","");
- /*
- var retValue = messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 응급 환자입니다! 계속 진행 하시겠습니까?","Q999","");
- if( retValue != '6' ){
- return false;
- }
- */
- }else{
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 응급 환자입니다!","E999","");
- //return false;
- }
-
- //2009-06-26 이동식 추가
- //가퇴원환자 메세지
- }else if (model.getValue("/root/main/ptbs/ptbs_inhospyn") == "T"){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 가퇴원 환자(퇴원심사 미완료) 입니다!","E999","");
- //return false;
- }else if (model.getValue("/root/main/ptbs/ptbs_inhospyn") == "R"){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 가퇴원 환자(퇴원심사 완료) 입니다!","E999","");
- //return false;
-
- //2008-08-22 이동식 추가 - 외료요율 퇴원환자인 경우 체크 제외
- }else if(model.getValue("/root/main/ptbs/ptbs_tdaydsch") == "I" && model.getValue("/root/main/otpt/otpt_orddd") == getCurrentDate() ){
- //가정간호 당일 퇴원환자 가접수가능
- //20080624 이동식 수정 - 김숙인 선생님 변경 요청 '당일 퇴원 환자' 접수 기능 삭제
- //if( model.getValue("/root/main/otpt/otpt_etcordflag") != 'N' ){
-
- if( model.getValue("/root/main/otpt/otpt_insukind") == gsInsu_IlBan){
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일퇴원환자입니다!","I999","");
- /*
- var retValue = messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일퇴원환자입니다! 계속 진행 하시겠습니까?","Q999","");
- if( retValue != '6' ){
- return false;
- }
- */
- }else{
- messageBox("확인! " + model.getValue("/root/main/ptbs/ptbs_hngnm") + " 환자는 당일퇴원환자입니다!","E999","");
- //return false;
- }
-
- //}
- }
-
- return true;
- }
- //function fDiscCDSelect()
- //{
- // //할인 적용했다가 해제하는 경우 : disccd 체크
- // var ptdc_disccd = model.getValue("/root/main/ptdc/ptdc_disccd");
- //
- // //model.setValue("/root/main/ptdc/ptdc_disccd2",ptdc_disccd);
- // model.refresh();
- //
- // if (gs_olnw == "O")
- // {
- // var ptbs_pid = model.getValue("/root/main/ptbs/ptbs_pid");
- //
- // if (ptdc_disccd != "" && ptdc_disccd != " " && ptdc_disccd != null && ptdc_disccd != "-")
- // {
- // fDiscCDRef(ptbs_pid,ptdc_disccd,"D");
- // model.setValue("/root/main/otpt/otpt_disccd",model.getValue("/root/main/ptdc/ptdc_disccd"));
- // model.setValue("/root/main/ptdc/ptdc_disccls","D");
- //
- // }
- // else
- // {
- // model.setValue("/root/main/otpt/otpt_disccd",model.getValue("/root/main/ptdc/ptdc_disccd"));
- // model.setValue("/root/main/ptdc/ptdc_empid","-");
- // //model.setValue("/root/main/ptdc/ptdc_empnm","-"); //2007-09-21 이동식 수정 - 존재하지 않는 노드!!!
- // //직원근무부서삭제
- // model.setValue("/root/main/ptdc/ptdc_emprela","-");
- // //model.setValue("/root/main/ptdc/ptdc_empexstflag","-"); //재직여부
- // model.setValue("/root/main/ptdc/ptdc_fromdd",PMO001_TODAY);
- // model.setValue("/root/main/ptdc/ptdc_todd",PMO001_MAXDATE);
- // model.setValue("/root/main/ptdc/ptdc_discappacptyn","N");
- // model.setValue("/root/main/ptdc/ptdc_profacptyn","N");
- // }
- // }
- // else
- // {
- // if (ptdc_disccd != "" && ptdc_disccd != " " && ptdc_disccd != null && ptdc_disccd != "-")
- // {
- // model.setValue("/root/main/otpt/otpt_disccd",model.getValue("/root/main/ptdc/ptdc_disccd"));
- // }
- // else
- // {
- // model.setValue("/root/main/otpt/otpt_disccd",model.getValue("/root/main/ptdc/ptdc_disccd"));
- // model.setValue("/root/main/ptdc/ptdc_empid","-");
- // model.setValue("/root/main/ptdc/ptdc_empnm","-");
- // //직원근무부서삭제
- // model.setValue("/root/main/ptdc/ptdc_emprela","-");
- // //model.setValue("/root/main/ptdc/ptdc_empexstflag","-"); //재직여부
- // }
- // }
- //
- // model.refresh();
- //}
- function fSuppKindSelect(){
- var otpt_insukind = model.getValue("/root/main/otpt/otpt_insukind");
- var otpt_suppkind = model.getValue("/root/main/otpt/otpt_suppkind");
- if(otpt_suppkind != supp_BASE){
- cmb_suppkindresn.disabled = false;
- }else{
- cmb_suppkindresn.disabled = true;
- //2017/12/18 이정택 추가
- cmb_suppkindresn.value = "-";
- //2017/12/18 이정택 추가
-
- }
-
- if(otpt_suppkind == supp_JABH && (otpt_insukind != gsSanJae && otpt_insukind != gsJaboKind)){
- messageBox("전액 보험자부담은 산재/자보인 경우에만 해당합니다!", "E999", "");
- model.setValue("/root/main/otpt/otpt_suppkind", supp_BASE);
- model.refresh();
- }
-
- /* supp_HANDI = "71" 설정되어있음(PMOCOM.js) 경북대병원 설정값 틀림 임상시험(71)
- if(otpt_insukind == supp_HANDI && otpt_insukind != gsBoHo2){
- messageBox("장애인은 의료급여2종인 경우에만 해당합니다!", "E999", "");
- model.setValue("/root/main/otpt/otpt_suppkind", supp_BASE);
- model.refresh();
- }
- */
- }
- /**
- * 대구 장애인구강진료센터 접수관련 개발
- */
- /*
- function fClinicCheck_Test(){
-
- fClinicCheck_Test("A", "/root/main/ptbs", "/root/main/otpt", "/root/main/h_hndc/hndc", "/root/init");
-
- return;
- var otpt_pid = model.getValue("/root/main/ptbs/ptbs_pid");
- var otpt_orddeptcd = model.getValue("/root/main/otpt/otpt_orddeptcd");
- var hndc_bslvflag = model.getValue("/root/main/h_hndc/hndc/hndc_bslvflag"); // 기초생활수급자
- var hndc_slflag = model.getValue("/root/main/h_hndc/hndc/hndc_slflag"); // 경증 및 중증 플래그
- var uncocd = model.getValue("/root/main/otpt/otpt_uncocd");
- var insukind = model.getValue("/root/main/otpt/otpt_insukind");
-
- if(!(insukind=="11" || insukind=="21" || insukind=="22")){ // 건보, 의료급여 1, 2종에 대해서만 체크하도록 함
- if(uncocd == "A43" || uncocd == "A44" || uncocd == "A45"){
- model.makeValue("/root/hidden/m_etc/uncocd", "");
- model.makeValue("/root/main/otpt/otpt_uncocd", "");
- model.refresh();
- }
- return true;
- }
-
- if(isNull(otpt_pid)){
- messageBox("환자번호가 입력되지 않았습니다.", "E");
- return false;
- }
-
- if(isNull(otpt_orddeptcd)){
- messageBox("진료과가 선택되지 않았습니다.", "E");
- return false;
- }
-
- if(otpt_orddeptcd=="2242400000"){ // 대구장애인구강센터
- // 세개의 미수코드가 종료되었다면 사업이 종료된걸로 판단
- if(getNodesetCount("/root/init/uncocd[cd='A43']")==0 && // 국민기초생활자장애인_50%
- getNodesetCount("/root/init/uncocd[cd='A44']")==0 && // 치과영역중증장애인_30%
- getNodesetCount("/root/init/uncocd[cd='A45']")==0){ // 치과영역경증장애인_10%
- return true;
- }else{
- if(getNodesetCount("/root/main/h_hndc/hndc")==0){
- messageBox("해당 환자는 장애인 등록이 되어 있지 않습니다.\n장애인 등록 후 진행부탁드립니다.", "E");
- btn_hndc.dispatch("DOMActivate");
- if(getNodesetCount("/root/temp/handcappat/handcappatlist[gubun='2']")>0){
- hndc_bslvflag = model.getValue("/root/temp/handcappat/handcappatlist[gubun='2']/hndc_bslvflag");
- hndc_slflag = model.getValue("/root/temp/handcappat/handcappatlist[gubun='2']/hndc_slflag");
- if(hndc_bslvflag == "Y" && insukind=="11"){
- messageBox("건강보험 환자는 기초생활 수급자 장애인으로 등록될 수 없습니다.\n장애인 등록정보를 확인 부탁드립니다.", "E");
- return false;
- }else if(hndc_bslvflag == "Y" && (insukind=="21" || insukind=="22")){
- model.makeValue("/root/hidden/m_etc/uncocd", "A43"); //미수 50%
- model.makeValue("/root/main/otpt/otpt_uncocd", "A43");
- model.refresh();
- return true;
- }else if(hndc_slflag=="S"){ // 중증
- model.makeValue("/root/hidden/m_etc/uncocd", "A44"); //미수 30%
- model.makeValue("/root/main/otpt/otpt_uncocd", "A44");
- model.refresh();
- return true;
- }else if(hndc_slflag=="L"){ // 경증
- model.makeValue("/root/hidden/m_etc/uncocd", "A45"); //미수 10%
- model.makeValue("/root/main/otpt/otpt_uncocd", "A45");
- model.refresh();
- return true;
- }else{
- return true;
- }
- }else{
- messageBox("해당 환자는 장애인 등록이 되어 있지 않습니다.\n장애인 등록 후 진행부탁드립니다.", "E");
- return false;
- }
- }else if(getNodesetCount("/root/main/h_hndc/hndc")>=1){
- if(hndc_bslvflag == "Y" && insukind=="11"){
- messageBox("건강보험 환자는 기초생활 수급자 장애인으로 등록될 수 없습니다.\n장애인 등록정보를 확인 부탁드립니다.", "E");
- return false;
- }else if(hndc_bslvflag == "Y" && (insukind=="21" || insukind=="22")){
- model.makeValue("/root/hidden/m_etc/uncocd", "A43"); //미수 50%
- model.makeValue("/root/main/otpt/otpt_uncocd", "A43");
- model.refresh();
- return true;
- }else if(hndc_slflag=="S"){ // 중증
- model.makeValue("/root/hidden/m_etc/uncocd", "A44"); //미수 30%
- model.makeValue("/root/main/otpt/otpt_uncocd", "A44");
- model.refresh();
- return true;
- }else if(hndc_slflag=="L"){ // 경증
- model.makeValue("/root/hidden/m_etc/uncocd", "A45"); //미수 10%
- model.makeValue("/root/main/otpt/otpt_uncocd", "A45");
- model.refresh();
- return true;
- }else{
- return true;
- }
- }
- }
- }else{
- return true;
- }
- }
- */
|