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

GMRAVFY.m

Go to the documentation of this file.
  1. GMRAVFY ;HIRMFO/WAA,PWC-VERIFY AND SIGN OFF AN AGENT ; 5/23/07 10:32am
  1. ;;4.0;Adverse Reaction Tracking;**2,33**;Mar 29, 1996;Build 5
  1. EN1 ;This is the main entry point for the verifier option.
  1. S GMRAVER=0,GMRADRUG=0
  1. I $P(GMRAPA(0),U,20)'["D" S GMRAFLAG=0 G VERIFY
  1. S GMRAFLAG=1,GMRADRUG=1
  1. I $P(GMRAPA(0),U,6)'="o" G VERIFY
  1. I '$D(GMRASITE) D SITE^GMRAUTL S GMRASITE(0)=$G(^GMRD(120.84,GMRASITE,0))
  1. I $P(^GMRD(120.84,+GMRASITE,0),U,7)'="y" G VERIFY
  1. I $D(^GMR(120.85,"C",GMRAPA)) G VERIFY
  1. W !,"Since this Causative Agent is an observed drug reaction and"
  1. W !,"FDA Data is required you must enter the Observer information"
  1. W !,"prior to verification."
  1. G EXIT
  1. VERIFY ;Verify an agent
  1. W !!,"Currently you have verifier access."
  1. 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."
  1. S:%=-1 GMRAOUT=1 G EXIT:%'=1 S GMRAVFY=1 W @IOF,! D SITE^GMRAUTL,EN2^GMRAPEV0 K GMRAVFY G:GMRAOUT EXIT
  1. 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)
  1. I 'GMRAVER!GMRAOUT G EXIT
  1. S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
  1. 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
  1. .Q:'$D(GMRAPA) S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)) Q:GMRAPA(0)=""
  1. .N OROLD,DFN,GMRACNT S DFN=$P(GMRAPA(0),U)
  1. .D INP^VADPT S X=$O(^ORD(101,"B","GMRA SIGN-OFF ON DATA",0))_";ORD(101," D EN^XQOR:X K VAIN,X
  1. .Q
  1. S GMRAPA(0)=$G(^GMR(120.8,GMRAPA,0)),GMRATYPE=$P(GMRAPA(0),U,20)
  1. 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:"")
  1. I $G(GMRANEW) D ;send NOTIFICATION bulletin if this is new -- GMRA*4*33
  1. . I $P(GMRAPA(0),U,6)="o",GMRATYPE["D" D PTBUL^GMRAROBS
  1. I GMRAVER D EN1^GMRAPET0($P(GMRAPA(0),U),GMRAPA,"V",.GMRAOUT) I GMRAOUT S GMRAOUT=0
  1. Q1 D UNLOCK^GMRAUTL(120.8,GMRAPA)
  1. EXIT K GMRAFLAG,DA,DIE,DR,GMRADRUG Q