| 1 | IBCONS4 ;ALB/ARH - NSC W/INSURANCE OUTPUT (SETUP) ; 12-23-96
 | 
|---|
| 2 |  ;;Version 2.0 ; INTEGRATED BILLING ;**66**; 21-MAR-94
 | 
|---|
| 3 |  ;
 | 
|---|
| 4 | RPT N DIR,X,Y,DIRUT,DTOUT,DUOUT,IBX,IBY,IBI S (IBPRTRDS,IBPRTIEX,IBPRTICR,IBPRTIPC,IBPRTIGC)=0
 | 
|---|
| 5 |  S (IBSELUBL,IBSELBNA,IBSELBIL,IBSELRNB,IBSELCDV,IBSELTRM,IBSELRNG)=0
 | 
|---|
| 6 |  ;
 | 
|---|
| 7 |  W !!,?5,"Enter Report to print:"
 | 
|---|
| 8 |  W !,?10,"1  - Unbilled Episodes"
 | 
|---|
| 9 |  W !,?10,"2  - Billed Episodes but Not Authorized"
 | 
|---|
| 10 |  W !,?10,"3  - Billed Episodes (Authorized)",!
 | 
|---|
| 11 |  ;
 | 
|---|
| 12 |  S DIR(0)="LO^1:3:0"
 | 
|---|
| 13 |  S DIR("A")="Report",DIR("B")="1",DIR("??")="^D RHELP1^IBCONS4" D ^DIR K DIR I +Y'>0 S IBQUIT=1 G EXIT
 | 
|---|
| 14 |  ;
 | 
|---|
| 15 |  S IBY=Y F IBI=1:1 S Y=$P(IBY,",",IBI) Q:'Y  D
 | 
|---|
| 16 |  . ;
 | 
|---|
| 17 |  . I Y=1 S IBSELUBL=1 ;       unbilled episodes
 | 
|---|
| 18 |  . I Y=2 S IBSELBNA=1 ;       billed but not authorized
 | 
|---|
| 19 |  . I Y=3 S IBSELBIL=1 ;       billed episodes (authorized)
 | 
|---|
| 20 |  ;
 | 
|---|
| 21 |  W !!,?5,"Optional format requirements:"
 | 
|---|
| 22 |  W !,?10,"1  - Include Episodes with a Reason Not Billable"
 | 
|---|
| 23 |  W !,?10,"2  - Include Only Episodes with a Reason Not Billable"
 | 
|---|
| 24 |  W !,?10,"3  - Combine Divisions into one Report"
 | 
|---|
| 25 |  W !,?10,"4  - Sort by Terminal Digit"
 | 
|---|
| 26 |  W !,?10,"5  - Select Sort Range"
 | 
|---|
| 27 |  W !!,?5,"Optional print fields:"
 | 
|---|
| 28 |  W !,?10,"6  - Patient's Rated Disabilities"
 | 
|---|
| 29 |  W !,?10,"7  - Patient Insurance Dates"
 | 
|---|
| 30 |  W !,?10,"8  - Coverage and Riders"
 | 
|---|
| 31 |  W !,?10,"9  - Policy Comments"
 | 
|---|
| 32 |  W !,?10,"10 - Group Comments",!
 | 
|---|
| 33 |  ;
 | 
|---|
| 34 |  S DIR(0)="LO^1:10:0"
 | 
|---|
| 35 |  S DIR("A")="Optional requirements",DIR("??")="^D RHELP2^IBCONS4" D ^DIR I $D(DTOUT)!$D(DUOUT) S IBQUIT=1 G EXIT
 | 
|---|
| 36 |  ;
 | 
|---|
| 37 |  S IBY=Y F IBI=1:1 S Y=$P(IBY,",",IBI) Q:'Y  D
 | 
|---|
| 38 |  . ;
 | 
|---|
| 39 |  . I Y=1 S IBSELRNB=1 ;               include episodes with a RNB
 | 
|---|
| 40 |  . I Y=2 S IBSELRNB=2 ;               include episodes with a RNB only
 | 
|---|
| 41 |  . I Y=3 S IBSELCDV=1 ;               combine divisions
 | 
|---|
| 42 |  . I Y=4 S IBSELTRM=1 ;               sort by terminal digit
 | 
|---|
| 43 |  . I Y=5 S IBSELRNG=1 ;               select range of patients (PT name or TD)
 | 
|---|
| 44 |  . I Y=6 S IBPRTRDS=1 ;               patient's rated disabilities
 | 
|---|
| 45 |  . I Y=7 S IBPRTIEX=1 ;               patient insurance dates and group #
 | 
|---|
| 46 |  . I Y=8 S IBPRTICR=1 ;               coverage limits and riders
 | 
|---|
| 47 |  . I Y=9 S IBPRTIPC=1 ;               patient policy comments
 | 
|---|
| 48 |  . I Y=10 S IBPRTIGC=1 ;              group plan comments
 | 
|---|
| 49 |  ;
 | 
|---|
| 50 |  I $G(IBSELRNG)=1 W ! D SRTRNG I '$D(IBSELSR1)!'$D(IBSELSR2) S IBQUIT=1 G EXIT
 | 
|---|
| 51 |  W ! D DATE I ($G(IBBEG)'?7N)!($G(IBEND)'?7N) S IBQUIT=1 G EXIT
 | 
|---|
| 52 |  D ASKDIV
 | 
|---|
| 53 | EXIT Q
 | 
|---|
| 54 |  ;
 | 
|---|
| 55 | SRTRNG ; get which data item to range on: Patient Name or Terminal Digit
 | 
|---|
| 56 |  N DIR,X,Y,DIRUT,DUOUT,DTOUT S IBSELRNG=0 K IBSELSR1,IBSELSR2
 | 
|---|
| 57 |  S DIR("A")="Select Range of Patients By",DIR(0)="SO^1:Patient Name;2:Terminal Digit;3:Insurance Company" D ^DIR
 | 
|---|
| 58 |  I +Y=1 S IBSELRNG=+Y D SRTRNGP
 | 
|---|
| 59 |  I +Y=2 S IBSELRNG=+Y D SRTRNGT
 | 
|---|
| 60 |  I +Y=3 S IBSELRNG=+Y D SRTRNGI
 | 
|---|
| 61 |  Q
 | 
|---|
| 62 |  ;
 | 
|---|
| 63 | SRTRNGP ; select patient name range for sort
 | 
|---|
| 64 |  N DIR,X,Y,DIRUT,DUOUT,DTOUT K IBSELSR1,IBSELSR2
 | 
|---|
| 65 |  S DIR(0)="FO"
 | 
|---|
| 66 |  S DIR("B")="FIRST",DIR("A")="START WITH PATIENT NAME" D ^DIR Q:$D(DIRUT)  S:Y="FIRST" Y="" S IBSELSR1=$$ASCII^IBCONS2(Y)
 | 
|---|
| 67 |  ;
 | 
|---|
| 68 |  S DIR("B")="LAST",DIR("A")="GO TO PATIENT NAME" D ^DIR Q:$D(DIRUT)  S:Y="LAST" Y="" S IBSELSR2=$$ASCII^IBCONS2(Y)
 | 
|---|
| 69 |  Q
 | 
|---|
| 70 |  ;
 | 
|---|
| 71 | SRTRNGT ; select terminal digit range for sort
 | 
|---|
| 72 |  N DIR,X,Y,DIRUT,DUOUT,DTOUT K IBSELSR1,IBSELSR2
 | 
|---|
| 73 |  S DIR(0)="FO^1:9^K:X'?1.9N X",DIR("?")="Enter up to 9 digits of the Terminal Digit to include in report"
 | 
|---|
| 74 |  ;
 | 
|---|
| 75 |  S DIR("B")="0000",DIR("A")="START WITH TERMINAL DIGIT" D ^DIR Q:$D(DIRUT)  S IBSELSR1=$E((Y_"000000000"),1,9)
 | 
|---|
| 76 |  ;
 | 
|---|
| 77 |  S DIR("B")=9999,DIR("A")="GO TO TERMINAL DIGIT" D ^DIR Q:$D(DIRUT)  S IBSELSR2=$E((Y_"999999999"),1,9)
 | 
|---|
| 78 |  Q
 | 
|---|
| 79 |  ;
 | 
|---|
| 80 | SRTRNGI ; select insurance company name range for sort
 | 
|---|
| 81 |  N DIR,X,Y,DIRUT,DUOUT,DTOUT K IBSELSR1,IBSELSR2
 | 
|---|
| 82 |  S DIR(0)="FO"
 | 
|---|
| 83 |  S DIR("B")="FIRST",DIR("A")="START WITH INSURANCE COMPANY NAME" D ^DIR Q:$D(DIRUT)  S:Y="FIRST" Y="" S IBSELSR1=$$ASCII^IBCONS2(Y)
 | 
|---|
| 84 |  ;
 | 
|---|
| 85 |  S DIR("B")="LAST",DIR("A")="GO TO INSURANCE COMPANY NAME" D ^DIR Q:$D(DIRUT)  S:Y="LAST" Y="" S IBSELSR2=$$ASCII^IBCONS2(Y)
 | 
|---|
| 86 |  Q
 | 
|---|
| 87 |  ;
 | 
|---|
| 88 | DATE ; Issue prompts for Begin and End dates
 | 
|---|
| 89 |  N %DT,Y,X K IBBEG,IBEND
 | 
|---|
| 90 |  S %DT="AEPX",%DT("A")="Start with DATE: " D ^%DT Q:Y<0  S IBBEG=+Y\1
 | 
|---|
| 91 |  S %DT="AEPX",%DT("A")="Go to DATE: ",%DT(0)=+Y D ^%DT Q:Y<0  S IBEND=+Y\1
 | 
|---|
| 92 |  Q
 | 
|---|
| 93 |  ;
 | 
|---|
| 94 | ASKDIV ; Issue prompt for Division (ALL: VAUTD=1,  SELECT: VAUTD=0, VAUTD(DV)=DV NAME, ELSE: Y=-1)
 | 
|---|
| 95 |  D PSDR^IBODIV I Y<0 S IBQUIT=1
 | 
|---|
| 96 |  Q
 | 
|---|
| 97 |  ;
 | 
|---|
| 98 | RHELP1 ; help for report question
 | 
|---|
| 99 |  W !,"------------------------------------------------------------------------------"
 | 
|---|
| 100 |  W !,"Determines what types of episodes are included on the report.",!
 | 
|---|
| 101 |  W !,"Required: specify if report should include billed and/or unbilled episodes"
 | 
|---|
| 102 |  W !!,?3,"1 - Unbilled:              no Third Party bill can be identified for episode"
 | 
|---|
| 103 |  W !,?3,"2 - Billed/Not Authorized: one or more Third Party bills exists for the",!,?30,"episode, but at least one of them has not yet been",!,?30,"authorized or passed to AR"
 | 
|---|
| 104 |  W !,?3,"3 - Billed/Authorized:     one or more Third Party bills exists for the",!,?30,"episode and all of them have been Authorized"
 | 
|---|
| 105 |  W !!,"Choose one or more of the above to include on the report."
 | 
|---|
| 106 |  W !,"------------------------------------------------------------------------------"
 | 
|---|
| 107 |  Q
 | 
|---|
| 108 |  ;
 | 
|---|
| 109 | RHELP2 ; help for optional requirements question
 | 
|---|
| 110 |  W !,"------------------------------------------------------------------------------"
 | 
|---|
| 111 |  W !,"Determines which episodes are included on the report and how they are sorted."
 | 
|---|
| 112 |  W !!,"Optional:  special requirements for printing the report,",!,?11,"these apply to both billed and unbilled episode reports."
 | 
|---|
| 113 |  W !!,?3,"1 - Include Episodes with a RNB:       (default excludes episodes with a RNB)"
 | 
|---|
| 114 |  W !,?3,"2 - Include Only Episodes with a RNB:                         (default is No)"
 | 
|---|
| 115 |  W !,?3,"3 - Combine Divisions:         (default is separate report for each Division)"
 | 
|---|
| 116 |  W !,?3,"4 - Sort by Terminal Digit:     (default sort alphabetically by Patient Name)"
 | 
|---|
| 117 |  W !,?3,"5 - Select Range of Pat Names or Term Digits or Ins Company: (default is all)"
 | 
|---|
| 118 |  ;
 | 
|---|
| 119 |  W !!,"Terminal Digit Sort:  the output will be sorted by the 8th and 9th digits and",!,"then the 6th and 7th digits of the patient's SSN"
 | 
|---|
| 120 |  W !,"{Reason Not Billable}:  if episodes with RNB are included then inpatient",!,"episodes with all movements SC are included on the report"
 | 
|---|
| 121 |  ;
 | 
|---|
| 122 |  W !!,"All of the optional print fields apply to the patient and if chosen will",!,"print once for each patient on the report."
 | 
|---|
| 123 |  W !,"Indications of the Insurance Coverage and Riders, Policy Comments, and Group",!,"Comments are only printed if they exist for the policy/plan."
 | 
|---|
| 124 |  W !,"------------------------------------------------------------------------------"
 | 
|---|
| 125 |  Q
 | 
|---|