feat: use ITEM.CUPS_DETALLE as codigoMaterial in RDA
LEFT JOIN ITEM on COD_EXAMEN to get CUPS_DETALLE. Falls back to COD_EXAMEN if CUPS is empty. Applied to automation, test_rda, and saved queries in SQLite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ebd45446a4
commit
ff08c1b3a8
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user