GraphQL API Integration for Dr. Fadil's Healthcare Profile
August 28, 2025 ยท View on GitHub
Overview
This project now includes a GraphQL API powered by GraphQL Yoga, providing programmatic access to Dr. Fadil's healthcare services, professional information, and innovation portfolio.
๐ Quick Start
Install Dependencies
npm install
Start the GraphQL Server
npm run dev
# or
npm start
The GraphQL API will be available at: http://localhost:4000/graphql
GraphiQL Interface
Access the interactive GraphQL playground at: http://localhost:4000/graphql
๐ API Schema
Queries Available
Professional Information
profile- Complete doctor profile informationservices- Available medical servicesspecializations- Areas of medical expertiseinnovations- Healthcare technology innovationspublications- Medical research publications
Contact & Scheduling
contactInfo- Contact details and clinic hoursavailableSlots(date: String!)- Available appointment slots
Health Information
healthTip- Random health tip
Mutations Available
Contact & Appointments
submitContactForm(input: ContactFormInput!)- Submit contact formrequestAppointment(input: AppointmentInput!)- Request medical appointmentsubscribeNewsletter(email: String!)- Subscribe to healthcare newsletter
๐ Example Queries
Get Doctor Profile
query GetDoctorProfile {
profile {
name
title
specializations
bio
experience
education {
degree
institution
year
}
certifications
languages
}
}
Get Available Services
query GetServices {
services {
id
name
description
duration
category
isAvailable
}
}
Submit Contact Form
mutation SubmitContact {
submitContactForm(input: {
name: "John Doe"
email: "john@example.com"
subject: "General Inquiry"
message: "I would like to learn more about your AI diagnostic services."
isUrgent: false
}) {
success
message
referenceId
}
}
Request Appointment
mutation RequestAppointment {
requestAppointment(input: {
name: "Jane Smith"
email: "jane@example.com"
phone: "+1-555-0123"
preferredDate: "2024-02-15"
preferredTime: "10:00"
serviceType: "General Consultation"
reason: "Regular checkup"
}) {
success
message
appointmentId
confirmationSent
}
}
Check Available Slots
query GetAvailableSlots {
availableSlots(date: "2024-02-15") {
time
available
duration
}
}
๐ฅ Healthcare-Specific Features
Medical Services Categories
CONSULTATION- General and specialized consultationsDIAGNOSTIC- AI-powered diagnostic servicesTREATMENT- Treatment planning and monitoringINNOVATION- Healthcare technology consultingRESEARCH- Medical research collaboration
Professional Information
- Complete medical education history
- Board certifications and specializations
- Experience in healthcare innovation
- Published research and publications
- Healthcare technology innovations
Contact & Scheduling
- Clinic hours and availability
- Emergency contact information
- Appointment scheduling system
- Contact form processing
๐ง Integration with Frontend
The GraphQL API is designed to integrate seamlessly with the existing static site. You can:
- Fetch dynamic content using GraphQL queries from the frontend JavaScript
- Submit forms using GraphQL mutations instead of traditional form submissions
- Display real-time information like available appointment slots
- Show personalized content based on user interactions
Example Frontend Integration
// Example: Fetch doctor profile in frontend
async function loadDoctorProfile() {
const response = await fetch('/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: `
query GetProfile {
profile {
name
title
bio
specializations
}
}
`
})
});
const data = await response.json();
return data.data.profile;
}
๐ Deployment
Development
npm run dev
Production
The GraphQL server can be deployed alongside the static site:
npm start
Environment Variables
PORT- Server port (default: 4000)NODE_ENV- Environment (development/production)
๐ CORS Configuration
The API is configured with CORS support for:
- Development: All origins allowed
- Production: Restricted to
thefadil.siteanddr-fadil-profile.pages.dev
๐ Healthcare Data Structure
The API provides structured access to:
- Medical Services with categories and availability
- Professional Credentials including certifications
- Healthcare Innovations with technology focus
- Research Publications with abstracts and links
- Contact Information with clinic hours
- Appointment Scheduling with time slot management
๐ค Contributing
When adding new healthcare-related features:
- Follow medical data privacy best practices
- Ensure HIPAA compliance considerations
- Use appropriate medical terminology
- Document new schema additions
- Test thoroughly with healthcare use cases
๐ Support
For API support or healthcare technology inquiries:
- Email: contact@brainsait.io
- GraphQL Schema: Available via introspection
- Documentation: Built-in GraphiQL interface
Dr. Mohamed El Fadil - Physician & Healthcare Technology Innovator
BrainSAIT Healthcare Innovation Platform