Skip to content

Commit 68c7e29

Browse files
Merge pull request #23 from ScottSucksAtProgramming/refactoring
Refactoring Complete. Issue Closed
2 parents 78bcff5 + 2355954 commit 68c7e29

File tree

159 files changed

+7021
-10820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+7021
-10820
lines changed

.vscode/settings.json

+35-40
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,13 @@
66
"**/CVS": true,
77
"**/.DS_Store": true,
88
"**/Thumbs.db": true,
9-
"venv": true,
10-
".vscode": true,
11-
"__pycache__": true,
12-
".pytest_cache": true,
13-
"narcotics_tracker/.pytest_cache": true,
14-
"narcotics_tracker/__pycache__": true,
15-
"tests/.pytest_cache": true,
16-
"tests/unit/__pycache__": true,
17-
"tests/unit/.pytest_cache": true,
18-
"narcotics_tracker/container/__pycache__": true,
19-
"narcotics_tracker/units/__pycache__": true,
20-
"narcotics_tracker/medication/__pycache__": true,
21-
"narcotics_tracker/converter/__pycache__": true,
22-
"narcotics_tracker/containers/__pycache__": true,
23-
"tests/unit/medication_tests/__pycache__": true,
24-
"tests/unit/units/__pycache__": true,
25-
"tests/__pycache__": true,
26-
"tests/unit/medication_tests/.pytest_cache": true,
27-
"narcotics_tracker/database_writer/__pycache__": true,
28-
"tests/unit/database_writer_tests/__pycache__": true,
29-
"tests/unit/units/.pytest_cache": true,
30-
"tests/unit/database_tests/__pycache__": true,
31-
"tests/unit/setup_tests/.pytest_cache": true,
32-
"tests/unit/setup_tests/__pycache__": true,
33-
"narcotics_tracker/setup/__pycache__": true,
34-
"narcotics_tracker/database/__pycache__": true,
35-
"tests/unit/units_tests/__pycache__": true,
36-
"tests/unit/units_tests/.pytest_cache": true,
37-
"tests/unit/database_tests/.pytest_cache": true,
38-
"scripts/__pycache__": true,
39-
"narcotics_tracker/date/__pycache__": true,
40-
"narcotics_tracker/builders/__pycache__": true,
41-
"narcotics_tracker/enums/__pycache__": true,
42-
"narcotics_tracker/utils/__pycache__": true,
43-
"scripts/cli/__pycache__": true
9+
"**/__pycache__": true,
10+
"**/.pytest_cache": true,
11+
"**/.vscode": true,
12+
"**/venv": true
4413
},
4514
"hide-files.files": [
4615
"venv",
47-
".vscode",
48-
"__pycache__",
4916
".pytest_cache",
5017
"narcotics_tracker/.pytest_cache",
5118
"narcotics_tracker/__pycache__",
@@ -77,7 +44,21 @@
7744
"narcotics_tracker/builders/__pycache__",
7845
"narcotics_tracker/enums/__pycache__",
7946
"narcotics_tracker/utils/__pycache__",
80-
"scripts/cli/__pycache__"
47+
"scripts/cli/__pycache__",
48+
"persistence/__pycache__",
49+
"tests/unit/builders/__pycache__",
50+
"tests/unit/interfaces/__pycache__",
51+
"tests/unit/persistence/__pycache__",
52+
"narcotics_tracker/persistence/__pycache__",
53+
"__pycache__",
54+
".vscode",
55+
"narcotics_tracker/.vscode",
56+
"narcotics_tracker/items/__pycache__",
57+
"tests/unit/items/.pytest_cache",
58+
"tests/unit/items/__pycache__",
59+
"tests/unit/builders/.pytest_cache",
60+
"tests/unit/scripts/__pycache__",
61+
"tests/Integration/__pycache__"
8162
],
8263
"vsicons.associations.folders": [
8364
{
@@ -122,17 +103,24 @@
122103
"python.formatting.provider": "black",
123104
"cSpell.words": [
124105
"Abenthy",
106+
"adjustmentbuilder",
107+
"apap",
108+
"dataclass",
109+
"dataitem",
125110
"Denna",
126111
"Elodin",
127112
"fent",
128113
"Kvothe",
129114
"meds",
130115
"midaz",
131116
"MIDAZOLAM",
117+
"reportingperiod",
118+
"tablewriter",
132119
"unitconverter",
133120
"unixepoch",
134121
"Unobtainium",
135-
"Unobtanium"
122+
"Unobtanium",
123+
"wlvac"
136124
],
137125
"python.testing.cwd": "/Users/scottkostolni/Programming Projects/narcotics_tracker/",
138126
"[python]": {
@@ -147,5 +135,12 @@
147135
],
148136
"githubPullRequests.ignoredPullRequestBranches": [
149137
"master"
150-
]
138+
],
139+
"python.terminal.activateEnvironment": false,
140+
"explorer.compactFolders": false,
141+
"explorer.decorations.badges": true,
142+
"explorer.excludeGitIgnore": false,
143+
"explorer.sortOrder": "filesFirst",
144+
"vsicons.presets.hideExplorerArrows": true,
145+
"explorer.fileNesting.enabled": false
151146
}

README.md

+51-8
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
<img src="assets/logo.png" alt="Logo" width="80" height="80">
3030
</a>
3131

32-
<h3 align="center">Narcotics Tracker</h3>
32+
<h1 align="center">Narcotics Tracker</h1>
3333

3434
<p align="center">
35-
The Narcotics Tracker project is a python program designed to assist controlled substance agents of EMS agencies with tracking of their narcotic inventory.
35+
A utility for managing controlled substance medication inventory for EMS Agencies.
3636
<br />
37-
<a href="https://github.com/ScottSucksAtProgramming/narcotics_tracker"><strong>Explore the docs »</strong></a>
37+
<a href="https://github.com/ScottSucksAtProgramming/narcotics_tracker"><strong>Explore The Docs »</strong></a>
3838
<br />
3939
<br />
4040
<a href="https://github.com/ScottSucksAtProgramming/narcotics_tracker">View Demo</a>
@@ -77,6 +77,13 @@
7777

7878
[![Product Name Screen Shot][product-screenshot]](https://example.com)
7979

80+
Management of controlled substance medications for EMS agencies requires
81+
frequent updates and detailed reporting of medication inventory changes to
82+
state and federal agencies. This goal of the **Narcotics Tracker** is to reduce
83+
the manual workload required by controlled substance agents by providing an
84+
intuitive system to record inventory changes and generate data required for
85+
periodic reporting.
86+
8087
<p align="right">(<a href="#top">back to top</a>)</p>
8188

8289
### Built With
@@ -136,11 +143,47 @@ _For more examples, please refer to the [Documentation](https://example.com)_
136143

137144
## Roadmap
138145

139-
- [ ] Design
140-
- [ ] Sketch out design document covering basic overview and features to
141-
start.
142-
143-
See the
146+
- [x] Design
147+
- [x] Outline program requirements.
148+
- [x] Mock up database design.
149+
- [x] Mock up class diagrams.
150+
- [x] Version 0.1.0 - Alpha - Released On August 24th, 2022
151+
- [x] Medication creation
152+
- [x] Container, Status and Unit creation.
153+
- [x] Persistent data storage with an SQLite3 database.
154+
- [x] Test suite development.
155+
- [x] Version 0.2.0 - Alpha - Released On September 14th, 2022
156+
- [x] Event and Reporting Period creation.
157+
- [x] Adjustment creation and the inventory management enabled.
158+
- [x] Date Management enabled through SQLite3.
159+
- [x] Database Context Manager added.
160+
- [x] Continued expansion of the Test Suite.
161+
- [ ] Version 0.2.5 - Alpha - In progress!
162+
- [ ] Design architecture rework.
163+
- [ ] Design pattern implementation to reduce coupling and increase
164+
flexibility and ease of extension.
165+
- [ ] Documentation update.
166+
- [ ] Continued Test Suite expansion.
167+
- [ ] Version 0.3.0 - Alpha
168+
- [ ] Basic Report Generation
169+
- [ ] Version 0.0.0 - Beta
170+
- [ ] Command Line User Interface
171+
- [ ] Version 0.1.0 - Beta
172+
- [ ] Order Tracking
173+
- [ ] Version 0.2.0 - Beta
174+
- [ ] Order Tracking
175+
- [ ] Version 0.3.0 - Beta
176+
- [ ] Destruction Tracking
177+
- [ ] Version 0.4.0 - Beta
178+
- [ ] Controlled Substance Agent Management
179+
- [ ] Version 0.5.0 - Beta
180+
- [ ] Command Line Tools Interface Update
181+
- [ ] Version 0.6.0 - Beta
182+
- [ ] Console User Interface
183+
- [ ] Version 0.7.0 - Beta
184+
- [ ] Graphical User Interface
185+
186+
See
144187
[open issues](https://github.com/ScottSucksAtProgramming/narcotics_tracker/issues)
145188
for a full list of proposed features (and known issues).
146189

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Narcotics Tracker Builder Diagrams
2+
3+
## Builder Interface
4+
5+
```mermaid
6+
class BuilderInterface {
7+
<<Abstract Base Class>>
8+
+build()
9+
-_reset()
10+
}
11+
```
12+
13+
## DataItem Builder
14+
```mermaid
15+
class DataItemBuilder {
16+
+__init__()
17+
-_reset() Exception
18+
+build() Exception
19+
+set_table()
20+
+set_id()
21+
+set_created_date()
22+
+set_modified_date()
23+
+set_modified_by
24+
}
25+
```
26+
27+
## Adjustment Builder
28+
```mermaid
29+
class AdjustmentBuilder {
30+
-DataItem _dataitem
31+
-_reset()
32+
+build() Adjustment
33+
+set_adjustment_date()
34+
+set_event_code()
35+
+set_medication_code()
36+
+set_adjustment_amount()
37+
+set_reference_id()
38+
+set_reporting_period_id()
39+
}
40+
```
41+
42+
## Event Builder
43+
```mermaid
44+
class EventBuilder {
45+
-DataItem _dataitem
46+
-_reset()
47+
+build() Event
48+
+set_event_code()
49+
+set_event_name()
50+
+set_description()
51+
+set_modifier()
52+
}
53+
```
54+
55+
## Medication Builder
56+
```mermaid
57+
class MedicationBuilder {
58+
-DataItem _dataitem
59+
-_reset()
60+
+build() Medication
61+
+set_medication_code()
62+
+set_medication_name()
63+
+set_fill_amoun()
64+
+set_medication_amount()
65+
+set_preferred_unit())
66+
+set_concentration()
67+
+set_status()
68+
}
69+
```
70+
71+
72+
## Reporting Period Builder
73+
```mermaid
74+
class ReportingPeriodBuilder {
75+
-DataItem _dataitem
76+
-_reset()
77+
+build() ReportingPeriod
78+
+set_start_date()
79+
+set_end_date()
80+
+set_status()
81+
}
82+
```
83+
84+
## Status Builder
85+
```mermaid
86+
class StatusBuilder {
87+
-DataItem _dataitem
88+
-_reset()
89+
+build() Status
90+
+set_status_code()
91+
+set_status_name()
92+
+set_description()
93+
}
94+
```
95+
96+
## Unit Builder
97+
```mermaid
98+
class UnitBuilder {
99+
-DataItem _dataitem
100+
-_reset()
101+
+build() Unit
102+
+set_unit_code()
103+
+set_unit_name()
104+
+set_decimals()
105+
}
106+
```

0 commit comments

Comments
 (0)