28 lines
1.1 KiB
Mathematica
28 lines
1.1 KiB
Mathematica
ORPR08 ; slc/dcm - Work Copies ; 07 Dec 99 01:43PM
|
|
;;3.0;ORDER ENTRY/RESULTS REPORTING;**69,132**;Dec 17, 1997
|
|
WRK ;
|
|
I '$S($P($G(^OR(100,+ORIFN,3)),"^",3)'=11:1,1:0) Q
|
|
N ORX,OR3,ORPK,ORTCNT,ORPKG
|
|
D GET^ORPR01(ORIFN)
|
|
Q:'$L(ORX)
|
|
D CPRINT^ORPR01(ORIFN)
|
|
Q
|
|
WRKSET ;Setup
|
|
S ORXPND=$$GET^XPAR("ALL","ORPF EXPAND CONTINUOUS ORDERS",1,"I")
|
|
S ORHEAD=$$GET^XPAR("ALL","ORPF WORK COPY HEADER",1,"I")
|
|
S ORFOOT=$$GET^XPAR("ALL","ORPF WORK COPY FOOTER",1,"I")
|
|
S (OROFMT,ORFMT)=$$GET^XPAR("ALL","ORPF WORK COPY FORMAT",1,"I")
|
|
S ORIOSL=IOSL I +ORFOOT,$D(^ORD(100.23,ORFOOT,0)) S ORBOT=$P(^(0),"^",2),ORIOSL=IOSL-ORBOT
|
|
S ORIOF=IOF I +ORHEAD D PRINT^ORPR00(ORHEAD,1)
|
|
S IOF="!" I +OROFMT S ORFMT=OROFMT
|
|
Q
|
|
WRKCLN ;Cleanup
|
|
G:+$G(OREND) WKCX
|
|
S ORFOOT=$$GET^XPAR("ALL","ORPF WORK COPY FOOTER",1,"I")
|
|
I +ORFOOT S:IOF?1"!"."!" $P(IOF,"!",$S(ORIOSL>200:200,ORIOSL-$Y>1:ORIOSL-$Y,1:2))="" D PRINT^ORPR00(ORFOOT,1)
|
|
I $E(IOST)="C" D
|
|
. N DIR S DIR(0)="FO^1:1",DIR("A")="Press RETURN to continue or '^' to exit"
|
|
. D ^DIR I $S($D(DIROUT):1,$D(DUOUT):1,$D(DTOUT):1,1:0) S OREND=1
|
|
WKCX S IOF=ORIOF K ORHEAD,ORFOOT,OROFMT,ORFMT,ORIOF,ORBOT,ORIOSL
|
|
Q
|