Add patient ID to default filter display

Issue #366 new
john loveland created an issue

Sites without a RIS will not have accession numbers. In this scenario it is then useful to display patient ID instead.

Comments (4)

  1. Ed McDonagh

    I would suggest the best way to proceed with this @JLMPO might be as follow:

    • Fork the project
    • Clone your fork to your computer
    • Make your changes - see below for suggestions, committing regularly to your fork
    • If you want us to look at what you have done, just add our names to a comment (use the @ format, so @edmcdonagh or @dplatten)
    • When you are happy, create a pull request

    There are guides on the bitbucket website to take you though all of this, including using git (the version control system we use), pulling, committing, pushing, pull requests etc.

    In terms of the changes you might like to make, consider the following:

    • In the database there should probably be a field id_displayed in the PatientIDSettings class in remapp/ For completeness, there should probably be a field name_displayed too. This will require a database migration before you can make use of it - python makemigrations remapp python migrate remapp
    • The additional field(s) will need to be added to PatientIDSettingsUpdate class in remapp/
    • The template remapp/templates/remapp/patientidsettings_form.html will need to be updated with the new fields so you can set them in the interface
    • We need to pass the PatientIDSettings through to the template from remapp/ rf_summary_list_filter - something like adding the following at the start of the function,

        from remapp.models import PatientIDSettings

        if PatientIDSettings.id_displayed:
            admin['display_id'] = True
        if PatientIDSettings.name_displayed:
            admin['display_name'] = True
    before the return section.

    • You can then add the patient ID and/or name fields to the templates for the summary list filtered view and the detail view; remapp/templates/remapp/rffiltered.html and rfdetail.html respectively for the fluoroscopy data. They should be in an if statement something along the lines of
    {% if admin.display_id %}
    {{ db link to id }}
    {% endif %}
  2. Ed McDonagh

    P.S. OpenREM developers can make use of a complementary licence for PyCharm for developing OpenREM - let me know if you are interested after you have made a little headway 😄

  3. Log in to comment