Xml Form Generator Error

biller wrote on Friday, January 28, 2011:

I am trying to create some forms using OpenEMR Xml Form Generator.  My current setup is Oemr 4.0-dev, php4.3.2, mysql5.1.41,ubuntu9.10.  I am able to create the xml file and run the command “make INFILE=example2.xml”.  It generates the form folder however there are only 6 .php files not the seven the wiki states, it did create the .sql file.   I am then able to go into oemr admin/other/forms and register the form but when I click on install db I receive the following error  

ERROR: query failed: CREATE TABLE IF NOT EXISTS `form_example2` ( /* both extended and encounter forms need a last modified date */ date datetime default NULL comment ‘last modified date’,form_date datetime default NULL, name varchar(250), dob datetime default NULL, phone varchar(15), address varchar(250), notes TEXT, sigsig_date datetime default NULL, PRIMARY KEY (id) ) TYPE=InnoDB

Error: Key column ‘id’ doesn’t exist in table

I am thinking that since its an example there are probably some changes I should make.  Any help/guidance would be greatly appreciated.  If there is a more detailed wiki or something similar I could learn from pointing me in that direction would be greatly appreciated. 
Thanks in advance for your help  John

stephen-smith wrote on Friday, January 28, 2011:

ytiddo is our current go-to for that new form generator.  Hopefully they will click the forum link and will out this HTML form in order to answer your question soon.  I’ll make sure and ping them via email.

julialongtin wrote on Friday, January 28, 2011:

Hey,

We’ve been working on a new version of the form generator at http://sourceforge.net/tracker/index.php?func=detail&aid=3158607&group_id=60081&atid=1245239

I’m suspecting something is wrong with your example file, could you host it somewhere (like a pastebin site or somesuch), and put a link here, so i can take a look at it? specifically, i’m suspecting you’re somehow using the wrong ‘table’ type, being either form or extended.

I’d

biller1 wrote on Sunday, January 30, 2011:

stephen-smith, thanks for the help.  If julialongtin’s not able to tell me what is wrong with the example file I will wait patiently for ytiddo response

biller1 wrote on Sunday, January 30, 2011:

julialongtin, thanks for the quick response I did try to submit the lines to pastebin.  I’ve never uploaded text before so please let me know if you need additional info or if you can’t access the link.  http://pastebin.com/ue9W6AuE
Thanks again for your help  John

julialongtin wrote on Sunday, January 30, 2011:

john,

as i suspected, you forgot the required ‘type’ member of the ‘table’ element.

http://pastebin.com/wWSiHg8c

This generates the appropriate sections.
see if this works for you.

Julia Longtin

biller1 wrote on Monday, January 31, 2011:

Julia, thank you very much for your help.  It worked great.  Now that I am able to install the db form I will start working with a form and see how far I get.  Thanks again for helping me out I am very new to creating forms so I’m sure I will have future questions.

John