12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298 |
- /**
- * 파 일 명 : SMADT10200.js
- * 설 명 : 병동 처방전/라벨 출력, 병동 마감 Javascript
- * 설 계 자 : 공두경
- * 작 성 자 : 공두경
- * 수정이력 : 2006.6.28 / 수정작성 / 공두경
- */
- //조회조건에 맞는 데이터가 있는지를 chk
- var chk_drugno = 0;
- var chk_wardcd = 0;
- var chk_pid = 0;
- var chk_prnt_count = 0;
- var chk_sum_count = 0;
- var chk_count = 0;
- var gTimer = null;
- var gTimer2 = null;
- var gT1 = null;
- var sleepTime= 1000;
- var chk_cnt = 0;
- /**
- * 초기화
- */
- function fInit() {
- if (model.getValue("/root/hidden/prcpsrch/prcpdd") == "") {
- // 날짜 초기화
- model.makeValue("/root/hidden/srchinfo/prcpdd", getCurrentDate());
- }
- //처방구분 초기화
- model.makeValue("/root/hidden/srchinfo/prcpflag", "A");
-
- //약주사구분 초기화
- model.makeValue("/root/hidden/srchinfo/drugkind", "T");
- //라벨 체크 초기화
- model.makeValue("/root/hidden/srchinfo/lblyn", "Y");
- fChkLBL_YN();
-
- //처방전 체크 초기화
- model.makeValue("/root/hidden/srchinfo/mpsflag", "P");
-
- //기타조회구분 초기화
- model.makeValue("/root/hidden/srchinfo/etcflag", "T");
- cbx_etcdescflag.disabled = true;
-
- //마감시 instcd 적용을 위해 instcd 초기화
- // model.setValue("/root/hidden/srchinfo/instcd", getUserInfo("posinstcd"));
- var dutplceinstcd = getUserInfo("dutplceinstcd");
- if(dutplceinstcd == ""){
- dutplceinstcd = "012";
- }
- model.makeValue("/root/hidden/srchinfo/instcd", dutplceinstcd);
- //makeReportPreview(0,270,820,700);
-
- //병동 Combo 조회
- model.setValue("/root/send/deptinfo/deptflag", "W");
- submit("TRADT10203");
- astfAddCombo("/root/hidden/deptlist", "ward", "wardcd,wardnm", "T,전체");
-
- //자동출력구분 초기화
- btn_autoprnt_start.disabled = false;
- btn_autoprnt_end.disabled = true;
- //model.setValue("/root/hidden/srchinfo/auto_selflag", "1");
- //chk_auto_big.disabled = false;
- //chk_auto_small.disabled = true;
- //model.setValue("/root/hidden/srchinfo/auto_bigflag", "E|L|G");
- //model.setValue("/root/hidden/srchinfo/auto_smallflag", "");
-
- //20100412 황세원 수정 병실컬럼
- submit("TRADT10213");
- if(model.getValue("init/roomyn/roomyn/roomyn")=="Y") {
- grd_patlist.colHidden(5) = false;
- model.makeValue("/root/hidden/srchinfo/atc3", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/atc3", "N");
- grd_patlist.colHidden(5) = true;
- }
- model.refresh();
-
- /*/ 병실컬럼
- if(dutplceinstcd == "013") {
- grd_patlist.colHidden(5) = false;
- model.makeValue("/root/hidden/srchinfo/atc3", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/atc3", "N");
- grd_patlist.colHidden(5) = true;
- }
- model.refresh();
- */
-
- //마감시간구분
- model.makeValue("/root/send/sumlistinfo/prcpflag", "A");
- submit("TRADT10206");
- cmb_sumtmflag.select(0);
-
- //처방전 감사화면에서 팝업으로 열때 데이터 조회
- if(model.getValue("/root/hidden/popupinfo/drugno") != ""){
- model.setValue("/root/hidden/srchinfo/prcpdd", model.getValue("/root/hidden/popupinfo/prcpdd"));
- model.setValue("/root/hidden/srchinfo/fst_drugno", model.getValue("/root/hidden/popupinfo/drugno"));
- model.setValue("/root/hidden/srchinfo/pid", model.getValue("/root/hidden/popupinfo/pid"));
- //model.setValue("/root/hidden/srchinfo/ward", model.getValue("/root/hidden/popupinfo/ward"));
- model.refresh();
- fInSumList();
- }
-
- //바코드프린터설정 초기화
- model.setValue("/root/send/scrnid", getScreenID());
- submit("TRLLC90101");
-
- var comm = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm");
- var prntkind = model.getValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
- if(comm == "2") {
- model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/comm02/comm", "1");
- }
- if(prntkind == "1") {
- model.setValue("/root/main/barcdprntsetup/prntsetupinfo/setupinfo/prntkind", "5");
- }
-
- //추가마감시 admission과 병동응급을 함께 마감할지 여부 조회 , ATC순으로 정렬 체크 여부
- submit("TRADT10207");
-
- if(model.getValue("/root/init/sumprcpflagyn/flagyn/orderbyatc") == "Y") {
- model.setValue("/root/hidden/srchinfo/orderbyatc", "Y");
- model.refresh();
- }
-
-
- //라벨 출력 형식 옵션
- submit("TRADT10208");
-
- if(model.getValue("/root/init/lbltype/item2/lbltype") == "Y") {
- button4.visible = true;
-
- button6.visible = true;
- //checkbox8.visible = true; 20090812 주석처리 추후협희후 수정
-
- } else {
- button4.visible = false;
-
- button6.visible = false;
- //checkbox8.visible = false; 20090812 주석처리 추후협희후 수정
- }
-
- // 출고부서 조회, 설정 2009.09.07 pymi
- submit("TRADT01106");
- if((dutplceinstcd == "013") || (dutplceinstcd == "014") || (dutplceinstcd == "017")) {
- combo1.select(0);
- } else if(dutplceinstcd == "012") {
- combo1.select(2);
- } else {
- combo1.select(1);
- }
- chk_cnt ++;
- model.setValue("/root/temp/stocdeptcd", model.getValue("/root/hidden/srchinfo/stocdeptcd"));
- combo1.refresh();
- // (e)
-
- }
- /**
- * 라벨 변경시 처리
- */
- function fChkLBL_YN() {
- var chk = model.getValue("/root/hidden/srchinfo/lblyn");
- var sLbl_Drug = "D|DT|DX|DE|DH";
- var sLbl_Inj = "I|IO|IX|IE|IH";
-
-
- if(chk == "Y"){
- model.makeValue("/root/hidden/srchinfo/lbl_drug", sLbl_Drug);
- model.makeValue("/root/hidden/srchinfo/lbl_inj", sLbl_Inj);
- model.makeValue("/root/hidden/srchinfo/drugall", "Y");
- model.makeValue("/root/hidden/srchinfo/injall", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/lbl_drug", "");
- model.makeValue("/root/hidden/srchinfo/lbl_inj", "");
- model.makeValue("/root/hidden/srchinfo/drugall", "");
- model.makeValue("/root/hidden/srchinfo/injall", "");
- }
- model.refresh();
- }
- /**
- * 마감리스트 조회
- */
- function fInSumList() {
- chk_ward.visible = false;
- if(model.getValue("/root/hidden/srchinfo/autoprntflag") == "" && model.getValue("/root/hidden/srchinfo/prcpflag") == ""){
- messageBox("처방구분을", "C001")
- return;
- }
-
- model.copyNode("/root/send/sumlistinfo", "/root/hidden/srchinfo");
- submit("TRADT10201");
- grd_sumlist.isSelected(grd_sumlist.fixedRows) = true;
- grd_sumlist.row = grd_sumlist.fixedRows;
- if(grd_sumlist.Rows > 1){
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
- } else {
- model.removeNodeset("/root/main/patlist/patlist");
- model.refresh();
- }
- }
- /**
- * 병동 마감
- */
- function fHosInSum(chk) {
- var prcpflag = model.getValue("/root/hidden/srchinfo/prcpflag");
- var prcpdd = model.getValue("/root/hidden/srchinfo/prcpdd");
- var instcd = model.getValue("/root/hidden/srchinfo/instcd");
- var pid = model.getValue("/root/hidden/srchinfo/pid");
- var drugkind = model.getValue("/root/hidden/srchinfo/drugkind");
- var onlyantis = model.getValue("/root/hidden/srchinfo/onlyantis");
- var prcpflagnm = rdo_prcp.label;
- var chkret = 0;
- var fromddflag = "";
- var fromdd = "";
- var fromtm = "";
- var toddflag = "";
- var todd = "";
- var totm = "";
-
- if(chk == "Y") {
- fromddflag = model.getValue("/root/hidden/srchinfo/fromddflag");
- fromtm = model.getValue("/root/hidden/srchinfo/fromtm");
- toddflag = model.getValue("/root/hidden/srchinfo/toddflag");
- totm = model.getValue("/root/hidden/srchinfo/totm");
- if ( prcpflag =="R" || prcpflag =="A" ){
- if( fromddflag == "" || fromtm == "" || toddflag == "" || totm == "" || fromtm.length != 4 || totm.length != 4) {
- messageBox("마감구분이 잘못", "E005");
- return;
-
- } else {
-
- if(fromddflag == "0") {
- fromdd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
- } else {
- fromdd = prcpdd ;
- }
-
- if(toddflag == "0") {
- todd = ((prcpdd.toDate("YYYYMMDD")).getAddDate(-1,"D")).getDateFormat("YYYYMMDD") ;
- } else {
- todd = prcpdd ;
- }
-
- fromtm = fromtm + "00";
- totm = totm + "59";
- }
- } else {
-
- fromdd = "" ;
- todd = "" ;
- fromtm ="";
- totm ="";
- }
-
- chkret = messageBox(prcpflagnm + "마감을", "Q004");
- } else {
- chkret = 6;
- }
-
- if(chkret == 6){
-
- if(chk == "Y") {
- model.setValue("/root/send/suminfo/fromdd", fromdd);
- model.setValue("/root/send/suminfo/fromtm", fromtm);
- model.setValue("/root/send/suminfo/todd", todd);
- model.setValue("/root/send/suminfo/totm", totm);
- } else {
- model.setValue("/root/send/suminfo/fromdd", "");
- model.setValue("/root/send/suminfo/fromtm", "");
- model.setValue("/root/send/suminfo/todd", "");
- model.setValue("/root/send/suminfo/totm", "");
- }
- model.setValue("/root/send/suminfo/sumdt", getCurrentDateTime().replace(" ", ""));
- model.setValue("/root/send/suminfo/prcpdd", prcpdd);
- model.setValue("/root/send/suminfo/prcpflag", prcpflag);
- model.setValue("/root/send/suminfo/instcd", instcd);
- model.setValue("/root/send/suminfo/pid", pid);
- model.setValue("/root/send/suminfo/sumdrugkind", drugkind);
- model.setValue("/root/send/suminfo/onlyantis", onlyantis);
- model.setValue("/root/send/suminfo/mstocdeptcd", model.getValue("/root/hidden/srchinfo/stocdeptcd")); // 2009.09.11 pymi
- model.setValue("/root/send/suminfo/ioflag", "I");
- model.makeValue("/root/send/suminfo/multiyn", model.getValue("/root/hidden/srchinfo/multiyn")); //multi day 처방 포함 여부
- submit("TXADT10201");
-
- for(var i = 0 ; i < 15; i++) {
- submit("TXADT10201");
- }
-
- //추가마감시 flayn=Y이면 admission과 병동응급도 마감을 한다.
- if(chk == "Y" && prcpflag == "A" && model.getValue("/root/init/sumprcpflagyn/flagyn/flagyn") == "Y") {
-
- model.setValue("/root/send/suminfo/prcpflag", "M");
-
- for(var i = 0 ; i < 5; i++) {
- submit("TXADT10201");
- }
-
- model.setValue("/root/send/suminfo/prcpflag", "W");
-
- for(var i = 0 ; i < 5; i++) {
- submit("TXADT10201");
- }
-
- }
-
- if (model.getValue("/root/hidden/srchinfo/prcpflag")=="L" || model.getValue("/root/hidden/srchinfo/prcpflag")=="G") {
- model.setValue("/root/send/suminfo/prcpdd", prcpdd);
- model.setValue("/root/send/suminfo/prcpflag", prcpflag);
- model.setValue("/root/send/suminfo/instcd", instcd);
- model.setValue("/root/send/suminfo/pid", pid);
- model.setValue("/root/send/suminfo/ioflag", "O");
-
- for(var i = 0 ; i < 5; i++) {
- submit("TXADT10201");
- }
- }
- }
- }
- /**
- * 마감리스트 더블클릭시 출력할 환자리스트 조회
- */
- function fPrntPatList() {
- grd_patlist.rebuildStyle();
- if(model.getValue("/root/main/sumlist/sumlist["+grd_sumlist.row+"]/sumdt") != ""){
- model.copyNode("/root/send/patlistinfo","/root/main/sumlist/sumlist["+grd_sumlist.row+"]");
- model.makeValue("/root/send/patlistinfo/prcpdd", model.getValue("/root/hidden/srchinfo/prcpdd"));
- model.makeValue("/root/send/patlistinfo/fst_drugno", model.getValue("/root/hidden/srchinfo/fst_drugno"));
- model.makeValue("/root/send/patlistinfo/last_drugno", model.getValue("/root/hidden/srchinfo/last_drugno"));
- model.makeValue("/root/send/patlistinfo/wardcd", model.getValue("/root/hidden/srchinfo/wardcd"));
- model.makeValue("/root/send/patlistinfo/pid", model.getValue("/root/hidden/srchinfo/pid"));
- model.makeValue("/root/send/patlistinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/autoprntflag"));
- model.makeValue("/root/send/patlistinfo/etcdescflag", model.getValue("/root/hidden/srchinfo/etcdescflag"));
- model.makeValue("/root/send/patlistinfo/prntkind", model.getValue("/root/hidden/srchinfo/prntkind"));
- model.makeValue("/root/send/patlistinfo/autolblyn", model.getValue("/root/hidden/srchinfo/autolblyn"));
- model.makeValue("/root/send/patlistinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/patlistinfo/orderbyatc", model.getValue("/root/hidden/srchinfo/orderbyatc"));
- model.makeValue("/root/send/patlistinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- model.makeValue("/root/send/patlistinfo/atc3", model.getValue("/root/hidden/srchinfo/atc3"));
- model.makeValue("/root/send/patlistinfo/autoyn", model.getValue("/root/hidden/srchinfo/autoyn"));
- submit("TRADT10202");
- if(model.getValue("/root/hidden/srchinfo/fst_drugno") != ""){
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- }
-
- //sortNodeList("")
- }
- }
- /**
- * 처방전/라벨 출력
- */
- function fPrcpMPSPrint( flag ) {
- //투약번호로 출력
- var sDrugNo = model.getValue("/root/hidden/srchinfo/fst_drugno");
- sleepTime = model.getValue("/root/hidden/sleeptime") * 1000;
- /*if(sDrugNo != ""
- && chk_prnt_count == 0){
- fAutoPrnt();
- return;
- }*/
- chk_prnt_count = 0;
- //처방전 및 라벨 출력
- var chk_mpsflag = model.getValue("/root/hidden/srchinfo/mpsflag");
- var chk_lblyn = model.getValue("/root/hidden/srchinfo/lblyn");
- var chk_lbl_drug = model.getValue("/root/hidden/srchinfo/lbl_drug");
- var chk_lbl_inj = model.getValue("/root/hidden/srchinfo/lbl_inj");
-
- grd_patlist.rebuildStyle();
-
- if (chk_mpsflag != "" || chk_lblyn != "") {
- //처방전 출력 데이터 조회
- var cnt = 0;
- for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){
- if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){
- model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]");
- if(chk_lbl_drug != "" && chk_lbl_inj != ""){
- model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_drug+"|"+chk_lbl_inj);
- } else if(chk_lbl_drug != ""){
- model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_drug);
- } else if(chk_lbl_inj != ""){
- model.makeValue("/root/send/prcpinfo/lblflag", chk_lbl_inj);
- }
-
- model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag"));
- model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn"));
- model.makeValue("/root/send/prcpinfo/ioflag", "I");
- var drugno = model.getValue("/root/send/prcpinfo/drugno");
- var wardcd = model.getValue("/root/send/prcpinfo/wardcd");
- var pid = model.getValue("/root/send/prcpinfo/pid");
- //alert(flag);
- if ( flag =="M" || flag == null ){
- //처방전 출력
- // if (chk_mpsflag != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_mpsflag != "" ) {
- //var gT1 = window.setInterval("fHosInMPSPrint()",10000);
- //window.clearinterval(gT1);
- //gT1 = window.setInterval("fStopTimer()",100000);
- fSleep(sleepTime);
- fHosInMPSPrint();
- }
- }
-
- if ( flag =="L" || flag == null ){
-
- //라벨 출력
- // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_lblyn != "" ) {
- fSleep(sleepTime);
- fHosInLBLPrint();
- }
- }
-
- if ( flag =="Q" ){
-
- //라벨 출력
- // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_lblyn != "" ) {
- fSleep(sleepTime/2);
- fLiquidLBLPrint();
- }
- }
-
- if ( flag =="O" ){
-
- //라벨 출력
- // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_lblyn != "" ) {
- fSleep(sleepTime/2);
- fOutLBLPrint();
- }
- }
-
- if ( flag =="P" ){
-
- //라벨 출력
- // if (chk_lblyn != "" && fChkParam(drugno, wardcd, pid) == true) {
- if (chk_lblyn != "" ) {
- fSleep(sleepTime/2);
- fPTPLBLPrint();
- }
- }
-
-
- cnt++;
-
- if (model.getValue("/root/hidden/srchinfo/autoyn") !="Y") {
- //출력상태 표시
- for ( var j = 0 ; j < grd_patlist.cols -1; j++){
- grd_patlist.cellStyle("background-color", i, j) = "#cfffcf";
- //grd_patlist.cellStyle("font-weight", i, j) = "bold";
- }
- grd_patlist.refresh();
- }
- }
- }
-
- if( cnt == 0 && gTimer == null){
- messageBox("처방전을 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
-
- model.setValue("/root/send/atcinfo/drugdd", model.getValue("/root/hidden/srchinfo/prcpdd"));
- if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="L" ) {
- model.setValue("/root/send/atcinfo/drugflag", "L");
- } else if ( model.getValue("/root/hidden/srchinfo/prcpflag") =="E" ) {
- model.setValue("/root/send/atcinfo/drugflag", "E");
- } else {
- model.setValue("/root/send/atcinfo/drugflag", "I");
- }
- if (model.getValue("/root/hidden/srchinfo/autoatcyn") =="Y") {
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- }
- }
-
- }
- function fStopTimer() {
- window.clearinterval(gT1);
- }
- /**
- * 처방전 출력
- */
- function fHosInMPSPrint() {
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦etcdescflag▦reyn▦autoyn▦reprintyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/send/prcpinfo/reyn")+"▦"+
- model.getValue("/root/hidden/srchinfo/autoyn") +"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▦"+
- model.getValue("/root/hidden/srchinfo/stocdeptcd")+"▩"; // 2009.09.08 pymi
-
- model.setAttribute("params", sParam);
- modal("SPADT62200",0,200,200,"","");
- model.setAttribute("params", "");
- return 0;
- }
- /**
- * 라벨 출력
- */
- function fHosInLBLPrint() {
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦liquidflag▦etcdescflag▦lblkind▦outlblyn▦ptplblyn▦reprintyn▦lbltype▦drugkind▦autolblyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- ""+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/hidden/srchinfo/lblkind")+"▦"+
- ""+"▦"+
- ""+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▦"+
- model.getValue("/root/init/lbltype/item/lbltype")+"▦"+
- model.getValue("/root/hidden/srchinfo/drugkind")+"▦"+
- model.getValue("/root/hidden/srchinfo/autoyn")+"▩";
-
- model.setAttribute("params", sParam);
- model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
- modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup");
- model.setAttribute("params", "");
- // submit("TRADT10205");
-
- return 0;
- }
- /**
- * 물약 라벨 출력
- */
- function fLiquidLBLPrint() {
- //처방전 출력 데이터 조회
- var cnt = 0;
- for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){
- if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){
- model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]");
- model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag"));
- model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn"));
- model.makeValue("/root/send/prcpinfo/ioflag", "I");
- var drugno = model.getValue("/root/send/prcpinfo/drugno");
- var wardcd = model.getValue("/root/send/prcpinfo/wardcd");
- var pid = model.getValue("/root/send/prcpinfo/pid");
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦liquidflag▦etcdescflag▦lblkind▦outlblyn▦ptplblyn▦reprintyn▦lbltype▦drugkind▦autolblyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- "Y"+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/hidden/srchinfo/lblkind")+"▦"+
- ""+"▦"+
- ""+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▦"+
- model.getValue("/root/init/lbltype/item/lbltype")+"▦"+
- model.getValue("/root/hidden/srchinfo/drugkind")+"▦"+
- model.getValue("/root/hidden/srchinfo/autoyn")+"▩";
-
- model.setAttribute("params", sParam);
- model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
- modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup");
- model.setAttribute("params", "");
- //fSleep(sleepTime);
- cnt++;
- }
- }
-
- if( cnt == 0 && gTimer == null){
- messageBox("라벨를 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
-
- }
- /**
- * 외용 라벨 출력
- */
- function fOutLBLPrint() {
- //처방전 출력 데이터 조회
- var cnt = 0;
- for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){
- if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){
- model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]");
- model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag"));
- model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn"));
- model.makeValue("/root/send/prcpinfo/ioflag", "I");
- var drugno = model.getValue("/root/send/prcpinfo/drugno");
- var wardcd = model.getValue("/root/send/prcpinfo/wardcd");
- var pid = model.getValue("/root/send/prcpinfo/pid");
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦liquidflag▦etcdescflag▦lblkind▦outlblyn▦ptplblyn▦reprintyn▦lbltype▦drugkind▦autolblyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- ""+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/hidden/srchinfo/lblkind")+"▦"+
- "Y"+"▦"+
- ""+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▦"+
- model.getValue("/root/init/lbltype/item/lbltype")+"▦"+
- model.getValue("/root/hidden/srchinfo/drugkind")+"▦"+
- model.getValue("/root/hidden/srchinfo/autoyn")+"▩";
-
- model.setAttribute("params", sParam);
- model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
- modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup");
- model.setAttribute("params", "");
- //fSleep(sleepTime);
- cnt++;
- }
- }
-
- if( cnt == 0 && gTimer == null){
- messageBox("라벨를 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
-
- }
- /**
- * PTP 라벨 출력 ( ATC 전송구분 e 인 처방만 있는 약번호의 라벨 )
- */
- function fPTPLBLPrint() {
- //처방전 출력 데이터 조회
- var cnt = 0;
- for(var i = grd_patlist.fixedRows; i < grd_patlist.rows; i++){
- if(model.getValue("/root/main/patlist/patlist["+i+"]/sel") == "Y"){
- model.copyNode("/root/send/prcpinfo", "/root/main/patlist/patlist["+i+"]");
- model.makeValue("/root/send/prcpinfo/prcpflag", model.getValue("/root/hidden/srchinfo/prcpflag"));
- model.makeValue("/root/send/prcpinfo/prntflag", model.getValue("/root/hidden/srchinfo/prntflag"));
- model.makeValue("/root/send/prcpinfo/reprintyn", model.getValue("/root/hidden/srchinfo/reprintyn"));
- model.makeValue("/root/send/prcpinfo/ioflag", "I");
- var drugno = model.getValue("/root/send/prcpinfo/drugno");
- var wardcd = model.getValue("/root/send/prcpinfo/wardcd");
- var pid = model.getValue("/root/send/prcpinfo/pid");
- var sParam = "";
- sParam = "drugdd▦drugno▦ioflag▦prcpdd▦orddd▦cretno▦prcpgenrflag▦pid▦orddeptcd▦wardcd▦lblflag▦prcpflag▦prntflag▦liquidflag▦etcdescflag▦lblkind▦outlblyn▦ptplblyn▦reprintyn▦lbltype▦drugkind▦autolblyn▩";
- sParam += model.getValue("/root/send/prcpinfo/drugdd")+"▦"+
- model.getValue("/root/send/prcpinfo/drugno")+"▦"+
- model.getValue("/root/send/prcpinfo/ioflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpdd")+"▦"+
- model.getValue("/root/send/prcpinfo/orddd")+"▦"+
- model.getValue("/root/send/prcpinfo/cretno")+"▦"+
- model.getValue("/root/send/prcpinfo/prcpgenrflag")+"▦"+
- model.getValue("/root/send/prcpinfo/pid")+"▦"+
- model.getValue("/root/send/prcpinfo/orddeptcd")+"▦"+
- model.getValue("/root/send/prcpinfo/wardcd")+"▦"+
- model.getValue("/root/send/prcpinfo/lblflag")+"▦"+
- //model.getValue("/root/send/prcpinfo/prcpflag")+"▦"+
- model.getValue("/root/send/prcpinfo/drugflag")+"▦"+
- model.getValue("/root/send/prcpinfo/prntflag")+"▦"+
- ""+"▦"+
- model.getValue("/root/hidden/srchinfo/etcdescflag")+"▦"+
- model.getValue("/root/hidden/srchinfo/lblkind")+"▦"+
- ""+"▦"+
- "Y"+"▦"+
- model.getValue("/root/send/prcpinfo/reprintyn")+"▦"+
- model.getValue("/root/init/lbltype/item/lbltype")+"▦"+
- model.getValue("/root/hidden/srchinfo/drugkind")+"▦"+
- model.getValue("/root/hidden/srchinfo/autoyn")+"▩";
-
- model.setAttribute("params", sParam);
- model.copyNode("/root/init/barcdprntsetup", "/root/main/barcdprntsetup");
- modal("SPADT62300",0,200,200,"SPADT62300","/root/init/barcdprntsetup","/root/init/barcdprntsetup");
- model.setAttribute("params", "");
- //fSleep(sleepTime);
- cnt++;
- }
- }
-
- if( cnt == 0 && gTimer == null){
- messageBox("라벨를 출력할 환자리스트가 없거나 선택된 환자가", "I004");
- }
-
- }
- /**
- * 처방전 출력
- */
- /*
- function fChkParam(drugno, wardcd, pid) {
- var chk = true;
- var srch_fst_drugno = model.getValue("/root/hidden/srchinfo/fst_drugno");
- var srch_last_drugno = model.getValue("/root/hidden/srchinfo/last_drugno");
- var srch_wardcd = model.getValue("/root/hidden/srchinfo/ward");
- var srch_pid = model.getValue("/root/hidden/srchinfo/pid");
- //투약번호 조회 범위에 있는지 체크
- if(srch_fst_drugno != "" && srch_last_drugno != ""){
- if(drugno <= srch_fst_drugno && drugno >= srch_last_drugno){
- chk = false;
- chk_drugno++;
- }
- } else if(srch_fst_drugno != "") {
- if(drugno != srch_fst_drugno ){
- chk = false;
- chk_drugno++;
- }
- } else if(srch_last_drugno != ""){
- if(drugno != srch_last_drugno ){
- chk = false;
- chk_drugno++;
- }
- }
- //조회병동과 동일한지 체크
- if(srch_wardcd != ""){
- if(wardcd != srch_wardcd){
- chk = false;
- chk_wardcd++;
- }
- }
- //조회환자번호과 동일한지 체크
- if(srch_pid != ""){
- if(pid != srch_pid){
- chk = false;
- chk_pid++;
- }
- }
- return chk;
- }*/
- /**
- * 자동출력 버튼 클릭시 타이머 작동
- */
- function fClickAutoPrnt(chk) {
-
- if (chk == "Y") {
- //20090824 마정민 수정. 오류가 나더라도 팝업이 뜨지 않고 계속해서 진행될 수 있도록 수정.
- setErrorOff(true);
- model.setValue("/root/hidden/autoend", "N") ;
- /*if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "1" && model.getValue("/root/hidden/srchinfo/auto_bigflag") == ""){
- messageBox("자동출력구분을", "C001");
- return;
- } else if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "2" && model.getValue("/root/hidden/srchinfo/auto_smallflag") == ""){
- messageBox("자동출력구분을", "C001");
- return;
- }*/
-
- if(model.getValue("/root/hidden/srchinfo/autoprntflag") == ""){
- messageBox("자동출력의 처방구분을", "C001");
- return;
- }
-
- if(model.getValue("/root/hidden/srchinfo/autokind") == "") {
- messageBox("자동출력의 출력구분을", "C001");
- return;
- }
-
- /*if(isSearchString(chk_auto_big.value, "L") || isSearchString(chk_auto_big.value, "Q")) {
- if(model.getValue("/root/hidden/srchinfo/autolblflag") == ""){
- messageBox("자동출력의 라벨구분을", "C001");
- return;
- }
- }*/
-
- var sRst = "";
- if(gTimer != null) {
- sRst = messageBox("자동출력이 동작중입니다.\n자동출력구분설정대로 다시", "Q004");
- if(sRst == "6"){
- window.clearinterval(gTimer);
- gTimer = null;
- } else {
- return;
- }
- }
- if(sRst == ""){
- sRst = messageBox("자동출력을", "S001");
- if(sRst != "6"){
- return;
- }
- }
- btn_hist.visible=false;
- grd_sumlist.visible=false;
- grd_patlist.visible=false;
-
- //20090914 이선경 추가 : 자동출력중 처방구분등 다른조건 변경 못하게 함(오류 가능성 있음)
- rdo_prcp.disabled = true; //처방구분(정규, 추가)
- rdo_prcp2.disabled = true; //처방구분(admission, 병동응급, 퇴원, 외박, 응급실)
- checkbox4.disabled = true; //항암프로토콜처방만 체크
- ipt_fst_drugno.disabled = true; //투약번호 from
- caption25.disabled = true; //'~'
- ipt_last_drugno.disabled = true; //투약번호 to
- ipt_pid.disabled = true; //등록번호
- btn_prt.disabled = true; //출력버튼
- button1.disabled = true; //마감버튼
- button2.disabled = true; //물약라벨버튼
- button4.disabled = true; //외용라벨버튼
- button6.disabled = true; //ptp라벨버튼
- chk_auto_small.disabled = true; //자동출력의 처방구분
- //chk_auto_lblflag.disabled = true; //자동출력의 라벨구분
- chk_auto_big.disabled = true; //자동출력의 출력구분
- checkbox8.disabled = true; //자동출력의 ptp라벨, 외용라벨
- ipt_prcpdd.disabled = true; //적용일자
- btn_sea.disabled = true; //조회버튼
- cmb_sumtmflag.disabled = true; //마감시간대구분
- cmb_fromddflag.disabled = true; //마감일자from
- ipt_fromtm.disabled = true; //마감시간from
- cmb_toddflag.disabled = true; //마감일자to
- ipt_totm.disabled = true; //마감시간to
- radio1.disabled = true; //약주사구분
- radio3.disabled = true; //기타조회구분
- btn_init.disabled = true; //초기화버튼
- button5.disabled = true; //병동검색이미지
- chk_mps.disabled = true; //출력구분의 처방전체크
- chk_lbl.disabled = true; //출력구분의 라벨체크
- checkbox1.disabled = true; //출력구분의 약체크
- checkbox2.disabled = true; //출력구분의 주사체크
- chk_lbl_drug.disabled = true; //출력구분의 약리스트체크
- chk_lbl_inj.disabled = true; //출력구분의 주사리스트체크
- combo1.disabled = true; //실출고부서
- checkbox7.disabled = true; //ATC순으로 정렬
- //cmb_ward.visible = false;
- model.setValue("/root/hidden/srchinfo/prcpflag", "");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.setValue("/root/hidden/srchinfo/wardcd", "");
- model.setValue("/root/hidden/srchinfo/wardnm", "");
- model.setValue("/root/temp/srchinfo/ward", "");
- model.setValue("/root/hidden/srchinfo/pid", "");
- model.setValue("/root/hidden/srchinfo/onlyantis","");
- model.makeValue("/root/hidden/srchinfo/autoyn", "Y");
-
- model.setValue("/root/send/suminfo/fromdd", "");
- model.setValue("/root/send/suminfo/fromtm", "");
- model.setValue("/root/send/suminfo/todd", "");
- model.setValue("/root/send/suminfo/totm", "");
-
- //model.setValue("/root/hidden/srchinfo/fromdd", "");
- //model.setValue("/root/hidden/srchinfo/fromtm", "");
- //model.setValue("/root/hidden/srchinfo/todd", "");
- //model.setValue("/root/hidden/srchinfo/totm", "");
-
- var autostr = chk_auto_small.label + " " + chk_auto_big.label;
- /*if(isSearchString(chk_auto_big.value, "L") || isSearchString(chk_auto_big.value, "Q")){
- autostr = autostr + "(" + chk_auto_lblflag.label + ")";
- }*/
- autostr = autostr.setReplaceWord("|", ", " );
- caption23.text = autostr;
-
- model.refresh();
-
- window.minimize();
- fSleep(sleepTime);
- window.maximize();
- /*if(model.getValue("/root/hidden/srchinfo/auto_selflag") == "1"){
- model.setValue("/root/hidden/srchinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/auto_bigflag"));
- } else {
- model.setValue("/root/hidden/srchinfo/autoprntflag", model.getValue("/root/hidden/srchinfo/auto_smallflag"));
- }*/
- btn_autoprnt_start.disabled = true;
- btn_autoprnt_end.disabled = false;
- chk_sum_count = 8;
- gTimer = window.setInterval("fAutoPrnt()",11000);
-
- //재출력 불가
- model.setValue("/root/hidden/srchinfo/reprintyn", "");
- checkbox3.disabled = true;
-
- group2.visible = "true";
- //서버오류가 발생하더라도 modeless 팝업을 통해 계속해서 진행할 수 있도록 수정.
- fErrMsg ();
- } else {
- setErrorOn();
- window.clearinterval(gTimer);
- gTimer = null;
- btn_hist.visible=true;
- grd_sumlist.visible=true;
- grd_patlist.visible=true;
-
-
- //20090914 이선경 추가 : 자동출력중 처방구분등 다른조건 변경 못하게 함(오류 가능성 있음)
- rdo_prcp.disabled = false; //처방구분(정규, 추가)
- rdo_prcp2.disabled = false; //처방구분(admission, 병동응급, 퇴원, 외박, 응급실)
- checkbox4.disabled = false; //항암프로토콜처방만 체크
- ipt_fst_drugno.disabled = false; //투약번호 from
- caption25.disabled = false; //'~'
- ipt_last_drugno.disabled = false; //투약번호 to
- ipt_pid.disabled = false; //등록번호
- btn_prt.disabled = false; //출력버튼
- button1.disabled = false; //마감버튼
- button2.disabled = false; //물약라벨버튼
- button4.disabled = false; //외용라벨버튼
- button6.disabled = false; //ptp라벨버튼
- chk_auto_small.disabled = false; //자동출력의 처방구분
- //chk_auto_lblflag.disabled = false; //자동출력의 라벨구분
- chk_auto_big.disabled = false; //자동출력의 출력구분
- checkbox8.disabled = false; //자동출력의 ptp라벨, 외용라벨
- ipt_prcpdd.disabled = false; //적용일자
- btn_sea.disabled = false; //조회버튼
- cmb_sumtmflag.disabled = false; //마감시간대구분
- cmb_fromddflag.disabled = false; //마감일자from
- ipt_fromtm.disabled = false; //마감시간from
- cmb_toddflag.disabled = false; //마감일자to
- ipt_totm.disabled = false; //마감시간to
- radio1.disabled = false; //약주사구분
- radio3.disabled = false; //기타조회구분
- btn_init.disabled = false; //초기화버튼
- button5.disabled = false; //병동검색이미지
- chk_mps.disabled = false; //출력구분의 처방전체크
- chk_lbl.disabled = false; //출력구분의 라벨체크
- checkbox1.disabled = false; //출력구분의 약체크
- checkbox2.disabled = false; //출력구분의 주사체크
- chk_lbl_drug.disabled = false; //출력구분의 약리스트체크
- chk_lbl_inj.disabled = false; //출력구분의 주사리스트체크
- combo1.disabled = false; //실출고부서
- checkbox7.disabled = false; //ATC순으로 정렬
-
- if(model.getValue("/root/init/lbltype/item2/lbltype") == "Y") {
- button4.visible = true;
- button6.visible = true;
- } else {
- button4.visible = false;
- button6.visible = false;
- }
-
- //cmb_ward.visible = true;
- model.setValue("/root/hidden/srchinfo/prcpflag", "");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.setValue("/root/hidden/srchinfo/wardcd", "");
- model.setValue("/root/hidden/srchinfo/wardnm", "");
- model.setValue("/root/temp/srchinfo/ward", "");
- model.setValue("/root/hidden/srchinfo/pid", "");
- //model.setValue("/root/hidden/srchinfo/autoprntflag", "");
- model.makeValue("/root/hidden/srchinfo/autoyn", "");
- btn_autoprnt_start.disabled = false;
- btn_autoprnt_end.disabled = true;
- model.setValue("/root/hidden/autoend", "Y") ;
- model.refresh();
- //재출력 가능
- checkbox3.disabled = false;
-
- group2.visible = "false";
- }
- }
- function fReStart(){
- window.clearinterval(gTimer2);
- window.maximize();
- gTimer = window.setInterval("fAutoPrnt()",11000);
- }
- /**
- * 자동출력
- */
- function fAutoPrnt() {
- window.clearinterval(gTimer);
- if ( model.getValue("/root/hidden/autoend") =="Y" ){
- gTimer = null;
- return;
- }
- var orgPrcpflag = model.getValue("/root/hidden/srchinfo/prcpflag");
- if ( chk_count >= 50 ){
- chk_count = 0;
- window.minimize();
- gTimer2 = window.setInterval("fReStart()",5000);
-
- return;
- }
- chk_count++;
- if ( ( chk_count % 4 )=="0" ){
- caption14.text="자동 출력중[/]";
- }
- if ( ( chk_count % 4 )=="1" ){
- caption14.text="자동 출력중[ ―]";
- }
- if ( ( chk_count % 4 )=="2" ){
- caption14.text="자동 출력중[\]";
- }
- if ( ( chk_count % 4 )=="3" ){
- caption14.text="자동 출력중[|]";
- }
- caption14.refresh();
-
- if(chk_sum_count >= 8){
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("M") > -1 ){ //20090721 이선경 수정 : 처방전 자동출력일때만 마감적용
- if (model.getValue("/root/hidden/srchinfo/autoendyn") =="Y") {
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("M") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "M");
- fHosInSum("N"); //Admission마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("W") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "W");
- fHosInSum("N"); //병동응급마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "L"); // 자동일때는 외출외박으로 처리하여 응급실 퇴원약 제외
- fHosInSum("N"); //퇴원약마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("G") >=0 ){
- model.setValue("/root/hidden/srchinfo/prcpflag", "G");
- fHosInSum("N"); //외박마감
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") >=0 ){
- //model.setValue("/root/hidden/srchinfo/prcpflag", "Q"); //마약만 마감
- //fHosInSum("N");
- }
- }
- model.setValue("/root/hidden/srchinfo/prcpflag", "");
- chk_sum_count = 0;
- }
- }
- chk_sum_count++;
-
- //퇴원 자동출력시 마감을 G로 해서 원래 L 값을 보내줘야함
- //model.setValue("/root/hidden/srchinfo/prcpflag", orgPrcpflag); //이훈재 막음. ( 옵션을 선택한 값임)
-
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("M") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "M");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
-
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
-
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("M"); //처방전출력
- }
- /*
- chk_ward.visible = false;
- if(model.getValue("/root/hidden/srchinfo/autoprntflag") == "" && model.getValue("/root/hidden/srchinfo/prcpflag") == ""){
- messageBox("처방구분을", "C001")
- return;
- }
- model.copyNode("/root/send/sumlistinfo", "/root/hidden/srchinfo");
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- submit("TRADT10205");
- if(model.getValue("/root/hidden/srchinfo/fst_drugno") != ""){
- model.setValue("/root/main/patlist/patlist/sel", "Y");
- }
- model.refresh();
- fPrcpMPSPrint("M"); //출력
- */
- }
-
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("L") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "L");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
- if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- }
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("L"); //라벨출력
- }
- }
-
- //물약라벨
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("Q") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "Q");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
- if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- }
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("Q"); //물약라벨출력
- //var gT1 = window.setInterval("fDelay()",10000);
- //window.clearinterval(gT1);
- }
- }
-
- //외용라벨
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("O") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "O");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
- if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- }
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("O"); //외용라벨출력
- //var gT1 = window.setInterval("fDelay()",10000);
- //window.clearinterval(gT1);
- }
- }
-
-
- //PTP라벨
- if ( model.getValue("/root/hidden/srchinfo/autokind").indexOf("P") > -1 ){
- model.setValue("/root/hidden/srchinfo/prntkind", "P");
- fInSumList(); //마감시간별 미출력데이터 조회
- for(var i = grd_sumlist.fixedRows; i < grd_sumlist.rows; i++){
- chk_prnt_count++;
- grd_sumlist.isSelected(i) = true;
- grd_sumlist.row = i;
- if (model.getValue("/root/hidden/srchinfo/autoyn") =="Y") {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "Y");
- } else {
- model.makeValue("/root/hidden/srchinfo/autolblyn", "");
- }
- fPrntPatList(); //마감시간별 미출력환자데이터 조회
-
- fPrcpMPSPrint("P"); //PTP라벨출력
- //var gT1 = window.setInterval("fDelay()",10000);
- //window.clearinterval(gT1);
- }
- }
-
- if (model.getValue("/root/hidden/srchinfo/autoatcyn") =="Y") {
- //ATC전송
- model.setValue("/root/send/atcinfo/drugdd", model.getValue("/root/hidden/srchinfo/prcpdd"));
-
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") > -1 ) {
- model.setValue("/root/send/atcinfo/drugflag", "L");
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- }
- if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") > -1 ) {
- model.setValue("/root/send/atcinfo/drugflag", "E");
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- }
- //if ( model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("L") == -1 && model.getValue("/root/hidden/srchinfo/autoprntflag").indexOf("E") == -1 ){
- model.setValue("/root/send/atcinfo/drugflag", "I");
-
- model.setValue("/root/send/atcinfo/instcd", model.getValue("/root/hidden/srchinfo/instcd"));
- submit("TXADT10202"); //ATC Data 전송(배치호출)
- //}
- }
- gTimer = window.setInterval("fAutoPrnt()",11000);
- }
- function fSleep(numberMillis) {
- var now = new Date();
- var exitTime = now.getTime() + numberMillis;
- while (true) {
- now = new Date();
- if (now.getTime() > exitTime)
- return;
- }
- }
- /**
- * 투약번호 변경시
- */
- function fChgDrugno(flag) {
- var bResult = true;
- if(flag == "first"){
- var chk = model.getValue("/root/hidden/srchinfo/fst_drugno");
- if(chk == ""){
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- model.refresh();
- bResult = false;
- } else {
- if(isNaN(chk)){
- messageBox("투약번호는 숫자로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.refresh();
- bResult = false;
- }
- if(chk.length > 5){
- messageBox("투약번호는 5자리미만으로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- model.refresh();
- bResult = false;
- }
- }
- } else if(flag == "last"){
- var chk_fst = model.getValue("/root/hidden/srchinfo/fst_drugno");
- var chk_last = model.getValue("/root/hidden/srchinfo/fst_drugno");
- if(chk_fst == ""){
- messageBox("첫번째 투약번호부터","C001");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- bResult = false;
- } else {
- if(isNaN(chk_fst)){
- messageBox("투약번호는 숫자로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- bResult = false;
- }
- if(chk_fst.length > 5 ){
- messageBox("투약번호는 5자리미만으로","C001");
- model.setValue("/root/hidden/srchinfo/fst_drugno", "");
- bResult = false;
- }
- if(isNaN(chk_last)){
- messageBox("투약번호는 숫자로","C001");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- bResult = false;
- }
- if(chk_last.length > 5 ){
- messageBox("투약번호는 5자리미만으로","C001");
- model.setValue("/root/hidden/srchinfo/last_drugno", "");
- bResult = false;
- }
- }
- model.refresh();
- }
- return bResult;
- }
- function fErrMsg () {
- var errorMsgPath = "/root/properties/error";
- if ( model.getValue ( "/root/properties/error/type" ) == "error" ) {
- window.load("../../../com/commonweb/xrw/SPZZZ00100_시스템에러.xrw","modeless","","width:514px;height:198px;align:center;","/root/properties/error","/root/main");
- }
- }
|