Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fixes #466

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b1d5756
Added session duration minutes in the events.
gosso22 Aug 23, 2023
ce99868
Implement collection of nutrition activity response
gosso22 Aug 23, 2023
6731fe0
Merge pull request #465 from d-tree-org/fix-validations
gosso22 Aug 23, 2023
07fde0a
:hammer: fix index number
issyzac Sep 20, 2023
db93cd3
:zap: added new place for GC session places
issyzac Sep 20, 2023
28212f0
:bucket: edit translations
issyzac Sep 20, 2023
1d64332
:recycle: translations
issyzac Sep 27, 2023
f00262b
:zap: caregiver representative questions added
issyzac Sep 27, 2023
1d3b5ce
:zap: caregiver rep ux
issyzac Sep 27, 2023
177d03e
:zap: added edi cleaner job
issyzac Sep 27, 2023
1643632
:zap: app health util methods
issyzac Sep 27, 2023
fda8f6f
:construction: worker to clean edi ids
issyzac Sep 27, 2023
e56e9fa
:construction: repository to clean edi id
issyzac Sep 27, 2023
8b3ee81
use checkbox for selecting caregiver representatives
maulidkategile Oct 3, 2023
40a524a
disable recycleview scrolling
maulidkategile Oct 3, 2023
dcf667a
refactor
maulidkategile Oct 3, 2023
cbaa5f8
display the textfield hint
maulidkategile Oct 3, 2023
3d57bdf
:construction: process client after edi id removal
issyzac Oct 5, 2023
066c3cd
:construction: Add tagSyncMetaData to Register Client Edi ID event
gosso22 Oct 5, 2023
a55dc7e
:construction: Add event processor to process Register Client Edi ID …
gosso22 Oct 6, 2023
32624cb
refactor
maulidkategile Oct 7, 2023
f1045fc
validate the form fields before submit
maulidkategile Oct 16, 2023
c411be7
:bucket: refactored registration form
issyzac Oct 16, 2023
fd957d3
:zap: Implemented EDI ID registration event
issyzac Oct 16, 2023
25b3d91
add caregiver representaives to the selected child model
maulidkategile Oct 16, 2023
ae39723
add caregiver representatives to the child events
maulidkategile Oct 17, 2023
0d140a6
refactor
maulidkategile Oct 17, 2023
8bb1ce3
make companions field optional
maulidkategile Oct 17, 2023
478fe3d
capture other caregiver representative info
maulidkategile Oct 17, 2023
f252bbf
Fix codacy issues
gosso22 Oct 17, 2023
d9865fc
Show other reason for not conducting a group session when other is se…
gosso22 Oct 17, 2023
4d66a7a
Fix codacy issues
gosso22 Oct 17, 2023
b61a067
validate other companion form field
maulidkategile Oct 17, 2023
020bd93
capture other companion to the child event
maulidkategile Oct 17, 2023
5f6b22c
translate the error messages
maulidkategile Oct 17, 2023
2970604
restore the encryption parameter
maulidkategile Oct 17, 2023
e152b50
make a dialog not dismissable if form errors available for improved ux
maulidkategile Oct 19, 2023
fc527df
:construction: Generate EDI Reg event on adding ANC Mother
issyzac Oct 25, 2023
a5770b3
Merge pull request #477 from d-tree-org/group-session-implementation
issyzac Oct 26, 2023
34b6e48
Merge pull request #476 from d-tree-org/fix-show-other-reason-for-not…
issyzac Oct 26, 2023
88f7ec0
Merge pull request #478 from d-tree-org/new-registration-edi-capture
issyzac Oct 26, 2023
0ae2fa9
Merge pull request #474 from d-tree-org/kk-470-gc-additional-place
issyzac Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions opensrp-chw/src/kk/assets/json.form/group_session.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@
"openmrs_entity": "concept",
"openmrs_entity_id": "session_duration",
"type": "hidden"
},
{
"key": "session_duration_minutes",
"openmrs_entity_parent": "",
"openmrs_entity": "concept",
"openmrs_entity_id": "session_duration_minutes",
"type": "hidden"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public class GcFinalStepFragment extends BaseGroupSessionRegisterFragment {
CheckBox activityReview;
CheckBox activityOne;
CheckBox activityTwo;

CheckBox activityNutrition;
CheckBox activityRecap;
CheckBox activityClosingSong;

Expand All @@ -80,6 +82,9 @@ public class GcFinalStepFragment extends BaseGroupSessionRegisterFragment {
CheckBox difficultReview;
CheckBox difficultActivity1;
CheckBox difficultActivity2;

CheckBox difficultNutrition;

CheckBox difficultRecap;
CheckBox difficultClosingSong;

Expand All @@ -94,6 +99,8 @@ public class GcFinalStepFragment extends BaseGroupSessionRegisterFragment {

TextInputEditText etDurationInHours;

TextInputEditText etDurationMinutes;

ProgressBar progressBar;
MaterialButton submitButton;

Expand Down Expand Up @@ -196,6 +203,19 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
}
});

difficultNutrition = view.findViewById(R.id.difficult_nutrition_activity);

difficultNutrition.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(isChecked){
listOfDifficultActivities.add(KkConstants.GCActivities.NUTRITION_ACTIVITY);
}else{
listOfDifficultActivities.remove(KkConstants.GCActivities.NUTRITION_ACTIVITY);
}
}
});

difficultRecap = view.findViewById(R.id.difficult_recap_session);
difficultRecap.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
Expand Down Expand Up @@ -321,6 +341,19 @@ public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
}
});

activityNutrition = view.findViewById(R.id.nutrition_activity);

activityNutrition.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(isChecked){
activitiesTookPlace.add(KkConstants.GCActivities.NUTRITION_ACTIVITY);
}else{
activitiesTookPlace.remove(KkConstants.GCActivities.NUTRITION_ACTIVITY);
}
}
});

activityRecap = view.findViewById(R.id.recap_session);
activityRecap.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
Expand Down Expand Up @@ -484,6 +517,8 @@ public void onClick(View view) {

etDurationInHours = view.findViewById(R.id.et_session_duration);

etDurationMinutes = view.findViewById(R.id.et_session_duration_minutes);

progressBar = view.findViewById(R.id.progress_bar);

}
Expand Down Expand Up @@ -517,7 +552,9 @@ public void getSessionDetails() {
sessionModel.setCaregiversBroughtMaterials(caregiversBroughtMaterials);
sessionModel.setTopicsCovered(topicsCovered);
String durationString = etDurationInHours != null ? etDurationInHours.getText().toString().trim() : "";
String durationMinutesString = etDurationMinutes != null ? etDurationMinutes.getText().toString().trim() : "";
sessionModel.setDurationInHours(!durationString.isEmpty() ? Integer.parseInt(durationString): 0);
sessionModel.setDurationInMinutes(!durationMinutesString.isEmpty() ? Integer.parseInt(durationMinutesString): 0);
//Toast.makeText(getContext(), "Group Session Information Recorded", Toast.LENGTH_SHORT).show();

}
Expand Down Expand Up @@ -596,12 +633,6 @@ private boolean validateFields(){
if (durationString.isEmpty()) {
isValid = false;
etDurationInHours.setError("Please enter session duration");
} else {
int duration = Integer.parseInt(durationString);
if (duration <= 0) {
isValid = false;
etDurationInHours.setError("Duration must be greater than 0");
}
}

return isValid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class GroupSessionModel {
private List<String> topicsCovered;
private int durationInHours;

private int durationInMinutes;
private boolean childrenDividedInGroups;

public GroupSessionModel(){
Expand Down Expand Up @@ -178,4 +179,10 @@ public boolean isAnyDifficultActivities() {
return anyDifficultActivities;
}

public void setDurationInMinutes(int minutes) {
this.durationInMinutes = minutes;
}
public int getDurationInMinutes() {
return durationInMinutes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public static class GCActivities {
public static final String REVIEW_PREVIOUS_WEEK = "review_of_the_week";
public static final String ACTIVITY_1 = "activity_1";
public static final String ACTIVITY_2 = "activity_2";
public static final String NUTRITION_ACTIVITY = "nutrition";
public static final String RECAP_SESSION = "recap_session";
public static final String CLOSING_SONG = "closing_song";
}
Expand Down Expand Up @@ -157,6 +158,8 @@ public static class GCJsonKeys {
public static final String GC_SESSION_ID = "session_id";
public static final String GC_SESSION_PLACE = "session_place";
public static final String GC_SESSION_DURATION = "session_duration";

public static final String GC_SESSION_DURATION_MINUTES = "session_duration_minutes";
public static final String GC_ACTIVITIES_TOOK_PLACE = "activities_took_place";

public static final String GC_DIVIDE_CHILDREN_DIFFERENT_AGE_GROUPS = "divide_children_different_age_groups";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ private void processPopulatableFields(JSONObject field, GroupSessionModel sessio
case KkConstants.GCJsonKeys.GC_SESSION_DURATION:
field.put(org.smartregister.chw.util.JsonFormUtils.VALUE, sessionModel.getDurationInHours());
break;
case KkConstants.GCJsonKeys.GC_SESSION_DURATION_MINUTES:
field.put(org.smartregister.chw.util.JsonFormUtils.VALUE, sessionModel.getDurationInMinutes());
break;
case KkConstants.GCJsonKeys.GC_ACTIVITIES_TOOK_PLACE:
field.put(org.smartregister.chw.util.JsonFormUtils.VALUE, sessionModel.getActivitiesTookPlace());
break;
Expand Down