-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation on how to overcome hardcoded vaccine schedules
- Add sample code updating the prerequisite offset days for MR 2 vaccine schedule in the sample app
- Loading branch information
Showing
3 changed files
with
90 additions
and
1 deletion.
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
52 changes: 52 additions & 0 deletions
52
sample/src/main/java/org/smartregister/immunization/sample/util/VaccineDuplicate.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,52 @@ | ||
package org.smartregister.immunization.sample.util; | ||
|
||
import org.smartregister.immunization.db.VaccineRepo; | ||
|
||
/** | ||
* Created by Ephraim Kigamba - ekigamba@ona.io on 2019-08-29 | ||
*/ | ||
|
||
public class VaccineDuplicate { | ||
|
||
private String display; | ||
private VaccineRepo.Vaccine prerequisite; | ||
private int expiryDays; | ||
private int milestoneGapDays; | ||
private int prerequisiteGapDays; | ||
private String category; | ||
|
||
public VaccineDuplicate(String display, VaccineRepo.Vaccine prerequisite, int expiryDays, | ||
int milestoneGapDays, int prerequisiteGapDays, String category) { | ||
this.display = display; | ||
this.prerequisite = prerequisite; | ||
this.expiryDays = expiryDays; | ||
this.milestoneGapDays = milestoneGapDays; | ||
this.prerequisiteGapDays = prerequisiteGapDays; | ||
this.category = category; | ||
} | ||
|
||
public String display() { | ||
return display; | ||
} | ||
|
||
public VaccineRepo.Vaccine prerequisite() { | ||
return prerequisite; | ||
} | ||
|
||
public int expiryDays() { | ||
return expiryDays; | ||
} | ||
|
||
public int milestoneGapDays() { | ||
return milestoneGapDays; | ||
} | ||
|
||
public int prerequisiteGapDays() { | ||
return prerequisiteGapDays; | ||
} | ||
|
||
public String category() { | ||
return category; | ||
} | ||
|
||
} |