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

IBCNHPR.m

Go to the documentation of this file.
  1. IBCNHPR ;ALB/CJS - HPID ADDED TO BILLING CLAIM REPORT (DRIVER) ;15-DEC-14
  1. ;;2.0;INTEGRATED BILLING;**525**;21-MAR-94;Build 105
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. EN ; Describe report
  1. N I,IBBEG,IBEND,IBOUT
  1. W !!?5,"This report will generate a list of HPID numbers that have been added",!?5,"directly to claims."
  1. W !!?5,"Please select the date range within which the HPIDs were entered."
  1. ;
  1. ; Prompt user to select date range
  1. ;
  1. ; Output from user selections:
  1. ;
  1. ; IBBEG -- beginning date of report
  1. ; IBEND -- ending date of report
  1. ; IBOUT -- (E)xcel or (R)eport output
  1. ;
  1. S IBBEG=$$DATES("Beginning") G:'IBBEG ENQ
  1. S IBEND=$$DATES("Ending",IBBEG) G:'IBEND ENQ
  1. S IBOUT=$$OUT() G:IBOUT="" ENQ W !!
  1. ;
  1. DEVICE ; Ask user to select device
  1. N %ZIS,POP,ZTDESC,ZTRTN,ZTSAVE,ZTQUEUED,ZTREQ
  1. ;
  1. W:$G(IBOUT)="R" !!,"*** You will need a 132 column printer for this report. ***",!
  1. S %ZIS="QM" D ^%ZIS G:POP ENQ
  1. I $D(IO("Q")) D G ENQ
  1. .S ZTRTN="EN^IBCNHPR1",ZTDESC="IB - HPID ADDED TO BILLING CLAIM REPORT"
  1. .F I="^TMP(""IBHPID"",$J,","IBBEG","IBEND","IBOUT" S ZTSAVE(I)=""
  1. .D ^%ZTLOAD K IO("Q") D HOME^%ZIS
  1. .W !!,$S($D(ZTSK):"This job has been queued as task #"_ZTSK_".",1:"Unable to queue this job.")
  1. .K ZTSK,IO("Q")
  1. ;
  1. ; Compile and print report
  1. ;
  1. U IO D EN^IBCNHPR1
  1. ;
  1. ENQ K DIRUT,DIROUT,DUOUT,DTOUT,I,IBBEG,IBEND,IBOUT
  1. Q
  1. ;
  1. DATES(LABEL,IBBEG) ;
  1. N DIR,X,Y,DIRUT,DUOUT,I,IBARR,IBX,IBB,IBD
  1. S IBX=""
  1. I '+$G(IBBEG) D
  1. .F I="E","F","G" S IBARR(+$O(^DGCR(399,I,0)))=""
  1. .S IBB=+$O(IBARR(0))
  1. S IBB=$P($S(+$G(IBBEG):IBBEG,+$G(IBB):IBB,1:+$O(^DGCR(399,"APD",0))),"."),IBD=$S(+$G(IBBEG):DT,1:IBB)
  1. S DIR("?")="Enter the "_LABEL_" date to include in the report."
  1. S DIR("?",1)="Enter a date from the date of the first Bill/Claim HPID entry to today."
  1. S DIR("A")=LABEL_" Date",DIR("B")=$$FMTE^XLFDT(IBD)
  1. S DIR(0)="DO^"_IBB_":"_DT_":EX" D ^DIR S IBX=Y I $D(DIRUT)!$D(DUOUT) S IBX=""
  1. Q IBX
  1. ;
  1. OUT() ;
  1. N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
  1. W !
  1. S DIR(0)="SA^E:Excel;R:Report"
  1. S DIR("A")="(E)xcel Format or (R)eport Format: "
  1. S DIR("B")="Report"
  1. D ^DIR I $D(DIRUT) Q ""
  1. Q Y