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

APCPSR3.m

Go to the documentation of this file.
APCPSR3 ; IHS/TUCSON/LAB - ; [ 08/17/03  8:19 PM ]
 ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;**2,6**;APR 03, 1998
 ;
 Q:'$P(^APCPLOG(APCPSR("LOG"),21,APCPSR("V"),0),U,7)
 S APCPSR("PROC")=""""_APCPSR_""",APCPJOB,APCPBTH,"_""""_"GEN"_""""
 S APCPVAR="TYPE STATDB" D TYPE^APCPSR2 S APCPVAR="SC STATDB" D SC^APCPSR2 S APCPVAR="CLINIC STATDB" D CLINIC^APCPSR2 S APCPVAR="LOC STATDB" D LOC^APCPSR2 S APCPVAR="PROV STATDB" D PROV^APCPSR2 S APCPVAR="V DATE STATDB" D VD^APCPSR2
 Q
STATDBER ;
 S X=0 F  S X=$O(^APCPLOG(APCPSR("LOG"),51,X)) Q:X'=+X  I $E($P(^APCPLOG(APCPSR("LOG"),51,X,0),U,3),1,4)="E054" D
 .S ^("STATDBACTERR")=$S($D(^XTMP("APCPSR",APCPJOB,APCPBTH,"SKIPPED","STATDBACTERR")):(+^("STATDBACTERR")+1),1:1)
 .Q
 Q
STATDBAP ;
 K APCPSR("SKIP STATDB")
 I $P(^APCPLOG(APCPSR("LOG"),21,APCPSR("V"),0),U,6) S ^("STATDBNOAPC")=$S($D(^XTMP("APCPSR",APCPJOB,APCPBTH,"SKIPPED","STATDBNOAPC")):(+^("STATDBNOAPC")+1),1:1),APCPSR("SKIP STATDB")="" Q
 S (APCPSR("1"),APCPSR("2"))=0 F  S APCPSR("2")=$O(^AUPNVPRV("AD",APCPSR("V"),APCPSR("2"))) Q:APCPSR("2")=""  I $P(^AUPNVPRV(APCPSR("2"),0),U,4)="P" S APCPSR("1")=APCPSR("1")+1,APCPSR("AP")=$P(^(0),U)
CHKDISC ;
 S APCPSR("DISC")=$$VAL^XBDIQ1(APCPS("PROV FILE"),APCPSR("AP"),9999999.03)
 S APCPSR("LOCC")=$E($P(^AUTTLOC($P(^AUPNVSIT(APCPSR("V"),0),U,6),0),U,10),5,6)
 I (APCPSR("DISC")=13!(APCPSR("DISC")=32))&((APCPSR("LOCC")>49)!(APCPSR("LOCC")'=+APCPSR("LOCC"))) S ^("STATDBNOAPC")=$S($D(^XTMP("APCPSR",APCPJOB,APCPBTH,"SKIPPED","STATDBNOAPC")):(+^("STATDBNOAPC")+1),1:1),APCPSR("SKIP STATDB")=""
 ;
 Q