Refactor code list management - reconcile code_list_items vs code_list_members tables
Resolved 💬 3 comments Opened Dec 1, 2025 by stewartbourke487 Closed Jan 31, 2026
Summary
The code list management system appears to be over-engineered with two separate table structures that need reconciliation:
code_list_items- Simple structure used byCodeListService.cs
list_hdr_id→ links tocode_list_header.iditem_code,item_description- Currently used by the API
code_list_members- More complex versioned structure
version_id→ links tocode_list_versions.idcode,description,start_date,end_date,change_type- Supports versioning via
code_list_versionstable - Not currently used by the API
Problem
When seeding new code lists, it's unclear which table to populate. The versioned structure (code_list_members) was designed but the service layer uses the simpler code_list_items table.
Tasks
- [ ] Understand the original design intent for both tables
- [ ] Decide which approach to use going forward:
- Option A: Use simple
code_list_itemsand remove versioning tables - Option B: Update
CodeListServiceto use versionedcode_list_memberstable - [ ] Migrate existing data to chosen structure
- [ ] Remove unused tables/code
- [ ] Update documentation
Related Files
server/Integrin.Server/Services/CodeList/CodeListService.cs- Usescode_list_itemsdocs/mvp/300_Code_List_Management_Design.md- Design documentation- SQL scripts in
agent-os/specs/2025-11-29-continue-cbam-entity-with-parties/sql/
---
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗