source: FOIAVistA/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAEF2.m@ 1354

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1GMRAEF2 ;HIRMFO/WAA-FDA EXCEPTION REPORT ;11/29/95 15:01
2 ;;4.0;Adverse Reaction Tracking;**33**;Mar 29, 1996;Build 5
3EN1 ; Entry to PRINT ALL FDA EXCEPTIONS WITHIN A D/T RANGE option
4 S GMRAOUT=0 K DIR
5 S DIR(0)="DO^:DT:ETX",DIR("A")="Select Start Date"
6 D ^DIR K DIR
7 I $D(DTOUT)!($D(DUOUT))!($D(DIRUT))!($D(DIROUT)) S GMRAOUT=1 G EXIT
8 S (GMRABGDT,GMRASTDT)=Y K Y
9 S DIR(0)="DO^"_GMRABGDT_":NOW:ETX",DIR("A")="Select End Date",DIR("B")="T"
10 D ^DIR K DIR
11 I $D(DTOUT)!($D(DUOUT))!($D(DIRUT))!($D(DIROUT)) S GMRAOUT=1 G EXIT
12 S GMRAEDT=Y,GMRAENDT=((Y+1)-.0000001) K Y
13EN2 ;
14 S GMRABGDT=GMRABGDT-.0000001
15 F S GMRABGDT=$O(^GMR(120.8,"AODT",GMRABGDT)) Q:GMRABGDT<1 Q:GMRABGDT>GMRAENDT S GMRAIEN=0 F S GMRAIEN=$O(^GMR(120.8,"AODT",GMRABGDT,GMRAIEN)) Q:GMRAIEN<1 D
16 .S GMRA(0)=$G(^GMR(120.8,GMRAIEN,0))
17 .Q:$P(GMRA(0),U,2)=""
18 .Q:$D(^GMR(120.8,GMRAIEN,"ER"))
19 .I $P(GMRA(0),U,6)'="o"!($P(GMRA(0),U,20)'["D") Q
20 .I '$P(GMRA(0),U,12) Q
21 .I $$CMPFDA^GMRAEF1(GMRAIEN) Q
22 .S GMRDFN=$P(GMRA(0),U)
23 .Q:'$$PRDTST^GMRAUTL1(GMRDFN) ;GMRA*4*33 Exclude test patient from report if production or legacy environment.
24 .S ^TMP($J,"GMRAEF",GMRDFN,GMRABGDT)=GMRAIEN
25 .Q
26 D EN1^GMRAEF
27EXIT ;EXIT OF ROUTINE
28 K GMRAY,GMRAX,GMRAIEN,GMRDFN,GMRBGDT,GMRENDT,GMRDT,GMRAOUT
29 K GMRA,GMRABGDT,GMRAENDT
30 Q
Note: See TracBrowser for help on using the repository browser.