Skip to content

field_fkclass_drug_strength_ingredient_concept_id does not consider "Precise Ingredient" concept_class_id #624

Description

@james-cockayne

Hi,

We've started to see failures today in our OMOP 5.4 database for the new field_fkclass_drug_strength_ingredient_concept_id rule.

Checking the query, it defines violating rules with the following query

SELECT 
    'DRUG_STRENGTH.INGREDIENT_CONCEPT_ID' AS violating_field,
    cdmTable.* 
FROM cdm.DRUG_STRENGTH cdmTable
    LEFT JOIN cdm.concept co
        ON cdmTable.INGREDIENT_CONCEPT_ID = co.concept_id
    
WHERE co.concept_id != 0 
    AND (co.concept_class_id != 'Ingredient') 
/*violatedRowsEnd*/

On inspection of our violated rows, I can see all of our invalid rows refer to Precise Ingredient rather than just Ingredient.

Image

Looking at the 5.4 specification, I think that category probably should be included too

Image

We are using the following vocabularies in our deployment https://answerdigital.github.io/oxford-omop-data-mapper/docs/database-setup.html

I had a quick look at the code to see if I could put a PR in for you, but it seems to be templated code and I'm not quite sure in which way you would want to alter it. We might need another field_fk_class.sql that supports a collection of allowed classes.

James

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions