LRBLDRR3 ;DALISC/CYM DONOR AUDIT TRAIL ; 2/26/96 14:30 ;;5.2;LAB SERVICE;**90,247**;Sep 27, 1994 ;Per VHA Directive 97-033 this routine should not be modified. Medical Device # BK970021 ; ; Routine called by file 65.5 input template LRBLDCP ; Multiple field arrays are built and totaled before and after ; editing LRBLDCP to be used for comparison. If total after ; editing is less than before editing, then the appropriate ; fields contained in the deleted node are put onto the ; audit trail for Blood Bank ; BEG ; Counts all donation dates for a patient before editing and puts ; into an array. Then counts total to be used for comparison later. S (LRDATE,BEGDATE)=0 F S LRDATE=$O(^LRE(LRDONOR,5,LRDATE)) Q:LRDATE'>0 S BEGDATE=BEGDATE+1,BEG(LRDATE)=^LRE(LRDONOR,5,LRDATE,0) Q DEL ; Counts all donation dates for a patient after editing. If the ; total after editing is less than the total before editing, ; the original deleted data is put into the audit trail. S (LRDATE,AFTDATE)=0 F S LRDATE=$O(^LRE(LRDONOR,5,LRDATE)) Q:LRDATE'>0 S AFTDATE=AFTDATE+1 I AFTDATE