By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,084 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,084 IT Pros & Developers. It's quick & easy.

Matching Records with user definable criteria.

P: n/a
I have a query where I defined three fields must match - Physician, Date
of Service and Claim#. No problem. Now I need to add parameters that
allow a user to define a 4th field= Procedure Codes. After typing in
2-5 different procedure codes will only want to see records where those
procedure codes occur on the same day, same doctor and same claim. Any
help would be greatly appreciated. Thank You.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
I'm not quite sure I fully understand your problem.. but what are you
doing this for, what platforms? and are you only going to be using SQL ?

Nov 13 '05 #2

P: n/a
It is in Access 2003, thus far I utilized SQL

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #3

P: n/a
What is the problem with continuing on with what you were doing and
matching up the new param's using SQL ? is it because it's 2-5 of them
and varying?

Nov 13 '05 #4

P: n/a
Each time I add my parameters to the SQL it appears to override the
matching portion. If a user types in procedure codes 1,2,3, these codes
will appear, but not for the same day, physician and claim#.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #5

P: n/a
Lets see the SQL statement

Nov 13 '05 #6

P: n/a
SELECT [Medical Detail].[Claim Number], [Medical Detail].[First Service
Date], [Medical Detail].[Servicing Provider Name], [Medical
Detail].[Servicing Provider Number], [Medical Detail].[Procedure Code],
[Medical Detail].[IW First Name], [Medical Detail].[IW Last Name],
[Medical Detail].[IW SSN], [Medical Detail].[Procedure Code
Description], [Medical Detail].[Invoice Number], [Medical Detail].[BWC
Authorized To Be Paid Amount]
FROM [Medical Detail]
WHERE ((([Medical Detail].[Claim Number]) In (SELECT [Claim Number] FROM
[Medical Detail] As Tmp GROUP BY [Claim Number],[Servicing Provider
Number],[First Service Date] HAVING Count(*)>1 And [Servicing Provider
Number] = [Medical Detail].[Servicing Provider Number] And [First
Service Date] = [Medical Detail].[First Service Date])) AND (([Enter
Code:])=[Procedure Code])) OR ((([Medical Detail].[Claim Number]) In
(SELECT [Claim Number] FROM [Medical Detail] As Tmp GROUP BY [Claim
Number],[Servicing Provider Number],[First Service Date] HAVING
Count(*)>1 And [Servicing Provider Number] = [Medical
Detail].[Servicing Provider Number] And [First Service Date] = [Medical
Detail].[First Service Date])) AND (([Enter Code 2:])=[Procedure Code]))
ORDER BY [Medical Detail].[First Service Date], [Medical Detail].[IW
SSN];


*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.