source: FOIAVistA/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSRXACT.m@ 1169

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

initial load of FOIAVistA 6/30/08 version

File size: 541 bytes
Line 
1PSSRXACT ;BIR/SAB- returns active Rx flag ; 09/04/03 10:30 am
2 ;;1.0;PHARMACY DATA MANAGEMENT;**75**;9/30/97
3 ;External reference to EN^PSOORDER supported by DBIA 1878
4 ;
5EN(DFN) ;
6 N FLAG,EXPD,RX,STAT S EXPD=DT-1
7 F S EXPD=$O(^PS(55,DFN,"P","A",EXPD)) Q:'EXPD!($G(FLAG)) F RX=0:0 S RX=$O(^PS(55,DFN,"P","A",EXPD,RX)) Q:'RX!($G(FLAG)) D
8 .D EN^PSOORDER(DFN,RX)
9 .I $G(^TMP("PSOR",$J,RX,0))']"" Q
10 .S STAT=$P($P(^TMP("PSOR",$J,RX,0),"^",4),";")
11 .S FLAG=$S(STAT="A":1,STAT="N":1,STAT="H":1,STAT="S":1,1:0)
12 .K ^TMP("PSOR",$J)
13 Q +$G(FLAG)
Note: See TracBrowser for help on using the repository browser.