Returns the distrubition of the physican's speciality who diagnosed a certian condition.
Sample query run:
The following is a sample run of the query to run a search for specific gender concept ID. The input parameters are highlighted in blue.
select concept_name as speciality, speciality_freq
select specialty_concept_id, count(*)
from (select *
from (select associated_provider_id from mslr_cdm4.condition_occurrence where condition_concept_id in (31967) and associated_provider_id is not null) as from_cond
left join (select provider_id, specialty_concept_id from mslr_cdm4.provider) as from_prov
group by specialty_concept_id
order by speciality_freq
) as spec_id_count
left join (select concept_id, concept_name from vocabulary.concept) as spec_concept
order by speciality_freq desc;
Output field list:
|speciality_freq||Frequancy of the speciality|
Sample output record: