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

ACDVSAV2.m

Go to the documentation of this file.
ACDVSAV2 ;IHS/ADC/EDE/KML - BROKE UP ACDVSAVE;
 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
 ;
V ;EP-V node
 ;//^ACDVSAVE
 S ACDVHIT=0
 Q:ACDPGM'=$G(^ACDVIS(ACDV,"BWP"))  ;  quit if not signon site
 I '$D(^ACDVIS(ACDV,0)) Q
 I $P(^ACDVIS(ACDV,0),U,25) Q
 I '$D(^ACDVIS(ACDV,"BWP")) Q
 S ACDBWP=^ACDVIS(ACDV,"BWP"),ACDBWP=$P(^ACDF5PI(ACDBWP,0),U),ACD6PGM=$P(^AUTTLOC(ACDBWP,0),U,10)
 S ACDUSER=$P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,10)_"*"_ACD6PGM
 ;
 S ACD("V")=^ACDVIS(ACDV,0)
 S DIE="^ACDVIS(",DA=ACDV,DR="25///T" D DIE^ACDFMC
 S ^ACDVTMP(ACDUSER,ACDV,"V")=ACD("V")
 S ACDVHIT=1
 Q
CLN ;EP-Make pass to clean incomplete entries
 ;//^ACDVSAVE
 W !!,"Deleting incomplete visit data extracts."
 S ACDUSER="" F  S ACDUSER=$O(^ACDVTMP(ACDUSER)) Q:ACDUSER=""  F ACDV=0:0 S ACDV=$O(^ACDVTMP(ACDUSER,ACDV)) Q:'ACDV  I '$D(^(ACDV,"TDC")),'$D(^("IIF")),'$D(^("CS")) K ^ACDVTMP(ACDUSER,ACDV)
 Q