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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1IB20P367 ;DAY/RRA - DSS CLINIC STOP CODES IB*2.0*367 PRE-INIT ; 3/13/07 12:55pm
2 ;;2.0;INTEGRATED BILLING;**367**;21-MAR-94;Build 11
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5EN ;
6 N IBEFFDT,U
7 S U="^",IBEFFDT=3041001 ;effective date OCT 1st, 2004
8 D START,ADD(IBEFFDT),UPDATE(IBEFFDT),FINISH
9 Q
10 ;
11START D BMES^XPDUTL("DSS Clinic Stop Codes, Post-Install Starting")
12 Q
13 ;
14FINISH D BMES^XPDUTL("DSS Clinic Stop Codes, Post-Install Complete")
15 Q
16 ;
17 ;
18ADD(IBEFFDT) ;
19 ;add a new code
20 N Y,IBC,IBT,IBX,IBY,IBCODE,IBTYPE,IBDES,IBOVER
21 D BMES^XPDUTL(" Adding new codes to file 352.5")
22 S IBC=0
23 F IBX=1:1 S IBT=$P($T(NCODE+IBX),";",3) Q:'$L(IBT) D
24 . S IBCODE=+$P(IBT,U)
25 . S IBY=$S(IBCODE=130:3070308,IBCODE=131:3070308,IBCODE=352:3070308,1:IBEFFDT)
26 . I $D(^IBE(352.5,"AEFFDT",IBCODE,-IBY)) D Q
27 . . D BMES^XPDUTL(" Duplication of stop code "_IBCODE)
28 . S IBTYPE=$P(IBT,U,2)
29 . S IBDES=$E($P(IBT,U,3),1,30)
30 . S IBOVER=$P(IBT,U,4)
31 . S Y=+$$ADD3525(IBCODE,IBY,IBTYPE,IBDES,IBOVER) S:Y>0 IBC=IBC+1
32 D BMES^XPDUTL(" "_IBC_$S(IBC<2:" entry",1:" entries")_" added to 352.5")
33 Q
34 ;
35UPDATE(IBEFFDT) ;
36 ;update an old code
37 N Y,IB1,IBC,IBT,IBX,IBCODE,IBMSG,IBTYPE,IBDES,IBOVER,IBLSTDT
38 S (IBC,IBMSG(1),IBMSG(2),IBMSG(3))=0
39 F IBX=1:1 S IBT=$P($T(OCODE+IBX),";",3) Q:'$L(IBT) D
40 . S IBCODE=+$P(IBT,U)
41 . S IBY=$S(IBCODE=528:3070308,IBCODE=681:3070308,1:IBEFFDT)
42 . I $D(^IBE(352.5,"AEFFDT",IBCODE,-IBY)) D Q
43 . . D BMES^XPDUTL(" Duplication of stop code "_IBCODE)
44 . S IBLSTDT=$O(^IBE(352.5,"AEFFDT",IBCODE,-9999999))
45 . I +IBLSTDT=0 D Q
46 . . D BMES^XPDUTL(" Code "_IBCODE_" not found in file 352.5")
47 . S IB1=$O(^IBE(352.5,"AEFFDT",IBCODE,IBLSTDT,0))
48 . S IB1=$G(^IBE(352.5,IB1,0))
49 . S IBTYPE=$S($P(IBT,U,2):$P(IBT,U,2),1:$P(IB1,U,3))
50 . S IBDES=$S($P(IBT,U,3)'="":$E($P(IBT,U,3),1,30),1:$P(IB1,U,4))
51 . S IBOVER=$S($P(IBT,U,4)'="":$P(IBT,U,4),1:$P(IB1,U,5))
52 . I $P(IBT,U,2) D
53 . . I 'IBMSG(1) D BMES^XPDUTL(" Updating billable type in file 352.5") S IBMSG(1)=1
54 . I $P(IBT,U,3)'="" D
55 . . I 'IBMSG(2),$P(IBT,U,3)'="" D BMES^XPDUTL(" Updating description in file 352.5") S IBMSG(2)=1
56 . I '$P(IBT,U,2),$P(IBT,U,3)="" D
57 . . I 'IBMSG(3) D BMES^XPDUTL(" Updating effective date in file 352.5") S IBMSG(3)=1
58 . S Y=+$$ADD3525(IBCODE,IBY,IBTYPE,IBDES,IBOVER) S:Y>0 IBC=IBC+1
59 D BMES^XPDUTL(" "_IBC_$S(IBC<2:" update",1:" updates")_" added to file 352.5")
60 Q
61 ;
62ADD3525(IBCODE,IBEFFDT,IBTYPE,IBDES,IBOVER) ;
63 ;add a new entry
64 D BMES^XPDUTL(" "_IBCODE_" "_IBDES)
65 N IBIENS,IBFDA,IBER,IBRET
66 S IBRET=""
67 S IBIENS="+1,"
68 S IBFDA(352.5,IBIENS,.01)=IBCODE
69 S IBFDA(352.5,IBIENS,.02)=IBEFFDT
70 S IBFDA(352.5,IBIENS,.03)=IBTYPE
71 S IBFDA(352.5,IBIENS,.04)=IBDES
72 S:IBOVER IBFDA(352.5,IBIENS,.05)=1
73 D UPDATE^DIE("","IBFDA","IBRET","IBER")
74 I $D(IBER) D BMES^XPDUTL(IBER("DIERR",1,"TEXT",1))
75 Q $G(IBRET(1))
76 ;
77 ;new non-billable type data
78NCODE ;;code^billable type^description^override flag
79 ;;130^2^EMERGENCY DEPT
80 ;;131^1^URGENT CARE UNIT
81 ;;222^0^PM&RS CWT/SE FACE TO FACE^1
82 ;;223^0^PM&RS CWT/SE NON FACE TO FACE^1
83 ;;228^0^PM&RS CWT/TWE NON FACE TO FACE^1
84 ;;336^0^MED PRE-PROC EVAL^1
85 ;;352^2^GRECC CLINICAL DEMO
86 ;;568^0^MH CWT/SE FACE TO FACE^1
87 ;;569^0^MH CWT/SE NON FACE TO FACE^1
88 ;;570^0^MH CWT/TWE NON FACE TO FACE^1
89 ;;643^0^SND-OUT PROC - RADIOLOGY^1
90 ;;658^0^STATE HOME ADULT DAY HC^1
91 ;
92 ; ;codes update
93OCODE ;;code^billable type^description^override flag
94 ;;528^^TELEPHONE HCMI
95 ;;681^^VA-PAID HCBC PROVIDERS
96 ;
Note: See TracBrowser for help on using the repository browser.