I often create Patient objects where a required attribute (e.g. os) is also in the clinical data for that subject. I tend to name these fields using self-explanatory but short names, which more often than not conflict with the input attributes set on the same object.
E.g. if I create a Patient object where the clinical data contains a field os, I get the following error:
ValueError: Key `os` in additional_data already exists in this object
The solution appears to be for me to either:
rename my key fields, so they don't conflict with the default names of attributes set by Patient,
drop key fields from the clinical data
Neither feels ideal. It would be nice (but not urgent) if we could avoid these conflicts between the names of Patient attributes set by Cohorts.Patient & the name of fields in the dataframe (additional_data), perhaps by giving one or the other an unnatural prefix, thereby limiting potential for conflicts.
I often create
Patient
objects where a required attribute (e.g.os
) is also in the clinical data for that subject. I tend to name these fields using self-explanatory but short names, which more often than not conflict with the input attributes set on the same object.E.g. if I create a
Patient
object where the clinical data contains a fieldos
, I get the following error:The solution appears to be for me to either:
Patient
,Neither feels ideal. It would be nice (but not urgent) if we could avoid these conflicts between the names of Patient attributes set by
Cohorts.Patient
& the name of fields in the dataframe (additional_data
), perhaps by giving one or the other an unnatural prefix, thereby limiting potential for conflicts.