aphp / eds-scikit

eds-scikit is a Python library providing tools to process and analyse OMOP data
https://aphp.github.io/eds-scikit
BSD 3-Clause "New" or "Revised" License
35 stars 5 forks source link

Feature request: Add more flexibility to `ConceptSet` #25

Open Vincent-Maladiere opened 1 year ago

Vincent-Maladiere commented 1 year ago

Description

Currently, adding concept sets is quite hacky:

from eds_scikit.biology import ConceptsSet

protein_blood = ConceptsSet("Protein_Blood_Quantitative")
protein_urine = ConceptsSet("Protein_Urine_Quantitative")
protein = ConceptsSet(
    name="Protein_Quantitative",
    concept_codes=protein_blood.concept_codes + protein_urine.concept_codes,
)

It would be handier to have the following:

protein = protein_blood + protein_urine

The concept_name could be generic like "addition_1" since it doesn't seem to be used except in the bioclean table.

We would need to add to ConceptSet:

Thomzoy commented 1 year ago

Yep good idea !