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

IBCNAU3.m

Go to the documentation of this file.
  1. IBCNAU3 ;ALB/KML/AWC - USER EDIT REPORT (PRINT) ;6-APRIL-2015
  1. ;;2.0;INTEGRATED BILLING;**528,602,664,737**;21-MAR-94;Build 19
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ; Required variable input: ALLUSERS, ALLINS, PLANS, ALLPLANS, EXCEL, ALLPYRS, REPTYP,
  1. ; ^TMP("IBINC",$J)
  1. ; ^TMP("IBPYR",$J) ;/vd-IB*2*664 - Added this array
  1. ; ^TMP("IBUSER",$J)
  1. ; DATE("START") and DATE("END") required array elements if all dates not selected
  1. ;
  1. ; REPTYP (1=Ins. Company/Plans only; 2=Payers only; 3=both, Ins. Company/Plans & Payers)
  1. ;
  1. ;IB*732/CKB - references to 'eIV Payer' should be changed to 'Payer' in order
  1. ; to include 'IIU payers'
  1. Q
  1. ;
  1. ;EN(ALLPLANS,PLANS) ;
  1. ;/vd-IB*2*664 - Replaced the above line with the line below
  1. EN(ALLPLANS,PLANS,ALLPYRS,REPTYP) ;
  1. ; Print the report.
  1. ;
  1. ;I EXCEL D EXCEL(PLANS) Q
  1. ;/vd-IB*2*664 - Replaced the line above with the line below
  1. ;I +$G(EXCEL) D EXCEL(PLANS,ALLPYRS,REPTYP) Q
  1. I +$G(EXCEL) D EXCEL(PLANS,ALLPYRS,REPTYP) G ENOUT ; IB*737/DTG new exit point for cleanup
  1. N IBI,IBJ,IBK,IBL,IBM,IB01,IB02,IBQUIT,IBPAG,IBPD,IBHDT
  1. S (IB02,IBQUIT,IBPAG)=0
  1. S IBHDT=$$FMTE^XLFDT($$NOW^XLFDT())
  1. D PRINT G ENOUT:IBQUIT ; IB*737/DTG added tag to better control the quit.
  1. G ENX
  1. ;
  1. PRINT ; IB*737/DTG new tag for better control of quits
  1. ;D HDR(ALLPLANS,PLANS)
  1. ;I '$D(^TMP("IBPR",$J)) W !!,"User Edits do not exist per the selected filters." D PAUSE Q
  1. ;
  1. ;F IB01=0,1 F S IB02=$O(^TMP("IBPR",$J,IB01,IB02)) Q:'IB02 Q:IBQUIT S IBPD=$G(^TMP("IBPR",$J,IB01,IB02)) D Q:IBQUIT
  1. ;. I $Y>(IOSL-5) D PAUSE Q:IBQUIT D HDR(ALLPLANS,PLANS)
  1. ;. D PLAN
  1. ;vd-IB*2*664 - Replaced the above lines with the lines below:
  1. ;/IB*2*664 - Beginning of new code
  1. I REPTYP'=2 D Q:IBQUIT ; report for ins cos/plans or both was selected
  1. . D HDR(ALLPLANS,PLANS)
  1. . I '$D(^TMP("IBPR",$J)) W !!,"User Edits do not exist per the selected filters.",!! Q ;IB*737/DTG added additional line feed at end
  1. . ;
  1. . F IB01=0,1 F S IB02=$O(^TMP("IBPR",$J,IB01,IB02)) Q:'IB02 Q:IBQUIT S IBPD=$G(^TMP("IBPR",$J,IB01,IB02)) D Q:IBQUIT
  1. . . I $Y>(IOSL-5) D PAUSE Q:IBQUIT D HDR(ALLPLANS,PLANS)
  1. . . D PLAN
  1. ;I REPTYP=1,'$D(^TMP("IBPR",$J)) G ENX
  1. I REPTYP=1,'$D(^TMP("IBPR",$J)) Q ; IB*737/DTG quit back
  1. ;
  1. ;IB*737/CKB
  1. I REPTYP'=1 D Q:IBQUIT ; report for payers or both was selected
  1. . I REPTYP=3 D PAUSE
  1. . D HDR2(ALLPYRS)
  1. . I '$D(^TMP("IBPR2",$J)) W !!,"User Edits do not exist per the selected filters.",!! Q ;IB*737/DTG added additional line feed at end
  1. . ;
  1. . F IB01=0,1 F S IB02=$O(^TMP("IBPR2",$J,IB01,IB02)) Q:'IB02 Q:IBQUIT S IBPD=$G(^TMP("IBPR2",$J,IB01,IB02)) D Q:IBQUIT
  1. . . I $Y>(IOSL-5) D PAUSE Q:IBQUIT D HDR2(ALLPYRS)
  1. . . D PAYER
  1. ;I REPTYP=2,'$D(^TMP("IBPR",$J)) G ENX
  1. I REPTYP=2,'$D(^TMP("IBPR",$J)) Q ; IB*737/DTG quit back
  1. ;
  1. Q ; IB*737/DTG quit back
  1. ;
  1. ENX ;/vd-IB*2.0*664 - End of new code.
  1. W "END OF REPORT" D PAUSE
  1. ;Q
  1. G ENOUT ; IB*737/DTG new exit point for cleanup
  1. ;
  1. ;
  1. HDR(ALLPLANS,PLANS) ; Print REPORT header - /vd-IB*2.0*664 Replaced the variable IOM with the new variable WIDTH
  1. I $E(IOST,1,2)="C-"!(IBPAG) W @IOF
  1. S IBPAG=IBPAG+1
  1. W !,"USER EDIT REPORT"
  1. W ?WIDTH-34,IBHDT,?WIDTH-10,"Page: ",IBPAG
  1. ;IB*737/DTG reduce indent by 5 for ins line, 3 for user line
  1. ;W !?5,"Insurance Company"
  1. W !,"Insurance Company"
  1. ;I PLANS W ?42,"Group Name"
  1. I PLANS W ?37,"Group Name"
  1. ;W !!?5,"User",?25,"Date/Time of Change",?49,"Modified Field",?75,"Previous Value of Data",?100,"Modified Value of Data"
  1. W !!,?2,"User",?22,"Date/Time of Change",?46,"Modified Field",?72,"Previous Value of Data"
  1. W ?103,"Modified Value of Data"
  1. W !,$TR($J(" ",WIDTH)," ","_"),!
  1. Q
  1. ;
  1. PLAN ; Print plan information.
  1. N USER,DATE
  1. S USER=$$GET1^DIQ(200,$P(IBPD,U,3)_",",.01)
  1. S DATE=$$FMTE^XLFDT($P(IBPD,U,4),2),DATE=$TR(DATE,"@"," ")
  1. ;IB*737/DTG reduce indent by 5 for ins line, 3 for user line
  1. ;W !?5,$P(IBPD,U),?42,$S('IB01:"",1:$P(IBPD,U,2))
  1. W !,$P(IBPD,U)
  1. I PLANS W ?37,$S($P(IBPD,U,8)=36:"INS CO EDITS",'IB01:"",1:$P(IBPD,U,2)) ; IB*737/DTG co. level if file 36 flag
  1. ;W !?5,USER,?25,DATE,?49,$P(IBPD,U,7),?75,$S($P(IBPD,U,5)="":"<no previous value>",1:$P(IBPD,U,5)),?100,$P(IBPD,U,6),!!
  1. W !,?2,USER,?22,DATE,?46,$P(IBPD,U,7),?72,$S($P(IBPD,U,5)="":"<no previous value>",1:$E($P(IBPD,U,5),1,29))
  1. W ?103,$E($P(IBPD,U,6),1,29),!!
  1. Q
  1. ;
  1. ;/vd-IB*2*664 - Beginning of new code
  1. HDR2(ALLPYRS) ; Print REPORT header - /vd-IB*2.0*664 Replaced the variable IOM with the new variable WIDTH
  1. I $E(IOST,1,2)="C-"!(IBPAG) W @IOF
  1. S IBPAG=IBPAG+1
  1. W !,"USER EDIT REPORT"
  1. W ?WIDTH-34,IBHDT,?WIDTH-10,"Page: ",IBPAG
  1. ;IB*737/DTG reduce indent by 5 for ins line, 3 for user line
  1. ;W !?5,"Payer"
  1. W !,"Payer"
  1. ;W !!?5,"User",?25,"Date/Time of Change",?49,"Modified Field",?75,"Previous Value of Data",?100,"Modified Value of Data"
  1. W !!,?2,"User",?22,"Date/Time of Change",?46,"Modified Field"
  1. W ?72,"Previous Value of Data",?103,"Modified Value of Data"
  1. W !,$TR($J(" ",WIDTH)," ","_"),!
  1. Q
  1. ;
  1. PAYER ; Print plan information.
  1. N USER,DATE
  1. S USER=$$GET1^DIQ(200,$P(IBPD,U,2)_",",.01)
  1. S DATE=$$FMTE^XLFDT($P(IBPD,U,3),2),DATE=$TR(DATE,"@"," ")
  1. ;IB*737/DTG reduce indent by 5 for ins line, 3 for user line
  1. ;W !?5,$P(IBPD,U),?42,$S('IB01:"",1:$P(IBPD,U,2))
  1. W !,$P(IBPD,U)
  1. I PLANS W ?37,$S($P(IBPD,U,8)=36:"INS CO EDITS",'IB01:"",1:$P(IBPD,U,2))
  1. ;W !?5,USER,?25,DATE,?49,$P(IBPD,U,6),?75,$S($P(IBPD,U,4)="":"<no previous value>",1:$P(IBPD,U,4)),?100,$P(IBPD,U,5),!!
  1. W !,?2,USER,?22,DATE,?46,$P(IBPD,U,6),?72,$S($P(IBPD,U,4)="":"<no previous value>",1:$E($P(IBPD,U,4),1,29))
  1. W ?103,$E($P(IBPD,U,5),1,29),!!
  1. Q
  1. ;/vd-IB*2*664 - End of new code.
  1. ;
  1. PAUSE ; Pause for screen output.
  1. Q:$E(IOST,1,2)'["C-"
  1. W !
  1. S DIR(0)="E" D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) S IBQUIT=1 K DIRUT,DTOUT,DUOUT
  1. Q
  1. ;
  1. ;EXCEL(PLANS) ; user selected format that can be viewed in MS Excel
  1. ;/vd-IB*2*664 - Replaced the above line with the following line
  1. EXCEL(PLANS,ALLPYRS,REPTYP) ; user selected format that can be viewed in MS Excel
  1. N IBI,IBJ,IBK,IBL,IBM,IB01,IB02,USER,DATE
  1. N IBPL ;IB*737/DTG for use with plan/group
  1. S (IB01,IB02)=0
  1. ; IB*602/HN ; Add report headers to Excel Spreadsheets
  1. W !,"USER EDIT REPORT^"_$$FMTE^XLFDT($$NOW^XLFDT,1)
  1. ; IB*602/HN end
  1. ;/vd-IB*2*664 - Beginning of new code.
  1. I REPTYP=1 W !,"For Insurance Companies/Plans"
  1. ;IB*737/CKB
  1. I REPTYP=2 W !,"For Payers"
  1. I REPTYP=3 W !,"For Both Insurance Companies/Plans and Payers"
  1. ;/vd-IB*2*664 - End of new code.
  1. ;
  1. I REPTYP'=2 D
  1. . I PLANS W !,"Insurance Company^Group Name^User^Date/Time of Change^Modified Field^Previous Value of Data^Modified Value of Data",!
  1. . E W !,"Insurance Company^User^Date/Time of Change^Modified Field^Previous Value of Data^Modified Value of Data",!
  1. ;
  1. ;IB*737/CKB - Insurance Company, no data found
  1. I REPTYP'=2 I '$D(^TMP("IBPR",$J)) W !,"User Edits do not exist per the selected filters.",!
  1. ;
  1. S IBQUIT=0 ; IB*737/DTG for page check if crt
  1. F IB01=0,1 F S IB02=$O(^TMP("IBPR",$J,IB01,IB02)) Q:'IB02 S IBPD=$G(^TMP("IBPR",$J,IB01,IB02)) D Q:IBQUIT ;IB*737/DTG screen check
  1. . S USER=$$GET1^DIQ(200,$P(IBPD,U,3)_",",.01)
  1. . S DATE=$$FMTE^XLFDT($P(IBPD,U,4),2)
  1. . ;IB*737/DTG change to if else
  1. . ;I IB01=0 W $P(IBPD,U)_U_USER_U_DATE_U_$P(IBPD,U,7)_U_$S($P(IBPD,U,5)="":"<no previous value>",1:$P(IBPD,U,5))_U_$P(IBPD,U,6)
  1. . ;E W $P(IBPD,U)_U_$P(IBPD,U,2)_U_USER_U_DATE_U_$P(IBPD,U,7)_U_$S($P(IBPD,U,5)="":"<no previous value>",1:$P(IBPD,U,5))_U_$P(IBPD,U,6)
  1. . I IB01=0 D
  1. . . W $P(IBPD,U)_U_USER_U_DATE_U_$P(IBPD,U,7)_U
  1. . . W $S($P(IBPD,U,5)="":"<no previous value>",1:$P(IBPD,U,5))_U_$P(IBPD,U,6)
  1. . I IB01'=0 D
  1. . . W $P(IBPD,U)_U
  1. . . S IBPL="",IBPL=$S($P(IBPD,U,8)=36:"INS CO EDITS",1:$P(IBPD,U,2))
  1. . . S:IBPL="NO PLANS SELECTED" IBPL="" W IBPL_U
  1. . . W USER_U_DATE_U_$P(IBPD,U,7)_U_$S($P(IBPD,U,5)="":"<no previous value>",1:$P(IBPD,U,5))_U
  1. . . W $P(IBPD,U,6)
  1. . W !
  1. . I ($Y#($G(IOSL)-5))=0 S IBQUIT=0 D EXLCK Q:IBQUIT ;IB*737/DTG screen check
  1. ;
  1. I IBQUIT Q ;IB*737/DTG quit if screen and exit.
  1. ;
  1. ;/vd-IB*2.0*664 - Beginning of new code for Payer data.
  1. I REPTYP'=1 D
  1. . ;IB*737/CKB
  1. . W !,"Payer^User^Date/Time of Change^Modified Field^Previous Value of Data^Modified Value of Data",!
  1. . ;IB*737/CKB - Payer, no data found
  1. . I '$D(^TMP("IBPR2",$J)) W !,"User Edits do not exist per the selected filters.",! Q
  1. . F IB01=0,1 F S IB02=$O(^TMP("IBPR2",$J,IB01,IB02)) Q:'IB02 S IBPD=$G(^TMP("IBPR2",$J,IB01,IB02)) D Q:IBQUIT ;IB*737/DTG screen check
  1. . . S USER=$$GET1^DIQ(200,$P(IBPD,U,2)_",",.01)
  1. . . S DATE=$$FMTE^XLFDT($P(IBPD,U,3),2)
  1. . . W $P(IBPD,U)_U_USER_U_DATE_U_$P(IBPD,U,6)_U_$S($P(IBPD,U,4)="":"<no previous value>",1:$P(IBPD,U,4))_U_$P(IBPD,U,5)
  1. . . W !
  1. . . I ($Y#($G(IOSL)-5))=0 S IBQUIT=0 D EXLCK Q:IBQUIT
  1. ;/vd-IB*2.0*664 - End of new code for Payer data.
  1. ;
  1. ; -- write to screen
  1. ;I $E(IOST,1,2)["C-" W !,"[END OF REPORT]",! S DIR("A")="Press RETURN to continue" D PAUSE
  1. EXEOR ;IB*737/CKB - called if no data was found
  1. W "[END OF REPORT]",!
  1. D EXLCK ;IB*737/DTG include EOR on excel queued check for pause
  1. Q
  1. ;
  1. EXLCK ; IB*737/DTG new tag for excel to check for pause
  1. ;
  1. I $E(IOST,1,2)["C-" S DIR("A")="Press RETURN to continue" D PAUSE W !
  1. Q
  1. ;
  1. ENOUT ; IB*737/DTG new TAG to cleanup temp files on exit.
  1. ;
  1. ;clear temp files
  1. K ^TMP("IBPYR",$J),^TMP("IBINC",$J),^TMP("IBUSER",$J),^TMP("IBPR",$J),^TMP("IBPR2",$J),^TMP($J)
  1. K ^TMP("IBPRINS",$J) ; IB*737/DTG to track which DIA(36,"B",INSIENS have been picked up
  1. Q
  1. ;