Download app/integrations/core.py from Modulo-6/api: direct link, hf CLI and curl.
- Browser
- Download file 706 Bytes
-
https://huggingface.co/spaces/Modulo-6/api/resolve/103258c8c38fd4100cd7bdb3de92a75e82b20ddc/app/integrations/core.py
- Command line
-
hf download hf://spaces/Modulo-6/api@103258c8c38fd4100cd7bdb3de92a75e82b20ddc/app/integrations/core.py
-
curl -L -o core.py https://huggingface.co/spaces/Modulo-6/api/resolve/103258c8c38fd4100cd7bdb3de92a75e82b20ddc/app/integrations/core.py
706 Bytes
| """ | |
| M10 Core — validación de pacientes. | |
| """ | |
| from app.config import settings | |
| from app.integrations._base import _get | |
| def validate_patient(paciente_id: int) -> dict | None: | |
| """Verifica existencia del paciente en M10. Retorna datos básicos o None.""" | |
| if settings.mock_external_services: | |
| return {"id": paciente_id, "nombre": "Paciente", "apellido": "Mock"} | |
| # Los pacientes son usuarios del Core (consigna M10 §10: "Maestro de | |
| # Usuarios ... médicos, enfermeros, administrativos, bioquímicos y | |
| # pacientes"). Path real del spec (verificado contra M10_openapi.yaml): | |
| # GET /users/{id}, sin prefijo /api/v1. | |
| return _get(f"{settings.m10_core_url}/users/{paciente_id}") | |