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

IBARXEC1.m

Go to the documentation of this file.
  1. IBARXEC1 ;ALB/AAS - RX CO-PAY EXEMPTION REPORT GENERATOR ; 04-JAN-93
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. % ;
  1. START ; -- entry point for running conversion report from option
  1. D HOME^%ZIS W @IOF,?15,"Medication Copayment Charges Retroactively Canceled",!!
  1. ;
  1. I '$P(^IBE(350.9,1,3),"^",14) W !!,"This report cannot be run until the conversion has completed." G END
  1. ;
  1. BDT ; -get beginning date
  1. S (IBBDT,IBEDT)=""
  1. S Y=$$STDATE^IBARXEU D D^DIQ S %DT("B")=Y
  1. S %DT="AEPX",%DT("A")="Start with DATE: " D ^%DT K %DT G END:Y<0 S IBBDT=Y
  1. K %DT W !
  1. ;
  1. EDT ; -get ending date
  1. S Y=$P($P(^IBE(350.9,1,3),"^",14),".") D D^DIQ S %DT("B")=Y
  1. S %DT="APEX",%DT("A")="Go to DATE: " D ^%DT G END:Y<0 S IBEDT=Y I Y<IBBDT W *7," ??",!,"ENDING DATE must follow BEGINNING DATE." G BDT
  1. K %DT W !
  1. ;
  1. S DIR("A")="Print Conversion Quick Status Report with listing",DIR(0)="Y",DIR("B")="NO" D ^DIR K DIR G:$D(DIRUT) END S IBQUIC=Y
  1. ;
  1. DEV W !!,"You will need a 132 column printer for this report!",!
  1. S %ZIS="QM" D ^%ZIS G:POP END
  1. I $D(IO("Q")) S ZTRTN="REPORT^IBARXEC1",ZTSAVE("IB*")="",ZTDESC="IB Medication Copayment Exemption Conversion Report" D ^%ZTLOAD K ZTSK D HOME^%ZIS G END
  1. ;
  1. REPORT ; -- run report for conversion
  1. I $D(IBCONVER) D
  1. .D QUIC
  1. .Q:IO'=IO(0)
  1. .I '$D(ZTQUEUED) W !!,"Please wait while I compile the report by patient...."
  1. .W !!,"This report can be re-run by re-running the conversion",!,"or using the option provided."
  1. .S IBBDT=$$STDATE^IBARXEU
  1. .S IBEDT=$P(^IBE(350.9,1,3),"^",14)
  1. .Q
  1. ;
  1. U IO
  1. Q:'$P(^IBE(350.9,1,3),"^",14)
  1. ;
  1. S IBQUIT=0
  1. I $G(IBQUIC)=1 D QUIC
  1. D BUILD^IBARXEC4
  1. D PRINT^IBARXEC5
  1. ;
  1. END K ^TMP("IBCONV",$J)
  1. I $D(ZTQUEUED) S ZTREQ="@" Q
  1. K N,N1,O,O1,X,X1,X2,Y,DFN,IBAMT,IBBCNT,IBBDT,IBDT,IBEDT,IBJ,IBN,IBNAM,IBOK,IBP,IBPAG,IBCNT,IBPDAT,IBPCNT,IBQUIC,IBTAMT,IBTCNT,IBX
  1. D END^IBARXEC
  1. Q
  1. ;
  1. QUIC ; -- quick summary
  1. I '$D(IOF) D HOME^%ZIS
  1. N IBX,X,X1,X2,X3,Y
  1. S IBX=$G(^IBE(350.9,1,3)),X3=10
  1. ;
  1. W @IOF,?20,"Medication Copayment Exemption Conversion Status"
  1. I '$P(IBX,"^",3),'$P(IBX,"^",13) W !!,"Conversion has not been started" Q
  1. I $P(IBX,"^",3)>1 W !!,"The conversion has been started ",$P(IBX,"^",3)," times"
  1. I $P(IBX,"^",13) W !!,"Conversion was started on: " S Y=$P(IBX,"^",13) D DT^DIQ
  1. I $P(IBX,"^",14) W !,"The conversion completed on: " S Y=$P(IBX,"^",14) D DT^DIQ,ELAP W !,Y
  1. W !!," Last Patient DFN Checked == ",$J(+$P(IBX,"^",4),10)
  1. W !!," 1. Total Patients Checked == " S X=+$P(IBX,"^",5),X2=0 D COMMA^%DTC W X
  1. W !," Exempt Patients == " S X=+$P(IBX,"^",6),X2=0 D COMMA^%DTC W X
  1. W !," Non-Exempt Patients == " S X=+$P(IBX,"^",7),X2=0 D COMMA^%DTC W X
  1. W !!," 2. Total Number of Rx Charges checked == " S X=+$P(IBX,"^",16),X2=0 D COMMA^%DTC W X
  1. W !," Dollar Amount Checked == " S X=+$P(IBX,"^",9),X2="0$" D COMMA^%DTC W X
  1. W !," No. of Exempt Rx Charges Checked == " S X=+$P(IBX,"^",8),X2=0 D COMMA^%DTC W X
  1. W !," Exempt Dollar amount == " S X=+$P(IBX,"^",10),X2="0$" D COMMA^%DTC W X
  1. W !," No. of Non-Exempt Rx Charges Checked == " S X=+$P(IBX,"^",15),X2=0 D COMMA^%DTC W X
  1. W !," Non-exempt Dollar amount == " S X=+$P(IBX,"^",11),X2="0$" D COMMA^%DTC W X
  1. W !!," 3. Total Rx Charges Actually canceled == " S X=+$P(IBX,"^",17),X2=0 D COMMA^%DTC W X
  1. W !," Amount Actually canceled == " S X=+$P(IBX,"^",12),X2="0$" D COMMA^%DTC W X
  1. QUICQ Q
  1. ;
  1. ELAP ; -- calcualate elaplse running time
  1. N X,IBBDT,IBEDT,IBDAY
  1. S X=$P(IBX,"^",13) D H^%DTC S IBBDT=%H_","_%T
  1. S X=$P(IBX,"^",14) D H^%DTC S IBEDT=%H_","_%T
  1. S IBDAY=+IBEDT-(+IBBDT)*86400 S X=IBDAY+$P(IBEDT,",",2)-$P(IBBDT,",",2) S Y="Elapsed time for Conversion was: "_(X\3600)_" Hours, "_(X\60-(X\3600*60))_" Minutes, "_(X#60)_" Seconds"
  1. Q