To be more precise: I think what you are showing is a discrepancy between Achilles and CohortDiagnostics because Atlas is just presenting the results from the Achilles package. I’m not sure if CohortDiagnostics uses its own implementation to calculate concept counts.
For your refrence, the Achilles analysis specification for the person count by concept_id for conditions is defined here, and the implementation of the anlaysis is here.
Since it is simple and small i’ll paste it here:
-- 400 Number of persons with at least one condition occurrence, by condition_concept_id
--HINT DISTRIBUTE_ON_KEY(stratum_1)
SELECT
400 AS analysis_id,
CAST(co.condition_concept_id AS VARCHAR(255)) AS stratum_1,
CAST(NULL AS VARCHAR(255)) AS stratum_2,
CAST(NULL AS VARCHAR(255)) AS stratum_3,
CAST(NULL AS VARCHAR(255)) AS stratum_4,
CAST(NULL AS VARCHAR(255)) AS stratum_5,
COUNT_BIG(DISTINCT co.person_id) AS count_value
INTO @scratchDatabaseSchema@schemaDelim@tempAchillesPrefix_400
FROM @cdmDatabaseSchema.condition_occurrence co
JOIN @cdmDatabaseSchema.observation_period op ON co.person_id = op.person_id
AND co.condition_start_date >= op.observation_period_start_date
AND co.condition_start_date <= op.observation_period_end_date
GROUP BY co.condition_concept_id;
One thing that immediately jumps out is that Achilles is only using records that are found within an observation period (see join on observation_period). This makes sense because Achilles is trying to report on events that could be used for cohort entry events. I’m not sure if CohortDiagnostics is applying the same rule.
Edit:
Looking at this further, my explanation above would lead to a lower count in Atlas vs. Cohort Diagnostics, vs what you are seeing which is a higher count in Atlas. The only thing I can think of here is that Atlas is showing the entire database (via Achilles) and possibly the cohort you are viewing in Cohort Diagnostics is a subset of the database population (which would mean CD will show you a lower count than in Achilles).