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

IBOTR1.m

Go to the documentation of this file.
  1. IBOTR1 ;ALB/CPM - INSURANCE PAYMENT TREND REPORT - USER INTERFACE (CON'T.); 5-JUN-91
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;
  1. ;MAP TO DGCROTR1
  1. ;
  1. OUTPT R !,"Select (I)NPATIENT, (O)UTPATIENT, or (B)OTH BILL RECORDS: BOTH// ",X:DTIME G:'$T!(X["^") END S:X="" X="B" S X=$E(X)
  1. I "IOBiob"'[X S IBOFF=1 D HELP G OUTPT
  1. W $S("iI"[X:" INPATIENT","oO"[X:" OUTPATIENT","bB"[X:" BOTH")
  1. S (IBBRT,IBBRTY)=$S("iI"[X:"I","oO"[X:"O",1:"A") I "Bb"'[X G ARST
  1. ;
  1. REPTY R !,"Print a (C)ombined or (S)eparate Reports: C// ",X:DTIME G:'$T!(X["^") END S:X="" X="C" S X=$E(X)
  1. I "CScs"'[X S IBOFF=7 D HELP G REPTY
  1. W $S("cC"[X:" COMBINED","sS"[X:" SEPARATE") S IBBRN=$S("cC"[X:"C",1:"S")
  1. ;
  1. ARST R !,"Select (O)PEN, (C)LOSED, or (B)OTH TYPES OF BILLS: BOTH// ",X:DTIME G:'$T!(X["^") END S:X="" X="B" S X=$E(X)
  1. I "OCBocb"'[X S IBOFF=29 D HELP G ARST
  1. W $S("oO"[X:" OPEN","cC"[X:" CLOSED","bB"[X:" BOTH"),!
  1. S IBARST=$S("oO"[X:"O","cC"[X:"C",1:"A")
  1. ;
  1. QDATE S DIR(0)="SA^1:DATE BILL PRINTED;2:TREATMENT DATE",DIR("A")="Print Report by (1) DATE BILL PRINTED or (2) TREATMENT DATE: ",DIR("B")="1",DIR("T")=20,DIR("?")="^S IBOFF=24 D HELP^IBOTR1"
  1. D ^DIR K DIR G:Y=""!(X="^") END S IBDF=X,IBDFN=Y(0)
  1. BEGDT S %DT="AEPX",%DT("A")=" START WITH "_IBDFN_": " D ^%DT K %DT G:Y<0 END S IBBDT=Y
  1. S %DT="AEPX",%DT("A")=" GO TO "_IBDFN_": " D ^%DT K %DT G:Y<0 END
  1. S IBEDT=Y I Y<IBBDT W *7,!!," The END DATE must follow the BEGIN DATE.",! G BEGDT
  1. ;
  1. INSO1 W !," START WITH INSURANCE COMPANY: FIRST// " R X:DTIME G:'$T!(X["^") END
  1. I $E(X)="?" S IBOFF=12 D HELP G INSO1
  1. S IBICF=X
  1. INSO2 W !," GO TO INSURANCE COMPANY: LAST// " R X:DTIME G:'$T!(X["^") END
  1. I $E(X)="?" S IBOFF=18 D HELP G INSO2
  1. I X="" S IBICL="" S:IBICF="" IBIC="ALL" G SELPRNT
  1. I X="@",IBICF="@" S IBICL="@",IBIC="NULL" G SELPRNT
  1. I IBICF'="@",IBICF]X W *7,!!," The LAST value must follow the FIRST.",! G INSO2
  1. S IBICL=X
  1. ;
  1. SELPRNT W !!,"You will need a 132 column printer for this report!"
  1. S %ZIS="QM" D ^%ZIS G:POP END
  1. I $D(IO("Q")) D G END
  1. .S ZTRTN="^IBOTR2",ZTDESC="INSURANCE PAYMENT TREND REPORT",ZTSAVE("IB*")=""
  1. .D ^%ZTLOAD W !!,$S($D(ZTSK):"This job has been queued. The task number is "_ZTSK_".",1:"Unable to queue this job.")
  1. .K ZTSK,IO("Q") D HOME^%ZIS
  1. U IO
  1. ;***
  1. ;I $D(XRT0) S:'$D(XRTN) XRTN="IBOTR1" D T1^%ZOSV ;stop rt clock
  1. D ^IBOTR2 ;Compile and print report
  1. END Q
  1. ;
  1. ;
  1. HELP W ! F S IBTEXT=$P($T(TEXT+IBOFF),";",3) Q:IBTEXT="" W !,IBTEXT S IBOFF=IBOFF+1
  1. W:IBOFF<24!(IBOFF>29) ! Q
  1. ;
  1. TEXT ; 'Select INPATIENT... ' prompt
  1. ;; Enter: '<CR>' - To select both Inpatient and Outpatient bills
  1. ;; 'I' - To select only Inpatient bills
  1. ;; 'O' - To select only Outpatient bills
  1. ;; '^' - To quit this option
  1. ;
  1. ; '(C)ombined or (S)eparate report' prompt
  1. ;; Enter: '<CR>' - To print a report of both Inpatient and Outpatient bills
  1. ;; 'S' - To print separate Inpatient and Outpatient reports
  1. ;; '^' - To quit this option
  1. ;
  1. ; 'Start with INSURANCE COMPANY' prompt
  1. ;; Enter a valid field value up to 40 characters, or
  1. ;; '@' - To include null values
  1. ;; '<CR>' - To start from the 'first' value for this field
  1. ;; '^' - To quit this option
  1. ;
  1. ; 'Go to INSURANCE COMPANY' prompt
  1. ;; Enter a valid field value up to 40 characters, or
  1. ;; '@' - To include only null values, if 'Start with' value is @
  1. ;; '<CR>' - To go to the 'last' value for this field
  1. ;; '^' - To quit this option
  1. ;
  1. ; 'Print report by ...' prompt
  1. ;; Enter: '<CR>' - To select bills by the Bill Printed Date
  1. ;; '2' - To select bills by the Treatment Date
  1. ;; '^' - To quit this option
  1. ;
  1. ; 'Select (C)LOSED, (O)PEN... ' prompt
  1. ;; Enter: '<CR>' - To select both Open and Closed bills
  1. ;; 'O' - To select only Open bills
  1. ;; 'C' - To select only Closed bills
  1. ;; '^' - To quit this option
  1. ;