monarch-initiative / oncoexporter

Cancer data to GA4GH phenopacket
https://monarch-initiative.github.io/oncoexporter
MIT License
6 stars 1 forks source link

Add onset to disease message #35

Open pnrobinson opened 10 months ago

pnrobinson commented 10 months ago

See the schema here - https://phenopacket-schema.readthedocs.io/en/latest/disease.html

Add a function to cda_disease_factory.py

age at diagnosis is represented as the number of days, e.g. 16606.0

There is a class in the cda_individual_factory that transforms number of days to ISO8601 (e.g. P42Y3M"). Probably we can put this method into the common superclass CdaFactory and use it for both.

msierk commented 9 months ago

It turns out pandas does this conversion, so we don't really need a special method for it: https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.isoformat.html

msierk commented 9 months ago

Is onset the same as age_at_diagnosis? What if a patient has had symptoms for two years but just got diagnosed?

pnrobinson commented 9 months ago

phenopackets does not model explicitly the age of diagnosis, but instead would model the age when the disease first manifested. For the purposes of this mapping excercise, probably we need to consider them equivalent though