Skip to content

Commit

Permalink
Merge pull request #565 from rcpch:health-boards
Browse files Browse the repository at this point in the history
Significant refactor to include geographical boundaries
  • Loading branch information
eatyourpeas authored Sep 9, 2023
2 parents a240274 + 926f086 commit 10ce5bf
Show file tree
Hide file tree
Showing 244 changed files with 13,994 additions and 60,419 deletions.
7 changes: 4 additions & 3 deletions docker-compose.dev-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# syncs changes in local code folder to the E12 container
# migrates the database

version: '3.10'
version: "3.10"

services:
# web container - runs the django app
Expand All @@ -28,7 +28,7 @@ services:
- POSTCODES_IO_API_URL=https://api.postcodes.io
- RCPCH_CENSUS_PLATFORM_URL=https://api.rcpch.ac.uk/deprivation/v1 # live
# - RCPCH_CENSUS_PLATFORM_URL=http://0.0.0.0:8001 # development
- RCPCH_HERMES_SERVER_URL=http://rcpch-hermes.uksouth.azurecontainer.io:8080/v1/snomed
- RCPCH_HERMES_SERVER_URL=http://rcpch-hermes.uksouth.azurecontainer.io:8080/v1/snomed
- NHS_ODS_API_URL=https://api.nhs.uk/service-search?api-version=2
# Below ENV vars are only needed for first creation of the superuser
- DJANGO_SUPERUSER_USERNAME=e12-dev-user
Expand All @@ -42,6 +42,7 @@ services:
- .env # env file with the token for RCPCH Census Platform, not committed to Git
command: >
sh -c "python manage.py collectstatic --noinput &&
# python manage.py makemigrations &&
python manage.py migrate &&
python manage.py seed --mode=cases --cases 200 &&
python manage.py seed --mode=seed_registrations &&
Expand All @@ -63,4 +64,4 @@ services:
- TZ="Europe/London"

volumes:
auditenginedb:
auditenginedb:
35 changes: 20 additions & 15 deletions epilepsy12/admin.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from semantic_admin import SemanticModelAdmin
from simple_history.admin import SimpleHistoryAdmin

# Register your models here.
from .models import *

from .forms import Epilepsy12UserChangeForm, Epilepsy12UserCreationForm
# from .forms import Epilepsy12UserChangeForm, Epilepsy12UserCreationForm
from .forms import Epilepsy12UserAdminCreationForm


class Epilepsy12UserAdmin(UserAdmin, SimpleHistoryAdmin):
add_form = Epilepsy12UserCreationForm
form = Epilepsy12UserChangeForm
add_form = Epilepsy12UserAdminCreationForm
form = Epilepsy12UserAdminCreationForm
ordering = ["email"]
model = Epilepsy12User
search_fields = (
Expand Down Expand Up @@ -138,31 +138,36 @@ def get_form(self, request, obj=None, **kwargs):
admin.site.register(FirstPaediatricAssessment, SimpleHistoryAdmin)
admin.site.register(Management, SimpleHistoryAdmin)
admin.site.register(Registration, SimpleHistoryAdmin)
admin.site.register(Keyword, SimpleHistoryAdmin)
admin.site.register(Site, SimpleHistoryAdmin)
admin.site.register(AuditProgress)
admin.site.register(Episode, SimpleHistoryAdmin)

admin.site.register(Keyword, SimpleHistoryAdmin)
admin.site.register(MultiaxialDiagnosis, SimpleHistoryAdmin)
admin.site.register(SyndromeList, SimpleHistoryAdmin)
admin.site.register(Syndrome, SimpleHistoryAdmin)
admin.site.register(SyndromeEntity, SimpleHistoryAdmin)
admin.site.register(KPI)

admin.site.register(OrganisationKPIAggregation)
admin.site.register(TrustKPIAggregation)
admin.site.register(LocalHealthBoardKPIAggregation)
admin.site.register(ICBKPIAggregation)
admin.site.register(NHSRegionKPIAggregation)
admin.site.register(NHSEnglandRegionKPIAggregation)
admin.site.register(OpenUKKPIAggregation)
admin.site.register(CountryKPIAggregation)
admin.site.register(NationalKPIAggregation)

admin.site.register(VisitActivity)
admin.site.register(EpilepsyCauseEntity)
admin.site.register(ComorbidityEntity)
admin.site.register(MedicineEntity)
admin.site.register(ComorbidityList)
admin.site.register(Medicine)

admin.site.register(Country)
admin.site.register(LondonBorough)
admin.site.register(IntegratedCareBoard)
admin.site.register(NHSEnglandRegion)
admin.site.register(Trust)
admin.site.register(LocalHealthBoard)

admin.site.register(CountryBoundaries)
admin.site.register(NHSEnglandRegionBoundaries)
admin.site.register(LocalHealthBoardBoundaries)
admin.site.register(IntegratedCareBoardBoundaries)
admin.site.register(NHSRegionEntity)

admin.site.site_header = "Epilepsy12 admin"
admin.site.site_title = "Epilepsy12 admin"
Expand Down
8 changes: 3 additions & 5 deletions epilepsy12/common_view_functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@
cases_aggregated_by_deprivation_score,
cases_aggregated_by_ethnicity,
cases_aggregated_by_sex,
aggregate_all_eligible_kpi_fields,
return_all_aggregated_kpis_for_cohort_and_abstraction_level_annotated_by_sublevel,
get_kpi_value_counts,
get_filtered_cases_by_abstraction,
calculate_kpi_value_counts_queryset,
update_kpi_aggregation_model,
get_filtered_cases_queryset_for,
calculate_kpi_value_counts_queryset,
get_abstraction_model_from_level,
get_abstraction_value_from,
get_all_kpi_aggregation_data_for_view,
aggregate_kpis_update_models_for_all_abstractions,
aggregate_kpis_update_models_all_abstractions_for_organisation,
update_all_kpi_agg_models,
_seed_all_aggregation_models,
)
from .report_queries import (
all_registered_cases_for_cohort_and_abstraction_level,
Expand Down
Loading

0 comments on commit 10ce5bf

Please sign in to comment.