
Configuring TI Saúde as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the TI Saúde option from the list of connectors. Click Next and you’ll be prompted to add your access.1. Add account access
You’ll need to provide your Ti.Saúde API credentials to access your TI Saúde data. The following configurations are available:- User: Username for logging into the Ti.Saúde API.
- Password: Password for the Ti.Saúde API.
- Start Date: Start date for the schedules stream (per calendar). Records are synced from this date up to today. If omitted, today is used. Other streams are not affected by this setting.
2. Select streams
Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.Tip: The stream can be found more easily by typing its name.Select the streams and click Next.
3. Configure data streams
Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.- Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
- Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
- Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
- Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
4. Configure data source
Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times). Optionally, you can define some additional settings:- Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource here.
- Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.
5. Check your new source
You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.Streams and Fields
Below you’ll find all available data streams from TI Saúde and their corresponding fields. Streams such as schedules and doctors depend on parent streams (calendars, locals) and are synced per parent context.users
users
Stream of system users (professionals and staff) from the Ti.Saúde API.Key Fields:
id- Unique identifier for the userclient- Client IDlogin- Login usernamename- Full nameemail- Email addresscellphone- Mobile numbercpf- CPFcouncilCode,councilNumber,councilStateUF- Professional council (e.g. CRM, CRP)specialties- Array of specialty IDs and titlesprofiles- Array of profile IDsidCalendar- Associated calendar IDaddress,city,state,zip- Address fields
calendars
calendars
Stream of schedule calendars. Each calendar is used to generate (calendar, date) contexts for the schedules stream.Key Fields:
id- Unique identifier for the calendarclient- Client IDname- Calendar nameidUser- Owner user IDflagSMS,flagWhatsapp- Notification flagsdefaultLocation- Default locationdeleted- Whether the calendar is deletedtimestamp- Last update timestamp
schedules
schedules
Stream of schedule slots and appointments, per calendar and date. Synced for each (calendar, date) from Data inicial to today.Key Fields:
idCalendar,date- Context (calendar ID and date)id- Slot or appointment IDhour- Time (e.g. 08:10, 09:30)type- empty slot or appointmentlocal- Object withidandname(location)patient- Object with patient id, name, cellphone, email, dateOfBirth, etc.procedure- Procedure info and valuedoctor- Doctor/professional infotypeQuery- Consultation type (e.g. TELECONSULTA)
locals
locals
Stream of locations/units (locais). Used as parent context for the doctors stream.Key Fields:
id- Unique identifier for the localname- Location nameaddress,number,neighborhood,city,state,zip- Addressphone,phone2- Phonescnpj,cnes,cnae- Registry codesdeleted- Whether the local is deletedtimestamp- Last update
doctors
doctors
Stream of doctors/professionals per local (parent: locals).Key Fields:
local- Local ID (context)id- Doctor/professional IDidUser- User IDclient- Client ID- Additional professional and schedule-related fields from the API
procedures
procedures
Catalog of procedures (procedimentos).Key Fields:
id- Unique identifier for the procedureclient- Client ID- Fields for procedure name, codes (e.g. TUSS), values, and related metadata as returned by the API
patients
patients
Stream of patients. Used as parent context for ehr_tabs and ehr_fichas.Key Fields:
id- Unique identifier for the patientclient- Client ID- Patient name, contact, birth date, document, health insurance, and other demographic/clinical fields as returned by the API
ehr_tabs
ehr_tabs
Stream of EHR (prontuário) tabs per patient (parent: patients).Key Fields:
idPaciente- Patient ID (context)id- Tab IDname,tab,icon- Tab identifier and displaytype- e.g. ehrcountDocuments- Document count in the tab
ehr_fichas
ehr_fichas
Stream of EHR fichas (forms/records) per patient (parent: patients).Key Fields:
idPaciente- Patient ID (context)id- Record IDname- Model/record nametab- Tab (e.g. fichas)date- Service dateby,professionCard,council- Responsible professional and councilhealthInsurance,idHealthInsurancePlan- Insuranceactive,filledStatus,timestamp,signed- Status and audit fieldseditedFrom- ID of record this was edited from
attachment_categories
attachment_categories
Stream of attachment/folder categories (pastas de anexo).Key Fields:
id- Category IDcliente- Client IDname- Folder/category nameidFather- Parent folder ID (null = root)level- Hierarchy levelcreated_at,updated_at- Timestampsdeleted,prontuario- Flags
specialties
specialties
Lookup stream of medical specialties (especialidades).Key Fields:
id- Specialty IDcbo- CBO codesigps- SIGPS codedescription- Specialty descriptiondescriptionApp- Description shown in the app
councils
councils
Lookup stream of professional councils (conselhos, e.g. CRM, CRP, CRF).Key Fields:
id- Council IDcode- Council code (e.g. CRM, CRP, CRF)description- Council description
profiles
profiles
Stream of access profiles (perfis de acesso) with module and permission flags.Key Fields:
id- Profile IDcliente,area- Client and area IDsnome,descricao- Name and descriptionadm,profissionaldesaude, etc. - Role flagsmodulo_agenda,modulo_prontuario,modulo_financeiro, etc. - Module access (0 or 1)agenda_*,prontuario_*,financeiro_*- Granular permissionstimestamp,deletado- Audit fields
Data Model
The following diagram illustrates the main relationships between streams. Arrows indicate parent-child or logical links used during sync.Implementation Notes
- Schedules volume: The schedules stream issues one request per calendar per day from Data inicial to today. Use Data inicial to limit the period and avoid large extractions.
- Parent streams: schedules depends on calendars; doctors depends on locals; ehr_tabs and ehr_fichas depend on patients. Ensure parent streams are selected when syncing these child streams.
- Sync types: Streams use FULL_TABLE by default. Configure sync type per stream in the data stream configuration step.