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

GMRAOR8.m

Go to the documentation of this file.
GMRAOR8 ;HIRMFO/WAA-OERR HL7 UTILITY ;7/3/97  15:48
 ;;4.0;Adverse Reaction Tracking;**4**;Mar 29, 1996
COMM(GMRAPA,GMRAL) ;Add comments
 ;INPUT
 ;  GMRAPA = The entry in file 120.8 that is being modified
 ;   GMRAL = The entry in the GMRAL array that is being added
 ;
 N GMRASN,GMRASNN
 S GMRASN=0 F  S GMRASN=$O(GMRAL(GMRAL,"N",GMRASN)) D  Q:GMRASN<1
 .I GMRASN<1 S GMRASN=$O(GMRAL(GMRAL,"N",""),-1),^GMR(120.8,GMRAPA,26,0)=U_"120.826D"_U_GMRASN_U_GMRASN S GMRASN="" Q
 .N GMRALN
 .S ^GMR(120.8,GMRAPA,26,GMRASN,0)=$P(GMRAL(GMRAL),U,5)_U_$P(GMRAL(GMRAL),U,7)_U_"O"
 .I $G(GMRAL(GMRAL,"N",GMRASN,1))'="" S GMRASNN="" F  S GMRASNN=$O(GMRAL(GMRAL,"N",GMRASN,GMRASNN)) D  Q:GMRASNN<1
 ..I GMRASNN<1 S GMRASNN=$O(GMRAL(GMRAL,"N",GMRASN,""),-1),^GMR(120.8,GMRAPA,26,GMRASN,2,0)=U_U_GMRASNN_U_GMRASNN S GMRASNN="" Q
 ..S ^GMR(120.8,GMRAPA,26,GMRASN,2,GMRASNN,0)=GMRAL(GMRAL,"N",GMRASN,GMRASNN)
 ..Q
 .Q
 Q