dhis-mobile-devs team mailing list archive
-
dhis-mobile-devs team
-
Mailing list archive
-
Message #00307
[Branch ~dhis-mobile-devs/dhis-mobile/lwuit-tracking] Rev 168: fix bug for registering person
------------------------------------------------------------
revno: 168
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: lwuit-tracking
timestamp: Thu 2013-10-10 15:12:04 +0700
message:
fix bug for registering person
modified:
src/org/hisp/dhis/mobile/connection/task/GetVariesInfoTask.java
src/org/hisp/dhis/mobile/model/LostEvent.java
src/org/hisp/dhis/mobile/view/ProgramSelectView.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/GetVariesInfoTask.java'
--- src/org/hisp/dhis/mobile/connection/task/GetVariesInfoTask.java 2013-09-25 07:35:48 +0000
+++ src/org/hisp/dhis/mobile/connection/task/GetVariesInfoTask.java 2013-10-10 08:12:04 +0000
@@ -65,6 +65,7 @@
}
finally
{
+ nameBasedMIDlet.getPersonRegistrationView().setEnrollProgramId( programId );
nameBasedMIDlet.getPersonRegistrationView().showView();
}
=== modified file 'src/org/hisp/dhis/mobile/model/LostEvent.java'
--- src/org/hisp/dhis/mobile/model/LostEvent.java 2013-10-10 04:37:14 +0000
+++ src/org/hisp/dhis/mobile/model/LostEvent.java 2013-10-10 08:12:04 +0000
@@ -60,8 +60,25 @@
dout.writeUTF( dueDate );
dout.writeInt( status );
dout.writeBoolean( isRiskCase );
- dout.writeUTF( comment );
- dout.writeUTF( SMS );
+ if ( !comment.equals( "" ))
+ {
+ dout.writeBoolean( true );
+ dout.writeUTF( comment );
+ }
+ else
+ {
+ dout.writeBoolean( false );
+ }
+
+ if ( !SMS.equals( "" ))
+ {
+ dout.writeBoolean( true );
+ dout.writeUTF( SMS );
+ }
+ else
+ {
+ dout.writeBoolean( false );
+ }
}
public void deSerialize( DataInputStream dint )
=== modified file 'src/org/hisp/dhis/mobile/view/ProgramSelectView.java'
--- src/org/hisp/dhis/mobile/view/ProgramSelectView.java 2013-10-07 08:13:22 +0000
+++ src/org/hisp/dhis/mobile/view/ProgramSelectView.java 2013-10-10 08:12:04 +0000
@@ -57,10 +57,10 @@
for ( int i = 0; i < programInfos.size(); i++ )
{
- String patientInfo = (String) programInfos.elementAt( i );
+ String programInfo = (String) programInfos.elementAt( i );
- final String id = patientInfo.substring( 0, patientInfo.indexOf( "/" ) );
- String programName = patientInfo.substring( patientInfo.indexOf( "/" ) + 1, patientInfo.length() );
+ final String programId = programInfo.substring( 0, programInfo.indexOf( "/" ) );
+ String programName = programInfo.substring( programInfo.indexOf( "/" ) + 1, programInfo.length() );
LinkButton programLink = new LinkButton( programName );
programLink.addActionListener( new ActionListener()
@@ -76,11 +76,12 @@
&& PatientAttributeRecordStore.loadPatientAttribute().size() == 0 )
{
ConnectionManager.setUrl( nameBasedMIDlet.getCurrentOrgUnit().getGetVariesInfoUrl() );
- ConnectionManager.getVariesInfo( String.valueOf( id ) );
+ ConnectionManager.getVariesInfo( String.valueOf( programId ) );
}
else
{
ConnectionManager.setUrl( nameBasedMIDlet.getCurrentOrgUnit().getGetVariesInfoUrl() );
+ nameBasedMIDlet.getPersonRegistrationView().setEnrollProgramId( programId );
nameBasedMIDlet.getPersonRegistrationView().prepareView();
nameBasedMIDlet.getPersonRegistrationView().showView();
}
@@ -88,7 +89,7 @@
else
{
ConnectionManager.setUrl( nameBasedMIDlet.getCurrentOrgUnit().getFindLostToFollowUpUrl() );
- ConnectionManager.findLostToFollowUp( id );
+ ConnectionManager.findLostToFollowUp( programId );
}
}
catch ( Exception e )