Skip to content

Conversation

Aberdur
Copy link
Contributor

@Aberdur Aberdur commented Oct 6, 2025

PR Description

  • Persist lab_code_1 on core.Profile and expose helpers that always return a valid string (auto-populating from the lab catalogue when needed)
  • Refactor collectors’ access control (get_available_samples_for_user, intranet views, search table, dash selectors) to filter by lab_code_1, falling back to the legacy name only when a code is missing
  • Rework pre-processing pipelines (samples_per_date_all_lab_detailed, search_samples_summary) and their consumers to serialise datasets keyed by lab_code_1, while keeping collecting_institution as display metadata.
  • Update API endpoints (create_sample_data, check_sample_exists) so collecting_institution_code_1 is the authoritative identifier; derive and normalise collecting_institution via ensure_lab_display before fingerprints are computed
  • Extend the lab utilities (core/utils/labs.py, core/utils/plotly_dash_graphics.py) to provide structured dropdown options (value=lab code, label=resolved name) and ensure dashboards remain functional even when only the legacy name is available

@Aberdur Aberdur self-assigned this Oct 6, 2025
@Aberdur Aberdur changed the title UpdatePlatform To Use lab_code_1 Instead of collecting_institution Update Platform To Use lab_code_1 Instead of collecting_institution Oct 6, 2025
@Aberdur Aberdur marked this pull request as draft October 6, 2025 10:33
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.

1 participant