diff --git a/api/bro_upload/templates/registration_GMW_Construction.html b/api/bro_upload/templates/registration_GMW_Construction.html
index 6a253fd..6010038 100644
--- a/api/bro_upload/templates/registration_GMW_Construction.html
+++ b/api/bro_upload/templates/registration_GMW_Construction.html
@@ -35,7 +35,9 @@
{{ sourcedocs_data.localVerticalReferencePoint }}
{{ sourcedocs_data.offset }}
{{ sourcedocs_data.verticalDatum }}
+{% if sourcedocs_data.groundLevelPosition %}
{{ sourcedocs_data.groundLevelPosition }}
+{% endif %}
{{ sourcedocs_data.groundLevelPositioningMethod }}
{% for monitoringtube in sourcedocs_data.monitoringTubes %}
@@ -67,10 +69,10 @@
{{ monitoringtube.sedimentSumpLength }}
{% endif %}
-{% for geoohmcable in monitoringtube.geoohmcables %}
+{% for geoOhmCable in monitoringtube.geoOhmCables %}
- {{ geoohmcable.cableNumber }}
-{% for electrode in geoohmcable.electrodes %}
+ {{ geoOhmCable.cableNumber }}
+{% for electrode in geoOhmCable.electrodes %}
{{ electrode.electrodeNumber }}
{{ electrode.electrodePackingMaterial }}
diff --git a/api/bro_upload/templates/replace_GMW_construction.html b/api/bro_upload/templates/replace_GMW_construction.html
index d1bf206..fad3138 100644
--- a/api/bro_upload/templates/replace_GMW_construction.html
+++ b/api/bro_upload/templates/replace_GMW_construction.html
@@ -37,7 +37,9 @@
{{ sourcedocs_data.localVerticalReferencePoint }}
{{ sourcedocs_data.offset }}
{{ sourcedocs_data.verticalDatum }}
+{% if sourcedocs_data.groundLevelPosition %}
{{ sourcedocs_data.groundLevelPosition }}
+{% endif %}
{{ sourcedocs_data.groundLevelPositioningMethod }}
{% for monitoringtube in sourcedocs_data.monitoringTubes %}
@@ -69,10 +71,10 @@
{{ monitoringtube.sedimentSumpLength }}
{% endif %}
-{% for geoohmcable in monitoringtube.geoohmcables %}
+{% for geoOhmCable in monitoringtube.geoOhmCables %}
- {{ geoohmcable.cableNumber }}
-{% for electrode in geoohmcable.electrodes %}
+ {{ geoOhmCable.cableNumber }}
+{% for electrode in geoOhmCable.electrodes %}
{{ electrode.electrodeNumber }}
{{ electrode.electrodePackingMaterial }}
diff --git a/api/bro_upload/upload_datamodels.py b/api/bro_upload/upload_datamodels.py
index 8222e8e..d55a95e 100644
--- a/api/bro_upload/upload_datamodels.py
+++ b/api/bro_upload/upload_datamodels.py
@@ -87,7 +87,7 @@ class MonitoringTube(BaseModel):
tubeType: str
artesianWellCapPresent: str
sedimentSumpPresent: str
- numberOfGeoOhmCables: str | int
+ numberOfGeoOhmCables: str | int # Should this not be derived from 'geoohmcables'
tubeTopDiameter: str | float | None = None
variableDiameter: str | float
tubeStatus: str
@@ -97,10 +97,11 @@ class MonitoringTube(BaseModel):
tubeMaterial: str
glue: str
screenLength: str | float
+ screenProtection: str | None = None
sockMaterial: str
plainTubePartLength: str | float
sedimentSumpLength: str | float | None = None
- geoohmcables: list[GeoOhmCable] | None = None
+ geoOhmCables: list[GeoOhmCable] | None = None
class GMWConstruction(BaseModel):
@@ -108,11 +109,11 @@ class GMWConstruction(BaseModel):
deliveryContext: str
constructionStandard: str
initialFunction: str
- numberOfMonitoringTubes: str | int
+ numberOfMonitoringTubes: str | int # Should this not be derived from 'monitoringTubes'
groundLevelStable: str
wellStability: str | None = None
- owner: str
- maintenanceResponsibleParty: str
+ owner: str | None = None
+ maintenanceResponsibleParty: str | None = None
wellHeadProtector: str
wellConstructionDate: str
deliveredLocation: str
diff --git a/api/migrations/0050_alter_uploadtask_registration_type.py b/api/migrations/0050_alter_uploadtask_registration_type.py
new file mode 100644
index 0000000..ebcb045
--- /dev/null
+++ b/api/migrations/0050_alter_uploadtask_registration_type.py
@@ -0,0 +1,57 @@
+# Generated by Django 5.0.4 on 2024-10-31 09:27
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("api", "0049_alter_inviteuser_nens_auth_client_invitation"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="uploadtask",
+ name="registration_type",
+ field=models.CharField(
+ choices=[
+ ("GMN_StartRegistration", "GMN_StartRegistration"),
+ ("GMN_MeasuringPoint", "GMN_MeasuringPoint"),
+ ("GMN_MeasuringPointEndDate", "GMN_MeasuringPointEndDate"),
+ ("GMN_TubeReference", "GMN_TubeReference"),
+ ("GMN_Closure", "GMN_Closure"),
+ ("GMW_Construction", "GMW_Construction"),
+ ("GMW_ElectrodeStatus", "GMW_ElectrodeStatus"),
+ ("GMW_GroundLevel", "GMW_GroundLevel"),
+ ("GMW_GroundLevelMeasuring", "GMW_GroundLevelMeasuring"),
+ ("GMW_Insertion", "GMW_Insertion"),
+ ("GMW_Lengthening", "GMW_Lengthening"),
+ ("GMW_Shortening", "GMW_Shortening"),
+ ("GMW_Positions", "GMW_Positions"),
+ ("GMW_PositionsMeasuring", "GMW_PositionsMeasuring"),
+ ("GMW_Shift", "GMW_Shift"),
+ ("GMW_Maintainer", "GMW_Maintainer"),
+ ("GMW_Owner", "GMW_Owner"),
+ ("GMW_Removal", "GMW_Removal"),
+ ("GMW_TubeStatus", "GMW_TubeStatus"),
+ ("GMW_WellHeadProtector", "GMW_WellHeadProtector"),
+ ("GAR", "GAR"),
+ ("GLD_StartRegistration", "GLD_StartRegistration"),
+ ("GLD_Addition", "GLD_Addition"),
+ ("GLD_Closure", "GLD_Closure"),
+ ("FRD_StartRegistration", "FRD_StartRegistration"),
+ (
+ "FRD_GEM_MeasurementConfiguration",
+ "FRD_GEM_MeasurementConfiguration",
+ ),
+ ("FRD_GEM_Measurement", "GLD_CloFRD_GEM_Measurementsure"),
+ (
+ "FRD_EMM_InstrumentConfiguration",
+ "FRD_EMM_InstrumentConfiguration",
+ ),
+ ("FRD_EMM_Measurement", "FRD_EMM_Measurement"),
+ ("FRD_Closure", "FRD_Closure"),
+ ],
+ max_length=235,
+ ),
+ ),
+ ]
diff --git a/gmw/migrations/0014_monitoringtube_screen_protection_and_more.py b/gmw/migrations/0014_monitoringtube_screen_protection_and_more.py
new file mode 100644
index 0000000..415e546
--- /dev/null
+++ b/gmw/migrations/0014_monitoringtube_screen_protection_and_more.py
@@ -0,0 +1,42 @@
+# Generated by Django 5.0.4 on 2024-10-31 09:26
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("gmw", "0013_monitoringtube_sediment_sump_length"),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="monitoringtube",
+ name="screen_protection",
+ field=models.CharField(blank=True, max_length=100, null=True),
+ ),
+ migrations.AlterField(
+ model_name="gmw",
+ name="ground_level_position",
+ field=models.CharField(blank=True, max_length=100, null=True),
+ ),
+ migrations.AlterField(
+ model_name="gmw",
+ name="owner",
+ field=models.CharField(blank=True, max_length=100, null=True),
+ ),
+ migrations.AlterField(
+ model_name="gmw",
+ name="well_stability",
+ field=models.CharField(blank=True, max_length=100, null=True),
+ ),
+ migrations.AlterField(
+ model_name="monitoringtube",
+ name="sediment_sump_length",
+ field=models.CharField(blank=True, max_length=100, null=True),
+ ),
+ migrations.AlterField(
+ model_name="monitoringtube",
+ name="tube_top_diameter",
+ field=models.CharField(blank=True, max_length=100, null=True),
+ ),
+ ]
diff --git a/gmw/models.py b/gmw/models.py
index bcee615..8c62f2e 100644
--- a/gmw/models.py
+++ b/gmw/models.py
@@ -25,16 +25,16 @@ class GMW(models.Model):
initial_function = models.CharField(max_length=100, null=True)
removed = models.CharField(max_length=100, null=True)
ground_level_stable = models.CharField(max_length=100, null=True)
- well_stability = models.CharField(max_length=100, null=True)
+ well_stability = models.CharField(max_length=100, null=True, blank=True)
nitg_code = models.CharField(max_length=100, null=True)
well_code = models.CharField(max_length=100, null=True)
- owner = models.CharField(max_length=100, null=True)
+ owner = models.CharField(max_length=100, null=True, blank=True)
well_head_protector = models.CharField(max_length=100, null=True)
delivered_location = models.CharField(max_length=100, null=True)
local_vertical_reference_point = models.CharField(max_length=100, null=True)
offset = models.CharField(max_length=100, null=True)
vertical_datum = models.CharField(max_length=100, null=True)
- ground_level_position = models.CharField(max_length=100, null=True)
+ ground_level_position = models.CharField(max_length=100, null=True, blank=True)
ground_level_positioning_method = models.CharField(max_length=100, null=True)
standardized_location = models.CharField(max_length=100, null=True)
object_registration_time = models.DateTimeField(null=True)
@@ -62,10 +62,10 @@ class MonitoringTube(models.Model):
tube_type = models.CharField(max_length=100, null=True)
artesian_well_cap_present = models.CharField(max_length=100, null=True)
sediment_sump_present = models.CharField(max_length=100, null=True)
- sediment_sump_length = models.CharField(max_length=100, null=True)
+ sediment_sump_length = models.CharField(max_length=100, null=True, blank=True)
number_of_geo_ohm_cables = models.CharField(max_length=100, null=True)
geo_ohm_cables = JSONField("Geoohm Cables", default=dict, blank=True)
- tube_top_diameter = models.CharField(max_length=100, null=True)
+ tube_top_diameter = models.CharField(max_length=100, null=True, blank=True)
variable_diameter = models.CharField(max_length=100, null=True)
tube_status = models.CharField(max_length=100, null=True)
tube_top_position = models.CharField(max_length=100, null=True)
@@ -76,6 +76,7 @@ class MonitoringTube(models.Model):
tube_material = models.CharField(max_length=100, null=True)
glue = models.CharField(max_length=100, null=True)
screen_length = models.CharField(max_length=100, null=True)
+ screen_protection = models.CharField(max_length=100, null=True, blank=True)
sock_material = models.CharField(max_length=100, null=True)
screen_top_position = models.CharField(max_length=100, null=True)
screen_bottom_position = models.CharField(max_length=100, null=True)