- Add SendSmsMessage class for encapsulating SMS message data. - Create KavehNegarProvider and RanginehProvider classes implementing SmsProviderInterface for sending SMS. - Implement SmsLogRepository and SmsTemplateRepository for managing SMS logs and templates. - Develop SendSmsHandler for handling SMS sending messages. - Create SmsService to manage SMS dispatching and logging. - Add UserProfileController for managing user profiles with CRUD operations. - Implement UserProfile entity and repository for user profile data management. - Update symfony.lock and bootstrap.php for project dependencies and environment setup.
2.4 KiB
2.4 KiB
تسک ۰۳: ماژول پروفایل کاربر
توضیح
پیادهسازی CRUD پروفایل پزشکی کاربر شامل اطلاعات شخصی، سابقه بیماری، آلرژیها، داروها، عملهای جراحی، سابقه خانوادگی و بستگان.
Endpoint ها
| متد | مسیر | توضیح | نیاز به Auth |
|---|---|---|---|
| POST | /api/v1/user-profile |
ایجاد پروفایل | بله |
| GET | /api/v1/user-profile/{uuid} |
دریافت پروفایل | بله |
| PATCH | /api/v1/user-profile/{uuid} |
ویرایش پروفایل | بله (Owner/Admin) |
| DELETE | /api/v1/user-profile/{uuid} |
حذف پروفایل | بله (Admin) |
پیشنیازها
- تسک ۰۱ و ۰۲ کامل شده باشند
خروجیهای مورد انتظار
- Entity پروفایل با تمام فیلدها
- پشتیبانی از JSON column برای دادههای پزشکی پیچیده
- بعد از ذخیره پروفایل: refresh token و get userinfo اجرا میشود
- فقط owner یا admin میتواند پروفایل را ببیند/ویرایش کند
زمان تخمینی
۸ تا ۱۰ ساعت
نمونه Request
POST /api/v1/user-profile
{
"name": "علی رضایی",
"description": [{ "value": "متن توضیحات", "format": "basic_html" }],
"birthday": "1370-05-15",
"basic_insurance": [251],
"blood_type": "ab_negative",
"education": "postgraduate_diploma",
"fathers_name": "محمد",
"gender": "male",
"home_phone": "07433332178",
"job": "مهندس",
"marital_status": "married",
"supplementary_insurance": "308",
"work_phone": "07433332178",
"address": "تهران، خیابان ولیعصر",
"other": [{
"disease": [{ "id": 1, "name": "فشار خون", "status": "true" }],
"allergies": [{ "substance": "پنیسیلین", "reaction": "کهیر", "severity": "شدید" }],
"medications": [{ "name": "آتنولول", "dose": "50mg", "frequency": "صبحها" }],
"surgeries": [{ "type": "آپاندکتومی", "year": 2015, "hospital": "بیمارستان امام خمینی" }],
"family_history": [{ "relation": "پدر", "disease": "فشار خون" }],
"relatives": [{
"name": "سارا",
"relation": "خواهر",
"contact": { "phone": "09121234567", "email": "sara@example.com", "address": "تهران" }
}]
}]
}