heudiconv
heudiconv copied to clipboard
More precise (to the month) age calculations are possible
ATM we are just taking PatientAge field, which is (typically) floored to the full years. NDA requires age in months, bids2nda rounds to the months according to the full years of age (see PR https://github.com/bids-standard/bids2nda/pull/32 to make it possible to go from floating point years), which is suboptimal. It would be nice if heudiconv automagically extracted age rounded to the month -- then age in participants.tsv could be float (or may be we could make it in months with proper annotation in participants.json). Here is an example from DICOMs:
grep -e Birth -e StudyDate -e PatientAge 1.txt
(0008,0020) DA [20180712] # 8, 1 StudyDate
(0010,0030) DA [19960315] # 8, 1 PatientBirthDate
(0010,1010) AS [022Y] # 4, 1 PatientAge
so the age is really 22 years and 4 months (rounded), not just 22Y.
i think this would depend on each center. at mit, patient age from dicoms is misleading. we always use 1/1/YOB as the DOB in the scanner console. so for all of our studies we have to update participants.tsv age column based on actual DOB. for many clinical centers they are required to put in actual DOB. for those settings i can see how heudiconv could extract actual age from studydate+patientbirthdate instead of patientage.