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

APCDDVW2.m

Go to the documentation of this file.
APCDDVW2 ; IHS/CMI/LAB - PRINT TXER REPORT ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
TXER ;EP;print transaction errors
 K APCDDEM
 D HEAD^APCDDVW
 W !!,"TOTAL NUMBER OF ERRORS ON THIS TXER REPORT: ",$G(APCDCNTR("TXER")),!!
 I '$D(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER")) W !!,"There are no visits in the specified ",$S(APCDPROC="P":"Posting",APCDPROC="V":"Visit",1:"Posting")," date range ",!,"that have Transaction Errors." Q
 S APCDCL=0 F  S APCDCL=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL)) Q:APCDCL'=+APCDCL!($D(APCDQUIT))  S APCDCLIN="" F  S APCDCLIN=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL,APCDCLIN)) Q:APCDCLIN=""!($D(APCDQUIT))  D
 .S APCDH="" F  S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL,APCDCLIN,APCDH)) Q:APCDH=""!($D(APCDQUIT))  D
 ..S APCDV=0 F  S APCDV=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL,APCDCLIN,APCDH,APCDV)) Q:APCDV'=+APCDV!($D(APCDQUIT))  D:$Y>(IOSL-9) HEAD^APCDDVW Q:$D(APCDQUIT)  D PRN1^APCDDVW W !?20,"ERROR INFORMATION" D TXER2
 Q:$D(APCDQUIT)
 S APCDDEM="",APCDPG=0
 D HEAD^APCDDVW
 I '$D(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG")) W !!,"NO VISITS WITH DEMOGRAPHIC (PAT REG) ERRORS"
 S APCDCL=0 F  S APCDCL=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL)) Q:APCDCL'=+APCDCL!($D(APCDQUIT))  D
 .S APCDCLIN="" F  S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL,APCDCLIN)) Q:APCDCLIN=""!($D(APCDQUIT))  D
 ..S APCDH="" F  S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL,APCDCLIN,APCDH)) Q:APCDH=""!($D(APCDQUIT))  D
 ...S APCDV=0 F  S APCDV=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL,APCDCLIN,APCDH,APCDV)) Q:APCDV'=+APCDV!($D(APCDQUIT))  D:$Y>(IOSL-9) HEAD^APCDDVW Q:$D(APCDQUIT)  D PRN1^APCDDVW W !?20,"ERROR INFORMATION" D TXERD2
 Q:$D(APCDQUIT)
 K APCDDEM S APCDDEMM="",APCDPG=0
 D HEAD^APCDDVW
 I '$D(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND")) W !!,"NO VISITS WITH MANDATORY DATA ITEMS MISSING OR INVALID",!
 S APCDCL=0 F  S APCDCL=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL)) Q:APCDCL'=+APCDCL!($D(APCDQUIT))  D
 .S APCDCLIN="" F  S APCDCLIN=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL,APCDCLIN)) Q:APCDCLIN=""!($D(APCDQUIT))  D
 ..S APCDH="" S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL,APCDCLIN,APCDH)) Q:APCDH=""!($D(APCDQUIT))  D
 ...S APCDV=0 F  S APCDV=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL,APCDCLIN,APCDH,APCDV)) Q:APCDV'=+APCDV!($D(APCDQUIT))  D:$Y>(IOSL-4) HEAD^APCDDVW Q:$D(APCDQUIT)  D PRN1^APCDDVW W !?20,"ERROR INFORMATION" D TXERD3
 Q
TXERD2 ;
 S (APCDFILE,APCDECNT)=""
 F  S APCDECNT=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT)) Q:APCDECNT=""  S APCDFILE=$P(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT),U,2) D TXERDW
 Q
TXER2 S (APCDFILE,APCDECNT)=""
 F  S APCDECNT=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT)) Q:APCDECNT=""  S APCDFILE=$P(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT),U,2) D TXERW
 Q
TXERDW W !," FILE: ",$E($P(^DIC(APCDFILE,0),U),1,13),"  ",$P(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOG",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT),U)
 Q
TXERW W !," FILE: ",$E($P(^DIC(APCDFILE,0),U),1,13),"  ",$P(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT),U)
 Q
TXERDMW W !," FILE: ",$E($P(^DIC(APCDFILE,0),U),1,13),"  ",$P(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT),U)
 Q
TXERD3 S (APCDFILE,APCDECNT)=""
 F  S APCDECNT=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT)) Q:APCDECNT=""!($D(APCDQUIT))  D
 .S APCDFILE=$P(^XTMP("APCDDV",APCDJOB,APCDBT,"TXER","DEMOGMAND",APCDCL,APCDCLIN,APCDH,APCDV,APCDECNT),U,2) D TXERDMW
 Q
 ;