Git Product home page Git Product logo

pimsclient's People

Contributors

brambozz avatar pyup-bot avatar sjoerdk avatar

Watchers

 avatar

Forkers

brambozz

pimsclient's Issues

PIMS API endpoint Files/Deidentify silently skips consistency errors

  • pimsclient version: 0.5.2
  • Python version: 3

Description

The PIMS API endpoint
api/Keyfiles/{keyfile_id}/Files/Deidentify
is the main way of setting pseudonyms via pims API. (see ​https://github.com/sjoerdk/pimsclient/issues/159)

It turned out in #10042 that in case identifiers already exist with a different pseudonym, PIMS will silently skip these. The call finishes as succesful. However the pseudonyms will not be set.

This is unwanted behavior. PIMS itself needs to be changed to return some kind of warning or error. However, in the mean time, consider having pimsclient check everything manually beforehand to avoid these errors.

Add set_keys() ignore_errors flag

  • pimsclient version: 1.5.2

For Project.set_keys() there should be an 'ignore errors' flag. Currently an error is thrown if any pseudonym to set already exists. When adding many pseudonyms however, upon hitting any error, often part of the pseudonyms you were setting aready exist. Having to prune these away each time before re-running the script is annoying.

Add 'ignore_errors=False' which will print warnings instead of raise exceptions when trying to set existing pseudonyms

Allow manual setting of pseudonym/identifier pairs

pimsclient version: 0.5.1

Currently pimsclient can only send identifiers to PIMS to retrieve a pseudonym, or send in pseudonyms to retrieve identifiers.
This is enough for projects starting clean with PIMS.

For projects with existing data this is not sufficient however. These often require historic pseudonym/identifier pairs to be added to PIMS so that new data for historic patients will be pseudonymized consistently with already acquired data.

For this there needs to be a way to set manual pseudonym/identifier pairs in PIMS.
Special care needs to be taken to handle conflicts:

  • If a manual pseudonym is already present in PIMS but linked to a different identifier
  • If a manual identifier is already present but linked to a different pseudonym

No way to check whether identity has a pseudonym without creating pseudonym

There is an unwanted schroedingers behaviour in the current PIMS API. By querying whether an identity has a pseudonym, you create that pseudonym.

There should be an API endpoint to get a yes or no answer without creating pseudonym. This is important when doing larger scale operations on legacy archives. You don't always want to create pseudonyms for everything you query.

Multiple columns

Hey Sjoerd,

Really nice client, I have been trying to get it to work with our downloading scripts.

Description

Currently, the automatic download for e.g. COVID CT has per patient ID both a pseudonym and another random number, the anonymization salt. This is used to perturb data randomly, e.g. moving dates around etc.

I would therefore like to be able to not only have "PatientID" | "Pseudonym" in PIMS, but actually rows like "PatientID" | "Pseudonym" | "Salt".

What I Did

I tried hacking around the KeyFiles.deidentify method and also tried fiddling around on the swagger UI of PIMS. I think /api/Keyfiles/{KeyfileKey}/Pseudonyms/{PseudonymId}/Data should be suitable, but I get an insufficient rights error.

Do you know if this is already possible with pimsclient now and I am missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.