Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to modify existing report to include ICD10 Medical Codes 2

Status
Not open for further replies.

808Ruben

Technical User
Dec 29, 2015
3
US
We run a report that pulls claims with specific medical codes. The AMA has changed codes to the new ICD10 codes. The previous ICD9 codes were all digits XXX.XX (3 digits dot 2 digits). The ICD10 Codes all begin with a letter followed by 2 digits, dot, the 1,2,or3 digits (AXX.X,AXX.XX,or AXX.XXX). I want to pull the claims with specific AXX codes whether they have 1,2 or 3 digits following it. Here is 2 examples of formulas currently used, one is specific and one is a range.

(VAL({CLAIM_DIAGS_VS.DIAG}) = 042.00) or
(VAL({CLAIM_DIAGS_VS.DIAG}) >= 070.00 and VAL({CLAIM_DIAGS_VS.DIAG}) <= 070.99) or

When I try using the same line but using an alpha character
(VAL({CLAIM_DIAGS_VS.DIAG}) = A40.00)
I get this: "A number, currency amount, boolean, data, time, date-time, or string is expected here."

I am looking for a way to just add 1 line to pull all claims starting with the first 3 characters in the code regardless of how many digits follow (1,2 or 3)

 
Regarding the error, try
[tt]VAL({CLAIM_DIAGS_VS.DIAG}) = "A40.00"[/tt]

To pull all claims with the first 3 characters A40, try
[tt]VAL({CLAIM_DIAGS_VS.DIAG}) startswith "A40."[/tt]
 
Thank you. I was planning on trying that, glad to know I was on the right track. However whenever I add an alpha such as:
(VAL({RV_CLAIM_DETAILS.DIAGCODE}) startswith "A40.”) or
I get the error "A number, currency amount, boolean, data, time, date-time, or string is expected here.". If I save it anyway and run it will it work?
 
not sure hwy the VAL is being used.
try without it
{CLAIM_DIAGS_VS.DIAG} startswith "A40."

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
I dont have data to test against but maybe this would work if you need to find ranges other than 0 through 99. otherwise the above will work without the VAL


Code:
split({CLAIM_DIAGS_VS.DIAG},".")[1] = "A40"
and
val(split({CLAIM_DIAGS_VS.DIAG},".")[2]) in [50 to 99]


_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
Sorry, I missed the VAL function in the statement. CoSpringsGuy is right, you do not need the VAL function.

The Val function reads a string containing numbers and converts them to a decimal value. Val stops reading the string when it finds the first character in the string that it finds that it cannot recognize as a number or as a space. It is used to extract only the numeric portion of a string that contains both numbers and text.


 
Thank you both very much. It was still not working but then I found the problem in the suppression. It is fixed now and working. Here is what I used:
{CLAIM_DIAGS_VS.DIAG} startswith "A40"

Now I have another question. Some of the codes are in a range such as B15 -­ B19 so I would need all codes starting with B15, B16, B17, B18 & B19. Is there a way to do a range or should I just put in a line for each?
 
Here is one way to do a range:
{CLAIM_DIAGS_VS.DIAG} [ 1 to 3 ] in "B15" to "B19"

or this way:
{CLAIM_DIAGS_VS.DIAG} in "B15" to "B19z"


Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top