Have you had success implementing FormEntry Module?

0 views
Skip to first unread message

Charles Thompson

unread,
Jan 29, 2013, 2:33:44 PM1/29/13
to implem...@openmrs.org
I'm trying to follow the steps in a tutorial found here:

When I try to follow the steps in the Standalone 1.9.2 with FormEntry Module 4.5.9.4 I get this Java exception:

Since the comments indicate that FormEntry isn't supported in 1.9.x, I tried Standalone 1.8.4 with the same version of the module. When clicking "Manage XSN Archives" I get a "SQLGrammarException" exception with the following stack trace:

In the tutorial, it looks like he's using OpenMRS version 1.5.0. Do I have to go that far back if I want the FormEntry module to work? Has anyone gotten it working with a newer version?

Jeremy Keiper

unread,
Jan 29, 2013, 2:49:44 PM1/29/13
to implem...@openmrs.org
It appears you have encountered a bug in the Manage XSN Archives page (which I wrote).  Please file a ticket for this under the Form Entry Module project at https://tickets.openmrs.org.

The "Manage XSN Archives" page is meant to allow you to look at all forms and make sure you do not have excess archived XSNs in the database.  It allows you to migrate XSNs you no longer need to the file system, ensuring at least one XSN is still associated with every form.  XSN archives are created automatically upon uploading or rebuilding a XSN -- the one previously associated with that form is archived but never removed unless you use this page to clean it up.

The error might have occurred if no XSNs exist yet in the database.  Have you published or rebuilt your XSNs yet?  You will need to set the formentry global property for the local address before rebuilding all XSNs, but otherwise this will be a good way to ensure several XSNs exist in your database before trying to manage them.



Jeremy Keiper
OpenMRS Core Developer
AMPATH / IU-Kenya Support



--
OpenMRS Implementers: http://go.openmrs.org/implementers
Post: implem...@openmrs.org
Unsubscribe: implementers...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 

Charles Thompson

unread,
Jan 29, 2013, 3:13:05 PM1/29/13
to implem...@openmrs.org
Okay, thanks for the prompt response. I created the ticket. It's my first ever, so please advise if there's something I can do better. In answer to your question concerning whether or not there are XSNs in the database, the answer is that I loaded in some XSNs running the script provided here at the link labeled "Demo XSNs":

It populates the "formentry_xsn" table, but looking now, I see that there's a "formentry_archive" table that is empty. I imagine this might be the source of the exception?

Charlie

Jeremy Keiper

unread,
Jan 29, 2013, 3:36:31 PM1/29/13
to implem...@openmrs.org
It's possible ... I don't remember offhand which table I pulled XSNs from, but I thought formentry_archive was an old (deprecated but not removed) table.  There should be an "archived" column in the formentry_xsn table.  If you imported an old version of the table, you might need to update the database schema by hand or do some magical incantations to run chunks of the upgrade process.  The table description should look like this:

mysql> desc formentry_xsn;
+------------------+----------+------+-----+---------------------+----------------+
| Field            | Type     | Null | Key | Default             | Extra          |
+------------------+----------+------+-----+---------------------+----------------+
| formentry_xsn_id | int(11)  | NO   | PRI | NULL                | auto_increment |
| form_id          | int(11)  | NO   | MUL | NULL                |                |
| xsn_data         | longblob | NO   |     | NULL                |                |
| creator          | int(11)  | NO   | MUL | 0                   |                |
| date_created     | datetime | NO   |     | 0000-00-00 00:00:00 |                |
| archived         | int(1)   | NO   | MUL | 0                   |                |
| archived_by      | int(11)  | YES  | MUL | NULL                |                |
| date_archived    | datetime | YES  |     | NULL                |                |
| uuid             | char(38) | NO   | UNI | NULL                |                |
+------------------+----------+------+-----+---------------------+----------------+
9 rows in set (0.02 sec)

If it looks different, let me know ... I might be able to get you a few lines of SQL to get you up to speed.


Jeremy Keiper
OpenMRS Core Developer
AMPATH / IU-Kenya Support


Reply all
Reply to author
Forward
0 new messages