Most exports don't include study time
This can be very useful and should be included.
However, due to the use of write_row
, it is difficult to have a date and a time in the same row and have them formatted sensibly.
I propose therefore replacing the date column with a date-time column. I don't know if this is likely to cause problems for existing users?
Comments (43)
-
reporter -
Maybe I misunderstand, but isn't it possible to create multiple cell formats and apply these to the different columns? Actually the same as done with Patient ID and Accession Number?
-
reporter At a cell by cell level, you can set the format for each cell. But we are writing the whole row at once by writing a list of values. With the patient ID and accession number, we can make sure the variable types are correct before adding them to the list. But the dates and times are Date, Time and DateTime objects, and we can only set the 'date' format once for the row.
I think. This is all off the top of my head.
-
I think you can set the format for a entire column (before adding data). I'll give it a try and let you know.
-
I created a pull request that fixes the issue for CT exports.
-
reporter Hi @LuukO. I can't remember why this one didn't get reviewed at the time. Can you please change the PR from
develop
toIssue488MostExportsDontIncludeStudyTime
. I've created that branch from a commit close to where you made the original PR, as it won't merge cleanly with the current develop. I can then bring it up to date and test it. Alternatively, you could make it work with current develop and we can PR it to an up to date branch to review. Up to you, but I don't mind sorting it out.Thanks
Ed
-
hi @edmcdonagh. I Changed the PR. (Sorry the easiest for me now).
-
reporter Merged in LuukO/openrem/Issue448MostExportsDontIncludeStudyTime (pull request #78)
Refs
#488Most Exports Don't Include StudyTimeThanks Luuk
→ <<cset cb96c805071a>>
-
reporter I'm pleased to say @LuukO is right - this does work. I'll expand it to the other exports before merging it in.
-
reporter Initial cleaning up of imports before beginning on ref
#488for DX→ <<cset 2b21472a4cfa>>
-
reporter Moved formatting and header list generation to export_common for DX to xlsx. Added time export to all_data and protocol sheets. Refs
#488→ <<cset 824629a63cc2>>
-
reporter Removing the factored out code. A little PEP8. Refs
#488→ <<cset 3ec4f241e15c>>
-
reporter Removed settings import, PEP8 other imports. Refs
#488→ <<cset 97373658bc4e>>
-
reporter Factored out code for generating protocol sheets. Refs
#488→ <<cset 5b98131cc75b>>
-
reporter Split sheet name generation off into function. Adapted generate_sheets to work for CT and DX. Made use of the common functions for CT xlsx export. Refs
#488→ <<cset 68745cb0d8a4>>
-
reporter Addressing codacy issues Refs
#488→ <<cset 80e8d3c6363b>>
-
reporter Created get_common_data initially from xlsx, then updated for the better code from dx_export. Refs
#488→ <<cset 63fdc320a467>>
-
reporter Factored out get_series_data. Now writing all_data and series data based on xlsx, but better :-) Refs
#488,#484→ <<cset 534e7ea83266>>
-
reporter Removed commented out code. Modified xlsx as per dx_export. Possibly half the number of queries. Refs
#488,#484→ <<cset 5f869a84218c>>
-
reporter Unused imports and removing string_to_float calls Refs
#488,#484→ <<cset 8d258149b93c>>
-
reporter Set csv to use the export code as xlsx for DX. Factored out series header generation. Refs
#488,#484→ <<cset f134057482fb>>
-
reporter Writing series data during group sorting. Refs
#488,#484→ <<cset 8ec782435afe>>
-
reporter Removed functions no longer used by xlsx. Will break csv export for now. Refs
#488,#484→ <<cset 5f010a331427>>
-
reporter Factored out get_xray_filterinfo from dx and rf exports. Refs
#488,#484→ <<cset 8e7e6b0ff689>>
-
reporter Simplifying autofilter column calculations! Refs
#488→ <<cset 04101de1312c>>
-
reporter Brought csv up to date with xlsx for RF. Refs
#488,#484→ <<cset 64df88feb4e3>>
-
reporter Tidying up Refs
#488→ <<cset 0dba21a18a11>>
-
reporter Adding IOErrors. Hope it is the right one... Refs
#488→ <<cset 79ad82fb9ca3>>
-
reporter Moved ct headers generation and get series data to export_common. Refs
#488→ <<cset 36311a883733>>
-
reporter Moved exportCT2excel to the xlsx module. Refs
#488→ <<cset a1ba019271ad>>
-
reporter Renamed xlsx.py to ct_export.py Refs
#488→ <<cset 7113c918f41a>>
-
reporter Renamed exportCT2excel to ct_csv Refs
#488→ <<cset 05c66c43ed37>>
-
reporter MOved CT only common functions into ct_export. Refs
#488→ <<cset 7eef7554c8c4>>
-
reporter Moved creation of temporary xlsx file and writing of final xlsx and csv files to export_common. Need to do creation of csv file function, and then tackle mammo. Refs
#488vaguely!→ <<cset 853de62f92e9>>
-
reporter Updated mammo csv to match other csv routines. Refs
#488→ <<cset 2e9790a0e758>>
-
reporter Removed commented out code. Refs
#488→ <<cset b2bd9369c760>>
-
reporter Renamed exportcsv.py to mg_export.py Refs
#488→ <<cset 5cbbdfe242d5>>
-
reporter Adding an xlsx mammo export Refs
#488→ <<cset a83322301b81>>
-
reporter Added new xlsx export for Mammo. Need to do summary sheet and alldata headings. Refs
#488→ <<cset 70638f33e7c4>>
-
reporter Factored out create_summary_sheet and added it to the mammo xlsx export. Added headings to all_data Refs
#488→ <<cset a58969b265c8>>
-
reporter Made use of new create_summary_sheet in CT, DX and RF. Refs
#488→ <<cset 44c040955260>>
-
reporter Added ref
#488,#484to changes.→ <<cset 66b0cb20c64d>>
-
reporter - changed status to resolved
Merged in Issue488MostExportsDontIncludeStudyTime (pull request #125)
Issue488MostExportsDontIncludeStudyTime
→ <<cset e1dc2ae8c2a8>>
- Log in to comment
Not as simple as I had thought - if the user has the appropriate rights and the data is stored, date of birth is another field on each sheet. This should not have a time component.