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

ABPAOP5.m

Go to the documentation of this file.
ABPAOP5 ;PRINT AO PVT INS POSTING LOG; [ 03/10/91  4:31 PM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
A0 Q  ;;NOT AN ENTRY POINT
A1 ;QUEUE POSTING LOG PRINT JOB
 W !!,"YOUR POSTING LOG WILL NOW BE PRINTED!"
 S ZTRTN="ENTER^ABPAOP5",ZTDESC="PRINT AO PVT INS POSTING LOG"
 S ZTDTH=$H,ZTIO=ABPA("IO"),ZTSAVE("ABPA(")="" D ^%ZTLOAD
 K ABPA,ZTRTN,ZTDESC,ZTIO,ZTSAVE
 Q
 ;
ENTER ;ENTRY POINT FOR TASK MANAGER
 K ABPA("HD") S ABPA("HD",1)="AO PRIVATE INSURANCE SYSTEM"
 S ABPA("HD",2)="DATABASE POSTING LOG",ABPAPG=0
LOOP1 K ^TMP("ABPAOP",$J) S FC=0 F I=0:0 D  Q:+FC=0
 .S FC=$O(^ABPAPOST(1,"F","B",FC)) Q:+FC=0
 .S SITENAME=$P(^DIC(4,FC,0),"^")
 .S NVCNT=$P(^ABPAPOST(1,"F",FC,0),"^",5)
 .S NPCNT=$P(^ABPAPOST(1,"F",FC,0),"^",6)
 .S NCCNT=$P(^ABPAPOST(1,"F",FC,0),"^",7)
 .S ^TMP("ABPAOP",$J,SITENAME,"TOTALS")=NVCNT_"^"_NPCNT_"^"_NCCNT
 .S DFN=0 F I=0:0 D  Q:+DFN=0
 ..S DFN=$O(^ABPAPOST(1,"F",FC,"P",DFN)) Q:+DFN=0
 ..S PATNAME=$P(^ABPVAO(DFN,0),"^"),HRN=$P(^(0),"^",3)
 ..S ^TMP("ABPAOP",$J,SITENAME,"P",PATNAME)=HRN
 .S DFN=0 F I=0:0 D  Q:+DFN=0
 ..S DFN=$O(^ABPAPOST(1,"F",FC,"I",DFN)) Q:+DFN=0
 ..S INSNAME=$P(^AUTNINS(DFN,0),"^"),ZIP=$P(^(0),"^",5)
 ..S ^TMP("ABPAOP",$J,SITENAME,"I",INSNAME)=ZIP
LOOP2 S FC=0 F I=0:0 D  Q:FC=""
 .S FC=$O(^TMP("ABPAOP",$J,FC)) Q:FC=""
 .S DATA=^TMP("ABPAOP",$J,FC,"TOTALS")
 .S NVCNT=$P(DATA,"^"),NPCNT=$P(DATA,"^",2),NCCNT=$P(DATA,"^",3)
 .D HEADP
 .S DFN=0 F I=0:0 D  Q:DFN=""
 ..S DFN=$O(^TMP("ABPAOP",$J,FC,"P",DFN)) Q:DFN=""
 ..W !?15,DFN,?48,$J(^TMP("ABPAOP",$J,FC,"P",DFN),6)
 ..D:$Y>57 HEADP
 .I $Y<50 D
 ..W !!!?24,"INSURER NAME",?52,"ZIP",!?15
 ..W "------------------------------",?48,"----------"
 .I $Y'<50 D HEADI
 .S DFN=0 F I=0:0 D  Q:DFN=""
 ..S DFN=$O(^TMP("ABPAOP",$J,FC,"I",DFN)) Q:DFN=""
 ..W !?15,DFN,?48,$J(^TMP("ABPAOP",$J,FC,"I",DFN),10)
 ..D:$Y>57 HEADI
 .W !?5 F I=1:1:70 W "-"
 .W !!?10,$J("# NEW INSURERS ADDED: ",25),$J(NVCNT,6)
 .W !?10,$J("# NEW PATIENTS ADDED: ",25),$J(NPCNT,6)
 .W !?10,$J("# NEW CLAIMS ADDED: ",25),$J(NCCNT,6)
TOTAL S FC="ALL FACILITIES" D ^ABPAOPHD
 W !!?5 F I=1:1:70 W "-"
 W !!?10,$J("TOTAL NEW INSURERS ADDED: ",30)
 W $J($P(^ABPAPOST(1,0),"^",2),8)
 W !!?10,$J("TOTAL NEW PATIENTS ADDED: ",30)
 W $J($P(^ABPAPOST(1,0),"^",3),8)
 W !!?10,$J("TOTAL NEW CLAIMS ADDED: ",30)
 W $J($P(^ABPAPOST(1,0),"^",4),8)
 D ^%AUCLS
 ;
 Q
 ;
HEADP D ^ABPAOPHD
 W !!?24,"PATIENT NAME",?50,"HRN",!?15,"------------------------------"
 W ?48,"------"
 Q
 ;
HEADI D ^ABPAOPHD
 W !!?24,"INSURER NAME",?52,"ZIP",!?15
 W "------------------------------",?48,"----------"