inspectomop.queries.condition.disease_causing_agents_for_keyword

inspectomop.queries.condition.disease_causing_agents_for_keyword(keyword, inspector, return_columns=None)

Retrieves disease causing agents by keyword. The concept_class_id can be any of: ‘Pharmaceutical / biologic product’, ‘Physical object’, ‘Special concept’, ‘Event’, ‘Physical force’, or ‘Substance’.

Results of queries from disease_causing_agents_for_keyword() and pathogen_concept_for_keyword() can be used to search for conditions caused by the offending pathogens/agents using conditions_caused_by_pathogen_or_causative_agent_concept_id()

Parameters:
  • keyword (str) – search string. ex ‘Radiation’
  • inspector (inspectomop.inspector.Inspector) –
  • return_columns (list of str, optional) –
    • optional subset of columns to return from the query
    • columns : [‘concept_id’, ‘concept_name’, ‘concept_code’, ‘concept_class_id’, ‘standard_concept’, ‘vocabulary_id’, ‘vocabulary_name’]
Returns:

results – a cursor-like object with methods such as fetchone(), fetchmany() etc.

Return type:

inspectomop.results.Results

Notes

Original SQL

C08: Find a disease causing agent by keyword:

SELECT
    C.concept_id Agent_Concept_ID,
    C.concept_name Agent_Concept_Name,
    C.concept_code Agent_concept_code,
    C.concept_class_id Agent_concept_class,
    C.standard_concept Agent_Standard_Concept,
    C.vocabulary_id Agent_Concept_Vocab_ID,
    V.vocabulary_name Agent_Concept_Vocab_Name
FROM
    concept C,
    vocabulary V
WHERE
    LOWER(C.concept_class_id) in ('pharmaceutical / biologic product','physical object','special concept','event', 'physical force','substance') AND
    LOWER(C.concept_name) like '%radiation%' AND
    C.vocabulary_id = V.vocabulary_id AND
sysdate BETWEEN C.valid_start_date AND C.valid_end_date;