|
|
#1 |
|
Registered User
Join Date: Nov 2012
Posts: 1
|
Script to automate file ScanSnap file manipulation
Hi all,
I need some help of the more capable than me programmers. First of all, I want to apologize for my not so good english as I'm brazilian. I'm running a project for digitalize all the paper patient records (about 10 thousand patients) of the hospital where I work. For this the doctor who manages the hospital bought a ScanSnap S1500 duplex scanner witch is a very fast hardware and offers a good scanning software but doesn't fit exactly on our needs. Unfortunately here in Brazil the technology is coming to the public services in sluggish speeds and this project is just became possible thanks to the goodwill of few. Well, I wonder if is it possible to write an Apple script that receives individual digitalized patient records and let the user choose the diagnostics (witch will correspond to a specific diagnostic) and let him type the patient register number and name as the name of pdf file. To exemplify: I load load all the paper records of the patient João da Silva on the scanner and press the scan button. The scanner digitalizes all the pages ans then transfer the file manipulation to the script where I select, for example, the Behçet Disease (in a droplist or a radio button list), has a text field where I type the register number (12345678) and another one where I type the name (João da Silva). The script then creates a file named 12345678 - João da Silva.pdf inside the Behçet folder. Is this possible to be made using just AppleScript? Or it needs other languages? Can someone please help-me in this task? I read a lot about Hazel to manipulate the files but based on their content, doing this on searchable PDFs (OCR-ed), searching for highlighted text. This can't be used here because all the records are handwritten. Some dates from the 70's. I'm conducing the project on my personal Mac mini, running OS 10.8.2 I'll appreciate any help, any hint, any info you can gave me. Thanks a lot! |
|
|
|
|
|
#2 | |||||||||||||||||||||||
|
Hall of Famer
Join Date: Dec 2007
Posts: 3,642
|
If any of this is not clear because English is not your first language, just let me know what you do not understand.
Naming For the naming of files, I assume the software you are using asks you at some point what you would like to name the latest scan. Let me know if that is not correct. You could use TextExpander to help with the naming. TextExpander allows you to insert text using an abbreviation you create. For example, any time you type BZ that could automatically get changed to Brazil. But it also allows you to type an abbreviation, then wait for you to complete a number of text fields. That could be used for naming the files. This would work when you are asked by the scanning software to name the new file. If the scanning software does not ask you to name the file, this would also work in the Finder but would be less convenient. So when you go to name the file, you would type your abbreviation, then a box would appear with one field for the patient number and another for the patient name. Once done, pressing Return (or the OK button) would insert the number and the name. You could also automatically include anything between the number and the name, like a hyphen (-) or other characters. That is probably difficult to understand without using TextExpander. The software can be downloaded to try for 30 days. I recommend you do that if you think it will help. If you have problems setting up the actions I just described, just post again and I will explain in more detail. Keywords I looked at the information shown online for that scanner, and it says it supports adding keywords to files. Unfortunately, I could not see how the user does this with the software that is included, but there must be a way. I prefer the method that is already in the Mac. You will have to check if you can use this the software. It may be possible in the software with the scanner. Try this: If your web browser is Safari, use the File menu to select Print. When that opens the Print dialog, click the PDF button and select Save As PDF. That opens a save dialog. At the bottom is a Keywords field. This is not a list like you had hoped for, but it does remember things you have entered. So if you create a file with the keyword Behçet Disease, it will be offered to you the next time you start typing the same thing. If the scanner software uses the same dialog, you may be able to take advantage of this. I suspect it will be different for you since most scanner software on the Mac does not nicely take advantage of built-in Mac features. Organizing I know you did not ask about this, but this may be helpful if you are already using keywords. After you have scanned everything, imagine they are all in one folder. Smart Folders will allow you to keep them in that folder but have other folders based on the keywords. You could have a Smart Folder for patients with Behçet Disease and another for patients with Alzheimer's. You can have as many as you want. To create a Smart Folder, in the Finder you would use the File menu to select Create New Smart Folder. A window opens with a search box at the top right. In there, type keyword:"Behçet Disease" (only use the quotes when the keyword is more than one word). This will show all files which have Behçet Disease as a keyword. Next, click the Save button and choose a location for this Smart Folder. Repeat for other keywords. Besides providing organization for files based on medical conditions, all while leaving the original files in the same place, it will be helpful for people who have more than one condition listed since those patient files will appear in the Smart Folder for each condition they had. |
|||||||||||||||||||||||
|
|
|
|
|
#3 |
|
Prospect
Join Date: Oct 2012
Posts: 7
|
Abandon all hope, ye who enter here
The idea that digitizing paper medical records will produce some great gain in accuracy or efficiency in treatment is, by now, pretty well debunked.
Your first real responsibility will be to discourage your employer from proceeding with such an expensive, time consuming, and ultimately not very useful idea. If you fail to do so, I recommend that you proceed by developing and testing your system on a subset of the records -- a few hundred should do -- before deciding on how to manage the whole collection. Doing this will give you important experience and allow you to develop some expertise before you have committed your employer to a scheme that is highly probable to fail. If you were an accomplished professional you would be facing a big challenge. As an inexperienced person, you must find ways to use existing software tools to accomplish your goals. Even thinking about writing Applescripts to manage a scanner is evidence that you lack the deep experience and expertise that would be needed to make a working, relatively robust system. You must avoid the temptation to invent from scratch. There are plenty of document managers that integrate well with Apple and PC. Devon Technologies makes a well respected bit of kit as does ABBYY. Evernote is another app worth investigating. You should choose one for which there is local expertise. While you can build a database from scratch using Filemaker or another program, you should resist the temptation to do so. Adventures in database development is a very exciting ride but the crash scene is ugly. Experience shows that getting access to data is relatively small part of what medical records are used for. Wading through pages of scanned text is even less likely to be useful. For this reason, I recommend that you get a small demo system running with a few hundred records to see if your employer really has the stomach for the long haul. Inevitably the people and time costs of gathering, scanning, and annotating the data will swamp the hardware and software costs of your system within a few months of commencing operation. What seem to be simple system requirements today will quickly morph into unmanageable tasks within a year. People are notoriously bad at describing what they need to do complex work, as system developers who rely on such descriptions quickly learn. Your 'system' is likely to go through several iterations of software and hardware. Be prepared to recreate everything from scratch. Whatever you do, don't throw away the paper records. You will need them. Buying the scanner is the easy part. Good luck! The Professor |
|
|
|
|
|
#4 |
|
Major Leaguer
Join Date: Apr 2010
Posts: 324
|
For the dialog boxes, there is (not free and fairly easy) 24U Appearance OSAX and (free and cumbersome) Pashua. If I was developing this system, I would probably use Hazel to run the script when the file was added to the scanner folder.
__________________
see a problem; solve a problem. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|