Skip to main content

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.

MethodParametersDescription
createUseruser: UserRegisters a new user in the system.
updateUserid: Int, user: UserUpdates the profile information of an existing user.
getUserid: IntFetches the profile details for a specific user ID.
getUserspage: Int, perPage: IntRetrieves a paginated list of users managed by the partner.
deleteUserid: IntRemoves a user profile from the system.