Problem
DataElement in src/harmonization_framework/element.py is a placeholder with only type annotations and no initialization, validation, or serialization. There is also a different DataElement ORM model in api/models.py, creating a naming collision.
Questions
- Should the core library use a dedicated, serializable DataElement model (e.g., dataclass/pydantic)?
- Should it reuse or mirror the API ORM model?
- What should be the stable identifier for DataElement (id/label/URI)?
- How do we align with the RADx Data Dictionary Spec for Data Elements?
Proposal
Define a real DataElement model with:
- explicit fields (id, label, type, enumerations)
__eq__/__hash__ based on a stable id
to_dict/from_dict for rule serialization
Also rename one of the DataElement classes or namespace it clearly to avoid confusion.
Files
src/harmonization_framework/element.py
src/harmonization_framework/api/models.py
Problem
DataElementinsrc/harmonization_framework/element.pyis a placeholder with only type annotations and no initialization, validation, or serialization. There is also a differentDataElementORM model inapi/models.py, creating a naming collision.Questions
Proposal
Define a real DataElement model with:
__eq__/__hash__based on a stable idto_dict/from_dictfor rule serializationAlso rename one of the DataElement classes or namespace it clearly to avoid confusion.
Files
src/harmonization_framework/element.pysrc/harmonization_framework/api/models.py