openrem_mg.py required dob for age

Issue #63 resolved
Jonathan Cole created an issue

openrem_mg.py uses the date of birth to set the patient age, even if a patient age is also present. This creates problems for anonymised data where the DoB has been removed but age left.

Comments (8)

  1. Ed McDonagh

    Merged in jacole/openrem-1/jacole/added-an-if-to-catch-patientage-and-cast-1395161457493 (pull request #4)

    Refs #63 - needs further testing and the same approach taken with RDSR and Philips CT. Need to make sure pat and patatt are being read in the right order as it seems to be the opposite way around between mam and rdsr. Re: #63 Added an if to catch 'PatientAge' and cast from a string to the decimal field, removing the 'Y' for years.

    → <<cset a00ebca49ec2>>

  2. Ed McDonagh

    Merged in jacole/openrem-1/jacole/added-an-if-to-catch-patientage-and-cast-1395161457493 (pull request #4)

    Refs #63 - needs further testing and the same approach taken with RDSR and Philips CT. Need to make sure pat and patatt are being read in the right order as it seems to be the opposite way around between mam and rdsr. Re: #63 Added an if to catch 'PatientAge' and cast from a string to the decimal field, removing the 'Y' for years.

    → <<cset a00ebca49ec2>>

  3. Ed McDonagh

    Modified JAC code to use Decimals instead of floats and to quantize the age to 1 decimal place to reduce accuracy of reverse date of birth calculation. Refs #63.

    → <<cset 7a3d77c38d5e>>

  4. Ed McDonagh

    Moved patient_age_decimal routine to patientmoduleattributes so that patient_birth_date does not need to be stored in the database. This is already the case for rdsr - mistake has been made in mammo version. Need to check Philips CT. Refs #63.

    → <<cset 3cba739cc792>>

  5. Ed McDonagh

    Now tested with mammo images with DOB and with no DOB but with age. Restricted Decimal import as per best practice and to avoid errors. Need to duplicate in other DICOM extractors. Refs #63.

    → <<cset 934251881e7d>>

  6. Log in to comment