Viewing 15 posts - 46 through 60 (of 66 total)
Got it! I added two more Derived tables to flatten the data out. Went from 4 records to 2
select C.MRN,
C.FirstName,
...
July 15, 2015 at 9:04 am
Got it! I added two derived tables to the query to flatten it out. Seemed to do the trick:
select C.MRN,
C.FirstName,
...
July 15, 2015 at 9:03 am
Unfortunately it's patient data, so I can't give you real data. Would the actual query help?
July 15, 2015 at 7:36 am
That looks great. How did you do that? Can you paste the query here?
July 14, 2015 at 10:23 pm
Pietlinden...I couldn't get the file to open in SQL Server. It's a "me" problem. Can you give a snapshot of the results?
July 14, 2015 at 8:53 pm
I think the issue is the requestor wants the insurance and fill date listed...so, you end up with 4 records. For example..
Name ...
July 14, 2015 at 6:11 pm
Pietlinden, for some reason I can't open the attachment
July 14, 2015 at 6:02 pm
Mohamed, that is alot cleaner! Thanks. It's been a while since I wrote SQL. I'm still getting the $5 copay on all 4 records...do I try the...
July 14, 2015 at 5:38 pm
I pretty much duplicated the original query and made them derived tables. One is pulling the specific Insurance and the other is any insurance for that Medication...And then joined...
July 14, 2015 at 5:02 pm
Pietlinden, isn't CoPay already in the Group By of Table A? Sorry, I'm a little confused
July 14, 2015 at 4:55 pm
Sorry, Mohammed....I removed the person's birthday and put in a fake birthday...when I drug it down it changed for each line.
July 14, 2015 at 4:39 pm
Is there a way to attach an excel file? My results example would probably display cleaner
July 14, 2015 at 4:36 pm
select distinct A.*
from
(select
HR.MRN MRN
,HR.FIRST_NAME FirstName
,HR.LAST_NAME LastName
...
July 14, 2015 at 4:35 pm
That data in the post is actually sample data. I removed name, etc.
July 14, 2015 at 4:21 pm
Ok, I got it figured out. But, here's what I'm running into...I have what each Insurance is paying...but the patient co pay is displaying for each record. For example:
MRNFirstNameLastNameDate_of_BirthDate_Filled...
July 14, 2015 at 2:45 pm
Viewing 15 posts - 46 through 60 (of 66 total)