Skip to content

BDMS-221-225: Core well information model updates#239

Merged
ksmuczynski merged 6 commits into
bdms-221from
kas-bdms-221-225-core-well-info-models-schemas
Nov 10, 2025
Merged

BDMS-221-225: Core well information model updates#239
ksmuczynski merged 6 commits into
bdms-221from
kas-bdms-221-225-core-well-info-models-schemas

Conversation

@ksmuczynski

Copy link
Copy Markdown
Contributor

Why

This PR addresses the following problem / context:

  • This PR addresses updates to the Group model. It also addressed updates to the lexicon related to the Group and StatusHIstory models.
  • The purpose of this PR is to make these intermediate updates available to @jacob-a-brown as we continue to co-work on the main BDMS-221 task.

How

Implementation summary - the following was changed / added / removed:

  • Refactored Group model in db/group.py, adding the group_type and monitoring_frequency fields.
  • Added new categories and terms to core/lexicon.json to support expanded group types and monitoring frequencies.
  • Renamed well_status category to status_value.
  • Added new status_type category and related terms.
  • Updated status_type term definitions.

Notes

Any special considerations, workarounds, or follow-up work to note?

  • This PR does NOT address updates to the schemas, tests, or transfer scripts.

Refactored Group model in db/group.py, adding the `group_type` and `monitoring_frequency` fields.

Added new categories and terms to core/lexicon.json to support expanded group types and monitoring frequencies.
… StatusHistory table.

`well_status` is defined as a lexicon category, but it should be a lexicon value associated with the `status_type` category.

 The `status_type` category does not exist, but it should.

The terms assigned to the `well_status` category should actually be assigned to the `status_value` category.

Renamed `well_status` category to `status_value`.
Added new `status_type` category and related terms.
Updated term definitions.
`Monitoring Status` should be a value/term associated with the `status_type` category, not a category unto itself.

Removed the `monitoring_status` category and associated terms. Expanded terms associated with the `monitoring_frequency` category.
Comment thread db/group.py Outdated
Comment on lines +39 to +42
group_type: Mapped[Optional[str]] = mapped_column(String(50), nullable=True)
monitoring_frequency: Mapped[Optional[str]] = mapped_column(
String(50), nullable=True
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these can be lexicon terms

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you. The lexicon file should already be up to date.

`group_type` and `monitoring_frequency` fields should be lexicon terms.

Updated `group_type` and `monitoring_frequency` fields to map to lexicon terms.
@ksmuczynski ksmuczynski merged commit 7613648 into bdms-221 Nov 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants