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