Skip to content

Commit dc2b517

Browse files
Finalize documentation for v0.2.5 alpha release
1 parent 665c6de commit dc2b517

File tree

1 file changed

+89
-24
lines changed

1 file changed

+89
-24
lines changed

narcotics_tracker/__init__.py

Lines changed: 89 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tracks the inventory of controlled substances used at EMS agencies.
22
33
#* Title: Narcotics Tracker
4-
#* Version: 0.2.0
4+
#* Version: 0.2.5
55
#* Author: Scott Kostolni - (https://github.com/ScottSucksAtProgramming)
66
77
#* Special Thanks:
@@ -30,20 +30,42 @@
3030
3131
#* Current Completed Features:
3232
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.
4062
4163
#* Planned Features:
4264
4365
#✓ Medications and Initial Development (v0.1.0 - Alpha) - Completed!
4466
#✓ 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!!
4769
#! Command Line Tools (v0.0.0 - Beta)
4870
#! Order Tracking (v0.1.0 - Beta)
4971
#! Lot Tracking (v0.2.0 - Beta)
@@ -53,27 +75,70 @@
5375
#! Console Interface (v0.6.0)
5476
#! GUI Interface (v0.7.0)
5577
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.
57122
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.
66125
67-
#* Modules:
126+
#* Commands
68127
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.
73137
74138
75139
#* Release Notes:
76140
77141
Version 0.1.0 - https://github.com/ScottSucksAtProgramming/narcotics_tracker/releases/tag/v0.1.0-alpha
78142
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
79144
"""

0 commit comments

Comments
 (0)