Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Install OpenMRS
  • Install the XForms Module
  • Configure xform module
    • Login to your OpenMRS installation and select "Administration" from the menu bar
    • Select Manage Global PropertiesSettings (formerly global properties 1.8 and below) from the Maintenance section.
      • Scroll down to xforms.showModelXmlTab and type "true" in place of the "false".
      • Locate xforms.showXformsSourceTab and type "true" in place of the "false".
      • Locate xforms.xformSerializer and set it to "org.openmrs.module.xforms.serialization.DefaultXformSerializer".
      • Create a new property called xforms.xsltJRand paste the following XSLT stylesheet as it's value:

        Code Block
        
        <?xml version='1.0' encoding='UTF-8'?>
        <xsl:stylesheet version='2.0'
        xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
        xmlns:fn='http://www.w3.org/2005/xpath-functions'
        xmlns:xf='http://www.w3.org/2002/xforms' >
        <xsl:output method='xml' version='1.0' encoding='UTF-8'/>
        <xsl:template match='/'>
         <html xmlns='http://www.w3.org/1999/xhtml'
               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:ev='http://www.w3.org/2001/xml-events'
               xmlns:jr='http://openrosa.org/javarosa'
         >
        <head>   
             <title>
                <xsl:value-of select='/xf:xforms/xf:model/xf:instance/*/@name'/>
            </title>
           
            <xf:model>
                 <xsl:copy-of select='/xf:xforms/xf:model/xf:instance' />
        
                <xsl:for-each select='/xf:xforms/xf:model/xf:bind'>
               
                     <xsl:copy>
                        <xsl:attribute name='id'>
                             <xsl:value-of select='@id' />
                         </xsl:attribute>
                        
                        <xsl:attribute name='nodeset'>
                             <xsl:value-of select='@nodeset' />
                         </xsl:attribute>
                        
                         <xsl:if test='string-length(normalize-space(@type)) > 0'>
                            <xsl:attribute name='type'>
                                 <xsl:value-of select='@type' />
                             </xsl:attribute>
                         </xsl:if>
                        
                         <xsl:if test='string-length(normalize-space(@visible)) > 0'>
                             <xsl:attribute name='visible'>
                                 <xsl:value-of select='@visible' />
                             </xsl:attribute>
                         </xsl:if>
                        
                         <xsl:if test='string-length(normalize-space(@readonly)) > 0'>
                             <xsl:attribute name='readonly'>
                                 <xsl:value-of select='@readonly' />
                             </xsl:attribute>
                         </xsl:if>
                        
                         <xsl:if test='string-length(normalize-space(@required)) > 0'>
                             <xsl:attribute name='required'>
                                 <xsl:value-of select='@required' />
                             </xsl:attribute>
                         </xsl:if>
                        
                         <xsl:if test='string-length(normalize-space(@locked)) > 0'>
                             <xsl:attribute name='readonly'>
                                 <xsl:value-of select='@locked' />
                             </xsl:attribute>
                         </xsl:if>
                        
                         <xsl:if test='string-length(normalize-space(@calculate)) > 0'>
                             <xsl:attribute name='calculate'>
                                 <xsl:value-of select='@calculate' />
                             </xsl:attribute>
                         </xsl:if>
                        
                         <xsl:if test='string-length(normalize-space(@relevant)) > 0'>
                             <xsl:attribute name='relevant'>
                                 <xsl:value-of select='@relevant' />
                             </xsl:attribute>
                         </xsl:if>
               
                        <xsl:if test='string-length(normalize-space(@constraint)) > 0'>
                            <xsl:attribute name='constraint'>
                                 <xsl:value-of select='@constraint' />
                             </xsl:attribute>
                        </xsl:if>
               
                        <xsl:if test='string-length(normalize-space(@message)) > 0'>
                            <xsl:attribute name='jr:ConstraintMSG'>
                                 <xsl:value-of select='@message' />
                             </xsl:attribute>
                        </xsl:if>
                       
                        <xsl:if test="@id='patient.medical_record_number'">
                                                 <xsl:attribute name="jr:preload">
                                                   <xsl:text>context</xsl:text>
                                                 </xsl:attribute>
        
                                                 <xsl:attribute name="jr:preloadParams">
                                                     <xsl:text>preloaded-patient-identifier</xsl:text>
                                                 </xsl:attribute>
                                        </xsl:if>
        
           
                   </xsl:copy>
                
                </xsl:for-each>
        
               </xf:model>
              
         </head>
         
         <body>
             <xsl:for-each select='/xf:xforms/*'>
               <xsl:if test='local-name() != "model"'>
                     <xsl:copy-of select='.' />
               </xsl:if>
             </xsl:for-each>
         </body>
         </html>
         
        </xsl:template>
        </xsl:stylesheet>
        

        If copying and pasting doesn't work try copying and pasting from this text file. (Note: this is an updated format which will allow you to enter forms based on the patient identifier rather them already being synchronized to the phone.)

Creating A Compatible XForm

...

The following is a list of corrections that remain to be made to this version of OpenMRS-JR.

Bug/Task Number

Priority

Description

1

Low

When logging into OpenMRS-JR for the first time, you must hit the backspace key (or various other keys) before the field will allow you to type in the server address.

2

Medium

When entering the password, you must hit an initial button before it will take you to the field to actually fill in the password.  This could be confusing because you may think you have entered the first character of your password, but it didn't actually accept it.

3

Medium

When selecting the "Login" button it give a menu where you must choose Login a second time, or Exit.

4

Medium

When entering the "OpenMRS Patient Identifier" you must hit a button before it will allow you to enter the actual patient identifier.

5

Low

When selecting the form to fill out, it gives the popup menu of other options.  It should go straight to the form that was highlighted.

6

Medium

When filling out the form, you must press Select, Select (or various other keys) to enter the encounter datetime. It should go straight to the field to start accepting the date.

7

High

After entering the "OpenMRS Patient Identifier", pressing Select causes a popup menu to appear.  No menu should be shown and it should proceed to "Goto forms" directly.

8

Enhancement

Require double-entry of the "OpenMRS Patient Identifier" to ensure it's entered properly. Refuse the entry if they don't match.

9

High

When filling out the form, when you press the select button, it causes a pop-up menu to appear.  There should be no menu to confirm the selection. Note: it doesn't matter which field type, it should never show this menu.

10

High

When choosing to send the form now or send the form later, don't show the popup menu (with the only option to Select the field). Do the selected action immediately.

11

High

After sending forms or trying to send forms and they fail to send; either "sending now" after filling out the form or when sending all forms later, the program freezes, or gets stuck, or gets stuck in a loop to send the forms again.

12

Enhancement

Optionally limit the "OpenMRS Patient Identifier" field to numeric values only.

13

Highest Priority - Enhancement

After OpenMRS-JR is initially installed, and the field has a value stored, do no show the URL screen for future logins.

14

Low

After sending forms, it gives a message

Code Block
"Successfully Submitted. Today we have received ${0} forms from you."

  The value for number of forms never changes.  Either have it tell you how many forms have been received, or remove the last phrase of the message.

15

 

Multi-Select observations in the form cause the program to crash...
"ko ko unhandled exception in gui-clp => java.lang.NullPointerException[null]" (To create a Multi-Select field, in the form Schema, check the box next to "Select Multi?", and then design the form.

16

Low

Passwords longer than 10 characters are not accepted.

17

High

At the username and password login screen, selecting Login without entering a password allows the user to enter the program.

18

Low

Remove 'SMS Test (Munaf)' from the hard-coded list of forms.

19

Low

When downloading forms to the telephone after the initial form download, it adds a duplicate form name to the list of forms.  If the form is already on the telephone, it should simply replace the currently existing form with the new form that was just downloaded.

20

Low

If you choose to "Send Current" from the list of completed forms under "View Unsent" (when none are selected) it causes an error...
Index Out of Bounds java/lang/IndexOutOfBoundsException the index [-1] is not valid for this list with the size [0].

21

High

When there are many forms that have been entered and stored on the phone to send later, and you connect to the network, "View Unsent", and choose to "Send all", not all of the forms are sent.

22

CRITICAL

Error in server log when attempting to upload forms from phone: ERROR - XformsQueueProcessor.submitXForm(297) |2012-03-14 12:32:06,017| Expected patient family name value java.lang.Exception: Expected patient family name value.  Click to see the full stack trace. This may be the root cause of bug 21 above. This doesn't happen for all patients that the forms are filled out for.  All are being entered by the Identifier rather than being chosen from the list on the phone. - This error happened because the patient identifier the user entered didn't exist.  See XFRM-65.

23

Low

If you choose to "Send Current" or "Send All" from the list of completed forms under "View Unsent", it should not prompt the user if they want to "Send now" or "Send later".  It should connect and send immediately.

24

Low (for now)

The cohorts of patient demographics are not cached on the phone.  If you are working offline, the list of patients isn't visible without connecting to the server.

25

High

There was a change to the XForms module that prevents OpenMRS-jr from connecting to XForms 4.0.9.7 and later.  4.0.9.5 works properly.  See Daniel for info on the change he made.

26

Low

Patient XForm Design (for creating a new patient) doesn't sync to phone.