source: FOIAVistA/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAFN1.m@ 1166

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1GMRAFN1 ;HIRMFO/WAA-FDA PART 1 MEDWATCH FORM ;11/30/95 15:18
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3 Q:'GMRAPA1
4 K ^TMP($J,"GMR")
5 S GMRAPA(0)=$P($G(^GMR(120.85,GMRAPA1,0)),U,2) Q:GMRAPA(0)=""
6 Q:'$D(^DPT(GMRAPA(0),0)) S DFN=$P(GMRAPA(0),U) D 1^VADPT S GMRAID=$E(VADM(1),1)_$P($P(VADM(2),U,2),"-",3),GMRASEX=VADM(5),GMRADOB=$P(VADM(3),U) D KVAR^VADPT
7 S ^TMP($J,"FDAR",3)=$P(^DPT($P(GMRAPA(0),U),0),U,2)
8 S GMRAPA="" D ^GMRADSP7
9 S $P(LINE1,"-",133)="",$P(LINE2,"=",133)=""
10 S $P(TAB," ",133)=""
11 ;GMRASUS=SUSPECTED AGENTS,GMRAPG1=TOTAL NUMBER OF PAGES
12 ;GMRAPG2=CURRENT PAGE,GMRAFST=THIS IS THE FIRST PAGE IF 1
13 ;IF 0 OTHER PAGE
14 S GMRAWEI="",DFN=$P(GMRAPA(0),U),GMRVSTR="WT" D EN6^GMRVUTL S GMRAWEI=$P(X,U,8)
15 K GMRAVIT1,GMRAVIT2
16 S (GMRAPG1,GMRAPG2,GMRAFST)=1,(GMRAXX,GMRASUS)=0 F S GMRASUS=$O(^GMR(120.85,GMRAPA1,3,GMRASUS)) Q:GMRASUS<1 D
17 .S GMRAXX=GMRAXX+1,^TMP($J,"GMR","A",GMRAXX)=$G(^GMR(120.85,GMRAPA1,3,GMRASUS,0))
18 .I GMRAXX>2 S:(GMRAXX#2) GMRAPG2=GMRAPG2+1
19 .;S GMRAPG2=GMRAPG2+(GMRAXX>1&'(GMRAXX#2))
20 .S:$G(^GMR(120.85,GMRAPA1,3,GMRASUS,1))'="" ^TMP($J,"GMR","A",GMRAXX,1)=^GMR(120.85,GMRAPA1,3,GMRASUS,1)
21 .S:$G(^GMR(120.85,GMRAPA1,3,GMRASUS,"LIKE"))'="" ^TMP($J,"GMR","A",GMRAXX,"LIKE")=^GMR(120.85,GMRAPA1,3,GMRASUS,"LIKE")
22 .Q
23 S GMRAPA1(0)=$G(^GMR(120.85,GMRAPA1,0))
24 S GMRASUS=0
25 F GMRAPG1=GMRAPG1:1:GMRAPG2 D ^GMRAFN2,^GMRAFN3,^GMRAFN4,^GMRAFN5
26 Q
Note: See TracBrowser for help on using the repository browser.