--Metastatic solid tumor
INSERT INTO scratch_ddymshyt.charlson_scoring (
diag_category_id,
diag_category_name,
weight
)
VALUES (
16,
'Metastatic solid tumor',
6
);
INSERT INTO scratch_ddymshyt.charlson_concepts (
diag_category_id,
concept_id
)
SELECT 16,
descendant_concept_id
FROM cdm_optum_ehr_v3323.concept_ancestor
WHERE ancestor_concept_id IN (36769180); -- Metastasis - looks into measurement table then
this concept_id is the new one that we have to use now in the definition.
And use measurement table to get it