forked from botswana-harvard/edc-pharmacy
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
99 changed files
with
5,159 additions
and
874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
from .autocomplete_admin import SubjectAdmin | ||
from .dispensing_history_admin import DispensingHistoryAdmin | ||
from .dosage_guideline_admin import DosageGuidelineAdmin | ||
from .formulation_admin import FormulationAdmin | ||
from .labels_admin import LabelsAdmin | ||
from .list_model_admin import ( | ||
from .medication import ( | ||
AssignmentAdmin, | ||
ContainerTypeAdmin, | ||
DosageGuidelineAdmin, | ||
FormulationAdmin, | ||
FormulationTypeAdmin, | ||
FrequencyUnitsAdmin, | ||
LotAdmin, | ||
MedicationAdmin, | ||
RouteAdmin, | ||
UnitsAdmin, | ||
) | ||
from .medication_admin import MedicationAdmin | ||
from .medication_lot_admin import MedicationLotAdmin | ||
from .order_admin import OrderAdmin | ||
from .product_admin import ProductAdmin | ||
from .prescription import RxAdmin, RxRefillAdmin | ||
from .return_history_admin import ReturnHistoryAdmin | ||
from .rx_admin import RxAdmin | ||
from .rx_refill_admin import RxRefillAdmin | ||
from .stock_admin import StockAdmin | ||
from .stock_create_labels_admin import StockCreateLabelsAdmin | ||
from .stock_receiving_admin import StockReceivingAdmin | ||
|
||
# from .stock import ProductAdmin, ReceivingAdmin, StockAdmin |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from .assignment_admin import AssignmentAdmin | ||
from .container_type_admin import ContainerTypeAdmin | ||
from .dosage_guideline_admin import DosageGuidelineAdmin | ||
from .formulation_admin import FormulationAdmin | ||
from .formulation_type_admin import FormulationTypeAdmin | ||
from .frequency_units_admin import FrequencyUnitsAdmin | ||
from .lot_admin import LotAdmin | ||
from .medication_admin import MedicationAdmin | ||
from .route_admin import RouteAdmin | ||
from .units_admin import UnitsAdmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from typing import Tuple | ||
|
||
from django import forms | ||
from django.contrib import admin | ||
from django_audit_fields.admin import audit_fieldset_tuple | ||
|
||
from ...admin_site import edc_pharmacy_admin | ||
from ...models import Assignment | ||
from ..model_admin_mixin import ModelAdminMixin | ||
|
||
|
||
class AssignmentForm(forms.ModelForm): | ||
class Meta: | ||
model = Assignment | ||
fields = "__all__" | ||
|
||
|
||
@admin.register(Assignment, site=edc_pharmacy_admin) | ||
class AssignmentAdmin(ModelAdminMixin, admin.ModelAdmin): | ||
show_object_tools = True | ||
|
||
form = AssignmentForm | ||
|
||
fieldsets = ( | ||
( | ||
None, | ||
{"fields": ["assignment", "display_label"]}, | ||
), | ||
audit_fieldset_tuple, | ||
) | ||
|
||
list_display: Tuple[str, ...] = ( | ||
"assignment", | ||
"display_label", | ||
"created", | ||
"modified", | ||
) | ||
|
||
search_fields: Tuple[str, ...] = ("assignment", "display_label") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin | ||
from edc_list_data.admin import ListModelAdminMixin | ||
|
||
from ...admin_site import edc_pharmacy_admin | ||
from ...models import ContainerType | ||
|
||
|
||
@admin.register(ContainerType, site=edc_pharmacy_admin) | ||
class ContainerTypeAdmin(ListModelAdminMixin, admin.ModelAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin | ||
from edc_list_data.admin import ListModelAdminMixin | ||
|
||
from ...admin_site import edc_pharmacy_admin | ||
from ...models import FormulationType | ||
|
||
|
||
@admin.register(FormulationType, site=edc_pharmacy_admin) | ||
class FormulationTypeAdmin(ListModelAdminMixin, admin.ModelAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin | ||
from edc_list_data.admin import ListModelAdminMixin | ||
|
||
from ...admin_site import edc_pharmacy_admin | ||
from ...models import FrequencyUnits | ||
|
||
|
||
@admin.register(FrequencyUnits, site=edc_pharmacy_admin) | ||
class FrequencyUnitsAdmin(ListModelAdminMixin, admin.ModelAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin | ||
from edc_list_data.admin import ListModelAdminMixin | ||
|
||
from ...admin_site import edc_pharmacy_admin | ||
from ...models import Route | ||
|
||
|
||
@admin.register(Route, site=edc_pharmacy_admin) | ||
class RouteAdmin(ListModelAdminMixin, admin.ModelAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django.contrib import admin | ||
from edc_list_data.admin import ListModelAdminMixin | ||
|
||
from ...admin_site import edc_pharmacy_admin | ||
from ...models import Units | ||
|
||
|
||
@admin.register(Units, site=edc_pharmacy_admin) | ||
class UnitsAdmin(ListModelAdminMixin, admin.ModelAdmin): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .rx_admin import RxAdmin | ||
from .rx_refill_admin import RxRefillAdmin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# from .product_admin import ProductAdmin | ||
# from .receiving_admin import ReceivingAdmin | ||
# from .stock_admin import StockAdmin |
Oops, something went wrong.