Creating A New Feture: Auto Note

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Creating A New Feture: Auto Note

Post by EagleWing » Wed Jun 27, 2007 7:40 am

Hello Everyone!
My dad who is a dentist uses Practice Works :cry: and started looking at other alternatives because of rumors that Kodak was going to drop support for it. Thats when he stumbled on Open Dental. He took a look at it and noticed that some features were missing. I explained that open source software takes time to add features. Sad as it is he still likes practice works better and is still using it.

I want to start helping out by slowly adding automation features. The one that I am working on right now allows the user to create custom forms complete with text boxes, combo boxes, and check boxes. Once he creates the form
he can access the different forms by clicking on a button on top of the "TextNotes" inside of FormProcEdit. This would bring up a list of the different custom forms that they can use. After filling in the information the resulting note is put in the TextNotes. I'm not a dentist so forgive my lack of technical jargon but here is a example not related to dentistry. If you want your assistant to jot down how your patient came to the office
you would create a combo box with the options: "car", "skateboard", and "walking". The assistant would then only need to select the one of the options and the output would be something like this "transportation: car".

This is especially useful if some one cannot spell, and according to my dad
is much faster because now he doesn't have to type out all the notes after work. Hope this was clear :D.
God Bless,
EagleWing

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Wed Jun 27, 2007 8:20 am

Yes, some users would like to do this. I think everyone understands the goal. I have some technical questions about the implementation. For each object on the form, you need to store at least these properties:
xpos
ypos
width
height
text
objecttype (checkbox, textbox, label, etc)
picklist (for some object types. Requires another table?)
resulttext (the output result string from filling out form objects)

The above is a very rough draft. But where are you storing all this data? Did you create a set of database tables? Or is it stored as some sort of text file? It seems like a daunting task.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Wed Jun 27, 2007 9:37 pm

To tell you the truth I already built the a functional rough draft of the program and it worked. That's when tragedy struck and the laptop I was using had to be sent in for repairs and I forgot to backup the latest version of the program :( .

To answer your question the options for combo box and radio buttons are stored in a text file and read line for line and added in the appropriate order.
The positions and size are predetermined. The only things I need to save in the data base are 4+- columns: MainName, Name of variable, Type, and Text that will appear as label in front of the text box etc.

I do have a question about the data format to use. In the program that I built I used SQL Express Edition which is free and integrates nicely into visual C#.
Would that create any problems?
Thanks for the quick reply
EW

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Jun 28, 2007 6:15 am

So was your program a stand alone which got launched externally to Open Dental, or did you customize OD by altering the source code and recompiling?

In either case, once you get it working again, you could submit the code for inclusion. We would have to edit it somewhat, especially to use MySQL instead of MS-SQL. But I don't think it would hurt to build your version using MS-SQL as long as you understood that we would be changing it.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Jun 28, 2007 7:25 am

When I first started I tried to integrate it into OD and that is still my goal but when I first started I 6 months ago the OD source code was to daunting. Right now I'm trying to integrate it which seems to be working very well also like I said it doesn't require a lot of database columns and so converting it should not be a problem.
EW

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Jun 28, 2007 10:23 am

I have a question: where should I save the text files for the combo boxes?
Also the method I used from the book I'm using doesn't seem to work.
It says that Visual C# automatically creates the file path for the text file if it doesn't exist. That doesn't seem to be true as I get an exception.

Method #2 isn't much better
System.IO.StreamWriter objTxtFile = new System.IO.StreamWriter(System.AppDomain.CurrentDomain.BaseDirectory + @"\Text Files\" + @"\" + textBoxName.Text.ToString() + @".txt");
Hope I'm not asking to many questions :?
EW

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Jun 28, 2007 1:12 pm

I've decided to just save the text file in the base directory which seems to work fine for now

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Jun 28, 2007 2:21 pm

Ask away.

I would create a column in the database, and simply dump all the text into it. One "cell" in the database can store an entire novel if needed. I assume you already have a database row that you're working with, right? So the "text file" is just one more column in that row now.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Jun 28, 2007 2:55 pm

Are you saying that you can add text line for line in a database row(cell) ?
How would you do that?
Right now I use a text file that stores the individual options for the combo box
The name of the text file is the name that the user gives to the combo box.

I have about 75% of the program back in order from where I was last time.
Thanks for the quick reply8).

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Jun 28, 2007 9:37 pm

Go ahead and use text files. Once you get it working, I can quickly adapt it to the database so nobody has to mess with the text files anymore.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Aug 02, 2007 3:11 pm

Hello Again!
Sorry for the long span of silence :? . My school year is going to gegin soon so I am trying to get this done as fast as I can. I have decided to nix the text boxes and check boxes as they are causing too many problems. My dad says he realy doesn't use them any ways. As a plus you can always enter in custom information on a combo box.

Thanks and God Bless!


PS if someone can recomend a good movie tutorial maker for screen capture so I can make a vedeo tutorial I would Really apreciate it.
I've already tried wink which has almost unuseable sound quality.

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Aug 02, 2007 3:27 pm

Well, we use Captivate from Adobe and it goes straight to Flash format. Sort of spendy for a small project, though.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Fri Aug 03, 2007 5:35 am

I'd like to keep it free. I'll just have to use the tried and true text format and hope that I can keep myself clear.

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Mon Aug 06, 2007 8:26 pm

One issue that has been buging me forever is what the overloads are for the ProcEdit.cs. I've tried "reverse engineering" but with small sucsess.

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Tue Aug 07, 2007 10:18 am

The parameters in the FormProcEdit.cs constructor are simply to pass in the current patient objects. They are clumsy and a relic from earlier versions. Obviously, it would be better if FormProcEdit.cs obtained those objects internally for better encapsulation. But it seems like low priority. Just look to see where it's called to see how to get the data. Is that what you meant?
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Tue Aug 07, 2007 10:51 am

I dont think I explained what I wanted to ecomplish clearly anough. My fault.
Here is a quick rundown. The user double clicks on the "gridProg" inside of "ContrChart" to bring up the procedit. I understand that it has to load all the patiant info. The user then clicks on a button labeld "'Use Auto Note" they select the Auto Note that they want to use, fill in the information, and click "ok".

This is where the problem lies. All the info that the user enters into the Auto Note gets saved into a text pad named "AutoNoteOutput". Now the "ProcEdit" loads the text from the text pad and the user can edit and save the note as usual. The problem is I cant start the ProcEdit form the Auto Note form whithout the overloads. As of now the user has to re-double click onto the "gridProg" for the text to be loaded.


In short I whant to be able to start the ProcEdit from the Auto Note.
I could just send it in and let someone else deal with it who knows what he's doing but that would be cheating :D !

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Tue Aug 07, 2007 11:04 am

When they click OK from within the autonote, wouldn't the text just go back into the textbox of the FormProcEdit that's already open? Why do you need to "start FormProcEdit" if it's already open?
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Tue Aug 07, 2007 9:32 pm

I've made some improvements namely that the user can change what autonote there working within the useautonoteform and the auto note will load instantly.

The problem with the ProcEdit looms on :cry:. I've tried lots of different things and can't find a way to add the autonote result without reloading the ProcEdit.

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Wed Aug 08, 2007 1:23 pm

I got it to work by just using a Activated event on the proc edit that would read off of a text pad. I wanted to use a class but from my experience that would be impossible. Without restarting the ProcEdit. I also got the text Boxes working again. The check boxes are still not functioning though :x. I'm working on those now.

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Wed Aug 08, 2007 9:41 pm

Hello,

I keep getting this error message when I try to debug "Could not find Misc/app.ico" referenced by assembly 'bin\Realese\OpenDental.exe.manifest'
Also another one with the same content except that it could not find the "Misc\TerminalMgr.ico"
This error is driving me insane!
The last time it worked was before I tried to do a test publish I think.
If someone has had the problem before and knows how to solve it I would Appreciate it.
Thanks

PS.Also I'm sad to say but I think it is impossible to check the status of a custom check box I've done practically everything including a post on the msdn forums. Sorry :cry:.

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Thu Aug 09, 2007 9:15 am

I still don't understand the basic problem. When they click OK from within the autonote, the text should just go back into the textbox of the FormProcEdit. No events. No reload. Nothing fancy. It's quite simple. Specifically, you have a public string in the autonote form. Once the form is closed, you copy that string into the textbox. It's very straightforward. I don't know about the icon errors. I never get those. I think the thing to do is to send that form to us at some point. Did you already add your database table? If so, then we need those related files as well.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Aug 09, 2007 10:11 am

OK sorry for asking so many questions. I've gotten around the error messages. Now I'm probably going to send in a build today after I double check everything.
Thank you so much for all of your help!
PS: jordensparks I'll Email you a read me with the basic changes later today.

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Aug 09, 2007 11:33 am

I just finished reading the Strict coding rules and just want to make sure I understand everything.
The Language enabling is a feature that makes open dental universal because it automatically translates everything to the local language.
This means I would just call up Lan.F(this); at the load method and call it up for all message boxes correct?

Another question. I what the deal with tab and spaces. I can't find the tabs option in "Tools | Options. Go to the Text Editor category, C#, Tabs. " in my version(visual C# 2005 express edition).

Should I send in just part of the program like just the part where the user creates the Auto Note? Or the whole thing?

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Thu Aug 09, 2007 9:17 pm

Do I call the main support # for the password to enter commits?

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Sat Aug 11, 2007 9:42 am

I just updated the coding styles page with this: If you are using C# Express Edition, and you don't see the "Tabs" group under Text Editor, C#, look down a little bit and find the checkbox to show all groups. The "Tabs" group will then be visible.

The problem here with you committing is that you seem to have diverged from the trunk a long time ago. You made a lot of changes before doing any commits. If you are new to Subversion, there is a high risk that trying to submit a lot of code will result in a big mess. I suggest that the best way to do this is to submit the code in the form of an email to me. In the meantime, create a brand new folder and download the code from the current head to that folder. Then, use SVN to keep it updated. If you later need to make a change, you would start with a very SMALL change, not a big change like you are proposing. I'm talking about maybe editing one or two lines. So I'm not sure I feel comfortable yet with you having a password for performing commits if your plan is to commit large changes.

Email me the files, and I'll work them in.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Sat Aug 11, 2007 12:49 pm

I only made changes to the "procedit" (a button and some code after the comment //autonote ) and added one menu item in the "menuItemSettings" on the FormOpenDental.
I'm E-mailing you the code right now.

User avatar
jordansparks
Site Admin
Posts: 5755
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Post by jordansparks » Sat Aug 11, 2007 1:48 pm

I'm starting to integrate your code. Get a copy of the head on your computer, and frequently update it as I go along.
Jordan Sparks, DMD
http://www.opendental.com

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Sat Aug 11, 2007 2:00 pm

Roger!

EagleWing
Posts: 39
Joined: Wed Jun 27, 2007 7:02 am
Location: Oklahoma

Post by EagleWing » Mon Aug 27, 2007 9:23 am

Just wanted to let everyone know that the Auto Note feature has NOT died!
I've been working on rewriting everything so that it conforms more to the Open Dental format. I want to thank Dr. Sparks for his continual support!

EW

Post Reply