- changed milestone to Future
If patient age is null, exports fall over
If an attempt to write a value that doesn't exist is made the the task exits.
Comments (25)
-
reporter -
reporter Issue
#267was marked as a duplicate of this issue. -
Added some checks for missing data before they are used to populate arrays. My broken radiographic export now works. To make this fix watertight every field that is used in the arrays needs to have this check done on it. I will sort that at a later date. References issue
#120.→ <<cset 1cb0b1b56b8d>>
-
Made the exceptions specific. See http://stackoverflow.com/questions/14255125/catching-doesnotexist-exception-in-a-custom-manager-in-django. References issue
#120→ <<cset 82fbabbb9ed6>>
-
reporter - changed milestone to 0.7.0
-
reporter Attempting to create a nicer way of testing for objects existing, refs
#120. @dplatten, can you take a look? I've only made the changes to DX csv export. It seems to work, however, I can't generate the error that should happen if something doesn't exist! The method doesn't work for the defs on the models.→ <<cset 167a3b21185f>>
-
Updated checks for failing export in DX. References issue
#120→ <<cset 81b238bbd23e>>
-
reporter Taken return_if_exists out of dx_export and put it into tools/get_values.py as return_for_export. Added conversion to unicode, for both strings and decimals etc. Used the function for the common fields in the xlsx DX export, haven't done the per exposure fields yet. Refs
#120. Added patient sex to the DX xlsx export, refs#235→ <<cset 4af59b8c9ce4>>
-
reporter Added in checks as per @dplatten's comments. What do you think of this method? Refs
#120→ <<cset 449022a32f02>>
-
reporter I guess if the ObjectDoesNotExist thing is because the model instance hasn't been created, then there is no reason for that check to be in return_for_export. But the function might still be useful in turning everything into a unicode string - we've had problems with exporting decimals, hence the str() functions, but if we have non-ASCII characters in the text fields then maybe it is safer to turn everything into unicode?
Thoughts @dplatten ?
-
@edmcdonagh, I think this looks good. I'm going to expand your code so that it is used throughout the dx_export file, test it, and then commit it back.
-
Expanded Ed's method to the whole of the csv export for radiographic studies. Tested: copes with my errors. References issue
#120→ <<cset 86dbb60cc60a>>
-
Used Ed's suggestion for DAP and mAs fields. Tested and works with my data. References issue
#120→ <<cset 9fd7a844b3e2>>
-
Resolved conflicts in dx_export.py when merging develop changes into the return_for_export branch. References issue
#120.→ <<cset 03053cb455eb>>
-
Put back patient gender and removed unneeded method, both of which I accidentally messed up when resolving conflicts. References issue
#120.→ <<cset a20f51eb5230>>
-
Finished updating the dx_export.py file with checks to ensure relationships exist before trying to use them. THIS IS NOT TESTED. References issue
#120→ <<cset d04a46074de0>>
-
I can now confirm that this works OK. I have tested it on a backup of my clinical data.
-
reporter Finished updating the dx_export.py file with checks to ensure relationships exist before trying to use them. THIS IS NOT TESTED. References issue
#120→ <<cset d04a46074de0>>
-
Updated exportcsv.py with checks to ensure relationships exist. Note that I have not tested this file. References issue
#120→ <<cset 0e1c0cb5093c>>
-
reporter Corrected call to return_for_export for display name. Other calls in exportcsv and dx_export are fine. xlsx, rf_export and the nbsp version have yet to be modified. Refs
#120→ <<cset 731fa8b6f86f>>
-
reporter Converted the common data extraction routine to avoid ref
#120issues for rfxlsx export.→ <<cset 7fd89c5d88ef>>
-
reporter Converted some of the al-data sheet db lookups to use the try/except approach, but not followed all the way through. The changes that have been done work. Refs
#120. Changed copyright date to 2015.→ <<cset 7de09cfc09e5>>
-
reporter Converted export to OpenSkin to use the ref
#120method of checking models exist.→ <<cset 7733f1dd6e56>>
-
reporter Added patient name and ID to CT XLSX export (refs
#183), changed method of getting the data to allow for missing tables (refs#120), added patient sex (refs#235).→ <<cset 40214828bf4d>>
-
reporter - changed status to resolved
Merge issue183IDs into develop. Needs thorough testing. Fixes
#120,#183,#235→ <<cset 4b99762bb140>>
- Log in to comment
Moved to future so 0.4.3 can get out the door!