[613] | 1 | IBJDB2 ;ALB/RB - REASONS NOT BILLABLE REPORT (INPUT);19-JUN-00
|
---|
| 2 | ;;2.0;INTEGRATED BILLING;**123,185**;21-MAR-94
|
---|
| 3 | ;
|
---|
| 4 | ; - Sort by division.
|
---|
| 5 | S IBSD=$$SDIV^IBJD() I IBSD["^" G ENQ
|
---|
| 6 | ;
|
---|
| 7 | GDR ; - Get specific date range.
|
---|
| 8 | W !!,"Run report for (D)ATE ENTERED or (E)PISODE DATE: D// "
|
---|
| 9 | R X:DTIME G:'$T!(X["^") ENQ S X=$S(X="":"D",1:$E(X))
|
---|
| 10 | I "DdEe"'[X D HELP1 G GDR
|
---|
| 11 | S IBD=$S("Dd"[X:"DATE ENTERED",1:"EPISODE DATE") W " ",IBD
|
---|
| 12 | S DIR(0)="DA^:DT:EX",DIR("A")=" Start with "_IBD_": ",DIR("T")=DTIME
|
---|
| 13 | D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
|
---|
| 14 | S IBBDT=+Y K DIROUT,DTOUT,DUOUT,DIRUT
|
---|
| 15 | S DIR(0)="DA^"_IBBDT_":DT:EX"
|
---|
| 16 | S DIR("A")=" Go to "_IBD_": ",DIR("T")=DTIME
|
---|
| 17 | D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
|
---|
| 18 | S IBEDT=+Y K DIROUT,DTOUT,DUOUT,DIRUT
|
---|
| 19 | ;
|
---|
| 20 | ; - Get ALL/Specific reasons not billable.
|
---|
| 21 | D ALSP^IBJD("Reasons Not Billable^Reason Not Billable","^IBE(356.8,",.IBSRNB)
|
---|
| 22 | I IBSRNB["^" G ENQ
|
---|
| 23 | ;
|
---|
| 24 | ; - Get ALL/Specific Providers
|
---|
| 25 | D ALSP^IBJD("Providers^Provider","^VA(200,",.IBSPRV)
|
---|
| 26 | I IBSPRV["^" G ENQ
|
---|
| 27 | ;
|
---|
| 28 | DS ; - Select a detailed or summary report.
|
---|
| 29 | D DS^IBJD G:IBRPT["^" ENQ
|
---|
| 30 | ;
|
---|
| 31 | SEL ; - Select episode to print.
|
---|
| 32 | S IBPRT="Choose which episode to print:"
|
---|
| 33 | K IBEPS
|
---|
| 34 | S IBEPS(1)="INPATIENT"
|
---|
| 35 | S IBEPS(2)="OUTPATIENT"
|
---|
| 36 | S IBEPS(3)="PROSTHETICS"
|
---|
| 37 | S IBEPS(4)="PHARMACY"
|
---|
| 38 | S IBEPS(5)="ALL RECEIVABLES"
|
---|
| 39 | S IBSEL=$$MLTP^IBJD(IBPRT,.IBEPS,1) I 'IBSEL G ENQ
|
---|
| 40 | ;
|
---|
| 41 | ; - Get ALL/Specific Inpatient Specialties
|
---|
| 42 | I IBSEL["1" D I IBSISP["^" G ENQ
|
---|
| 43 | . D ALSP^IBJD("Inpatient Specialties^Inpatient Specialty","^DIC(45.7,",.IBSISP)
|
---|
| 44 | ;
|
---|
| 45 | ; - Get ALL/Specific Outpatient Specialties
|
---|
| 46 | I IBSEL["2" D I IBSOSP["^" G ENQ
|
---|
| 47 | . D ALSP^IBJD("Outpatient Specialties^Outpatient Specialty","^DIC(40.7,",.IBSOSP)
|
---|
| 48 | ;
|
---|
| 49 | I IBRPT="S" G DEV
|
---|
| 50 | ;
|
---|
| 51 | RPS ; - Sort by RNB category/specialty/provider, if necessary.
|
---|
| 52 | S IBSORT="R" G:IBSEL'[1&(IBSEL'[2) EXCEL
|
---|
| 53 | W !!,"Sort report by (R)NB CATEGORY, (P)ROVIDER, or (S)PECIALTY: R// "
|
---|
| 54 | R X:DTIME G:'$T!(X["^") ENQ S X=$S(X="":"R",1:$E(X))
|
---|
| 55 | I "RrPpSs"'[X D HELP2 G RPS
|
---|
| 56 | W " ",$S("Pp"[X:"PROVIDER","Ss"[X:"SPECIALTY",1:"RNB CATEGORY")
|
---|
| 57 | S IBSORT=X
|
---|
| 58 | ;
|
---|
| 59 | EXCEL ; - Determine whether to gather data for Excel report.
|
---|
| 60 | S IBEXCEL=$$EXCEL^IBJD() G ENQ:IBEXCEL="^"
|
---|
| 61 | ;
|
---|
| 62 | DEV ; - Select a device.
|
---|
| 63 | I '$G(IBEXCEL) D
|
---|
| 64 | . S X=$S(IBRPT="S":80,1:132)
|
---|
| 65 | . W !!,"You will need a ",X," column printer for this report!",!
|
---|
| 66 | . W !,"Note: This report may take a while to run. You should queue it"
|
---|
| 67 | . W !," to run after normal business hours.",!
|
---|
| 68 | ;
|
---|
| 69 | I $G(IBEXCEL) D EXMSG^IBJD
|
---|
| 70 | ;
|
---|
| 71 | S %ZIS="QM" D ^%ZIS G:POP ENQ
|
---|
| 72 | I $D(IO("Q")) D G ENQ
|
---|
| 73 | .S ZTRTN="DQ^IBJDB2",ZTDESC="IB - REASONS NOT BILLABLE REPORT"
|
---|
| 74 | .F I="IB*","IBSRNB(","VAUTD","VAUTD(" S ZTSAVE(I)=""
|
---|
| 75 | .D ^%ZTLOAD
|
---|
| 76 | .I $D(ZTSK) W !!,"This job has been queued. Task number is "_ZTSK_"."
|
---|
| 77 | .E W !!,"Unable to queue this job."
|
---|
| 78 | .K I,IO("Q"),ZTSK D HOME^%ZIS
|
---|
| 79 | ;
|
---|
| 80 | U IO
|
---|
| 81 | ;
|
---|
| 82 | DQ ; - Tasked entry point.
|
---|
| 83 | ;
|
---|
| 84 | ; If called by the Extraction Module, change extract status for the 4
|
---|
| 85 | ; reports: Reasons not Billable Inpatient, Outpatient, Prosthetics and
|
---|
| 86 | ; Pharmacy.
|
---|
| 87 | I $G(IBXTRACT) F I=25:1:36 D E^IBJDE(I,1)
|
---|
| 88 | ;
|
---|
| 89 | D ^IBJDB21 ; Compile and print report.
|
---|
| 90 | ;
|
---|
| 91 | ENQ K ^TMP("IBJDB2",$J)
|
---|
| 92 | I $D(ZTQUEUED) S ZTREQ="@" G ENQ1
|
---|
| 93 | D ^%ZISC
|
---|
| 94 | ENQ1 K IBBDT,IBCLK,IBD,IBEDT,IBEPD,IBEPS,IBEXCEL,IBPRT,IBRPT,IBSD,IBSEL
|
---|
| 95 | K IBSORT,IBSISP,IBSOSP,IBSPRV,IBSRNB
|
---|
| 96 | K POP,VAUTD,ZTDESC,ZTRTN,ZTSAVE,%ZIS,I,X,Y,%
|
---|
| 97 | Q
|
---|
| 98 | ;
|
---|
| 99 | HELP1 ; - 'Run report by (D)ATE ENTERED...' prompt.
|
---|
| 100 | W !!?6,"Enter: '<CR>' - To enter a DATE ENTERED range for the report"
|
---|
| 101 | W !?16,"'E' - To enter a EPISODE DATE range for the report"
|
---|
| 102 | W !?16,"'^' - To quit this option"
|
---|
| 103 | Q
|
---|
| 104 | ;
|
---|
| 105 | HELP2 ; - 'Sort report by (R)NB CATEGORY...' prompt.
|
---|
| 106 | W !!?6,"Enter: '<CR>' - To sort detail report by RNB category"
|
---|
| 107 | W !?16,"'P' - To sort detail report by provider"
|
---|
| 108 | W !?16,"'S' - To sort detail report by specialty"
|
---|
| 109 | W !?16,"'^' - To quit this option"
|
---|
| 110 | Q
|
---|