source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOATRP.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1PSOATRP ;BIR/SJA - INTERNET REFILL REPORT ;05/29/07 12:36pm
2 ;;7.0;OUTPATIENT PHARMACY;**264**;DEC 1997;Build 19
3 ;
4 N PSODS,PSOED,PSOEDX,PSODIV,PSOREP,PSORST,PSORMZ,PSOSD,PSOSDX,PSOSITE,RDATE,X,Y
5 S PSORMZ=0 D NOW^%DTC S Y=% X ^DD("DD") S RDATE=Y
6 ;
7 D SEL^PSOREJU1("DIVISION","^PS(59,",.PSODIV) I $G(PSODIV)="^" D MESS Q
8 I $G(PSODIV)="ALL" S PSOSITE=0 F S PSOSITE=$O(^PS(59,PSOSITE)) Q:'PSOSITE D
9 .I '$P($G(^PS(59,PSOSITE,"I")),"^")!(DT<$P($G(^("I")),"^")) S PSODIV(PSOSITE)=""
10 ;
11 K DIR W ! S DIR(0)="DAO^:DT:APEX",DIR("A")="Beginning Date: ",DIR("?")=" ",DIR("?",1)="Enter the date to begin searching.",DIR("?",2)="A future date cannot be entered." D ^DIR K DIR
12 I 'Y!($D(DTOUT))!($D(DUOUT)) D MESS Q
13 S PSOSD=Y D DD^%DT S PSOSDX=Y
14 ;
15 W ! K DIR S DIR(0)="DAO^:DT:APEX",DIR("A")="Ending Date: ",DIR("?")=" ",DIR("?",1)="Enter the ending date of the search.",DIR("?",2)="This date cannot be a future date." D ^DIR K DIR
16 I 'Y!($D(DTOUT))!($D(DUOUT)) D MESS Q
17 S PSOED=Y D DD^%DT S PSOEDX=Y
18 ;
19 W ! K DIR S DIR(0)="S^P:Patient;D:Date;R:Result;",DIR("B")="R"
20 S DIR("A")="Sort by Patient/Date/Result (P/D/R)",DIR("?")="Enter 'P' to sort by Patient, 'D' to sort by date, or 'R' to sort by result." D ^DIR K DIR
21 I $D(DTOUT)!$D(DUOUT) D MESS Q
22 S PSOREP=Y
23 ;
24 W ! K DIR S DIR(0)="S^D:Detail;S:Summary;",DIR("B")="S"
25 S DIR("A")="Print Detail/Summary report (D/S)",DIR("?")="Enter 'D' to print detail report or 'S' for summary report" D ^DIR K DIR
26 I $D(DTOUT)!$D(DUOUT) D MESS Q
27 S PSODS=Y
28 ;
29SKIPC ;
30 I PSODS="S" G SEL
31 W ! K DIR S DIR("A")="Do you want this report to print in 80 or 132 column format: "
32 S DIR("B")="80",DIR(0)="SAM^1:132;8:80" D ^DIR K DIR I Y["^"!($D(DIRUT)) D MESS Q
33 W ! S PSORMZ=$S(Y=1:1,1:0)
34 ;
35SEL D @$S(PSOREP="D":"^PSOATRD",PSOREP="R":"^PSOATRR",1:"^PSOATRPP")
36 ;
37END K X,Y,PSOSDX,PSOSD,PSOSITE,PSORST,PSOREP,PSODIV,PSOEDX,PSOED,PSODS,DIRUT,DTOUT,DUOUT
38 Q
39MESS W !!,"Nothing queued to print.",!
40 Q
41DIV(RX,DV) ; Check if the Division for the Prescription/Fill was selected by the user
42 I $G(PSODIV)="ALL" Q 1
43 I $D(PSODIV(DV)) Q 1
44 Q 0
Note: See TracBrowser for help on using the repository browser.