source: FOIAVistA/trunk/r/DRUG_ACCOUNTABILITY-PSA/PSAREVC.m@ 785

Last change on this file since 785 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1PSAREVC ;BIR/LTL-Control Point Transaction Review ;7/23/97
2 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**15**; 10/24/97
3 ;
4 ;References to ^PSDRUG( are covered by IA #2095
5 ;References to ^PRCS( are covered by IA #198
6 ;
7 W !!,"Because of the size of this file, look-ups of less than four characters",!!,"are NOT advised. Please enter either the entire transaction number,",!!,"Station-FY-QTR-Control Point-Sequence Number, or at least the four digit"
8 W !!,"Sequence Number.",!!
9 N DIC,DIR,DTOUT,DUOUT,PSACON,PSALOC,PSAOUT,X,Y
10 S DIC="^PRCS(410,",DIC(0)="AEMQ",DIC("A")="Please select Control Point Transaction: ",DIC("S")="I $P($G(^(0)),U,2)=""O"",$P($G(^(3)),U,3)[822400",PSAOUT=1 D ^DIC K DIC G:$D(DTOUT)!($D(DUOUT))!(Y<1) END S PSACON=+Y
11 I '$O(^PSD(58.81,"E",+PSACON,"")) W !!,"There are no receipts for this Transaction.",!! G END
12DEV ;asks device and queueing info
13 K IO("Q"),PSALOC N %ZIS,IOP,POP S %ZIS="Q" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR OUTPUT PRINTED!" Q
14 I $D(IO("Q")) N ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTDTH,ZTSK S ZTRTN="START^PSAREVC",ZTDESC="Receipt transaction review",ZTSAVE("PSACON")="" D ^%ZTLOAD,HOME^%ZIS S PSAOUT=1 G END
15START ;compiles and prints output
16 N %DT,PSALN,PSAR,PSAPG,PSARPDT S (PSAPG,PSAOUT)=0,Y=DT,PSAR="" X ^DD("DD") S PSARPDT=Y D HEADER
17LOOP F S PSAR=$O(^PSD(58.81,"E",+PSACON,PSAR)) G:'PSAR END D:$Y+5>IOSL HEADER G:PSAOUT END D
18 .I '$D(PSALOC) S PSALOC=$P($G(^PSD(58.81,+PSAR,0)),U,3) W !,"Receiving Site: ",$P($G(^PSD(58.8,+PSALOC,0)),U),!
19 .I $G(PSALOC)'=$P($G(^PSD(58.81,+PSAR,0)),U,3) S PSALOC=$P($G(^(0)),U,3) W !,"Receiving Site: ",$P($G(^PSD(58.8,+$P($G(^PSD(58.81,+PSAR,0)),U,3),0)),U),!
20 .S Y=$P($G(^PSD(58.81,+PSAR,0)),U,4) X ^DD("DD") W !,Y," ",$E($P($G(^PSDRUG(+$P($G(^PSD(58.81,PSAR,0)),U,5),0)),U),1,25)," -> "
21 .W $P($G(^PSD(58.81,+PSAR,0)),U,6)," rec'd by ",$E($P($G(^VA(200,+$P($G(^PSD(58.81,+PSAR,0)),U,7),0)),U),1,20),!
22END W:$E(IOST)'="C" @IOF
23 I $E(IOST,1,2)="C-",'PSAOUT S DIR(0)="EA",DIR("A")="END OF REPORT! Press <RET> to return to the menu." D ^DIR
24 D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@" K IO("Q")
25 Q
26HEADER ;prints header info
27 I $E(IOST,1,2)'="P-",PSAPG S DIR(0)="E" D ^DIR K DIR I 'Y S PSAOUT=1 Q
28 I $$S^%ZTLOAD W !!,"Task #",$G(ZTSK),", ",$G(ZTDESC)," was stopped by ",$P($G(^VA(200,+$G(DUZ),0)),U),"." S PSAOUT=1 Q
29 W:$Y @IOF S $P(PSALN,"-",81)="",PSAPG=PSAPG+1 W !,"History of receipts for Transaction # ",$P($G(^PRCS(410,+PSACON,0)),U),?57,PSARPDT,?70,"PAGE: ",PSAPG,!,PSALN,!
30 Q
Note: See TracBrowser for help on using the repository browser.