Long story short: I work in healthcare, and I need to be able to identify when a patient has had two billing codes that cannot be used together entered together. I was originally trying to set this up in Excel, but Excel can't handle the amount of data I'm working with.
I have two queries that were automatically generated via the analyze table wizard. The first one contains the patients' names, which facility the patient is in, and which billing codes have been entered for that patient. The other query contains two columns with pairs of billing codes that cannot be billed together for one patient.
My objective is to build a query that checks to see if the patient and facility names match, then checks the billing codes to see if any of them are not able to be billed together.
Here's what the Patient/Facility/Code query looks like (with dummy information):
ID Lookup to Facility Facility Lookup to Patient Names Patient Lookup to ICD-10 Codes Code 1 Facility 1 Facility 1 Patient 1 Patient 1 F41.9 F41.9 2 Facility 1 Facility 1 Patient 1 Patient 1 R25.2 R25.2 3 Facility 1 Facility 1 Patient 1 Patient 1 R25.3 R25.3 4 Facility 1 Facility 1 Patient 1 Patient 1 F32.9 F32.9 5 Facility 2 Facility 2 Patient 2 Patient 2 I63.9 I63.9 6 Facility 2 Facility 2 Patient 2 Patient 2 S72.141D S72.141D 7 Facility 2 Facility 2 Patient 2 Patient 2 I69.391 I69.391 8 Facility 2 Facility 2 Patient 2 Patient 2 R13.12 R13.12 9 Facility 2 Facility 2 Patient 2 Patient 2 I10 I10
And here's what the query that identifies codes that can't be billed together looks like:
ID
Lookup to Main Codes
Main Code
Excluded Codes
1
A41.9
A41.9
A40.0
2
A41.9
A41.9
A40.1
3
A41.9
A41.9
A40.3
4
A41.9
A41.9
A40.8
5
A41.9
A41.9
A40.9
6
A41.9
A41.9
R78.81
Any thoughts?
Thank you!