Skip to content

Releases: ScottSucksAtProgramming/narcotics_tracker

Reports Activate!!! Welcome to Version 0.3.0-alpha!!

07 Nov 22:39
4536330
Compare
Choose a tag to compare

Introducing Narcotics Tracker v0.2.5.

Version Release Date Audience
0.3.0 11/07/2022 Developers

Message from ScottSucksAtProgramming:

Hooray! Version 0.3.0 is here! This is not a gigantic update but it marks the
completion of the primary goal I had for this project. With a single command
the Narcotics Tracker can now print out all the information required for the
NYS Semi-Annual Controlled Substance Inventory Form for EMS Agencies'
(DOH-3848). This will make reporting each period far far easier than doing it
manually.

Reports Package

The Reports Package has been added to the main directory of the Narcotics
Tracker.

Interface

The Report Module within the Interfaces sub-package contains the protocol for
reports. It is similar to the Command Protocol and is using the Command Design
Pattern for its implementation. The receiver can be set via the initializer.
The run method will execute the report and return the results.

Return Medication Stock Report

This report returns the current amount of a specified medication in the
inventory. Amount is currently returned as a float. This may be adjusted later
to return a dictionary to conform to the other reports.

Return Current Inventory

THis report returns the current amount of all 'active' medications in the
'medications' table in the inventory. This report is designed to be used for
regular inventory stock counts. Where the physical inventory count can be
compared to the return value of this report. This report currently returns the
data as a list of dictionaries.

Bi-Annual Narcotics Inventory Report

This is the big guy! This will cycle through all active medications from the
'medications' table and all data from the current, 'open' reporting period to
return the following:

-   Starting amount of the medication in milliliters.
-   Amount of the medication received from orders in milliliters.
-   Amount of the medication used by providers in milliliters.
-   Amount of the medication wasted by providers in milliliters.
-   Amount of the medication destroyed at a reverse distributor in milliliters.
-   Amount of the medication lost or stolen in milliliters.
-   Final amount of the medication in milliliters.

When adjustments are up to date, this report should be accurate and can be used
to complete this report without issue.

Next Up!

The next release will see the implementation of a command line interface! Wish
me luck!

Boo!! Refactoring Complete - Version 0.2.5-alpha released!

31 Oct 05:29
68c7e29
Compare
Choose a tag to compare

Introducing Narcotics Tracker v0.2.5.

Version Release Date Audience
0.2.5 10/31/2022 Developers

Message from ScottSucksAtProgramming:

Welcome to the Newly Refactored version of the Narcotics Tracker. After
version 0.2.0 the code was quite a bit of a mess. I focused on restructuring
the code and reducing coupling. The ultimate effect is code which is much
more pleasant to work with and easier to understand. Read on to see the
larger changes.

Structural Improvements

Interfaces

Most packages within the Narcotics Tracker now include an interface specifying
how new modules should be created. Interfaces are located in a separate
sub-package.

Design Patterns

The Builder Pattern had already been implemented to make construction of
DataItems easier. With this update the Command Pattern was also implemented
allowing for the decoupling many modules. All commands share the same interface
allowing for easy creation of new commands. Look at the documentation in the
Commands Package for more information.

Inheritance and DataClasses

The Items Package saw an overhaul in is structure. Each of the six DataItems
inherit from a DataItem superclass. DataItems are no longer responsible for
saving and loading themselves from the database, their only concern is to store
their data. Each DataItem is now written as a dataclass. These two change make
the code much simpler to read.

New Functionality

The Service Provider

The Utilities Package was removed and replaced with the services package. As of
this release three services are included in this package. The SQLiteManager
provides the persistence service which stores and retrieves information from
the SQLite3 database. To manage dates and times the DateTimeManager provides
the datetime service; This object is responsible for providing datetime
information and converting between human readable dates and unix timestamps.
The conversion service, provided by the ConversionManager, converts between
different units of mass and volume.

The Service Provider module instantiates each service as needed. It is a single
point of access for all current and future services. The Service Provider also
allows for each service manager to be replaced with new or different services
as needed.

Next Up!

The next release will see the creation of the reporting functionality and a set
of general reports which are frequently used for narcotics management.

Introducing Narcotics Tracker v0.2.0. Now with 60% more tables!

14 Sep 23:22
f78881b
Compare
Choose a tag to compare

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

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:

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.

Sayonara, Narcotics Tracker v0.0.0. Long live version 0.1.0!!

24 Aug 20:15
Compare
Choose a tag to compare
Version Release Date Audience
0.1.0 08/24/2022 Developers

Message from ScottSucksAtProgramming:

Hey! Thanks for checking out the changes coming to the Narcotics Tracker! This project is aimed at simplifying the tracking of controlled substance inventories for EMS agencies in New York State. This project is in still its infancy but I am proud to release the first major update having to do with Medications!

Create your agency’s medications.

To keep track of the controlled substance inventory the Narcotics Tracker needs to know which medications are used at your EMS agency.

The Medication and Builder Module makes creating and saving medications easy by using a stepwise approach to assign medication attributes.

Medications that have been saved can be loaded from their data and updated as necessary to keep them up to date.

Start building your agency’s database.

Your medications need to live somewhere. I built the database module to make connecting and interacting with the database a snap.

The Setup Script will create the table needed to store all data for the medications. If you want to manage tables yourself all the tools you need are contained within the database module.

Containers, statuses, and units.

A set of options have been defined within the Enums package which can be used to set various attributes for your medications.

Conversion between different dosage units is handled by the Unit Conversion module. You never have to worry about misplacing a decimal again.

Develop additional features without fear using the test suite!

Each module has its own test suite containing almost 80 tests to ensure all parts of the code are working as intended.

Running tests ensure that future updates to the project do not break any previous features and identify specific issues. Play and develop without fear.