- ABMDFPRT ; IHS/ASDST/DMJ - PRINT CONTROL ;
- ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
- ;Original;TMD;02/08/96 12:27 PM
- ;
- K ABM,ABMP
- ;
- SEL ;
- ; Select the form to be exported (printed)
- W !!
- K DIC
- S DIC="^ABMDEXP("
- S DIC(0)="QZEAM"
- S DIC("A")="Select the FORM to be EXPORTED: "
- S DIC("S")="I $P($G(^(1)),U,5)'=""E""" ; Screen out EMC formats
- D ^DIC
- G XIT:X=""!$D(DUOUT)!$D(DTOUT)
- G SEL:+Y<1
- S (ABMP("EXP"),ABM("FORM"))=+Y ; IEN to 3P MODE OF EXPORT
- S ABM("F")=Y(0,0) ; name of export form
- W !!?8," (NOTE: ",$S($P($G(^ABMDEXP(ABMP("EXP"),1)),U,4):"Plain Paper",1:Y(0,0)_" forms")," should be loaded in the printer.)"
- ;
- CHK ;
- ; Loop thru bills with a claim status of approved count those to be
- ; exported.
- W !!,"Counting..."
- S ABM=""
- S ABM("C")=0 ; claim counter
- F S ABM=$O(^ABMDBILL(DUZ(2),"AC","A",ABM)) Q:'ABM D
- . I '$D(^ABMDBILL(DUZ(2),ABM,0)) K ^ABMDBILL(DUZ(2),"AC","A",ABM) Q
- . ; Quit if status is not approved or reviewed.
- . Q:"RA"'[$P($G(^ABMDBILL(DUZ(2),ABM,0)),U,4)
- . ; count bills with desired mode of export
- . I $P($G(^ABMDBILL(DUZ(2),ABM,0)),U,6)=ABM("FORM") S ABM("C")=ABM("C")+1
- ; If no bills found, display message and exit
- I ABM("C")=0 D G XIT
- . W !!?5,*7,"There are no Approved ",ABM("F"),"'s to be Printed!",!
- . K DIR
- . S DIR(0)="E"
- . D ^DIR
- I ABM("C")>249 W !!?8,"You have reached the Maximum Number (250) of Forms that can be",!?8,"printed during one job!",!!
- W " Number of ",ABM("F")," forms awaiting export: ",ABM("C")
- ;
- SEL2 ;
- ; Select exclusion parameters, find bills that match specified
- ; criteria
- S ABM("APPR")=DUZ ; Approving official (user)
- S ABM("NODX")=""
- S ABMP("TYP")=2 ; Insurer type
- D ^ABMDRSEL ; Select exclusion parameters
- G XIT:$D(DTOUT)!$D(DUOUT)
- D ^ABMDBCNT ; Build ABMY array of selected bills
- ; If no bills found that match the exclusion parameters, ask
- ; them to re-select / exit
- I ABM("C")=0 D G SEL2:Y=1,XIT
- . W !!?5,*7,"With the EXCLUSION PARAMETERS selected there are no ",ABM("F"),"'s to Print!",!
- . K DIR
- . S DIR(0)="Y"
- . S DIR("B")="Y"
- . S DIR("A")="Do you Wish to RE-SELECT the EXCLUSION PARAMETERS"
- . D ^DIR
- . K DIR
- W !!?5,"Number of "_$P(^ABMDEXP(ABMP("EXP"),0),U)_" forms to be Printed: ",ABM("C")
- ;
- ZIS ;
- ; Select output device, call routine to print specified form
- W !!
- S %ZIS("A")="Output DEVICE: "
- S %ZIS="PQ"
- D ^%ZIS
- G:POP XIT
- I IO'=IO(0),IOT'="HFS" D Q
- .D QUE
- .D HOME^%ZIS
- U IO(0)
- W:'$D(IO("S")) !!,"Printing..."
- U IO
- D PRT
- D WTOT^ABMDFUTL
- D XIT
- Q
- ;
- PRT ; Entry point for Taskman
- S ABMAPOK=1
- D @("^"_$P(^ABMDEXP(ABMP("EXP"),0),U,4)) ; do export routine
- W $$EN^ABMVDF("IOF")
- D ^%ZISC
- Q
- ;
- XIT ;CLEAN UP AND QUIT
- K ABM,ABMP,POP,ZTSK,IO("Q"),ABMY,DIQ,ABMAPOK
- Q
- ;
- QUE ;
- S ZTRTN="PRT^ABMDFPRT"
- S ZTDESC="3RD PARTY BILLING FORMS PRINTING"
- S ZTSAVE("ABM*")=""
- D ^%ZTLOAD
- W:$G(ZTSK) "Task # ",ZTSK," queued."
- Q
- ABMDFPRT ; IHS/ASDST/DMJ - PRINT CONTROL ;
- +1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
- +2 ;Original;TMD;02/08/96 12:27 PM
- +3 ;
- +4 KILL ABM,ABMP
- +5 ;
- SEL ;
- +1 ; Select the form to be exported (printed)
- +2 WRITE !!
- +3 KILL DIC
- +4 SET DIC="^ABMDEXP("
- +5 SET DIC(0)="QZEAM"
- +6 SET DIC("A")="Select the FORM to be EXPORTED: "
- +7 ; Screen out EMC formats
- SET DIC("S")="I $P($G(^(1)),U,5)'=""E"""
- +8 DO ^DIC
- +9 IF X=""!$DATA(DUOUT)!$DATA(DTOUT)
- GOTO XIT
- +10 IF +Y<1
- GOTO SEL
- +11 ; IEN to 3P MODE OF EXPORT
- SET (ABMP("EXP"),ABM("FORM"))=+Y
- +12 ; name of export form
- SET ABM("F")=Y(0,0)
- +13 WRITE !!?8," (NOTE: ",$SELECT($PIECE($GET(^ABMDEXP(ABMP("EXP"),1)),U,4):"Plain Paper",1:Y(0,0)_" forms")," should be loaded in the printer.)"
- +14 ;
- CHK ;
- +1 ; Loop thru bills with a claim status of approved count those to be
- +2 ; exported.
- +3 WRITE !!,"Counting..."
- +4 SET ABM=""
- +5 ; claim counter
- SET ABM("C")=0
- +6 FOR
- SET ABM=$ORDER(^ABMDBILL(DUZ(2),"AC","A",ABM))
- IF 'ABM
- QUIT
- Begin DoDot:1
- +7 IF '$DATA(^ABMDBILL(DUZ(2),ABM,0))
- KILL ^ABMDBILL(DUZ(2),"AC","A",ABM)
- QUIT
- +8 ; Quit if status is not approved or reviewed.
- +9 IF "RA"'[$PIECE($GET(^ABMDBILL(DUZ(2),ABM,0)),U,4)
- QUIT
- +10 ; count bills with desired mode of export
- +11 IF $PIECE($GET(^ABMDBILL(DUZ(2),ABM,0)),U,6)=ABM("FORM")
- SET ABM("C")=ABM("C")+1
- End DoDot:1
- +12 ; If no bills found, display message and exit
- +13 IF ABM("C")=0
- Begin DoDot:1
- +14 WRITE !!?5,*7,"There are no Approved ",ABM("F"),"'s to be Printed!",!
- +15 KILL DIR
- +16 SET DIR(0)="E"
- +17 DO ^DIR
- End DoDot:1
- GOTO XIT
- +18 IF ABM("C")>249
- WRITE !!?8,"You have reached the Maximum Number (250) of Forms that can be",!?8,"printed during one job!",!!
- +19 WRITE " Number of ",ABM("F")," forms awaiting export: ",ABM("C")
- +20 ;
- SEL2 ;
- +1 ; Select exclusion parameters, find bills that match specified
- +2 ; criteria
- +3 ; Approving official (user)
- SET ABM("APPR")=DUZ
- +4 SET ABM("NODX")=""
- +5 ; Insurer type
- SET ABMP("TYP")=2
- +6 ; Select exclusion parameters
- DO ^ABMDRSEL
- +7 IF $DATA(DTOUT)!$DATA(DUOUT)
- GOTO XIT
- +8 ; Build ABMY array of selected bills
- DO ^ABMDBCNT
- +9 ; If no bills found that match the exclusion parameters, ask
- +10 ; them to re-select / exit
- +11 IF ABM("C")=0
- Begin DoDot:1
- +12 WRITE !!?5,*7,"With the EXCLUSION PARAMETERS selected there are no ",ABM("F"),"'s to Print!",!
- +13 KILL DIR
- +14 SET DIR(0)="Y"
- +15 SET DIR("B")="Y"
- +16 SET DIR("A")="Do you Wish to RE-SELECT the EXCLUSION PARAMETERS"
- +17 DO ^DIR
- +18 KILL DIR
- End DoDot:1
- IF Y=1
- GOTO SEL2
- GOTO XIT
- +19 WRITE !!?5,"Number of "_$PIECE(^ABMDEXP(ABMP("EXP"),0),U)_" forms to be Printed: ",ABM("C")
- +20 ;
- ZIS ;
- +1 ; Select output device, call routine to print specified form
- +2 WRITE !!
- +3 SET %ZIS("A")="Output DEVICE: "
- +4 SET %ZIS="PQ"
- +5 DO ^%ZIS
- +6 IF POP
- GOTO XIT
- +7 IF IO'=IO(0)
- IF IOT'="HFS"
- Begin DoDot:1
- +8 DO QUE
- +9 DO HOME^%ZIS
- End DoDot:1
- QUIT
- +10 USE IO(0)
- +11 IF '$DATA(IO("S"))
- WRITE !!,"Printing..."
- +12 USE IO
- +13 DO PRT
- +14 DO WTOT^ABMDFUTL
- +15 DO XIT
- +16 QUIT
- +17 ;
- PRT ; Entry point for Taskman
- +1 SET ABMAPOK=1
- +2 ; do export routine
- DO @("^"_$PIECE(^ABMDEXP(ABMP("EXP"),0),U,4))
- +3 WRITE $$EN^ABMVDF("IOF")
- +4 DO ^%ZISC
- +5 QUIT
- +6 ;
- XIT ;CLEAN UP AND QUIT
- +1 KILL ABM,ABMP,POP,ZTSK,IO("Q"),ABMY,DIQ,ABMAPOK
- +2 QUIT
- +3 ;
- QUE ;
- +1 SET ZTRTN="PRT^ABMDFPRT"
- +2 SET ZTDESC="3RD PARTY BILLING FORMS PRINTING"
- +3 SET ZTSAVE("ABM*")=""
- +4 DO ^%ZTLOAD
- +5 IF $GET(ZTSK)
- WRITE "Task # ",ZTSK," queued."
- +6 QUIT