Fix profesionalRemisionante con slash y mejora display resultado test-rda
- json_generator: limpia DOCIDMEDICO a solo dígitos (eg "9410/86" → "941086") para que TNS acepte el código - test_rda.html: resultado con syntax highlight en JSON enviado y respuesta TNS, mejor legibilidad del error TNS, botones Resp.TNS y JSON env. con íconos Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7699303a53
commit
7e0c6039b8
@@ -117,7 +117,10 @@ def generar_rda_paciente(rows: list, default_profesional: str = "", default_espe
|
||||
row.get("FECHA_REPORTADO") if str(row.get("FECHA_REPORTADO") or "")[:4] != "1900"
|
||||
else h.get("FECHA_RECEPCION")
|
||||
)
|
||||
cedula_medico = str(row.get("DOCIDMEDICO") or "").strip()
|
||||
# TNS solo acepta dígitos en profesionalRemisionante; limpiar "9410/86" → "941086"
|
||||
import re as _re
|
||||
_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(),
|
||||
"codigoBodega": "00",
|
||||
|
||||
Reference in New Issue
Block a user