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

BARDYSV7.m

Go to the documentation of this file.
BARDYSV7 ; IHS/SD/SDR - DAYS TO COLLECTION comma-delimited summary ; 02/09/2009
 ;;1.8;IHS ACCOUNTS RECEIVABLE;**28**;OCT 26,2005;Build 92
 ;IHS/SD/SDR - 1.8*28 - HEAT224215 - New routine to print comma-delimited summary report
 ;
 Q
 ;
PRTVSCOM ;EP
 S ESC=0
 S $P(EQUALS,"=",181)=""
 D VISHDR
 ;THESE ARE PAGE SUBTOTALS
 S (COLVISIT,COLWITBL,COLNUMBL,COLBILAM,COLCHKIN,COLCREDY,COLREVDY)=0
 S (COLTPBA,COLTPBX,COLTOPY,COLEARPY,COLLSTPY,COLTOTPS,PGCNT)=0
 S COLTOTPY=0  ;TOT PAY MADE
 S MONTHYR=""
 F  S MONTHYR=$O(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR)) Q:MONTHYR=""  D  Q:+$G(ESC)
 .S YR=$P(MONTHYR," ")
 .S MTH=$$MONTH^BARDYSPR(+$P(MONTHYR," ",2))
 .S COLTOTPY=COLTOTPY+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT PAY MADE","MONTHYR",MONTHYR))  ;TOT PAYMENTS MADE
 .W !,MTH," ",YR  ;;MONTH of DOS
 .W U_$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR))  ;# of Visits
 .S COLVISIT=COLVISIT+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR))
 .W U_$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","WITBILLS","MONTHYR",MONTHYR))  ;# Visits with Bills
 .S COLWITBL=COLWITBL+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","WITBILLS","MONTHYR",MONTHYR))
 .W U_$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BILLNUM","MONTHYR",MONTHYR))  ;# of Bills
 .S COLNUMBL=COLNUMBL+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BILLNUM","MONTHYR",MONTHYR))
 .W U_$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","AMTBILLD","MONTHYR",MONTHYR))  ;Billed Amount
 .S COLBILAM=COLBILAM+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","AMTBILLD","MONTHYR",MONTHYR))
 .W U
 .I +^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR)'=0 D  ;AVG Visits Checked in
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","AVGCHKIN","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLCHKIN=COLCHKIN+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","AVGCHKIN","MONTHYR",MONTHYR))
 .W U
 .I +^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR)'=0 D  ;AVG Days to PCC CREATED
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","CREDAYS","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLCREDY=COLCREDY+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","CREDAYS","MONTHYR",MONTHYR))
 .W U
 .I +^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR)'=0 D  ;AVG Days to Reviewed
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","REVDAYS","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","NUMVISIT","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLREVDY=COLREVDY+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","REVDAYS","MONTHYR",MONTHYR))
 .W U
 .I +$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BILLNUM","MONTHYR",MONTHYR))'=0 D  ;AVG Days to 3P APPROVED
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","DAYSAPP","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BILLNUM","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLTPBA=COLTPBA+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","DAYSAPP","MONTHYR",MONTHYR))
 .W U
 .I +$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BILLNUM","MONTHYR",MONTHYR))'=0 D  ;AVG Days to EXPORTED
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","DAYSEXP","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BILLNUM","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLTPBX=COLTPBX+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","DAYSEXP","MONTHYR",MONTHYR))
 .W U
 .I +$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT PAY MADE","MONTHYR",MONTHYR))'=0 D  ;AVG Days to Payment
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","DYSTOPAY","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT PAY MADE","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLTOPY=COLTOPY+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","DYSTOPAY","MONTHYR",MONTHYR))
 .W U
 .I +$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT PAY MADE","MONTHYR",MONTHYR))'=0 D  ;AVG Days to First Posting
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","EARLYPAY","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT FIRST PAYMENT MADE","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLEARPY=COLEARPY+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","EARLYPAY","MONTHYR",MONTHYR))
 .W U
 .I +$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT LAST PAYMENT MADE","MONTHYR",MONTHYR))'=0 D  ;AVG Days to Last Posting
 ..W $J($G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","LASTPAY","MONTHYR",MONTHYR))/^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOT LAST PAYMENT MADE","MONTHYR",MONTHYR),GENERALW,DECIMALS)
 ..S COLLSTPY=COLLSTPY+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","LASTPAY","MONTHYR",MONTHYR))
 .W U_$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOTPOST","MONTHYR",MONTHYR))  ;Total Posted Amounts
 .S COLTOTPS=COLTOTPS+$G(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","TOTPOST","MONTHYR",MONTHYR))
 ;
 S TOTNOEXP("GRANDTOT")=0
 S MONTHYR=""
 F  S MONTHYR=$O(^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BLLNOEXP","MONTHYR",MONTHYR)) Q:'MONTHYR  D
 .S TOTNOEXP("GRANDTOT")=TOTNOEXP("GRANDTOT")+^XTMP("BARDYSVS",$J,"DAYS TO COL VISIT","BLLNOEXP","MONTHYR",MONTHYR)
 W !,"TOTAL BILLS WITH NO EXPORT: ",TOTNOEXP("GRANDTOT")
 I IOST[("P-") D ^%ZISC Q
 K DIR S DIR(0)="E" D ^DIR
 Q
 ;
VISHDR ;EP -
 S BAR("PG")=BAR("PG")+1
 S BAR("HD",0)=""
 S BAR("LOC")=""
 S BAR("OPT")="BAR RPT DAYS IN AR"
 D HD^BARRHD
 D WHD^BARRHD
 W !,"MonthYear^#ofVisits^#VisitsWithBills^#Bills^BillAmount^AvgVisitsCheckedIn^AvgDaysToPCCCreated^AvgDaysToReviewed^AvgDays3PBillApproved^AvgDaysExported^AvgDaysToPayment^AvgDaysFirstPosting^AvgDaysLastPosting^TotalPostedAmounts"
 Q
 ;EOR - IHS/DIT/CPC 1.8*28