-
Notifications
You must be signed in to change notification settings - Fork 105
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
Officially support ODK Central for offline stock movements #6235
Comments
Similarly, we might be able to improve our aggregate stock consumption by providing telephones for users in the health centers to use to record their stock consumption information. This would ensure that we have more accurate data from the FOSAs in our Health Zone stock tracking project. Basically, the following projects would greatly benefit from this:
|
DesignThis describes the rough design of the BHIMA ODK link. It is useful to look over the ODK Central API documentation. A BHIMA enterprise is an ODK Central projectWhen you install BHIMA, you'll be allowed to optionally add the configuration for an ODK Central Server. This would be the username, password, and server URL. This user must be an administrative user to create new projects. A project on ODK Central would be created for the enterprise, and the Information we need to store in BHIMA so far:
A BHIMA user (with access to a depot) is an ODK Central userWhen someone creates a user in BHIMA, we should create a user in ODK Central with their email address. It's a 1-1 mapping. But @jniles, you cry, email addresses have to be unique in ODK Central! What happens if I want to have a user account on two BHIMA instances?! Well... this works: So, we just append This user will have access to the forms specified by their For each user, we'll need to store:
A BHIMA depot creates three ODK Central forms - entry, exit, and routine inventoryWe need to implement three forms for each depot - entry, exit, and routine inventory. I propose that these be called The first page of each form should provide the BHIMA installation name, the depot name, the timestamp the information in the form was updated. For both entry and exit, we'll want to specify the origin depot or the destination depot. In both cases, the user should have permission to see that depot. Question: For stock entries, should we require that users select from a list of transfer documents destined to the destination depot? When a BHIMA user is given permission to access a depot in BHIMA, they are also given permission to that depot's forms in ODK Central. Each of these depot forms will have a list of all BHIMA products in them, that can be looked up via a barcode scan. These will be in an external select for convenience. When the stock in a depot changes (either via an entry or an exit), this form should be updated with a new version. For each depot, we'll need to store:
|
The design is great, it presents how things have to be done for a real benefit of both BHIMA and ODK. The doability is a real challenge because we have to go deep inside the ODK API and find all answers that we need. Here my point of view according points : A BHIMA enterprise is an ODK Central projectI had a concern with existing project in ODK Central, but if we have to consider the new created one related to a BHIMA instance its okay to me. A BHIMA user (with access to a depot) is an ODK Central userIt is okay to me. A BHIMA depot creates three ODK Central forms - entry, exit, and routine inventorySo we have to add 3 forms for each bhima depot,
Our ODK Central will had to deal with a huge number of forms. Question: For stock entries, should we require that users select from a list of transfer documents destined to the destination depot?In the case the exit was made with ODK Collect, I don't know if the user will have the document ID (in case of zone where there is not BHIMA: FOSA). So It can be difficulet to @jniles this is a great feature to add in BHIMA. The next release with that can be BHIMA 3.X :-) |
Adds odk central integration tables for the eventual link to ODK Central. Currently adds them under Stock Settings, but we can move them easily enough later. Related to Third-Culture-Software#6235.
Adds odk central integration tables for the eventual link to ODK Central. Currently adds them under Stock Settings, but we can move them easily enough later. Related to Third-Culture-Software#6235.
Adds odk central integration tables for the eventual link to ODK Central. Currently adds them under Stock Settings, but we can move them easily enough later. Related to Third-Culture-Software#6235.
Adds odk central integration tables for the eventual link to ODK Central. Currently adds them under Stock Settings, but we can move them easily enough later. Related to Third-Culture-Software#6235.
This commit implements the ODK Central link with BHIMA, developped during the `prosani-sprint`. The goal is to have a functional, optional link to ODK Central that can be merged into the BHIMA repository. Closes Third-Culture-Software#6235.
This commit implements the ODK Central link with BHIMA, developped during the `prosani-sprint`. The goal is to have a functional, optional link to ODK Central that can be merged into the BHIMA repository. Closes Third-Culture-Software#6235.
This commit implements the ODK Central link with BHIMA, developped during the `prosani-sprint`. The goal is to have a functional, optional link to ODK Central that can be merged into the BHIMA repository. Closes Third-Culture-Software#6235.
This commit implements the ODK Central link with BHIMA, developped during the `prosani-sprint`. The goal is to have a functional, optional link to ODK Central that can be merged into the BHIMA repository. Closes Third-Culture-Software#6235.
This commit implements the ODK Central link with BHIMA, developped during the `prosani-sprint`. The goal is to have a functional, optional link to ODK Central that can be merged into the BHIMA repository. Closes Third-Culture-Software#6235.
6337: Feat: merge ODK central work r=jmcameron a=jniles This PR adds in [ODK Central](https://docs.getodk.org/central-install/) functionality to the BHIMA server. Here is what the ODK administration interface looks like: ![image](https://user-images.githubusercontent.com/896472/150951277-34cf068b-9eca-4363-a485-ad135ad18df1.png) You'll need to set your own username/password and ODK Central URL to test it out. This installation is very bare-bones. The way this works is somewhat documented in #6235 (comment). This PR is plucked from work done by `@jniles` and `@mbayopanda` in `sprint-prosani`. Closes #6235. Closes #6302. Closes #6322. --- **TESTING** (based on session with `@jniles` ) - Use bhima test (rebuild db, etc) - Go to Administration > ODK Settings - Enter the ODK Central login credentials in the left-most panel (ODK Integration Settings) - In the middle panel, click on - Synchronize enterprise settings - Synchronize users - Synchronize forms - Go to Adminstration > User Management - In the action menu for Superuser, click on the [ODK QR Code] link to display the QR code (leave it up on your screen) - On your mobile phone - If you have not installed ODK Collect, do that - In ODK Collect, click on the [Configure with QR code] button on the entry screen. This should bring up the "Test Enterprise" page - Click on [Get Blank Form]. It should show that it has downloaded a form - On the bottom right of the page, click on the [Get Selected] button. This downloads the form and sends you back to the "Test Enterprise" page. - Click on [Fill Blank Form] and select the form. This should start filling out the form. - Fill out the form - For Nombre des articles, enter 1 - For the barcode, first go to Bhima (Stock Lots) and display the barcode for lot VITAMIN-A. Then scan that barcode with your phone. When you click next, it should show the lot you selected. - Finish the form ([X] Mark form as finalize, press [Save Form and Exit]) - Back on the "Test Enterprise" page, click [Send Finalized Form]. Select the form you just completed and press [Send Selected] on the bottom right of the page. - Back on Bhima go to Administration > ODK Settings - Click on: Synchronize Submissions [Sync] - Go to Stock > Stock Movements and verify that you have a new stock entry in Depot Tertiaire Co-authored-by: Jonathan Niles <jonathanwniles@gmail.com>
We released a tag
v1.21.3-pcima
with support for ODK Central. This was to handle the PCIMA project's need to track stock offline with ODK forms. I propose we formalize this support in BHIMA and merge the functionality intomaster
. It will make support easier going forwards.We've released a module
@ima-worldhealth/odk-central-api
that should offload the ODK Central API functionality into its own tested module. This means we can focus on rewriting theimport.js
functionality to bring stock movements into BHIMA from data collected in the ODK Central Server.One thing to think about - we could migrate the pepkits project to using this version of BHIMA/Central and have another project using this functionality in addition to the PCIMA project.
The text was updated successfully, but these errors were encountered: