[628] | 1 | FHLABEL ; HISC/RTK - Laser label sheet build and display;9/27/02 9:25
|
---|
| 2 | ;;5.5;DIETETICS;;Jan 28, 2005
|
---|
| 3 | LAB ;
|
---|
| 4 | S FHCOL=$S(LAB=3:3,1:2)
|
---|
| 5 | I LABSTART>1 F FHLABST=1:1:(LABSTART-1)*FHCOL D S LABSTART=1
|
---|
| 6 | .I LAB=3 S (PCL1,PCL2,PCL3,PCL4,PCL5,PCL6)="" D LL3^FHLABEL
|
---|
| 7 | .I LAB=4 S (PCL1,PCL2,PCL3,PCL4,PCL5,PCL6,PCL7,PCL8)="" D LL4^FHLABEL
|
---|
| 8 | .Q
|
---|
| 9 | S FHTAB=$S(LAB=3:24,1:37)
|
---|
| 10 | S BIDX1=BID_$E(" ",1,12-$L(BID))_X1,BXLN=$L(BIDX1)
|
---|
| 11 | S N1=$E(N1,1,FHTAB-$L(W1)),DTP=$E(DTP,1,9)
|
---|
| 12 | S FLG=0,(LS,LS2)="" I LAB>2 F D=1:1:5 D Q:FLG=1
|
---|
| 13 | .S P=$P(Y,", ",D) I P="" S FLG=1 Q
|
---|
| 14 | .S TL=$L(LS)+$L(P)+1,NUM=$S(LAB=3:26,1:38)
|
---|
| 15 | .I TL<NUM S LS=LS_P_","
|
---|
| 16 | .I TL>(NUM-1) S LS2=LS2_P_","
|
---|
| 17 | S LNA=N1_$J(W1,FHTAB+1-$L(N1)),LNB=BIDX1_$J(R1,FHTAB+1-$L(BIDX1))
|
---|
| 18 | S LNC=$S(LS2="":$E(LS,1,$L(LS)-1),1:LS)
|
---|
| 19 | S LND=$E(LS2,1,$L(LS2)-1)
|
---|
| 20 | I LAB=3 S PCL1="",PCL2=LNA,PCL3=LNB,PCL4=LNC,PCL5=$E(LND,1,25),PCL6=DTP D LL3 Q
|
---|
| 21 | I LAB=4 S (PCL1,PCL2,PCL8)="",PCL3=LNA,PCL4=LNB,PCL5=LNC,PCL6=$E(LND,1,38),PCL7=DTP D LL4 Q
|
---|
| 22 | Q
|
---|
| 23 | LL3 ;LASER LABEL PRINT - AVERY 5160
|
---|
| 24 | S COUNT=COUNT+1 I COUNT>1,COUNT#3=1 S LINE=LINE+6
|
---|
| 25 | S ^TMP($J,"DL3",LINE)=$G(^TMP($J,"DL3",LINE))_PCL1_U
|
---|
| 26 | S ^TMP($J,"DL3",LINE+1)=$G(^TMP($J,"DL3",LINE+1))_PCL2_U
|
---|
| 27 | S ^TMP($J,"DL3",LINE+2)=$G(^TMP($J,"DL3",LINE+2))_PCL3_U
|
---|
| 28 | S ^TMP($J,"DL3",LINE+3)=$G(^TMP($J,"DL3",LINE+3))_PCL4_U
|
---|
| 29 | S ^TMP($J,"DL3",LINE+4)=$G(^TMP($J,"DL3",LINE+4))_PCL5_U
|
---|
| 30 | S ^TMP($J,"DL3",LINE+5)=$G(^TMP($J,"DL3",LINE+5))_PCL6_U
|
---|
| 31 | Q
|
---|
| 32 | LL4 ;LASER LABEL PRINT - AVERY 5162
|
---|
| 33 | S COUNT=COUNT+1 I COUNT>1,COUNT#2=1 S LINE=LINE+8
|
---|
| 34 | S ^TMP($J,"DL4",LINE)=$G(^TMP($J,"DL4",LINE))_PCL1_U
|
---|
| 35 | S ^TMP($J,"DL4",LINE+1)=$G(^TMP($J,"DL4",LINE+1))_PCL2_U
|
---|
| 36 | S ^TMP($J,"DL4",LINE+2)=$G(^TMP($J,"DL4",LINE+2))_PCL3_U
|
---|
| 37 | S ^TMP($J,"DL4",LINE+3)=$G(^TMP($J,"DL4",LINE+3))_PCL4_U
|
---|
| 38 | S ^TMP($J,"DL4",LINE+4)=$G(^TMP($J,"DL4",LINE+4))_PCL5_U
|
---|
| 39 | S ^TMP($J,"DL4",LINE+5)=$G(^TMP($J,"DL4",LINE+5))_PCL6_U
|
---|
| 40 | S ^TMP($J,"DL4",LINE+6)=$G(^TMP($J,"DL4",LINE+6))_PCL7_U
|
---|
| 41 | S ^TMP($J,"DL4",LINE+7)=$G(^TMP($J,"DL4",LINE+7))_PCL8_U
|
---|
| 42 | Q
|
---|
| 43 | DPLL ;
|
---|
| 44 | I LAB=3 D DPLL3 Q
|
---|
| 45 | I LAB=4 D DPLL4 Q
|
---|
| 46 | Q
|
---|
| 47 | DPLL3 ;
|
---|
| 48 | S COUNT=0 W !! F FHLL=1:6 Q:'$D(^TMP($J,"DL3",FHLL)) D
|
---|
| 49 | .S COUNT=COUNT+1
|
---|
| 50 | .I COUNT=11 W @IOF,!! S COUNT=1
|
---|
| 51 | .S LINE1=^TMP($J,"DL3",FHLL),LINE2=^TMP($J,"DL3",FHLL+1)
|
---|
| 52 | .S LINE3=^TMP($J,"DL3",FHLL+2),LINE4=^TMP($J,"DL3",FHLL+3)
|
---|
| 53 | .S LINE5=^TMP($J,"DL3",FHLL+4),LINE6=^TMP($J,"DL3",FHLL+5)
|
---|
| 54 | .F L=LINE1,LINE2,LINE3,LINE4,LINE5,LINE6 D
|
---|
| 55 | ..W !,$P(L,U,1),?27,$P(L,U,2),?55,$P(L,U,3)
|
---|
| 56 | Q
|
---|
| 57 | DPLL4 ;
|
---|
| 58 | S COUNT=0 W !!!! F FHLL=1:8 Q:'$D(^TMP($J,"DL4",FHLL)) D
|
---|
| 59 | .S COUNT=COUNT+1
|
---|
| 60 | .I COUNT=8 W @IOF,!!!! S COUNT=1
|
---|
| 61 | .S LINE1=^TMP($J,"DL4",FHLL),LINE2=^TMP($J,"DL4",FHLL+1)
|
---|
| 62 | .S LINE3=^TMP($J,"DL4",FHLL+2),LINE4=^TMP($J,"DL4",FHLL+3)
|
---|
| 63 | .S LINE5=^TMP($J,"DL4",FHLL+4),LINE6=^TMP($J,"DL4",FHLL+5)
|
---|
| 64 | .S LINE7=^TMP($J,"DL4",FHLL+6),LINE8=^TMP($J,"DL4",FHLL+7)
|
---|
| 65 | .F L=LINE1,LINE2,LINE3,LINE4,LINE5,LINE6,LINE7,LINE8 D
|
---|
| 66 | ..W !,$P(L,U,1),?42,$P(L,U,2)
|
---|
| 67 | Q
|
---|