feat: join ITEM on COD_PROTOCOLO to get CUPS_DETALLE as codigoMaterial

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-01 12:29:33 -05:00
co-authored by Claude Sonnet 4.6
parent d95e2b67ff
commit 68aa5e0355
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ def generar_rda_paciente(rows: list, default_profesional: str = "", default_espe
_doc = str(row.get("DOCIDMEDICO") or "").strip()
cedula_medico = _re.sub(r"[^0-9]", "", _doc)
detalle_pedido.append({
"codigoMaterial": str(row.get("COD_EXAMEN") or "").strip(),
"codigoMaterial": str(row.get("CUPS") or row.get("COD_EXAMEN") or "").strip(),
"codigoBodega": "00",
"cantidad": 1,
"tipoUnidad": "D",