1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033 |
- /**
- * 파 일 명 : SPADT63300.js
- * 설 명 : (팝업)특조라벨출력 Javascriot
- * 설 계 자 : 이훈재
- * 작 성 자 : 이훈재
- * 수정이력 : 2007.09.29 / 최초작성 / 이훈재
- */
- var sSndMsg = ""; //라벨출력내용
- var iPoint = 0; //라벨출력row
- var iCnt = 0; //라벨출력매수
- var iImageCnt = 0; //라벨그래픽폰트수
- var gTimer = null;
- /**
- * 초기화
- */
- function fInit() {
- var sParam = model.getAttribute("params");
- model.makeValue("/root/send/prcpinfo/drugdd", astfMatrixData(sParam, 1, 0));
- model.makeValue("/root/send/prcpinfo/drugno", astfMatrixData(sParam, 1, 1));
- model.makeValue("/root/send/prcpinfo/ioflag", astfMatrixData(sParam, 1, 2));
- model.makeValue("/root/send/prcpinfo/prcpdd", astfMatrixData(sParam, 1, 3));
- model.makeValue("/root/send/prcpinfo/orddd", astfMatrixData(sParam, 1, 4));
- model.makeValue("/root/send/prcpinfo/cretno", astfMatrixData(sParam, 1, 5));
- model.makeValue("/root/send/prcpinfo/prcpgenrflag", astfMatrixData(sParam, 1, 6));
- model.makeValue("/root/send/prcpinfo/pid", astfMatrixData(sParam, 1, 7));
- model.makeValue("/root/send/prcpinfo/orddeptcd", astfMatrixData(sParam, 1, 8));
- model.makeValue("/root/send/prcpinfo/wardcd", astfMatrixData(sParam, 1, 9));
- model.makeValue("/root/send/prcpinfo/lblflag", astfMatrixData(sParam, 1, 10));
- model.makeValue("/root/send/prcpinfo/prcpflag", astfMatrixData(sParam, 1, 11));
- model.makeValue("/root/send/prcpinfo/prntflag", astfMatrixData(sParam, 1, 12));
- model.makeValue("/root/send/prcpinfo/drugflag", astfMatrixData(sParam, 1, 13));
- model.makeValue("/root/send/prcpinfo/prcpno", astfMatrixData(sParam, 1, 14));
- model.makeValue("/root/send/prcpinfo/prcpmixno", astfMatrixData(sParam, 1, 15));
- model.makeValue("/root/send/prcpinfo/spclblflag", astfMatrixData(sParam, 1, 16)); // 20100322_laboru.
- model.refresh();
-
- if(model.getValue("/root/send/prcpinfo/prcpflag") == "B"){
- submit("TRADT63302");
-
- if(model.getValue("/root/main/lbllist/lbllist["+1+"]/pid") != ""){
-
- fLBLChildTPNPrint();
- }
- } else {
- submit("TRADT63301");
-
- if(model.getValue("/root/main/lbllist/lbllist["+1+"]/drugno") != ""){
-
- fLBLPrint();
- }
- }
- model.refresh();
- gTimer = window.setInterval("fStopTimer()",20000);
- window.close();
- }
- /**
- *
- */
- function fStopTimer() {
- window.clearinterval(gTimer);
- }
- /**
- * 라벨출력
- */
- function fLBLPrint() {
- /*
- 라벨 Sorting 로직
- //mgt에서 vo로 리턴
- 대분류
- - 내복약, 외용약, 주사, 항암제, TPN, 마약,
- 중분류
- - 방법코드
- 소분류
- - 내복약,외용약(방법코드), 주사,마약,항암제(mix)
-
-
- web js 출력로직
- 1. mix가 있는경우
- 같은mix번호들만 모아서 한라벨에 출력
- 2. mix가 없는경우
- 2.1 내복약
- 2.1.1 라벨그룹
- 2.1.1.1 방법코드
- 2.2 외용약
- 2.2.1 라벨그룹
- 2.2.1.1 방법코드
- 2.3 주사약
- 2.3.1 라벨그룹
- 2.4 마약
- 2.4.1 방법코드
-
- */
- var iBfPoint = 0;
- var sPointChk = "N";
- var sMixno5 = "";
- var sMixno6 = "";
- var bCheck = false;
- /*
- //Comm 설정
- CommAX.CommPort = "1"; // 출력 Port
- CommAX.Settings = "9600,n,8,1"; // Comm 설정
- CommAX.Settings = "127.0.0.1"; // Comm 설정
- */
- var iChaTotCnt = 0;
- var iTotPrcpTimes = 0;
-
- PrnKind = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
- var commkind = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
- if ( PrnKind ==7 ) {
- CommAX.PrnKind =4;
- } else {
- CommAX.PrnKind =PrnKind;
- }
-
- if(commkind == "02") {
- CommAX.PortNm = 1;
- } else {
- CommAX.PortNm = 2;
- }
-
- if(commkind == "01") {
- CommAX.PrtNm = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
- }
- var reprint = "";
- //if ( CommAX.PortOpen() == true) {
- //alert("라벨 프린트 Open");
- //CommAX.SendMessage("^XA^SEE:UHANGUL.DAT^FS^CWQ,E:AAAAA.FNT^FS^CI26^FO100,50^AQN,40,40^FD이훈재ABCDEFGHI1234^FS^FO100,100^AQN,40,40^FD(주)한글인쇄테스트ABCDEFGHI1234^FS^FO100,150^AQN,40,40^FD A B C D E F G H I^FS^CI0^FO100,200^A0,50,50^FDPRINTING TEST^FS^FO100,250^BY2^B3N,N,100,Y,N,N^FD1232423423^FS^XZ");
-
- //CommAX.SendMessage("^XA^LH0,0^PRB^CF0,89^FO10,05^FDSH07^FS^CF0,70^FO260,05^FD10/10^FS^CF0,89^FO50,80^FD- 234567^FS^CFA20,20^FO10,150^FD1234567890^FS~DGGRAPH001,00504,021,0078000000E00000800000F01E000C00201FFC0000003C0000007007FFC00000F01E000C00201FFC000000006000003003000000C0701C00180060180C03000FFFF00FFE3003000000C0701C00180060180C0300061000061C300300000300783C003001E0101800C0007E000018300300C00300783C003001E0101800C000C30000303001FFE006006C6C006003600018006001818000603000180006006C6C006003600018006000C30000C03000180004006C6C00C0066000300020007E0001803000180004006C6C00C006600030002000180003003000181E0C0066CC0180186000600030001800060030FFFFFF0C0066CC018018600060003000181E1800207000000C00638C0300306000C00030FFFFFF0000000000000C00638C0300306000C000307000000000000000000400638C060060600180002000000000FFF00038000400638C0600606001800020007E00006060007E000600610C0C007FFC0180006000C30000006000C3000600610C0C007FFC018000600181800000400181800300600C18000060018000C001818000FFE00181800300600C18000060018000C001818000600001818000C0F03E300001F80180030000C30000600000C30000C0F03E300001F801800300007E00006060007E00000000000000000000000000003800003FF0003800000000000000000000000000^FO140,150^XGGRAPH001,1,1^FS~DGGRAPH002,00216,009,0000700000000001C00000380000000000E00000180000000000600000180000000000600FFF1807FFE0000060060E180300C03FFC60001C180000C0181C60003018000080001C600060180FFFC000186000D018070000001860018C180300000C18600307180300C006106606031801FFE006207F18001800000006006000001801860006036000001800C300061C6000001000C300FFE06000E00000C30070006000300000C31E000060003000FFFFFF000060003000700000000060003018000000000060001FFC000000000060000000000000000040^FO320,150^XGGRAPH002,1,1^FS^CFA20,20^FO10,180^FD2007-04-25^FS~DGGRAPH003,00240,010,002001E00000E0000080002001E000007007FFC0006006380000300300000060063800303003000001E00C1830183003000001E00C181818300300C003600800181BF001FFE0036008001FF830001800066018001818300018000660180018183000180018601BF0181BF000181E18601BF01FF830FFFFFF30601C1810103070000030601C180000200000006060180C0000000000006060180C0007000038007FFC0C0C000FC0007E007FFC0C0C00186000C30000600E1800303001818000600E1800303001818001F803E000303001818001F803E000186000C30000000000000FC0007E0000000000000700003800^FO140,180^XGGRAPH003,1,1^FS^CFE10,10^FO10,210^FDStomach 2/10^FS^CFA20,20^FO10,240^FDBiopsh^FS^PQ1^XZ");
- //CommAX.PortClose();
- //return;
- var sumcls ="";
- var ioflag = "";
- for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){
- if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls")!=""){
- sumcls =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls");
- ioflag =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ioflag");
- }
- }
-
- for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){
-
- var sMixno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno");
-
- if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblprnttims")>0 ){
- reprint ="(재)";
- }
-
- //차광일 경우 2매 출력
- if ( model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm") == "차광"){
- iChaTotCnt = 2;
- } else {
- iChaTotCnt = 1;
-
- if(sMixno != "-" && sMixno != ""){
- if(sumcls != "T" && sumcls != "Q" && sumcls != "B"){
- bCheck = false;
- sMixno5 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno");
- for(var iBCnt = iPoint; iBCnt <= getNodesetCount("/root/main/lbllist/lbllist") ; iBCnt++){
- sMixno6 = model.getValue("/root/main/lbllist/lbllist["+iBCnt+"]/prcpmixno");
-
- if(sMixno5 == sMixno6){
- if (model.getValue("/root/main/lbllist/lbllist["+iBCnt+"]/keepmthd2nm") !=""){
- iChaTotCnt = 2;
- break;
- }
-
- } else {
- bCheck = true;
- }
-
- if(bCheck){
- break;
- }
-
- }
- }
- }
-
- }
-
- iTotPrcpTimes = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
-
- //차광일 경우 2매 출력
- sPointChk = "N";
- for(var iChaCnt = 1 ; iChaCnt <= iChaTotCnt ; iChaCnt++) {
-
- //처방회수 만큼 출력한다.
- for(var iCntPrcpTimes = 1 ; iCntPrcpTimes <= iTotPrcpTimes ; iCntPrcpTimes++) {
-
- //재출력시 동일한 리스트를 출력하기 위해 iPoint를 이전 위치로 돌림.
- if(sPointChk == "Y") {
- iPoint = iBfPoint;
- } else {
- iBfPoint = iPoint;
- }
-
- //시작(X, Y)
- sSndMsg += astfStartFormat(0, 0);
- //라벨이름
- if(sumcls == "T"){
- sSndMsg += astfPrintOut(20, 25, 5, "[TPN]","");
- } else if(sumcls == "B"){
- sSndMsg += astfPrintOut(20, 25, 5, "[소아TPN]","");
- } else if(sumcls == "D"){
- sSndMsg += astfPrintOut(20, 25, 5, "[항암제]","");
- } else if(sumcls == "Q"){
- sSndMsg += astfPrintOut(20, 25, 5, "[TPN]","");
- } else if(sumcls == "1"){
- sSndMsg += astfPrintOut(20, 25, 5, "[면역억제제]","");
- } else {// if(sumcls == "C"){
- sSndMsg += astfPrintOut(20, 25, 5, "[무균조제]","");
- }
-
- if(PrnKind == "2") {
- //처방일자
- sSndMsg += astfPrintOut(500, 25, 3, fGetDateString(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd")),"");
- } else {
- //처방일자
- sSndMsg += astfPrintOut(400, 25, 3, fGetDateString(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdd")),"");
- }
-
- //현재페이지/전체페이지
- if(iTotPrcpTimes > 1) {
- sSndMsg += astfPrintOut(750, 25, 3, iCntPrcpTimes + "-" + iTotPrcpTimes,"");
- }
-
- //병실
- sSndMsg += astfPrintOut(20, 70, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),"");
- //sSndMsg += astfPrintOut(20, 70, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/orddeptnm"),"");
- // 외래 항암제 진료과
- if(sumcls == "D" && ioflag == "O"){
- if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd") == "") {
- sSndMsg += astfPrintOut(20, 70, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/orddeptnm"),"");
- }
- }
- //투약번호
- sSndMsg += astfPrintOut(290, 25, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugno") + reprint,"");
- //환자이름
- sSndMsg += astfPrintOut(180, 70, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),"");
- //환자번호
- sSndMsg += astfPrintOut(400, 70, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid"),"");
- //선그리기
- sSndMsg += astfGraphicBox(5, 110, 815, 0, 4);
- //return;
-
- if(sMixno != "-" && sMixno != ""){
- if(sumcls == "T" || sumcls == "Q"){
- fTPNDrugMixLBL(sumcls, iChaCnt, iChaTotCnt);
- } else if(sumcls == "B"){
- fTPNDrugMixLBL(sumcls, iChaCnt, iChaTotCnt);
- } else {//if(sumcls == "D"){
- fAntimeticsMixLBL(iChaCnt, iChaTotCnt);
- }
-
- } else {
- if(sumcls == "T" || sumcls == "Q"){
- fTPNDrugLBL(sumcls, iChaCnt, iChaTotCnt);
- } else if(sumcls == "B"){
- fTPNDrugLBL(sumcls, iChaCnt, iChaTotCnt);
- } else {// if(sumcls == "D"){
- fAntimeticsLBL(iChaCnt, iChaTotCnt);
- }
- }
-
- if((iChaCnt != iChaTotCnt) || (iCntPrcpTimes != iTotPrcpTimes)) {
- sPointChk = "Y";
- } else {
- sPointChk = "N";
- }
-
- sSndMsg += astfEndFormat(1);
-
- CommAX.SendMsg(sSndMsg);
- sSndMsg = "";
-
- }
-
- }
-
- }
-
- //CommAX.PortClose();
- model.refresh();
- //}
- }
- /**
- * mix 라벨
- */
- function fTPNDrugMixLBL(sc, pChaCnt, pChaTotCnt) {
- var sMixno1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno");
- var cnt = 0;
- var bContinue = false;
- var lblCnts2 ="";
- var tims = 0;
- var keepmthdnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm");
- var keepmthd2nm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm");
- var keepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd");
- var lblCnts1 =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1");
- var valitime =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/valitime");
- var drugDD = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugdd");
- tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
-
- for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){
-
- sMixno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpmixno");
- var qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty");
- var qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit");
- var stndvol = model.getValue("/root/main/lbllist/lbllist["+j+"]/stndvol");
- var stndunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/stndunit");
- var cntsvol = model.getValue("/root/main/lbllist/lbllist["+j+"]/cntsvol");
- var cntsunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/cntsunit");
- // tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims");
- var dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno");
- var sumcls = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls");
- if(sMixno1 == sMixno2){
- //
- sSndMsg += astfPrintOut(20, 130+(cnt*30), 3, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),"");
- if(PrnKind == "2") {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm").substring(0, 9),"");
- } else {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm").substring(0, 11),"");
- }
-
- //
- sSndMsg += astfPrintOut(390, 130+(cnt*30), 3, cntsvol);
- //
- sSndMsg += astfPrintOut(480, 130+(cnt*30), 3, cntsunit);
- //
- sSndMsg += astfPrintOut(540, 130+(cnt*30), 3, qty);
- //
- sSndMsg += astfPrintOut(630, 130+(cnt*30), 3, qtyunit);
- //
- sSndMsg += astfPrintOut(690, 130+(cnt*30), 3, stndvol);
- //
- sSndMsg += astfPrintOut(780, 130+(cnt*30), 3, stndunit);
- cnt++;
- } else {
- bContinue = true;
- }
-
- if(cnt == 5 || bContinue){
- break;
- }
- }
- iPoint = j-1;
- if ( sc !="Q" ){
- sSndMsg += astfPrintOut(20, 460, 3, "조제후("+valitime +") 시간이내투여","");
- }
- sSndMsg += astfPrintOut(440, 460, 3, keepmthdnm,"");
- sSndMsg += astfPrintOut(610, 500, 3, keepmthd2nm,"");
- if(pChaTotCnt > 1) {
- sSndMsg += astfPrintOut(660, 500, 3, pChaCnt + "/" + pChaTotCnt,"");
- }
- sSndMsg += astfPrintOut(20, 500, 3,"조제일자 : " + fGetDateString(drugDD) ,"");
- sSndMsg += astfPrintOut(20, 540, 3, lblCnts1 ,"");
-
- /*
- //출력 페이지수를 표시하기 위하여 상위(fLBLPrint)에서 for문으로 처리.
-
- //종료(매수) 차광은 2매
- if ( keepmthd2nm == "차광"){
- sSndMsg += astfEndFormat(2*tims);
- } else {
- sSndMsg += astfEndFormat(tims);
- }
-
- */
- }
- /**
- * TPN 라벨
- */
- function fTPNDrugLBL(sc, pChaCnt, pChaTotCnt) {
- var sSumCls1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls");
- var cnt = 0;
- var bContinue = false;
- var lblCnts2 ="";
- var tims = 0;
- var keepmthdnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm");
- var keepmthd2nm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm");
- var keepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd");
- var lblCnts1 =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1");
- var valitime =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/valitime");
- var drugDD = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugdd");
- tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
-
- for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){
- sSumCls2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls");
- var qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty");
- var qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit");
- var stndvol = model.getValue("/root/main/lbllist/lbllist["+j+"]/stndvol");
- var stndunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/stndunit");
- var cntsvol = model.getValue("/root/main/lbllist/lbllist["+j+"]/cntsvol");
- var cntsunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/cntsunit");
- // tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims");
- var dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno");
- var sumcls = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls");
- //var drugDD="";
- if(sSumCls1 == sSumCls2){
- //
- sSndMsg += astfPrintOut(20, 130+(cnt*30), 3, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),"");
- if(PrnKind == "2") {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm").substring(0, 9),"");
- } else {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm").substring(0, 11),"");
- }
- //
- sSndMsg += astfPrintOut(390, 130+(cnt*30), 3, cntsvol);
- //
- sSndMsg += astfPrintOut(480, 130+(cnt*30), 3, cntsunit);
- //
- sSndMsg += astfPrintOut(540, 130+(cnt*30), 3, qty);
- //
- sSndMsg += astfPrintOut(630, 130+(cnt*30), 3, qtyunit);
- //
- sSndMsg += astfPrintOut(690, 130+(cnt*30), 3, stndvol);
- //
- sSndMsg += astfPrintOut(780, 130+(cnt*30), 3, stndunit);
- cnt++;
- } else {
- bContinue = true;
- }
-
- //if(cnt == 5 || bContinue){
- if( bContinue){
- break;
- }
- }
- iPoint = j-1;
- if ( sc !="Q" ){
- sSndMsg += astfPrintOut(20, 460, 3, "조제후("+valitime +") 시간이내투여","");
- }
- sSndMsg += astfPrintOut(440, 500, 3, keepmthdnm,"");
- sSndMsg += astfPrintOut(610, 500, 3, keepmthd2nm,"");
- if(pChaTotCnt > 1) {
- sSndMsg += astfPrintOut(660, 500, 3, pChaCnt + "/" + pChaTotCnt,"");
- }
- sSndMsg += astfPrintOut(20, 500, 3,"조제일자 : " + fGetDateString(drugDD) ,"");
- sSndMsg += astfPrintOut(20, 540, 3, lblCnts1 ,"");
- /*
- //출력 페이지수를 표시하기 위하여 상위(fLBLPrint)에서 for문으로 처리.
-
- //종료(매수) 차광은 2매
- if ( keepmthd2nm == "차광"){
- sSndMsg += astfEndFormat(2*tims);
- } else {
- sSndMsg += astfEndFormat(tims);
- }
-
- */
-
- }
- function fAntimeticsMixLBL(pChaCnt, pChaTotCnt) {
- var sMixno1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpmixno");
- var cnt = 0;
- var bContinue = false;
- var lblCnts2 ="";
- var tims = 0;
- var keepmthdnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm");
- var keepmthd2nm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm");
- var keepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd");
- var lblCnts1 =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1");
- var valitime =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/valitime");
- var drugDD = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugdd");
- var voldivcd1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/voldivcd");
- var totqty = 0;
- var totstndvol = 0;
- var divcnt = 0;
- var totvolexptynCnt = 0 ; //2010-05-25 [요청번호:13894]-특수조제실 마스터에 총VOL제외 컬럼을 삽입하여 체크된 약품에 한해 라벨 출력시 총VOLUME 이 인쇄되지 않도록 처리
-
- tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
-
- for(var j = iPoint; j <= getNodesetCount("/root/main/lbllist/lbllist") ; j++){
-
- sMixno2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpmixno");
- var qty = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqty");
- var qtyunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpqtyunit");
- var stndvol = model.getValue("/root/main/lbllist/lbllist["+j+"]/stndvol");
- var stndunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/stndunit");
- var cntsvol = model.getValue("/root/main/lbllist/lbllist["+j+"]/cntsvol");
- var cntsunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/cntsunit");
- // tims = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcptims");
- var dayno = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdayno");
- var sumcls = model.getValue("/root/main/lbllist/lbllist["+j+"]/sumcls");
- var prcpdelivefact = model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpdelivefact");
- var voldivcd1 = "";
- var voldivcd2 = model.getValue("/root/main/lbllist/lbllist["+j+"]/voldivcd");
- var basevol = model.getValue("/root/main/lbllist/lbllist["+j+"]/basevol");
- var basevolunit = model.getValue("/root/main/lbllist/lbllist["+j+"]/basevolunit");
-
- if(sMixno1 == sMixno2){
- if ( model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthdnm") !=""){
- keepmthdnm = model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthdnm");
- }
- if ( model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthd2nm") !=""){
- keepmthd2nm = model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthd2nm");
- }
- if ( model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthd") !=""){
- keepmthd = model.getValue("/root/main/lbllist/lbllist["+j+"]/keepmthd");
- }
- if ( model.getValue("/root/main/lbllist/lbllist["+j+"]/lblcnts1") !=""){
- lblCnts1 =model.getValue("/root/main/lbllist/lbllist["+j+"]/lblcnts1");
- }
- if ( model.getValue("/root/main/lbllist/lbllist["+j+"]/valitime") !=""){
- valitime =model.getValue("/root/main/lbllist/lbllist["+j+"]/valitime");
- }
-
- //
- sSndMsg += astfPrintOut(20, 130+(cnt*30), 3, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpcd"),"");
- if(PrnKind == "2") {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm").substring(0, 9),"");
- } else {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+j+"]/prcpnm").substring(0, 11),"");
- }
- //
- sSndMsg += astfPrintOut(390, 130+(cnt*30), 3, cntsvol);
- //
- sSndMsg += astfPrintOut(480, 130+(cnt*30), 3, cntsunit);
- //
- sSndMsg += astfPrintOut(540, 130+(cnt*30), 3, qty);
- //
- sSndMsg += astfPrintOut(630, 130+(cnt*30), 3, qtyunit);
- //
- sSndMsg += astfPrintOut(690, 130+(cnt*30), 3, stndvol);
- //
- sSndMsg += astfPrintOut(780, 130+(cnt*30), 3, stndunit);
- cnt++;
-
- /*if ( prcpdelivefact != "-" && prcpdelivefact != "" ) {
- if ( prcpdelivefact.substring(0,3) =="총용량") {
- sSndMsg += astfPrintOut(20, 130+(cnt*30), 3, " ","");
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 3, prcpdelivefact,"");
- cnt++;
- }
- }*/
-
- if(voldivcd2 != 0 && voldivcd1 != voldivcd2){
- voldivcd1 = voldivcd2;
- };
-
- if(voldivcd1 == voldivcd2){
- //총용량
- if(cntsunit != basevolunit) {//용량분할기준용량과 단위가 다를경우는 기준용량단위로 환산
- totqty += Number(basevol) * Number(qty);
- } else {
- totqty += Number(cntsvol);
- }
- //총 volume
- totstndvol += Number(stndvol);
-
- //2010-05-25 [요청번호:13894]-특수조제실 마스터에 총VOL제외 컬럼을 삽입하여 체크된 약품에 한해 라벨 출력시 총VOLUME 이 인쇄되지 않도록 처리
- if (model.getValue("/root/main/lbllist/lbllist["+j+"]/totvolexptyn") == "Y") {
- totvolexptynCnt++; // 처방코드중 하나라도 [총VOL제외]에 Check되어 있으면 총 Volume 출력하지 않는다.
- }
-
- //용량분할관리대상인 코드의 개수
- divcnt++;
- if( j < getNodesetCount("/root/main/lbllist/lbllist") ) {
- var idx = j+1;
- var voldivcd3 = model.getValue("/root/main/lbllist/lbllist["+ idx +"]/voldivcd");
- var sMixno3 = model.getValue("/root/main/lbllist/lbllist["+idx+"]/prcpmixno");
-
- if(divcnt > 1 && (sMixno2 != sMixno3 || voldivcd2 != voldivcd3 ) ){
- //2010-06-08 계산되어 지면서 소숫점아래의 숫자가 0.009999999999999 발생되는경우가 있음
- // (곱셈이라 0.00999999 발생될수 없은 상황인데.. 발생되고 있음 <<<10*0.963+50 = 59.629999999 발생됨>>>)
- // 그래서 강제로 4자리 반올림처리함.
- totqty = totqty.toString().getRound(-4, "HALF_UP");
-
- if(stndvol > 0) {//재구성농도가 있을경우만 volume 출력
- var cmt = "총용량 : " + totqty + " " + basevolunit + " 총 Volume : " + ((Math.floor(totstndvol * 1000))/1000) + " " + stndunit;
- } else {
- var cmt = "총용량 : " + totqty + " " + basevolunit;
- }
-
- //2010-05-25 [요청번호:13894]-특수조제실 마스터에 총VOL제외 컬럼을 삽입하여 체크된 약품에 한해 라벨 출력시 총VOLUME 이 인쇄되지 않도록 처리
- if ( totvolexptynCnt > 0 ) { // 처방코드중 하나라도 [총VOL제외]에 Check되어 있으면 총 Volume 출력하지 않는다.
- var cmt = "총용량 : " + totqty + " " + basevolunit;
- }
-
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 3, cmt ,"");
- cnt++;
- totqty = 0;
- totstndvol = 0;
- divcnt = 0;
- totvolexptynCnt = 0; //2010-05-25 [요청번호:13894]-특수조제실 마스터에 총VOL제외 컬럼을 삽입하여 체크된 약품에 한해 라벨 출력시 총VOLUME 이 인쇄되지 않도록 처리
- }
-
- } else if(divcnt > 1 && (j = getNodesetCount("/root/main/lbllist/lbllist")) ){
-
- //2010-06-08 계산되어 지면서 소숫점아래의 숫자가 0.009999999999999 발생되는경우가 있음
- // (곱셈이라 0.00999999 발생될수 없은 상황인데.. 발생되고 있음 <<<10*0.963+50 = 59.629999999 발생됨>>>)
- // 그래서 강제로 4자리 반올림처리함.
- totqty = totqty.toString().getRound(-4, "HALF_UP");
-
- if(stndvol > 0) {//재구성농도가 있을경우만 volume 출력
- var cmt = "총용량 : " + totqty + " " + basevolunit + " 총 Volume : " + ((Math.floor(totstndvol * 1000))/1000) + " " + stndunit;
- } else {
- var cmt = "총용량 : " + totqty + " " + basevolunit ;
- }
- //2010-05-25 [요청번호:13894]-특수조제실 마스터에 총VOL제외 컬럼을 삽입하여 체크된 약품에 한해 라벨 출력시 총VOLUME 이 인쇄되지 않도록 처리
- if ( totvolexptynCnt > 0 ) { // 처방코드중 하나라도 [총VOL제외]에 Check되어 있으면 총 Volume 출력하지 않는다.
- var cmt = "총용량 : " + totqty + " " + basevolunit;
- }
-
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 3, cmt ,"");
- cnt++;
- totqty = 0;
- totstndvol = 0;
- divcnt = 0;
- totvolexptynCnt = 0; //2010-05-25 [요청번호:13894]-특수조제실 마스터에 총VOL제외 컬럼을 삽입하여 체크된 약품에 한해 라벨 출력시 총VOLUME 이 인쇄되지 않도록 처리
- }
- }
-
- } else {
- bContinue = true;
- }
-
- //if(cnt == 5 || bContinue){
- if(bContinue){
- break;
- }
- }
- iPoint = j-1;
- sSndMsg += astfPrintOut(20, 500, 3, "조제후("+valitime +") 시간이내투여","");
- sSndMsg += astfPrintOut(440, 540, 3, keepmthdnm,"");
- sSndMsg += astfPrintOut(610, 540, 3, keepmthd2nm,"");
- if(pChaTotCnt > 1) {
- sSndMsg += astfPrintOut(660, 540, 3, pChaCnt + "/" + pChaTotCnt,"");
- }
- sSndMsg += astfPrintOut(20, 540, 3,"조제일자 : " + fGetDateString(drugDD) ,"");
- sSndMsg += astfPrintOut(20, 580, 3, lblCnts1 ,"");
- /*
- //출력 페이지수를 표시하기 위하여 상위(fLBLPrint)에서 for문으로 처리.
-
- //종료(매수) 차광은 2매
- if ( keepmthd2nm == "차광"){
- sSndMsg += astfEndFormat(2*tims);
- } else {
- sSndMsg += astfEndFormat(tims);
- }
-
- */
- }
- /**
- * 항암제 라벨
- */
- function fAntimeticsLBL(pChaCnt, pChaTotCnt) {
- var sSumCls1 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls");
- var cnt = 0;
- var bContinue = false;
- var lblCnts2 ="";
- var tims = 0;
- var keepmthdnm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm");
- var keepmthd2nm = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm");
- var keepmthd = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd");
-
- var lblCnts1 =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1");
- var valitime =model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/valitime");
- var drugDD = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugdd");
- sSumCls2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls");
- var qty = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpqty");
- var qtyunit = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpqtyunit");
- var stndvol = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/stndvol");
- var stndunit = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/stndunit");
- var cntsvol = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/cntsvol");
- var cntsunit = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/cntsunit");
- tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
- var dayno = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdayno");
- var sumcls = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/sumcls");
- //var drugDD="";
-
- //
- sSndMsg += astfPrintOut(20, 130+(cnt*30), 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd"),"");
- if(PrnKind == "2") {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm").substring(0, 9),"");
- } else {
- //
- sSndMsg += astfPrintOut(170, 130+(cnt*30), 2, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpnm").substring(0, 11),"");
- }
- //
- sSndMsg += astfPrintOut(390, 130+(cnt*30), 3, cntsvol);
- //
- sSndMsg += astfPrintOut(480, 130+(cnt*30), 3, cntsunit);
- //
- sSndMsg += astfPrintOut(540, 130+(cnt*30), 3, qty);
- //
- sSndMsg += astfPrintOut(630, 130+(cnt*30), 3, qtyunit);
- //
- sSndMsg += astfPrintOut(690, 130+(cnt*30), 3, stndvol);
- //
- sSndMsg += astfPrintOut(780, 130+(cnt*30), 3, stndunit);
-
- //iPoint = j-1;
- if(valitime != "") {
- sSndMsg += astfPrintOut(20, 460, 3, "조제후("+valitime +") 시간이내투여","");
- }
- sSndMsg += astfPrintOut(440, 540, 3, keepmthdnm,"");
- sSndMsg += astfPrintOut(610, 540, 3, keepmthd2nm,"");
- if(pChaTotCnt > 1) {
- sSndMsg += astfPrintOut(660, 540, 3, pChaCnt + "/" + pChaTotCnt,"");
- }
- sSndMsg += astfPrintOut(20, 540, 3,"조제일자 : " + fGetDateString(drugDD) ,"");
- sSndMsg += astfPrintOut(20, 580, 3, lblCnts1 ,"");
-
- /*
- //출력 페이지수를 표시하기 위하여 상위(fLBLPrint)에서 for문으로 처리.
-
- //종료(매수) 차광은 2매
- if ( keepmthd2nm == "차광"){
- sSndMsg += astfEndFormat(2*tims);
- } else {
- sSndMsg += astfEndFormat(tims);
- }
-
- */
-
- }
- /**
- * 소아TPN 라벨출력
- */
- function fLBLChildTPNPrint() {
- /*
- 라벨 Sorting 로직
- calclipidcvol != 0 면 라벨 1번 출력
- 라벨 2번 출력 기본
- 차광이면 2장 출력 (최대 4장출력가능)
-
- */
-
- // Comm 설정
- //CommAX.CommPort = "1"; // 출력 Port
- //CommAX.Settings = "9600,n,8,1"; // Comm 설정
- //CommAX.Settings = "127.0.0.1"; // Comm 설정
- PrnKind = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/prntkind");
- PrnMarginLeft = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/blank/left");
- PrnMarginTop = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/blank/top");
- var commkind = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/commkind")
- CommAX.PrnKind =PrnKind;
-
- if(commkind == "02") {
- CommAX.PortNm = 1;
- } else {
- CommAX.PortNm = 2;
- }
-
- if(commkind == "01") {
- CommAX.PrtNm = model.getvalue("/root/init/barcdprntsetup/prntsetupinfo/setupinfo/comm01/setupval");
- }
-
- //if ( CommAX.PortOpen() == true) {
- for(iPoint = 1; iPoint <= getNodesetCount("/root/main/lbllist/lbllist") ; iPoint++){
- var sKeepMthd2 = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm");
- var sOrdLipidVol = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordlipidvol");
- if(sKeepMthd2 != ""){
- if(parseFloat(sOrdLipidVol) > 0){
- fLBL1ChildTPNPrint("1/2");
- fLBL1ChildTPNPrint("2/2");
- }
- fLBL2ChildTPNPrint("1/2");
- fLBL2ChildTPNPrint("2/2");
- } else {
- if(parseFloat(sOrdLipidVol) > 0){
- fLBL1ChildTPNPrint("1/1");
- }
- fLBL2ChildTPNPrint("1/1");
- }
-
- }
-
- //CommAX.PortClose();
- model.refresh();
- //}
- }
- /**
- * 소아TPN 라벨 1 출력
- */
- function fLBL1ChildTPNPrint(prnt_page) {
- //처방횟수
- var tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
-
- //시작(X, Y)
- sSndMsg = astfStartFormat(0, 0);
- //상단
- //라벨이름
- sSndMsg += astfPrintOut(30, 40, 3, "소아정맥영양제","");
- //처방명
- sSndMsg += astfPrintOut(200, 40, 3, "< Group Code : "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd"),"");
- //병실
- sSndMsg += astfPrintOut(600, 40, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),"");
- //페이지
- sSndMsg += astfPrintOut(750, 40, 3, prnt_page,"");
- //drugpath
- sSndMsg += astfPrintOut(30, 80, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugpathnm"),"");
- //maturation
- sSndMsg += astfPrintOut(280, 80, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/maturationflagnm"),"");
- //wt
- sSndMsg += astfPrintOut(530, 80, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/wt")+"kg","");
- //환자번호
- sSndMsg += astfPrintOut(30, 120, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid"),"");
- //환자명
- sSndMsg += astfPrintOut(280, 120, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),"");
- //투여속도
- sSndMsg += astfPrintOut(530, 120, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugspdnm"),"");
-
-
- //중단
- //
- sSndMsg += astfPrintOut(30, 180, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lipiddrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(210, 180, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordlipidvol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 180, 3, "ml","");
- //
- sSndMsg += astfPrintOut(30, 220, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/heparindrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(210, 220, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordheparinvol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 220, 3, "IU","");
- //총열량
- sSndMsg += astfPrintOut(30, 420, 3, "총열량","");
- //총열량
- sSndMsg += astfPrintOut(210, 420, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordcalr2"),"");
- //총열량
- sSndMsg += astfPrintOut(320, 420, 3, "Kcal","");
-
-
- //하단
- //투여제한시간
- sSndMsg += astfPrintOut(30, 500, 3, "조제후 ("+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/valitime")+") 시간이내투여","");
- //냉장보관
- if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm") != ""){
- sSndMsg += astfPrintOut(440, 500, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm"),"");
- }
- //차광
- sSndMsg += astfPrintOut(610, 500, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm"),"");
- //처방입력일시
- sSndMsg += astfPrintOut(30, 540, 3, "처방일:"+fGetDateString(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/rgstdt")),"");
- //조제일자
- sSndMsg += astfPrintOut(390, 540, 3, "조제일자:"+fGetDateString(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugdd")),"");
-
- sSndMsg += astfPrintOut(30, 580, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1") ,"");
-
- sSndMsg += astfEndFormat(tims);
- CommAX.SendMsg(sSndMsg);
- }
- /**
- * 소아TPN 라벨 2 출력
- */
- function fLBL2ChildTPNPrint(prnt_page) {
- //처방횟수
- var tims = model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcptims");
-
- //시작(X, Y)
- sSndMsg = astfStartFormat(0, 0);
- //상단
- //라벨이름
- sSndMsg += astfPrintOut(30, 40, 3, "소아정맥영양제","");
- //처방명
- sSndMsg += astfPrintOut(200, 40, 3, "< Group Code : "+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpcd"),"");
- //병실
- sSndMsg += astfPrintOut(600, 40, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/roomcd"),"");
- //페이지
- sSndMsg += astfPrintOut(750, 40, 3, prnt_page,"");
- //drugpath
- sSndMsg += astfPrintOut(30, 80, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugpathnm"),"");
- //maturation
- sSndMsg += astfPrintOut(280, 80, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/maturationflagnm"),"");
- //wt
- sSndMsg += astfPrintOut(530, 80, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/wt")+"Kg","");
- //환자번호
- sSndMsg += astfPrintOut(30, 120, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pid"),"");
- //환자명
- sSndMsg += astfPrintOut(280, 120, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/patnm"),"");
- //투여속도
- sSndMsg += astfPrintOut(530, 120, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugspdnm"),"");
-
-
- //중단
- //
- sSndMsg += astfPrintOut(30, 180, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/dexdrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(210, 180, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/orddexvol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 180, 3, "ml","");
- //
- sSndMsg += astfPrintOut(30, 220, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/orddrug"),"");
- //용량
- sSndMsg += astfPrintOut(210, 220, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcpdistvol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 220, 3, "ml","");
- //
- sSndMsg += astfPrintOut(30, 260, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/aminodrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(210, 260, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordaminovol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 260, 3, "ml","");
- //
- sSndMsg += astfPrintOut(30, 300, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/pdrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(210, 300, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordpvol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 300, 3, "ml","");
- //
- sSndMsg += astfPrintOut(30, 340, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/nadrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(210, 340, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordnavol"),"");
- //단위
- sSndMsg += astfPrintOut(320, 340, 3, "ml","");
- //
- sSndMsg += astfPrintOut(430, 180, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/kdrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(610, 180, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordkvol"),"");
- //단위
- sSndMsg += astfPrintOut(720, 180, 3, "ml","");
- //
- sSndMsg += astfPrintOut(430, 220, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/mgdrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(610, 220, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordmgvol"),"");
- //단위
- sSndMsg += astfPrintOut(720, 220, 3, "ml","");
- //
- sSndMsg += astfPrintOut(430, 260, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/traceeledrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(610, 260, 3, parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/traceelevol")) * parseFloat(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/prcprate")),"");
- //단위
- sSndMsg += astfPrintOut(720, 260, 3, "ml","");
- //
- sSndMsg += astfPrintOut(430, 300, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/cadrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(610, 300, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordcavol"),"");
- //단위
- sSndMsg += astfPrintOut(720, 300, 3, "ml","");
- //
- sSndMsg += astfPrintOut(430, 340, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/multivitadrugcd"),"");
- //용량
- sSndMsg += astfPrintOut(610, 340, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordmultivitavol"),"");
- //단위
- sSndMsg += astfPrintOut(720, 340, 3, "ml","");
- //총열량
- sSndMsg += astfPrintOut(30, 420, 3, "총열량","");
- //총열량
- sSndMsg += astfPrintOut(210, 420, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/ordcalr1"),"");
- //총열량
- sSndMsg += astfPrintOut(320, 420, 3, "Kcal","");
-
- //하단
- //투여제한시간
- sSndMsg += astfPrintOut(30, 500, 3, "조제후 ("+model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/valitime")+") 시간이내투여","");
- //냉장보관
- if(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm") != ""){
- sSndMsg += astfPrintOut(440, 500, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthdnm"),"");
- }
- //차광
- sSndMsg += astfPrintOut(610, 500, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/keepmthd2nm"),"");
- //처방입력일시
- sSndMsg += astfPrintOut(30, 540, 3, "처방일:"+fGetDateString(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/rgstdt")),"");
- //조제일자
- sSndMsg += astfPrintOut(390, 540, 3, "조제일자:"+fGetDateString(model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/drugdd")),"");
-
- sSndMsg += astfPrintOut(30, 580, 3, model.getValue("/root/main/lbllist/lbllist["+iPoint+"]/lblcnts1") ,"");
-
- sSndMsg += astfEndFormat(tims);
- CommAX.SendMsg(sSndMsg);
- }
- /**
- *
- */
- function fGetImage() {
- var pImage = "";
- iImageCnt++;
- if(iImageCnt > 99){
- pImage = "GRAPH"+iImageCnt;
- } else if(iImageCnt > 9){
- pImage = "GRAPH0"+iImageCnt;
- } else {
- pImage = "GRAPH00"+iImageCnt;
- }
- return pImage
- }
- function fGetDateString( s ){
- var dates = "";
- if(s.length > 8){
- dates = s.substring(0,4) +"/" +s.substring(4,6)+"/" +s.substring(6,8)+" "+s.substring(8,10)+":"+s.substring(10,12)+":"+s.substring(12,14);
- } else {
- dates = s.substring(0,4) +"/" +s.substring(4,6)+"/" +s.substring(6,8);
- }
- return dates;
- }
|