Who it is for
Doctor, nurse, sample collector, physiotherapist, radiology technician, and health companion apps. Same shell, role-specific visit steps.
One route group for every healthcare provider role. Screens from the
Figma doctor / nurse file
map onto /api/mobile/provider. Login is phone + password — not client OTP.
Doctor, nurse, sample collector, physiotherapist, radiology technician, and health companion apps. Same shell, role-specific visit steps.
HTTP 200 with success: true. Business errors also return 200 with success: false and a localized message.
Shared shell: login, home, schedule, profile. Visit wizard lives on UI + Nursing Screens. Each flow below links to the matching frame.
The app is a loop: sign in, land on home, open the schedule, run the visit, then manage the account.
POST /auth/login
GET /home
GET /assignments
POST /visits/start
GET /profile
Authorization: Bearer {accessToken} on every authenticated call.
Accept-Language: ar or en — only /api/mobile/* honors it. Bilingual fields collapse to one string.
Content-Type: application/json on POST/PUT.
{
"success": true,
"data": {},
"message": "optional",
"errors": { "field": ["…"] }
}
Do not call /connect/token from the app. Auth endpoints wrap OpenIddict password and refresh grants for MadaCare_Mobile with scope offline_access MadaCare.
Access ~8 hours, refresh ~30 days.
curl -X POST "__ORIGIN__/api/mobile/provider/auth/login" \
-H "Content-Type: application/json" \
-H "Accept-Language: ar" \
-d '{ "phoneNumber": "0512345678", "password": "P@ssw0rd", "deviceType": 2 }'
Hits the API you are browsing. The token stays in this tab’s sessionStorage.
Response will appear here.
Phone + password login. Tokens come from OpenIddict via the mobile auth endpoints — never call /connect/token from the app.
Landing after login. Use counts for badges and tap a card to open assignment details.
Four tabs map to ProviderMobileScheduleTab. Acknowledge before a visit can start.
Start from an acknowledged appointment, autosave drafts, complete steps, then complete the visit. Always send concurrencyStamp.
Account surfaces plus anonymous legal pages for the login footer.