OHDSI Home | Forums | Wiki | Github

ACHILLES HEEL Notification on unmapped source values

@Vojtech_Huser or @Chris_Knoll,

I’m trying to replicate this notification from ACHILLES HEEL:

  • “NOTIFICATION: Count of unmapped source values exceeds threshold in: condition_occurrence”
  • RULE_ID = 34

It gives me a record count but I could not duplicate the record count. I couldn’t figure out in the repository how this notification is being set off.

Here is how I tried to replicate what this is saying but again my count doesn’t match the one given.

SELECT COUNT(DISTINCT CONDITION_SOURCE_VALUE)
FROM CONDITION_OCCURRENCE 
WHERE CONDITION_SOURCE_CONCEPT_ID IN (0, NULL)

Could someone help me understand how the count is generated.

Here’s the code that does the count:

select ‘condition_occurrence’ as table_name,condition_source_value as
source_value, COUNT_BIG(*) as cnt from @cdm_database_schema.
condition_occurrence where condition_concept_id = 0 group by
condition_source_value

https://github.com/OHDSI/Achilles/blob/master/inst/sql/sql_server/Achilles_v5.sql
search for analysis_id 1900

It is counting records that didn’t map to a standard concept (so using
CONDITION_CONCEPT_ID, not CONDITION_SOURCE_CONCEPT_ID as you did in your
code, @ericaVoss).

@Patrick_Ryan,

Then I think we could have better text here then. I would suggest:

NOTIFICATION: Count of source values unmapped to standard concepts exceeds threshold:

If you agree, I’ll log an issue.

I still don’t match the count given by ACHILLES HEEL. I’m assuming I have to put the CNT > 1000 like is found associated to RULE 34.

SELECT * 
FROM (
select 'condition_occurrence' as table_name,
  condition_source_value as source_value, 
    COUNT(*) as cnt 
 from condition_occurrence 
 where condition_concept_id = 0 
 group by condition_source_value
) z
WHERE CNT > 1000

I think I need someone to explain to me how the RULEIDs are getting implemented now, it looks a bit different than before.

Yes, good point. I’m not sure why the CNT>1000 is in there, @Vojtech_Huser
will have to provide the insight there. I suspect the idea is that we are
more interesting in commonly-occurring unmapped codes rather than random
one-offs.

1 Like

The output out of the rule can definitely be modified. It was my best attempt to generate good notification.

CURRENT output is:
NOTIFICATION: Count of unmapped source values

And you suggest
NOTIFICATION: Count of source values unmapped to standard concepts

The rule CSV file has a rule name but also a long rule description field. So we can put several sentences there to make it clear.

I am hoping with the new Heel execution and proding the outputs - J&J would participate in the ongoing DQ2 threshold setting study. :smiley: )

t