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

APCDDVW1.m

Go to the documentation of this file.
APCDDVW1 ; IHS/CMI/LAB - Print Hosp. review report ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
ZERO ;EP;Write zero dependent report
 D HEAD^APCDDVW
 W !!,"TOTAL NUMBER OF ERRORS ON THIS ZERO DEPENDENT ENTRY REPORT: ",$G(APCDCNTR("ZERO")),!!
 I '$D(^XTMP("APCDDV",APCDJOB,APCDBT,"ZERO")) W !!,"There are no Visits with a Zero Dependent Entry Count on or ",!,"after ",$S(APCDPROC="P":"Posting",APCDPROC="V":"Visit",1:"Posting")," date " S Y=APCDBD D DT^DIO2 S Y="" Q
 S APCDCL=0 F  S APCDCL=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"ZERO",APCDCL)) Q:APCDCL'=+APCDCL!($D(APCDQUIT))  S APCDCLIN="" F  S APCDCLIN=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"ZERO",APCDCL,APCDCLIN)) Q:APCDCLIN=""!($D(APCDQUIT))  D
 .S APCDH="" F  S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"ZERO",APCDCL,APCDCLIN,APCDH)) Q:APCDH=""!($D(APCDQUIT))  D
 ..S APCDV=0 F  S APCDV=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"ZERO",APCDCL,APCDCLIN,APCDH,APCDV)) Q:APCDV'=+APCDV!($D(APCDQUIT))  D:$Y>(IOSL-4) HEAD^APCDDVW Q:$D(APCDQUIT)  D PRN1^APCDDVW
 Q
MRG ;EP;print potential merges
 D HEAD^APCDDVW
 W !!,"TOTAL NUMBER OF POTENTIAL MERGES ON THIS REPORT: ",$G(APCDCNTR("MRG")),!!
 I '$D(^XTMP("APCDDV",APCDJOB,APCDBT,"MRG")) W !!,"There are no visits in the specified ",$S(APCDPROC="P":"Posting",APCDPROC="V":"Visit",1:"Posting")," date range that should be merged." Q
MRG2 ;
 S APCDCL=0 F  S APCDCL=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"MRG",APCDCL)) Q:APCDCL'=+APCDCL!($D(APCDQUIT))  S APCDCLIN="" F  S APCDCLIN=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"MRG",APCDCL,APCDCLIN)) Q:APCDCLIN=""!($D(APCDQUIT))  D
 .S APCDH="" F  S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"MRG",APCDCL,APCDCLIN,APCDH)) Q:APCDH=""!($D(APCDQUIT))  D
 ..S APCDVSIT=0 F  S APCDVSIT=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"MRG",APCDCL,APCDCLIN,APCDH,APCDVSIT)) Q:APCDVSIT=""  Q:$D(APCDQUIT)  D MRG3
 Q
MRG3 ;
 S APCDV=0 F  S APCDV=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"MRG",APCDCL,APCDCLIN,APCDH,APCDVSIT,APCDV)) Q:APCDV=""  D:$Y>(IOSL-7) HEAD^APCDDVW Q:$D(APCDQUIT)  D PRN1^APCDDVW
 Q
INPT ;EP;print inpatient errors
 D HEAD^APCDDVW
 W !!,"TOTAL NUMBER OF ERRORS ON THIS INPT REPORT: ",$G(APCDCNTR("INPT")),!!
 I '$D(^XTMP("APCDDV",APCDJOB,APCDBT,"INPT")) W !!,"There are no Hospitalization visits in the specified ",$S(APCDPROC="P":"Posting",APCDPROC="V":"Visit",1:"Posting")," date range ",!,"that have Errors." Q
 S APCDCL=0 F  S APCDCL=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"INPT",APCDCL)) Q:APCDCL'=+APCDCL!($D(APCDQUIT))  S APCDCLIN="" F  S APCDCLIN=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"INPT",APCDCL,APCDCLIN)) Q:APCDCLIN=""!($D(APCDQUIT))  D
 .S APCDH="" F  S APCDH=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"INPT",APCDCL,APCDCLIN,APCDH)) Q:APCDH=""!($D(APCDQUIT))  D
 ..S APCDV=0 F  S APCDV=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"INPT",APCDCL,APCDCLIN,APCDH,APCDV)) Q:APCDV'=+APCDV!($D(APCDQUIT))  D:$Y>(IOSL-7) HEAD^APCDDVW Q:$D(APCDQUIT)  D PRN1^APCDDVW W !?20,"ERROR INFORMATION" D INPT2
 D XIT
 Q
INPT2 S APCDE="" F  S APCDE=$O(^XTMP("APCDDV",APCDJOB,APCDBT,"INPT",APCDCL,APCDCLIN,APCDH,APCDV,APCDE)) Q:APCDE=""  D INPTW
 Q
INPTW W !," Error #",APCDE,":  ",^XTMP("APCDDV",APCDJOB,APCDBT,"INPT",APCDCL,APCDCLIN,APCDH,APCDV,APCDE)
 Q
DISPPP ;EP display primary provider
 NEW X,Y S X=0 F  S X=$O(^AUPNVPRV("AD",APCDV,X)) Q:X'=+X  I $P(^AUPNVPRV(X,0),U,4)="P" W ?30,"PRIMARY PROVIDER: [",$S($P(^DD(9000010.06,.01,0),U,2)[200:$P(^VA(200,$P(^AUPNVPRV(X,0),U),0),U),1:$P(^DIC(16,$P(^AUPNVPRV(X,0),U),0),U)),"]"
 Q
XIT ; Clean up and exit
 K APCDDT,APCDLC,APCDV,APCDBS,APCDV2,APCDL,APCDE,APCDEDFN,APCDVR,APCDRD,DFN,APCDH,APCDDEM
 Q