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

Formula to calculate survival_time_in_days when patient is alive #87

Open
sujaypatil96 opened this issue Apr 19, 2024 · 3 comments · May be fixed by #88
Open

Formula to calculate survival_time_in_days when patient is alive #87

sujaypatil96 opened this issue Apr 19, 2024 · 3 comments · May be fixed by #88
Assignees

Comments

@sujaypatil96
Copy link
Collaborator

Notes from discussion with @justaddcoffee on 4/16.

If person/patient is "Alive" then we need a way of populating survival time in days, and we can do that as follows:

when we last saw the patient (day of last encounter) - when the patient was diagnosed

In the GDC API, the field that corresponds to each of the above variables is:

  • when we last saw the patient (day of last encounter) -- diagnoses.days_to_last_follow_up
  • when the patient was diagnosed -- diagnoses.age_at_diagnosis
@justaddcoffee
Copy link
Member

justaddcoffee commented Apr 30, 2024

@sujaypatil96 we hacked on this a bit today. We observed that in the current code, survival time for Alive patients was often negative.

We think that is because last_follow_up means days since diagnosis (not days since birth):
Via: https://docs.gdc.cancer.gov/Data_Dictionary/viewer/#?view=table-definition-view&id=diagnosis&anchor=days_to_last_follow_up
"days_to_last_follow_up: Time interval from the date of last follow up to the date of initial pathologic diagnosis, represented as a calculated number of days."

So, we've changed the code accordingly. Does this look correct to you?

@sujaypatil96
Copy link
Collaborator Author

@justaddcoffee
Copy link
Member

@sujaypatil96 is _process_vital_status() not being used? I just ran the code through a debugger and it seems this is still the way we are populating vital status for the phenopacket, right?

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

Successfully merging a pull request may close this issue.

2 participants