source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCREC.m@ 1751

Last change on this file since 1751 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1IBCREC ;ALB/ARH - RATES: CM INACTIVATE CPT CHARGE OPTION ; 22-MAY-1996
2 ;;2.0;INTEGRATED BILLING;**52,131**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5ENTER ; OPTION ENTRY POINT: inactivate all CPT procedures Charge Items that are currently inactive in the CPT file
6 ;
7 W @IOF W !,?8,"**** INACTIVATE CHARGES FOR ALL CURRENTLY INACTIVE CPTS ****"
8 W !!,?5,"For all Charge Sets based on CPT procedures, this option will add an",!,?5,"Inactive Date to each Charge Item that is a currently Inactive CPT code.",!!
9 ;
10 N DIR,DTOUT,DUOUT,DIRUT,X,Y,IBQUIT K ^TMP($J,"IBCREC")
11 ;
12 S DIR(0)="SO^1:Print List of Active Charges for Inactive CPT's;2:Inactivate Charges for Inactive CPT's"
13 D ^DIR K DIR I +Y<1!$D(DIRUT) Q
14 I +Y=1 D DEV Q:$G(IBQUIT) G RPT
15 ;
16 W !!!,"All charges for currently Inactive CPT codes will become inactive",!,"on the CPT Inactive Date.",!
17 ;
18 S DIR(0)="YO",DIR("A")="Is this correct, do you want to continue" D ^DIR K DIR I Y'=1 W !,"None inactivated",! Q
19 ;
20 I Y=1 W !,"Beginning Inactivations" W !,$$INACTCPT(0)," charges inactivated"
21 Q
22 ;
23INACTCPT(SAVE) ; inactivate charges for all Inactive CPT codes, all sets checked
24 ; if an active charge for an Inactive CPT, the CPT's inactive date is added as the charges Inactive Date
25 ; if a CPT is inactive before the charges Effective date, that Effective date is added as the Inactive Date
26 ; Input: SAVE - if true, charge items that would be deleted are entered into TMP array for print instead
27 ; Output: returns the count of the charge items inactivated
28 ;
29 N IBCS,IBBI,IBXRF,IBSUB2,IBITM,IBEFDT,IBCIFN,IBCNT,IBINDTCI,IBINDATE,IBX,INDT S IBCNT=0
30 ;
31 S IBCS=0 F S IBCS=$O(^IBE(363.1,IBCS)) Q:'IBCS D
32 . ;
33 . S IBBI=$$CSBI^IBCRU3(IBCS) I +IBBI'=2 Q
34 . S IBXRF="AIVDTS"_+IBCS I '$D(ZTQUEUED),'$D(XPDNM) W "."
35 . I +$G(SAVE) S IBSUB2=$$TMPHDR(IBCS) Q:IBSUB2=""
36 . ;
37 . S IBITM=0 F S IBITM=$O(^IBA(363.2,IBXRF,IBITM)) Q:'IBITM D
38 .. ;
39 .. S IBX=$$CPT^ICPTCOD(IBITM,DT) I +$P(IBX,U,7) Q
40 .. S INDT=$P(IBX,U,6) I 'INDT Q
41 .. ;
42 .. S IBEFDT=-9999999 F S IBEFDT=$O(^IBA(363.2,IBXRF,IBITM,IBEFDT)) Q:'IBEFDT D
43 ... S IBCIFN=0 F S IBCIFN=$O(^IBA(363.2,IBXRF,IBITM,IBEFDT,IBCIFN)) Q:'IBCIFN D
44 .... ;
45 .... S IBINDTCI=$$INACTCI^IBCRU4(IBCIFN) I +IBINDTCI,IBINDTCI<INDT Q
46 .... ;
47 .... S IBINDATE=INDT I -IBEFDT>IBINDATE S IBINDATE=-IBEFDT
48 .... I IBINDATE=$P($G(^IBA(363.2,IBCIFN,0)),U,4) Q
49 .... ;
50 .... S IBCNT=IBCNT+1
51 .... I +$G(SAVE) D TMPLN^IBCROI1(IBCIFN,"IBCREC",IBSUB2,1) Q
52 .... D EDITCI^IBCREF(IBCIFN,"","","",IBINDATE)
53 Q IBCNT
54 ;
55DATE(X) ;
56 Q $E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
57 ;
58TMPHDR(CS) ; set up array header for printed report
59 N IBHDR,IBSUB2 S IBSUB2="BILLING RATE",IBHDR="Charges for Inactive CPT's"
60 D TMPHDR^IBCROI1("IBCREC",IBSUB2,0,IBHDR,"1^1")
61 Q IBSUB2
62 ;
63DEV ; get device for printed report
64 S IBQUIT=0 S %ZIS="QM",%ZIS("A")="OUTPUT DEVICE: " D ^%ZIS I POP S IBQUIT=1 Q
65 I $D(IO("Q")) S ZTRTN="RPT^IBCREC",ZTDESC="Charges for Inactive CPT's" D ^%ZTLOAD K IO("Q") S IBQUIT=1
66 Q
67 ;
68RPT ; print report - entry point for tasked jobs
69 N IBSCRPT,IBCNT S IBSCRPT="IBCREC" K ^TMP($J,"IBCREC")
70 S IBCNT=$$INACTCPT(1)
71 I $D(^TMP($J,"IBCREC")) S $P(^TMP($J,"IBCREC"),U,4)=IBCNT_" Charges for Inactive CPT's"
72 G RPT^IBCROI
73 Q
Note: See TracBrowser for help on using the repository browser.