Вы находитесь на странице: 1из 9

Users in the system

Following users can be find through the system.

1. Administrator 2. Doctor 3. Lab test user 4. Checkup user 5. Reservation user 6. Patient 7. Guest

All sing up users are patient. Other users creation can only administrator. Doctors create in doctor section (tab/controller). Other users can create in users section. Guest is user who not sing in to the system.

Sign up

User name must be email. (Show error messages if is not valid email.) Required fields User Name, Password, Re Password, Initials, First Name, Last Name. (Show error messages if they are empty.)

After submit the form

1. Check form fields values are correct and show error messages near the that field. (is user name email? Are Required fields are empty? )

2. Check user name is available in the user table. (Show error message top of page.) 3. Check password and re password is match. (Show error message top of page.) 4. Add form details for user table in database. (add password as md5 hash) 5. If image was upload, rename it and update user table image field. 6. Show 'User Sing up successfully' message for successful sign up.

Sign In

User name must be email. (Show error messages if is not valid email.) Required fields User Name, Password (Show error messages if they are empty.)

After submit the form

1. Check form fields values are correct and show error messages near the that field. (is user name email? Are Required fields are empty? ) 2. Make md5 hash from password and check for user name in user table at database. 3. If is it Valid, 1. Add user details for session, 2. Remove sing in,sing up links and change it for view user name, View profile link and sing out link. 3. Redirect to the home page. 4. Check user permissions with his role and control the access for user. 4. Show 'User name or password incorrect' message if user name or password incorrect.

Users

Administrator can view all action in this controller. Other non guest users can view his profile, edit his details, change password. This controller deny for guest user.

Following function are available in this section. Add user. - only administrator View user list. - only administrator View user profile. Change password. Edit user. Delete user. - only administrator

Add user.

After submit the form

1. Check form fields values are correct and show error messages near the that field. (is user name email? Are Required fields are empty? ) 2. Check user name is available in the user table. (Show error message top of page.) 3. Check password and re password is match. (Show error message top of page.) 4. Add form details for user table in database. (add password as md5 hash) 5. If image was upload, rename it and update user table image field. 6. Show 'User add successfully' message for successful user add.

View user list.

1. Get all not deleted users from user table at database. 2. Show full name, role with view profile, change password, edit user, delete user links.

View user profile. (If user is doctor redirect to view doctor page in doctor section.)

1. Get user id from url. 2. Get details for that user id. 3. Show user details and profile.

Change password

After submit the form 1. Get user id from url. 2. Get user details for that user id. 3. Populate form using user details. 4. Check user name is available in the user table. (Show error message top of page.) 5. Check password and re password is match. (Show error message top of page.) 6. Make hash from password. 7. Update user name and password in user table at database. 8. Show 'Update login details successfully' message for successful update.

Edit user.

1. Get user id from url. 2. Get user details for that user id. 3. Populate form using doctor details.

After submit the form

1. Check form fields values are correct and show error messages near the that field. 2. Update form details for user table in database. 3. If image was upload, rename it and update user table image field. 4. Show 'User edit successfully' message for successful user add.

Delete user

After click delete link button

1. Get user id from ajax request. 2. Update status column as 0 in user table that user row. 3. Show 'User delete successfully' message for successful user delete. 4. Show 'User delete unsuccessfully' message for if it is fail.

Doctor

Administrator can view all action in this controller. Doctors can view his profile, edit his profile, change his password but can't channel his self. Other non guest users can view doctors profile and channel doctors.

Following function are available in this section. Add Doctor. - only administrator

View Doctor list. View Doctor profile. (non administrator users can't view private details about doctor) Channel doctor. Change password. Edit Doctor. (Doctor him self and administrator) Delete Delete. - only administrator

Add Doctor

User name must be email. (Show error messages if is not valid email.) Required fields User Name, Password, Re Password, Initials, First Name, Last Name, Payment per patient and daily details. (Show error messages if they are empty.)

After submit the form

1. Check form fields values are correct and show error messages near the that field. (is user name email? Are Required fields are empty? ) 2. Check user name is available in the user table. (Show error message top of page.) 3. Check password and re password is match. (Show error message top of page.) 4. Add Login Details and User Details to user table. 5. If image was upload, rename it and update user table image field. 6. Add degree, payment, description to doctor table with new user id. 7. Add specialty to doctor_spe_map table with doctor id. 8. Add daily details to doctor_time table with doctor id. 9. Show 'Add doctor successfully' message for successful sign up.

View Doctor list.

1. Get all not deleted doctors from user table join with doctor table at database. 2. Show full name, Specialities, with view profile, channel doctor, change password, edit user, delete user links.

View Doctor profile.

1. Get user id from url. 2. Get details for that user id n user table with join doctor table. 3. Show doctor details and profile. (hide private details from non administrator user)

Change password

After submit the form 1. Get user id from url. 2. Get user details for that user id. 3. Populate form using user details. 4. Check user name is available in the user table. (Show error message top of page.) 5. Check password and re password is match. (Show error message top of page.) 6. Make hash from password. 7. Update user name and password in user table at database. 8. Show 'Update login details successfully' message for successful update.

Edit Doctor.

1. Get user id from url. 2. Get user details and doctor details for that user id. 3. Populate form using doctor details.

After submit the form

1. Check form fields values are correct and show error messages near the that field. 2. Update form details for user table in database. 3. If image was upload, rename it and update user table image field. 4. Update doctor details doctor table. 5. Remove rows in doctor_spe_map table. 6. Add new specialty details to doctor_spe_map table. 7. Remove rows in doctor_time table. 8. Add new daily details to doctor_time table. 9. Show 'User edit successfully' message for successful user add.

Delete Doctor After click delete link button

1. Get user id from ajax request. 2. Update status column as 0 in user table that user row. 3. Show 'Doctor delete successfully' message for successful user delete. 4. Show 'Doctor delete unsuccessfully' message for if it is fail.

Вам также может понравиться