File size: 398 Bytes
643a619
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from fastapi import APIRouter
from pydantic import BaseModel

router = APIRouter()
class AppointmentInput(BaseModel):
    patient_name: str
    age: int
    symptoms: str
    specialist: str

@router.post("/appointments/create")
async def create_appointment(data: AppointmentInput):
    print(f"Received appointment: {data}")
    return {"message": "Appointment created", "data": data}