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

ABMDFPRT.m

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