molgenis / molgenis-emx2

MOLGENIS EMX2, the latest version of the MOLGENIS data platform.
GNU Lesser General Public License v3.0
14 stars 18 forks source link

feat(ern): Create Internal Pseudonym (using Auto ID #183 dev team) #4066

Open Fernananas opened 3 months ago

Fernananas commented 3 months ago

Is your feature request related to a problem? Please describe. For ERN ITHACA local installations we need a local pseudo-tool (Create Internal Pseudonym). This feature request provides a foundation for implementing the "Create Internal Pseudonym" feature. It ensures that patient identifiable information is stored separately from other patient data, with a pseudonym linking the two databases.

Describe the solution you'd like System Components: EMX2 installation, with two ILIAD databases: ”subject” and “internalIdentifier” User Interface: a. New Patient Creation Form (can be plus sign in EMX2) b. Pop-up Modal for Patient Identification (<needs to be created) Workflow:

  1. User initiates "New Patient" action
  2. System displays Pop-up Modal with fields:
  1. User fills in the required information
  2. User submits the form
  3. System performs duplicate check
  4. If duplicate found, display warning with existing pseudonym
  5. If no duplicate, generate pseudonym and proceed
  6. System displays Patient Information Form pre-filled with pseudonym
  7. User completes Patient Information Form
  8. System saves data to respective databases

Detailed Component Specifications: a. Pop-up Modal:

b. Application Server:

Additional context In the future, fields that are required to create pseudonym, can be changed. And creation of pseudonym can be more complex, then my solution dataprovider.name_${mg_autoid}.

Design: ~~- if the hospital identifier is given, we use that to generate the pseudoid. Otherwise we use firstname, lastname, birthdate. ~~- we want the id field to check in the database if it already exists before we save, so that we can give the error immediately. ~~"There is already a pseudoid 'xxxx' for this hospital id/firstname/lastname/birthdate" => if(mg_clientside) ~~....; ~~- we use the firstname/lastname/birthdate OR hospitalid for the duplicate check, not the generated pseudoid so that the pseudo can be totally random. => this means we can use the autoid? <= can we make that shorter?

emx1 genetic line psuedo id: https://registry.molgenis.org/#browse/browse:appstore:molgenis-app-pseudonym-registration%2F1.2.0%2Fmolgenis-app-pseudonym-registration.v1.2.0.zip

mswertz commented 2 months ago

kan dit niet met aparte patienten details tabel (met dus pseudo, firstname, lastname, birthdate en dat je dan vanuit je research data tabel daarnaar verwijst (zodat je die research data apart kunt exporteren met alleen de pseudo)

mswertz commented 1 week ago

Gewenst:

oplossingrichting:

we worden niet blij van meerdere staging areas en/of heen en weer kopieren. Ideale oplossing is

Het is een poging waard of we met sql deze permissies kunnen invoeren zonder dat het 'stuk' gaat.

https://www.postgresql.org/docs/current/ddl-rowsecurity.html