Open ihassin opened 8 years ago
Itamar, I'm not sure about this story. It seems the client should send a SOH value of "10", not "5" in this case. re: return codes, DHIS2 has a rest api, so the success/failure may be more nuanced than return code 200, but I'm not positive, we'd have to ask Gary or HISP how failure/success is communicated via the rest api.
I think whether the client should send "5" or "10" is determined by the initial value, if the SOH sync works, if the server has 5 items, then the client's initial value before the sync is "5", then "10" will be send to server at that day.
This is ready for dev, but should be picked up till #253 is at least code-complete
Finish dev with #253
Lovely!
On Oct 10, 2015, at 06:24, Bin Ma notifications@github.com wrote:
Finish dev with #253 https://github.com/clintonhealthaccess/chailmis-android/issues/253 — Reply to this email directly or view it on GitHub https://github.com/clintonhealthaccess/chailmis-android/issues/255#issuecomment-147071696.
Tested: this works as expected, however the "stock Balance" on the Bin card (on the app) does not update to the new SOH value
Still can not get what is " 'stock Balance' on the Bin card",Is it another commodity with individual SOH or something else?
@egwuma - please be very specific when describing bugs: Please list the state of the data when you ran the app, and the steps you took and list the expected values compared to the actual values.
On the Bin card, where you have "stock balance" near the Max/Min Values, the value does not match the SOH. Stock Balance = SOH at all times
@garymabin will check this today
Yes, I've figured out why the Stock Balance is not equal to SOH now, the SOH on the app was just for one day previously, so the Stock Balance at that time is calculated by adding SOH each day in a month. After we change the SOH to always carrying on the previous day's value, the Stock Balance should just equal to the latest day's SOH rather than do the add up again. Fixed fc71dbc
same as card 253
@egwuma - it seems the app side is ok as it's not giving any errors when syncing. I need a way to debug on the server side. Either direct access to its logs, or work with one of the devs on the server side to see transactions moving.
I had Albendazole SOH = 10; I dispensed 5, I see SOH at 5 now. Bin shows 5 in Stock Balance also. We'll wait another day, and dispense some more and expect to see correct results.
Correct number appeared after sync at 4am. Closing this ticket.
Scenario: Chaining with absolute numbers manually Given the server has "5" items of type "A" When I update SOH with "Received" "A" "10" And I update SOH with "Dispensed" "A" "5" And the manual sync succeeds Then the client updates SOH for "A" with value "10" And the server shows that there are "10" items of type "A" for my clinic
Client should examine return codes 200/201, 401, 500 to determine if the operation succeeded or not. Upon failure, the transaction should be cleared. The user will supply a new translation with a new absolute number when communications have been re-established.
For example: SOH is 10, but the client cannot reach the server. Tablet forgets this transaction after failing to contact the server for three times for example.
Since then, another 20 items were added to inventory, and the operator must try to sync with 30 this time.