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

IBCNESI.m

Go to the documentation of this file.
  1. IBCNESI ;ALB/TAZ - Potential Medicare COB Prompts ;15-JAN-2013
  1. ;;2.0;INTEGRATED BILLING;**497**;21-MAR-94;Build 120
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. EN ;PRIMARY ENTRY POINT
  1. N IBSDT,IBEDT,IBCOMP,IBREP,IBSORT,IBERD
  1. ;
  1. S IBERD=$P($O(^IBCN(365,"AD","")),".",1)
  1. W !,"The earliest date in the IIV RESPONSE file is "_$$FMTE^XLFDT(IBERD),!!
  1. Q1 ; Question 1 - Begin Search Date
  1. N X,Y,DIRUT
  1. S DIR(0)="DA^"_IBERD_":DT:EX"
  1. S DIR("A")="Select Earliest Report Date: ",DIR("B")="TODAY-7"
  1. S DIR("?",1)=" Please enter a valid date for which an eIV Response"
  1. S DIR("?",2)=" would have been received (earliest date is "_$$FMTE^XLFDT(IBERD)_")."
  1. S DIR("?")=" Future dates are not allowed."
  1. D ^DIR K DIR
  1. I $D(DIRUT) G ENQ
  1. S IBSDT=+Y
  1. ;
  1. Q2 ; Question 2 - End Search Date
  1. S DIR(0)="DA^"_IBSDT_":DT:EX"
  1. S DIR("A")="Select Latest Report Date ",DIR("B")="TODAY"
  1. S DIR("?",1)=" Please enter a valid date for which an eIV Response"
  1. S DIR("?",2)=" would have been received. This date must not precede"
  1. S DIR("?")=" the Start Date. Future dates are not allowed."
  1. D ^DIR K DIR
  1. I $D(DIRUT) G ENQ
  1. S IBEDT=+Y
  1. ;
  1. Q3 ;Question 3 - Sort Criteria
  1. N DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
  1. W !
  1. S DIR(0)="SA^1:Chronological Order;2:Reverse Chronological Order"
  1. S DIR("A")="Sort Report By: "
  1. S DIR("B")="Chronological Order"
  1. D ^DIR
  1. I $D(DTOUT)!$D(DUOUT)!(Y<0) G ENQ
  1. S IBSORT=$S(Y=2:"-1",1:"+1")
  1. ;
  1. Q4 ;
  1. S DIR(0)="SA^R:Report;S:Screen List"
  1. S DIR("A")="Do you want a (R)eport or a (S)creen List format?: "
  1. S DIR("B")="Screen List"
  1. W ! D ^DIR K DIR
  1. I $D(DTOUT)!$D(DUOUT) G ENQ
  1. S IBREP=Y
  1. ;
  1. I IBREP="S" S IBCOMP=0 D LIST^IBCNESI1 G ENQ
  1. ;
  1. Q5 ; Include completed entries
  1. W !!,"1) Display COMPLETED entries, but do not display any comments"
  1. W !,"2) Display COMPLETED entries along with any associated comments"
  1. W !!,"3) Display non-COMPLETED entries, but do not display any comments"
  1. W !,"4) Display non-COMPLETED entries along with any associated comments",!
  1. S DIR("A")="Which report type do you want? "
  1. S DIR(0)="SA^1:Display COMPLETED entries, but do not display any comments;2:Display COMPLETED entries along with any associated comments"
  1. S DIR(0)=DIR(0)_";3:Display non-COMPLETED entries, but do not display any comments;4:Display non-COMPLETED entries along with any associated comments"
  1. S DIR("B")=1
  1. W ! D ^DIR K DIR
  1. I $D(DTOUT)!$D(DUOUT) G ENQ
  1. S IBCOMP=Y
  1. ;
  1. Q6 ; Select device
  1. F S IBACT=0 D DEVSEL(.IBACT) Q:IBACT
  1. I IBACT=99 G ENQ
  1. U IO
  1. D LIST^IBCNESI1
  1. ;
  1. ENQ ;
  1. Q
  1. ;
  1. DEVSEL(IBACT) ;
  1. N DIR,POP,X,Y,ZTRTN,ZTSAVE,ZTDESC,IBOK,%ZIS
  1. W !!,"You will need a 132 column printer for this report!"
  1. S %ZIS="QM" D ^%ZIS I POP S IBACT=99 G DEVSELQ
  1. I $G(IOM),IOM<132 S IBOK=1 D I 'IBOK S IBACT=0 G DEVSELQ
  1. . S DIR(0)="YA",DIR("A",1)="This report requires output to a 132 column device."
  1. . S DIR("A",2)="The device you have chosen is only set for "_IOM_"."
  1. . S DIR("A")="Are you sure you want to continue?: ",DIR("B")="No"
  1. . W ! D ^DIR K DIR
  1. . I Y'=1 S IBOK=0 W !
  1. I $D(IO("Q")) D S IBACT=99 G DEVSELQ
  1. . K IO("Q")
  1. . S ZTRTN="LIST^IBCNESI",ZTSAVE("IBCRIT(")="",ZTSAVE("IB*")="",ZTSAVE("^TMP(""IB_POT_COB_RPT"",$J)")="",ZTDESC="IBCNE - Potential COB Report"
  1. . D ^%ZTLOAD K ZTSK D HOME^%ZIS
  1. S IBACT=1
  1. DEVSELQ ;
  1. Q
  1. ;