|
1 | 1 | """Tracks the inventory of controlled substances used at EMS agencies.
|
2 | 2 |
|
3 | 3 | #* Title: Narcotics Tracker
|
4 |
| -#* Version: 0.2.0 |
| 4 | +#* Version: 0.2.5 |
5 | 5 | #* Author: Scott Kostolni - (https://github.com/ScottSucksAtProgramming)
|
6 | 6 |
|
7 | 7 | #* Special Thanks:
|
|
30 | 30 |
|
31 | 31 | #* Current Completed Features:
|
32 | 32 |
|
33 |
| - Database Object Creation - Medications, Medication Containers, Units of |
34 |
| - Measurement, Events, Inventory Adjustments, Reporting Periods and Statuses |
35 |
| - can be created using the Builder Modules for each item. |
36 |
| -
|
37 |
| - Database and Table Creation - Tables have been defined for all Database |
38 |
| - Objects and can be stored. The Database Class now functions as a context |
39 |
| - manager for better resource management. |
| 33 | + Custom Object Creation - Medications, Units of Measurement, Events, |
| 34 | + specific Inventory Adjustments, Reporting Periods and Statuses can be |
| 35 | + created allowing any EMS agency to customize the Narcotics Tracker to |
| 36 | + their policies and procedures. These objects are collectively referred to |
| 37 | + as DataItems as they are items which live in the database. |
| 38 | +
|
| 39 | + Persistent Storage - The built-in SQLite3 Database library has been used |
| 40 | + as the main data repository for the Narcotics Tracker. Tables have been |
| 41 | + created to for each of the six DataItems. The Inventory Table serves as |
| 42 | + the main table for the database; It tracks each individual change to the |
| 43 | + stock of a medication, called an Adjustment. Adjustments use data stored |
| 44 | + in the Events Table, among others, to calculate how the adjustment affects |
| 45 | + the stock and which medications are affected by it. The Medications Table |
| 46 | + stores information on the controlled substances used by an EMS agency |
| 47 | + including their concentration and preferred unit of measurement. These |
| 48 | + data points are used to tally medication totals and calculate data |
| 49 | + required when reporting to oversight agencies. |
| 50 | + |
| 51 | + Utility Services - Multiple utilities are used to manage the inventory of |
| 52 | + controlled substances. The Service Provider feature provides quick and |
| 53 | + easy access to these services and provides an interface that new services |
| 54 | + can make use of without requiring changes to the code that relies on a |
| 55 | + service. |
| 56 | +
|
| 57 | + Flexible Design and Architecture - In the most recent update, the |
| 58 | + structure of the Narcotics Tracker was rebuilt from the ground up to |
| 59 | + improve the readability of the code and reduce its fragility. As a result |
| 60 | + the code is well structured, easier to work with, and much more |
| 61 | + extensible. |
40 | 62 |
|
41 | 63 | #* Planned Features:
|
42 | 64 |
|
43 | 65 | #✓ Medications and Initial Development (v0.1.0 - Alpha) - Completed!
|
44 | 66 | #✓ Inventory Tracking (v0.2.0 - Alpha) - Completed!
|
45 |
| - #Todo Code Architecture Improvement (v0.2.5 - Alpha) - In Progress |
46 |
| - #! Basic Report Generation (v0.3.0 - Alpha) |
| 67 | + #✓ Code Architecture Improvement (v0.2.5 - Alpha) - Completed!! |
| 68 | + #TODO Basic Report Generation (v0.3.0 - Alpha) - Next Up!! |
47 | 69 | #! Command Line Tools (v0.0.0 - Beta)
|
48 | 70 | #! Order Tracking (v0.1.0 - Beta)
|
49 | 71 | #! Lot Tracking (v0.2.0 - Beta)
|
|
53 | 75 | #! Console Interface (v0.6.0)
|
54 | 76 | #! GUI Interface (v0.7.0)
|
55 | 77 |
|
56 |
| -#* Packages: |
| 78 | +#* Meet the Players: |
| 79 | +
|
| 80 | + #* DataItems and Builders |
| 81 | +
|
| 82 | + DataItems are individual objects which are stored in the database and |
| 83 | + enable inventory management. They contain numerous attributes and the |
| 84 | + Builder Design Pattern was used to help make constructing DataItems |
| 85 | + easier. Each DataItem has its own builder which provides a step-wise |
| 86 | + approach to assigning attributes and constructing the object. In |
| 87 | + future updates Director Objects will be provided to walk end users |
| 88 | + through the creation of DataItems. |
| 89 | +
|
| 90 | + - Adjustments record specific changes to the stock of a medication. |
| 91 | +
|
| 92 | + - Events classify the types of changes which commonly occur and |
| 93 | + determine if amounts are added or removed from the stock. |
| 94 | +
|
| 95 | + - Medications store relevant information about the controlled |
| 96 | + substances. Adjustments must specify which medication(s) were |
| 97 | + affected. |
| 98 | +
|
| 99 | + - Reporting Periods allow for adjustments to be organized by their |
| 100 | + date and are used to determine which adjustments need to be |
| 101 | + reported. |
| 102 | +
|
| 103 | + - Statuses provide additional information for Medications, Reporting |
| 104 | + Periods and future additions to the Narcotics Tracker. |
| 105 | +
|
| 106 | + - Units store information on how a medication is measured and are |
| 107 | + integral to completing reports for oversight agencies. |
| 108 | +
|
| 109 | + #* The Services |
| 110 | +
|
| 111 | + Services provide utilities to help with the management of the |
| 112 | + narcotics inventory. The Service Provider offers an easy way for these |
| 113 | + services to be accessed. |
| 114 | +
|
| 115 | + - The Persistence Service communicates directly with the SQLite |
| 116 | + database. It stores items in the appropriate tables returns |
| 117 | + requested data. |
| 118 | +
|
| 119 | + - The DateTime Service provides date and time information and converts |
| 120 | + between human readable dates and the unix timestamps which are |
| 121 | + stored in the database. |
57 | 122 |
|
58 |
| - Builders: Contains the builders for the DataItems used in the |
59 |
| - Narcotics Tracker. |
60 |
| - Items: Contains the items which are stored in the database. |
61 |
| - Scripts: Contains various scripts which help to setup and use the |
62 |
| - Narcotics Tracker. |
63 |
| - Setup: Contains the modules needed to set up the Narcotics Tracker |
64 |
| - software. |
65 |
| - Utils: Contains utility helper modules and functions. |
| 123 | + - The Conversion Service converts medication amounts between various |
| 124 | + units of mass and volume. |
66 | 125 |
|
67 |
| -#* Modules: |
| 126 | + #* Commands |
68 | 127 |
|
69 |
| - Commands: Contains the commands for the SQLite3 Database. |
70 |
| - Database: Manages Communication with the SQLite3 Database. |
71 |
| - SQlite3 Interface: Defines the protocol for commands which interact with |
72 |
| - the SQLite3 database. |
| 128 | + In order to increase the flexibility of the Narcotics Tracker the |
| 129 | + Command Design Pattern was implemented. Commands provide access to |
| 130 | + simple and complex activities through a shared interface. |
| 131 | + |
| 132 | + Each command allows for the specification of its intended receiver |
| 133 | + during initialization. To trigger the command its 'execute' method is |
| 134 | + called. Any required information can be passed into the execute method |
| 135 | + which will pass it on to its target to complete the command. |
| 136 | + Additional commands can be easily created using this interface. |
73 | 137 |
|
74 | 138 |
|
75 | 139 | #* Release Notes:
|
76 | 140 |
|
77 | 141 | Version 0.1.0 - https://github.com/ScottSucksAtProgramming/narcotics_tracker/releases/tag/v0.1.0-alpha
|
78 | 142 | Version 0.2.0 - https://github.com/ScottSucksAtProgramming/narcotics_tracker/releases/tag/v0.2.0-alpha
|
| 143 | + Version 0.2.5 - https://github.com/ScottSucksAtProgramming/narcotics_tracker/releases/tag/v0.2.5-alpha |
79 | 144 | """
|
0 commit comments