Commit Graph

84 Commits

Author SHA1 Message Date
Luis Ernesto Portillo Zaldivar
9c32be4c28 feat: Agregar comando list-open-issues a gitea_cli_helper.py
- Nuevo comando para listar todos los issues abiertos
- Muestra número, título, autor, fecha y URL
- Útil para verificar el estado de los issues
- Documentado en GEMINI.md con ejemplos
2025-07-15 00:06:37 -06:00
Luis Ernesto Portillo Zaldivar
4891c1d6b3 chore: Limpiar archivos pr_description y actualizar .gitignore
- Eliminar archivos pr_description*.txt no versionados
- Agregar patrón pr_description*.txt a .gitignore
- Documentar en GEMINI.md que estos archivos son temporales
- Indicar que deben eliminarse después de usar el helper
2025-07-15 00:01:45 -06:00
Luis Ernesto Portillo Zaldivar
345c861037 docs: Agregar documentación de merge-pr a GEMINI.md
- Añadir sección completa para el comando merge-pr
- Incluir validación de rama dev obligatoria
- Agregar ejemplos de uso con diferentes métodos de merge
- Documentar verificaciones automáticas del script
2025-07-14 23:55:26 -06:00
Luis Ernesto Portillo Zaldivar
4be56fc9f7 fix(#32): Spanish translations and workflow fixes
- Fixed missing action_collect method for pending_collection state
- Updated all model field labels to Spanish
- Updated view labels and strings to Spanish
- Fixed readonly conditions for pending_collection state
- Added barcode and new fields to stock.lot views
- Updated sale.order embedded view with correct button
- Added 5-minute timeout note to CLAUDE.md
- Removed problematic demo sale.order XML records
- Updated test script location guidance in CLAUDE.md
- Marked all acceptance criteria as completed in plan
2025-07-14 23:46:31 -06:00
Luis Ernesto Portillo Zaldivar
b88ce446c8 docs(#32): Add comprehensive implementation summary 2025-07-14 22:58:22 -06:00
Luis Ernesto Portillo Zaldivar
20710da5c9 docs(#32): Mark Task 8 as completed - All mandatory tasks done 2025-07-14 22:57:37 -06:00
Luis Ernesto Portillo Zaldivar
0d9dee160c feat(#32): Add demo data for automatic sample generation - Task 8 completed
- Created 4 demo lab orders showcasing different scenarios:
  - Order 1: Multiple analyses requiring same sample type (EDTA)
  - Order 2: Multiple analyses with different sample types
  - Order 3: Mixed analyses for thyroid panel
  - Order 4: Pediatric order with different sample types
- Added file to manifest demo section
- Successful test with ephemeral instance restart (main initialization OK)
2025-07-14 22:56:55 -06:00
Luis Ernesto Portillo Zaldivar
97cdc368d0 feat(#32): Create verification script - Task 7 completed
- Comprehensive verification script for automatic sample generation
- Tests existing orders with generated samples
- Creates and tests new order with sample generation
- Verifies barcode uniqueness across all samples
- Checks for analyses without sample types
- Provides detailed summary and issue reporting
- Successful test with ephemeral instance restart
2025-07-14 22:48:25 -06:00
Luis Ernesto Portillo Zaldivar
f3443619ce feat(#32): Update sale.order views for generated samples - Task 4 completed
- Added 'Muestras Generadas' tab in sale.order form view
- Shows generated samples with barcode, type, volume, and analyses
- Added action buttons for sample workflow in the embedded list
- Added indicators in sale.order list view for lab requests and samples
- Successful test with ephemeral instance restart
2025-07-14 22:42:51 -06:00
Luis Ernesto Portillo Zaldivar
e7074418f7 docs(#32): Mark Task 3 as completed 2025-07-14 22:38:44 -06:00
Luis Ernesto Portillo Zaldivar
5a4a65c65b feat(#32): Enhanced barcode generation with uniqueness - Task 3 completed
- Added barcode field to stock.lot with automatic generation
- Implemented unique barcode generation in format YYMMDDNNNNNNC
- Added Luhn check digit for barcode validation
- Handles high volume scenarios with sample type prefixes
- Collision detection and retry mechanism for uniqueness
- Successful test with ephemeral instance restart
2025-07-14 22:38:18 -06:00
Luis Ernesto Portillo Zaldivar
57e87b4692 docs(#32): Mark Task 1 and 2 as completed 2025-07-14 22:30:17 -06:00
Luis Ernesto Portillo Zaldivar
a9ed1a23bd feat(#32): Add automatic sample generation - Task 1 completed
- Added generated_sample_ids field to sale.order model
- Override action_confirm() to intercept lab order confirmation
- Implemented _generate_lab_samples() main logic method
- Implemented _group_analyses_by_sample_type() for grouping
- Implemented _create_sample_for_group() for sample creation
- Added necessary fields to stock.lot model (doctor_id, origin, volume_ml, analysis_names)
- Updated state field to include 'pending_collection' state
- Added proper error handling and user notifications via message_post
- Successful test with ephemeral instance restart
2025-07-14 22:29:29 -06:00
Luis Ernesto Portillo Zaldivar
cb0cabf2d2 docs(#32): Add detailed implementation plan for automatic sample generation 2025-07-14 22:18:48 -06:00
9241cbad79 Merge pull request 'feat(#44): Agregar relación entre análisis y tipos de muestra' (#45) from feature/44-test-sample-relationship into dev
Reviewed-on: luis_portillo/clinical_laboratory#45
2025-07-15 04:16:02 +00:00
Luis Ernesto Portillo Zaldivar
f833595e4c feat(#44): Add verification script and complete documentation
- Created verify_sample_relationships.py script to validate implementation
- Updated ISSUE44_PLAN.md marking completed tasks
- Created ISSUE44_IMPLEMENTATION.md with complete summary
- Script verifies:
  - Analyses have sample type assignments
  - Sample types are properly configured
  - Stock.lot samples use new fields correctly
  - Field synchronization works properly

All tasks for Issue #44 completed successfully.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 21:09:34 -06:00
Luis Ernesto Portillo Zaldivar
d41f5eed5c feat(#44): Update demo data with test-sample relationships
- Added required_sample_type_id and sample_volume_ml to all demo analyses
- Updated demo samples to use new sample_type_product_id field
- Added demo_patient_3 for complete demo data
- Mapped analyses to appropriate sample types:
  - Hemograma → EDTA tube (3ml)
  - Perfil Lipídico → Serum tube (2ml)
  - Glucosa → Glucose tube (1ml)
  - Urocultivo → Urine container (20ml)
  - TP → Citrate tube (2.7ml)
  - Hemocultivo → Blood culture bottle (10ml)
  - Coprocultivo → Stool container (5ml)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 21:06:45 -06:00
Luis Ernesto Portillo Zaldivar
40b5dabda7 feat(#44): Create initial sample types data
- Created sample_types.xml with 10 common laboratory sample containers
- Added product category for sample containers
- Defined sample types: serum, EDTA, citrate, heparin, glucose, urine, stool, swab, blood culture, CSF
- All sample types marked as consumable products with purchase_ok=True, sale_ok=False
- Added sample_types.xml to module manifest

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:58:14 -06:00
Luis Ernesto Portillo Zaldivar
59db50b907 feat(#44): Update stock lot views to include sample type product field
- Added sample_type_product_id to list view
- Added sample_type_product_id to form view with proper readonly states
- Made container_type optional in list view and invisible when product is selected
- Both fields synchronized through model's @api.onchange method

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:54:19 -06:00
Luis Ernesto Portillo Zaldivar
ec4795c4de docs: Add mandatory testing rule to CLAUDE.md
- Added critical rule requiring ephemeral instance testing after every task
- Specified exact commands to run for testing
- Emphasized checking logs for errors before proceeding

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:50:52 -06:00
Luis Ernesto Portillo Zaldivar
4632a95d83 feat(#44): Update product views to include sample type relationships
- Added required_sample_type_id and sample_volume_ml fields to analysis configuration page
- Created list view for analysis products showing sample type relationship
- Created list view for sample type products
- Added is_sample_type field to product form view
- Made sample_volume_ml visible only when sample type is selected

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:47:50 -06:00
Luis Ernesto Portillo Zaldivar
d240ba5de1 feat(#44): Add sample_type_product_id field to StockLot model
- Added sample_type_product_id Many2one field to reference sample type products
- Kept container_type field for backward compatibility (marked as legacy)
- Added @api.onchange method to synchronize fields
- Added get_container_name() method to retrieve container name from either field

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:44:43 -06:00
Luis Ernesto Portillo Zaldivar
dde56b907e feat(#44): Add required_sample_type_id field to ProductTemplate model
- Added required_sample_type_id Many2one field to link analyses with sample types
- Added sample_volume_ml field to specify required sample volume
- Added validation constraints to ensure fields are only used for analysis products
- Import api and ValidationError for field validations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:35:41 -06:00
Luis Ernesto Portillo Zaldivar
88d3ded083 docs: Add ISSUE44_PLAN.md for test-sample relationship implementation
- Created detailed implementation plan for adding relationship between analyses and sample types
- Includes tasks for model updates, view modifications, data migration, and demo data
- Addresses compatibility concerns and preparation for automatic sample generation (Issue #32)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:28:40 -06:00
c46908b66f Merge pull request 'feature/31-sample-lifecycle' (#35) from feature/31-sample-lifecycle into dev
Reviewed-on: luis_portillo/clinical_laboratory#35
2025-07-15 02:24:12 +00:00
Luis Ernesto Portillo Zaldivar
472f88a477 feat: Update gitea_cli_helper.py to use file input and add CLAUDE.md
- Modified gitea_cli_helper.py to read issue/PR body from files instead of inline text
- Added CLAUDE.md with comprehensive development guidelines for Claude Code
- CLAUDE.md includes Odoo 18 specific conventions, Docker commands, and project structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 20:22:31 -06:00
Luis Ernesto Portillo Zaldivar
40123969b1 \"feat: A¤adir gitea_cli_helper.py y actualizar .env\" 2025-07-14 16:23:49 -06:00
Luis Ernesto Portillo Zaldivar
27462bf683 \"docs: Actualizar GEMINI.md con gitea_cli_helper.py\" 2025-07-14 16:23:27 -06:00
Luis Ernesto Portillo Zaldivar
d81e76a5f5 \"docs: Actualizar GEMINI.md con manejo de contenido multil¡nea para tea\" 2025-07-14 16:00:16 -06:00
Luis Ernesto Portillo Zaldivar
654f79dbfc \"chore: Add __pycache__/ to .gitignore\" 2025-07-14 15:40:21 -06:00
Luis Ernesto Portillo Zaldivar
e9a764936f \"docs(#31): Marcar tareas completadas en ISSUE31_PLAN.md\" 2025-07-14 15:34:46 -06:00
c51e3b3096 Merge pull request 'feature/31-sample-lifecycle' (#34) from feature/31-sample-lifecycle into dev
Reviewed-on: luis_portillo/clinical_laboratory#34
2025-07-14 21:13:08 +00:00
Luis Ernesto Portillo Zaldivar
4510ba27c7 feat(#31): Implementar ciclo de vida de muestras 2025-07-14 15:08:03 -06:00
Luis Ernesto Portillo Zaldivar
80323a38b9 docs(#31): Crear plan de actividades para ciclo de vida de muestra 2025-07-14 12:16:03 -06:00
f2a8b541d8 Merge pull request 'feature/7-sample-management' (#33) from feature/7-sample-management into dev
Reviewed-on: luis_portillo/clinical_laboratory#33
2025-07-14 18:13:19 +00:00
Luis Ernesto Portillo Zaldivar
45af1771fa feat(#7): Anadir campo de recolector a muestras
- Anadido el campo 'collector_id' al modelo stock.lot.
- Actualizadas las vistas de lista y formulario para incluir el nuevo campo.
- Actualizados los datos de demostracion para asignar un recolector.
- Actualizado el plan de desarrollo.
2025-07-14 09:39:58 -06:00
Luis Ernesto Portillo Zaldivar
a047cd1a02 feat(#7): Implementar feedback de gestion de muestras
- Anadido catalogo de Tipos de Muestra.
- Mejorada la vista de Muestras para seleccionar el tipo.
- Creados datos de demostracion para tipos de muestra y muestras.
2025-07-14 09:09:24 -06:00
Luis Ernesto Portillo Zaldivar
25841b75f3 chore(#7): Restaurar script de inicializacion 2025-07-14 08:41:40 -06:00
Luis Ernesto Portillo Zaldivar
13c14c341a feat(#7): Anadir permisos para gestion de muestras 2025-07-14 08:41:00 -06:00
Luis Ernesto Portillo Zaldivar
bbd65ed929 feat(#7): Anadir menu para gestion de muestras 2025-07-14 08:39:46 -06:00
Luis Ernesto Portillo Zaldivar
87dd570548 feat(#7): Añadir vistas y datos para gestion de muestras
Se añaden las vistas de lista y formulario para las muestras de laboratorio, junto con un producto de servicio por defecto. Se deshabilita temporalmente la carga de datos de demostración en init_odoo.py para estabilizar el entorno de validación.
2025-07-14 08:15:58 -06:00
Luis Ernesto Portillo Zaldivar
ade39f9310 feat(#7): Extender stock.lot para gestion de muestras 2025-07-14 08:12:43 -06:00
Luis Ernesto Portillo Zaldivar
291ceb9bfd feat(#7): Crear plan de desarrollo para gestion de muestras 2025-07-14 08:03:25 -06:00
9d651f5e6b Merge pull request 'feature/6-lab-requests' (#26) from feature/6-lab-requests into dev
Reviewed-on: luis_portillo/clinical_laboratory#26
2025-07-14 09:21:53 +00:00
Luis Ernesto Portillo Zaldivar
c557014cac \"chore: Anadir hook de pre-commit para evitar commits incompletos\" 2025-07-14 03:16:59 -06:00
Luis Ernesto Portillo Zaldivar
55b399f5e4 \"feat(#6): Implementar solicitudes de laboratorio y corregir filtros\" 2025-07-14 03:10:26 -06:00
Luis Ernesto Portillo Zaldivar
abe27b9195 \"docs(#6): Actualizar plan con tareas de filtrado completadas\" 2025-07-14 02:43:52 -06:00
Luis Ernesto Portillo Zaldivar
e568d30f6b \"docs(#6): Actualizar plan con nuevas tareas de filtrado en vistas\" 2025-07-14 02:37:43 -06:00
Luis Ernesto Portillo Zaldivar
93624bc111 \"docs: Anadir seccion sobre creacion de datos de demostracion complejos\" 2025-07-14 02:31:23 -06:00
Luis Ernesto Portillo Zaldivar
f56b60ad15 \"feat(#6): Implementar solicitudes de laboratorio y corregir datos de demostracion\" 2025-07-14 02:29:38 -06:00