I am looking for a way to scan handwritten encounters that will appear together with clinical notes and not up there with demographics. The reason is that with the built in documents functionality, whatever the category of the scanned documents, they are still visible by anyone with clearance to view demographics, some of whom are not authorized to view encounters in the lower pane.
Have tried two contributed forms “Documents” and “Scanned Notes”. Both are unable to upload images, giving errors. Windows 7, OEMR 4.
I will appreciate any help, either a new form, a modification of existing form, or any other trick to achieve this.
You should try to get the Scanned Notes form working, as that is its purpose. Try posting the error details here, maybe a Windows expert will help you with that.
For form “Scanned Notes”, this is the initial error:
mkdir returned 1:
After going through the code, I noticed that this was because a directory required to store the images was not present and could not be created.
Using the path given in the code, i created " C:\xampp\htdocs\openemr\sites\default\documents\1\Encounters" . Note that I had to add the “encounters” folder which is not present by default. Inbuilt documents just creates a patient ID folder (1 in this case) and stores images directly. Scanned Notes images are encounter specific but relevant folder cannot be created automatically.
After creation of the folder, I now get this error:
“convert -density 96 ‘C:\xampp\tmp\php3F9C.tmp’ ‘C:/xampp/htdocs/openemr/sites/default/documents/1/encounters/10_2.jpg’” returned 4:
PHP.ini identifies the upload temp folder as C:\xampp\tmp as indicated above, however, the temp upload file appears never to get to the folder. This folder, on manual inspection, has no such file (“php3F9C.tmp” in this case).
For the “Documents” form, the error is:
“Only Jpeg, gif and bmp images accepted.”
This is despite all the files being in the correct format.
Thought so too, went to windows security and granted full control to the entire xampp folder and used a tool in my possession to “take ownership” of xampp folder. My windows user account control is always off.
Had setup some security via xampp site including root password and access to xampp site. Dont know if this could be the issue. Will keep trying.
I (heavily) modified one of the two versions of that form. It works much better now, but I did it for 3.2 and the directories have all changed in 4.0 , so nothing points at the right place.
I was hoping to see a version of this form, or a coding standard, that saves the documents as well as other patient documents to the database. At very least, I would like to point the form at the regular imported documents directory, and hope that any script that converts the documents directory to a Blob in the database will attend to these as well.
I’ll whip up a version that will work for 4.0….and submit it IF someone up top promises real nice to take the two completely non-functioning ones out of the contrib folder.
It’s 8:00am EDST, Monday. Check back here for a link by 2:00PM Eastern time for a version using 4.0. Mind you, if some radical innovation happens to the base code for stuff in this area, the system that this form uses may require some conversion in the future.
Art
727-421-6330
I HAVE had luck with the scanned encounter documents, but I have run into an issue patching 4.0 up to the latest version for my test-bed.
I am pulling an all-nighter for this one. Perhaps by morning I will have something guaranteed good for you.
Here is the thread that deals with this form. It DOES work, only there seems to be an issue with display. In 4.0 it does not show a frame with the document, just a gray bar. You open it up(edit) and you get the index with the file location. You can then view the file, but that just isn’t right.
I have my other issues somewhat solved, and am proceeding on this.
It successfully uploads images and these images are can be viewed within the encounter.
However, it has some issues including:
1. When the encounter (Encounter Summary) is opened, there is a blank space not a link to uploaded image. One has to click “edit” to then see the list of images.
2. The images are identified only by date and time, and the “Description” and “Author” fields filled in during upload are not shown to more easily identify the image.
3. When I delete the encounter form from the encounter, the images are not deleted and are always visible. It is like one has to manually delete the images in windows explorer.
4. All images for all encounters are kept in one folder and thus one is presented with all images that were ever uploaded for the PATIENT, not ENCOUNTER. Thus, this is still not encounter specific.
Yes, that is all because the code is broken somehow. You see, instead of properly executing the file path, the encounter display code isn’t properly executing the form’s view.php and report.php code. Instead of it displaying the file, it just shows an index page containing the darn files. Not good security either!
When you upload a file, the database stores the path (\forms\documents\scanned\(Patient ID)\) and the document name with a unique timestamp name (“2011-03-18-03-25-46-87.pdf”). view.php/print.php or report.php put these two bits of the file location together and display the file. The code seems to be OK, and when I flat out modify the code and hardwire the database path straight to the file for a particual entry it STILL won’t display the file! Something else is going on, and I have put in an inquiry/prayer to the local dieties to drop me a hint as to what is going on.
So far no advancement on the subject. Really, I guess we should not be using this form at all, and should look to a solution that uses the patient document system that is already in place. Ideally, those docs should be in a database too. I shall continue to re-visit this issue, and hopefully a local guru might come around and drop us a hint at some point.
The form ‘Scanned Notes’ is modified to upload files.
The errors in the form are removed.
Any type of file can be uploaded,earlier only it was allowing images.
The files uploaded gets saved in the path \sites\default\documents\pid\encounter\
The present document management system is used to store the details of the uploaded file.Table ‘documents’ stores the details.
A category ‘Scanned Encounter Notes’ is added.
The table ‘form_scanned_notes’ stores the note and the document id.
Selecting the encounter it displays the file along with the form listing.
Can change the file in the edit screen.
The Past Encounter List(Clinical View) shows the files against the form ‘Scanned Notes’ in the corresponding encounters.
This is the same with the Report link from the demo screen.Report can the generated by ticking the check box.
More over the documents uploaded at the patient level through the Documents link from demo are not affected.
They come in the Clinical View and the Report link as usuall.
Actually, it looks like I am mistaken as to the functionality of the scanned_notes form. I just saw the interface for uploading and thought it must be working. Actually went to use it (after replacing my own version of the form) and I get the same mkdir returned 1 dealie that Mukoya got.
Damn.
Mr zhhealthcare…what exactly are we talking about here? is this a Mar 23 build-only form here? I have yesterdays snapshot running here and it is a version that Rod says he wrote and has not touched it in months. PLEASE tell me that I can get working code with today’s snapshot….Phuleeez.