| | |
Project to Make my Life Easier
![]() |
•
•
Join Date: Apr 2008
Posts: 15
Reputation:
Solved Threads: 0
Hi All,
I'm extremely new to Python and would like to create a program to help automate some of the things I do at work. I need to take information from an IDX shell and create a word document with it. Does this sound possible? Would anyone be interested in switching to E-mail and helping me figure this out? I'd have to start from scratch, but I learn fast.
Any help would be appreciate.
Thanks,
Ryan
I'm extremely new to Python and would like to create a program to help automate some of the things I do at work. I need to take information from an IDX shell and create a word document with it. Does this sound possible? Would anyone be interested in switching to E-mail and helping me figure this out? I'd have to start from scratch, but I learn fast.
Any help would be appreciate.
Thanks,
Ryan
•
•
Join Date: Apr 2008
Posts: 15
Reputation:
Solved Threads: 0
I'd be more than happy to do it here, I just want to make sure it is easy for someone to help me.
IDX (aka Reflections) is a telnet application we use to access a db of patient names, demographics, appointment history, and schedules.
I work in a medical records department where we print information from the shell, then manually create labels for the charts and other specific paperwork. I would like very much to streamline as much of this process as possible and figure the labels would be a good start to get to know the python language, then try to tackle other parts of the process.
IDX (aka Reflections) is a telnet application we use to access a db of patient names, demographics, appointment history, and schedules.
I work in a medical records department where we print information from the shell, then manually create labels for the charts and other specific paperwork. I would like very much to streamline as much of this process as possible and figure the labels would be a good start to get to know the python language, then try to tackle other parts of the process.
•
•
Join Date: Apr 2008
Posts: 15
Reputation:
Solved Threads: 0
Also, IDX supports Visual Basic Macros. I don't know if these can be initiated from outside the shell or if I will have to create and run macros from inside IDX and maybe print lists to files, then use Python to move data around? Sorry to be such a noob, but I really don't know what I'm doing.
Last edited by bvrclvr1; Oct 10th, 2008 at 6:22 pm.
•
•
Join Date: Apr 2008
Posts: 15
Reputation:
Solved Threads: 0
Hello Again,
Sorry it took so long to get back, I had to discuss the options for printing to a file with our I.T. Department. I finally managed to find a way to generate a text document with the information I need.
I have attached a shortened version of the schedule file I can create. The columns will always look like they do in the attached file as far as spacing. I had to replace any identifying information due to Health Information Protection, but the format of the report has not changed at all.
I also attached a template for printing labels with the patients' information. I filled in one of the labels to show how the information is to be organized - the name, which is capitalized on the schedule will need to appear the way it does on the labels, with only the first letter capitalized.
This is a start to the project - eventually I'd like to be able to populate the Name and Date of Birth fields on other forms that we use.
Thanks again for helping out,
Ryan
Sorry it took so long to get back, I had to discuss the options for printing to a file with our I.T. Department. I finally managed to find a way to generate a text document with the information I need.
I have attached a shortened version of the schedule file I can create. The columns will always look like they do in the attached file as far as spacing. I had to replace any identifying information due to Health Information Protection, but the format of the report has not changed at all.
I also attached a template for printing labels with the patients' information. I filled in one of the labels to show how the information is to be organized - the name, which is capitalized on the schedule will need to appear the way it does on the labels, with only the first letter capitalized.
This is a start to the project - eventually I'd like to be able to populate the Name and Date of Birth fields on other forms that we use.
Thanks again for helping out,
Ryan
Let's do this one step at a time. The text file is kind of ugly, but here's a quick example of extracting info.
Now we'll need to put some thought into how we want to handle this. We could set up a list and for each patient record, fill in my_data structure, and then deep copy it into that master list of records. After the extraction stage is done we'll need to think about what data we want to put into the word template.
The final step is actually filling in the word template which may prove to be much more difficult. I've never worked with MS Word COM objects (which I'm assuming we'll need here), so hopefully somebody else on the forum has some insights.
python Syntax (Toggle Plain Text)
>>> f = open('Schedule.txt') >>> r = f.readlines() >>> f.close() >>> >>> data_found = 0 >>> for each_line in r: ... if not data_found: ... if each_line.strip()[:4] == 'Time': ... data_found = 1 ... my_data = {} ... for each_entry in [ i.strip() for i in each_line.split(' ') if i ]: ... my_data[each_entry] = '' ... else: ... if each_line[:3] != ' ' and each_line.strip(): ... print [ i.strip() for i in each_line.strip().split(' ') if i ] ... ['08:30AM', 'DOE, JANE', '3######', '##/##/####', '4MDC', '###-###-####', 'FES', '40', 'XXXX MD,XXXXXX', 'PNL', 'MFG', '3XXXXXXX'] ['08:30AM', 'DOE, JANE', '3######', '##/##/####', '5UNI', '###-###-####', 'FES', '40', 'XXXX MD,XXXXXX', 'PNL', 'MFG', '3XXXXXXX'] ['09:20AM', 'DOE, JANE', '3######', '##/##/####', '5UNI', '###-###-####', 'IGS', '40', 'XXXX MD,XXXXXX', 'PNL', 'MFG', '3XXXXXXX'] ['09:20AM', 'DOE, JANE', '3######', '##/##/####', '5PPO', '###-###-####', 'IGS', '40', 'XXXX MD,XXXXXX', 'PNL', 'MFG', '3XXXXXXX'] ['10:10AM', 'DOE, JANE', '3######', '##/##/####', '4OMH', '###-###-####', 'UFU', '40', 'XXXX MD,XXXXXX', 'PNL', 'MFG', '3XXXXXXX'] ['10:10AM', 'DOE, JANE', '3######', '##/##/####', '4MPE', '###-###-####', 'AMN', '40', 'XXXX MD,XXXXXX', 'PNL', 'MFG', '3XXXXXXX'] >>> my_data {'Hm/Wk Phone': '', 'Appt#': '', 'Loc': '', 'DOB': '', 'Provider': '', 'Patient Name': '', 'Dept': '', 'MRN': '', 'FSC1': '', 'Time': '', 'Dur': '', 'Typ': ''} >>>
The final step is actually filling in the word template which may prove to be much more difficult. I've never worked with MS Word COM objects (which I'm assuming we'll need here), so hopefully somebody else on the forum has some insights.
![]() |
Similar Threads
- I need a great web designer and proffesional PHP Coder ~ 10k project (Web Development Job Offers)
- Variable scope problem (C++)
- Symfony (PHP)
- want to learn vb6 (Visual Basic 4 / 5 / 6)
- sliding numbers project AI (C)
- C++ How do you create multifile project (C++)
- can't link to included files... y? (C++)
- writing a script (Shell Scripting)
- Microsoft .NET FAQ (ASP.NET)
Other Threads in the Python Forum
- Previous Thread: Interacting With Javascript Controls Using A Python Program
- Next Thread: create interface with python
| Thread Tools | Search this Thread |
abrupt alarm ansi anti approximation assignment avogadro backend beginner binary bluetooth calculator character cmd code customdialog cx-freeze data decimals dictionaries dictionary directory dynamic error examples exe file float format function gnu graphics gui halp heads homework http ideas import input java launcher leftmouse line linux list lists loop module mouse number numbers output parsing path pointer port prime programming progressbar projects push py2exe pygame pyglet pyqt python random recursion schedule screensaverloopinactive script scrolledtext sqlite statistics string strings sudokusolver sum table terminal text thread threading time tlapse tricks tuple tutorial twoup ubuntu unicode urllib urllib2 variable ventrilo wikipedia write wxpython xlib






