Making the pointers to the uploaded files


#1

Hello all,

I have created basic patient records. The basic information is

patient_data: fname, lname, street, pid, pubid, and usertext1  

I have also uploaded their word docx files to their respective folders. what should have happened is that there should be one file per one folder. So for example, patient with PID of 7 should have one file in …documents/7/wordfile.docx. the usertext1 has the actual word file name in it. so the mapping should go:

patient_data.pid = ..documents/pid/  and patient_data.usertext1 = ..documents/pid/usertext1  

I would like to cross check the data I have in my patient_data table with the folder and file names in the documents dir. Anyone know how to easily do this with BASH or Python?


#2

Hi @lonesoac0 ,
Would it make more sense to create a Document category to store this, and could then leverage the current Documents mechanism for storing, tracking, showing these docs?
-brady


#3

Just for clarity, when you say: “Would it make more sense to create a Document category to store this” do you mean create a Documents category in this forum?

But then this statement of:“and could then leverage the current Documents mechanism for storing, tracking, showing these docs?” plus the previous section does not make a lot of sense, so I think I am missing something.

Please advise.


#4

Sorry, I was definitely being a too cryptic :slight_smile:

In OpenEMR, can add document categories at Administration->Practice->Documents->Edit Categories

And then can add documents in the patient summary screen(at top)->documents


#5

I will definitely look for it tonight. Be advised, I am using 5.0


#6

So, I looked at where you said and I think we have a disconnect. I am adding MAAAAAAAAS medical files, like 4k+. Each file is mapped to one patient record. I have already created the basic patient records. I have also already created the folder (based on their PID) and moved their respective file to the folder. Now I just need to create records in the documents table that point to the files for the individual patients.

UPDATE:
I just tried to make a test pointer in the Documents table. I know the file is there, but it is not showing up. I just assume that the Documents table is the pointer to the appropriate files. I have attached a sample file. The record with the really long hash is the one that shows up in the files folders.

3 file_url 91605 5/14/2017 17:04 file:///var/www/html/openemr/sites/default/documents/7/asd NULL application/octet-stream NULL 1 5/14/2017 17:04 7 5/14/2017 9a2733fd1a5ac7142c7111b37f192de35117dfbd 0 NULL NULL 0 1 0 0 0 1 NULL NULL

4 file_url 44123 5/21/2017 0:00 file:///var/www/html/openemr/sites/default/documents/7/ABDON, THERESE 188220 (1).docx NULL application/octet-stream NULL 1 5/21/2017 17:55 7 5/21/2017 asd 1 NULL NULL 0 1 0 0 0 1 NULL NULL

Apparently new users cannot attach files.