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

IBCNAU1.m

Go to the documentation of this file.
  1. IBCNAU1 ;ALB/KML/AWC - USER EDIT REPORT (REPORT FILTER SELECTION) ;6-APRIL-2015
  1. ;;2.0;INTEGRATED BILLING;**528,664,668,737**;21-MAR-94;Build 19
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;IB*737/CKB - references to 'eIV Payer' should be changed to 'Payer' in order
  1. ; to include 'IIU Payers'
  1. Q
  1. ;
  1. SELR() ;EP - Select Report Type
  1. ; IB*2.0*664 - Added function
  1. ; Prompt user to select report for User edits to Insurance Company/Group Plan or Payers or BOTH
  1. ; Input: None
  1. ; Returns: 1 - Insurance Company/Group Plan
  1. ; 2 - Payers
  1. ; 3 - Both Insurance Company/Group Plan and Payers
  1. ; -1 - No selection made
  1. ;
  1. N DIR,DIROUT,DIRUT,DTOUT,IBV0
  1. W !!,"Select one of the following:"
  1. S DIR(0)="SA^1:INSURANCE COMPANY/GROUP PLAN;2:PAYERS;3:BOTH"
  1. S DIR("A")=" Select 1 or 2 or 3: "
  1. S DIR("A",1)=" 1. User Edits for Insurance Company/Group Plan"
  1. S DIR("A",2)=" 2. User Edits for Payers"
  1. S DIR("A",3)=" 3. BOTH"
  1. S DIR("?",1)=" 1 - Only report on user edits to Insurance Company/Group Plan"
  1. S DIR("?",2)=" 2 - Only report on user edits to Payers"
  1. S DIR("?")=" 3 - Report on user edits to both Insurance Company/Group Plan and Payers"
  1. S DIR("B")=1
  1. D ^DIR
  1. I Y<0!$D(DIRUT) Q -1
  1. S IBV0=$S(Y=2:2,Y=3:3,1:1)
  1. SELRQ Q IBV0
  1. ;
  1. SELI() ; Prompt user to select all or subset of insurance companies
  1. ; Count ins. companies with plans
  1. ;
  1. N IBV1,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
  1. W !!,"Insurance Company Selection:"
  1. S DIR(0)="SA^1:Report all Insurance Companies;2:Report Insurance Companies that are selected"
  1. S DIR("A",1)="1. Report User Edits for all "_$P(^DIC(36,0),U,4)_" Insurance Companies"
  1. S DIR("A",2)="2. Report User Edits for selected Insurance Companies"
  1. S DIR("A")=" ENTER 1 or 2: "
  1. S DIR("?",1)="Enter '1' if edits from all Insurance Companies are to be reported."
  1. S DIR("?")="Enter '2' if you want to select the Insurance Company(s) to be reported."
  1. D ^DIR I Y<0!$D(DIRUT) S IBV1=-1 G SELIQ
  1. S IBV1=(+Y=1)
  1. SELIQ Q IBV1
  1. ;
  1. SELP(ALLINS,PLANS) ; Prompt user if Group Plans is to be on the report
  1. ; input/output - PLANS passed by reference. Returned with 1 or 0
  1. ; function output returns 1 or 0 in IBV2
  1. ;
  1. W !!,"Group Plan Selection:"
  1. N IBV2,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
  1. S DIR(0)="YA"
  1. S DIR("A")="Do you want to report any edits made to Group Plans (Y/N)? "
  1. ;D ^DIR I Y<0!$D(DIRUT) S IBV2=-1 G SELPQ
  1. ;/vd - IB*2.0*664 - Replaced the above line with the following line.
  1. D ^DIR I $D(DIRUT) S IBV2=-1 G SELPQ
  1. ; user does not want to report Group Plan edits
  1. I 'Y S (PLANS,IBV2)=+Y G SELPQ
  1. ;
  1. ; -- if report all insurance companies - quit and report to include group plans or not
  1. I ALLINS S IBV2=(+Y=1),PLANS=1 Q IBV2
  1. ;
  1. ; if group plan edits are to be reported, user needs to choose between all group plans or some group plans
  1. S DIR(0)="SA^1:Report all Group Insurance Plans;2:Report Group Insurance Plans that are selected"
  1. S DIR("A",1)="1. Report User Edits for all Group Insurance Plans"
  1. S DIR("A",2)="2. Report User Edits for selected Group Insurance Plans"
  1. S DIR("A")=" ENTER 1 or 2: "
  1. S DIR("?")="Enter '1' if edits from all Group Insurance Plans are to be reported. Enter '2' if edits from selected Group Insurance Plans are to be reported."
  1. ;
  1. D ^DIR I Y<0!$D(DIRUT) S IBV2=-1 G SELPQ
  1. S IBV2=(+Y=1),PLANS=1
  1. SELPQ Q IBV2
  1. ;
  1. ;/vd-IB*2*664 - Added the following module of code.
  1. SELPY() ; Prompt user if Payer(s) are to be on the report
  1. ; function output returns 1 or 0 in IBV5
  1. ;
  1. W !!,"Payer Selection:" ;IB*737/CKB
  1. N DIR,DIROUT,DIRUT,DTOUT,DUOUT,IBV5,X,Y ;
  1. ; if payer edits are to be reported, user needs to choose between all payers or some payers
  1. S DIR(0)="SA^1:Report all Payers;2:Report Payers that are selected"
  1. S DIR("A",1)="1. Report User Edits for all Payers"
  1. S DIR("A",2)="2. Report User Edits for selected Payers"
  1. S DIR("A")=" ENTER 1 or 2: "
  1. S DIR("?")="Enter '1' if edits from all Payers are to be reported. Enter '2' if edits from selected Payers are to be reported."
  1. ;
  1. D ^DIR I Y<0!$D(DIRUT) S IBV5=-1 G SELPYQ
  1. S IBV5=(+Y=1)
  1. SELPYQ Q IBV5
  1. ;
  1. ;/vd-IB*2*664 - Added the following module of code.
  1. GPYR(ALLPYRS) ; Select the Payers to be reported on.
  1. ; -- allow user to select payers
  1. K ^TMP("IBPYR",$J)
  1. I ALLPYRS=1 D GPYRALL Q
  1. N IBPAYER,IBPYR,IBTXT
  1. ;IB*737/TAZ - Removed parameter for "~NO PAYER"
  1. ;D PAYER^IBCNINSL("",1,.IBPAYER) ;IB*737/CKB
  1. D PAYER^IBCNINSL("",.IBPAYER) ;IB*737/CKB
  1. S IBPYR=""
  1. F S IBPYR=$O(IBPAYER(IBPYR)) Q:IBPYR="" S IBTXT=$E(IBPAYER(IBPYR),1,25) D
  1. . I IBTXT]"" S ^TMP("IBPYR",$J,IBTXT,IBPYR)=""
  1. Q
  1. ;
  1. ;/vd-IB*2*664 - Added the following module of code.
  1. GPYRALL ; User wants to see all PAYERS that have received edits
  1. N PYRIEN,PYRNAM,PYRTXT
  1. K ^TMP("IBPYR",$J)
  1. S PYRNAM="" F S PYRNAM=$O(^IBE(365.12,"B",PYRNAM)) Q:PYRNAM="" D
  1. . S PYRIEN=0 F S PYRIEN=$O(^IBE(365.12,"B",PYRNAM,PYRIEN)) Q:'PYRIEN D
  1. . . ;IB*668/TAZ - Changed Payer Application from IIV to EIV
  1. . . ;IB*737/CKB - Not an eIV or IIU Payer...Only want eIV Payers.
  1. . . I '+$$PYRAPP^IBCNEUT5("EIV",PYRIEN)&'+$$PYRAPP^IBCNEUT5("IIU",PYRIEN) Q
  1. . . S ^TMP("IBPYR",$J,PYRNAM,PYRIEN)=""
  1. Q
  1. ;
  1. SELU() ; prompt user to select user id
  1. W !!,"User Selection:"
  1. N DIR,IBV3,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
  1. S DIR(0)="SA^1:All Users;2:Specified Users"
  1. S DIR("A",1)="1. All User IDs"
  1. S DIR("A",2)="2. Select One or Multiple User IDs"
  1. S DIR("A")=" ENTER 1 or 2: "
  1. S DIR("?")="Enter '1' if edits from all users are to be report. Enter '2' if edits from selected users are to be reported."
  1. D ^DIR I Y<0!$D(DIRUT) S IBV3=-1 G SELUQ
  1. S IBV3=(+Y=1)
  1. SELUQ Q IBV3
  1. ;
  1. GETTYP() ; Get display/output type
  1. ; RETURNS : Output destination (0=Display; 1=MS Excel)
  1. ; LOCAL VARIABLES :
  1. ; DIR,DUOUT - Standard FileMan variables
  1. ; Y - User input
  1. N DIR,DUOUT,DIRUT,Y
  1. W !
  1. S DIR(0)="Y"
  1. S DIR("A")="Export to Microsoft Excel (Y/N): "
  1. S DIR("B")="NO"
  1. D ^DIR K DIR
  1. I $D(DUOUT)!$D(DIRUT) S Y=-1
  1. Q Y
  1. ;
  1. OK(QUIT) ; -- ask okay
  1. N DIR,Y,X
  1. W !
  1. S DIR(0)="Y",DIR("A")=" ...OK",DIR("B")="YES" D ^DIR
  1. I $D(DUOUT)!$D(DIRUT) S QUIT=1
  1. Q Y