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

IBJDF7.m

Go to the documentation of this file.
  1. IBJDF7 ;ALB/MR - REPAYMENT PLAN REPORT;14-AUG-00
  1. ;;2.0;INTEGRATED BILLING;**123**;21-MAR-94
  1. ;
  1. EN ; - Option entry point.
  1. S (IBEXCEL,IBTPT)=0,IBDAYS=1
  1. ;
  1. ; - Determine sorting (By name or Last 4 SSN)
  1. S IBSN=$$SNL^IBJD() G ENQ:IBSN="^"
  1. ;
  1. ; - Determine the range
  1. S X=$$INTV^IBJD("PATIENT "_$S(IBSN="N":"NAME",1:"LAST 4")) G ENQ:X="^"
  1. S IBSNF=$P(X,"^",1),IBSNL=$P(X,"^",2),IBSNA=$P(X,"^",3)
  1. ;
  1. CDPP ; - Select Current or Defaulted Payment Plan
  1. S DIR(0)="SA^C:CURRENT;D:DEFAULTED;B:BOTH"
  1. S DIR("A")="Print (C)URRENT, (D)EFAULTED Repayment Plans or (B)OTH: "
  1. S DIR("B")="B",DIR("T")=300,DIR("L")=""
  1. S (DIR("?"),DIR("??"))="^S IBOFF=23 D HELP^IBJDF7H"
  1. W ! D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
  1. S IBPLN=Y K DIROUT,DTOUT,DUOUT,DIRUT G MCR:IBPLN="C"
  1. ;
  1. ; - Minimum number of days defaulted
  1. S DIR(0)="NA^1:999",DIR("B")=1
  1. S DIR("A")="Minimum number of days defaulted: "
  1. S DIR("T")=300,DIR("?")="^S IBOFF=32 D HELP^IBJDF7H"
  1. W ! D ^DIR K DIR G:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
  1. S IBDAYS=+Y W:IBDAYS " day(s)" K DIROUT,DTOUT,DUOUT
  1. ;
  1. MCR ; - Select MCCR or NON-MCCR Receivables
  1. S DIR(0)="SA^M:MCCR;N:NON-MCCR"
  1. S DIR("A")="Print (M)CCR or (N)ON-MCCR Receivables: "
  1. S DIR("B")="M",DIR("T")=300,DIR("L")=""
  1. S (DIR("?"),DIR("??"))="^S IBOFF=39 D HELP^IBJDF7H"
  1. W ! D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
  1. S IBMCR=Y K DIROUT,DTOUT,DUOUT,DIRUT
  1. ;
  1. ; - Select a detailed or summary report.
  1. D DS^IBJD G ENQ:IBRPT["^",DEV:IBRPT="S"
  1. ;
  1. ; - Determine whether to gather data for Excel report.
  1. S IBEXCEL=$$EXCEL^IBJD() G ENQ:IBEXCEL="^",DEV:IBEXCEL
  1. ;
  1. ; - Print TOTAL by Patient?
  1. S DIR(0)="Y",DIR("B")="YES",DIR("T")=300 W !
  1. S DIR("A")="Do you want to include TOTALs by Patient"
  1. S DIR("?")="^S IBOFF=55 D HELP^IBJDF7H"
  1. D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
  1. S IBTPT=+Y K DIROUT,DTOUT,DUOUT,DIRUT
  1. ;
  1. DEV ; - Select a device.
  1. W !!,"This report requires a ",$S(IBRPT="S":80,1:132)," column printer."
  1. ;
  1. I '$G(IBEXCEL) D
  1. . W !!,"Note: This report will search through all active receivables."
  1. . W !?6,"It is recommended that you queue it to run after normal business hours.",!
  1. ;
  1. I $G(IBEXCEL) D EXMSG^IBJD
  1. ;
  1. S %ZIS="QM" D ^%ZIS G:POP ENQ
  1. I $D(IO("Q")) D G ENQ
  1. .S ZTRTN="DQ^IBJDF7",ZTDESC="IB - REPAYMENT PLAN REPORT"
  1. .S ZTSAVE("IB*")="" D ^%ZTLOAD
  1. .I $G(ZTSK) W !!,"This job has been queued. The task no. is ",ZTSK,"."
  1. .E W !!,"Unable to queue this job."
  1. .K ZTSK,IO("Q") D HOME^%ZIS
  1. ;
  1. U IO
  1. ;
  1. DQ I $G(IBXTRACT) D E^IBJDE(38,1) ; Change extract status.
  1. D ST^IBJDF71 ; Compile and print the report.
  1. ;
  1. ENQ K DIROUT,DTOUT,DUOUT,DIRUT,I,IBDAYS,IBEXCEL,IBI,IBMCR,IBSN,IBSNF,IBSNL
  1. K IBOFF,IBSNA,IBPLN,IBRPT,IBTPT,POP,X,ZTDESC,ZTRTN,ZTSAVE,Y,%ZIS
  1. Q