-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ephraim Muhia <emuhia@ona.io>
- Loading branch information
Ephraim Muhia
committed
Jan 22, 2018
1 parent
f914dec
commit a2fe2d1
Showing
18 changed files
with
1,303 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
opensrp-path/src/main/java/org/smartregister/path/domain/Cumulative.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package org.smartregister.path.domain; | ||
|
||
import android.util.Log; | ||
|
||
import org.smartregister.path.repository.CumulativeRepository; | ||
|
||
import java.io.Serializable; | ||
import java.text.ParseException; | ||
import java.util.Date; | ||
|
||
/** | ||
* Created by keyman on 22/01/18. | ||
*/ | ||
public class Cumulative implements Serializable { | ||
private Long id; | ||
private Integer year; | ||
private Long csoNumber; | ||
private Long zeirNumber; | ||
private Date createdAt; | ||
private Date updatedAt; | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Integer getYear() { | ||
return year; | ||
} | ||
|
||
public void setYear(Integer year) { | ||
this.year = year; | ||
} | ||
|
||
public Date getYearAsDate() { | ||
if (year == null) { | ||
return null; | ||
} | ||
try { | ||
return CumulativeRepository.DF_YYYY.parse(year.toString()); | ||
} catch (ParseException e) { | ||
Log.e(Cohort.class.getName(), e.getMessage(), e); | ||
return null; | ||
} | ||
} | ||
|
||
public void setYear(Date date) { | ||
if (date != null) { | ||
try { | ||
this.year = Integer.valueOf(CumulativeRepository.DF_YYYY.format(date)); | ||
} catch (Exception e) { | ||
Log.e(Cohort.class.getName(), e.getMessage(), e); | ||
} | ||
} | ||
} | ||
|
||
public Long getCsoNumber() { | ||
return csoNumber; | ||
} | ||
|
||
public void setCsoNumber(Long csoNumber) { | ||
this.csoNumber = csoNumber; | ||
} | ||
|
||
public Long getZeirNumber() { | ||
return zeirNumber; | ||
} | ||
|
||
public void setZeirNumber(Long zeirNumber) { | ||
this.zeirNumber = zeirNumber; | ||
} | ||
|
||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public Date getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(Date updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
103 changes: 103 additions & 0 deletions
103
opensrp-path/src/main/java/org/smartregister/path/domain/CumulativeIndicator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
package org.smartregister.path.domain; | ||
|
||
import android.util.Log; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.smartregister.path.repository.CumulativeIndicatorRepository; | ||
|
||
import java.io.Serializable; | ||
import java.text.ParseException; | ||
import java.util.Date; | ||
|
||
/** | ||
* Created by keyman on 11/01/18. | ||
*/ | ||
public class CumulativeIndicator implements Serializable { | ||
private Long id; | ||
private Long cumulativeId; | ||
private String month; | ||
private String vaccine; | ||
private Long value; | ||
private Date createdAt; | ||
private Date updatedAt; | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public Long getCumulativeId() { | ||
return cumulativeId; | ||
} | ||
|
||
public void setCumulativeId(Long cumulativeId) { | ||
this.cumulativeId = cumulativeId; | ||
} | ||
|
||
public String getMonth() { | ||
return month; | ||
} | ||
|
||
public void setMonth(String month) { | ||
this.month = month; | ||
} | ||
|
||
public Date getMonthAsDate() { | ||
if (StringUtils.isBlank(month)) { | ||
return null; | ||
} | ||
try { | ||
return CumulativeIndicatorRepository.DF_YYYYMM.parse(month); | ||
} catch (ParseException e) { | ||
Log.e(Cohort.class.getName(), e.getMessage(), e); | ||
return null; | ||
} | ||
} | ||
|
||
public void setMonth(Date date) { | ||
if (date != null) { | ||
try { | ||
this.month = CumulativeIndicatorRepository.DF_YYYYMM.format(date); | ||
} catch (Exception e) { | ||
Log.e(Cohort.class.getName(), e.getMessage(), e); | ||
} | ||
} | ||
} | ||
|
||
public String getVaccine() { | ||
return vaccine; | ||
} | ||
|
||
public void setVaccine(String vaccine) { | ||
this.vaccine = vaccine; | ||
} | ||
|
||
|
||
public Long getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(Long value) { | ||
this.value = value; | ||
} | ||
|
||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public Date getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(Date updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
56 changes: 56 additions & 0 deletions
56
opensrp-path/src/main/java/org/smartregister/path/domain/CumulativePatient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package org.smartregister.path.domain; | ||
|
||
import java.io.Serializable; | ||
import java.util.Date; | ||
|
||
/** | ||
* Created by keyman on 22/01/18. | ||
*/ | ||
public class CumulativePatient implements Serializable { | ||
private Long id; | ||
private String baseEntityId; | ||
private String validVaccines; | ||
private Date createdAt; | ||
private Date updatedAt; | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getBaseEntityId() { | ||
return baseEntityId; | ||
} | ||
|
||
public void setBaseEntityId(String baseEntityId) { | ||
this.baseEntityId = baseEntityId; | ||
} | ||
|
||
public String getValidVaccines() { | ||
return validVaccines; | ||
} | ||
|
||
public void setValidVaccines(String validVaccines) { | ||
this.validVaccines = validVaccines; | ||
} | ||
|
||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public Date getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(Date updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
} | ||
|
Oops, something went wrong.