source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBRVU.m@ 1147

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

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1FBRVU ;;WOIFO/SS-RVU UTILITIES ;09-OCT-05
2 ;;3.5;FEE BASIS;**93**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;/*
6 ;Integration Agreement #4799
7 ;The API to retrieve Work Relative Value Units (RVU)
8 ;from FeeBasis file #162.97 by CPT code, CPT modifier and a date
9 ;
10 ;Input:
11 ; FBCPT (Required) CPT code, external value
12 ; FBMOD (Optional) CPT modifier. Can be a string of CPT code specific
13 ; modifiers delimited by commas.
14 ; FBDATE (Optional) Exam date/time in FileMan format. If null then today's date
15 ; becomes the assumed date.
16 ;
17 ;Output:
18 ; returns a string RETSTATUS^VALUE^MESSAGE
19 ; where
20 ;
21 ; If the CPT/CPT+CPT modifier was found for the date or date/time specified then:
22 ; RETSTATUS = 1,
23 ; VALUE = (#.03) WORK RELATIVE VALUE UNIT of file #162.97,
24 ; MESSAGE = null.
25 ;
26 ; If the CPT/CPT+CPT modifier was NOT found for the date or date/time specified then:
27 ; RETSTATUS = 0,
28 ; VALUE = null,
29 ; MESSAGE = "CPT/MOD not found"
30 ;
31 ; If the date specified in FBDATE is invalid then:
32 ; RETSTATUS = 0,
33 ; VALUE = null,
34 ; MESSAGE = "Valid date not specified"
35 ;
36 ; If the CPT modifiers listed in FBMOD cannot be used together
37 ; to determine correct RVU value then:
38 ; RETSTATUS = 0,
39 ; VALUE = null,
40 ; MESSAGE = "Wrong CPT modifiers combination"
41 ;
42 ; If the database is not available at the time of the request then:
43 ; RETSTATUS = -1,
44 ; VALUE = null,
45 ; MESSAGE = "Database Unavailable"
46 ;
47RVU(FBCPT,FBMOD,FBDATE) ;
48 N FBYEAR,FBCPT0,FBCPTY0
49 I '$D(^FB(162.97,0)) Q "-1^^Database Unavailable"
50 I $$CHKMOD($G(FBMOD)) Q "0^^Wrong CPT modifiers combination"
51 I $G(FBDATE)="" S FBDATE=DT
52 S FBDATE=$G(FBDATE)\1
53 I FBDATE'?7N Q "0^^Valid date not specified"
54 S FBYEAR=$E(FBDATE,1,3)+1700
55 D PROC^FBAAFSR(FBCPT,$G(FBMOD),FBYEAR,1)
56 I $G(FBCPT0)="" Q "0^^CPT/MOD not found"
57 Q "1^"_$P($G(FBCPTY0),U,3)_U
58 ;
59 ;check if FBMOD contains any combination of "TC",26 and 53
60CHKMOD(FBMODLST) ;
61 N FBM,FBCNT
62 S FBCNT=0,FBMODLST=","_FBMODLST_","
63 F FBM=",TC,",",26,",",53," S:FBMODLST[FBM FBCNT=FBCNT+1
64 Q FBCNT>1
65 ;
66 ;FBRVU
Note: See TracBrowser for help on using the repository browser.