source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAOR6.m@ 1150

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

initial load of WorldVistAEHR

File size: 1.4 KB
RevLine 
[613]1GMRAOR6 ;HIRMFO/WAA-OERR HL7 UTILITY ;10/15/04 10:59
2 ;;4.0;Adverse Reaction Tracking;**17,21**;Mar 29, 1996
3 ; File all allergies Sign/Symptoms
4 ; INPUT
5 ; IEN = The internal entry number for the file entry being modified
6 ; FILE = The file number of the file being modified
7 ; GMRAL = The internal entry number of the GMRAL array being added
8 ;
9SIGN(GMRAFILE,GMRAIEN,GMRAL) ; Signs/Symptoms
10 Q:$G(GMRAIEN)<1
11 S GMRANODE=$S(GMRAFILE=120.8:10,GMRAFILE=120.85:2,1:0) Q:'GMRANODE
12 S GMRASN=0 F S GMRASN=$O(GMRAL(GMRAL,"S",GMRASN)) Q:GMRASN<1 D
13 .Q:$P(GMRAL(GMRAL,"S",GMRASN),U)'>0 ;17 Screen out bad entries
14 .Q:$O(^GMR(GMRAFILE,GMRAIEN,GMRANODE,"B",$P(GMRAL(GMRAL,"S",GMRASN),U),"")) ;Prevent DUPS
15 .K DD,DO,DIC,DINUM,DLAYGO
16 .S DA(1)=GMRAIEN,DIC="^GMR("_GMRAFILE_","_DA(1)_","_GMRANODE_","
17 .S DIC(0)="L",X=$P(GMRAL(GMRAL,"S",GMRASN),U),DLAYGO=GMRAFILE
18 .S DIC("P")=$S(GMRANODE=10:"120.81P",1:"120.8502P")
19 .D FILE^DICN
20 .K DD,DO,DIC,DINUM,DLAYGO
21 .S GMRASN=$P(+Y,U)
22 .S GMRALN=^GMR(GMRAFILE,GMRAIEN,GMRANODE,GMRASN,0) Q:GMRALN=""
23 .I '$D(GMRAOTH) S GMRAOTH=$O(^GMRD(120.83,"B","OTHER REACTION",0))
24 .S $P(GMRALN,U,3)=$P(GMRAL(GMRAL),U,7)
25 .I $P(GMRALN,U)=GMRAOTH S $P(GMRALN,U,2)=$P(GMRAL(GMRAL,"S",GMRASN),U,2) ;21
26 .I GMRANODE=10 S $P(GMRALN,U,4)=$P(GMRAL(GMRAL,"S",GMRASN),U,4)
27 .S ^GMR(GMRAFILE,GMRAIEN,GMRANODE,GMRASN,0)=GMRALN
28 .Q
29 K GMRAIEN,GMRANODE,GMRAFILE,GMRASN,GMRALN,GMRAOTH,Y,X
30 Q
Note: See TracBrowser for help on using the repository browser.