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

GMRAOR6.m

Go to the documentation of this file.
  1. GMRAOR6 ;HIRMFO/WAA-OERR HL7 UTILITY ;10/15/04 10:59
  1. ;;4.0;Adverse Reaction Tracking;**17,21**;Mar 29, 1996
  1. ; File all allergies Sign/Symptoms
  1. ; INPUT
  1. ; IEN = The internal entry number for the file entry being modified
  1. ; FILE = The file number of the file being modified
  1. ; GMRAL = The internal entry number of the GMRAL array being added
  1. ;
  1. SIGN(GMRAFILE,GMRAIEN,GMRAL) ; Signs/Symptoms
  1. Q:$G(GMRAIEN)<1
  1. S GMRANODE=$S(GMRAFILE=120.8:10,GMRAFILE=120.85:2,1:0) Q:'GMRANODE
  1. S GMRASN=0 F S GMRASN=$O(GMRAL(GMRAL,"S",GMRASN)) Q:GMRASN<1 D
  1. .Q:$P(GMRAL(GMRAL,"S",GMRASN),U)'>0 ;17 Screen out bad entries
  1. .Q:$O(^GMR(GMRAFILE,GMRAIEN,GMRANODE,"B",$P(GMRAL(GMRAL,"S",GMRASN),U),"")) ;Prevent DUPS
  1. .K DD,DO,DIC,DINUM,DLAYGO
  1. .S DA(1)=GMRAIEN,DIC="^GMR("_GMRAFILE_","_DA(1)_","_GMRANODE_","
  1. .S DIC(0)="L",X=$P(GMRAL(GMRAL,"S",GMRASN),U),DLAYGO=GMRAFILE
  1. .S DIC("P")=$S(GMRANODE=10:"120.81P",1:"120.8502P")
  1. .D FILE^DICN
  1. .K DD,DO,DIC,DINUM,DLAYGO
  1. .S GMRASN=$P(+Y,U)
  1. .S GMRALN=^GMR(GMRAFILE,GMRAIEN,GMRANODE,GMRASN,0) Q:GMRALN=""
  1. .I '$D(GMRAOTH) S GMRAOTH=$O(^GMRD(120.83,"B","OTHER REACTION",0))
  1. .S $P(GMRALN,U,3)=$P(GMRAL(GMRAL),U,7)
  1. .I $P(GMRALN,U)=GMRAOTH S $P(GMRALN,U,2)=$P(GMRAL(GMRAL,"S",GMRASN),U,2) ;21
  1. .I GMRANODE=10 S $P(GMRALN,U,4)=$P(GMRAL(GMRAL,"S",GMRASN),U,4)
  1. .S ^GMR(GMRAFILE,GMRAIEN,GMRANODE,GMRASN,0)=GMRALN
  1. .Q
  1. K GMRAIEN,GMRANODE,GMRAFILE,GMRASN,GMRALN,GMRAOTH,Y,X
  1. Q