Feature #1443
closed
- Status changed from New issue to Needs Testing
- % Done changed from 0 to 100
New endpoint was added to register new user (1st step registration)
POST /api/mdlaccount/register
Request parameters:
{
"npi": "string",
"verifyCode": "string",
"phoneNumber": "string",
"email": "string",
"userName": "string",
"password": "string"
}
Rules:
- npi, verifyCode, phoneNumber and email should match related column values in the table tblphyicians. If not matched then message "Physician was not found" is returned
- npi should have 10 length, only digits. If not valid then messages "The NPI should be 10 digits" or "NPI should contain only digits" are returned
- verifyCode should have length 10 symbols and contain only digits. If not valid then messages "Key_code should contain only digits" or "The Key_code should be 6 digits" are returned
- phone number should have lenght 12 symbols with format +[countryCode][area code][phoneNumber]. Example - "+79200110798". If not valid then messages "The phone number should be 12 characters long." or "Phone number should match format +XXXXXXXXXXXX" are returned.
- username should have length from 6 to 15 symbols and contain only alphabetical and underscore symbols. If not valid then messages "The username must be at least 6 and at max 15 characters long." or "Username should only contain alphanumeric and underscore letters" are returned.
- password should have lenght from 8 till 50 symbols and contain upper, lowercase and number letters. If not valid then message "Password must contain at least 8 characters including UPPER/lowercase and numbers" is returned.
- if physician has already been registered (this is checked if tblphysician.IdentityUserId column is not empty) then message "Physician has already registered" returned.
- if request parameters are valid and physician is not registered with specified username then user is created (in DB we create new record in the aspnetusers table.) Sms with security code is sent to physician phone number.
Api can be tested using swagger - see here https://develop_feature_ironjab-api.gbglis.xyz/swagger/index.html.
- Assignee changed from Artem Bakhmat to Alice Gor
- Status changed from Needs Testing to Closed
The Api is tested and verified
- Status changed from Closed to In Progress
- Status changed from In Progress to Closed
The Api is verified and tested in DeV
Also available in: Atom
PDF