I need to run a report to show all patients for whom the "Release Pt Info" field in Registration (on the "Additional" tab) is set to "Informed consent to release medical information for conditions or diagnoses regulated by federal statutes." Medicare claims are being rejected when this option is selected.
I know this field is located in the medlist table, under a table name 'ReleaseofInformationIndicator'.
Running this SQL query:
select * from medlists
Where tablename = 'ReleaseofInformationIndicator'
shows that the MedListID is 267, but I'm not sure what other tables to link in order to find the list of patients that correspond to this ID.
Any help would be greatly appreciated.
Thanks!
You could get this list by doing this
SELECT *
FROM PatientProfile pp
JOIN MedLists med ON pp.ReleaseOfInformationIndicatorMId = med.MedListsId
WHERE med.Description = 'Informed consent to release medical information for conditions or diagnoses regulated by federal statutes'
Or, since you already have the ID for me, you could go ahead and plug that in (just in case the wording is different on your database)
SELECT *
FROM PatientProfile pp
JOIN MedLists med ON pp.ReleaseOfInformationIndicatorMId = med.MedListsId
WHERE med.MedListsId = 267
This worked perfectly. THANKS!
mikeseale said:
Or, since you already have the ID for me, you could go ahead and plug that in (just in case the wording is different on your database)
SELECT *
FROM PatientProfile pp
JOIN MedLists med ON pp.ReleaseOfInformationIndicatorMId = med.MedListsId
WHERE med.MedListsId = 267
That's one join too many for this situation -- while SQL will probably optimize it out, you should just do
SELECT *
FROM PatientProfile pp
WHERE pp.MedListsId = 267
However, I do recommend the first query, so you can maintain it once you forget what 267 means. 🙂