Project: Scaling up the mobileHBS/DHIS2 Tracker and Trainer applications

@sunbiz I had submitted an MR for the app usage tracker in the trainer app. Please have a look at that I had implemented the logic and idea discussed above ( use of user data store, the threshold limit for app usage, storing usage locally and resetting them when synced with dhis2, etc.) Currently, the threshold limit for page visits is 10 and for page, time spent 10 minutes.

Link of the MR : Added System to track app usage (!196) · Merge requests · LibreHealth / LibreHealth Incubating Projects / mhbs / mHBS-trainer · GitLab

I had removed Fabric usage from the app. Committed here.

I had merged the latest changes to our previous MR * ## !195 . Now it is even with master and can be merged.

I had removed hardcoded credentials from the whole app and set it up with getPasswrordFromSecure(). Actually, I am reading our codebase for the login part and secure storage therefore got a little bit late in solving the merge conflict. Now I am clear with our idea of secure storage and login part.

We need to add some changes in the tracker app as well for the login part. The login credentials are not sent currently through intent from the tracker app. I will send an MR there too for that.

@sunbiz This week blog Sixth Week of Coding 12th July — 16th July (bhavesh3005sharma-gsoc21.blogspot.com).

I had submitted an MR as stated above related to the launching intent and login of the trainer app in the tracker app repo. Please have a look at that MR Link..

After merging this user can easily sign in from tracker app to trainer app and all apis will work.

Please reflect some light on issue * ## #4 and issue * ## #10 what exactly need to be done in them I am not clear with their tasks.

I like this approach. It would be nice if it was shorter, say 3 or 5 mins.

I have provided some additional comments on these issues. If something isn’t clear please ask here or on the issue.

@sunbiz as per your suggestions I had added few commits to * ## !196 MR as per your suggestions & updated the gitlab CI as well fixing #112.

I had submitted new MR * ## !14 fixing logo bug in mhbs app. Please have a look.

@sunbiz For #10 issue currently all the tracker or event programs are visible their tei’s are also available and program stages can also be seen in the app.

In “Helping Babies Breathe Program” all the three program stages [ 1. Knowledge Check, 2. Delivery and HBB Activity Log, 3. Follow-up Survey ] are available but some other program stages registered in dhis2 in this program is also visible on the basis of filters that are being used.

Now I want to ask in your commit Show only 3 program stages for trainee users · iupui-soic/mHBS-tracker@c42a214 (github.com) you have restricted the user whose user name is made up of integers (like “3543216”) to see only above mentioned three stages and other stages are not visible to them. Should I do that changes here also means restricting users with integer usernames to see only these 3 stages in the “Helping Babies Breathe Program” program?

And changes should be done only for numeric type string username users or for all?

And changes should be done only for the “Helping Babies Breathe Program” program or for all?

@sunbiz this week blog is Seventh Week of Coding 19th July - 23 July I had mentioned you in some issues as well which can be closed please check and closed the issues that can be done so and I had also added few new commits to fix the bugs, please heck them as well.

Thanks for the many fixes and feature updates.

Not closing #39 yet, so that you can commit some documentation about it, like supported video formats, some instructions to upload resources and how they can be synced into the app.

@sunbiz thank you for clearing my doubts about the issues of the tracker and trainer app.

I have an idea related to the sync mechanism of video resources if you like please tell me. Currently, the picture is like that whenever the user clicks on any media file it will get synced with the dhis2 resources everytime and a new copy will be saved for further reference and if it is already downloaded means a copy is available it is played instantly and will keep syncing in the background if a user is connected to the internet.

The only reason to keep syncing every time is that someone can modify the same resource in dhis2 therefore we need to sync whenever the user clicks that media. If we keep in mind that every time we upload fresh media and never update the existing media means if we need to update a media file, we will delete it first then upload a new file with the same name.

In this case, we never need to keep syncing the downloaded content every time and we can save a lot of user’s data. And in any way, it will not affect the user’s experience.

Please share your thoughts on this.

okay will do this part.

I like the idea, but it should likely be based on whether there is an update or not. If there is an update only then there should be data transfer, not necessarily on the network connection.

but how we can check there is update in a media file upload in dhis2 resource ? Therefore we need to keep it sync with the dhis2 even ever required if we follows the existing approach. Whereas in the newer one which I am telling now we know that there will never be an update in the media file so we will download it only once. No need to syncing it every time with the server when user clicks the media file.

1 Like

This week Blog Eighth Week of Coding 26th July - 30 July

@sunbiz for last week failed pipeline I have created an MR please check.

For export and import of metadata of tracker and trainer app I have some doubts please clear them.

For tracker app -

  • I think both app usage programs listed above ( one is dataset and the other is program ) are not used in the app? If no, please specify where? and if yes, should I export both of them or not?

  • Essential Care for Every Baby and on_call_doctor_program Programs are ECEB app related and should not be exported in tracker or trainer app metadata. Right?

  • mHBS Trainer Usage Tracker is the program build by me for testing purposes and it is not used in any of the apps now. So there is no need to export it?

  • I think HBB Survey dataset and Helping Babies Breath Program are the only one that needs to be exported in the trainer app?

For trainer app-

  • For the app usage record of the trainer app we are using users datastore there is no program for that, that could be exported.

  • For the media page we are collecting data from dhis2 resources so there is also no program to export.

  • I am not fully aware of the other programs (if any) that are required for the working of the trainer app and needs to be exported. Please name them if anything is there in the trainer app that needs to be exported.

Please clarify what needs to be exported in the tracker & trainer app and what not.

All of what you said is correct. The metadata should only contain the two above that you identified. Are there specific user roles that are required to differentiate trainer and trainee. Those should like be exported and the tracked entity type.

The mHBS-trainer doesn’t need any additional metadata that’s not already covered above.

Thanks for answering I have exported both of the metadata hbb-survey-metadata and hbb-program-metadata.

hbb-survey metadata is working well I had tried it by importing at the demo servers of dhis2 but the issue is with hbb-program metadata it is creating a problem for 7 attributes that are already present in the demo server with the same short name. It shows me some errors like

and in a detailed message something like this

Can you check it? I think it will work fine when the listed attributes are not present in dhis2 already.

And I had deleted approx 4 thousand attributes ( id ) of the users that are exported during metadata-export which are just because the respective persons registered in our bmgf instance had used these programs. Now any of the above metadata does not contain any invalid reference that can cause an error during import.

I think no as because we want trainers to upload resources through the dhis2 website and trainees should be able to access them from the trainer app for that and till now what I have seen there is no requirement of specific user roles both will use both of the apps. Please tell me anything is wrong or should be corrected.

@sunbiz can we discuss the other features or what is the need that should be satisfied before publishing this app to the play store.

Week ninth Blog Ninth Week of Coding 2 August — 7 August

@sunbiz Can we discuss the other tasks as early as possible let me know when you are available? Please write here what are the works that you want in the tracker app and trainer app to be done. So that I can work on them if possible make it by today(12-8-20). And the problem I reflect on just above message regarding the export of metadata is still there discuss on that as well.

1 Like

@sunbiz I want to inform you about some points -

  1. you were talking about opening pdfs and other media files within our app instead of using another app. I checked cordova-plugin-document-viewer. But this is also redirected us to download a specific app from the play store and after that only it can open the pdf using that app. This app uses pdf.js.

If there is some way to open pdfs and all other media files in our app itself and it needs to be implemented please provide some resources for its implementation details. I didn’t find any way with which by using a common way we can open all media files or pdfs as well. Currently, as earlier, we are using the fileOpener2 Cordova plugin to open the media resources.

BTW I think that nowadays every person is having any of the supportive apps to check pdfs and videos files and some of the other common media files. Like you see crome and Whatsapp and other apps don’t implement their own pdf viewer for the android side instead make an option to download and let the user open in his desired app. And in our app, there are educational resources that are publicly available as well and we even want to share them as much as we can to spread knowledge. So I am a bit confused about opening all media files within our app. Sorry if I get something wrong and please correct me.

  1. As per our discussion in the last meet,
  • I had segregated the media resources into pdfs, videos, all media and other media tabs.
  • Improved the UI of this page added a button to view n download documents.
  • Added thumbnail and pdf icon on the media files, Added video duration in the UI.

Video Link for new media Page: Media-Page.mp4 - Google Drive

  1. As asked in the last meet I have uploaded education resources from https://globalhealthmedia.org/videos/ in our dhis2 instance and now all of these resources are accessible from the trainer app. There are a lot of resources I have uploaded 60+ but some of them are still pending will upload them soon. If there are other resources (pdfs, videos, etc) please provide me to upload them on the server.

  2. Some days back I updated my phone and encounter an issue with the cordova-plugin-secure-storage and found that it is incompatible with Android 9.+ API 29. I had created an issue in trainer repo for the same and send an PR to fix it please check that. I had updated cordova-plugin-secure-storage to cordova-plugin-secure-storage-echo. I have mentioned this in the blog as well.

Please check both the repos and merge and close the old MR’s & Issues so that if there is some problem we can look at that.

I want to inform you about one more point that media files are downloaded in the user’s phone internal storage with only trainer app access to view. So if the user’s internal storage is full then no more files will be downloaded.

1 Like

@sunbiz My Final Report is here → This Gist is for the Final Report of the work done in GSoC-2021 Program. · GitHub . Please check it and also check both the repos for merging MRs and closing the resolved issues.

Thank You Mentors for giving me this great opportunity and helping me throughout the period. I was never able to complete this in the way I had done if you had not given me support at every stage of the program. :heavy_heart_exclamation: :heavy_heart_exclamation:

Thanks a lot @sunbiz @r0bby @shbucher for making my experience with the open-source so great & insightful.

I had prepared a short video about the work done during this period & written the last blog of this journey as well. Please check them as well.

In the end, I say - It is not the end of open source, it is just of the GSoC. I will continue contributing to LibreHealth & whenever get a chance will definitely pass on the knowledge I got through this program.

1 Like

Can you send me the raw video file @bhavesh3005sharma ?

1 Like

Drive Link: Final Presentation .mp4 - Google Drive

YouTube Link: GSOC 21 | FINAL WORK PRESENTATION | LIBRE HEALTH | BHAVESH SHARMA | IIT (ISM) DHANBAD - YouTube

As discussed on LibreHealth.chat I had mailed you the video file as well to @r0bby via email :grinning:

1 Like
<