Last change
on this file since 1166 was 613, checked in by George Lilly, 15 years ago |
initial load of WorldVistAEHR
|
File size:
860 bytes
|
Rev | Line | |
---|
[613] | 1 | GMRAOR0 ;HIRMFO/WAA,FPT-OERR HL7 UTILITY ; 2/9/95
|
---|
| 2 | ;;4.0;Adverse Reaction Tracking;**4**;Mar 29, 1996
|
---|
| 3 | DUPCHK(DFN,GMRALL) ;CHECK FOR DUPS
|
---|
| 4 | ;Input variable:
|
---|
| 5 | ; DFN = Patient DFN
|
---|
| 6 | ; GMRALL = Free text of allergy
|
---|
| 7 | ;
|
---|
| 8 | ;return variable:
|
---|
| 9 | ; GMRAFLG = (0,1,-1)
|
---|
| 10 | ; 0 Patient has no matching reactions on file
|
---|
| 11 | ; 1 Patient has a matching reaction.
|
---|
| 12 | ; -1 Patient has a matching reaction but is E/E
|
---|
| 13 | ;
|
---|
| 14 | ;********************************************************************
|
---|
| 15 | N GMRAFLG,GMRAPA
|
---|
| 16 | S GMRAFLG=0,GMRAPA=0
|
---|
| 17 | ;Loop through all the patient's reaction and look for matches
|
---|
| 18 | F S GMRAPA=$O(^GMR(120.8,"B",DFN,GMRAPA)) Q:GMRAPA<1 D Q:GMRAFLG=1
|
---|
| 19 | .Q:GMRALL'=$P($G(^GMR(120.8,GMRAPA,0)),U,2) ;Not a match
|
---|
| 20 | .I +$G(^GMR(120.8,GMRAPA,"ER")) S GMRAFLG=-1 Q ;E/E
|
---|
| 21 | .S GMRAFLG=1 ;Matching allergy.
|
---|
| 22 | .Q
|
---|
| 23 | Q GMRAFLG
|
---|
Note:
See
TracBrowser
for help on using the repository browser.