clintonhealthaccess / chailmis-android

Android Tablet Application for Logistics Management in the DHIS2 Platform
Other
7 stars 6 forks source link

STOCK OUT DATA #249

Open chai-lmis opened 8 years ago

chai-lmis commented 8 years ago

App syncs STOCK OUT data to the server. The 1st day in the month for which the commodity STOCK ON HAND is zero, App syncs a count of 1 to the server, on 2nd day, app syncs count of 2. app only stops sync when STOCK ON HAND for that commodity is >1, if STOCK ON HAND =0 later in the same month, then app continues STOCK OUT sync from last count (ie 3).

The STOCK OUT is reset on the 1st of every month to zero

ihassin commented 8 years ago

Who wrote this please? Can you sign your name? In what context is this written? Which feature/story number? Thanks!

chai-lmis commented 8 years ago

This is in context of the SOH app sync, the STOCK OUT days was previously calculated in the SOH script, but as this script is going to be disabled on the server, the app will need to calculate and sync this data to the server

LakshmiCHAI commented 8 years ago

I believe it was Egwuma who wrote this.

Egwuma/@chai-lmis - why are we disabling this script as well on the server?

chai-lmis commented 8 years ago

@ Laskshmi, the SOH script is bundled with the STOCK OUT calculation, so once this is disabled, it also disables this feature and as we are unable to deal with script writing, may have to e handled by app and synced to the server as well (i think this also streamlines the process as STOCK OUT is based on SOH availability) Egwuma

LakshmiCHAI commented 8 years ago

@chai-lmis Ok, makes sense. Are there any other scripts bundled with the SOH calculation? Jason was to provide documentation on the scripts, do we have an update on that?

karloskalcium commented 8 years ago

Just to be clear, are you saying all scripts on the server will be disabled? Or, will certain calculations that were previously done in scripts be turned off, while others will remain?

LakshmiCHAI commented 8 years ago

@chai-lmis Could you confirm.

@karlwbrown Only the script doing SOH calculation is being disabled. However (a) the SOH carry forward code (i.e. next day SOH = previous day SOH) is part of this script, as is (b) # Stock out days calculation. I don't think there are others but will let Egwuma confirm.

chai-lmis commented 8 years ago

This calculation was bundled with the deactivated SOH scripts.NOS OF STOCK OUT DAYS (which is sent as a daily value to the serve) is used to calculate AMC on the server which in turn is used to calculate the MAX/MIN stock levels & the MAX/MIN stock in months, these values are synced from the server to the client.

garymabin commented 8 years ago

@chai-lmis, so what you mean is that the MAX/MIN stock value is calculated by the SOH value server receives from the app? But since we don't always sync zero value to the server(issue tracked in #269), but it seems the MAX stock value is always zero.

chai-lmis commented 8 years ago

As previously explained in my comments, the STOCK OUT days was previously calculated in the SOH script, but as this script is going to be disabled on the server, the app will need to calculate and sync this data to the server.

App syncs STOCK OUT data to the server. The 1st day in the month for which the commodity STOCK ON HAND is zero, App syncs a count of 1 to the server, on 2nd day, app syncs count of 2. app only stops sync when STOCK ON HAND for that commodity is >1, if STOCK ON HAND =0 later in the same month, then app continues STOCK OUT sync from last count (ie 3).

The STOCK OUT is reset on the 1st of every month to zero