return;
}
String userId = uid.getText().trim();
String pass = new String(userPassword1.getPassword());
UserModel loginUser = Project.getUserModel();
String facilityId = loginUser.getFacilityModel().getFacilityId();
String hashPass = HashUtil.MD5(pass);
//String Algorithm = ClientContext.getString("addUser.password.hash.algorithm");
//String encoding = ClientContext.getString("addUser.password.hash.encoding");
//String charset = ClientContext.getString("addUser.password.hash.charset");
//String charset = null;
//String hashPass = CryptoUtil.createPasswordHash(Algorithm, encoding, charset, userId, pass);
pass = null;
final UserModel user = new UserModel();
StringBuilder sb = new StringBuilder(facilityId);
sb.append(IInfoModel.COMPOSITE_KEY_MAKER);
sb.append(userId);
user.setUserId(sb.toString());
user.setPassword(hashPass);
user.setSirName(sn.getText().trim());
user.setGivenName(givenName.getText().trim());
user.setCommonName(user.getSirName() + " " + user.getGivenName());
// 施設情報
// 管理者のものを使用する
user.setFacilityModel(Project.getUserModel().getFacilityModel());
// 医療資格
int index = licenseCombo.getSelectedIndex();
user.setLicenseModel(licenses[index]);
// 診療科
index = deptCombo.getSelectedIndex();
user.setDepartmentModel(depts[index]);
// MemberType
// 管理者のものを使用する
user.setMemberType(Project.getUserModel().getMemberType());
// RegisteredDate
if (Project.getUserModel().getMemberType().equals("ASP_TESTER")) {
user.setRegisteredDate(Project.getUserModel().getRegisteredDate());
} else {
user.setRegisteredDate(new Date());
}
// Email
user.setEmail(emailField.getText().trim());
// Role = user
RoleModel rm = new RoleModel();
rm.setRole(usersRole);
user.addRole(rm);
rm.setUser(user);
rm.setUserId(user.getUserId()); // 必要
// タスクを実行する
final UserDelegater udl = new UserDelegater();
int maxEstimation = ClientContext.getInt("task.default.maxEstimation");