Ignore:
Timestamp:
Dec 4, 2009, 12:11:15 AM (14 years ago)
Author:
George Lilly
Message:

revised back to 6/30/08 version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAVFY.m

    r613 r623  
    1 GMRAVFY ;HIRMFO/WAA,PWC-VERIFY AND SIGN OFF AN AGENT ; 5/23/07 10:32am
    2         ;;4.0;Adverse Reaction Tracking;**2,33**;Mar 29, 1996;Build 5
    3 EN1     ;This is the main entry point for the verifier option.
    4         S GMRAVER=0,GMRADRUG=0
    5         I $P(GMRAPA(0),U,20)'["D" S GMRAFLAG=0 G VERIFY
    6         S GMRAFLAG=1,GMRADRUG=1
    7         I $P(GMRAPA(0),U,6)'="o" G VERIFY
    8         I '$D(GMRASITE) D SITE^GMRAUTL S GMRASITE(0)=$G(^GMRD(120.84,GMRASITE,0))
    9         I $P(^GMRD(120.84,+GMRASITE,0),U,7)'="y" G VERIFY
    10         I $D(^GMR(120.85,"C",GMRAPA)) G VERIFY
    11         W !,"Since this Causative Agent is an observed drug reaction and"
    12         W !,"FDA Data is required you must enter the Observer information"
    13         W !,"prior to verification."
    14         G EXIT
    15 VERIFY  ;Verify an agent
    16         W !!,"Currently you have verifier access."
    17         F  W !,"Would you like to verify this Causative Agent now" S %=1 D YN^DICN Q:%'=0  W !?4,"ANSWER YES IF YOU WOULD LIKE TO VERIFY THIS DATA, ELSE ANSWER NO."
    18         S:%=-1 GMRAOUT=1 G EXIT:%'=1 S GMRAVFY=1 W @IOF,! D SITE^GMRAUTL,EN2^GMRAPEV0 K GMRAVFY G:GMRAOUT EXIT
    19         I GMRAVER S GMRANAME=$P($G(^DPT(+GMRAPA(0),0)),U),GMRALLER=$P(GMRAPA(0),U,2) K:GMRANAME]""&(GMRALLER]"") ^TMP($J,"GMRADSP",GMRANAME,GMRALLER,GMRAPA) K ^TMP("GMRA",$J)
    20         I 'GMRAVER!GMRAOUT G EXIT
    21         S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
    22         I '$P(GMRAPA(0),U,12) S DA=GMRAPA,DIE="^GMR(120.8,",DR="15////1" D ^DIE D  ; Execute the event point for this reaction
    23         .Q:'$D(GMRAPA)  S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
    24         .N OROLD,DFN,GMRACNT S DFN=$P(GMRAPA(0),U)
    25         .D INP^VADPT S X=$O(^ORD(101,"B","GMRA SIGN-OFF ON DATA",0))_";ORD(101," D EN^XQOR:X K VAIN,X
    26         .Q
    27         S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)),GMRATYPE=$P(GMRAPA(0),U,20)
    28         S DA=GMRAPA,DIE="^GMR(120.8,",DR="19////1;20///N;21////"_DUZ D ^DIE D:'GMRAVER EN1^GMRAVAB S GMRAPA(0)=$S($D(^GMR(120.8,GMRAPA,0)):^(0),1:"")
    29         I $G(GMRANEW) D  ;send NOTIFICATION bulletin if this is new -- GMRA*4*33
    30         . I $P(GMRAPA(0),U,6)="o",GMRATYPE["D" D PTBUL^GMRAROBS
    31         I GMRAVER D EN1^GMRAPET0($P(GMRAPA(0),U),GMRAPA,"V",.GMRAOUT) I GMRAOUT S GMRAOUT=0
    32 Q1      D UNLOCK^GMRAUTL(120.8,GMRAPA)
    33 EXIT    K GMRAFLAG,DA,DIE,DR,GMRADRUG Q
     1GMRAVFY ;HIRMFO/WAA-VERIFY AND SIGN OFF AN AGENT ;12/1/95  16:06
     2 ;;4.0;Adverse Reaction Tracking;**2**;Mar 29, 1996
     3EN1 ;This is the main entry point for the verifier option.
     4 S GMRAVER=0,GMRADRUG=0
     5 I $P(GMRAPA(0),U,20)'["D" S GMRAFLAG=0 G VERIFY
     6 S GMRAFLAG=1,GMRADRUG=1
     7 I $P(GMRAPA(0),U,6)'="o" G VERIFY
     8 I '$D(GMRASITE) D SITE^GMRAUTL S GMRASITE(0)=$G(^GMRD(120.84,GMRASITE,0))
     9 I $P(^GMRD(120.84,+GMRASITE,0),U,7)'="y" G VERIFY
     10 I $D(^GMR(120.85,"C",GMRAPA)) G VERIFY
     11 W !,"Since this Causative Agent is an observed drug reaction and"
     12 W !,"FDA Data is required you must enter the Observer information"
     13 W !,"prior to verification."
     14 G EXIT
     15VERIFY ;Verify an agent
     16 W !!,"Currently you have verifier access."
     17 F  W !,"Would you like to verify this Causative Agent now" S %=1 D YN^DICN Q:%'=0  W !?4,"ANSWER YES IF YOU WOULD LIKE TO VERIFY THIS DATA, ELSE ANSWER NO."
     18 S:%=-1 GMRAOUT=1 G EXIT:%'=1 S GMRAVFY=1 W @IOF,! D SITE^GMRAUTL,EN2^GMRAPEV0 K GMRAVFY G:GMRAOUT EXIT
     19 I GMRAVER S GMRANAME=$P($G(^DPT(+GMRAPA(0),0)),U),GMRALLER=$P(GMRAPA(0),U,2) K:GMRANAME]""&(GMRALLER]"") ^TMP($J,"GMRADSP",GMRANAME,GMRALLER,GMRAPA) K ^TMP("GMRA",$J)
     20 I 'GMRAVER!GMRAOUT G EXIT
     21 S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
     22 I '$P(GMRAPA(0),U,12) S DA=GMRAPA,DIE="^GMR(120.8,",DR="15////1" D ^DIE D  ; Execute the event point for this reaction
     23 .Q:'$D(GMRAPA)  S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
     24 .N OROLD,DFN,GMRACNT S DFN=$P(GMRAPA(0),U)
     25 .D INP^VADPT S X=$O(^ORD(101,"B","GMRA SIGN-OFF ON DATA",0))_";ORD(101," D EN^XQOR:X K VAIN,X
     26 .Q
     27 S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)),GMRATYPE=$P(GMRAPA(0),U,20)
     28 S DA=GMRAPA,DIE="^GMR(120.8,",DR="19////1;20///N;21////"_DUZ D ^DIE D:'GMRAVER EN1^GMRAVAB S GMRAPA(0)=$S($D(^GMR(120.8,GMRAPA,0)):^(0),1:"")
     29 I $P(GMRAPA(0),U,6)="o",GMRATYPE["D" D PTBUL^GMRAROBS
     30 I GMRAVER D EN1^GMRAPET0($P(GMRAPA(0),U),GMRAPA,"V",.GMRAOUT) I GMRAOUT S GMRAOUT=0
     31Q1 D UNLOCK^GMRAUTL(120.8,GMRAPA)
     32EXIT K GMRAFLAG,DA,DIE,DR,GMRADRUG Q
Note: See TracChangeset for help on using the changeset viewer.