|
| 1 | +# HPR Registration - Create HPRID |
| 2 | + |
| 3 | +This API is used to generate the HPRID (Health Professional ID). The user needs to provide personal details, along with an encrypted email and password. The response will include the HPRID and access token. |
| 4 | + |
| 5 | +## Parameters |
| 6 | + |
| 7 | +- `email`: (String, required) - Encrypted email of the user. |
| 8 | +- `first_name`: (String, required) - User's first name. |
| 9 | +- `middle_name`: (String, optional) - User's middle name (if any). |
| 10 | +- `last_name`: (String, required) - User's last name. |
| 11 | +- `password`: (String, required) - Encrypted password of the user. |
| 12 | +- `profile_photo`: (String, optional) - Base64 encoded photo of the user. |
| 13 | +- `state_code`: (String, required) - User's state code. |
| 14 | +- `dist_code`: (String, required) - User's district code. |
| 15 | +- `pin_code`: (String, required) - User's pincode. |
| 16 | +- `hpr_id`: (String, required) - Desired HPR ID for the user. |
| 17 | +- `hp_category_code`: (Integer, required) - Health professional category code. |
| 18 | +- `hp_subcategory_code`: (Integer, required) - Health professional subcategory code. |
| 19 | +- `notify_user`: (Boolean, optional) - Whether to notify the user via email/SMS. |
| 20 | + |
| 21 | + |
| 22 | +## Method |
| 23 | +```ruby |
| 24 | +create_hprid( |
| 25 | + email:, |
| 26 | + first_name:, |
| 27 | + middle_name: nil, |
| 28 | + last_name:, |
| 29 | + password:, |
| 30 | + profile_photo:, |
| 31 | + state_code:, |
| 32 | + dist_code:, |
| 33 | + pin_code:, |
| 34 | + hpr_id:, |
| 35 | + hp_category_code:, |
| 36 | + hp_subcategory_code:, |
| 37 | + notify_user: true: |
| 38 | +) |
| 39 | +``` |
| 40 | + |
| 41 | + |
| 42 | +## Request Body |
| 43 | + |
| 44 | +```ruby |
| 45 | +@client.create_hprid( |
| 46 | + |
| 47 | + first_name: 'John', |
| 48 | + middle_name: 'Doe', |
| 49 | + last_name: 'Smith', |
| 50 | + password: 'password123', |
| 51 | + profile_photo: '<BASE64 STRING>', |
| 52 | + state_code: '07', |
| 53 | + dist_code: '71', |
| 54 | + pin_code: '110001', |
| 55 | + |
| 56 | + hp_category_code: 1, |
| 57 | + hp_subcategory_code: 1, |
| 58 | + notify_user: true |
| 59 | +) |
| 60 | +``` |
| 61 | + |
| 62 | + |
| 63 | +## Response Body |
| 64 | + |
| 65 | +```json |
| 66 | +{ |
| 67 | + "token": "", |
| 68 | + "expiresIn": 1800, |
| 69 | + "refreshToken": "", |
| 70 | + "refreshExpiresIn": 10800, |
| 71 | + "hprIdNumber": "12-3456-7890-1234", |
| 72 | + "name": "John Smith", |
| 73 | + "gender": "M", |
| 74 | + "yearOfBirth": "1990", |
| 75 | + "monthOfBirth": "01", |
| 76 | + "dayOfBirth": "01", |
| 77 | + "firstName": "John", |
| 78 | + |
| 79 | + "lastName": "Smith", |
| 80 | + "middleName": "Doe", |
| 81 | + "stateCode": "07", |
| 82 | + "districtCode": "71", |
| 83 | + "stateName": "Delhi", |
| 84 | + "districtName": "South Delhi", |
| 85 | + "email": null, |
| 86 | + "mobile": "9012345678", |
| 87 | + "categoryId": 1, |
| 88 | + "subCategoryId": 1, |
| 89 | + "authMethods": [ |
| 90 | + "AADHAAR_OTP", |
| 91 | + "DEMOGRAPHICS", |
| 92 | + "AADHAAR_BIO", |
| 93 | + "PASSWORD", |
| 94 | + "MOBILE_OTP" |
| 95 | + ], |
| 96 | + "new": true, |
| 97 | + "categories": {} |
| 98 | +} |
| 99 | +``` |
| 100 | + |
| 101 | +Once the HPR ID is created, the user can authenticate and access other features provided by the HPRID platform. |
0 commit comments