Hi @Ajit_Londhe
We have some relatively simple custom features that we’re trying to implement into the Characterization part of ATLAS. Can you please let us know where we could find SQL to do the following (or similar enough that we could adapt it):
- Most common drugs (by ingredient) within 30d, 90d, 180d, 365d before index, including prevalence and min, max, median, Q25, Q75 for dose.
- Most common drugs (by ingredient) within 30d, 90d, 180d, 365d after index, including prevalence and min, max, median, Q25, Q75 for dose.
- Most common drugs (by drug category) within 30d, 90d, 180d, 365d before index, including prevalence.
- Most common drugs (by drug category) within 30d, 90d, 180d, 365d after index, including prevalence.
- Most common diagnoses (by lowest level code) within 30d, 90d, 180d, 365d before index, including prevalence.
- Most common diagnoses (by lowest level code) within 30d, 90d, 180d, 365d after index, including prevalence.
- Most common diagnoses (by second from lowest level code) within 30d, 90d, 180d, 365d before index, including prevalence.
- Most common diagnoses (by second from lowest level code) within 30d, 90d, 180d, 365d after index, including prevalence.
- Most common tests (by lowest level code) within 30d, 90d, 180d, 365d before index, including prevalence.
- Most common tests (by lowest level code) within 30d, 90d, 180d, 365d after index, including prevalence.
- Most common tests (by second from lowest level code) within 30d, 90d, 180d, 365d before index, including prevalence.
- Most common tests (by second from lowest level code) within 30d, 90d, 180d, 365d after index, including prevalence.