-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from ScottSucksAtProgramming/inventory
Pulling Completed Inventory Update
- Loading branch information
Showing
62 changed files
with
9,629 additions
and
1,504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Inventory Module Release | ||
|
||
## What do I need to do to release the Inventory Module? | ||
- [ ] Write Release Notes | ||
- [ ] Update README | ||
- [ ] Update Documentation | ||
- [ ] Organize Code into set style. | ||
|
||
|
||
|
||
## Imports | ||
- [ ] Remove unnecessary Imports | ||
- [ ] Imports should be organized as follows and separated by blank lines: | ||
- [ ] Third Party Libraries | ||
- [ ] Built In Imports | ||
- [ ] Project / Local Imports | ||
- [ ] Imports should be sorted as follows: | ||
- [ ] Direct Import Statements (i.e `import sqlite`) | ||
- [ ] From Import Statements (i.e `from module import function`) | ||
- [ ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Introducing Narcotics Tracker v0.2.0. Now with 60% more tables! | ||
|
||
| Version | Release Date | Audience | | ||
| :------ | :----------- | :--------- | | ||
| 0.2.0 | 09/14/2022 | Developers | | ||
|
||
**Message from ScottSucksAtProgramming:** | ||
|
||
> Hey! Thanks for looking at the release notes for version 0.2.0 of the | ||
> Narcotics Tracker. This release includes a lot of changes and added new | ||
> functionality to track inventory changes of controlled substance medications. | ||
> I have had the pleasure of learning a lot about Object Oriented Programming, | ||
> software architecture and the | ||
> [pleasure of writing documentation](https://giphy.com/gifs/bored-monsters-inc-RKS1pHGiUUZ2g) | ||
> | ||
> I've immensely enjoyed working on this project. The next update will focus on | ||
> reorganizing the files and code to reduce coupling and better follow the | ||
> Single Responsibility Principle. Following that a set of command line tools | ||
> will be released for setting up the Narcotics Tracker on new systems and for | ||
> interacting with the database. | ||
> | ||
> Any questions or comments are welcome please reach out to me via the Github | ||
> Repository. | ||
## New Database Objects added. | ||
|
||
With version 0.2.0 you can now create multiple database objects needed for | ||
controlled substance inventory management. | ||
|
||
### Medications | ||
|
||
Medications are the bread and butter of this project and are still created | ||
using The Builder Pattern. They live in inside the medications table. | ||
|
||
### Containers, Units and Statuses | ||
|
||
Containers, Units and Statuses have been moved their own Vocabulary Control | ||
Tables instead of Enums. This will allow for greater flexibility for users to | ||
add and remove these items as necessary for their agencies. | ||
|
||
### Events and Reporting Periods | ||
|
||
Two brand new database objects were defined and created. Events describe the | ||
type of event which caused a change in inventory such as patient | ||
administration, waste, or ordering new medications. | ||
|
||
Reporting Periods were created to help organize Adjustments into groups based | ||
on when they need to be reported to the Department of Health and the Bureau of | ||
Narcotics Enforcement. | ||
|
||
### Adjustments | ||
|
||
Adjustments were added as part of the Inventory Module. Events are the reason | ||
that an inventory change occurred; Adjustments represent the actual changes. | ||
Adjustments are logged into the inventory table of the database and either add | ||
or remove an amount of a medication. | ||
|
||
## Database Context Manager | ||
|
||
The Database module and Database Class were updated to support their use as a | ||
context manager. | ||
|
||
Using the 'with' keyword will activate the context manager and ensure that the | ||
connection to the database is closed regardless of any errors or failures | ||
encountered. Please look at the documentation for these items for more | ||
information on using then. | ||
|
||
Example: | ||
|
||
```python | ||
with database.Database() as db: | ||
test_medication.save(db) | ||
``` | ||
|
||
## Dates | ||
|
||
The Date module was removed in favor of using the data functionality provided | ||
by the SQLite3 package. Dates are now stored in the database as integers using | ||
the unix epoch timestamp. This allows for dates to be compared against one | ||
another and for Adjustments to be assigned the correct Reporting Period. It | ||
also simplified the code. | ||
|
||
Dates must be entered using the format 'YYYY-MM-DD HH:MM:SS' or 'YYY-MM-DD' and | ||
are converted into unix epoch by the software. | ||
|
||
## Test Suite | ||
|
||
I have continued to use Test Driven Development and build out the test suite. | ||
As of this release there are 260 unit tests available which run in less than | ||
one second to ensure that all parts of the Narcotics Tracker are working as | ||
expected. | ||
|
||
## Next Release | ||
|
||
The next release will focus on the building of command line tools which should | ||
provide a 'Minimum Viable Product' and a restructure of the software design | ||
focusing on the Single Responsibility Principle and greater use of Objects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.