Skip to main content

Platform Features

Clínica Vitalis provides a complete suite of tools for healthcare facility management. Explore all the capabilities designed to streamline your operations.

Core Features

Professional Management

Manage medical staff, specialties, and credentials

Patient Management

Handle patient records and insurance information

Appointment Scheduling

Intelligent scheduling with conflict detection

Work Schedules

Coordinate staff availability and working hours

Specialty Management

Organize medical specialties and departments

Insurance Management

Track insurance providers (Obras Sociales)

Professional Management

Comprehensive tools for managing your medical staff with full CRUD operations and advanced filtering.

Key Capabilities

  • Complete Staff Profiles: Store detailed information for each professional including personal data, contact information, and specialty
  • Specialty Assignment: Link professionals to their medical specialties
  • Status Tracking: Monitor staff status (active/inactive)
  • Data Validation: Enforce unique DNI and email validation

Data Model

Each professional record includes:
interface IProfessionals {
  id: number;
  name: string;
  surname: string;
  dni: number;              // Unique identifier
  birthdate: Date;
  gender: string;
  address: string;
  phone: string;
  email: string;            // Validated email format
  specialityID: number;     // Foreign key to Specialties
  state?: string;           // Active/Inactive status
}

API Endpoints

MethodEndpointDescriptionAuth Required
GET/professionalsList all professionalsJWT
GET/professionals/:idGet professional by IDJWT
POST/professionalsCreate new professionalJWT + Admin
PATCH/professionals/:idUpdate professionalJWT + Admin
All professional creation and updates require admin privileges and undergo comprehensive validation including DNI uniqueness checks.

Patient Management

Efficient patient record management with insurance tracking and comprehensive validation.

Key Capabilities

  • Patient Registry: Maintain complete patient records with personal and medical information
  • Insurance Integration: Link patients to their insurance providers (Obras Sociales)
  • Status Management: Track patient status (active/inactive)
  • Duplicate Prevention: Enforce unique DNI validation

Data Model

interface IPatients {
  id: number;
  name: string;
  surname: string;
  dni: number;              // Unique identifier
  birthdate: Date;
  gender: string;
  address: string;
  phone: string;
  email: string;
  socialWorkId: number;     // Foreign key to Insurance Providers
  state?: string;           // Active/Inactive status
}

API Endpoints

MethodEndpointDescriptionAuth Required
GET/patientsList all patientsJWT
GET/patients/:idGet patient by IDJWT
POST/patientsCreate new patientJWT + Admin
PATCH/patients/:idUpdate patientJWT + Admin

Validation Rules

  • DNI: Minimum 7 characters, must be unique
  • Phone: 10-20 characters, numbers/spaces/hyphens only
  • Email: Must be valid email format
  • Insurance: Must reference valid insurance provider

Appointment Scheduling

Intelligent appointment system with automatic conflict detection and schedule validation.

Key Capabilities

  • Smart Scheduling: Automatic conflict detection for both patients and professionals
  • Schedule Validation: Ensures appointments fall within professional working hours
  • Double-Booking Prevention: Unique constraints prevent scheduling conflicts
  • Status Tracking: Monitor appointment status (pending/confirmed/cancelled)

Data Model

interface IAppointment {
  id: number;
  patientID: number;
  professionalID: number;
  date: string;             // DATEONLY format
  time: string;             // TIME format
  description: string;
  state?: string;           // Appointment status
}

Conflict Prevention

The system enforces two critical unique constraints:
  1. Patient Availability: One appointment per patient per date/time
  2. Professional Availability: One appointment per professional per date/time
// Automatic database-level constraints
indexes: [
  {
    unique: true,
    fields: ['patientID', 'date', 'time'],
    name: 'unique_appointment_per_patient'
  },
  {
    unique: true,
    fields: ['professionalID', 'date', 'time'],
    name: 'unique_appointment_per_pro'
  }
]

API Endpoints

MethodEndpointDescriptionAuth Required
GET/appointmentsList all appointmentsJWT
GET/appointments/:idGet appointment by IDJWT
POST/appointmentsCreate new appointmentJWT + Admin
PATCH/appointments/:idUpdate appointmentJWT + Admin

Validation Workflow

When creating an appointment, the system validates:
  1. Patient exists and is available at the requested time
  2. Professional exists and is available at the requested time
  3. Appointment time falls within professional’s work schedule
  4. No conflicts with existing appointments
Appointments can only be created during a professional’s defined work schedule. Ensure work schedules are configured before booking appointments.

Work Schedules

Coordinate staff availability with flexible work schedule management.

Key Capabilities

  • Weekly Schedule Definition: Define work hours for each day of the week
  • Time Range Management: Set start and end times for each work day
  • Unique Day Constraints: One schedule entry per professional per day
  • Schedule Validation: Ensures appointments respect working hours

Data Model

interface IWorkSchedule {
  id: number;
  professionalID: number;
  dayOfWeek: number;        // 0-6 (Sunday to Saturday)
  startTime: string;        // TIME format
  endTime: string;          // TIME format
}

Example Usage

Configure a professional’s work schedule:
// Monday schedule
{
  "professionalID": 1,
  "dayOfWeek": 1,
  "startTime": "09:00:00",
  "endTime": "17:00:00"
}

API Endpoints

MethodEndpointDescriptionAuth Required
GET/work_schedulesList all schedulesJWT
POST/work_schedulesCreate schedule entryJWT + Admin
PATCH/work_schedules/:idUpdate scheduleJWT + Admin
Day of week uses ISO format: 0 = Sunday, 1 = Monday, …, 6 = Saturday

Specialty Management

Organize medical departments and specialties for proper staff categorization.

Key Capabilities

  • Specialty Catalog: Maintain a comprehensive list of medical specialties
  • Staff Assignment: Link professionals to their respective specialties
  • Hierarchical Organization: Organize healthcare services by specialty

API Endpoints

MethodEndpointDescriptionAuth Required
GET/specialitiesList all specialtiesJWT
POST/specialitiesCreate new specialtyJWT + Admin
PATCH/specialities/:idUpdate specialtyJWT + Admin

Common Specialties

Examples of medical specialties you can manage:
  • Cardiology
  • Pediatrics
  • General Medicine
  • Surgery
  • Psychiatry
  • Dermatology
  • And more…

Insurance Management

Track and manage insurance providers (Obras Sociales) for patient coverage.

Key Capabilities

  • Provider Registry: Maintain database of insurance providers
  • Patient Coverage: Link patients to their insurance plans
  • Coverage Validation: Ensure patients have valid insurance before appointment creation

API Endpoints

MethodEndpointDescriptionAuth Required
GET/socials_worksList all insurance providersJWT
POST/socials_worksCreate new providerJWT + Admin
PATCH/socials_works/:idUpdate providerJWT + Admin

Security & Authentication

Robust security features to protect sensitive healthcare data.

Authentication System

  • JWT-Based Auth: Secure token-based authentication
  • Password Hashing: bcryptjs for secure password storage
  • Role-Based Access: Admin and user role differentiation

Registration

POST /auth/register
{
  "name": "string",
  "surname": "string",
  "email": "string",      // Must be unique and valid
  "password": "string"    // Minimum 6 characters
}

Login

POST /auth/login
{
  "email": "string",
  "password": "string"
}

// Returns:
{
  "token": "jwt-token-here",
  "user": {
    "id": 1,
    "name": "User Name",
    "email": "user@example.com"
  }
}

Authorization Levels

  • View professionals
  • View patients
  • View appointments
  • View schedules and specialties

Data Validation

Comprehensive validation ensures data integrity across the platform.

Input Validation

All endpoints use express-validator for robust validation:
  • Required Fields: Ensures all mandatory fields are provided
  • Format Validation: Email, phone, and date format checking
  • Length Validation: DNI, password, and phone length requirements
  • Custom Validation: Database uniqueness checks and business logic validation

Example: Professional Validation

// Creating a professional requires:
check("name", "Name is required").not().isEmpty()
check("dni", "DNI must be at least 7 characters").isLength({min: 7})
check("dni").custom(existDNIProfessional)  // Uniqueness check
check("email", "Invalid email format").isEmail()
check("phone")
  .isLength({ min: 10, max: 20 })
  .matches(/^[0-9\s\-\+]*$/)
check("specialityID").custom(existSpecialityById)  // Foreign key validation

Database Architecture

Clínica Vitalis uses a relational database model with Sequelize ORM.

Entity Relationships

Key Relationships

  • Many-to-Many: Professionals ↔ Patients (through Appointments)
  • One-to-Many: Insurance Provider → Patients
  • One-to-Many: Professional → Appointments
  • One-to-Many: Patient → Appointments
  • One-to-Many: Specialty → Professionals
  • One-to-Many: Professional → Work Schedules
All relationships are enforced at the database level with foreign key constraints, ensuring referential integrity.

Intelligent Filtering

Advanced filtering capabilities across all resources.

Filter Options

The platform supports filtering by:
  • Name/Surname: Search by professional or patient name
  • DNI: Unique identifier lookup
  • Specialty: Filter professionals by medical specialty
  • Insurance: Filter patients by insurance provider
  • Status: Filter by active/inactive status
  • Date Range: Filter appointments by date
  • Professional/Patient: View appointments by staff or patient

Usage Example

// Filter professionals by specialty
GET /professionals?specialityID=1

// Filter appointments by date range
GET /appointments?startDate=2024-01-01&endDate=2024-01-31

// Search patients by name
GET /patients?search=John

Technology Highlights

Frontend Stack

Built with modern React and TypeScript:
{
  "react": "^19.2.0",
  "typescript": "~5.9.3",
  "@reduxjs/toolkit": "^2.11.0",
  "@mui/material": "^7.3.6",
  "react-router-dom": "^6.30.2",
  "react-hook-form": "^7.66.1"
}

Backend Stack

Robust Node.js backend with TypeScript:
{
  "express": "^5.1.0",
  "sequelize": "^6.37.7",
  "sqlite3": "^5.1.7",
  "jsonwebtoken": "^9.0.2",
  "bcryptjs": "^3.0.3",
  "express-validator": "^7.3.1"
}

Next Steps

API Reference

Explore detailed API documentation

Database Schema

Learn about the data models

Authentication Guide

Implement secure authentication

Deployment Guide

Learn how to deploy the platform

Build docs developers (and LLMs) love