[613] | 1 | IBJDI4 ;ALB/CPM - PATIENTS WITH UNIDENTIFIED INSURANCE ; 17-DEC-96
|
---|
| 2 | ;;2.0;INTEGRATED BILLING;**69,98,100,118**;21-MAR-94
|
---|
| 3 | ;
|
---|
| 4 | EN ; - Option entry point.
|
---|
| 5 | ;
|
---|
| 6 | W !!,"This report provides the number of patients who have been treated,"
|
---|
| 7 | W !,"but not identified as having or not having insurance.",!
|
---|
| 8 | ;
|
---|
| 9 | DATE D DATE^IBOUTL I IBBDT=""!(IBEDT="") G ENQ
|
---|
| 10 | ;
|
---|
| 11 | ; - Sort by division?
|
---|
| 12 | S DIR(0)="Y",DIR("B")="NO",DIR("?")="^D HLP1^IBJDI4"
|
---|
| 13 | S DIR("A")="Do you wish to sort this report by division" W !
|
---|
| 14 | D ^DIR S IBSORT=+Y I $D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) G ENQ
|
---|
| 15 | K DIR,DIROUT,DTOUT,DUOUT,DIRUT
|
---|
| 16 | ;
|
---|
| 17 | I IBSORT D PSDR^IBODIV G:Y<0 ENQ ; Select division(s).
|
---|
| 18 | ;
|
---|
| 19 | ; - Select a detailed or summary report.
|
---|
| 20 | D DS^IBJD G:IBRPT["^" ENQ S IBSEL=0
|
---|
| 21 | I IBRPT="S" W !!,"This report only requires an 80 column printer." G DEV
|
---|
| 22 | ;
|
---|
| 23 | SEL W !!,"Print 1-MAIN REPORT or 2-LINE ITEM REPORTS: 1// "
|
---|
| 24 | R X:DTIME G:'$T!(X["^") ENQ S:X="" X=1 I "1^2"'[X D HLP2 G SEL
|
---|
| 25 | W " ",$S(X=2:"LINE ITEM REPORTS",1:"MAIN REPORT") I X=1 G RMK
|
---|
| 26 | ;
|
---|
| 27 | RPTS ; - Select line item report(s).
|
---|
| 28 | W ! S DIR(0)="LO^1:9^K:+$P(X,""-"",2)>9 X"
|
---|
| 29 | F X=1:1:9 S DIR("A",X)=X_" - Print "_$$TITLE(X)
|
---|
| 30 | S DIR("A",10)="",DIR("A")="Select",DIR("B")=1 D ^DIR K DIR I Y["^" G ENQ
|
---|
| 31 | W ! S IBSEL=Y,DIR(0)="YO",DIR("A",1)="You have selected"
|
---|
| 32 | I X="1-9" S DIR("A",1)=DIR("A",1)_" ALL the above reports."
|
---|
| 33 | E F X=1:1 S X1=$P(IBSEL,",",X) Q:'X1 S DIR("A",X+1)=" "_$$TITLE(X1)
|
---|
| 34 | S DIR("A")="Are you sure",DIR("B")="NO" D ^DIR K DIR I Y["^" G ENQ
|
---|
| 35 | I 'Y G RPTS
|
---|
| 36 | ;
|
---|
| 37 | RMK ; - Select print/not print remarks.
|
---|
| 38 | W ! S DIR(0)="YO"
|
---|
| 39 | S DIR("A")="Do you want the patient's remarks to print on the report"
|
---|
| 40 | S DIR("B")="NO" D ^DIR K DIR S IBRMK=Y I IBRMK["^" G ENQ
|
---|
| 41 | ;
|
---|
| 42 | W !!,"You will need a 132 column printer for this report."
|
---|
| 43 | ;
|
---|
| 44 | DEV ; - Select a device.
|
---|
| 45 | W !!,"Note: This report may take a while to run."
|
---|
| 46 | W !?6,"You should queue this report to run after normal business hours.",!
|
---|
| 47 | ;
|
---|
| 48 | S %ZIS="QM" D ^%ZIS G:POP ENQ
|
---|
| 49 | I $D(IO("Q")) D G ENQ
|
---|
| 50 | .S ZTRTN="DQ^IBJDI4",ZTDESC="IB - PATIENTS WITH UNIDENTIFIED INSURANCE"
|
---|
| 51 | .F I="IB*","VAUTD","VAUTD(" S ZTSAVE(I)=""
|
---|
| 52 | .D ^%ZTLOAD
|
---|
| 53 | .W !!,$S($D(ZTSK):"This job has been queued. The task number is "_ZTSK_".",1:"Unable to queue this job.")
|
---|
| 54 | .K ZTSK,IO("Q") D HOME^%ZIS
|
---|
| 55 | ;
|
---|
| 56 | U IO
|
---|
| 57 | ;
|
---|
| 58 | DQ ; - Tasked entry point.
|
---|
| 59 | ;
|
---|
| 60 | I $G(IBXTRACT) D E^IBJDE(4,1) ; Change extract status.
|
---|
| 61 | ;
|
---|
| 62 | N IBQUERY K IB,^TMP("IBJDI41",$J),^TMP("IBJDI42",$J)
|
---|
| 63 | S IBC="BILL^DEC^HMO^IND^MEDC^MEDG^NO^NULL^TOT^UNK^YES",IBQ=0
|
---|
| 64 | I IBSORT D G PROC
|
---|
| 65 | .S I=0 F S I=$S(VAUTD:$O(^DG(40.8,I)),1:$O(VAUTD(I))) Q:'I D
|
---|
| 66 | ..S J=$P($G(^DG(40.8,I,0)),U) F K=1:1:11 S IB(J,$P(IBC,U,K))=0
|
---|
| 67 | S IBDIV="ALL" F I=1:1:11 S IB("ALL",$P(IBC,U,I))=0
|
---|
| 68 | ;
|
---|
| 69 | PROC D EN^IBJDI41 ; Process and print report(s).
|
---|
| 70 | ;
|
---|
| 71 | ENQ K ^TMP("IBJDI41",$J),^TMP("IBJDI42",$J)
|
---|
| 72 | I $D(ZTQUEUED) S ZTREQ="@" G ENQ1
|
---|
| 73 | ;
|
---|
| 74 | D ^%ZISC
|
---|
| 75 | ENQ1 K IB,IBQ,IBBDT,IBEDT,IBRMK,IBRPT,IBD,IBDN,IBPH,IBPAG,IBRUN,IBX,IBX1,IBX2
|
---|
| 76 | K IBC,IBELIG,IBPER,IBPM,IBPMD,IBDOD,IBFL,IBFL1,IBIPC,IBINSC,IBPAT,IBSEL
|
---|
| 77 | K IBDIV,IBSEL1,IBSORT,VAUTD,DFN,POP,I,J,K,X,X1,X2,Y,ZTDESC,ZTRTN,ZTSAVE
|
---|
| 78 | K DIR,DIROUT,DTOUT,DUOUT,DIRUT,%,%ZIS
|
---|
| 79 | Q
|
---|
| 80 | ;
|
---|
| 81 | HLP1 ; - 'Sort by division' prompt.
|
---|
| 82 | W !!,"Select: '<CR>' to print the trend report without regard to"
|
---|
| 83 | W !?15,"division"
|
---|
| 84 | W !?11,"'Y' to select those divisions for which a separate"
|
---|
| 85 | W !?15,"trend report should be created",!?11,"'^' to quit"
|
---|
| 86 | Q
|
---|
| 87 | ;
|
---|
| 88 | HLP2 ; - 'Print 1-MAIN REPORT'... prompt.
|
---|
| 89 | W !!,"Select: '1' to print the Patients w/Unidentified Insurance Report"
|
---|
| 90 | W !?8,"'2' to print up to nine specific reports based on the line items"
|
---|
| 91 | W !?12,"of the summary report",!?8,"'^' to quit"
|
---|
| 92 | Q
|
---|
| 93 | ;
|
---|
| 94 | TITLE(X) ; - Print report title.
|
---|
| 95 | Q $P($T(TITLE1+X),";;",2)
|
---|
| 96 | ;
|
---|
| 97 | TITLE1 ;;Patients with Unidentified Insurance
|
---|
| 98 | ;;Patients Covered by Insurance
|
---|
| 99 | ;;Patients Covered by Billable Insurance
|
---|
| 100 | ;;Patients Covered by an HMO
|
---|
| 101 | ;;Patients Covered by Medicare
|
---|
| 102 | ;;Patients Covered by Medigap
|
---|
| 103 | ;;Patients Covered by an Indemnity Policy
|
---|
| 104 | ;;Patients Not Covered by Insurance
|
---|
| 105 | ;;Patients with Unknown Insurance
|
---|
| 106 | ;;Patients with Insurance Question Unanswered
|
---|
| 107 | ;
|
---|
| 108 | TYPE(INS) ; - Find type of insurance.
|
---|
| 109 | ; Input: INS=Patient's insurance info in file #2 (.3121)
|
---|
| 110 | ; Output: Y=1-HMO, 2-Medicare, 3-Medigap, 4-Indemnity, or
|
---|
| 111 | ; 0-None of the above
|
---|
| 112 | ;
|
---|
| 113 | N TYP
|
---|
| 114 | S Y=0,TYP=+$P($G(^IBA(355.3,+$P(INS,U,18),0)),U,9) I 'TYP G TYP1
|
---|
| 115 | I $D(^IBE(355.1,"B","HEALTH MAINTENANCE ORGANIZ",TYP)) S Y=1
|
---|
| 116 | I $D(^IBE(355.1,"B","POINT OF SERVICE",TYP)) S Y=1
|
---|
| 117 | I $D(^IBE(355.1,"B","PREPAID GROUP PRACTICE PLAN",TYP)) S Y=1
|
---|
| 118 | I $D(^IBE(355.1,"B","MEDICARE (M)",TYP)) S Y=2
|
---|
| 119 | I $D(^IBE(355.1,"B","MEDICARE/MEDICAID (MEDI-CAL)",TYP)) S Y=2
|
---|
| 120 | I $D(^IBE(355.1,"B","MEDIGAP (SUPPLEMENTAL)",TYP)) S Y=3
|
---|
| 121 | I $D(^IBE(355.1,"B","INCOME PROTECTION (INDEMNITY)",TYP)) S Y=4
|
---|
| 122 | ;
|
---|
| 123 | TYP1 G:Y TYPQ S TYP=+$P($G(^DIC(36,+INS,0)),U,13) I 'TYP G TYPQ
|
---|
| 124 | I $D(^IBE(355.2,"B","HEALTH MAINTENANCE ORG.",TYP)) S Y=1
|
---|
| 125 | I $D(^IBE(355.2,"B","MEDICARE",TYP)) S Y=2
|
---|
| 126 | I $D(^IBE(355.2,"B","MEDIGAP",TYP)) S Y=3
|
---|
| 127 | I $D(^IBE(355.2,"B","INDEMNITY",TYP)) S Y=4
|
---|
| 128 | ;
|
---|
| 129 | TYPQ Q Y
|
---|