source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAEF2.m@ 699

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

revised back to 6/30/08 version

File size: 1.1 KB
Line 
1GMRAEF2 ;HIRMFO/WAA-FDA EXCEPTION REPORT ;11/29/95 15:01
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
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 .S ^TMP($J,"GMRAEF",GMRDFN,GMRABGDT)=GMRAIEN
24 .Q
25 D EN1^GMRAEF
26EXIT ;EXIT OF ROUTINE
27 K GMRAY,GMRAX,GMRAIEN,GMRDFN,GMRBGDT,GMRENDT,GMRDT,GMRAOUT
28 K GMRA,GMRABGDT,GMRAENDT
29 Q
Note: See TracBrowser for help on using the repository browser.