← Back to team overview

dhis-mobile-devs team mailing list archive

[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 192: add combo type for dynamic attributes

 

------------------------------------------------------------
revno: 192
committer: Hong Em <em.hispvietnam@xxxxxxxxx>
branch nick: lwuit-tracking
timestamp: Wed 2014-01-08 16:59:33 +0700
message:
  add combo type for dynamic attributes
modified:
  src/org/hisp/dhis/mobile/connection/task/GetProgramsTask.java
  src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java
  src/org/hisp/dhis/mobile/model/Patient.java
  src/org/hisp/dhis/mobile/ui/Text.java
  src/org/hisp/dhis/mobile/view/PersonDashboardView.java
  src/org/hisp/dhis/mobile/view/PersonRegistrationView.java


--
lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking
https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking

Your team DHIS mobile developers is subscribed to branch lp:~dhis-mobile-devs/dhis-mobile/lwuit-tracking.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis-mobile-devs/dhis-mobile/lwuit-tracking/+edit-subscription
=== modified file 'src/org/hisp/dhis/mobile/connection/task/GetProgramsTask.java'
--- src/org/hisp/dhis/mobile/connection/task/GetProgramsTask.java	2013-12-02 09:38:40 +0000
+++ src/org/hisp/dhis/mobile/connection/task/GetProgramsTask.java	2014-01-08 09:59:33 +0000
@@ -106,6 +106,7 @@
             String message = null;
 
             message = e.getMessage();
+            System.out.println("mess: " + message);
             if ( e.getMessage().equalsIgnoreCase( Text.HTTP_ERROR() ) )
             {
                 nameBasedMIDlet.getAlertBoxView( "Internet is not available, Please try again later.", "Alert" )

=== modified file 'src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java'
--- src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java	2013-11-05 08:47:26 +0000
+++ src/org/hisp/dhis/mobile/connection/task/PersonRegistrationTask.java	2014-01-08 09:59:33 +0000
@@ -5,6 +5,7 @@
 import org.hisp.dhis.mobile.connection.ConnectionManager;
 import org.hisp.dhis.mobile.midlet.NameBasedMIDlet;
 import org.hisp.dhis.mobile.model.Patient;
+import org.hisp.dhis.mobile.model.Program;
 import org.hisp.dhis.mobile.util.SerializationUtil;
 
 public class PersonRegistrationTask
@@ -26,30 +27,26 @@
     public void run()
     {
         this.nameBasedMIDlet = (NameBasedMIDlet) ConnectionManager.getDhisMIDlet();
+        
+        Patient patientNew = new Patient();
 
         try
         {
             DataInputStream inputStream = this.download( SerializationUtil.serialize( this.patient ), enrollProgramId,
                 "programid" );
-            Patient patientNew = new Patient();
+            
 
             if ( inputStream != null )
             {
                 patientNew.deSerialize( inputStream );
+
                 nameBasedMIDlet.getDashboardLinkView().setPatient( patientNew );
                 nameBasedMIDlet.getDashboardLinkView().showView();
             }
+            inputStream = null;
+            patientNew = null;
+            System.gc();
 
-            // String message = this.readMessage( messageStream );
-            //
-            // if ( message.equalsIgnoreCase( PATIENT_REGISTERED ) )
-            // {
-            // nameBasedMIDlet.getWaitingView().showView();
-            // nameBasedMIDlet.getDashboardLinkView().showView();
-            // }
-            // else
-            // {
-            // }
         }
 
         catch ( Exception e )

=== modified file 'src/org/hisp/dhis/mobile/model/Patient.java'
--- src/org/hisp/dhis/mobile/model/Patient.java	2013-10-22 04:04:04 +0000
+++ src/org/hisp/dhis/mobile/model/Patient.java	2014-01-08 09:59:33 +0000
@@ -64,7 +64,7 @@
     private String organisationUnitName;
 
     private Vector completedPrograms;
-    
+
     private String incidentDate;
 
     public Patient()
@@ -253,7 +253,6 @@
         throws IOException
     {
         this.setId( din.readInt() );
-        
         if ( din.readBoolean() )
         {
             this.setName( din.readUTF() );
@@ -298,7 +297,6 @@
         {
             this.setBirthDate( null );
         }
-
         if ( din.readBoolean() )
         {
             this.setRegistrationDate( new Date( din.readLong() ) );
@@ -307,7 +305,7 @@
         {
             this.setRegistrationDate( null );
         }
-        
+
         if ( din.readBoolean() )
         {
             this.setIncidentDate( din.readUTF() );
@@ -316,7 +314,6 @@
         {
             this.setIncidentDate( null );
         }
-
         if ( din.readBoolean() )
         {
             this.setPhoneNumber( din.readUTF() );
@@ -325,7 +322,6 @@
         {
             this.setPhoneNumber( null );
         }
-
         int attsNumb = din.readInt();
         if ( attsNumb > 0 )
         {
@@ -341,7 +337,6 @@
         {
             this.patientAttValues = null;
         }
-
         int numbIdentifiers = din.readInt();
         if ( numbIdentifiers > 0 )
         {
@@ -357,7 +352,6 @@
         {
             this.identifiers = null;
         }
-
         int numbPrograms = din.readInt();
 
         if ( numbPrograms > 0 )
@@ -382,7 +376,6 @@
         {
             this.setPrograms( null );
         }
-
         int numbRelationships = din.readInt();
 
         if ( numbRelationships > 0 )
@@ -401,7 +394,6 @@
         {
             this.setRelationships( null );
         }
-
         int numbEnrollmentPrograms = din.readInt();
 
         if ( numbEnrollmentPrograms > 0 )
@@ -420,7 +412,6 @@
         {
             this.setEnrollmentPrograms( null );
         }
-
         int numbEnrollmentRelationships = din.readInt();
 
         if ( numbEnrollmentRelationships > 0 )
@@ -458,13 +449,14 @@
         {
             this.setCompletedPrograms( null );
         }
+
     }
 
     public void serialize( DataOutputStream dout )
         throws IOException
     {
         dout.writeInt( this.getId() );
-        
+
         if ( name != null )
         {
             dout.writeBoolean( true );
@@ -523,7 +515,7 @@
         {
             dout.writeBoolean( false );
         }
-        
+
         if ( incidentDate != null )
         {
             dout.writeBoolean( true );
@@ -628,7 +620,7 @@
         {
             dout.writeInt( 0 );
         }
-        
+
         // Write Completed Programs
         if ( completedPrograms != null )
         {

=== modified file 'src/org/hisp/dhis/mobile/ui/Text.java'
--- src/org/hisp/dhis/mobile/ui/Text.java	2013-11-01 10:05:16 +0000
+++ src/org/hisp/dhis/mobile/ui/Text.java	2014-01-08 09:59:33 +0000
@@ -749,7 +749,7 @@
 
     public static String LINKDASHBOARD()
     {
-        return get( (short) 138, "Registered successfully, press Next to Person Dashboard or Back to Menu view." );
+        return get( (short) 138, "Registered successfully, press Next to First Data Entry View or Back to Menu view." );
     }
 
     public static String DOB_WRONG_FORMAT()

=== modified file 'src/org/hisp/dhis/mobile/view/PersonDashboardView.java'
--- src/org/hisp/dhis/mobile/view/PersonDashboardView.java	2013-10-23 04:32:49 +0000
+++ src/org/hisp/dhis/mobile/view/PersonDashboardView.java	2014-01-08 09:59:33 +0000
@@ -128,7 +128,8 @@
         }
         else
         {
-            //dob.setText( "Date of Birth: " + PeriodUtil.dateToString( patient.getBirthDate(), y, m, d ) );
+            // dob.setText( "Date of Birth: " + PeriodUtil.dateToString(
+            // patient.getBirthDate(), y, m, d ) );
             dob.setText( "Date of Birth: " + patient.getBirthDate() );
         }
         dob.setEditable( false );

=== modified file 'src/org/hisp/dhis/mobile/view/PersonRegistrationView.java'
--- src/org/hisp/dhis/mobile/view/PersonRegistrationView.java	2013-11-28 07:12:43 +0000
+++ src/org/hisp/dhis/mobile/view/PersonRegistrationView.java	2014-01-08 09:59:33 +0000
@@ -39,11 +39,11 @@
 
     private Label fullNameLabel;
 
-    private Label genderLabel;
-
-    private Label dateOfBirthLabel;
-
-    private Label phoneNumberLabel;
+    // private Label genderLabel;
+
+    // private Label dateOfBirthLabel;
+
+    // private Label phoneNumberLabel;
 
     private Label patientIdentifierLabel;
 
@@ -55,13 +55,13 @@
 
     private TextField fullNameTextField;
 
-    private ComboBox genderComboBox;
-
-    private ComboBox dateOfBirthComboBox;
-
-    private TextField dateOfBirthTextFiled;
-
-    private TextField phoneNumberTextField;
+    // private ComboBox genderComboBox;
+
+    // private ComboBox dateOfBirthComboBox;
+
+    // private TextField dateOfBirthTextFiled;
+
+    // private TextField phoneNumberTextField;
 
     private TextField patientIdentifierTextField;
 
@@ -77,17 +77,17 @@
 
     private NameBasedMIDlet nameBasedMIDlet;
 
-    private static Character APPROXIMATED = new Character( 'A' );
-
-    private static Character DECLARED = new Character( 'D' );
-
-    private static Character VERIFIED = new Character( 'V' );
-
-    private static String MALE = new String( "M" );
-
-    private static String FEMALE = new String( "F" );
-
-    private static String TRANSGENDER = new String( "T" );
+    // private static Character APPROXIMATED = new Character( 'A' );
+    //
+    // private static Character DECLARED = new Character( 'D' );
+    //
+    // private static Character VERIFIED = new Character( 'V' );
+    //
+    // private static String MALE = new String( "M" );
+    //
+    // private static String FEMALE = new String( "F" );
+    //
+    // private static String TRANSGENDER = new String( "T" );
 
     private Vector patientIdentifierValueVector = new Vector();
 
@@ -137,36 +137,38 @@
         System.gc();
 
         fullNameLabel = new Label( "Fullname(*)" );
-        genderLabel = new Label( Text.GENDER() );
-        dateOfBirthLabel = new Label( Text.DATE_OF_BIRTH() + " (*)" );
-        phoneNumberLabel = new Label( Text.PHONE_NUMBER() );
+        // genderLabel = new Label( Text.GENDER() );
+        // dateOfBirthLabel = new Label( Text.DATE_OF_BIRTH() + " (*)" );
+        // phoneNumberLabel = new Label( Text.PHONE_NUMBER() );
 
-        String genders[] = { "Female", "Male", "Transgender" };
-        String dateofBirths[] = { "Approximated", "Declared", "Verified" };
+        // String genders[] = { "Female", "Male", "Transgender" };
+        // String dateofBirths[] = { "Approximated", "Declared", "Verified" };
 
         fullNameTextField = new TextField();
-        genderComboBox = new ComboBox( genders );
-        dateOfBirthComboBox = new ComboBox( dateofBirths );
-        dateOfBirthTextFiled = new TextField();
-        phoneNumberTextField = new TextField();
-        phoneNumberTextField.setConstraint( TextField.NUMERIC );
-        phoneNumberTextField.setInputModeOrder( new String[] { "123" } );
+        // genderComboBox = new ComboBox( genders );
+        // dateOfBirthComboBox = new ComboBox( dateofBirths );
+        // dateOfBirthTextFiled = new TextField();
+        // phoneNumberTextField = new TextField();
+        // phoneNumberTextField.setConstraint( TextField.NUMERIC );
+        // phoneNumberTextField.setInputModeOrder( new String[] { "123" } );
 
-        LinkButton dobTypeDefinitionLink = new LinkButton( Text.DOBTYPE_DEFINITION() );
-        dobTypeDefinitionLink.addActionListener( new ActionListener()
-        {
-            public void actionPerformed( ActionEvent arg0 )
-            {
-                Dialog dobDialog = new Dialog( Text.DOBTYPE_DEFINITION() );
-                dobDialog.setScrollable( false );
-                Command closeCommand = new Command( Text.CLOSE() );
-                TextArea definitionTextArea = new TextArea( Text.DATE_OF_BIRTH_TYPE_DEFINITION() );
-                definitionTextArea.setFocusable( false );
-                dobDialog.addComponent( definitionTextArea );
-                dobDialog.addCommand( closeCommand );
-                dobDialog.show();
-            }
-        } );
+        // LinkButton dobTypeDefinitionLink = new LinkButton(
+        // Text.DOBTYPE_DEFINITION() );
+        // dobTypeDefinitionLink.addActionListener( new ActionListener()
+        // {
+        // public void actionPerformed( ActionEvent arg0 )
+        // {
+        // Dialog dobDialog = new Dialog( Text.DOBTYPE_DEFINITION() );
+        // dobDialog.setScrollable( false );
+        // Command closeCommand = new Command( Text.CLOSE() );
+        // TextArea definitionTextArea = new TextArea(
+        // Text.DATE_OF_BIRTH_TYPE_DEFINITION() );
+        // definitionTextArea.setFocusable( false );
+        // dobDialog.addComponent( definitionTextArea );
+        // dobDialog.addCommand( closeCommand );
+        // dobDialog.show();
+        // }
+        // } );
 
         // Hide full name text field in Uganda case
         // mainForm.addComponent( getRequiredLabel() );
@@ -217,13 +219,13 @@
             e.printStackTrace();
         }
 
-        mainForm.addComponent( genderLabel );
-        mainForm.addComponent( genderComboBox );
+        // mainForm.addComponent( genderLabel );
+        // mainForm.addComponent( genderComboBox );
 
-        mainForm.addComponent( dateOfBirthLabel );
-        mainForm.addComponent( dobTypeDefinitionLink );
-        mainForm.addComponent( dateOfBirthComboBox );
-        mainForm.addComponent( dateOfBirthTextFiled );
+        // mainForm.addComponent( dateOfBirthLabel );
+        // mainForm.addComponent( dobTypeDefinitionLink );
+        // mainForm.addComponent( dateOfBirthComboBox );
+        // mainForm.addComponent( dateOfBirthTextFiled );
         mainForm.addComponent( getDobWrongFortmatLabel() );
 
         if ( enrollProgramId != null )
@@ -233,8 +235,8 @@
             mainForm.addComponent( getTxtIncidentDate() );
             mainForm.addComponent( getRequiredLabel() );
         }
-        mainForm.addComponent( phoneNumberLabel );
-        mainForm.addComponent( phoneNumberTextField );
+        // mainForm.addComponent( phoneNumberLabel );
+        // mainForm.addComponent( phoneNumberTextField );
 
         // add attribute
         try
@@ -251,6 +253,7 @@
                 PatientAttribute patientAttribute = (PatientAttribute) patientAttributeVector.elementAt( i );
                 requireAttributeVector.addElement( patientAttribute.getName().substring(
                     patientAttribute.getName().length() - 1 ) );
+                System.out.println( "At type: " + patientAttribute.getName() + ":" + patientAttribute.getType() );
 
                 patientAttributeLabel = new Label( patientAttribute.getName() );
                 mainForm.addComponent( patientAttributeLabel );
@@ -258,12 +261,26 @@
                 if ( patientAttribute.getType().equals( "bool" ) )
                 {
                     String[] option = { "Option", "Yes", "No" };
+
                     ComboBox comboBox = new ComboBox( option );
                     comboBox.setLabelForComponent( patientAttributeLabel );
 
                     mainForm.addComponent( comboBox );
                     patientAttributeValueVector.addElement( comboBox );
                 }
+                if ( patientAttribute.getType().equals( "combo" ) )
+                {
+
+                    Vector predefinedVector = patientAttribute.getPredefinedValues();
+                    String[] options = new String[predefinedVector.size()];
+                    predefinedVector.copyInto( options );
+
+                    ComboBox comboBox = new ComboBox( options );
+                    comboBox.setLabelForComponent( patientAttributeLabel );
+
+                    mainForm.addComponent( comboBox );
+                    patientAttributeValueVector.addElement( comboBox );
+                }
                 else
                 {
                     patientAttributeTextField = new TextField();
@@ -320,12 +337,13 @@
     {
         if ( ae.getCommand().getCommandName().equals( Text.SEND() ) )
         {
-            String dobType = (String) getDateOfBirthComboBox().getSelectedItem();
-            String dateOfBirth = getDateOfBirthTextFiled().getText();
+            // String dobType = (String)
+            // getDateOfBirthComboBox().getSelectedItem();
+            // String dateOfBirth = getDateOfBirthTextFiled().getText();
             String incidentDate = getTxtIncidentDate().getText();
             isValid = true;
             // Validate Date of Birth
-            validateDOB( dobType, dateOfBirth );
+            // validateDOB( dobType, dateOfBirth );
             // Validate Incident Date
             validateIncidentDate( incidentDate );
 
@@ -362,13 +380,14 @@
         }
         else if ( ae.getCommand().getCommandName().equals( Text.SAVE() ) )
         {
-            String dobType = (String) getDateOfBirthComboBox().getSelectedItem();
-            String dateOfBirth = getDateOfBirthTextFiled().getText();
+            // String dobType = (String)
+            // getDateOfBirthComboBox().getSelectedItem();
+            // String dateOfBirth = getDateOfBirthTextFiled().getText();
             String incidentDate = getTxtIncidentDate().getText();
 
             isValid = true;
             // Validate Date of Birth
-            validateDOB( dobType, dateOfBirth );
+            // validateDOB( dobType, dateOfBirth );
             // Validate Incident Date
             validateIncidentDate( incidentDate );
 
@@ -421,18 +440,18 @@
             patientAttributeVector = null;
             patientIdentifierVector = null;
             fullNameLabel = null;
-            genderLabel = null;
-            dateOfBirthLabel = null;
-            phoneNumberLabel = null;
+            // genderLabel = null;
+            // dateOfBirthLabel = null;
+            // phoneNumberLabel = null;
             patientIdentifierLabel = null;
             patientAttributeLabel = null;
             requiredLabel = null;
             dobWrongFortmatLabel = null;
             fullNameTextField = null;
-            genderComboBox = null;
-            dateOfBirthComboBox = null;
-            dateOfBirthTextFiled = null;
-            phoneNumberTextField = null;
+            // genderComboBox = null;
+            // dateOfBirthComboBox = null;
+            // dateOfBirthTextFiled = null;
+            // phoneNumberTextField = null;
             patientIdentifierTextField = null;
             patientAttributeTextField = null;
             txtIncidentDate = null;
@@ -453,72 +472,76 @@
     {
         // No fullName for Uganda case
         // String fullName = "";
-        
+
         String fullName = this.getFullNameTextField().getText().trim();
         isValid = true;
-        String gender = (String) getGenderComboBox().getSelectedItem();
-        String dobType = (String) getDateOfBirthComboBox().getSelectedItem();
-        String dateOfBirth = getDateOfBirthTextFiled().getText();
-        String phoneNumber = getPhoneNumberTextField().getText().trim();
-
-        Character dateOfBirthType = null;
-        if ( dobType.equalsIgnoreCase( "Approximated" ) )
-        {
-            dateOfBirthType = APPROXIMATED;
-        }
-        if ( dobType.equalsIgnoreCase( "Declared" ) )
-        {
-            dateOfBirthType = DECLARED;
-        }
-        if ( dobType.equalsIgnoreCase( "Verified" ) )
-        {
-            dateOfBirthType = VERIFIED;
-        }
-
-        String genderChar = null;
-        if ( gender.equalsIgnoreCase( "male" ) )
-        {
-            genderChar = MALE;
-        }
-        if ( gender.equalsIgnoreCase( "female" ) )
-        {
-            genderChar = FEMALE;
-        }
-        if ( gender.equalsIgnoreCase( "transgender" ) )
-        {
-            genderChar = TRANSGENDER;
-        }
-
-        int currentYear = java.util.Calendar.getInstance().get( java.util.Calendar.YEAR );
-        int currentDate = java.util.Calendar.getInstance().get( java.util.Calendar.DATE );
-        int currentMonth = java.util.Calendar.getInstance().get( java.util.Calendar.MONTH ) + 1;
-
-        int birthYear;
-
-        if ( dobType.equalsIgnoreCase( "Approximated" ) && (dateOfBirth != null && !"".equals( dateOfBirth )) )
-        {
-
-            try
-            {
-                birthYear = currentYear - Integer.parseInt( dateOfBirth );
-                dateOfBirth = birthYear + "-" + currentMonth + "-" + currentDate;
-            }
-            catch ( Exception e )
-            {
-                e.printStackTrace();
-            }
-
-        }
+        // String gender = (String) getGenderComboBox().getSelectedItem();
+        // String dobType = (String) getDateOfBirthComboBox().getSelectedItem();
+        // String dateOfBirth = getDateOfBirthTextFiled().getText();
+        // String phoneNumber = getPhoneNumberTextField().getText().trim();
+
+        // Character dateOfBirthType = null;
+        // if ( dobType.equalsIgnoreCase( "Approximated" ) )
+        // {
+        // dateOfBirthType = APPROXIMATED;
+        // }
+        // if ( dobType.equalsIgnoreCase( "Declared" ) )
+        // {
+        // dateOfBirthType = DECLARED;
+        // }
+        // if ( dobType.equalsIgnoreCase( "Verified" ) )
+        // {
+        // dateOfBirthType = VERIFIED;
+        // }
+
+        // String genderChar = null;
+        // if ( gender.equalsIgnoreCase( "male" ) )
+        // {
+        // genderChar = MALE;
+        // }
+        // if ( gender.equalsIgnoreCase( "female" ) )
+        // {
+        // genderChar = FEMALE;
+        // }
+        // if ( gender.equalsIgnoreCase( "transgender" ) )
+        // {
+        // genderChar = TRANSGENDER;
+        // }
+
+        // int currentYear = java.util.Calendar.getInstance().get(
+        // java.util.Calendar.YEAR );
+        // int currentDate = java.util.Calendar.getInstance().get(
+        // java.util.Calendar.DATE );
+        // int currentMonth = java.util.Calendar.getInstance().get(
+        // java.util.Calendar.MONTH ) + 1;
+
+        // int birthYear;
+
+        // if ( dobType.equalsIgnoreCase( "Approximated" ) && (dateOfBirth !=
+        // null && !"".equals( dateOfBirth )) )
+        // {
+        //
+        // try
+        // {
+        // birthYear = currentYear - Integer.parseInt( dateOfBirth );
+        // dateOfBirth = birthYear + "-" + currentMonth + "-" + currentDate;
+        // }
+        // catch ( Exception e )
+        // {
+        // e.printStackTrace();
+        // }
+        //
+        // }
 
         Patient patient = new Patient();
         Vector attributeVector = new Vector();
         Vector identiferVector = new Vector();
 
         patient.setName( fullName );
-        patient.setGender( genderChar );
-        patient.setDobType( dateOfBirthType );
-        patient.setPhoneNumber( phoneNumber );
-        patient.setBirthDate( dateOfBirth );
+        // patient.setGender( genderChar );
+        // patient.setDobType( dateOfBirthType );
+        // patient.setPhoneNumber( phoneNumber );
+        // patient.setBirthDate( dateOfBirth );
         if ( enrollProgramId != null )
         {
             String incidentDate = getTxtIncidentDate().getText();
@@ -713,20 +736,20 @@
         return fullNameLabel;
     }
 
-    public Label getGenderLabel()
-    {
-        return genderLabel;
-    }
-
-    public Label getDateOfBirthLabel()
-    {
-        return dateOfBirthLabel;
-    }
-
-    public Label getPhoneNumberLabel()
-    {
-        return phoneNumberLabel;
-    }
+    // public Label getGenderLabel()
+    // {
+    // return genderLabel;
+    // }
+    //
+    // public Label getDateOfBirthLabel()
+    // {
+    // return dateOfBirthLabel;
+    // }
+    //
+    // public Label getPhoneNumberLabel()
+    // {
+    // return phoneNumberLabel;
+    // }
 
     public TextField getFullNameTextField()
     {
@@ -737,26 +760,26 @@
         return fullNameTextField;
     }
 
-    public ComboBox getGenderComboBox()
-    {
-        return genderComboBox;
-    }
-
-    public ComboBox getDateOfBirthComboBox()
-    {
-        return dateOfBirthComboBox;
-    }
-
-    public TextField getPhoneNumberTextField()
-    {
-        if ( phoneNumberTextField == null )
-        {
-            phoneNumberTextField = new TextField();
-            phoneNumberTextField.setConstraint( TextField.NUMERIC );
-            phoneNumberTextField.setInputModeOrder( new String[] { "123" } );
-        }
-        return phoneNumberTextField;
-    }
+    // public ComboBox getGenderComboBox()
+    // {
+    // return genderComboBox;
+    // }
+    //
+    // public ComboBox getDateOfBirthComboBox()
+    // {
+    // return dateOfBirthComboBox;
+    // }
+
+    // public TextField getPhoneNumberTextField()
+    // {
+    // if ( phoneNumberTextField == null )
+    // {
+    // phoneNumberTextField = new TextField();
+    // phoneNumberTextField.setConstraint( TextField.NUMERIC );
+    // phoneNumberTextField.setInputModeOrder( new String[] { "123" } );
+    // }
+    // return phoneNumberTextField;
+    // }
 
     public Command getPersonRegistrationBackCommand()
     {
@@ -785,10 +808,10 @@
         return personRegistrationSaveCommand;
     }
 
-    public TextField getDateOfBirthTextFiled()
-    {
-        return dateOfBirthTextFiled;
-    }
+    // public TextField getDateOfBirthTextFiled()
+    // {
+    // return dateOfBirthTextFiled;
+    // }
 
     public Label getPatientIdentifierLabel()
     {