
Configuring Clínica nas Nuvens as a Source
In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Clínica nas Nuvens 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 API credentials to access your Clínica nas Nuvens data. These credentials can be found in your Clínica nas Nuvens account under Menu > Integrações > API. The following configurations are available:- Client ID: The client ID to authenticate against the Clínica nas Nuvens API.
- Client Secret: The client secret to authenticate against the Clínica nas Nuvens API.
- Token: The token to authenticate against the Clínica nas Nuvens API.
- Start Date: The earliest date from which records will be synced. This is used for date-based streams like Agenda (appointments).
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: FULL_TABLE sync is used for all streams.
Incremental sync is not supported. The Clínica nas Nuvens API does not provide reliable filters by modification date, so all streams use full table sync. Each extraction will fetch the complete current state of the data.
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 Clínica nas Nuvens and their corresponding fields:Agenda (Appointments)
Agenda (Appointments)
Stream containing scheduled appointments and their details.Key Fields:
id- Unique identifier for the appointmentdata- Date of the scheduled appointmenthoraInicio- Start time of the appointmenthoraFim- End time of the appointmentstatus- Appointment status
idPaciente- ID of the patientemailPaciente- Patient’s email addresstelefoneCelularPaciente- Patient’s mobile phone numberidOrigemPaciente- ID of the patient’s origin/source
idLocalAgenda- ID of the schedule locationidPessoaExecutor- ID of the person performing the appointmentidTipoConsulta- ID of the consultation typeidTipoConvenio- ID of the agreement/insurance typeidRotulo- ID of the labelencaminhamento- Referral informationobservacoes- Observations about the appointmenturlSalaEspera- URL of the virtual waiting room
procedimentos[]- Array of procedures for the appointment:procedimentos[].id- Procedure IDprocedimentos[].nome- Procedure nameprocedimentos[].idEspecialidade- Specialty IDprocedimentos[].idTipoProcedimento- Procedure type IDprocedimentos[].idPromocao- Promotion IDprocedimentos[].quantidade- Quantity
Pacientes (Patients)
Pacientes (Patients)
Stream containing patient records and their personal information.Key Fields:
id- Unique identifier for the patientnome- Patient’s full namenomeSocial- Patient’s social nameativo- Indicates whether the patient is active
cpfcnpj- Patient’s CPF or CNPJ document numberdataNascimento- Patient’s date of birthsexo- Patient’s biological sexgenero- Patient’s genderidNacionalidade- ID of the patient’s nationalityestrangeiro- Indicates if the patient is a foreignernumeroControle- Patient’s control numbernumeroIdentificacao- Patient’s identification numberidOrigem- Origin/source identifier
contato):contato.email- Patient’s email addresscontato.telefoneCelular- Mobile phone numbercontato.telefoneResidencial- Residential phone numbercontato.telefoneComercial- Commercial phone numbercontato.telefoneRecados- Message phone numbercontato.skype- Skype usernamecontato.ramalTelefoneResidencial- Residential phone extensioncontato.ramalTelefoneComercial- Commercial phone extensioncontato.ramalTelefoneRecados- Message phone extension
endereco):endereco.rua- Street nameendereco.numero- Address numberendereco.complemento- Address complementendereco.bairro- Neighborhoodendereco.cep- ZIP/postal codeendereco.idCidade- City ID (joins with Cidades stream)
Cidades (Cities)
Cidades (Cities)
Lookup table containing city information with state details.Key Fields:
id- Unique identifier for the citynome- City namecodIbge- IBGE code (Brazilian official city code)
estado):estado.id- State identifierestado.nome- State nameestado.sigla- State abbreviation (e.g., SP, RJ, MG)
Especialidades (Specialties)
Especialidades (Specialties)
Lookup table containing medical specialties.Key Fields:
id- Unique identifier for the specialtynome- Specialty name (e.g., Cardiologia, Dermatologia)
Nacionalidades (Nationalities)
Nacionalidades (Nationalities)
Lookup table containing nationalities.Key Fields:
id- Unique identifier for the nationalitynacionalidade- Nationality name (e.g., Brasileira, Portuguesa)
Origem (Patient Sources)
Origem (Patient Sources)
Lookup table containing patient origin/source information. Tracks how patients discovered or were referred to the clinic.Key Fields:
id- Unique identifier for the originnome- Origin name (e.g., “Indicação”, “Google”, “Convênio”)ativo- Indicates if the origin is active
Agenda Origem (Schedule Origins)
Agenda Origem (Schedule Origins)
Lookup table containing schedule/appointment origin information.Key Fields:
id- Unique identifier for the schedule originnome- Schedule origin nameativo- Indicates if the record is active
Tipo Convênio (Agreement Types)
Tipo Convênio (Agreement Types)
Lookup table containing agreement/insurance types (convênios).Key Fields:
id- Unique identifier for the agreement typenome- Agreement type nameativo- Indicates if the agreement type is activeparticular- Indicates if it’s a private/self-pay optionbeneficio- Indicates benefit status
Tipo Procedimento (Procedure Types)
Tipo Procedimento (Procedure Types)
Lookup table containing procedure types with associated specialties.Key Fields:
id- Unique identifier for the procedure typenome- Procedure type nameativo- Indicates if the procedure type is active
especialidades[]- Array of specialties that can perform this procedure:especialidades[].id- Specialty IDespecialidades[].nome- Specialty name
Data Model
The following diagram illustrates the relationships between the core data streams in Clínica nas Nuvens. The arrows indicate the join keys that link the different entities, providing a clear overview of the data structure.Use Cases for Data Analysis
This guide outlines valuable business intelligence use cases when consolidating Clínica nas Nuvens data, along with ready-to-use SQL queries that you can run on Explorer.1. Appointment Volume Analysis
Track appointment volumes over time to understand clinic capacity and identify trends. Business Value:- Understand daily and weekly appointment patterns
- Identify peak hours and days for resource planning
- Monitor appointment status distribution
SQL query
SQL query
- AWS
- GCP
Sample Result
Sample Result
| appointment_date | day_of_week | status | total_appointments | unique_patients |
|---|---|---|---|---|
| 2024-11-27 | Wednesday | Confirmado | 45 | 42 |
| 2024-11-27 | Wednesday | Aguardando | 12 | 12 |
| 2024-11-27 | Wednesday | Cancelado | 3 | 3 |
| 2024-11-26 | Tuesday | Confirmado | 52 | 48 |
| 2024-11-26 | Tuesday | Aguardando | 8 | 8 |
2. Patient Origin Analysis
Understand where your patients are coming from to optimize marketing efforts. Business Value:- Identify most effective patient acquisition channels
- Measure ROI of marketing initiatives
- Optimize patient acquisition strategy
SQL query
SQL query
- AWS
- GCP
Sample Result
Sample Result
| origem | total_patients | active_patients | active_rate_pct |
|---|---|---|---|
| Indicação | 1,245 | 1,102 | 88.5 |
| 856 | 723 | 84.5 | |
| Convênio | 634 | 589 | 92.9 |
| 423 | 367 | 86.8 | |
| Site | 312 | 256 | 82.1 |
3. Procedure and Specialty Analysis
Analyze which procedures and specialties are most in demand. Business Value:- Identify most popular procedures
- Understand specialty distribution
- Plan resource allocation based on demand
SQL query
SQL query
- AWS
- GCP
Sample Result
Sample Result
| specialty | procedure_type | total_appointments | total_procedures |
|---|---|---|---|
| Dermatologia | Consulta | 234 | 234 |
| Cardiologia | Consulta | 189 | 189 |
| Dermatologia | Procedimento Estético | 156 | 312 |
| Oftalmologia | Consulta | 145 | 145 |
| Pediatria | Consulta | 123 | 123 |
Implementation Notes
Data Quality Considerations
- The
Agendastream uses thestart_dateconfiguration to filter appointments by date - Patient records may have null values for optional contact and address fields
- Use the lookup tables (Cidades, Especialidades, etc.) to enrich your analyses with descriptive names
Best Practices
- Always join with lookup tables to get descriptive names instead of just IDs
- Consider patient privacy when analyzing personal data