AGSSRV ; IHS/ASDS/EFG - REPORT WRITER #2 ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
;report SSNs verified
K AGSSDT
Q:'$D(AGSSP("V")) ;this report not indicated
;crossreferences used
LOAD ;EP - load crossreference into ^AGSTEMP
;gather dfns from "AS" cross reference(s)
K ^AGSTEMP(AGSS("JOBID"),"RV")
S AGSDFN=0,AGSSC("V")=0 F S AGSDFN=$O(^AUPNPAT("AS",1,AGSDFN)) Q:'AGSDFN Q:$G(DUOUT) I $D(^DPT(AGSDFN)) S AGSSC("V")=AGSSC("V")+1 I AGSSP("V")="C" S ^AGSTEMP(AGSS("JOBID"),"RV",$P(^DPT(AGSDFN,0),U),AGSDFN)=""
S ^AGSTEMP(AGSS("JOBID"),"RV")=AGSSC("V")
Q
PRINT ;EP -
Q:'$D(AGSSP("V"))
I '$D(AGSSC("V")) S AGSSC("V")=$G(^AGSTEMP(AGSS("JOBID"),"RV"))
S AGSLVC="V",AGSSPG=1,AGSCREC="",AGSGLO="RV"
S AGSSHDR="SSNs VERIFIED " D AGSSHDR^AGSSPRT
W !!,"The number of ",AGSSHDR," is ",$G(^AGSSTEMP(AGSSITE,"TOT","RV")),!
Q:(AGSSP("V")'="C")!(AGSSC("V")=0)
D AGSSHD^AGSSPRT
D ^AGSSPRT
Q
AGSSRV ; IHS/ASDS/EFG - REPORT WRITER #2 ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
+3 ;report SSNs verified
+4 KILL AGSSDT
+5 ;this report not indicated
IF '$DATA(AGSSP("V"))
QUIT
+6 ;crossreferences used
LOAD ;EP - load crossreference into ^AGSTEMP
+1 ;gather dfns from "AS" cross reference(s)
+2 KILL ^AGSTEMP(AGSS("JOBID"),"RV")
+3 SET AGSDFN=0
SET AGSSC("V")=0
FOR
SET AGSDFN=$ORDER(^AUPNPAT("AS",1,AGSDFN))
IF 'AGSDFN
QUIT
IF $GET(DUOUT)
QUIT
IF $DATA(^DPT(AGSDFN))
SET AGSSC("V")=AGSSC("V")+1
IF AGSSP("V")="C"
SET ^AGSTEMP(AGSS("JOBID"),"RV",$PIECE(^DPT(AGSDFN,0),U),AGSDFN)=""
+4 SET ^AGSTEMP(AGSS("JOBID"),"RV")=AGSSC("V")
+5 QUIT
PRINT ;EP -
+1 IF '$DATA(AGSSP("V"))
QUIT
+2 IF '$DATA(AGSSC("V"))
SET AGSSC("V")=$GET(^AGSTEMP(AGSS("JOBID"),"RV"))
+3 SET AGSLVC="V"
SET AGSSPG=1
SET AGSCREC=""
SET AGSGLO="RV"
+4 SET AGSSHDR="SSNs VERIFIED "
DO AGSSHDR^AGSSPRT
+5 WRITE !!,"The number of ",AGSSHDR," is ",$GET(^AGSSTEMP(AGSSITE,"TOT","RV")),!
+6 IF (AGSSP("V")'="C")!(AGSSC("V")=0)
QUIT
+7 DO AGSSHD^AGSSPRT
+8 DO ^AGSSPRT
+9 QUIT