APCDFOS2 ; IHS/CMI/LAB - PRINT FORMS TRACKING SUMMARY ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
AMB ;EP
I $Y>(IOSL-8) D HEAD^APCDFOSP Q:APCDQUIT
W !!!,"AMBULATORY CARE VISITS (non-chs, excludes events, hospitalizations,in-hosp)",!
W !,"There were ",$S($G(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TOTAL")):^("TOTAL"),1:" 0")," ambulatory documents during this period."
G:'$G(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TOTAL")) DEP
D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
W !!?2,"By TYPE:"
S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TYPE",X)) Q:X=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TYPE",X),8)
.Q
Q:APCDQUIT
D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By LOCATION:"
S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","LOC",X)) Q:X=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","LOC",X),8)
.Q
D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By SERVICE CATEGORY:"
S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CAT",X)) Q:X=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CAT",X),8)
.Q
D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By CLINIC Type:"
S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CLN",X)) Q:X=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CLN",X),8)
.Q
D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By PROVIDER DISCIPLINE (Primary and Secondary Providers):"
S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","PROV",X)) Q:X=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","PROV",X),8)
.Q
DEP ;
I $Y>(IOSL-9) D HEAD^APCDFOSP Q:APCDQUIT
W !!,"DEPENDENT ENTRY COUNT",!
W !,"There were ",$S($G(^XTMP("APCDFOS",APCDJ,APCDBT,"DEP","TOTAL")):^("TOTAL"),1:" 0")," visit related data items entered during",!,"this period. They are broken down below by data type. Labs, Medications,",!
W "Dental and Radiology data items are excluded because in general, these are",!,"entered through the ancillary package.",!
S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"DEP","FILE",X)) Q:X=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"DEP","FILE",X),8)
.Q
OPER ;
I $Y>(IOSL-8) D HEAD^APCDFOSP Q:APCDQUIT
W !!!!?20,"FORMS PROCESSED BY EACH OPERATOR"
S O="" F S O=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O)) Q:O=""!(APCDQUIT) D
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"OPERATOR: ",O
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !?2,"TOTAL Number of Forms Processed: ",$J(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"TOTAL"),8)
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By TYPE:"
.S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"TYPE",X)) Q:X=""!(APCDQUIT) D
..D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
..W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"TYPE",X),8)
..Q
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By LOCATION:"
.S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"LOC",X)) Q:X=""!(APCDQUIT) D
..D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
..W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"LOC",X),8)
..Q
.D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT W !!?2,"By SERVICE CATEGORY:"
.S X="" F S X=$O(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"CAT",X)) Q:X=""!(APCDQUIT) D
..D:$Y>(IOSL-6) HEAD^APCDFOSP Q:APCDQUIT
..W !,?5,$E(X,1,30),?35,$J(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"CAT",X),8)
..Q
LOC ;
D LOC^APCDFOS3
Q
APCDFOS2 ; IHS/CMI/LAB - PRINT FORMS TRACKING SUMMARY ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
AMB ;EP
+1 IF $Y>(IOSL-8)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+2 WRITE !!!,"AMBULATORY CARE VISITS (non-chs, excludes events, hospitalizations,in-hosp)",!
+3 WRITE !,"There were ",$SELECT($GET(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TOTAL")):^("TOTAL"),1:" 0")," ambulatory documents during this period."
+4 IF '$GET(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TOTAL"))
GOTO DEP
+5 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+6 WRITE !!?2,"By TYPE:"
+7 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TYPE",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:1
+8 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+9 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","TYPE",X),8)
+10 QUIT
End DoDot:1
+11 IF APCDQUIT
QUIT
+12 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By LOCATION:"
+13 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","LOC",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:1
+14 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+15 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","LOC",X),8)
+16 QUIT
End DoDot:1
+17 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By SERVICE CATEGORY:"
+18 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CAT",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:1
+19 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+20 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CAT",X),8)
+21 QUIT
End DoDot:1
+22 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By CLINIC Type:"
+23 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CLN",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:1
+24 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+25 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","CLN",X),8)
+26 QUIT
End DoDot:1
+27 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By PROVIDER DISCIPLINE (Primary and Secondary Providers):"
+28 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","PROV",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:1
+29 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+30 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"AMB","PROV",X),8)
+31 QUIT
End DoDot:1
DEP ;
+1 IF $Y>(IOSL-9)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+2 WRITE !!,"DEPENDENT ENTRY COUNT",!
+3 WRITE !,"There were ",$SELECT($GET(^XTMP("APCDFOS",APCDJ,APCDBT,"DEP","TOTAL")):^("TOTAL"),1:" 0")," visit related data items entered during",!,"this period. They are broken down below by data type. Labs, Medications,",!
+4 WRITE "Dental and Radiology data items are excluded because in general, these are",!,"entered through the ancillary package.",!
+5 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"DEP","FILE",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:1
+6 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+7 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"DEP","FILE",X),8)
+8 QUIT
End DoDot:1
OPER ;
+1 IF $Y>(IOSL-8)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+2 WRITE !!!!?20,"FORMS PROCESSED BY EACH OPERATOR"
+3 SET O=""
FOR
SET O=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O))
IF O=""!(APCDQUIT)
QUIT
Begin DoDot:1
+4 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"OPERATOR: ",O
+5 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !?2,"TOTAL Number of Forms Processed: ",$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"TOTAL"),8)
+6 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+7 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By TYPE:"
+8 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"TYPE",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:2
+9 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+10 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"TYPE",X),8)
+11 QUIT
End DoDot:2
+12 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By LOCATION:"
+13 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"LOC",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:2
+14 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+15 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"LOC",X),8)
+16 QUIT
End DoDot:2
+17 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
WRITE !!?2,"By SERVICE CATEGORY:"
+18 SET X=""
FOR
SET X=$ORDER(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"CAT",X))
IF X=""!(APCDQUIT)
QUIT
Begin DoDot:2
+19 IF $Y>(IOSL-6)
DO HEAD^APCDFOSP
IF APCDQUIT
QUIT
+20 WRITE !,?5,$EXTRACT(X,1,30),?35,$JUSTIFY(^XTMP("APCDFOS",APCDJ,APCDBT,"OPER",O,"CAT",X),8)
+21 QUIT
End DoDot:2
End DoDot:1
LOC ;
+1 DO LOC^APCDFOS3
+2 QUIT