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

GMRAPEM3.m

Go to the documentation of this file.
GMRAPEM3 ;HIRMFO/WAA-ALLERGY/ADVERSE REACTION PATIENT EDIT DRIVER ;3/20/06  14:55
 ;;4.0;Adverse Reaction Tracking;**36**;Mar 29, 1996;Build 9
UPOUT ; If the user uparrows out of the process
 I GMRAOUT S GMRAOUT=2-GMRAOUT D:GMRAOUT&($D(^TMP($J,"GMRASF"))) ALERT^GMRASIGN K ^TMP($J,"GMRASF"),GMRACNT,GMRANAM,GMRAPA
 K GMRANAM,GMRAPA
 D CLEAN
 Q
ERR ; If the reaction that is entered in error
 D UNLOCK^GMRAUTL(120.8,GMRAPA)
 N GMRACNT Q:'$D(^TMP($J,"GMRASF","B",GMRAPA))
 S GMRACNT=0 S GMRACNT=$O(^TMP($J,"GMRASF","B",GMRAPA,GMRACNT)) Q:GMRACNT<1
 K ^TMP($J,"GMRASF",GMRACNT,GMRAPA),^TMP($J,"GMRASF","B",GMRAPA,GMRACNT)
 D CLEAN
 Q
SIGNED ; If the reaction is already signed
 D CLEAN
 Q
UPDATE ; Unlock global and prep for next allergy
 I '$G(GMRAVER,0),'$D(^TMP($J,"GMRASF","B",GMRAPA)) S ^TMP($J,"GMRASF","B",GMRAPA,GMRACNT)=$G(GMRANEW),^TMP($J,"GMRASF",GMRACNT,GMRAPA)=$G(GMRANEW) ;36
 D CLEAN
 Q
CLEAN ; Clean the account for the next reaction.
 K %,DA,DIC,DIE,DIK,DR,GMRACHC,GMRAERR,GMRADRUG,GMRAIV,GMRANEW,GMRAOTH,GMRAPG,GMRAPRNT,GMRAREQ,GMRASEX,GMRASWH,GMRATYPE,GMRAVEDT,X,Y,GMRAVER
 Q