Button to export to pdf and use two fields for file name

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
User avatar
DrBones
Posts: 22
Joined: Fri Oct 17, 2008 1:37 am
Location: Long Island, New York

Button to export to pdf and use two fields for file name

Post by DrBones »

Hello,

I looked thru the forum and after looking at the basics on OO Basic, I realize it is far over my head (and time as I have a baby due in less than a week).

About me: I'm a new chiropractor (2 yrs in practice) who is trying to automate my notes, existing solutions whether free or for purchase do not meet my needs.

I use a form for daily patient notes, known as a "SOAP" note. The form I created matches the paper form (for the most part) I currently use. The form has a patient field which populates from an oo base table. My original plan was to create a table for all the soap contents, but the form has 240 fields (mostly yes/no) and tables in base can't support that many rows. In addition to the patient field, there is a treatment date field.

You can see a pdf of this form (completed for my cat, Boo as a test) here: http://www.gregorydorks.com/download/ec ... rmtest.pdf
(since this is a printed version, what you don't see as that I've used drop down lists on as many fields as possible)

After I complete the form, I want to program a button with a macro that will export the document as a PDF file and use the "patient" field and "treatment date" field contents plus "SOAP" and save the file into a particular folder (so I can move the document into my document management system). I know the first problem is that the date field uses forward slashes (01/01/01) so I would need to format it with periods or hyphens. I can't use "today's date" because I don't always finsh notes before the end of the day (shame on me).

My info:
I'm using: OO 2.4 (3.0 ran too slow opening my form)
XP Pro (office pcs) and Home (laptop)
OO Base for patient list population (but not for the actual form data)

Any advise or help would be greatly appreciated (I might even name my first born after you)***

DrBones



(***Pending spousal approval :) )
OOo 3.0.X on Ms Windows XP + Ubuntu; DSL;
User avatar
bobban
Volunteer
Posts: 535
Joined: Sat Nov 01, 2008 3:12 pm
Location: Australia

Re: Button to export to pdf and use two fields for file name

Post by bobban »

Hi DrBones,

After reading this report I'm very concerned about the health of your cat and would like to send it to the cat lab for further analysis. :lol:

Could you PM a cut down version of the form document? I have the macro almost written for you and just need to hook it into your form fields.

Looking forward to my first namesake! :)

p.s. I don't approve your spouse's right to disapprove, and by replying to this post you hereby grant me exclusive naming rights. ;)
OOo 3.1.1 on Ms Windows XP
User avatar
DrBones
Posts: 22
Joined: Fri Oct 17, 2008 1:37 am
Location: Long Island, New York

Re: Button to export to pdf and use two fields for file name

Post by DrBones »

Hi Bobban (I like the name already)

I'll PM you with a link where you can download .odt form from my webserver.
bobban wrote: After reading this report I'm very concerned about the health of your cat and would like to send it to the cat lab for further analysis. :lol:
My other Cat,Cornelius, did a complete Cat Scan and determined his comrade, Boo, was fit (if not a little too plump)
bobban wrote: Looking forward to my first namesake! :)
p.s. I don't approve your spouse's right to disapprove, and by replying to this post you hereby grant me exclusive naming rights. ;)
Unfortunately, I don't have the legal right to offer exclusive naming rights, if you were married, you would know that everything the husband posits to his wife is subject to her "exclusive" complete or line-item veto. So Sorry!
:)

DrBones
OOo 3.0.X on Ms Windows XP + Ubuntu; DSL;
Post Reply