Senin, 14 Desember 2015

[MS_AccessPros] Diagnosis searching off charge table

 

I have a table that I created that identifies ICD codes by the diagnosis (ie code E11 had  a1 in the Diabetes column,

then a table of charges (not created by me created by EMR company) on that table are 4 columns that could have the codes that would be a diabetic code


I created a query to sort out the charges so only the medical charges would show up (we have other programs)

that table I called dbo_charges_medical_dups_3mos (for whatever reason a person for a particular visit could have two lines of codes for the same visit date -so dups is there for my mind)

So I have linked the Diagnosis table I created to the dbo_charges_medical_dups_3mos, but I can't seem to figure out how I can pull all the patients that could have a diabestes code in one of 4 columns, I have written it to get those with the first column but I can't seem to figure out how to get the other 3 columns. I also would like to see the patient show up only once no matter the number of times that they may have had a visit that included a diabetic code if that is at all possible.

here is my code so far:

SELECT [dbo_charges_Medical_dups_3 mos].person_id, [dbo_charges_Medical_dups_3 mos].person_nbr, [dbo_charges_Medical_dups_3 mos].last_name, [dbo_charges_Medical_dups_3 mos].first_name, [dbo_charges_Medical_dups_3 mos].date_of_birth, [dbo_charges_Medical_dups_3 mos].create_timestamp, [dbo_charges_Medical_dups_3 mos].location_name, [Diagnosis Table].Diabetes, [dbo_charges_Medical_dups_3 mos].icd9cm_code_id, [dbo_charges_Medical_dups_3 mos].icd9cm_code_id_2, [dbo_charges_Medical_dups_3 mos].icd9cm_code_id_3, [dbo_charges_Medical_dups_3 mos].icd9cm_code_id_4
FROM [Diagnosis Table] INNER JOIN [dbo_charges_Medical_dups_3 mos] ON [Diagnosis Table].Code = [dbo_charges_Medical_dups_3 mos].icd9cm_code_id
WHERE ((([Diagnosis Table].Diabetes) Is Not Null));


I know someone is able to give me a hand on this, I am hoping I have described the situation clearly enough for you if not please reply and I will answer any questions.

thank you so much

Patty



__._,_.___

Posted by: pattykf@cox.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar