Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onset to disease message #35

Open
pnrobinson opened this issue Nov 28, 2023 · 3 comments
Open

Add onset to disease message #35

pnrobinson opened this issue Nov 28, 2023 · 3 comments
Assignees

Comments

@pnrobinson
Copy link
Member

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 msierk self-assigned this Dec 4, 2023
@msierk
Copy link
Collaborator

msierk commented Dec 7, 2023

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
Copy link
Collaborator

msierk commented Dec 15, 2023

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

@pnrobinson
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants