OHDSI Home | Forums | Wiki | Github

RC, DRC, PC and DPC showing up with zero values in Atlas

Hi everyone,

Hope you are well.

We are having some issues with the displays under the concept sets section in Atlas. The values under RC and DRC are showing up as zero.

Looking at the underlying data in the database this is the values.

Any ideas on why the values might not be coming through?

Many thanks,
Solmaz

There is a cache of that data in the WebAPI database called ‘cdm_cache’. It is possible that it cached zeros there for some reason, and that’s why. Could you query that concept_id from webapi.cdm_cache and let me know what values are in that table?

If it is zero, then what you can do is truncate the table (cdm_cache), and it will re-fetch the data from the results.achilles_result_concept_count table in your results schema.

Thanks @Chris_Knoll,

This is the results we got when quering the table:

postgres=# select count(*) from webapi.cdm_cache;
 count 
-------
   100
(1 row)
postgres=# select count(*) from webapi.cdm_cache where record_count = 0 and descendant_record_count = 0 and person_count = 0 and descendant_person_count = 0;
 count 
-------
   100
(1 row)
postgres=# select * from webapi.cdm_cache order by id desc limit 5;
 id  | concept_id | source_id | record_count | descendant_record_count | person_count | descendant_person_count 
-----+------------+-----------+--------------+-------------------------+--------------+-------------------------
 100 |       9202 |         6 |            0 |                       0 |            0 |                       0
  99 |       8949 |         6 |            0 |                       0 |            0 |                       0
  98 |       8947 |         6 |            0 |                       0 |            0 |                       0
  97 |       8941 |         6 |            0 |                       0 |            0 |                       0
  96 |   38003620 |         6 |            0 |                       0 |            0 |                       0
(5 rows)
postgres=# \d webapi.cdm_cache
                                       Table "webapi.cdm_cache"
         Column          |  Type   | Collation | Nullable |                  Default                  
-------------------------+---------+-----------+----------+-------------------------------------------
 id                      | bigint  |           | not null | nextval('webapi.cdm_cache_seq'::regclass)
 concept_id              | integer |           | not null | 
 source_id               | integer |           | not null | 
 record_count            | bigint  |           |          | 
 descendant_record_count | bigint  |           |          | 
 person_count            | bigint  |           |          | 
 descendant_person_count | bigint  |           |          | 
Indexes:
    "cdm_cache_pk" PRIMARY KEY, btree (id)
    "cdm_cache_concept_id_idx" btree (concept_id, source_id)
    "cdm_cache_un" UNIQUE CONSTRAINT, btree (concept_id, source_id)
Foreign-key constraints:
    "cdm_cache_fk" FOREIGN KEY (source_id) REFERENCES webapi.source(source_id) ON DELETE CASCADE

Truncaitng the table gives

postgres=# truncate webapi.cdm_cache;
TRUNCATE TABLE
postgres=# select count(*) from webapi.cdm_cache;
 count 
-------
     0
(1 row)

Will update when we have a resolution. Thanks for your help!

Thanks, please do! But that explains why you got zeros (the cache says zero), what’s odd is only 100 records was found in the cache table at first…but once you truncate and run the record count query via the UI again, it should re-load the data in the cache.

t