Consider offering one-way hash function for accession number and patient ID

Issue #183 resolved
Ed McDonagh created an issue

In Norway, accession number is considered to be patient identifiable data. Without accession number, OpenREM becomes difficult to use for individual patient dose calculations or investigations.

A workaround could be to store a one-way hash of the accession number in the database instead. You can then never work out from the hashed accession number alone what the original exam accession number was. However, if you were needing to investigate a particular exam and were in possession of the accession number, this could be entered and hashed in the same way as originally to obtain the correct study.

The idea for this approach came from the description of the PerMoS solution used for the EPICT project, created by Andreas Jahnen of the Luxembourg Institute of Science and Technology (formerly the Centre de Recherche Public Henri Tudor, Luxembourg) and presented at the NFMF MedFys 2015 conference in Kvitfjell, Norway.

An extension of this would be to use the same method and store a hash of patient ID. This would have the following advantages:

  • Patient's studies can be easily found - radiographers like working with IDs and names, not accession numbers
  • Patient's history could be tracked where appropriate, for example linking interventional studies to estimate skin doses
  • A study cannot be attributed to any particular patient by knowledge of the ID hash
  • Height and weight information can be imported if the ID is known but not the height and weight. This might get complicated by the lack of knowledge as to which exam the details are valid for, but could be a very useful tool.

There are also disadvantages to consider:

  • It becomes trivial to look up an individual patient's dose. It has always been possible, by reviewing date/time/exam type/machine, but not trivial. However, authorisation levels might manage this risk. For example the ID lookup might be disabled for the 'view' level of access.

Comments (46)

  1. Ed McDonagh reporter

    Added model for Patient ID Settings as a solo singleton model, including adding django-solo. Editable using the admin interface. Refs #183. Should use the same method for the DICOM delete options, ref #263

    → <<cset 7359c5adf5b6>>

  2. Ed McDonagh reporter

    Hashing Accession number was working - I was importing both RDSR (working) and Philips CT (not changed at that point). Now both working. Refs #183.

    → <<cset 62aa0fbe5db3>>

  3. Ed McDonagh reporter
    • changed milestone to 0.7.0

    I want to have at least a basic version of this working in 0.7, as it is becoming increasingly important for us here.

    At the same time I want to get 0.7 out of the door, so it might not be a perfect solution!

  4. Ed McDonagh reporter

    Only exploritory logging really, but we are getting somewhere. Next task is to refactor so that Meta.fields is a dictionary containing the lookups etc. Refs #183

    → <<cset afbb6ba8d3a3>>

  5. Ed McDonagh reporter

    Super class that adds the PID search into a non-PID filter now working for mammography. The list of fields is ignored if there are a list of filters, but the list does need to exist. Refs #183

    → <<cset 7d03dd344734>>

  6. Ed McDonagh reporter

    Hide hashed accession numbers from filtered lists, both as they aren't good for formatting, and because if they are hashed they should probably be hidden. Refs #183

    → <<cset e997c28d3ab6>>

  7. Ed McDonagh reporter

    Converted exportMG2excel to use the django-filter function properly, including allowing or denying pid query. Need to add export versions with id, name or both. Refs #183

    → <<cset dade20bae2b1>>

  8. Ed McDonagh reporter

    Mammo csv export now available with name, ID or both, if you are in the PID group. Doesn't allow if not in group, even if know the URL. However, the export page allows anyone who can see that page to download anything... need to restrict. Refs #183

    → <<cset d94bd92daa5e>>

  9. Ed McDonagh reporter

    Added user and includes_pid to the export model, now users not in the pid group won't see exports that contain pid. User is now displayed in the export table - this could be changed in the future so that you can either filter (in which case the full name should be displayed instead of the username), or list mine vs all exports. Only mammo csv export has been updated to fill the new model fields. Refs #183

    → <<cset 76cc7f9fdf93>>

  10. Ed McDonagh reporter

    Converted the fluoro csv export to allow PID. Seems to work, though test data was anonymised so more testing required. Refs #183. Added sex to RF csv export refs #235

    → <<cset b7de279b44eb>>

  11. Ed McDonagh reporter

    Prepared for pid and user information to come into rfxlsx, changed to filtering data using djangoo-filter, added patient sex to the standard export data (refs #235), changed column resize for date column, though will be wrong again if pid. Refs #183

    → <<cset 5a01cf531dc1>>

  12. Ed McDonagh reporter

    Added PID export to CT CSV. Refs #183. Noticed that a known URL can download a file with PID without PID rights even though the link is missing.

    → <<cset ee4acad395c9>>

  13. Log in to comment