[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openmrs-implementers
Subject:    Re: Have you had success implementing FormEntry Module?
From:       Jeremy Keiper <jeremy () openmrs ! org>
Date:       2013-01-29 20:36:31
Message-ID: CAHis0oo05VOez30-B=VHWJvq_75EJ7KFQfjei_sPahOTt6gTXg () mail ! gmail ! com
[Download RAW message or body]

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


On Tue, Jan 29, 2013 at 3:13 PM, Charles Thompson <charliet@gmail.com>wrote:

> 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":
>
> https://wiki.openmrs.org/display/docs/FormEntry+Module#FormEntryModule-ExampleUsage
>
> 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
>
> On Tue, Jan 29, 2013 at 3:49 PM, Jeremy Keiper <jeremy@openmrs.org> wrote:
>
>> 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
>>
>>
>> On Tue, Jan 29, 2013 at 2:33 PM, Charles Thompson <charliet@gmail.com>wrote:
>>
>>> I'm trying to follow the steps in a tutorial found here:
>>> http://blip.tv/openmrs/simple-data-collection-in-openmrs-1519814
>>>
>>> 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:
>>> https://tickets.openmrs.org/browse/FORM-134
>>>
>>> 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:
>>> http://pastebin.com/miADa8Vs
>>>
>>> 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?
>>>
>>>  --
>>> OpenMRS Implementers: http://go.openmrs.org/implementers
>>> Post: implementers@openmrs.org
>>> Unsubscribe: implementers+unsubscribe@openmrs.org
>>> Manage your OpenMRS subscriptions at https://id.openmrs.org/
>>>
>>>
>>>
>>
>>  --
>> OpenMRS Implementers: http://go.openmrs.org/implementers
>> Post: implementers@openmrs.org
>> Unsubscribe: implementers+unsubscribe@openmrs.org
>> Manage your OpenMRS subscriptions at https://id.openmrs.org/
>>
>>
>>
>
>
>
> --
> http://thompcha.wordpress.com/
>
> --
> OpenMRS Implementers: http://go.openmrs.org/implementers
> Post: implementers@openmrs.org
> Unsubscribe: implementers+unsubscribe@openmrs.org
> Manage your OpenMRS subscriptions at https://id.openmrs.org/
>
>
>

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



[Attachment #3 (text/html)]

<div dir="ltr">It&#39;s possible ... I don&#39;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 &quot;archived&quot; 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:<div>

<br></div><div><div><font face="courier new, monospace" size="1">mysql&gt; desc \
formentry_xsn;</font></div><div><font face="courier new, monospace" \
size="1">+------------------+----------+------+-----+---------------------+----------------+</font></div>


<div><font face="courier new, monospace" size="1">| Field            | Type     | \
Null | Key | Default             | Extra          |</font></div><div><font \
face="courier new, monospace" \
size="1">+------------------+----------+------+-----+---------------------+----------------+</font></div>


<div><font face="courier new, monospace" size="1">| formentry_xsn_id | int(11)  | NO  \
| PRI | NULL                | auto_increment |</font></div><div><font face="courier \
new, monospace" size="1">| form_id          | int(11)  | NO   | MUL | NULL            \
|                |</font></div>

<div><font face="courier new, monospace" size="1">| xsn_data         | longblob | NO  \
|     | NULL                |                |</font></div><div><font face="courier \
new, monospace" size="1">| creator          | int(11)  | NO   | MUL | 0               \
|                |</font></div>

<div><font face="courier new, monospace" size="1">| date_created     | datetime | NO  \
|     | 0000-00-00 00:00:00 |                |</font></div><div><font face="courier \
new, monospace" size="1">| archived         | int(1)   | NO   | MUL | 0               \
|                |</font></div>

<div><font face="courier new, monospace" size="1">| archived_by      | int(11)  | YES \
| MUL | NULL                |                |</font></div><div><font face="courier \
new, monospace" size="1">| date_archived    | datetime | YES  |     | NULL            \
|                |</font></div>

<div><font face="courier new, monospace" size="1">| uuid             | char(38) | NO  \
| UNI | NULL                |                |</font></div><div><font face="courier \
new, monospace" size="1">+------------------+----------+------+-----+---------------------+----------------+</font></div>


<div><font face="courier new, monospace" size="1">9 rows in set (0.02 \
sec)</font></div></div><div><br></div><div style>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.</div>

</div><div class="gmail_extra"><br clear="all"><div><br>Jeremy Keiper<br>OpenMRS Core \
Developer<br>AMPATH / IU-Kenya Support</div> <br><br><div class="gmail_quote">On Tue, \
Jan 29, 2013 at 3:13 PM, Charles Thompson <span dir="ltr">&lt;<a \
href="mailto:charliet@gmail.com" target="_blank">charliet@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">

Okay, thanks for the prompt response. I created the ticket. It&#39;s my first ever, \
so please advise if there&#39;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 &quot;Demo \
XSNs&quot;:<div>


<a href="https://wiki.openmrs.org/display/docs/FormEntry+Module#FormEntryModule-ExampleUsage" \
target="_blank">https://wiki.openmrs.org/display/docs/FormEntry+Module#FormEntryModule-ExampleUsage</a></div><div><br></div><div>


It populates the &quot;formentry_xsn&quot; table, but looking now, I see that \
there&#39;s a &quot;formentry_archive&quot; table that is empty. I imagine this might \
be the source of the exception?</div> <div><br></div><div>Charlie</div><div><div><div \
class="h5"><br><div class="gmail_quote">On Tue, Jan 29, 2013 at 3:49 PM, Jeremy \
Keiper <span dir="ltr">&lt;<a href="mailto:jeremy@openmrs.org" \
target="_blank">jeremy@openmrs.org</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">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 <a href="https://tickets.openmrs.org" \
target="_blank">https://tickets.openmrs.org</a>.<div>




<br></div><div>The &quot;Manage XSN Archives&quot; 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.</div>




<div><br></div><div>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.</div>


<span><font color="#888888">

<div><br></div></font></span></div><div class="gmail_extra"><span><font \
color="#888888"><br clear="all"><div><br>Jeremy Keiper<br>OpenMRS Core \
Developer<br>AMPATH / IU-Kenya Support</div></font></span><div> <div>
<br><br><div class="gmail_quote">On Tue, Jan 29, 2013 at 2:33 PM, Charles Thompson \
<span dir="ltr">&lt;<a href="mailto:charliet@gmail.com" \
target="_blank">charliet@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">




<div>I&#39;m trying to follow the steps in a tutorial found here:</div><div><a \
href="http://blip.tv/openmrs/simple-data-collection-in-openmrs-1519814" \
target="_blank">http://blip.tv/openmrs/simple-data-collection-in-openmrs-1519814</a><br>





</div><div><br></div>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:<div><a \
href="https://tickets.openmrs.org/browse/FORM-134" \
target="_blank">https://tickets.openmrs.org/browse/FORM-134</a><br>




</div><div><div><br></div><div>Since the comments indicate that FormEntry isn&#39;t \
supported in 1.9.x, I tried Standalone 1.8.4 with the same version of the module. \
When clicking &quot;Manage XSN Archives&quot; I get a &quot;SQLGrammarException&quot; \
exception with the following stack trace:</div>




</div><div><a href="http://pastebin.com/miADa8Vs" \
target="_blank">http://pastebin.com/miADa8Vs</a><br></div><div><br></div><div>In the \
tutorial, it looks like he&#39;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?</div>




<span><font color="#888888"><div><br></div>

<p></p>

-- <br>
OpenMRS Implementers: <a href="http://go.openmrs.org/implementers" \
                target="_blank">http://go.openmrs.org/implementers</a><br>
Post: <a href="mailto:implementers@openmrs.org" \
                target="_blank">implementers@openmrs.org</a><br>
Unsubscribe: <a href="mailto:implementers%2Bunsubscribe@openmrs.org" \
target="_blank">implementers+unsubscribe@openmrs.org</a><br> Manage your OpenMRS \
subscriptions at <a href="https://id.openmrs.org/" \
target="_blank">https://id.openmrs.org/</a><br>  <br>
 <br>
</font></span></blockquote></div><br></div></div></div><div><div>

<p></p>

-- <br>
OpenMRS Implementers: <a href="http://go.openmrs.org/implementers" \
                target="_blank">http://go.openmrs.org/implementers</a><br>
Post: <a href="mailto:implementers@openmrs.org" \
                target="_blank">implementers@openmrs.org</a><br>
Unsubscribe: <a href="mailto:implementers%2Bunsubscribe@openmrs.org" \
target="_blank">implementers+unsubscribe@openmrs.org</a><br> Manage your OpenMRS \
subscriptions at <a href="https://id.openmrs.org/" \
target="_blank">https://id.openmrs.org/</a><br>  <br>
 <br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span \
class="HOEnZb"><font color="#888888">-- <br><a href="http://thompcha.wordpress.com/" \
target="_blank">http://thompcha.wordpress.com/</a>

</font></span></div><div class="HOEnZb"><div class="h5">

<p></p>

-- <br>
OpenMRS Implementers: <a href="http://go.openmrs.org/implementers" \
                target="_blank">http://go.openmrs.org/implementers</a><br>
Post: <a href="mailto:implementers@openmrs.org" \
                target="_blank">implementers@openmrs.org</a><br>
Unsubscribe: <a href="mailto:implementers%2Bunsubscribe@openmrs.org" \
target="_blank">implementers+unsubscribe@openmrs.org</a><br> Manage your OpenMRS \
subscriptions at <a href="https://id.openmrs.org/" \
target="_blank">https://id.openmrs.org/</a><br>  <br>
 <br>
</div></div></blockquote></div><br></div>

<p></p>

-- <br />
OpenMRS Implementers: <a \
href="http://go.openmrs.org/implementers">http://go.openmrs.org/implementers</a><br \
                />
Post: implementers@openmrs.org<br />
Unsubscribe: implementers+unsubscribe@openmrs.org<br />
Manage your OpenMRS subscriptions at <a \
href="https://id.openmrs.org/">https://id.openmrs.org/</a><br /> &nbsp;<br />
&nbsp;<br />



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic