QAMAUTO6 ;HISC/DAD-AUTO ENROLL MANUAL ENROLL COUNTER ;6/18/93  15:51
 ;;1.0;Clinical Monitoring System;;09/13/1993
 Q:$D(^QA(743.6,QAMARUN,1,"B",QAMD0))  ;*** MONITOR ALREADY RAN THIS DATE
 D EN5^QAMAUTO1 ; *** AUTO RUN DATES FILE, MONITOR
 S QAMNUMER=0 K ^UTILITY($J,"QAM FALL OUT",QAMD0),^UTILITY($J,"QAM SAMPLE",QAMD0)
 F QAMDT=(QAMTODAY-.0000001):0 S QAMDT=$O(^QA(743.1,"ADRC",QAMDT)) Q:(QAMDT'>0)!(QAMDT>(QAMTODAY+.9999999))  F QAMD1=0:0 S QAMD1=$O(^QA(743.1,"ADRC",QAMDT,QAMD1)) Q:QAMD1'>0  D
 . I QAMD0=$P($G(^QA(743.1,QAMD1,0)),"^",2) S QAMNUMER=QAMNUMER+1
 . Q
 S ^UTILITY($J,"QAM FALL OUT",QAMD0)=QAMNUMER,^UTILITY($J,"QAM SAMPLE",QAMD0)=0
 Q
