|
@@ -3458,8 +3458,7 @@ func (c *PatientApiController) ExportPatients() {
|
3458
|
3458
|
|
3459
|
3459
|
if patientNameM["phone"] != nil || reflect.TypeOf(patientNameM["phone"]).String() == "string" {
|
3460
|
3460
|
phone, _ := patientNameM["phone"].(string)
|
3461
|
|
- if VerifyMobileFormat(phone) == false { //手机号码不符合要求则生成一条导入错误日志
|
3462
|
|
-
|
|
3461
|
+ if utils.CellPhoneRegexp().MatchString(phone) == false { //手机号码不符合要求则生成一条导入错误日志
|
3463
|
3462
|
if len(phone) == 0 {
|
3464
|
3463
|
err_log := models.ExportErrLog{
|
3465
|
3464
|
LogType: 1,
|
|
@@ -3872,13 +3871,6 @@ func GetBirthDay(IDCardNo string) *time.Time {
|
3872
|
3871
|
return &birthDay
|
3873
|
3872
|
}
|
3874
|
3873
|
|
3875
|
|
-func VerifyMobileFormat(mobileNum string) bool {
|
3876
|
|
- regular := "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$"
|
3877
|
|
-
|
3878
|
|
- reg := regexp.MustCompile(regular)
|
3879
|
|
- return reg.MatchString(mobileNum)
|
3880
|
|
-}
|
3881
|
|
-
|
3882
|
3874
|
func IsIdCard(id string) (res bool) {
|
3883
|
3875
|
id = strings.ToUpper(id)
|
3884
|
3876
|
if len(id) != 15 && len(id) != 18 {
|