- IBCNHPR ;ALB/CJS - HPID ADDED TO BILLING CLAIM REPORT (DRIVER) ;15-DEC-14
- ;;2.0;INTEGRATED BILLING;**525**;21-MAR-94;Build 105
- ;;Per VA Directive 6402, this routine should not be modified.
- ;
- EN ; Describe report
- N I,IBBEG,IBEND,IBOUT
- W !!?5,"This report will generate a list of HPID numbers that have been added",!?5,"directly to claims."
- W !!?5,"Please select the date range within which the HPIDs were entered."
- ;
- ; Prompt user to select date range
- ;
- ; Output from user selections:
- ;
- ; IBBEG -- beginning date of report
- ; IBEND -- ending date of report
- ; IBOUT -- (E)xcel or (R)eport output
- ;
- S IBBEG=$$DATES("Beginning") G:'IBBEG ENQ
- S IBEND=$$DATES("Ending",IBBEG) G:'IBEND ENQ
- S IBOUT=$$OUT() G:IBOUT="" ENQ W !!
- ;
- DEVICE ; Ask user to select device
- N %ZIS,POP,ZTDESC,ZTRTN,ZTSAVE,ZTQUEUED,ZTREQ
- ;
- W:$G(IBOUT)="R" !!,"*** You will need a 132 column printer for this report. ***",!
- S %ZIS="QM" D ^%ZIS G:POP ENQ
- I $D(IO("Q")) D G ENQ
- .S ZTRTN="EN^IBCNHPR1",ZTDESC="IB - HPID ADDED TO BILLING CLAIM REPORT"
- .F I="^TMP(""IBHPID"",$J,","IBBEG","IBEND","IBOUT" S ZTSAVE(I)=""
- .D ^%ZTLOAD K IO("Q") D HOME^%ZIS
- .W !!,$S($D(ZTSK):"This job has been queued as task #"_ZTSK_".",1:"Unable to queue this job.")
- .K ZTSK,IO("Q")
- ;
- ; Compile and print report
- ;
- U IO D EN^IBCNHPR1
- ;
- ENQ K DIRUT,DIROUT,DUOUT,DTOUT,I,IBBEG,IBEND,IBOUT
- Q
- ;
- DATES(LABEL,IBBEG) ;
- N DIR,X,Y,DIRUT,DUOUT,I,IBARR,IBX,IBB,IBD
- S IBX=""
- I '+$G(IBBEG) D
- .F I="E","F","G" S IBARR(+$O(^DGCR(399,I,0)))=""
- .S IBB=+$O(IBARR(0))
- S IBB=$P($S(+$G(IBBEG):IBBEG,+$G(IBB):IBB,1:+$O(^DGCR(399,"APD",0))),"."),IBD=$S(+$G(IBBEG):DT,1:IBB)
- S DIR("?")="Enter the "_LABEL_" date to include in the report."
- S DIR("?",1)="Enter a date from the date of the first Bill/Claim HPID entry to today."
- S DIR("A")=LABEL_" Date",DIR("B")=$$FMTE^XLFDT(IBD)
- S DIR(0)="DO^"_IBB_":"_DT_":EX" D ^DIR S IBX=Y I $D(DIRUT)!$D(DUOUT) S IBX=""
- Q IBX
- ;
- OUT() ;
- N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
- W !
- S DIR(0)="SA^E:Excel;R:Report"
- S DIR("A")="(E)xcel Format or (R)eport Format: "
- S DIR("B")="Report"
- D ^DIR I $D(DIRUT) Q ""
- Q Y
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCNHPR 2171 printed Mar 13, 2025@21:20:34 Page 2
- IBCNHPR ;ALB/CJS - HPID ADDED TO BILLING CLAIM REPORT (DRIVER) ;15-DEC-14
- +1 ;;2.0;INTEGRATED BILLING;**525**;21-MAR-94;Build 105
- +2 ;;Per VA Directive 6402, this routine should not be modified.
- +3 ;
- EN ; Describe report
- +1 NEW I,IBBEG,IBEND,IBOUT
- +2 WRITE !!?5,"This report will generate a list of HPID numbers that have been added",!?5,"directly to claims."
- +3 WRITE !!?5,"Please select the date range within which the HPIDs were entered."
- +4 ;
- +5 ; Prompt user to select date range
- +6 ;
- +7 ; Output from user selections:
- +8 ;
- +9 ; IBBEG -- beginning date of report
- +10 ; IBEND -- ending date of report
- +11 ; IBOUT -- (E)xcel or (R)eport output
- +12 ;
- +13 SET IBBEG=$$DATES("Beginning")
- if 'IBBEG
- GOTO ENQ
- +14 SET IBEND=$$DATES("Ending",IBBEG)
- if 'IBEND
- GOTO ENQ
- +15 SET IBOUT=$$OUT()
- if IBOUT=""
- GOTO ENQ
- WRITE !!
- +16 ;
- DEVICE ; Ask user to select device
- +1 NEW %ZIS,POP,ZTDESC,ZTRTN,ZTSAVE,ZTQUEUED,ZTREQ
- +2 ;
- +3 if $GET(IBOUT)="R"
- WRITE !!,"*** You will need a 132 column printer for this report. ***",!
- +4 SET %ZIS="QM"
- DO ^%ZIS
- if POP
- GOTO ENQ
- +5 IF $DATA(IO("Q"))
- Begin DoDot:1
- +6 SET ZTRTN="EN^IBCNHPR1"
- SET ZTDESC="IB - HPID ADDED TO BILLING CLAIM REPORT"
- +7 FOR I="^TMP(""IBHPID"",$J,","IBBEG","IBEND","IBOUT"
- SET ZTSAVE(I)=""
- +8 DO ^%ZTLOAD
- KILL IO("Q")
- DO HOME^%ZIS
- +9 WRITE !!,$SELECT($DATA(ZTSK):"This job has been queued as task #"_ZTSK_".",1:"Unable to queue this job.")
- +10 KILL ZTSK,IO("Q")
- End DoDot:1
- GOTO ENQ
- +11 ;
- +12 ; Compile and print report
- +13 ;
- +14 USE IO
- DO EN^IBCNHPR1
- +15 ;
- ENQ KILL DIRUT,DIROUT,DUOUT,DTOUT,I,IBBEG,IBEND,IBOUT
- +1 QUIT
- +2 ;
- DATES(LABEL,IBBEG) ;
- +1 NEW DIR,X,Y,DIRUT,DUOUT,I,IBARR,IBX,IBB,IBD
- +2 SET IBX=""
- +3 IF '+$GET(IBBEG)
- Begin DoDot:1
- +4 FOR I="E","F","G"
- SET IBARR(+$ORDER(^DGCR(399,I,0)))=""
- +5 SET IBB=+$ORDER(IBARR(0))
- End DoDot:1
- +6 SET IBB=$PIECE($SELECT(+$GET(IBBEG):IBBEG,+$GET(IBB):IBB,1:+$ORDER(^DGCR(399,"APD",0))),".")
- SET IBD=$SELECT(+$GET(IBBEG):DT,1:IBB)
- +7 SET DIR("?")="Enter the "_LABEL_" date to include in the report."
- +8 SET DIR("?",1)="Enter a date from the date of the first Bill/Claim HPID entry to today."
- +9 SET DIR("A")=LABEL_" Date"
- SET DIR("B")=$$FMTE^XLFDT(IBD)
- +10 SET DIR(0)="DO^"_IBB_":"_DT_":EX"
- DO ^DIR
- SET IBX=Y
- IF $DATA(DIRUT)!$DATA(DUOUT)
- SET IBX=""
- +11 QUIT IBX
- +12 ;
- OUT() ;
- +1 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
- +2 WRITE !
- +3 SET DIR(0)="SA^E:Excel;R:Report"
- +4 SET DIR("A")="(E)xcel Format or (R)eport Format: "
- +5 SET DIR("B")="Report"
- +6 DO ^DIR
- IF $DATA(DIRUT)
- QUIT ""
- +7 QUIT Y