LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default ICD9 Code Evaluation Function - an example

no question here, just a health care related function for the archive

Function ICD9CodeEval(ICD9Code As Variant) As String

'Evaluates ICD9 code and assigns the ICD9 code to corresponding group
'Example of using a variant declaration in a function that evaluates
'both numberics and text as well as the ranges of both numerics and
'text
On Error Resume Next

Select Case ICD9Code
Case "001"
ICD9CodeEval = "Infectious & Parasitic Diseases"
Case 1 To 139.9
ICD9CodeEval = "Infectious & Parasitic Diseases"
Case 140 To 239.9
ICD9CodeEval = "Neoplasms"
Case 240 To 279.9
ICD9CodeEval = "Endocrine, Nutritional, Metabolic, Immunity"
Case 280 To 289.9
ICD9CodeEval = "Blook and Blood Forming Organs"
Case 290 To 319.9
ICD9CodeEval = "Mental Disorders"
Case 320 To 389.9
ICD9CodeEval = "Nervous System & Sense Organs"
Case 390 To 459.9
ICD9CodeEval = "Circulatory System"
Case 460 To 519.9
ICD9CodeEval = "Respiratory System"
Case 520 To 579.9
ICD9CodeEval = "Digestive System"
Case 580 To 629.9
ICD9CodeEval = "Genitourinary System"
Case 630 To 677.9
ICD9CodeEval = "Complications of Pregnancy, Childbirth & the puerperium"
Case 680 To 709.9
ICD9CodeEval = "Skin & Subcutaneous Tissue"
Case 710 To 739.9
ICD9CodeEval = "Musculoskeletal System & Connective Tissue"
Case 740 To 759.9
ICD9CodeEval = "Congenital Anomalies"
Case 760 To 779.9
ICD9CodeEval = "Conditions in the Perinatal Period"
Case 780 To 799.9
ICD9CodeEval = "Symptoms, Signs & ill-defined conditions"
Case 800 To 999.9
ICD9CodeEval = "Injury & Poisoning"
Case "V01" To "V06.9"
ICD9CodeEval = "Communicable Diseases"
Case "V07" To "V09.9"
ICD9CodeEval = "Need for Isolation, Oth Potential Health Hazards"
Case "V10" To "V19.9"
ICD9CodeEval = "Hlth Hazards related to Personal & Family History"
Case "V20" To "V29.9"
ICD9CodeEval = "Hlth Srvces related to Reproduction & Development"
Case "V30" To "V39.9"
ICD9CodeEval = "Liveborn Infants According to Type of Birth"
Case "V40" To "V49.9"
ICD9CodeEval = "Condition Influencing Health Status"
Case "V50" To "V59.9"
ICD9CodeEval = "Services for Specific Procedures & Aftercare"
Case "V60" To "V68.9"
ICD9CodeEval = "Other Circumstances"
Case "V70" To "V83.9"
ICD9CodeEval = "General"

'If the ICD9 code isn't one of the above listed, function
'returns nothing
Case Else
ICD9CodeEval = ""

End Select
End Function
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula evaluation Edward New Users to Excel 2 March 31st 09 01:31 PM
Excel Function - Date evaluation bigbird98 Excel Worksheet Functions 2 July 23rd 08 08:27 PM
Continuous Evaluation of Time Function NOW() ?? monir Excel Worksheet Functions 1 March 4th 08 09:40 AM
Automatic evaluation of custom worksheet function Jim Excel Worksheet Functions 1 November 6th 06 10:23 PM
Options Evaluation Michael G. Excel Worksheet Functions 0 January 28th 05 05:41 PM


All times are GMT +1. The time now is 05:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"