|
| 1 | +# Introducing Narcotics Tracker v0.2.0. Now with 60% more tables! |
| 2 | + |
| 3 | +| Version | Release Date | Audience | |
| 4 | +| :------ | :----------- | :--------- | |
| 5 | +| 0.2.0 | 09/14/2022 | Developers | |
| 6 | + |
| 7 | +**Message from ScottSucksAtProgramming:** |
| 8 | + |
| 9 | +> Hey! Thanks for looking at the release notes for version 0.2.0 of the |
| 10 | +> Narcotics Tracker. This release includes a lot of changes and added new |
| 11 | +> functionality to track inventory changes of controlled substance medications. |
| 12 | +> I have had the pleasure of learning a lot about Object Oriented Programming, |
| 13 | +> software architecture and the |
| 14 | +> [pleasure of writing documentation](https://giphy.com/gifs/bored-monsters-inc-RKS1pHGiUUZ2g) |
| 15 | +> |
| 16 | +> I've immensely enjoyed working on this project. The next update will focus on |
| 17 | +> reorganizing the files and code to reduce coupling and better follow the |
| 18 | +> Single Responsibility Principle. Following that a set of command line tools |
| 19 | +> will be released for setting up the Narcotics Tracker on new systems and for |
| 20 | +> interacting with the database. |
| 21 | +> |
| 22 | +> Any questions or comments are welcome please reach out to me via the Github |
| 23 | +> Repository. |
| 24 | +
|
| 25 | +## New Database Objects added. |
| 26 | + |
| 27 | +With version 0.2.0 you can now create multiple database objects needed for |
| 28 | +controlled substance inventory management. |
| 29 | + |
| 30 | +### Medications |
| 31 | + |
| 32 | +Medications are the bread and butter of this project and are still created |
| 33 | +using The Builder Pattern. They live in inside the medications table. |
| 34 | + |
| 35 | +### Containers, Units and Statuses |
| 36 | + |
| 37 | +Containers, Units and Statuses have been moved their own Vocabulary Control |
| 38 | +Tables instead of Enums. This will allow for greater flexibility for users to |
| 39 | +add and remove these items as necessary for their agencies. |
| 40 | + |
| 41 | +### Events and Reporting Periods |
| 42 | + |
| 43 | +Two brand new database objects were defined and created. Events describe the |
| 44 | +type of event which caused a change in inventory such as patient |
| 45 | +administration, waste, or ordering new medications. |
| 46 | + |
| 47 | +Reporting Periods were created to help organize Adjustments into groups based |
| 48 | +on when they need to be reported to the Department of Health and the Bureau of |
| 49 | +Narcotics Enforcement. |
| 50 | + |
| 51 | +### Adjustments |
| 52 | + |
| 53 | +Adjustments were added as part of the Inventory Module. Events are the reason |
| 54 | +that an inventory change occurred; Adjustments represent the actual changes. |
| 55 | +Adjustments are logged into the inventory table of the database and either add |
| 56 | +or remove an amount of a medication. |
| 57 | + |
| 58 | +## Database Context Manager |
| 59 | + |
| 60 | +The Database module and Database Class were updated to support their use as a |
| 61 | +context manager. |
| 62 | + |
| 63 | +Using the 'with' keyword will activate the context manager and ensure that the |
| 64 | +connection to the database is closed regardless of any errors or failures |
| 65 | +encountered. Please look at the documentation for these items for more |
| 66 | +information on using then. |
| 67 | + |
| 68 | +Example: |
| 69 | + |
| 70 | +```python |
| 71 | +with database.Database() as db: |
| 72 | + test_medication.save(db) |
| 73 | +``` |
| 74 | + |
| 75 | +## Dates |
| 76 | + |
| 77 | +The Date module was removed in favor of using the data functionality provided |
| 78 | +by the SQLite3 package. Dates are now stored in the database as integers using |
| 79 | +the unix epoch timestamp. This allows for dates to be compared against one |
| 80 | +another and for Adjustments to be assigned the correct Reporting Period. It |
| 81 | +also simplified the code. |
| 82 | + |
| 83 | +Dates must be entered using the format 'YYYY-MM-DD HH:MM:SS' or 'YYY-MM-DD' and |
| 84 | +are converted into unix epoch by the software. |
| 85 | + |
| 86 | +## Test Suite |
| 87 | + |
| 88 | +I have continued to use Test Driven Development and build out the test suite. |
| 89 | +As of this release there are 260 unit tests available which run in less than |
| 90 | +one second to ensure that all parts of the Narcotics Tracker are working as |
| 91 | +expected. |
| 92 | + |
| 93 | +## Next Release |
| 94 | + |
| 95 | +The next release will focus on the building of command line tools which should |
| 96 | +provide a 'Minimum Viable Product' and a restructure of the software design |
| 97 | +focusing on the Single Responsibility Principle and greater use of Objects. |
0 commit comments