1 | IBCEMSG ;ALB/JEH - EDI PURGE STATUS MESSAGES ;10-APR-01
|
---|
2 | ;;2.0;INTEGRATED BILLING:**137**;21-MAR-94
|
---|
3 | ;;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | EN ;
|
---|
5 | N IBDELDT,IBSEL,IBQUIT,IBPRT,DTOUT,DUOUT,DIRUT,X,Y
|
---|
6 | K ^TMP("IBCEMSGA",$J)
|
---|
7 | I '$D(^XUSEC("IB SUPERVISOR",DUZ)) W !!,"You do not have the appropriate authority to delete status messages. See your supervisor for assistance." G MSGQ
|
---|
8 | W !,"This option will delete status messages in one of the Final Review statuses",!,"prior to a selected date",!!
|
---|
9 | S DIR("A")="DELETE (A)LL OR (S)ELECTED STATUS MESSAGES? ",DIR("B")="SELECTED"
|
---|
10 | S DIR(0)="SAXB^A:ALL STATUS MESSAGES;S:SELECTED STATUS MESSAGES"
|
---|
11 | D ^DIR K DIR
|
---|
12 | I $D(DTOUT)!$D(DUOUT) G MSGQ
|
---|
13 | S IBSEL=Y
|
---|
14 | ;
|
---|
15 | W !
|
---|
16 | I IBSEL="A" D G:IBQUIT MSGQ
|
---|
17 | . S IBQUIT=0
|
---|
18 | . S DIR("A")="DELETE STATUS MESSAGES REVIEWED PRIOR TO"
|
---|
19 | . S DIR(0)="D^:DTP:EX" W ! D ^DIR K DIR
|
---|
20 | . I $D(DTOUT)!$D(DUOUT) S IBQUIT=1 Q
|
---|
21 | . S IBDELDT=Y
|
---|
22 | . S DIR("A",1)="This action will delete all status messages with a"
|
---|
23 | . S DIR("A",2)="final review action dated before "_$$FMTE^XLFDT(IBDELDT)
|
---|
24 | . S DIR("A",3)=""
|
---|
25 | . S DIR("A")="ARE YOU SURE THIS IS WHAT YOU WANT TO DO",DIR("B")="YES"
|
---|
26 | . S DIR(0)="Y" D ^DIR K DIR
|
---|
27 | . I $D(DTOUT)!$D(DUOUT)!(+Y=0) S IBQUIT=1 Q
|
---|
28 | . S DIR("A")="DO YOU WANT TO PRINT STATUS MESSAGES BEFORE DELETION"
|
---|
29 | . S DIR(0)="Y",DIR("B")="YES"
|
---|
30 | . D ^DIR K DIR
|
---|
31 | . I $D(DTOUT)!$D(DUOUT) S IBQUIT=1 Q
|
---|
32 | . S IBPRT=Y
|
---|
33 | I IBSEL="A" D SET,PRT:IBPRT,DEL
|
---|
34 | I IBSEL="S" D EN^IBCEMSG1
|
---|
35 | MSGQ ;
|
---|
36 | Q
|
---|
37 | SET ;set up tmp global
|
---|
38 | N IBDT,IBIEN,IB0,IBNUM,IBSEV,IBFNR,IBFRD,IBQUIT,IBAUTO
|
---|
39 | S (IBDT,IBQUIT)=0 F S IBDT=$O(^IBM(361,"AFR",IBDT)) Q:'IBDT!(IBQUIT) S IBIEN=0 F S IBIEN=$O(^IBM(361,"AFR",IBDT,IBIEN)) Q:'IBIEN!(IBQUIT) D
|
---|
40 | . I IBDT>IBDELDT S IBQUIT=1 Q
|
---|
41 | . S IB0=$G(^IBM(361,IBIEN,0))
|
---|
42 | . S IBNUM=$$BN1^PRCAFN($P($G(IB0),U))
|
---|
43 | . S IBSEV=$$EXPAND^IBTRE(361,.03,$P($G(IB0),U,3))
|
---|
44 | . S IBFNR=$$EXPAND^IBTRE(361,.1,$P($G(IB0),U,10))
|
---|
45 | . S IBFRD=$$DAT1^IBOUTL($P($G(IB0),U,13))
|
---|
46 | . S IBAUTO=$$EXPAND^IBTRE(361,.14,$P(IB0,U,5))
|
---|
47 | . S ^TMP("IBCEMSGA",$J,IBIEN)=IBNUM_U_IBSEV_U_IBFNR_U_IBFRD
|
---|
48 | Q
|
---|
49 | ;
|
---|
50 | PRT ;print status message list
|
---|
51 | N IBPG,%ZIS
|
---|
52 | S IBPG=0
|
---|
53 | S %ZIS="M" D ^%ZIS G:POP MSGQ
|
---|
54 | U IO
|
---|
55 | PRT1 ;
|
---|
56 | N IBIEN,IB0 D HDR
|
---|
57 | S IBIEN=0 F S IBIEN=$O(^TMP("IBCEMSGA",$J,IBIEN)) Q:'IBIEN S IB0=^(IBIEN) D
|
---|
58 | .I ($Y+5)>IOSL D Q:IBQUIT
|
---|
59 | .. D ASK Q:IBQUIT D HDR
|
---|
60 | . W !,$P(IB0,U),?13,$P(IB0,U,2),?34,$P(IB0,U,3),?71,$P(IB0,U,4)
|
---|
61 | W !
|
---|
62 | D ^%ZISC
|
---|
63 | Q
|
---|
64 | ASK ;
|
---|
65 | I $E(IOST,1,2)'["C-" Q
|
---|
66 | N DIR,DIROUT,DIRUT,DTOUT,DUOUT
|
---|
67 | S DIR(0)="E" D ^DIR
|
---|
68 | I ($D(DIRUT))!($D(DUOUT)) S IBQUIT=1 Q
|
---|
69 | Q
|
---|
70 | ;
|
---|
71 | HDR ; - report header
|
---|
72 | I $E(IOST,1,2)="C-" W @IOF,*13
|
---|
73 | S IBPG=IBPG+1
|
---|
74 | W !!,"Status Messages Selected for Deletion",?57,$$FMTE^XLFDT(DT),?71,"Page: ",IBPG,!
|
---|
75 | W !,?13,"Message",?34,"Final Review",?67,"Final Review",!,"Bill #",?13,"Severity",?37,"Action",?72,"Date"
|
---|
76 | W !,$TR($J("",IOM)," ","=")
|
---|
77 | Q
|
---|
78 | DEL ;Delete status messages in final review status
|
---|
79 | N DIK,DA,Y,IBIEN,IBCNT
|
---|
80 | W !
|
---|
81 | S DIR("A")="ARE YOU SURE YOU WANT TO DELETE STATUS MESSAGES",DIR("B")="YES"
|
---|
82 | S DIR(0)="Y" D ^DIR K DIR
|
---|
83 | I $D(DTOUT)!$D(DUOUT)!(Y=0) G DELQ
|
---|
84 | S IBCNT=0,DIK="^IBM(361,"
|
---|
85 | S IBIEN=0 F S IBIEN=$O(^TMP("IBCEMSGA",$J,IBIEN)) Q:'IBIEN S DA=IBIEN D ^DIK S IBCNT=IBCNT+1
|
---|
86 | W !!,IBCNT_$S(IBCNT>1:" Messages",1:" Message")_" deleted"
|
---|
87 | DELQ Q
|
---|
88 | ;
|
---|