I have a query that is pulling the Nurse Care Manager interventions. I thought I was all set but noticed that the Modified date is updating a number of times during her data entry. what I would like is the query to return the one entry per type (ncm Intervention) per date (intervention date). (there are a number of types not sure if the query would need to pull the individual types first then reduce the duplicates or it could be done with all the interventions)
I am just not sure how to do that.
this is what the ugly query looks like a the moment:
SELECT Person_filter_New.person_nbr, Person_filter_New.last_name, Person_filter_New.first_name, dbo_person.date_of_birth, dbo_ncm_intervention_dm_.intervention_type, dbo_ncm_intervention_dm_.intervention_date, dbo_ncm_intervention_dm_.modify_timestamp, Person_filter_New.insurance1, Person_filter_New.insurance2, Person_filter_New.PCP_DBP, Person_filter_New.person_id, dbo_ncm_intervention_dm_.create_timestamp, dbo_ncm_intervention_dm_.action_1, dbo_ncm_intervention_dm_.action_2, dbo_ncm_intervention_dm_.action_4, dbo_wo_NCM_main_.active_date, dbo_wo_NCM_main_.inactive_date, dbo_wo_NCM_main_.NCM_Name, dbo_wo_NCM_main_.complex_pt, dbo_wo_NCM_main_.NHP_High_Cost, dbo_wo_NCM_main_.ins_complex_type, dbo_wo_NCM_main_.current_care
FROM ((dbo_wo_NCM_main_ LEFT JOIN dbo_ncm_intervention_dm_ ON dbo_wo_NCM_main_.person_id = dbo_ncm_intervention_dm_.person_id) LEFT JOIN Person_filter_New ON dbo_wo_NCM_main_.person_id = Person_filter_New.person_id) LEFT JOIN dbo_person ON dbo_wo_NCM_main_.person_id = dbo_person.person_id
WHERE (((dbo_ncm_intervention_dm_.modify_timestamp)>#10/1/2014# And (dbo_ncm_intervention_dm_.modify_timestamp)<#4/1/2015#));
As always I am grateful for your assistance,
John I am sure some of this will look familiar to you, I keep trying to work the data better.
thank you
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