Skip to content

Commit

Permalink
create jersey as country entity - note currently lacks geom data
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourpeas committed Jun 30, 2024
1 parent 071d99c commit 56caa5e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rcpch_nhs_organisations/hospitals/management/commands/seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
seed_pdus,
ods_codes_to_abstraction_levels,
load_jersey_boundaries,
create_jersey_country,
)

from .image import rcpch_ascii_art
Expand Down Expand Up @@ -55,6 +56,7 @@ def handle(self, *args, **options):
self.stdout.write(
B + "Adding all organisations and levels of abstraction..." + W
)
create_jersey_country()
ods_codes_to_abstraction_levels()
seed_trusts()
seed_organisations()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,24 @@ def load_jersey_boundaries():
encoding="iso-8859-1",
)
lm.save(strict=True, verbose=True)


def create_jersey_country():
"""
Create Jersey country object
Note that the geom field is not populated
"""
Country = django_apps.get_model("hospitals", "Country")
jersey = Country(
boundary_identifier="E92000003",
name="Jersey",
welsh_name="",
bng_e=None,
bng_n=None,
long=2.1313,
lat=49.2144,
globalid="",
geom=None,
)
jersey.save()
return jersey

0 comments on commit 56caa5e

Please sign in to comment.