jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.37k stars 356 forks source link

[Other] Multiple correspondents and multiple types for a document #1375

Open anotherjulien opened 2 years ago

anotherjulien commented 2 years ago

Hi!

I have a use-case that would benefit a lot from the ability to set multiple correspondents to a document. Specifically for medical records; having both the actual doctor as well as the hospital would be very helpful for sorting/searching records.

Alternatively being able to form a hierarchy in the correspondents admin page could work (i.e. set the document's correspondent to the doctor, but set in the admin page that the doctor is a "child" of the hospital correspondent). Then filtering by the parent correspondent could return all children as well as documents set directly to the parent.

A similar system could also be useful for document types I'm sure, but I don't have specific examples that could illustrate that.

Is it something that would be reasonably feasible?

amenk commented 2 years ago

As a workaround you could create tags like "Correspondent: Hospital-X" "Correspondent: Doctor Y" I think the idea of the correspondent field is that is shows the party writing / signing the document and this should be in most cases only one party?

anotherjulien commented 2 years ago

I agree that tags are a workaround, but only because they are the only items able to form "many-to-many" relationships with documents, which is somewhat my point: correspondents and types maybe could benefit from that ability as well.

Indeed it ideally makes more logical sense that the correspondent should be unique; although there are real-world examples to the contrary. For example you send a document to someone with a copy to someone else (I don't know; someone for litigation purposes with a copy to your and/or their lawyers?). What makes more sense: scanning the document two or three times with one correspondent each or only once with two or three correspondents? Or do you set yourself as the correspondent because you're the one signing/sending it?

This is also where a more complex correspondent management could make sense, like setting an "employer" for a correspondent and be able to search by that employer maybe? (It would however not be relevant to the example I gave above, where both correspondents might not be related in this way)