source: FOIAVistA/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAEER0.m@ 711

Last change on this file since 711 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.0 KB
Line 
1GMRAEER0 ;HIRMFO/RM,WAA-ENTER AN ALLERGY RECORD IN ERROR ; 8/20/92
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3EN1 ; ENTRY FROM 'GMRA ENTER A/AR IN ERROR' OPTION
4 W ! S DIC="^DPT(",DIC(0)="AEQM" D ^DIC K DIC,DLAYGO G:+Y'>0 Q1 S DFN=+Y D EN2 G:'GMRAOUT EN1
5Q1 D KILL^XUSCLEAN
6 Q
7EN2 ; EDIT A PATIENT A/AR WHERE DFN KNOWN
8 ; INPUT VAR: DFN = PTR TO 2
9 ; OUTPUT VAR: DFN AND GMRAOUT = 0 IF NORMAL EXIT ELSE 1
10 Q:'$D(DFN) D 1^VADPT S GMRALOC=$P(VAIN(4),U,2),GMRANAM=VADM(1),GMRASEX=VADM(5),GMRAOUT=0,GMRAOTH=$O(^GMRD(120.83,"B","OTHER REACTION",0)) D KVAR^VADPT K VA,VAROOT
11 S GMRAER=1 D:'$D(GMRAL) EN1^GMRADPT D EN1^GMRADSP0(.GMRAL) G:GMRAOUT Q2 K GMRAER
12SELECT S GMRALAGO=0 D EN1^GMRAPES0 W:GMRAPA'>0&'GMRAOUT $C(7)," ??" G Q2:GMRAOUT,EN2:GMRAPA'>0 ; IF HIT RETURN THEN EXIT
13 G:'$$LOCK^GMRAUTL(120.8,GMRAPA,1) SELECT
14 D EN1^GMRAPEE0
15 D UNLOCK^GMRAUTL(120.8,GMRAPA)
16Q2 ;
17 K GMRADRUG,GMRAER,GMRAERR,GMRAHEAD,GMRALAGO,GMRALOC,GMRANAM,GMRANEW,GMRAOTH,GMRAPA,GMRAPG,GMRAPRNT,GMRASEX,GMRASWH
18 I GMRAOUT S GMRAOUT=2-GMRAOUT
19 Q
Note: See TracBrowser for help on using the repository browser.