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

AGPATCNT.m

Go to the documentation of this file.
AGPATCNT ; IHS/ASDS/EFG - COUNT TOTAL PATIENTS REGISTERED AT SELECTED FACILITY ;  
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 K AG("SCREEN") G B:$D(AG("FAC"))
 K DIC S DIC="^AUTTLOC(",DIC(0)="QAZEM",AG("SCREEN")="" D ^DIC Q:+Y<1  S AG("FAC")=+Y,AG("LOC")=$P(^DIC(4,AG("FAC"),0),U)
 S IOP=ION D ^%ZIS,WAIT^DICD S DX=$X,DY=$Y
B Q:'$D(AG("FAC"))  S (DFN,AGTOT)=0
 F AG=0:0 S DFN=$O(^AUPNPAT(DFN)) Q:+DFN<1  I $D(^AUPNPAT(DFN,41,AG("FAC"))) S AGTOT=AGTOT+1 I $D(AG("SCREEN")) X XY W AGTOT
 S AG("TOTPAT")=AGTOT I $D(AG("SCREEN")) W !!,"Total patients registered at ",AG("LOC"),": ",AG("TOTPAT")
 K AG("FAC"),DFN,DIC,DX,DY,AG("LOC"),AG("SCREEN"),AGTOT,X,XY,Y
 Q