Pages

Friday, June 27, 2014

Interface Updates

Along with the updated database functions I updated the version of the user interface, which has been made to actively display and interact with database information. This version was compatible with the function files created on June 23rd. Those functions have since been updated (as of June 26th) and I am reworking the client info menu to be compatible with the new versions.

Unfortunately, I didn't get a screen shot before updating the old function files, but hopefully I can have a new version of the client info menu up and running soon.

It also should be noted that I have switched around the flow of the interface following a visit to the food pantry and seeing the flow of data entry. The Client Info page has now been mated with the main menu and is the primary page. Also, it is now Light Sea Green, though color choice is definitely subject to change.

Delete functions

The delete functions were added to the repository, in files called cdbfunctionsV2.py, and cdbifuncV2.py (these files were added with a different name to help keep track of compatibility with the interface.

The files containing the queries are nearing their final version; the only additions needed are functions that will generate csv files for reports. Once these are completed, the back-end for the sqlite-version of the database will be finished. The next step will be making some modifications so the same queries are compatible with Postgres.

Tuesday, June 24, 2014

Finally simplified function calls

First of all, the new_client function has been renamed to new_household, since we are typically adding more than one client at a time.

Secondly, because we are adding multiple clients at once, it is necessary to keep relevant data together (e.g. one client may have a phone number while another may not, and we needed to associate these phone numbers with the correct first name, last name, and dob). We attempted to use lists and tuples to solve this problem, but the function calls become virtually indecipherable, and there was a lot of potential for index-out-of-bound and other errors. However, all of these issues have been resolved by creating a number of objects to hold the data that will be sent to the functions. This not only resolves a lot of errors, but also makes cleaner, easier to understand functions.

Friday, June 20, 2014

On the interface end of things, there's been a bunch of work done on creating and then improving the window to view client information. This is the first version which is a semi-functional skeleton:






It was connected to some of the old database functions.

It has since been expanded and necessary features have been added to it including visit information and connections to the new set of database functions.

Some of the information (like the notes, visit dates, volunteers) are hard-coded strings just to show an example but will soon be replaced with functions that pull the information directly from the database.

Wednesday, June 18, 2014

Function redefinitions

The list_people function was changed to return the street_address of each person, in addition to the first name, last name, and unique id. Another small function, new_volunteer, was added.

The arguments for the new_client function were becoming difficult to manage. In addition, after writing a good portion of the update_client function, it became clear that there needed to be more "connectedness" between the bits of information that belonged to a single client. Instead of receiving individual lists of first names, last names, etc., the function now takes a list of tuples, where each tuple contains a first name, a last name, etc. This will be necessary for the update_client function, where multiple clients may be updated at once, and we need to associate the new data with the right id. In an effort to conserve as much consistency across the functions as possible, this was applied to the new_client function as well.


Monday, June 16, 2014

More functions & session error corrected

The cdbfunctions.py module was updated to include another function for inserting new visits, and two functions for updating a household and an individual's records.

Since this module contains "helper" functions for the another module, it was using the current session, but had no way of accessing the current session, so this was fixed by adding the session as another argument to each insert/update function.

Friday, June 13, 2014

User Interface Additions

Initial models of the user interfaces for the main menu, login menu, and addition of a client have been created using tkinter (the python module). They are still in a skeletal and somewhat janky phase right now, but can be used to test out connecting user actions to simple database queries.




Monday, June 9, 2014

Module split & additional functions

The python module containing all functions has been split into two modules. There is now a module for functions that will be called directly by the user interface, and a module of "helper" functions. This will hopefully make the interface design much easier. In addition, the following functions were added to the repository: reset, select_client, list_people, and get_age_breakdown.

Added functions

Fully tested, basic functions added to repository. These functions deal with the case of adding a new client and household to the database. The functions are organized to be as clear as possible, so they can easily be called by the interface.

Thursday, June 5, 2014

Table Definitions

The tables of the database have been defined, using the Python sqlite database, and the sqlalchemy module. The functions (queries) and TkInter interface are still in progress. Once completed, this will conclude stage one of the project, building a prototype.