ABMFPRT ;IHS/SET/DMJ - GENERIC FORM PRINTER
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;device is open and ready to go
EN(ABMFP) ;PEP - enter here
S ABMLEFT=+$P($G(^ABMDEXP(ABMP("EXP"),0)),"^",2)
S ABMTOP=+$P($G(^ABMDEXP(ABMP("EXP"),0)),"^",3)
D PAGE
LOOP ;loop through abmfp array
S I=0
F S I=$O(ABMFP(I)) Q:'I D
.D LINE
.S J=0
.F S J=$O(ABMFP(I,J)) Q:'J D
..D ONE
Q
PAGE ;new page
W $$EN^ABMVDF("IOF")
W $C(13)
S ABMLINE=1
S ABMLINE=ABMLINE+ABMTOP
Q
LINE ;carriage return to correct line
F D Q:'(ABMLINE<I)
.Q:'(ABMLINE<I)
.W !
.S ABMLINE=ABMLINE+1
Q
ONE ;write one data element
W ?(J+ABMLEFT)
W ABMFP(I,J)
Q
ABMFPRT ;IHS/SET/DMJ - GENERIC FORM PRINTER
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;device is open and ready to go
EN(ABMFP) ;PEP - enter here
+1 SET ABMLEFT=+$PIECE($GET(^ABMDEXP(ABMP("EXP"),0)),"^",2)
+2 SET ABMTOP=+$PIECE($GET(^ABMDEXP(ABMP("EXP"),0)),"^",3)
+3 DO PAGE
LOOP ;loop through abmfp array
+1 SET I=0
+2 FOR
SET I=$ORDER(ABMFP(I))
IF 'I
QUIT
Begin DoDot:1
+3 DO LINE
+4 SET J=0
+5 FOR
SET J=$ORDER(ABMFP(I,J))
IF 'J
QUIT
Begin DoDot:2
+6 DO ONE
End DoDot:2
End DoDot:1
+7 QUIT
PAGE ;new page
+1 WRITE $$EN^ABMVDF("IOF")
+2 WRITE $CHAR(13)
+3 SET ABMLINE=1
+4 SET ABMLINE=ABMLINE+ABMTOP
+5 QUIT
LINE ;carriage return to correct line
+1 FOR
Begin DoDot:1
+2 IF '(ABMLINE<I)
QUIT
+3 WRITE !
+4 SET ABMLINE=ABMLINE+1
End DoDot:1
IF '(ABMLINE<I)
QUIT
+5 QUIT
ONE ;write one data element
+1 WRITE ?(J+ABMLEFT)
+2 WRITE ABMFP(I,J)
+3 QUIT