mohan-nishit / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

clinic crashes on patient select #248

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
> 2: ODKclinic: This product is used for data delivery from OpenMRS to a
> mobile phone. http://code.google.com/p/opendatakit/wiki/ODKClinic “To
> this end, Clinic provides patient demographic and encounter history
> download.”. There is nothing written about uploading forms. We
> downloaded ver 1.0.software and installed on Androids and Google
> emulator. Appears as version 0.0.1. Linked to pre-installed url/pw/
> user - downloaded 2 cohorts 30s and Pregnant. Selcted Pregnant and
> downloaded patients. When we try to access ANY patient with Android or
> emulator, program crashes with message, "Application ODK Clinic
> (process org.odk.clinic.android) has stopped unexpectedly. Please try
> again.We have not been able to get past this point.

Original issue reported on code.google.com by yanokwa on 2 Jul 2011 at 3:05

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago

Original comment by yanokwa on 21 Oct 2011 at 8:00

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

Original comment by yanokwa on 25 May 2012 at 8:07

GoogleCodeExporter commented 9 years ago
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