source: FOIAVistA/tag/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAOR7.m@ 628

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1GMRAOR7 ;HIRMFO/WAA,FPT-OERR HL7 UTILITY ;8/28/03 13:52
2 ;;4.0;Adverse Reaction Tracking;**4,17**;Mar 29, 1996
3ADVERSE(GMRAPA,GMRAL) ;Add a Adverse reaction entry to file 120.85
4 ;INPUT
5 ; GMRAPA = the entry in file 120.8 that was added
6 ; GMRAL = The entry in the GMRAL array that is being added
7 ;
8 N GMRAO,GMRAPA1,X,Y
9 S GMRAO=0 F S GMRAO=$O(GMRAL(GMRAL,"O",GMRAO)) Q:GMRAO<1 D
10 .K DD,DO,DIC,DINUM,DLAYGO
11 .S DIC="^GMR(120.85,",DLAYGO=120.85,DIC(0)="L",X=$P(GMRAL(GMRAL,"O",GMRAO),U)
12 .D FILE^DICN
13 .K DD,DO,DIC,DINUM,DLAYGO
14 .Q:Y=-1 S GMRAPA1=+Y
15 .N GMRALN
16 .F Q:$$LOCK^GMRAUTL(120.85,GMRAPA1)
17 .S GMRALN=^GMR(120.85,GMRAPA1,0)
18 .S $P(GMRALN,U,2)=GMRADFN
19 .S $P(GMRALN,U,13)=$P(GMRAL(GMRAL),U,7)
20 .I $P(GMRAL(GMRAL,"O",GMRAO),U,3)]"" S $P(GMRALN,U,13)=$P(GMRAL(GMRAL,"O",GMRAO),U,3)
21 .S $P(GMRALN,U,14)=$P(GMRAL(GMRAL,"O",GMRAO),U,2)
22 .S $P(GMRALN,U,15)=GMRAPA
23 .S ^GMR(120.85,GMRAPA1,0)=GMRALN
24 .I $D(GMRAL(GMRAL,"S",1)) D SIGN^GMRAOR6(120.85,GMRAPA1,.GMRAL) ;S/S
25 .S ^GMR(120.85,GMRAPA1,3,0)="^120.8503^1^1"
26 .S ^GMR(120.85,GMRAPA1,3,1,0)=$P(GMRAL(GMRAL),U,3)
27 .K DIK,DA S DIK="^GMR(120.85,",DA=GMRAPA1 D IX^DIK K DIK,DA ;17 changed GMRAPA to GMRAPA1
28 .D UNLOCK^GMRAUTL(120.85,GMRAPA1)
29 .Q
30 Q
Note: See TracBrowser for help on using the repository browser.