Case Study

Tecsa Laboratories

How we modernized a leading veterinary diagnostics laboratory by integrating legacy systems with TOTVS, building mobile and web portals, and engineering a data warehouse that powers real-time business intelligence.

Client Overview

Tecsa Laboratories is one of the largest veterinary diagnostic laboratories in Latin America, processing thousands of clinical exams daily across multiple specialties. With a technology stack spanning decades, Tecsa required a partner capable of maintaining critical legacy systems while progressively modernizing their digital infrastructure.

Scope of Work

Legacy System Support

Ongoing maintenance, performance tuning, and evolution of mission-critical systems that handle exam processing, sample tracking, and result reporting -- ensuring zero downtime for laboratory operations.

TOTVS Integration

End-to-end integration with TOTVS Protheus modules including billing, accounts receivable, inventory, and financial reconciliation. Custom APIs bridge TOTVS with laboratory information systems (LIS) for seamless data flow.

Mobile Application

Native mobile application for veterinary clinics and pet owners, enabling exam result consultation, sample collection scheduling, and push notifications for completed diagnostics.

Customer Portal

Full-featured web portal where veterinary clinics manage exam requests, access historical results with filtering and export capabilities, and handle account management.

WordPress Website

Corporate website management including content updates, SEO optimization, performance monitoring, and security patching to maintain Tecsa's public-facing digital presence.

Data Engineering

Data Engineering

We designed and implemented a modern analytics stack that transforms raw TOTVS transactional data into actionable business intelligence.

Data Pipeline Architecture

Sources
TOTVS Protheus, LIS, Portal, CRM
Ingestion
Incremental extraction via custom connectors
Staging
Raw data landing zone with schema validation
Transformation
dbt models: cleaning, dedup, business logic
Data Marts
Domain-specific: billing, exams, clients, inventory
BI Dashboards
Metabase: operational & executive dashboards

dbt

All transformation logic is version-controlled dbt models with automated testing. Staging models normalize raw TOTVS tables; intermediate models apply business rules; mart models serve analytics-ready datasets.

Data Warehouse

Purpose-built warehouse schema designed around TOTVS data structures. Fact tables for exam execution, billing events, and inventory movements. Dimension tables for clients, products, cost centers, and time periods.

Metabase

Self-service BI platform with curated dashboards for executive KPIs, operational monitoring, financial reconciliation, and laboratory throughput analysis. Role-based access controls ensure data governance.

Warehouse Organization

The data warehouse follows a layered architecture optimized for TOTVS source systems:

1
Staging Layer
1:1 replicas of TOTVS tables (SA1, SA2, SC5, SD1, SD2, SF2...) with ingestion timestamps and change tracking. Schema mirrors Protheus field naming conventions for traceability.
2
Intermediate Layer
Business logic transformations: currency normalization, status mapping, entity deduplication, and cross-module joins. TOTVS-specific encodings are decoded into human-readable dimensions.
3
Mart Layer
Domain-oriented star schemas: fct_exams, fct_billing, fct_inventory joined with dim_clients, dim_products, dim_cost_centers, dim_date. Optimized for Metabase query patterns.
4
Reporting Layer
Pre-aggregated views for high-frequency dashboards: daily exam throughput, monthly revenue by clinic, inventory burn rate, and accounts receivable aging.

Technology Stack

TOTVS ProtheusdbtMetabasePostgreSQLReact NativeNext.jsWordPressNode.jsPythonDockerAWSREST APIs

Key Results

60%
Faster report generation
100%
TOTVS module coverage
24/7
System uptime maintained
15+
BI dashboards delivered

Have a similar challenge?

We specialize in complex integrations with enterprise systems like TOTVS. Let us assess your environment.