Issue239toofewstationnames

Merged
#22 · Created  · Last updated

Description

  • Added new table to hold unique combinations of kit and associated display name. Added foreign key reference to the general equipment module attr table to link it to the new table. References issue #239.

  • Updated definition of new table in light of @edmcdonagh's comments. References issue #239.

  • Updated definition of new table to include a unique_together statement that forces the combination of certain fields to be unique (see https://docs.djangoproject.com/en/1.8/ref/models/options/#unique-together). References issue #239.

  • Updated definition of new table. Added foreign key field to GeneralEquipmentModuleAttr table. Removed device_observer_uid field from the new table for simplicity at the moment. References issue #239.

  • Added new data migration file. This populates the new UniqueEquipmentNames table with every unique set of data currently in the database. Tested and works. Need to add a second stage to this that populates the new unique_equipment_name field in the GeneralEquipmentModuleAttr table with the appropriate row of 'UniqueEquipmentNames'. References issue #239.

  • Added to data migration file. Now adds the appropriate UniqueEquipmentNames foreign key value into every existing row of the GeneralEquipmentModuleAttr table. References issue #239.

  • Removed an unsed variable and tidied a bit. References issue #239.

  • Updated migration file to cope with None in both station_name and institution_name. If they're both blank then the text Blank is used for the dispaly_name. References issue #239.

  • Added code to dx.py to get_or_create corresponding UniqueEquipmentNames information. If a new row has to be created in UniqueEquipmentNames then the display_name field is populated with a sensible default, depending on what information is available. Tested by adding some fake DICOM data to a backup of my live system: works as expected. References issue #239.

  • Added code to mam.py to get_or_create corresponding UniqueEquipmentNames information. If a new row has to be created in UniqueEquipmentNames then the display_name field is populated with a sensible default, depending on what information is available. Untested, but identical to working code in dx.py. References issue #239.

  • Added code to ct_philips.py and rdsr.py to get_or_create corresponding UniqueEquipmentNames information. If a new row has to be created in UniqueEquipmentNames then the display_name field is populated with a sensible default, depending on what information is available. Untested, but identical to working code in dx.py. References issue #239.

  • Updated openrem_home to use display_name rather than station_name. Works: I now have separate entries for systems that would have previously been combined together as they have the same station_name. References issue #239.

  • Changes to make dxfiltered.html display correctly using display_name rather than station_name. Further checking required. References issue #239.

  • Removed study DAP from DX filters. This references issue #249. Some small fixes to filtering re study date. References issue #239.

  • Added filter to all modalities in . References issue #239.

  • Modified home page so that equipment is shown by display_name rather than station_name. References issue #239.

  • Home page now displays the display_name in the first column for each modality. References issue #239.

  • Successfully added display_name to the dxfiltered.html page (thanks for the help with the syntax, @edmcdonagh). I'm very happy to alter what is displayed where: this is just a proof-of-concept. References issue #239.

  • Added display_name to the other filtered html pages. References issue #239.

  • Added display_name to the dx exports csv and xlsx files. References issue #239.

  • Added display_name to the other export routines, except for the NHSBSP mammo, which I left alone. References issue #239.

  • Added new view, display_names_view, to display the contents of the UniqueEquipmentNames database table. It's not linked from anywhere yet, but could be added to the admin menu. The admin menu needs to be added to the page, and something needs to be done to the rows to allow the user to edit the display_name of the row that they click on. You get to the page by going to /viewdisplaynames/. References issue #239.

  • The admin menu is back: I wasn't passing an admin variable from the view to the template in the return structure. References issue #239.

  • Added display name viewing to the admin menu. References issue #239.

  • Added column to the displayed data. Clicking on this takes the user to a new view that will enable them to edit the of the row that they clicked on. Clicking on this link runs the new method in . At the moment this is simply a duplicate of , with the addition of being able to cope with being sent the primary key of the row that the user wants to update. It simply returns the user to the display of all the data at the moment. References issue #239.

  • Added new html template to be used to edit the user-selected . When a user clicks to update a they are taken to this new page. At the moment it just displays the row to be updated - it doesn't allow any editing at the moment. The needs to be a form input field so that the user can edit the value and then submit the changes. References issue #239.

  • Nearly there. The user can now click to update a row in the UniqueEquipmentNames table. This takes them to a view of just that row, where the display_name can be edited. Clicking on the Submit button sends the updated data back to display_name_update in views.py. This just needs some code adding for when the request method is POST to process the form data that has been sent, and update the appropriate record in UniqueEquipmentNames. References issue #239.

  • Pages for viewing and updating now working. Fixes issue #239.

  • Tweaked a few things: added option under User options to view display names; table showing display names is now sorted alphabetically by display_name; made entire table rows clickable on the /viewdisplaynames/ page (they're only clickable if the user has admin rights); the HTML FORM components on the /updatedisplayname/## page are only put in if the user has admin rights; altered where /updatedisplayname/ points to in urls.py to prevent an error if a user manually types in a url without a value at the end. References issue #239.

  • Combined median migration file with the one that populates the new display name table. References issues #239, #241, #246.

  • Combined median migration file with the one that populates the new display name table. References issues #239, #241, #246.

  • Removed some unused variables. References issue #239.

0 attachments

0 comments

Loading commits...