Open GoogleCodeExporter opened 9 years ago
I have had this problem as well. It seems to be an issue with the format of the
file that OpenMRS's XForms module puts out. It doesn't have a "head" element,
so it throws an exception. Here is where you throw the error:
in org.odk.collect.android.provider.FormsStorage line 283:
Element cur = doc.getRootElement().getElement(html, "head");
The OpenMRS XForms module doesn't output a file with a "head" element, so it
crashes here. I think that their XForms look weird personally, but this program
should be able to read whatever it spits out. Here's what the beginning of an
OpenMRS XForms output looks like for reference...
<xf:xforms xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jr="http://openrosa.org/javarosa">
<xf:model id="openmrs_model">
<xf:instance id="openmrs_model_instance">
<form xmlns:openmrs="/moduleServlet/formentry/forms/schema/17-13" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" id="17" name="AMPATH Pediatric Return Visit Form" version="3.1">
<header>
<enterer/>
<date_entered/>
<session/>
<uid/>
</header>
<patient>
<patient.patient_id openmrs_table="patient" openmrs_attribute="patient_id"/>
<patient.family_name openmrs_table="patient_name" openmrs_attribute="family_name"/>
<patient.given_name openmrs_table="patient_name" openmrs_attribute="given_name"/>
<patient.middle_name openmrs_table="patient" openmrs_attribute="middle_name"/>
<patient.medical_record_number openmrs_table="patient_identifier" openmrs_attribute="identifier"/>
Original comment by nwil...@gmail.com
on 9 Sep 2011 at 4:56
Original comment by yanokwa
on 21 Oct 2011 at 8:00
Found a solution btw... Set the xforms property from purc forms to javarosa and
it works fine.
Original comment by nwil...@gmail.com
on 21 Oct 2011 at 10:14
Original comment by yanokwa
on 25 May 2012 at 8:07
hi
I am unable to change the xforms property. Whenever I try to edit it, it is not
saved. Can you please suggest how to change the same.
Thanks
Original comment by Talhaahm...@iiitd.ac.in
on 27 May 2014 at 9:33
Original issue reported on code.google.com by
yanokwa
on 2 Jul 2011 at 3:05