User Management Overview
The User model represents patient data within the Altibbi ecosystem. Managing users correctly is essential for creating consultations and maintaining accurate medical profiles.
The User Model
Below is the structure of the User struct used across the SDK:
public struct User: Codable {
public var id: Int?
public var name: String?
public var email: String?
public var phoneNumber: String?
public var dateOfBirth: String?
public var gender: String?
public var insuranceId: String?
public var policyNumber: String?
public var nationalityNumber: String?
public var height: Double?
public var weight: Double?
public var bloodType: String?
public var smoker: String?
public var alcoholic: String?
public var maritalStatus: String?
public var createdAt: String?
public var updatedAt: String?
}
User API Functionalities
The ApiService includes several methods for creating, retrieving, updating, and deleting user profiles.
| Method | Parameters | Description |
|---|---|---|
createUser | user: User | Registers a new user in the system. |
updateUser | id: Int, user: User | Updates the profile information of an existing user. |
getUser | id: Int | Fetches the profile details for a specific user ID. |
getUsers | page: Int, perPage: Int | Retrieves a paginated list of users managed by the partner. |
deleteUser | id: Int | Removes a user profile from the system. |