diff --git a/core/lexicon.json b/core/lexicon.json index 0d14be5ac..90ead61b9 100644 --- a/core/lexicon.json +++ b/core/lexicon.json @@ -1168,7 +1168,7 @@ {"categories": ["note_type"], "term": "Historical", "definition": "Historical information or context about the well or location."}, {"categories": ["note_type"], "term": "General", "definition": "Other types of notes that do not fit into the predefined categories."}, {"categories": ["note_type"], "term": "Water", "definition": "Water bearing zone information and other info from ose reports"}, - {"categories": ["note_type"], "term": "Measuring", "definition": "Notes about measuring/visiting the well, on Access form"}, + {"categories": ["note_type"], "term": "Sampling Procedure", "definition": "Notes about sampling procedures for all sample types, like water levels and water chemistry"}, {"categories": ["note_type"], "term": "Coordinate", "definition": "Notes about a location's coordinates"}, {"categories": ["well_pump_type"], "term": "Submersible", "definition": "Submersible"}, {"categories": ["well_pump_type"], "term": "Jet", "definition": "Jet Pump"}, diff --git a/db/thing.py b/db/thing.py index 723f2da22..35d7482ba 100644 --- a/db/thing.py +++ b/db/thing.py @@ -361,8 +361,8 @@ def general_notes(self): return self._get_notes("General") @property - def measuring_notes(self): - return self._get_notes("Measuring") + def sampling_procedure_notes(self): + return self._get_notes("Sampling Procedure") @property def construction_notes(self): diff --git a/schemas/thing.py b/schemas/thing.py index 5aaa17985..9f2a084e3 100644 --- a/schemas/thing.py +++ b/schemas/thing.py @@ -196,7 +196,8 @@ class BaseThingResponse(BaseResponseModel): monitoring_status: str | None links: list[ThingIdLinkResponse] = Field(default=[], alias="alternate_ids") monitoring_frequencies: list[MonitoringFrequencyResponse] = [] - general_notes: list[NoteResponse] | None = None + general_notes: list[NoteResponse] = [] + sampling_procedure_notes: list[NoteResponse] = [] @field_validator("monitoring_frequencies", mode="before") def remove_records_with_end_date(cls, monitoring_frequencies): @@ -243,10 +244,8 @@ class WellResponse(BaseThingResponse): measuring_point_height_unit: str = "ft" measuring_point_description: str | None aquifers: list[dict] = [] - water_notes: list[NoteResponse] | None = None - measuring_notes: list[NoteResponse] | None = None - - construction_notes: list[NoteResponse] | None = None + water_notes: list[NoteResponse] = [] + construction_notes: list[NoteResponse] = [] permissions: list[PermissionHistoryResponse] formation_completion_code: FormationCode | None diff --git a/tests/features/environment.py b/tests/features/environment.py index 1d655a4da..aa31f3c4d 100644 --- a/tests/features/environment.py +++ b/tests/features/environment.py @@ -115,7 +115,7 @@ def add_well(context, session, location, name_num): for nt, c in ( ("General", "well notes"), ("Water", "water notes"), - ("Measuring", "measuring notes"), + ("Sampling Procedure", "sampling procedure notes"), ("Construction", "construction notes"), ): n = well.add_note(c, nt) diff --git a/tests/features/steps/well-notes.py b/tests/features/steps/well-notes.py index 9e20e84f3..9b424f98f 100644 --- a/tests/features/steps/well-notes.py +++ b/tests/features/steps/well-notes.py @@ -63,13 +63,17 @@ def step_impl(context): @then( - "the response should include measuring notes (notes about measuring/visiting the well, on Access form)" + "the response should include sampling procedure notes (notes about sampling procedures for all sample types, like water levels and water chemistry)" ) def step_impl(context): data = context.response.json() - assert "measuring_notes" in data, "Response does not include measuring notes" - assert data["measuring_notes"] is not None, "Measuring notes is null" - context.notes["measuring"] = data["measuring_notes"] + assert ( + "sampling_procedure_notes" in data + ), "Response does not include sampling procedure notes" + assert ( + data["sampling_procedure_notes"] is not None + ), "Sampling Procedure notes is null" + context.notes["sampling_procedure"] = data["sampling_procedure_notes"] @then( diff --git a/tests/features/well-notes.feature b/tests/features/well-notes.feature index 5cb5a502b..d172061f2 100644 --- a/tests/features/well-notes.feature +++ b/tests/features/well-notes.feature @@ -17,7 +17,7 @@ Feature: Retrieve well notes by well ID And the response should include location notes (i.e. driving directions and geographic well location notes) And the response should include construction notes (i.e. pump notes and other construction notes) And the response should include general well notes (catch all notes field) - And the response should include measuring notes (notes about measuring/visiting the well, on Access form) + And the response should include sampling procedure notes (notes about sampling procedures for all sample types, like water levels and water chemistry) And the response should include water notes (i.e. water bearing zone information and other info from ose reports) And the notes should be a non-empty string