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

FBRVU.m

Go to the documentation of this file.
  1. FBRVU ;;WOIFO/SS-RVU UTILITIES ;09-OCT-05
  1. ;;3.5;FEE BASIS;**93**;JAN 30, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;/*
  1. ;Integration Agreement #4799
  1. ;The API to retrieve Work Relative Value Units (RVU)
  1. ;from FeeBasis file #162.97 by CPT code, CPT modifier and a date
  1. ;
  1. ;Input:
  1. ; FBCPT (Required) CPT code, external value
  1. ; FBMOD (Optional) CPT modifier. Can be a string of CPT code specific
  1. ; modifiers delimited by commas.
  1. ; FBDATE (Optional) Exam date/time in FileMan format. If null then today's date
  1. ; becomes the assumed date.
  1. ;
  1. ;Output:
  1. ; returns a string RETSTATUS^VALUE^MESSAGE
  1. ; where
  1. ;
  1. ; If the CPT/CPT+CPT modifier was found for the date or date/time specified then:
  1. ; RETSTATUS = 1,
  1. ; VALUE = (#.03) WORK RELATIVE VALUE UNIT of file #162.97,
  1. ; MESSAGE = null.
  1. ;
  1. ; If the CPT/CPT+CPT modifier was NOT found for the date or date/time specified then:
  1. ; RETSTATUS = 0,
  1. ; VALUE = null,
  1. ; MESSAGE = "CPT/MOD not found"
  1. ;
  1. ; If the date specified in FBDATE is invalid then:
  1. ; RETSTATUS = 0,
  1. ; VALUE = null,
  1. ; MESSAGE = "Valid date not specified"
  1. ;
  1. ; If the CPT modifiers listed in FBMOD cannot be used together
  1. ; to determine correct RVU value then:
  1. ; RETSTATUS = 0,
  1. ; VALUE = null,
  1. ; MESSAGE = "Wrong CPT modifiers combination"
  1. ;
  1. ; If the database is not available at the time of the request then:
  1. ; RETSTATUS = -1,
  1. ; VALUE = null,
  1. ; MESSAGE = "Database Unavailable"
  1. ;
  1. RVU(FBCPT,FBMOD,FBDATE) ;
  1. N FBYEAR,FBCPT0,FBCPTY0
  1. I '$D(^FB(162.97,0)) Q "-1^^Database Unavailable"
  1. I $$CHKMOD($G(FBMOD)) Q "0^^Wrong CPT modifiers combination"
  1. I $G(FBDATE)="" S FBDATE=DT
  1. S FBDATE=$G(FBDATE)\1
  1. I FBDATE'?7N Q "0^^Valid date not specified"
  1. S FBYEAR=$E(FBDATE,1,3)+1700
  1. D PROC^FBAAFSR(FBCPT,$G(FBMOD),FBYEAR,1)
  1. I $G(FBCPT0)="" Q "0^^CPT/MOD not found"
  1. Q "1^"_$P($G(FBCPTY0),U,3)_U
  1. ;
  1. ;check if FBMOD contains any combination of "TC",26 and 53
  1. CHKMOD(FBMODLST) ;
  1. N FBM,FBCNT
  1. S FBCNT=0,FBMODLST=","_FBMODLST_","
  1. F FBM=",TC,",",26,",",53," S:FBMODLST[FBM FBCNT=FBCNT+1
  1. Q FBCNT>1
  1. ;
  1. ;FBRVU