source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOQ0076.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 823 bytes
Line 
1PSOQ0076 ;HINES/RMS - PRESCRIPTION FUNCTION "LAST RELEASED" ; 30 Nov 2007 7:49 AM
2 ;;7.0;OUTPATIENT PHARMACY;**294**;DEC 1997;Build 13
3 ;
4LRDFUNC(PSOQRX) ;LAST RELEASE DATE IN FILEMAN FORMAT
5 N PSOQRD,PSOQRFD,PSOQANS,PSOQ
6 S PSOQANS=""
7 S PSOQRD=$P($G(^PSRX(PSOQRX,2)),"^",13)
8 S PSOQANS=PSOQRD
9 S PSOQ=0 F S PSOQ=$O(^PSRX(PSOQRX,1,PSOQ)) Q:'+PSOQ D ;
10 . S PSOQRFD=$P($G(^PSRX(PSOQRX,1,PSOQ,0)),"^",18)
11 . I PSOQRFD>PSOQANS S PSOQANS=PSOQRFD
12 Q PSOQANS
13DAYSSUPP(PSOQRX) ;DAYS SUPPLY INDICATOR
14 Q $P($G(^PSRX(PSOQRX,0)),"^",8)
15EXPDATE(PSOQRX) ;EXPIRATION DATE OF A PRESCRIPTION
16 Q $P($G(^PSRX(PSOQRX,2)),"^",6)
17REFILLS(PSOQRX) ;REFILLS REMAINING
18 N PSOQRCT K RFILLS
19 Q:'$D(^PSRX(PSOQRX,0)) ""
20 S RFILLS=$P(^PSRX(PSOQRX,0),"^",9),PSOQRCT=0 F S PSOQRCT=$O(^PSRX(PSOQRX,1,PSOQRCT)) Q:'PSOQRCT S RFILLS=RFILLS-1
21 Q RFILLS
Note: See TracBrowser for help on using the repository browser.