ntd-orbis's Issues
The system is processig messages from unregistered phones
Please verify that only phones marked as active (either manually or using the MDA keyword) get their reports processed
When going to "Raw Messages the breadcrumbs show "Home > Facilities"
Prevent deleting facilities with active children facilities
The children facilities of a facility need to be deleted (locations.deleted = 1) or non-existing to allow the deletion of the parent facility.
If the user attempts to delete a facility with active (locations.deleted = 0) facilities, a message appears indicating the children facilities to be deleted or reallocated to another parent facility.
"The facility you are trying to delete has dependent facilities. Please delete those facilities or assign them to another facility and retry this operation. The children facilities are: ...."
Implement “CREDIT” keyword
Test via FLSMS
Probably not needed, depending on progress by EthioTelecom
Traverse tree and populate with data
Aggregated chart
Convert approval pending
Build the "Raw messages" report as a combination of MessageReceived and MessageSent
Get tree structures
Modify approvals report
Headings should be Facility, Level, Approver, Item, Quantity, Date
Documentation: Message reply strings
Are all the strings for SMS-based replies in the SMS processing files? If so, that's fine, otherwise please indicate which files have them
Pending Approvals: Move checkbox column
Place checkbox column immediately to the left of the Current Total Count column.
Implement “HELP” keyword
Define HELP phone number (Berhanu?)
Create keyword in FLSMS
Modify manuals/cheat-sheets
Distribute
Create list of separators, implement as option in Options section
The characters used as separators need to include not only spaces, but also dots, commas, etc
Create one text field in the Options section of the application that will contain the characters that can be used as separators in SMS messages.
Caption: Valid separators in SMS messages
The field needs to verify that none of the modifiers in use is added to this field
When using this characters, the code will have to escape them as needed
Initial set: dot, comma, space, semicolon, colon, underscore
Have a config option to enable/disable the "MDA" keyword
As with other options for the system
When this is enabled, users can auto-register using this keyword (as done for ORBIS' MDA in December)
If this is not enabled, the system informs the user that manual activation is required (this is also the default when a non-registerd phone tries to send data before using the MDA keyword)
Allow to approve all the counts for a facility in one message: OK ALL
As indicated in the design doc:
OK [Item ID] : Approves the aggregate count of [Item ID] at the facility to which the phone is registered. The phone sending the message must be assigned to a user linked to the facility.
OK ALL: Same as above, for all items at the facility to which the phone is registered.
Please see #27 before
Add option to backend and form
Show sites who did not report in the last n days
In the map, and if the user enables this option, the sites will change color when they have not received any report in X days.
The logic to mark a site is: "Site Alpha has received at least one report, but have not receive any other report in the last X days"
This works irregardless of the item reported
This takes precedence over the "Site has not send a report for one of its tracked items in the last X days" option
In the Options menu:
Mark sites which have not sent reports for any item? (Yes/No)
Number of days without reports (three digits max)
Mark site with color (color selector)
User groups: system users and reporters
Have groups of users, and reporters
Have mixed groups of system users and reporters
Main use will be for notifications, as with triggered alerts.
SMS/email alerts on triggered alerts
This could be configured with checkboxes to select SMS/email
Each one will allow to select one/multiple users/groups from a multi-select drop-down list (this will require implementing a group function on the system)
It will use the phone/email registered to users of the system
Questions:
Should the list use users/groups from the system users only? Should it include phone-only users? (i.e. reporters)
Error in Home > Phones > Viewing Phone when "Approvals" messages were sent from the phone displayed
Related Raw Messages
Raw Message Message Code
OK TEO 251923799639
Notice (8): Undefined index: 5351 [APP/views/phones/view.ctp, line 75]
Pending Approvals: Change page title
Change page title "Approvals pending" => "Pending Approvals"
Registration via MDA keyword vs. "manual" registration
The list of messages sent by this users was:
M D A a s i y a 4 9 7
Error: phone number +251912242777 not found in database. It has been added but you need to register it to a facility before you can send reports
Mda a s i y a 4 9 7
That is not a valid ID for a Kebele (9 7). Please check the list, or ask a supervisor
M D A a s i y a 4 9 7
Error: phone number +251912242777 is not active. You won't be able to enter data until you request activation
MDA ASIYA 497
Thank you, ASIYA Your phone is updated to Emdbr 01 Kebele
-- Now she can send reports, but shows as Unknown in the website.
The system first added the number based on the "manual" registration feature, and failed to update the phone record when the user finally used the MDA correctly.
Changes: Registration via the MDA keyword should update the phone record in the system, including the name, and should mark is as active
aggregated inventory
Change confirmation message for quantity reported. Check syntax, spaces
Self-explanatory
Add a "Go to Map" to the "Facility" screen
In the web-based system; this will jump to the map and open the status (quantities/graph) in the map window for the facility the user was visualizing when clicking on this button
New parser: Ideas
Consider parsing using a regex to provide the first parse, and then with message components identified, use a modified version of the current parser to work with the DB.
To find multi-part reports:
([a-z,A-Z]{3}[ ,./;:][0-9]+[ ,./;:])+
To find registration messages (assuming MDA as a keyword, it should be in a config variable):
MDA[ ,./;:][a-zA-Z ,./;:]+[0-9]+[ ,./;:]
All together:
((MDA[ ,./;:][a-zA-Z ,./;:]+[0-9]+[ ,./;:])|([a-zA-Z]{3}[ ,./;:][0-9]+[ ,./;:]))+
The last line will accept more than one registration message, but will also accept it in any part of the message.
Please see the /extras directory in the application tree for working PHP code for registration and reporting. Next task is to integrate both, and run the messages collected in December against those proto-parsers
Show last approved and last updated
Pending Approvals: Change breadcrumbs
Change breadcrumbs "Home > Approvals" => "Home > Approvals > Pending Approvals"
Check breadcrumb consistency throughout application.
“PzT=106” returns “Cannot find an item with code 'PzT=106'. Items are identified by their code. Please verify and resend”
Change the horizontal scale for in-map charts
The charts that open when you click on a facility are auto-scaling the Y axis. MDAs tend to be short, will it be possible to auto-scale the X axis too?
There is an option in the Options menu "Month limit on graph reports". The auto-scaling for the X axis should work with this with the following logic:
If data span is < that "month limit", then autoscale
If data span > "month limit", show only the data for the last month_limit months
Allow messages to update multiple items
What does "Report warning threshold" do?
In the Options menu
rest-like interface for adding approvals
Complete the phone-based approvals process
The approvals process does not seem to be completely implemented as specified in the design:
OK [Item ID] : Approves the aggregate count of [Item ID] at the facility to which the phone is registered. The phone sending the message must be assigned to a user linked to the facility.
The approval should insert a record indicating that an authorized user approved the current [aggregated] quantity for a given facility at a given moment in time. The information below seems to provide some of that functionality.
For an approval to be accepted by the system, it needs to originate from a phone associated with a user. The facility associated with the user (not with the phone) will indicate the level at which the aggregate counts are approved. If the sending phone is not associated with any user, then system returns an error.
/* Find the phone ID of the sender
SELECT phones.id as pid FROM phones WHERE substring(phones.phonenumber FROM -8)=substring(' 251923799639' FROM -8) limit 1
/* Find if the sending phone is active
SELECT CASE WHEN phones.deleted = 1 THEN 0 ELSE phones.active END as status FROM phones WHERE phones.id='86' limit 1
/* Finds the location ID associated with the phone
SELECT locationLongitude, locationLatitude, locations.id as lid, phones.id as pid FROM locations, phones WHERE location_id = locations.id and phones.id='86' limit 1
/* Finds the item whose quantity we want to approve
SELECT items.id as did FROM items WHERE items.code = UPPER('TEO') limit 1
/* Finds the last quantity reported for that item in that location
/* This will not work if the sender is associated with an upstream facility, as it is usually the case
/* We need to mark approval for all the quantities for the given item in the child facilities
SELECT quantity_after FROM stats s WHERE s.item_id = 24 AND s.location_id = 191 AND s.id = (select max(st.id) from stats st where st.item_id = s.item_id AND location_id = 191 ) ORDER by created DESC
/* Stores the message received
INSERT INTO messagereceiveds (phone_id, created, rawmessage) VALUES (86, '2012-02-04 00:17:38', 'OK TEO 251923799639')
There is no indication that the approval process is storing information related to the approval in the approvals or approvals_stats tables.
Need to verify if the system is checking that the user can actually post an approval
Investigate adding optional graphs. http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html#Example
Add "Approvals" for to the web interface
The menu option "Approvals" in the "System Management" section should have an option to allow inserting an approval record.
The approval record specifies:
Item (s)
The logged in user can only insert approval records for the facility in which he/she is logged in, or children facilities thereof.
MDA Keyword is taken as an item code
Examples from actual messages:
“MDA.HIKRAM.281 0” returns “Default modifier for: MDA.HIKRAM.281 is not set please include a valid modifier…” : In some cases, the system is taken “MDA” as an item code
“MDA MENGESHA 471 TO 0923799640” returns “That is not a valid ID for a Kebele (640)…” : I believe in this case, upon successfully identifying the MDA keyword, the system should have assumed "0923799640" was the Kebele ID, and then return an error of Kebele not found.
“Mda.shitaye.529.0923799640.ptt.840.pzo,450.pte.4,zit.42.zto.35.teo.22” returned “The current quantity for: Mda.shitaye.529.0923799640.ptt.840.pzo,450.pte.4,zit.42.zto.35.teo.22 is: 0” I do not expect the parser to understand this, it should just report an error
“MDASILENAT471” returns “The current quantity for: MDASILENAT471 is: 0”: same as above. I can think of a parser that will understand this, but that's not required now
Allow users to report from other sites
Example:
User registered in site A updates data for site B
ie adding facility code to the parser, and having one per-phone option to enable/disable this. They should only be able to report for child nodes from the node where they are located, at least this need to be an on/off, with default to "only child nodes".
Send "CHILD" (or similar) to be remainded of the nodes for which you can send reports? That will help them if they forget
Make compatible with option for live and approved
Approval index
Rest-like calls from sms processor
Allow users to report data for a day other than today
Updating an existing record via the MDA keyword does not update the name
Input: MDA pablo 123 +5555555
Result: User is associated with facility 123 with name pablo and phone number +5555555
Input: MDA anotherName 789 +5555555
Result: User is associated with facility 789 with name pablo and phone number +5555555
Desired Result: User is associated with facility 789 with name anotherName and phone number +5555555
Supersets of Items
Specify elements as superset of another element, allowing to obtain total for sub/super units. I.e. count "bottle x 500 tablets" as 500 units of "tablet", or "treatment, <10 years old" as part of "treatments"
Pending Approvals: Change column headings
Change heading of checkbox column to "Approve"
Change "Current Total Count" => "Reported Quantity"
Change "Approved Total Count" => "Approved Quantity"
Show sites with items that have not been updated in the last n days
While a site may be sending updates, they may not include all the items the site is tracking.
Use another color to indicate sites that has not receive reports for one of its items in the last X days.
The logic to detect one of this sites is "Site Alpha has received at least one report for item A, but no more reports for that item in the last X days".
If a site never received a report for item B, item B will not trigger this alert
In the Options menu:
Mark sites which have not sent reports for every item they track? (Yes/No)
Number of days without reports (three digits max)
Mark site with color (color selector)
Inventory by faculty
Aggregate from tree and combine to totals
User registration: Capitalize Names
Let’s capitalize first letter of each word that we accept as “name”, store it that way, and use it that way to get back to users.
MDA PABLO DESTEFANIS 323 Will store Pablo Destefanis as the name associated with the number, and will use it to address the user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.