123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901 |
- // =================================================================================================
- // 입원사후심사 대상자조회 화면(김상진)
- // 수정이력
- // - 2007.03.22 / 정주미
- // - 2008.06.03 / 김상진
- //==================================================================================================
- /* --------------------------------------------------------------------------------------------------
- Fucntion Name || Description
- -----------------------------------------------------------------------------------------------------
- fInitialize : 화면 초기화
- -------------------------------------------------------------------------------------------------- */
- // Global 변수 선언
- 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;
- var gUserid = getUserId();
- // 20100420 환경초기화를 위한 로딩상태 저장
- var gClbsmast_refdata = "";
- var gClbsmast_sizedata = "";
-
- // 화면 open시(와 초기화 버튼 클릭시) 화면 초기화 기능을 수행한다.
- function fInitialize() {
-
-
- // 공통코드를 조회한다.
- // (ZBC001.js) com.ZBCMCODE에서 기초코드 값을 가져와서 Combo 컨트롤 item으로 설정하기 위해 사용한다.
- zbcfGetCodeList(
- new Array("P0008" // 보험유형
- ,"P0010" // 보조유형
- ,"P0151" // 심사상태 / 심사완료여부
- ,"P0291" // 청구분야(진료분야)
- ,"P0319" // 특정기호
- ,"P0155" // 청구구분
- ,"P0430" // 청구완료여부(명세서상태)
- ),
- new Array("/root/init/P0008list"
- ,"/root/init/P0010list"
- ,"/root/init/P0151list"
- ,"/root/init/P0291list"
- ,"/root/init/P0319list"
- ,"/root/init/P0155list"
- ,"/root/init/P0430list"
- ),
- false ); // minimum을 'false'로 설정한 경우에는 코드의 모든속성을 가져온다.
-
- pamfGetCodeList(new Array("P0201"), new Array("/root/init/P0201sublist"));
- pamfGetCodeList(new Array("PK032"), new Array("/root/init/PK032list"));
-
- model.setValue("/root/hidden/item_all/clamym", gCurrentym);
- model.setValue("/root/hidden/item_all/ioflag", "I");
- model.setValue("/root/hidden/item_all/judgid", gUserid );
-
- //---------------------------------------------------------------------------------------------
- // 환경저장 조회부분(환경저장된 컬럼 ref순서대로 colMove시킨다.
- //---------------------------------------------------------------------------------------------
- model.setValue("/root/send/listval/uuee/scrnid", "SMPID20200"); // SMPID20200_입원사후심사대상자조회
-
- // 심사자, 보조유형, 진료의사, 청구과, 진료과, 심사자유무정보 조회
- submit("TRPID20201");
-
- model.removeNodeset("/root/init/judgrid");
- model.removeNodeset("/root/init/suppkind");
- model.removeNodeset("/root/init/orddrid");
- model.removeNodeset("/root/init/orddrid2");
- model.removeNodeset("/root/init/clamdept");
- model.removeNodeset("/root/init/orddeptcd");
- model.removeNodeset("/root/init/orddeptcd2");
- model.removeNodeset("root/init/item3");
- model.removeNodeset("root/init/clamdg");
- model.removeNodeset("/root/init/listval");
-
- model.makeNode("/root/init/judgrid");
- model.makeNode("/root/init/suppkind");
- model.makeNode("/root/init/orddrid");
- model.makeNode("/root/init/orddrid2");
- model.makeNode("/root/init/clamdept");
- model.makeNode("/root/init/orddeptcd");
- model.makeNode("/root/init/orddeptcd2");
- model.makeNode("root/init/item3");
- model.makeNode("root/init/clamdg");
- model.makeNode("root/init/listval");
-
- //----------------------------------------------
- // 20100222 일반의 조회 때문에 추가
- //----------------------------------------------
- model.removeNodeset("/root/init/tmporddrid/orddrid");
- model.makeValue("/root/init/tmporddrid/orddrid/orddridlist/cd","PAM99999");
- model.makeValue("/root/init/tmporddrid/orddrid/orddridlist/nm","일반의(과별)");
- model.makeValue("/root/init/tmporddrid/orddrid/orddridlist/dp","-");
- copyNodeType("/root/init/tmp/orddrid","/root/init/tmporddrid/orddrid","before");
- //----------------------------------------------
- //----------------------------------------------
- // 20100222 진료과선택시 전체의사 때문에 추가
- //----------------------------------------------
- model.removeNodeset("/root/init/tmporddrid/orddrid");
- model.makeValue("/root/init/tmporddrid/orddrid/orddridlist/cd","");
- model.makeValue("/root/init/tmporddrid/orddrid/orddridlist/nm","");
- model.makeValue("/root/init/tmporddrid/orddrid/orddridlist/dp","-");
- copyNodeType("/root/init/tmp/orddrid","/root/init/tmporddrid/orddrid","before");
- //----------------------------------------------
-
- 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/orddrid2", "/root/init/tmp/orddrid2");
- model.copyNode("/root/init/clamdept", "/root/init/tmp/clamdept");
- model.copyNode("/root/init/orddeptcd", "/root/init/tmp/orddeptcd");
- model.copyNode("/root/init/orddeptcd2", "/root/init/tmp/orddeptcd2");
- model.copyNode("root/init/item3", "root/init/tmp/item3");
- model.copyNode("root/init/clamdg", "root/init/tmp/clamdg");
- model.copyNode("root/init/listval", "root/init/tmp/listval");
-
- model.removeNodeset("/root/init/tmp/judgrid");
- model.removeNodeset("/root/init/tmp/suppkind");
- model.removeNodeset("/root/init/tmp/orddrid");
- model.removeNodeset("/root/init/tmp/orddrid2");
- model.removeNodeset("/root/init/tmp/clamdept");
- model.removeNodeset("/root/init/tmp/orddeptcd");
- model.removeNodeset("/root/init/tmp/orddeptcd2");
- model.removeNodeset("root/init/tmp/item3");
- model.removeNodeset("root/init/tmp/clamdg");
- model.removeNodeset("root/init/tmp/listval");
- //-----------------------------------------------------------------------
- // 20100420 환경저장 조회부분 처리전 로딩상태 저장 (환경초기화에서 사용)
- //-----------------------------------------------------------------------
- // 대상자 리스트
- var clbsmast_obj = document.controls.item("grd_clbsmast");
- for (var i = 0; i < clbsmast_obj.cols; i++) {
- var refval = clbsmast_obj.colAttribute(i, "ref");
- gClbsmast_refdata += refval + "^";
- var sizeval = clbsmast_obj.colWidth(i);
- gClbsmast_sizedata += sizeval + "^";
- }
- gClbsmast_refdata = gClbsmast_refdata.substring(0, gClbsmast_refdata.length-1);
- gClbsmast_sizedata = gClbsmast_sizedata.substring(0, gClbsmast_sizedata.length-1);
- //-----------------------------------------------------------------------
- var compsnm = model.getValue("/root/init/listval/uuee/compsnm");
- if (compsnm) { // Grid ID 정보
- // setOrderInfoOfCol("grd_clodhist");
- var refdata = model.getValue("/root/init/listval/uuee/compscnts"); // Grid의 칼럼명
- var sizedata = model.getValue("/root/init/listval/uuee/compssizecnts"); // Grid의 칼럼Size
- var grdobj = document.controls.item(compsnm);
- var refarr = refdata.split("^");
- var sizearr = sizedata.split("^");
- var colcnt = "";
- var size = "";
- for(var i = 0; i < refarr.length; i++) {
- colcnt = grdobj.colref("" + refarr[i] + "");
- if (i != colcnt) {
- grdobj.colMove(i, colcnt, "before",false);
- }
- size = sizearr[i];
- grdobj.colWidth(i) = eval(size);
- }
- grdobj.refresh()
- var caption = ""
- for( var i = 1; i < grdobj.cols ; i++ ){
- if (caption == "") {
- caption = grdobj.textMatrix(0,i);
- } else {
- caption += "^" + grdobj.textMatrix(0,i);
- }
- }
- grdobj.caption = caption;
- }
-
- var patunitsrch1 = model.getValue("/root/send/item1/patunitsrch1");
- // main / send / hidden 데이터를 초기화한다.
- fInitSrchData();
- model.setValue("/root/send/item1/patunitsrch1", patunitsrch1);
- // 사후심사 화면에서 등록번호를 입력하고 Enter 친 경우 해당 환자를 조회하여 보여준다.
- //var patunitsrch1 = model.getValue("/root/send/item1/patunitsrch1");
- if (patunitsrch1) { // 대상자 화면을 취소하고 닫은 후 다시 열때 기존에 심사하던 환자 정보로 다시 조회하지 않도록
- fSetPatUnitSrch1pidSrch();
- }
-
- //model.refresh(); // refresh() 하지 않은 경우 공통코드가 combo 에 매칭되어 표시되지 않음
-
- // 로그인심사자ID Default Setting
- // 2011.01.17 경북대김순애샘요청으로 막음. 진료과로 심사하신다고함
- /*
- if ( model.getValue("/root/init/item3/judgidyn") == "Y" ) {
- model.setValue("/root/send/item1/judgrid", gUserid );
- } else {
- model.setValue("/root/send/item1/judgrid", "" );
- }
- */
- // 청구차수조회위한 청구월, 내원구분셋팅
- model.setValue("/root/send/item1/clamym", gCurrentym);
- model.setValue("/root/send/item1/ioflag", "I");
- cmb_judgrid.refresh();
- cmb_clamdg.select(0);
- cmb_srchcnt.select(0);
- // 심사상태 '미심사(A)'로 Default Setting
- cmb_judgendyn.select(4);
-
- // 삭감처방 조회기준 초기화
- radio2.disabled = false;
- model.setValue("/root/send/item1/cutviewyn", "Y");
- model.setValue("/root/send/item1/cutprcpsel", "1");
- model.refresh(); // refresh() 하지 않은 경우 공통코드가 combo 에 매칭되어 표시되지 않음
- }
- // [SPPIZ00400_상병코드조회.xrw 에서 호출] 상병코드조회 팝업에서 선택한 상병을 상병 그리드에 반영
- function fSetDiagCdNm() {
- var diagcd = model.getValue("/root/hidden/sppiz00400/rslt/diagcd");
- if (diagcd) {
- model.setValue("/root/send/item1/diagcdfr", diagcd);
- model.setValue("/root/send/item1/diagcdto", diagcd);
- model.refreshpart("/root/send/item1/diagcdfr");
- model.refreshpart("/root/send/item1/diagcdto");
- }
- }
- // 수가명칭조회
- function fGetSnglcalcscorcd() {
- //-----------------------------------------------------------------------
- // SMPIC00200_수가조회 parameter setting
- //-----------------------------------------------------------------------
- // 1. 기준일자 : 처방시작일
- var ordfromdd = model.getValue("/root/main/item1/clbs/insukindcd");
- if (ordfromdd) {
- model.setValue("/root/hidden/smpic00200/judgsrch/con1_dd", ordfromdd);
- }
-
- // 2.그룹싱글구분 (G, S)
- model.setValue("/root/hidden/smpic00200/judgsrch/con2_gsflag", "S");
-
- // 3. 검색구분 (수가코드:calcscorcd, EDI코드:edicd, 한글명:hngnm)
- model.setValue("/root/hidden/smpic00200/judgsrch/con3_search1", "hngnm");
-
- // 4. 검색명
- model.setValue("/root/hidden/smpic00200/judgsrch/con4_search2", "");
-
-
- // 5. 보험유형
- var insukindcd = model.getValue("/root/main/item1/clbs/insukindcd");
- if (insukindcd == "11") {
- model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "insu");
- }
- else if (insukindcd == "21" || insukindcd == "22") {
- model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "proc");
- }
- else if (insukindcd == "31") {
- model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "autm");
- }
- else if (insukindcd == "41") {
- model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "indus");
- } else {
- model.setValue("/root/hidden/smpic00200/judgsrch/con5_insu", "insu");
- }
-
- model.removeNodeset("/root/hidden/smpic00200/rslt/mech"); // SMPIC00200_수가조회 에서 선택된 결과가 copyNode되는 경로임
- model.removeNodeset("/root/hidden/smpic00200/rslt/picmmech"); // SMPIC00200_수가조회 에서 선택된 결과가 copyNode되는 경로임
- modal("SMPIC00200", "1", "10", "10", "SMPIC00200", "root/hidden/smpic00200", "/root/temp", "", ""); // SMPIC00200_수가조회.xrw
-
- var mechSelect = instance1.selectSingleNode("/root/temp/mech");
- if (mechSelect == null) { // 선택한 코드가 없는 경우
- messageBox("수가조회 화면에서 선택한 결과가", "I004"); ///수가조회 화면에서 선택한 결과가 없습니다.
- return;
- }
-
- // SMPIC00200_수가조회 화면에서 보낸 결과 값에 대한 처리
- model.makeNode("/root/hidden/smpic00200/rslt/mech");
- model.makeNode("/root/hidden/smpic00200/rslt/picmmech");
- model.copyNode("/root/hidden/smpic00200/rslt/mech", "/root/temp/mech");
- model.copyNode("/root/hidden/smpic00200/rslt/picmmech", "/root/temp/picmmech");
- model.removeNodeset("/root/temp"); // SMPIC00200_수가조회 에서 선택된 결과가 직접 전달되는 경로임
-
- if (model.getValue("/root/hidden/smpic00200/rslt/mech/ordinptflag") != "A") { // 처방입력구분(코드군 P0141) A: 가능
- messageBox("처방이 불가한 코드", "E008"); ///처방이 불가한 코드입니다.
- return;
- }
-
- if (model.getValue("/root/hidden/smpic00200/rslt/mech/grupsnglflag") != "S") { // 그룹코드인 경우의 그룹코드에 속하는 싱글코드를 조회함.
- model.setValue("/root/send/item1/choicdsrch2", model.getValue("/root/hidden/smpic00200/rslt/mech/calcscorcd"));
- } else { // 싱글코드를 선택했을 때
- model.setValue("/root/send/item1/choicdsrch2", model.getValue("/root/hidden/smpic00200/rslt/picmmech/picmmech_calcscorcd"));
- }
-
- model.setValue("/root/send/item1/choicdsrch1", "3");
- rdo_mchrgcode.refresh();
- ipt_choicdsrch.refresh();
-
- }
-
- // main / send / hidden 데이터를 초기화한다.
- function fInitSrchData() {
- // grid를 인스턴스에 mapping후 인스턴스에 해당하는 빈줄 1줄이 생기므로 grid 초기화
- model.removeNodeset("/root/main/list1/clbs");
- // 청구과, 주치의 비활성화
- cmb_clamdeptcd.disabled = false;
- // 전체 청구과를 표시한다.
- cmb_clamdeptcd.choices.itemset.attribute("nodeset") = "/root/init/clamdept/clamdeptlist";
- // 전체 진료과를 표시한다.
- cmb_orddeptcd.choices.itemset.attribute("nodeset") = "/root/init/orddeptcd/orddeptcdlist";
- cmb_orddrid.disabled = true;
- cmb_suppkind.choices.itemset.attribute("nodeset") = "/root/init/P0010list/P0010";
-
- model.resetInstanceNode("/root/send");
- model.resetInstanceNode("/root/hidden");
-
- // 오늘날짜로 청구년월을 표시한다.
- fSetClamym();
- // 조회 조건을 초기화한다.
- model.setValue("/root/send/item1/cmbtotordamt", "3"); // 3: 원이상
- model.setValue("/root/send/item1/cmbownbamt", "3"); // 3: 원이상
- model.setValue("/root/send/item1/choicdsrch1", "4"); // 4: EDI
- //ipt_choicdsrch.attribute("_chartype") = "upper"; // (tfHelper.js) 대문자로 입력을 제한한다.
-
- model.setValue("/root/send/item1/patmode", "1"); // 환자번호로 검색
- model.setValue("/root/send/item1/ioflag", "I");
- // 대상자 Grid의 메모 필드의 Btn 클릭시 보여지는 메모 저장용 Group을 감춘다.
- grp_judgmemo.visible = false;
- }
-
-
- // 청구일자 표시 함수
- function fSetClamym() {
- var today = new Date();
- var baseyear = today.getDateFormat("YYYY"); // (dateHelper.js)에서 제공하는 함수를 사용하여 해당 년를 구한다.
- var basemonth = today.getDateFormat("MM");
- var baseday = today.getDateFormat("DD");
- var currentym = baseyear + basemonth;
- var currentdd = baseyear + basemonth + baseday;
-
- model.setValue("/root/send/item1/clamym", currentym);
- model.setValue("/root/send/item1/clamdg", "");
- model.setValue("/root/hidden/clbs/basedd", currentdd);
- }
-
- // 화면 권한을 설정한다.
- function fCheckAuth() {
- if (!isPopup()) { // (common.js) 자신이 팝업인지 아닌지를 리턴한다.
- model.setValue("properties/auth", "10100000"); // (RXP)팝업이 아닌 경우 처리권한을 부여하지 않는다.
- }
- var pAuth = !checkAuth("P"); // 출력권한(보고서 출력, 엑셀 내려받기 등)
- btn_excelsave.disabled = pAuth;
- btn_print.disabled = pAuth;
-
- var xAuth = !checkAuth("X"); // 처리권한(입력, 수정, 삭제 등)
- btn_confirm.disabled = xAuth;
- btn_cancel.disabled = xAuth;
- }
- // 조회 조건이 올바르게 입력되었는지 체크한다.
- function fCheckSrchCond(srchMode){
- // 환자단위조회를 하는 경우
- if (srchMode == "pidSrch") {
- var patunitsrch1 = model.getValue("/root/send/item1/patunitsrch1").getTrim(); // (stringHelper.js) 문자열 앞뒤에 있는 공백 제거
- var patmode = model.getValue("/root/send/item1/patmode"); // 환자조회시 번호로 할것인지 성명으로 할것인지 결정 - 20090810 박창원
- model.setValue("/root/send/item1/patunitsrch1", patunitsrch1);
- if (patunitsrch1 == "") {
- model.setValue("/root/send/item1/patunitsrch2", "");
- }
- // else if (patunitsrch1.isNumber()) { // (numericHelper.js) 숫자가 입력된 경우 환자번호로 조회한다.
- else if (patmode == "1") { // 환자번호로 조회한다.
- model.setValue("/root/send/item1/patunitsrch2", "pidSrch");
- } else { // 문자가 입력된 경우 환자이름으로 조회한다.
- if (patunitsrch1.length > 1) {
- model.setValue("/root/send/item1/patunitsrch2", "nmSrch");
- } else {
- messageBox("환자단위조회시 검색할 환자이름은 2글자 이상", "C001"); ///환자단위조회시 검색할 환자이름은 2글자 이상 입력하십시오.
- model.setFocus("ipt_patunitsrch");
- model.setValue("/root/send/item1/patunitsrch2", "");
- return false;
- }
- }
- }
- //명세서별로 조회하는 경우
- else if (srchMode == "docuSrch") {
- // 명번호 범위를 확인한다.
- var docuseqno1 = model.getValue("/root/send/item1/docuseqno1");
- var docuseqno2 = model.getValue("/root/send/item1/docuseqno2");
- if (docuseqno1 != "" && docuseqno2 != "") {
- if (docuseqno1 > docuseqno2) {
- messageBox("명번호 검색 시작번호가 끝번호 보다 클 수", "I004"); ///명번호 검색 시작번호가 끝번호 보다 클 수 없습니다.
- return false;
- }
- model.setValue("/root/send/item1/patunitsrch2", "docuSrch");
- return true;
- } else {
- messageBox("명번호를", "C001"); ///명번호를 입력하십시오!
- return false;
- }
- }
- // 환자단위조회를 하지 않는 경우
- else {
- model.setValue("/root/send/item1/patunitsrch2", "");
-
- // 명번호 범위를 확인한다.
- var docuseqno1 = model.getValue("/root/send/item1/docuseqno1");
- var docuseqno2 = model.getValue("/root/send/item1/docuseqno2");
- if (docuseqno1 != "" && docuseqno2 != "") {
- if (docuseqno1 > docuseqno2) {
- messageBox("명번호 검색 시작번호가 끝번호 보다 클 수", "I004"); ///명번호 검색 시작번호가 끝번호 보다 클 수 없습니다.
- return false;
- }
- }
-
- // 총진료비, 본인부담금 입력 범위를 확인한다.
- var totordamt = model.getValue("/root/send/item1/totordamt");
- if (totordamt) {
- if (totordamt > 2147483647) { // java.lang.NumberFormatException: For input string: "2147483648" 에러 발생함
- messageBox("입력 가능한 총진료비 범위를", "E003"); ///입력 가능한 총진료비 범위를 초과하였습니다.
- return false;
- }
- }
- var ownbamt = model.getValue("/root/send/item1/ownbamt");
- if (ownbamt) {
- if (ownbamt > 2147483647) { // java.lang.NumberFormatException: For input string: "2147483648" 에러 발생함
- messageBox("입력 가능한 본인부담금 범위를", "E003"); ///입력 가능한 본인부담금 범위를 초과하였습니다.
- return false;
- }
- }
-
- // 선별심사대상을 설정한다.
- var choicdsrch2 = model.getValue("/root/send/item1/choicdsrch2").getTrim();
- model.setValue("/root/send/item1/choicdsrch2", choicdsrch2);
-
- if (choicdsrch2 != "") {
- var choicdsrch1 = model.getValue("/root/send/item1/choicdsrch1");
- if (choicdsrch1 == "") {
- messageBox("선별심사 조건을 명칭, 수가, EDI 중에", "C002"); ///선별심사 조건을 명칭, 수가, EDI 중에 선택하십시오.
- return false;
- }
- else if (choicdsrch1 == "1") { // 명칭인 경우
- for (var i=0; i < choicdsrch2.length; i++) {
- if (choicdsrch2.charCodeAt(i) > 255) { // 한글이 들어오면 255보다 크다.
- model.setValue("/root/send/item1/choicdsrch1", "2"); // 2: 한글명
- }
- }
- } else { // 수가와 EDI 코드 검색의 경우 대문자로 조건값을 변환한다.
- model.setValue("/root/send/item1/choicdsrch2", choicdsrch2.toUpperCase());
- }
- }
- }
- return true;
- }
- // "조회" Btn 입원사후심사대상자 조회를 요청한다.
- function fGetInAftJudgTrgtManList(srchMode){
- grp_judgmemo.visible = false; // 대상자 Grid의 메모 필드의 Btn 클릭시 보여지는 메모 저장용 Group을 감춘다.
- model.removeNodeset("/root/main/list1/clbs");
-
- if (fCheckSrchCond(srchMode)) {
- // 조회버튼으로 조회 시 offset은 "0"으로 설정하고 submit() 을 수행한다.
- model.setValue("/root/send/item1/lastclamym", "");
- model.setValue("/root/send/item1/lastclamdg", "");
- model.setValue("/root/send/item1/lastjudgno", "");
- model.setValue("/root/send/item1/lastpid", "");
- model.setValue("/root/send/item1/lastpidsn", "");
- model.setValue("/root/send/item1/lastordcd", "");
- model.setValue("/root/send/item1/lastclamkey", "");
- model.setValue("/root/send/item1/lastedilnno", "");
-
- // 페이지 단위 조회시 기존 조회조건이 변경되었는지 체크한다.
- submit("TRPID20202");
-
- // 검색 결과를 표시한다.
- fSetSrchJudgTrgtMan();
- if (getOpenerUID()) { // (common.js) Opener의 UID를 리턴, Opener가 없으면 "" 리턴
- // 대상자 리스트에서 선택된 row를 초기화한다. (대상자조회 pre/next 에서 사용)
- model.resetInstanceNode(opener.root.hidden.smpid20200.rslt.selectedRow);
- }
- //model.refresh();
- grd_clbsmast.refresh();
- }
- }
-
-
- // 사후심사 화면에서 등록번호를 입력하고 Enter 친 경우 해당 환자를 조회하여 보여준다.
- function fSetPatUnitSrch1pidSrch(){
- var patunitsrch1 = opener.model.getValue("/root/hidden/smpid20200/cond/pid");
- if (patunitsrch1 != "") {
- model.removeNodeset("/root/main/list1/clbs");
- grp_judgmemo.visible = false; // 대상자 Grid의 메모 필드의 Btn 클릭시 보여지는 메모 저장용 Group을 감춘다.
- model.setValue("/root/send/item1/patunitsrch1", patunitsrch1);
- model.setValue("/root/send/item1/patunitsrch2", "pidSrch");
- // 조회버튼으로 조회 시 offset은 "0"으로 설정하고 submit() 을 수행한다.
- // model.setValue("/root/send/item1/offset", "0");
- model.setValue("/root/send/item1/lastclamym", "");
- model.setValue("/root/send/item1/lastclamdg", "");
- model.setValue("/root/send/item1/lastjudgno", "");
- model.setValue("/root/send/item1/lastpid", "");
- model.setValue("/root/send/item1/lastpidsn", "");
- model.setValue("/root/send/item1/lastordcd", "");
- model.setValue("/root/send/item1/lastclamkey", "");
- model.setValue("/root/send/item1/lastedilnno", "");
-
- // // 페이지 단위 조회시 기존 조회조건이 변경되었는지 체크한다.
- // model.copyNode("/root/hidden/item1", "/root/send/item1");
- submit("TRPID20202");
- // 검색 결과를 표시한다.
- fSetSrchJudgTrgtMan();
-
- model.setFocus("ipt_patunitsrch");
- model.setValue(opener.root.hidden.smpid20200.rslt.oldPid, patunitsrch1); // 현재 조회된 환자의 등록번호를 저장
- //model.refresh();
- grd_clbsmast.refresh();
- }
- }
-
- // 검색 결과를 표시한다.
- function fSetSrchJudgTrgtMan() {
- // 총건수와 기타 심사상태에 따른 cnt를 표시한다.
- fSetWorkStatCnt();
- // 한글명칭 검색시 Rdo에 선택이 표시되지 않으므로
- if (model.getValue("/root/send/item1/choicdsrch1") == "2") { // 2: 한글명
- model.setValue("/root/send/item1/choicdsrch1", "1");
- }
- var srchmode = model.getValue("/root/hidden/clbs/srchmode");
- if (srchmode == "specclbs") { // 선별심사 모드인 경우
- grd_clbsmast.colHidden(grd_clbsmast.colRef("ordcd")) = false;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("ordnm")) = false;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("payflag")) = false;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("drugqtytims")) = false;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("dayno")) = false;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("orddt")) = false;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("execdt")) = false;
- cap_judgtrgtman.text = "선별심사 대상자";
- } else {
- grd_clbsmast.colHidden(grd_clbsmast.colRef("ordcd")) = true;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("ordnm")) = true;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("payflag")) = true;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("drugqtytims")) = true;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("dayno")) = true;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("orddt")) = true;
- grd_clbsmast.colHidden(grd_clbsmast.colRef("execdt")) = true;
- cap_judgtrgtman.text = "사후심사 대상자";
- }
- var clbsList = instance1.selectSingleNode("/root/main/list1/clbs");
- if (clbsList == null) { // 조회된 대상자가 없는 경우
- model.setValue("/root/send/item1/lastclamym", "");
- model.setValue("/root/send/item1/lastclamdg", "");
- model.setValue("/root/send/item1/lastjudgno", "");
- model.setValue("/root/send/item1/lastpid", "");
- model.setValue("/root/send/item1/lastpidsn", "");
- model.setValue("/root/send/item1/lastordcd", "");
- model.setValue("/root/send/item1/lastclamkey", "");
- model.setValue("/root/send/item1/lastedilnno", "");
-
- // 페이지 단위 조회시 기존 조회조건이 변경되었는지 체크한다.
- model.copyNode("/root/hidden/item1", "/root/send/item1");
- messageBox("검색된 심사대상자가", "I004"); ///검색된 심사대상자가 없습니다.
- return;
- }
- var row = grd_clbsmast.rows - 1;
- model.setValue("/root/send/item1/lastclamym", model.getValue("/root/main/list1/clbs["+ row +"]/clamym"));
- model.setValue("/root/send/item1/lastclamdg", model.getValue("/root/main/list1/clbs["+ row +"]/clamdg"));
- model.setValue("/root/send/item1/lastjudgno", model.getValue("/root/main/list1/clbs["+ row +"]/judgno"));
- model.setValue("/root/send/item1/lastpid", model.getValue("/root/main/list1/clbs["+ row +"]/pid"));
- model.setValue("/root/send/item1/lastpidsn", model.getValue("/root/main/list1/clbs["+ row +"]/pidsn"));
- model.setValue("/root/send/item1/lastordcd", model.getValue("/root/main/list1/clbs["+ row +"]/ordcd"));
- model.setValue("/root/send/item1/lastclamkey", model.getValue("/root/main/list1/clbs["+ row +"]/clamkey"));
- model.setValue("/root/send/item1/lastedilnno", model.getValue("/root/main/list1/clbs["+ row +"]/edilnno"));
- // 페이지 단위 조회시 기존 조회조건이 변경되었는지 체크한다.
- model.copyNode("/root/hidden/item1", "/root/send/item1");
-
- /*
- // 2008-11-10 선별심사 색구분 제회요청(윤영옥선생님)
- clbsList = instance1.selectSingleNode("/root/main/list1"); //root/main/list1
- var clbsNode = clbsList.childNodes; //root/main/list1/clbs
- for (var i = 1; i <= clbsNode.length; i++) { // 조회된 대상자 만큼 돌면서
- // 선별심사 처방 색깔 구분
- var spcljudgyn = model.getValue("/root/main/list1/clbs["+ i +"]/spcljudgyn");
- if (spcljudgyn == "Y") {
- grd_clbsmast.rowStyle(i, "data", "color") = "#ff3333";
- } else {
- grd_clbsmast.rowStyle(i, "data", "color") = "#000000";
- }
- }
- */
- var cutprcp = model.getValue("/root/send/item1/cutprcp");
-
- if(cutprcp == "Y"){
- //삭감처방은 GREEN색으로 색구분--2009-11-26
- var clbsNode = clbsList.childNodes;
- for (var i = 1; i <= clbsNode.length; i++) { // 조회된 대상자 만큼 돌면서
- // 선별심사 처방 색깔 구분
- var cutprcpyn = model.getValue("/root/main/list1/clbs["+ i +"]/cutprcpyn");
- if (cutprcpyn == "Y") {
- grd_clbsmast.rowStyle(i, "data", "background-color") = "#99cc00";
- } else {
- grd_clbsmast.rowStyle(i, "data", "background-color") = "#ffffff";
- }
- }
- }
- }
-
- // 총건수와 기타 심사상태에 따른 cnt를 표시한다.
- function fSetWorkStatCnt(){
- var srchmode = "clbsmast";
- if (model.getValue("/root/send/item1/patunitsrch1") == "" && model.getValue("/root/send/item1/choicdsrch2")) {
- srchmode = "specclbs";
- }
- model.setValue("/root/hidden/clbs/srchmode", srchmode);
-
- model.setValue("/root/hidden/clbs/totcnt", instance1.getXPathString("count(/root/main/list1/clbs)")); // 총건수
- model.setValue("/root/hidden/clbs/endcnt", instance1.getXPathString("count(/root/main/list1/clbs[judgendyn='C' or judgendyn='E' or judgendyn='Z'])")); // 완료
- model.setValue("/root/hidden/clbs/unjudgcnt", instance1.getXPathString("count(/root/main/list1/clbs[judgendyn='A'])")); // 미심사
- model.setValue("/root/hidden/clbs/retecnt", instance1.getXPathString("count(/root/main/list1/clbs[judgendyn='N'])")); // 보류
- model.setValue("/root/hidden/clbs/delcnt", instance1.getXPathString("count(/root/main/list1/clbs[judgendyn='D'])")); // 삭제
- model.setValue("/root/hidden/clbs/autodelcnt", instance1.getXPathString("count(/root/main/list1/clbs[judgendyn='R'])")); // 자동삭제
- model.setValue("/root/hidden/clbs/judgprcscnt", instance1.getXPathString("count(/root/main/list1/clbs[judgendyn='B'])")); // 심사중
- model.setValue("/root/hidden/clbs/rptclamcnt", instance1.getXPathString("count(/root/main/list1/clbs[retdocuyn='Y'])")); // 반송불능여부
-
- if (srchmode == "specclbs") { // 선별심사 모드인 경우
- var totCnt = 0;
- var cntE = 0; // 완료
- var cntA = 0; // 미심사
- var cntM = 0; // 보류
- var cntD = 0; // 삭제
- var cntR = 0; // 자동삭제
- var cntB = 0; // 심사중
- var cntJ = 0; // 반송불능여부
-
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- var curclamkey = model.getValue("/root/main/list1/clbs["+ i +"]/clamkey");
- var dupl = false;
- for (var j = (i-1); j >= 1; j--) {
- var preclamkey = model.getValue("/root/main/list1/clbs["+ j +"]/clamkey");
- if (curclamkey == preclamkey) {
- dupl = true;
- }
- }
- if (dupl == false) {
- var judgendyn = model.getValue("/root/main/list1/clbs["+ i +"]/judgendyn");
- if (judgendyn == "A") { // 미심사
- cntA++;
- }
- else if (judgendyn == "B") { // 심사중
- cntB++;
- }
- else if (judgendyn == "D") { // 삭제
- cntD++;
- }
- else if (judgendyn == "R") { // 자동삭제
- cntR++;
- }
- else if (judgendyn == "N") { // 보류
- cntM++;
- }
- else if (judgendyn == "C" || judgendyn == "E" || judgendyn == "Z") { // 완료
- cntE++;
- }
- var retdocuyn = model.getValue("/root/main/list1/clbs["+ i +"]/retdocuyn");
- if (retdocuyn == "Y") { // 반송불능여부
- cntJ++;
- }
- totCnt++;
- }
- }
- model.setValue("/root/hidden/clbs/totcnt", totCnt); // 총건수
- model.setValue("/root/hidden/clbs/endcnt", cntE); // 완료
- model.setValue("/root/hidden/clbs/unjudgcnt", cntA); // 미심사
- model.setValue("/root/hidden/clbs/retecnt", cntM); // 보류
- model.setValue("/root/hidden/clbs/autodelcnt", cntD); // 자동삭제
- model.setValue("/root/hidden/clbs/delcnt", cntD); // 삭제
- model.setValue("/root/hidden/clbs/judgprcscnt", cntB); // 심사중
- model.setValue("/root/hidden/clbs/rptclamcnt", cntJ); // 반송불능여부
- }
-
-
- model.refreshpart("/root/hidden/clbs/totcnt"); // 총건수
- model.refreshpart("/root/hidden/clbs/endcnt"); // 완료
- model.refreshpart("/root/hidden/clbs/unjudgcnt"); // 미심사
- model.refreshpart("/root/hidden/clbs/retecnt"); // 보류
- model.refreshpart("/root/hidden/clbs/delcnt"); // 삭제
- model.refreshpart("/root/hidden/clbs/autodelcnt"); // 자동삭제
- model.refreshpart("/root/hidden/clbs/judgprcscnt"); // 심사중
- model.refreshpart("/root/hidden/clbs/rptclamcnt"); // 반송불능여부
- }
- // 심사중해제
- function fSetJudgEndYN() {
- model.removeNodeset("/root/send/list1");
- var cnt = 0;
- var judgendyn = model.getValue("/root/hidden/item1/judgendyn");
- // 심사상태 "심사중"을 조건으로 조회하여 "심사중 해제"를 요청한 경우에는
- // 대상자를 개별 선택할 필요가 없이 조회된 모든 대상자가 해제되도록 기능 부여
- if (judgendyn == "B") {
- if (grd_clbsmast.rows > 1) { // 조회된 모든 심사중 대상자를 해제한다.
- for (var i = 1; i < grd_clbsmast.rows; i++) {
- var clamym = model.getValue("/root/main/list1/clbs[" + i + "]/clamym");
- var clamdg = model.getValue("/root/main/list1/clbs[" + i + "]/clamdg");
- var pid = model.getValue("/root/main/list1/clbs[" + i + "]/pid");
- var pidsn = model.getValue("/root/main/list1/clbs[" + i + "]/pidsn");
-
- // 20100120 완료상태일 경우도 심사중해제될수 있어 상태체크 조건 추가
- if ( model.getValue("/root/main/list1/clbs[" + i + "]/judgendyn") == "B" ) {
- cnt++;
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/clamym", clamym);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/clamdg", clamdg);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/pid", pid);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/pidsn", pidsn);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/judgendyn", "A"); // A: 미심사
- }
- }
- if ( cnt > 0 ) {
- var ans = messageBox("조회된 모든 심사중 상태 " + cnt + "건을 해제", "S001"); /// 조회된 모든 심사중 상태 *건을 해제 하시려면 예(Yes)\n아니면 아니오(No)
- if (ans == 6) { // return : yes=6, no=7
- submit("TXPID20302");
- if (ipt_patunitsrch.currentText.length > 1) {
- fGetInAftJudgTrgtManList("pidSrch");
- } else {
- fGetInAftJudgTrgtManList();
- }
-
- }
- }
- } else { // 조회된 대상자가 없는 경우임
- messageBox("심사중 해제 할 대상자를 조회", "I008"); /// 심사중 해제 할 대상자를 조회 하십시오.
- }
- return;
- }
- else {
-
- if (grd_clbsmast.selectedRows == 0) {
- messageBox("심사중 해제를 할 대상자를", "C002"); /// 심사중 해제를 할 대상자를 선택하십시오.
- return;
- }
- // 선택된 모든 대상자의 심사중 상태를 해제한다.
- for (var i = 0; i < grd_clbsmast.selectedRows; i++) {
- var row = grd_clbsmast.selectedrow(i);
- var sel_clamym = model.getValue("/root/main/list1/clbs[" + row + "]/clamym");
- var sel_clamdg = model.getValue("/root/main/list1/clbs[" + row + "]/clamdg");
- var sel_pid = model.getValue("/root/main/list1/clbs[" + row + "]/pid");
- var sel_pidsn = model.getValue("/root/main/list1/clbs[" + row + "]/pidsn");
- var sel_judgendyn = model.getValue("/root/main/list1/clbs[" + row + "]/judgendyn");
- if (sel_judgendyn == "B") { // 심사중 상태인 경우
- cnt++;
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/clamym", sel_clamym);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/clamdg", sel_clamdg);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/pid", sel_pid);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/pidsn", sel_pidsn);
- model.makeValue("/root/send/list1/endclbs[" + cnt + "]/judgendyn", "A"); // A: 미심사
- }
- }
- if (cnt > 0) {
- var ans = messageBox(cnt + "건을 심사중 해제", "S001"); /// *건을 심사중 해제 하시려면 예(Yes)\n아니면 아니오(No)
- if (ans == 6) { // return : yes=6, no=7
- submit("TXPID20302");
- fGetInAftJudgTrgtManList();
- }
- } else {
- messageBox("선택된 대상자 중 심사중 상태의 대상자가", "I004"); /// 선택된 대상자 중 심사중 상태의 대상자가 없습니다.
- }
- }
- }
- //------------------------------------------------------------
- // 진료정보조회 : SMMMO02500_환자진료정보.xrw
- //------------------------------------------------------------
- function fGetEmrInformation() {
- var row = grd_clbsmast.row
- fOpenSMMMO02500_1(model.getValue("/root/main/list1/clbs[" + row + "]/pid")); // SMMMO02500_환자진료정보.xrw
- }
- //------------------------------------------------------------
- // EMR - 통합기록전체조회
- //------------------------------------------------------------
- function fGetAllEmrInformation() {
- var row = grd_clbsmast.row
- fOpenSMMRI00400(model.getValue("/root/main/list1/clbs[" + row + "]/pid"));
- }
- function responseHandlerTRPID20202() {
- // 서버에서 전달된 결과를 instance에 맵핑
- //defualtResponseHandler(submitUUID, response, responseType);
- copyNodeType("/root/main/list1","/root/hidden/list1","after");
- model.removeNodeset("/root/hidden/list1/clbs");
-
- fSetSrchJudgTrgtMan();
-
- btn_nextpage.attribute("visibility") = "visible";
- model.refresh();
- //
- }
- function setPopupRefresh(pid) {
- var sChildSMMRI00400 = findChildWindowByScreenID("SMMRI00400");
- if (sChildSMMRI00400 != null) {
- var wndobj = getOpenWindow("SMMRI00400");
- if(wndobj != null)
- {
-
- setParameter("SMMRI00400_param_pid", pid);
- // 초기화함수 호출
- wndobj.javascript.fInitalize();
- }
- }
-
- var sChildSMPPI00700 = findChildWindowByScreenID("SMPPI00700");
- if (sChildSMPPI00700 != null) {
- var wndobj = getOpenWindow("SMPPI00700");
- if(wndobj != null)
- {
- fGetDurginfo(wndobj);
- }
- }
-
- var sChildSMAER00800 = findChildWindowByScreenID("SMAER00800");
- if (sChildSMAER00800 != null) {
- var wndobj = getOpenWindow("SMAER00800");
- if(wndobj != null)
- {
- wndobj.javascript.model.makeValue("/root/send/data/singdata/srchdate1", model.getValue("/root/main/list1/clbs[" + grd_clbsmast.row + "]/indd"));
- wndobj.javascript.model.makeValue("/root/send/data/singdata/srchpid", pid);
- wndobj.javascript.model.makeValue("/root/send/data/singdata/orddeptcd", model.getValue("/root/main/list1/clbs[" + grd_clbsmast.row + "]/orddeptcd"));
- wndobj.javascript.model.refresh();
- wndobj.javascript.model.dispatch("xforms-ready");
- }
- }
-
-
-
- }
- //약제누적팝업
- function fGetDurginfo(wndobj) {
- var srchmode = model.getValue("/root/hidden/clbs/srchmode");
- if (srchmode == "specclbs") { // 선별심사 모드인 경우
- grd_specclbs.refresh()
- var cur_row = grd_specclbs.row;
- } else {
- var cur_row = grd_clbsmast.row;
- }
-
- var vpid = model.getValue("/root/main/list1/clbs[" + cur_row + "]/pid");
- var vhngnm = model.getValue("/root/main/list1/clbs[" + cur_row + "]/patnm");
- var vprcpdd = getCurrentDate();
- var vprcpcd = "";
- setParameter("pid", vpid);
- setParameter("hngnm", vhngnm);
- setParameter("prcpdd", vprcpdd);
- setParameter("prcpcd", vprcpcd);
-
- if (wndobj != null) {
- wndobj.javascript.fInitalize();
- } else {
- open("../../../pam/bfjudgcareweb/xrw/SMPPI00700_환자별약제누적관리", "1", "20", "80" ,"SMPPI00700_환자별약제누적관리", "", "");
- }
-
- }
- function fGetKDrgOpenPopup(){
- var srchmode = model.getValue("/root/hidden/clbs/srchmode");
- if (srchmode == "specclbs") { // 선별심사 모드인 경우
- grd_specclbs.refresh()
- var cur_row = grd_specclbs.row;
- } else {
- var cur_row = grd_clbsmast.row;
- }
- var pid = model.getValue("/root/main/list1/clbs[" + cur_row + "]/pid");
- var pidsn = model.getValue("/root/main/list1/clbs[" + cur_row + "]/pidsn");
- var clamdg = model.getValue("/root/main/list1/clbs[" + cur_row + "]/clamdg");
- var clamym = model.getValue("/root/main/list1/clbs[" + cur_row + "]/clamym");
- var ordrsltcd = model.getValue("/root/main/list1/clbs[" + cur_row + "]/ordrsltcd");
-
- setParameter("pid", pid);
- setParameter("pidsn", pidsn);
- setParameter("clamdg", clamdg);
- setParameter("clamym", clamym);
- setParameter("ordrsltcd", ordrsltcd);
-
- open("SPPID31000" ,"", "10", "10", "SPPID31000", "/root/hidden/SPPID31000/cond", "/root/send/data/drginfo", "", "");
- }
|