Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRAFDA

GMRAFDA.m

Go to the documentation of this file.
GMRAFDA ;HIRMFO/WAA-FDA REPORT COMPLETION SYSTEM ;11/29/95  15:16
 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
EN1 ; Entry to ENTER/EDIT FDA REPORT DATA TYPE option
 S GMRAOUT=0,GMRALAGO=1 D EN1^GMRAU85 G:GMRAPA1'>0 EXIT
 S GMRAPA=0 D ^GMRADSP7 D EN2
 D UNLOCK^GMRAUTL(120.85,GMRAPA1)
 G EXIT
 Q
EN2 ; ENTRY FROM ENTER/EDIT OPTION  GMRAPA1 AND GMRAPA ARE KNOWN
 I $P(GMRAPA(0),U,20)'["D" W !,"YOU CAN ONLY EDIT DRUG REACTIONS",! Q
FDA1 W @IOF,!,"Indicate which FDA Report Sections to be completed:"
 W !,"1.  Reaction Information",!,"2.  Suspect Drug(s) Information",!,"3.  Concomitant Drugs and History",!,"4.  Manufacturer Information",!,"5.  Initial Reporter"
 K DIR S DIR("A")="Choose number(s) of sections to be edited",DIR(0)="LO^1:5"
 S DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
 S DIR("?",1)="ENTER THE NUMBER SECTION OR SECTIONS YOU WISH TO COMPLETE."
 S DIR("?",2)="YOU CAN ENTER:   YOU TYPE          SYSTEM WILL DO"
 S DIR("?",3)="   SECTION  -->    1                  SECTION 1"
 S DIR("?",4)="   RANGE    -->   2-4            SECTION 2 AND 3 AND 4"
 S DIR("?",5)="   GROUPS   -->  1,3,5           SECTION 1 AND 3 AND 5"
 D ^DIR K DIR Q:$D(DIRUT)!(+Y'>0)
 K GMRAGHC F X=1:1 S GMRAX=$P(Y,",",X) Q:GMRAX']""  S GMRAGHC(GMRAX)=""
 S GMRAOUT=0 F GMRAXXX=0:0 S GMRAXXX=$O(GMRAGHC(GMRAXXX)) Q:GMRAXXX'>0  D @GMRAXXX Q:GMRAOUT
 G:'GMRAOUT FDA1
 Q
EXIT ;EXIT
 D KILL^XUSCLEAN
 Q
1 W @IOF D RXN^GMRAU851 Q:GMRAOUT  W ! S DIE="^GMR(120.85,",DA=GMRAPA1,DR="5T;6T;7T;9T;10T;11T;12.1T;12.2T" D ^DIE S:$D(Y) GMRAOUT=1 Q:GMRAOUT  K GMRADT,GMRABGDT,GMRAENDT W !! D EN1^GMRALAB0 Q
2 W @IOF K GMRADT,GMRABGDT,GMRAENDT D EN1^GMRAPHR2 K GMRADT,GMRABGDT,GMRAENDT Q
3 W @IOF K GMRADT,GMRABGDT,GMRAENDT D EN1^GMRAPHR1
 K GMRADT,GMRABGDT,GMRAENDT Q:GMRAOUT
 W ! S DIE="^GMR(120.85,",DA=GMRAPA1,DR="14" D ^DIE S:$D(Y) GMRAOUT=1
 Q
4 W @IOF S DIE="^GMR(120.85,",DA=GMRAPA1,DR="53:65" D ^DIE
 S:$D(Y) GMRAOUT=1 Q
5 N GMRAT W @IOF S DIE="^GMR(120.85,",DA=GMRAPA1
 S GMRAT=$P($G(^VA(200,DUZ,0)),U,9)
 S:GMRAT'="" GMRAT=$P($G(^DIC(3.1,GMRAT,0)),U)
 S DR="43//"_$P(^VA(200,DUZ,0),U)_";44;45;46;47;48;49;50;51T;52T;52.1//"_GMRAT
 D ^DIE S:$D(Y) GMRAOUT=1
 Q