PDA

View Full Version : Newbie with several questions



rbrewington
07-19-2008, 01:33 PM
Sorry for the long post.

OK, all of this is probably simple and I apologize if I haven't found some place that gives all the answers, but I'm simply stumped on some of this stuff.

I am using Microsoft Word 2007 and trying to stick with the new content controls as much as possible (easier to transfer redundant data around the document with xml, ability to have many items to select in drop down/combo boxes, tabbing through a protected document does not work right for me when you work with "Legacy" controls mixed with content controls, and all the computers at work where this will be used have 2007 so I figured I'd try to shift).

I am a psychiatrist and am trying to use Word to generate templates to use for initial evaluations of patients as well as follow up progress notes, telephone contact notes, and letters for patients that I see and trying to make this usable for other doctors that are not as willing to test things out with templates. I do not need/want a full electronic medical record system (our charts are all still kept in paper format and that is fine with me) but I am trying to save myself time and maintain notes in a professional appearing format.

I currently use a fairly simple template with content controls to reproduce redundant data in the footer and in some other places in the document via xml.

Problem 1: No check boxes are available with content controls. I have seen several ways to deal with this (legacy forms, a custom content control template found on the web that will insert them) and right now I am using text content controls with legacy check boxes inserted in them and this seems to work to keep the tabbing order that I need when doing the document. Problem is that any time after a "normal" content control text box when the next item is one of these check boxes, you don't see the box highlight and so it is difficult to tell where you are in the document. Anyway, this is not a huge deal, but I didn't know if anyone had a way to deal with this so I/other users can see where they are in the document instead of just hitting the spacebar to see what gets checked.

Problem 2: To maintain a professional look to my diagnoses I have a table set up with labels on the left (Axis I, Axis II, Axis III, Axis IV, and Axis V for those who know psychiatric diagnoses) and then content controls on the right with combo boxes for diagnoses. Psychiatric patients often have multiple diagnoses in the Axis I area but there is no standard set that are used. I would like to reuse a combo box with the same diagnoses and allow the user to add 1, 2, 3, 4, etc... Axis I diagnoses while maintaining one line or row for each diagnosis with the ability to have a varied number of diagnoses depending on the patient. In other words, I want to choose a diagnosis from a list (either combo box or by accessing an external access database table) and then the ability to add another diagnosis on a new line, and then a third, etc... but when done add no more lines to the table so it looks professional. This would also apply to Axis II from a different combobox list or access table. I'm not sure if this can be done within the document itself or if I need to add a userform with some VB to do it. I think 4-5 diagnoses on each of the Axis I and Axis II lines would be sufficient if that helps at all.

Problem III: As a bonus, the format for an initial visit with a patient is different than the follow-up format but some of the xml fields would remain the same (name, medical record number, date of birth, etc...). Is there any way to make it easy (one click etc...) for users to open the initial document and then apply a new (shorter) template to the document deleting the old stuff but maintaining the common xml fields to make notes after initial intake easier to generate.

Again, I'm sorry if this stuff is more easily answered somewhere else, but I haven't found it so far. I'm more than willing to track down the info behind any of these answers if someone can point me in the correct direction or if you'd be willing to answer directly. I didn't post any code because I really don't have anything even started for the above mentioned problems but I'd be happy to post a sample if someone needs more clarification.

Thanks,

OTWarrior
07-21-2008, 12:45 AM
Welcome to the forum.

For problem 1, I am not not sure what you mean with the term content controls and legacy check boxes, (if you could post a test example of a similar document that would be helpful), but you could perhaps have a marco running on entry to each box that highlights the current box, and unhighlights it on exit. If you are using formfield boxes then I can dig out the exact code for you.

For problem 2, again, really would need to see some kind of example to really understand what you are after, but I think what you need to do rather than reuse a combo box is to add another one depending on how many you select.

Or, you can get the combo box the change it values depending on the option you choose. I have posted this code as a KB entry, but would be happy to alter it to your ends should you need it. Click here for the KB (http://www.vbaexpress.com/kb/getarticle.php?kb_id=968&PHPSESSID=58c4995362f0f4aa2bd8d6a0a05bb68d)

I don't know much about xml, but you could write a function to "Import" the data from a selected document. Again, I can knock something up for you if this would be suitable.

No need to say you are sorry, this forum is for asking questions and getting advice. Hopefully we can get you the answers you require.

rbrewington
07-21-2008, 08:06 AM
Thanks for your response.

I've been working a bit and so I am attaching a copy of what I have right now (although I had to save it as a .docm when the original is .dotm).

Problem 1 refers to what microsoft is calling content controls in word 2007. To me, this is the new rich text box, text box, combobox, list box, etc... They are all available on the ribbon under the developer tab once you set word to display that tab. Anyway, also under that ribbon, there is a drop down to use "legacy forms" where you are able to select activex controls as well as the standard forms like form fields etc... I'm not sure how to explain this well, but right now if I jump from a text content control to a checkbox content control (I had to make this custom by using a text content control with a checkbox inserted into it) by hitting the tab key with the document protected then the checkbox won't show up as somewhat highlighted so the user can see where they are. If I jump to the next content control with a checkbox then it does highlight. Sorry for the poor description, but if you open the file I attached then you'll be able to see it if you tab through to some of the available checkboxes.

I haven't really had the chance to address problem 2 yet, but you'll see that the combobox I've included under the Axis I diagnosis is quite large and so I was unsure how to deal with patient's needing different numbers of Axis I diagnoses (this can vary from patient to patient of course, but I also need to be able to go back in and add diagnoses or even delete them based as time goes by because things change in terms of diagnoses). I'm thinking a userform that opens when you hit the Axis I diagnosis line and asks how many diagnoses are needed and then displays the proper number based on the answer. I really like the idea of just hiding the extras because then I don't have to have it generate anything in terms of comboboxes and it would allow me to hide a diagnosis for one note and then unhide it if I want it back again later.

Problem 3 is what I've been working the most on because I want to be able to type one kind of note and then at the next visit, open it up and change the format to a different type of note (initial visit to progress note or telephone note etc...). I would also love for the fields to be populated automatically that are the same (so I don't have to retype this each time). The way I've tried to deal with that here is by using hidden text and it seems to work somewhat OK right now but needs more tweaking. My main complaint right now is that when I save a document generated from this template file I lose all the visual basic associated with it and thus the ability to switch back to a different syle of note. Obviously that makes this unusable in this form. I guess I could always just use it as a document and then choose "save as" to rename the file but I figured there was a better way to move all the visual basic and macros etc... with the document. Secondly, when you change the format to a standard note and then start to tab through the different entries, the document tabs through all of the content controls (whether they are visible or not) and because my initial note has a whole lot of check boxes in it, it takes forever to tab through to the next visible field. Also, I wouldn't want to accidentilly change a field that I can't see. Anyway, if I can use some version of this for switching between different versions of the note then I don't have to worry about importing any of the custom xml that I've used so that's a moot point.

Let me know what you think of what I have so far or if you have any other questions for me. I've pretty much just pieced this together from what I've found around the forums. I'll take a look at that code you mentioned as well.

Thanks,

Richard Brewington