ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ICD9 Code Evaluation Function - an example (https://www.excelbanter.com/excel-programming/305575-icd9-code-evaluation-function-example.html)

DataFreakFromUtah

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


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com