Skip to content

Commit

Permalink
Merge pull request #23 from ScottSucksAtProgramming/refactoring
Browse files Browse the repository at this point in the history
Refactoring Complete. Issue Closed
  • Loading branch information
ScottSucksAtProgramming authored Oct 31, 2022
2 parents 78bcff5 + 2355954 commit 68c7e29
Show file tree
Hide file tree
Showing 159 changed files with 7,021 additions and 10,820 deletions.
75 changes: 35 additions & 40 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,13 @@
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"venv": true,
".vscode": true,
"__pycache__": true,
".pytest_cache": true,
"narcotics_tracker/.pytest_cache": true,
"narcotics_tracker/__pycache__": true,
"tests/.pytest_cache": true,
"tests/unit/__pycache__": true,
"tests/unit/.pytest_cache": true,
"narcotics_tracker/container/__pycache__": true,
"narcotics_tracker/units/__pycache__": true,
"narcotics_tracker/medication/__pycache__": true,
"narcotics_tracker/converter/__pycache__": true,
"narcotics_tracker/containers/__pycache__": true,
"tests/unit/medication_tests/__pycache__": true,
"tests/unit/units/__pycache__": true,
"tests/__pycache__": true,
"tests/unit/medication_tests/.pytest_cache": true,
"narcotics_tracker/database_writer/__pycache__": true,
"tests/unit/database_writer_tests/__pycache__": true,
"tests/unit/units/.pytest_cache": true,
"tests/unit/database_tests/__pycache__": true,
"tests/unit/setup_tests/.pytest_cache": true,
"tests/unit/setup_tests/__pycache__": true,
"narcotics_tracker/setup/__pycache__": true,
"narcotics_tracker/database/__pycache__": true,
"tests/unit/units_tests/__pycache__": true,
"tests/unit/units_tests/.pytest_cache": true,
"tests/unit/database_tests/.pytest_cache": true,
"scripts/__pycache__": true,
"narcotics_tracker/date/__pycache__": true,
"narcotics_tracker/builders/__pycache__": true,
"narcotics_tracker/enums/__pycache__": true,
"narcotics_tracker/utils/__pycache__": true,
"scripts/cli/__pycache__": true
"**/__pycache__": true,
"**/.pytest_cache": true,
"**/.vscode": true,
"**/venv": true
},
"hide-files.files": [
"venv",
".vscode",
"__pycache__",
".pytest_cache",
"narcotics_tracker/.pytest_cache",
"narcotics_tracker/__pycache__",
Expand Down Expand Up @@ -77,7 +44,21 @@
"narcotics_tracker/builders/__pycache__",
"narcotics_tracker/enums/__pycache__",
"narcotics_tracker/utils/__pycache__",
"scripts/cli/__pycache__"
"scripts/cli/__pycache__",
"persistence/__pycache__",
"tests/unit/builders/__pycache__",
"tests/unit/interfaces/__pycache__",
"tests/unit/persistence/__pycache__",
"narcotics_tracker/persistence/__pycache__",
"__pycache__",
".vscode",
"narcotics_tracker/.vscode",
"narcotics_tracker/items/__pycache__",
"tests/unit/items/.pytest_cache",
"tests/unit/items/__pycache__",
"tests/unit/builders/.pytest_cache",
"tests/unit/scripts/__pycache__",
"tests/Integration/__pycache__"
],
"vsicons.associations.folders": [
{
Expand Down Expand Up @@ -122,17 +103,24 @@
"python.formatting.provider": "black",
"cSpell.words": [
"Abenthy",
"adjustmentbuilder",
"apap",
"dataclass",
"dataitem",
"Denna",
"Elodin",
"fent",
"Kvothe",
"meds",
"midaz",
"MIDAZOLAM",
"reportingperiod",
"tablewriter",
"unitconverter",
"unixepoch",
"Unobtainium",
"Unobtanium"
"Unobtanium",
"wlvac"
],
"python.testing.cwd": "/Users/scottkostolni/Programming Projects/narcotics_tracker/",
"[python]": {
Expand All @@ -147,5 +135,12 @@
],
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
],
"python.terminal.activateEnvironment": false,
"explorer.compactFolders": false,
"explorer.decorations.badges": true,
"explorer.excludeGitIgnore": false,
"explorer.sortOrder": "filesFirst",
"vsicons.presets.hideExplorerArrows": true,
"explorer.fileNesting.enabled": false
}
59 changes: 51 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<img src="assets/logo.png" alt="Logo" width="80" height="80">
</a>

<h3 align="center">Narcotics Tracker</h3>
<h1 align="center">Narcotics Tracker</h1>

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

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

Management of controlled substance medications for EMS agencies requires
frequent updates and detailed reporting of medication inventory changes to
state and federal agencies. This goal of the **Narcotics Tracker** is to reduce
the manual workload required by controlled substance agents by providing an
intuitive system to record inventory changes and generate data required for
periodic reporting.

<p align="right">(<a href="#top">back to top</a>)</p>

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

## Roadmap

- [ ] Design
- [ ] Sketch out design document covering basic overview and features to
start.

See the
- [x] Design
- [x] Outline program requirements.
- [x] Mock up database design.
- [x] Mock up class diagrams.
- [x] Version 0.1.0 - Alpha - Released On August 24th, 2022
- [x] Medication creation
- [x] Container, Status and Unit creation.
- [x] Persistent data storage with an SQLite3 database.
- [x] Test suite development.
- [x] Version 0.2.0 - Alpha - Released On September 14th, 2022
- [x] Event and Reporting Period creation.
- [x] Adjustment creation and the inventory management enabled.
- [x] Date Management enabled through SQLite3.
- [x] Database Context Manager added.
- [x] Continued expansion of the Test Suite.
- [ ] Version 0.2.5 - Alpha - In progress!
- [ ] Design architecture rework.
- [ ] Design pattern implementation to reduce coupling and increase
flexibility and ease of extension.
- [ ] Documentation update.
- [ ] Continued Test Suite expansion.
- [ ] Version 0.3.0 - Alpha
- [ ] Basic Report Generation
- [ ] Version 0.0.0 - Beta
- [ ] Command Line User Interface
- [ ] Version 0.1.0 - Beta
- [ ] Order Tracking
- [ ] Version 0.2.0 - Beta
- [ ] Order Tracking
- [ ] Version 0.3.0 - Beta
- [ ] Destruction Tracking
- [ ] Version 0.4.0 - Beta
- [ ] Controlled Substance Agent Management
- [ ] Version 0.5.0 - Beta
- [ ] Command Line Tools Interface Update
- [ ] Version 0.6.0 - Beta
- [ ] Console User Interface
- [ ] Version 0.7.0 - Beta
- [ ] Graphical User Interface

See
[open issues](https://github.com/ScottSucksAtProgramming/narcotics_tracker/issues)
for a full list of proposed features (and known issues).

Expand Down
106 changes: 106 additions & 0 deletions assets/diagrams/builders/class_diagrams_builders_mermaid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Narcotics Tracker Builder Diagrams

## Builder Interface

```mermaid
class BuilderInterface {
<<Abstract Base Class>>
+build()
-_reset()
}
```

## DataItem Builder
```mermaid
class DataItemBuilder {
+__init__()
-_reset() Exception
+build() Exception
+set_table()
+set_id()
+set_created_date()
+set_modified_date()
+set_modified_by
}
```

## Adjustment Builder
```mermaid
class AdjustmentBuilder {
-DataItem _dataitem
-_reset()
+build() Adjustment
+set_adjustment_date()
+set_event_code()
+set_medication_code()
+set_adjustment_amount()
+set_reference_id()
+set_reporting_period_id()
}
```

## Event Builder
```mermaid
class EventBuilder {
-DataItem _dataitem
-_reset()
+build() Event
+set_event_code()
+set_event_name()
+set_description()
+set_modifier()
}
```

## Medication Builder
```mermaid
class MedicationBuilder {
-DataItem _dataitem
-_reset()
+build() Medication
+set_medication_code()
+set_medication_name()
+set_fill_amoun()
+set_medication_amount()
+set_preferred_unit())
+set_concentration()
+set_status()
}
```


## Reporting Period Builder
```mermaid
class ReportingPeriodBuilder {
-DataItem _dataitem
-_reset()
+build() ReportingPeriod
+set_start_date()
+set_end_date()
+set_status()
}
```

## Status Builder
```mermaid
class StatusBuilder {
-DataItem _dataitem
-_reset()
+build() Status
+set_status_code()
+set_status_name()
+set_description()
}
```

## Unit Builder
```mermaid
class UnitBuilder {
-DataItem _dataitem
-_reset()
+build() Unit
+set_unit_code()
+set_unit_name()
+set_decimals()
}
```
Loading

0 comments on commit 68c7e29

Please sign in to comment.