source: FOIAVistA/tag/r/CONTROLLED_SUBSTANCES-PSD/PSDOPTR.m@ 628

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

initial load of FOIAVistA 6/30/08 version

File size: 999 bytes
Line 
1PSDOPTR ;BIR/LTL-Review OP Transactions for a Drug ; 29 Aug 94
2 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
3 N PSDOUT I '$D(PSDSITE) D ^PSDSET I '$D(PSDSITE) S PSDOUT=1 G END
4 N C,CNT,DFN,DIC,DIR,DIRUT,DTOUT,DUOUT,PSD,PSDEV,PSDI,PSDR,PSDU,PSDLOC,PSDLOCN,PSDT,PSDTB,X,Y S PSDOUT=1,PSDU=0
5 D DT^DICRW
6 S PSDLOC=$P(PSDSITE,U,3),PSDLOCN=$P(PSDSITE,U,4)
7 G:$P(PSDSITE,U,5) CHKD
8LOOK S DIC="^PSD(58.8,",DIC(0)="AEQ",DIC("A")="Select Dispensing Site: "
9 S DIC("S")="I $P($G(^(0)),U,3)=+PSDSITE,$S($P($G(^(0)),U,2)[""M"":1,$P($G(^(0)),U,2)[""S"":1,1:0),($S('$D(^(""I"")):1,+^(""I"")>DT:1,'^(""I""):1,1:0))"
10 S DIC("B")=$P(PSDSITE,U,4)
11 W ! D ^DIC K DIC G:Y<0 END S PSDLOC=+Y,PSDLOCN=$P(Y,U,2)
12 S $P(PSDSITE,U,3)=+Y,$P(PSDSITE,U,4)=$P(Y,U,2)
13CHKD K ^TMP("PSD",$J)
14 S DIR(0)="S^1:Sort by Drug;2:Sort by Rx #;3:Sort by Inventory Type"
15 S DIR("A")="Sort by",DIR("B")=1
16 S DIR("?")="Please select the sort that sounds most promising."
17 D ^DIR K DIR G:$D(DIRUT) END G:Y=2 ^PSDOPTX G:Y=3 ^PSDOPTI
18 G ^PSDOPTS Q
19END Q
Note: See TracBrowser for help on using the repository browser.