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

LRBLDRR3.m

Go to the documentation of this file.
  1. LRBLDRR3 ; IHS/DIR/AAB - DONOR AUDIT TRAIL 2/26/96 14:30 ; [ 2/26/96 10:10 AM ]
  1. ;;5.2;LR;**1003**;JUN 01, 1998
  1. ;;5.2;LAB SERVICE;**90**;Sep 27, 1994
  1. ;
  1. ; Routine called by file 65.5 input template LRBLDCP
  1. ; Multiple field arrays are built and totaled before and after
  1. ; editing LRBLDCP to be used for comparison. If total after
  1. ; editing is less than before editing, then the appropriate
  1. ; fields contained in the deleted node are put onto the
  1. ; audit trail for Blood Bank
  1. ;
  1. BEG ; Counts all donation dates for a patient before editing and puts
  1. ; into an array. Then counts total to be used for comparison later.
  1. S (LRDATE,BEGDATE)=0
  1. F S LRDATE=$O(^LRE(LRDONOR,5,LRDATE)) Q:LRDATE'>0 S BEGDATE=BEGDATE+1,BEG(LRDATE)=^LRE(LRDONOR,5,LRDATE,0)
  1. Q
  1. DEL ; Counts all donation dates for a patient after editing. If the
  1. ; total after editing is less than the total before editing,
  1. ; the original deleted data is put into the audit trail.
  1. S (LRDATE,AFTDATE)=0
  1. F S LRDATE=$O(^LRE(LRDONOR,5,LRDATE)) Q:LRDATE'>0 S AFTDATE=AFTDATE+1
  1. I AFTDATE<BEGDATE D
  1. . Q:'$D(NODE)
  1. . S O=$P(NODE,U),Z="65.54,.01" D AUDIT
  1. . S O=$P(NODE,U,2),Z="65.54,1" D AUDIT
  1. . S O=$P(NODE,U,3),Z="65.54,3" D AUDIT
  1. . S O=$P(NODE,U,4),Z="65.54,4" D AUDIT
  1. . S O=$P(NODE,U,5),Z="65.54,5" D AUDIT
  1. . S O=$P(NODE,U,6),Z="65.54,.02" D AUDIT
  1. . S O=$P(NODE,U,7),Z="65.54,.03" D AUDIT
  1. . S O=$P(NODE,U,8),Z="65.54,.011" D AUDIT
  1. . S O=$P(NODE,U,9),Z="65.54,6" D AUDIT
  1. . S O=$P(NODE,U,10),Z="65.54,6.1" D AUDIT
  1. . S O=$P(NODE,U,11),Z="65.54,1.1" D AUDIT
  1. . S O=$P(NODE,U,12),Z="65.54,1.2" D AUDIT
  1. . Q:'$D(NODE1)
  1. . S O=$P(NODE1,U),Z="65.54,4.1" D AUDIT
  1. . S O=$P(NODE1,U,2),Z="65.54,4.2" D AUDIT
  1. . S O=$P(NODE1,U,3),Z="65.54,4.3" D AUDIT
  1. . S O=$P(NODE1,U,4),Z="65.54,4.4" D AUDIT
  1. . S O=$P(NODE1,U,5),Z="65.54,4.5" D AUDIT
  1. . S O=$P(NODE1,U,6),Z="65.54,4.6" D AUDIT
  1. . S O=$P(NODE1,U,7),Z="65.54,4.7" D AUDIT
  1. . S O=$P(NODE1,U,8),Z="65.54,4.8" D AUDIT
  1. . S O=$P(NODE1,U,9),Z="65.54,4.11" D AUDIT
  1. . S O=$P(NODE1,U,10),Z="65.54,4.15" D AUDIT
  1. Q
  1. ;
  1. AUDIT I O]"" S X="Deleted" D EN^LRUD
  1. Q