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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRAFDA 2213 printed Dec 13, 2024@01:39:06 Page 2
GMRAFDA ;HIRMFO/WAA-FDA REPORT COMPLETION SYSTEM ;11/29/95 15:16
+1 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
EN1 ; Entry to ENTER/EDIT FDA REPORT DATA TYPE option
+1 SET GMRAOUT=0
SET GMRALAGO=1
DO EN1^GMRAU85
if GMRAPA1'>0
GOTO EXIT
+2 SET GMRAPA=0
DO ^GMRADSP7
DO EN2
+3 DO UNLOCK^GMRAUTL(120.85,GMRAPA1)
+4 GOTO EXIT
+5 QUIT
EN2 ; ENTRY FROM ENTER/EDIT OPTION GMRAPA1 AND GMRAPA ARE KNOWN
+1 IF $PIECE(GMRAPA(0),U,20)'["D"
WRITE !,"YOU CAN ONLY EDIT DRUG REACTIONS",!
QUIT
FDA1 WRITE @IOF,!,"Indicate which FDA Report Sections to be completed:"
+1 WRITE !,"1. Reaction Information",!,"2. Suspect Drug(s) Information",!,"3. Concomitant Drugs and History",!,"4. Manufacturer Information",!,"5. Initial Reporter"
+2 KILL DIR
SET DIR("A")="Choose number(s) of sections to be edited"
SET DIR(0)="LO^1:5"
+3 SET DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
+4 SET DIR("?",1)="ENTER THE NUMBER SECTION OR SECTIONS YOU WISH TO COMPLETE."
+5 SET DIR("?",2)="YOU CAN ENTER: YOU TYPE SYSTEM WILL DO"
+6 SET DIR("?",3)=" SECTION --> 1 SECTION 1"
+7 SET DIR("?",4)=" RANGE --> 2-4 SECTION 2 AND 3 AND 4"
+8 SET DIR("?",5)=" GROUPS --> 1,3,5 SECTION 1 AND 3 AND 5"
+9 DO ^DIR
KILL DIR
if $DATA(DIRUT)!(+Y'>0)
QUIT
+10 KILL GMRAGHC
FOR X=1:1
SET GMRAX=$PIECE(Y,",",X)
if GMRAX']""
QUIT
SET GMRAGHC(GMRAX)=""
+11 SET GMRAOUT=0
FOR GMRAXXX=0:0
SET GMRAXXX=$ORDER(GMRAGHC(GMRAXXX))
if GMRAXXX'>0
QUIT
DO @GMRAXXX
if GMRAOUT
QUIT
+12 if 'GMRAOUT
GOTO FDA1
+13 QUIT
EXIT ;EXIT
+1 DO KILL^XUSCLEAN
+2 QUIT
1 WRITE @IOF
DO RXN^GMRAU851
if GMRAOUT
QUIT
WRITE !
SET DIE="^GMR(120.85,"
SET DA=GMRAPA1
SET DR="5T;6T;7T;9T;10T;11T;12.1T;12.2T"
DO ^DIE
if $DATA(Y)
SET GMRAOUT=1
if GMRAOUT
QUIT
KILL GMRADT,GMRABGDT,GMRAENDT
WRITE !!
DO EN1^GMRALAB0
QUIT
2 WRITE @IOF
KILL GMRADT,GMRABGDT,GMRAENDT
DO EN1^GMRAPHR2
KILL GMRADT,GMRABGDT,GMRAENDT
QUIT
3 WRITE @IOF
KILL GMRADT,GMRABGDT,GMRAENDT
DO EN1^GMRAPHR1
+1 KILL GMRADT,GMRABGDT,GMRAENDT
if GMRAOUT
QUIT
+2 WRITE !
SET DIE="^GMR(120.85,"
SET DA=GMRAPA1
SET DR="14"
DO ^DIE
if $DATA(Y)
SET GMRAOUT=1
+3 QUIT
4 WRITE @IOF
SET DIE="^GMR(120.85,"
SET DA=GMRAPA1
SET DR="53:65"
DO ^DIE
+1 if $DATA(Y)
SET GMRAOUT=1
QUIT
5 NEW GMRAT
WRITE @IOF
SET DIE="^GMR(120.85,"
SET DA=GMRAPA1
+1 SET GMRAT=$PIECE($GET(^VA(200,DUZ,0)),U,9)
+2 if GMRAT'=""
SET GMRAT=$PIECE($GET(^DIC(3.1,GMRAT,0)),U)
+3 SET DR="43//"_$PIECE(^VA(200,DUZ,0),U)_";44;45;46;47;48;49;50;51T;52T;52.1//"_GMRAT
+4 DO ^DIE
if $DATA(Y)
SET GMRAOUT=1
+5 QUIT