Mass document edit

P

Patrick Rouse

A colleague has two years worth of documents that they want to import into
their EMR (Electronic Medical Records). The EMR has an import function that
reads the first few lines of each document to route it to the correct
patient, encounter date, provider/doctor...

The documents in question were created w/o knowing the exact format of the
lines used to route the document. Is it possible to do a mass edit that will
replace text in the current documents with the correct equivalent.

The documents must be saved in RTF Format, and the first page should have
first lines in this format

Line 1 is blank
PATIENT MRN:000000308328
DATE: 01/06/06
DESCRIPTION: TRANSCRIPTION
PROVIDER ID:0A745553-9541-4281-BD42-EEB58D4514DC


I'm not expecting code from someone to fix the existing documents, just
wondering if it's possible and a reference to refer to. I will not be fixing
these, I'm just posting the question for a colleague.
 
D

Dave Lett

Hi Patrick,

It might be.

To open all documents, see the article "How to read the filenames of all the
files in a directory into an array" at
http://word.mvps.org/faqs/macrosvba/ReadFilesIntoArray.htm

If it's a directory structure, then the article "How to get the names of all
the folders in the folder tree, starting from a specified folder" at
http://word.mvps.org/faqs/macrosvba/ReadFoldersIntoArray.htm

To do the replace, have a look at the article "How to Find & ReplaceAll on a
batch of documents in the same folder" at
http://word.mvps.org/faqs/macrosvba/BatchFR.htm

Hope this points you to some useful resources.

Dave
 
J

Jezebel

It depends on how the documents are structured. In principle, the answer is
yes: you can certainly write a macro that will open each document in turn,
make changes, and save as RTF. The challenge is whether the required
information (Patient MRN, Date, etc) is easily identifiable, which depends
in turn on how the original documents are structured.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top