當前位置: 首頁>>代碼示例>>Python>>正文


Python User.phone方法代碼示例

本文整理匯總了Python中DoctorSpring.models.User.phone方法的典型用法代碼示例。如果您正苦於以下問題:Python User.phone方法的具體用法?Python User.phone怎麽用?Python User.phone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DoctorSpring.models.User的用法示例。


在下文中一共展示了User.phone方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_addKefu

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_addKefu(self):
        user=User('kefu','77777777777','123456')
        user.sex=0
        user.status=0
        user.email='[email protected]'
        user.address='四川省 通江縣'
        user.phone = '77777777777'
        user.type = UserStatus.doctor
        user.name = "客服人員"
        User.save(user)

        new_userrole2 = UserRole(user.id, RoleId.Kefu)
        UserRole.save(new_userrole2)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:15,代碼來源:real_model.py

示例2: test_addFenzhen

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_addFenzhen(self):
        user=User('fenzhen','13426026573','123456')
        user.sex=0
        user.status=0
        user.email='[email protected]'
        user.address='四川省 通江縣'
        user.phone = '13426026573'
        user.type = UserStatus.doctor
        user.name = "分診醫生"
        User.save(user)

        new_userrole2 = UserRole(user.id, RoleId.Admin)
        UserRole.save(new_userrole2)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:15,代碼來源:real_model.py

示例3: test_addHospitalUser

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_addHospitalUser(self):
        new_user_1 = User('醫院用戶',"44444444444", "123456")
        new_user_1.email = "[email protected]"
        new_user_1.phone = "44444444444"
        new_user_1.name = "醫院用戶"
        new_user_1.type = UserStatus.doctor
        User.save(new_user_1)

        new_doctor_1 = Doctor(new_user_1.id)
        new_doctor_1.username = "醫院用戶"
        new_doctor_1.hospitalId = 1
        new_doctor_1.status = 0
        new_doctor_1.type = DoctorType.HospitalUser
        Doctor.save(new_doctor_1)
        new_userrole = UserRole(new_user_1.id, RoleId.HospitalUser)
        UserRole.save(new_userrole)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:18,代碼來源:real_model.py

示例4: test_addPatient

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
 def test_addPatient(self):
     user=User('liclu','15210892443','123456')
     user.sex=0
     user.status=0
     user.email='[email protected]'
     user.address='四川省 通江縣'
     user.phone = '15210892443'
     User.save(user)
     patient=Patient()
     patient.gender=0
     patient.Name='程成'
     patient.status=0
     patient.userID=user.id
     Patient.save(patient)
     new_userrole = UserRole(user.id, RoleId.Patient)
     UserRole.save(new_userrole)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:18,代碼來源:real_model.py

示例5: test_addSuperUser

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_addSuperUser(self):
        user=User('zhoufan','13426026573','123456')
        user.sex=0
        user.status=0
        user.email='[email protected]'
        user.address='四川省 通江縣'
        user.phone = '13426026573'
        user.type = UserStatus.doctor
        user.name = "張西"
        User.save(user)


        patient=Patient()
        patient.gender=0
        patient.Name='zf'
        patient.status=0
        patient.userID=user.id
        Patient.save(patient)
        new_userrole = UserRole(user.id, RoleId.Patient)
        UserRole.save(new_userrole)

        new_doctor_1 = Doctor(user.id)
        new_doctor_1.identityPhone = "029-12345567"
        new_doctor_1.username = "張西"
        new_doctor_1.diagnoseCount = 10
        new_doctor_1.feedbackCount = 5
        new_doctor_1.goodFeedbackCount = 5
        new_doctor_1.hospitalId = 1
        new_doctor_1.departmentId = 1
        new_doctor_1.title = "副主任醫師"
        new_doctor_1.status = 0


        Doctor.save(new_doctor_1)
        new_doctor2skill_1_1 = Doctor2Skill(new_doctor_1.id,1)
        Doctor2Skill.save(new_doctor2skill_1_1)
        new_userrole1 = UserRole(user.id, RoleId.Doctor)
        UserRole.save(new_userrole1)
        new_userrole2 = UserRole(user.id, RoleId.Admin)
        UserRole.save(new_userrole2)
開發者ID:LichuanLu,項目名稱:blueberry,代碼行數:42,代碼來源:real_model.py

示例6: register_doctor

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
def register_doctor():
    form = RegisterFormDoctor(request.form)
    form_result = form.validate()
    if form_result.status == rs.SUCCESS.status:
        new_user = User(form.real_name, form.username, form.password)
        new_user.email = form.email
        new_user.phone = form.cellphone
        new_user.type = UserStatus.doctor
        new_user.status = ModelStatus.Draft
        User.save(new_user)
        new_doctor = Doctor(new_user.id)
        new_doctor.username = form.real_name
        new_doctor.identityPhone = form.identity_phone
        Doctor.save(new_doctor)

        new_doctor2skill = Doctor2Skill(new_doctor.id, 1)
        Doctor2Skill.save(new_doctor2skill)

        new_userrole = UserRole(new_user.id, RoleId.Doctor)
        UserRole.save(new_userrole)

    return jsonify(form_result.__dict__)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:24,代碼來源:user_view.py

示例7: test_addDoctor

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_addDoctor(self):
        new_user_1 = User('印弘',"1111111111", "123456")
        new_user_1.email = "[email protected]"
        new_user_1.phone = "111111111111"
        new_user_1.type = UserStatus.doctor
        new_user_1.imagePath = config.AVATAR_PREFIX+'avatar/yinhong-xj.png'
        User.save(new_user_1)

        new_doctor_1 = Doctor(new_user_1.id)
        new_doctor_1.identityPhone = "029-12345567"
        new_doctor_1.username = "印弘"
        new_doctor_1.diagnoseCount = 10
        new_doctor_1.feedbackCount = 5
        new_doctor_1.goodFeedbackCount = 5
        new_doctor_1.hospitalId = 1
        new_doctor_1.departmentId = 1
        new_doctor_1.title = "主任醫師"
        new_doctor_1.status = 0


        Doctor.save(new_doctor_1)
        new_doctor2skill_1_1 = Doctor2Skill(new_doctor_1.id,1)
        Doctor2Skill.save(new_doctor2skill_1_1)
        new_userrole = UserRole(new_user_1.id, RoleId.Doctor)
        UserRole.save(new_userrole)




        new_user_2 = User('宦怡',"22222222222", "123456")
        new_user_2.email = "[email protected]"
        new_user_2.phone = "22222222222"
        new_user_2.imagePath = config.AVATAR_PREFIX+'avatar/huanyi-xj.jpg'

        new_user_2.type = UserStatus.doctor
        User.save(new_user_2)

        new_doctor_2 = Doctor(new_user_2.id)
        new_doctor_2.identityPhone = "029-12345567"
        new_doctor_2.username = "宦怡"
        new_doctor_2.diagnoseCount = 8
        new_doctor_2.feedbackCount = 3

        new_doctor_2.hospitalId = 1
        new_doctor_2.departmentId = 1
        new_doctor_2.title = "主任醫師"
        new_doctor_2.status = 0
        new_doctor_2.goodFeedbackCount = 2

        Doctor.save(new_doctor_2)
        new_doctor2skill_1_2 = Doctor2Skill(new_doctor_2.id,2)
        Doctor2Skill.save(new_doctor2skill_1_2)
        new_userrole2 = UserRole(new_user_2.id, RoleId.Doctor)
        UserRole.save(new_userrole2)

        new_user_3 = User('張勁鬆',"33333333333", "123456")
        new_user_3.email = "[email protected]"
        new_user_3.phone = "33333333333"
        new_user_3.type = UserStatus.doctor
        new_user_3.imagePath = config.AVATAR_PREFIX+'avatar/zhangjinsong-xj.jpg'

        User.save(new_user_3)

        new_doctor_3 = Doctor(new_user_3.id)
        new_doctor_3.identityPhone = "029-12345567"
        new_doctor_3.username = "張勁鬆"
        new_doctor_3.diagnoseCount = 9
        new_doctor_3.feedbackCount = 4

        new_doctor_3.hospitalId = 1
        new_doctor_3.departmentId = 1
        new_doctor_3.title = "副主任醫師"
        new_doctor_3.status = 0
        new_doctor_3.goodFeedbackCount = 3

        Doctor.save(new_doctor_3)
        new_doctor2skill_1_3 = Doctor2Skill(new_doctor_3.id,3)
        Doctor2Skill.save(new_doctor2skill_1_3)
        new_userrole3 = UserRole(new_user_3.id, RoleId.Doctor)
        UserRole.save(new_userrole3)

        #doctor 4
        new_user_4 = User('孫立軍',"88888888888", "123456")
        new_user_4.email = "[email protected]"
        new_user_4.phone = "88888888888"
        new_user_4.type = UserStatus.doctor
        new_user_4.imagePath = config.AVATAR_PREFIX+'avatar/sunlijun-xj.jpg'

        User.save(new_user_4)

        new_doctor_4 = Doctor(new_user_4.id)
        new_doctor_4.identityPhone = "029-12345567"
        new_doctor_4.username = "孫立軍"
        new_doctor_4.diagnoseCount = 9
        new_doctor_4.feedbackCount = 4

        new_doctor_4.hospitalId = 1
        new_doctor_4.departmentId = 1
        new_doctor_4.title = "主任醫師"
        new_doctor_4.status = 0
#.........這裏部分代碼省略.........
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:103,代碼來源:real_model.py

示例8: test_add_doctor

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_add_doctor(self):


        new_location_1 = Location("西安_1")
        Skill.save(new_location_1)
        new_location_2 = Location("西安_2")
        Skill.save(new_location_2)
        new_location_3 = Location("西安_3")
        Skill.save(new_location_3)

        new_skill_1 = Skill("頭部")
        Skill.save(new_skill_1)
        new_skill_2 = Skill("頸部")
        Skill.save(new_skill_2)
        new_skill_3 = Skill("胸部")
        Skill.save(new_skill_3)

        new_skill_1 = Position("頭部")
        Skill.save(new_skill_1)
        new_skill_2 = Position("頸部")
        Skill.save(new_skill_2)
        new_skill_3 = Position("胸部")
        Skill.save(new_skill_3)

        new_hospital = Hospital("西22安西京醫院", "地址——西22安西京醫院", "描述-西22安西京醫院", "22")
        Hospital.save(new_hospital)

        new_department_1 = Department("影像科")
        Skill.save(new_department_1)
        new_department_2 = Department("內科")
        Skill.save(new_department_2)
        new_department_3 = Department("外科")
        Skill.save(new_department_3)

        new_user_1 = User("18511134676", "123456")
        new_user_1.email = "[email protected]"
        new_user_1.phone = "18511134676"
        new_user_1.type = UserStatus.doctor
        User.save(new_user_1)

        new_doctor_1 = Doctor(new_user_1.id)
        new_doctor_1.identityPhone = "010-12345567"
        new_doctor_1.username = "任大強"
        new_doctor_1.diagnoseCount = 777
        new_doctor_1.feedbackCount = 888

        new_doctor_1.hospitalId = new_hospital.id
        new_doctor_1.departmentId = new_department_1.id
        new_doctor_1.title = "副主任醫師1"

        Doctor.save(new_doctor_1)
        new_doctor2skill_1_1 = Doctor2Skill(new_doctor_1.id, new_skill_1.id)
        Doctor2Skill.save(new_doctor2skill_1_1)
        new_doctor2skill_1_2 = Doctor2Skill(new_doctor_1.id, new_skill_3.id)
        Doctor2Skill.save(new_doctor2skill_1_2)

        new_userrole = UserRole(new_user_1.id, RoleId.Doctor)
        UserRole.save(new_userrole)


        new_user_2 = User("18511122567", "123456")
        new_user_2.email = "[email protected]"
        new_user_2.phone = "18511122567"
        new_user_2.type = UserStatus.doctor
        User.save(new_user_2)

        new_doctor_2 = Doctor(new_user_2.id)
        new_doctor_2.identityPhone = "010-12345667"
        new_doctor_2.username = "任小強"
        new_doctor_2.diagnoseCount = 666
        new_doctor_2.feedbackCount = 777

        new_doctor_2.hospitalId = new_hospital.id
        new_doctor_2.departmentId = new_department_2.id
        new_doctor_2.title = "副主任醫師2"

        Doctor.save(new_doctor_2)
        new_doctor2skill_2_1 = Doctor2Skill(new_doctor_2.id, new_skill_2.id)
        Doctor2Skill.save(new_doctor2skill_2_1)
        new_doctor2skill_2_2 = Doctor2Skill(new_doctor_2.id, new_skill_3.id)
        Doctor2Skill.save(new_doctor2skill_2_2)

        new_userrole = UserRole(new_user_2.id, RoleId.Doctor)
        UserRole.save(new_userrole)

        new_user_3 = User("18511142567", "123456")
        new_user_3.email = "[email protected]"
        new_user_3.phone = "18511142567"
        new_user_3.type = UserStatus.doctor
        User.save(new_user_3)

        new_doctor_3 = Doctor(new_user_3.id)
        new_doctor_3.identityPhone = "020-12346678"
        new_doctor_3.username = "任誌強"

        new_doctor_3.hospitalId = new_hospital.id
        new_doctor_3.departmentId = new_department_3.id
        new_doctor_3.title = "副主任醫師2"
        new_doctor_3.diagnoseCount = 999
        new_doctor_3.feedbackCount = 1000
#.........這裏部分代碼省略.........
開發者ID:LichuanLu,項目名稱:blueberry,代碼行數:103,代碼來源:base_model.py

示例9: test_addDoctor

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import phone [as 別名]
    def test_addDoctor(self):
        new_user_1 = User('印弘',"11111111111", "123456")
        new_user_1.email = "[email protected]"
        new_user_1.phone = "111111111111"
        new_user_1.type = UserStatus.doctor
        User.save(new_user_1)

        new_doctor_1 = Doctor(new_user_1.id)
        new_doctor_1.identityPhone = "029-12345567"
        new_doctor_1.username = "印弘"
        new_doctor_1.diagnoseCount = 10
        new_doctor_1.feedbackCount = 5
        new_doctor_1.goodFeedbackCount = 5
        new_doctor_1.hospitalId = 1
        new_doctor_1.departmentId = 1
        new_doctor_1.title = "主任醫師"
        new_doctor_1.status = 0


        Doctor.save(new_doctor_1)
        new_doctor2skill_1_1 = Doctor2Skill(new_doctor_1.id,1)
        Doctor2Skill.save(new_doctor2skill_1_1)
        new_userrole = UserRole(new_user_1.id, RoleId.Doctor)
        UserRole.save(new_userrole)




        new_user_2 = User('宦怡',"22222222222", "123456")
        new_user_2.email = "[email protected]"
        new_user_2.phone = "22222222222"
        new_user_2.type = UserStatus.doctor
        User.save(new_user_2)

        new_doctor_2 = Doctor(new_user_2.id)
        new_doctor_2.identityPhone = "029-12345567"
        new_doctor_2.username = "宦怡"
        new_doctor_2.diagnoseCount = 8
        new_doctor_2.feedbackCount = 3

        new_doctor_2.hospitalId = 1
        new_doctor_2.departmentId = 1
        new_doctor_2.title = "主任醫師"
        new_doctor_2.status = 0
        new_doctor_2.goodFeedbackCount = 2

        Doctor.save(new_doctor_2)
        new_doctor2skill_1_2 = Doctor2Skill(new_doctor_2.id,2)
        Doctor2Skill.save(new_doctor2skill_1_2)
        new_userrole2 = UserRole(new_user_2.id, RoleId.Doctor)
        UserRole.save(new_userrole2)

        new_user_3 = User('張勁鬆',"33333333333", "123456")
        new_user_3.email = "[email protected]"
        new_user_3.phone = "33333333333"
        new_user_3.type = UserStatus.doctor
        User.save(new_user_3)

        new_doctor_3 = Doctor(new_user_3.id)
        new_doctor_3.identityPhone = "029-12345567"
        new_doctor_3.username = "張勁鬆"
        new_doctor_3.diagnoseCount = 9
        new_doctor_3.feedbackCount = 4

        new_doctor_3.hospitalId = 1
        new_doctor_3.departmentId = 1
        new_doctor_3.title = "主任醫師"
        new_doctor_3.status = 0
        new_doctor_3.goodFeedbackCount = 3

        Doctor.save(new_doctor_3)
        new_doctor2skill_1_3 = Doctor2Skill(new_doctor_3.id,3)
        Doctor2Skill.save(new_doctor2skill_1_3)
        new_userrole3 = UserRole(new_user_3.id, RoleId.Doctor)
        UserRole.save(new_userrole3)


        dp=DoctorProfile()
        dp.type=DoctorProfileType.Intro
        dp.description='從事影像診斷多年,對普通放射、CT以及血管造影的影像診斷有豐富的經驗,能夠綜合各種診斷手段進行診斷。對磁共振的影像診斷有豐富的經驗,尤其側重神經係統疑難疾病的診斷,采用磁共振波譜等多項先進技術,對神經係統腫瘤,肌萎縮性側索硬化、癲癇以及先天性發育異常、變性疾病等神經係統疾病進行診斷及預後評估,有獨到的診斷特色。與神經外科合作,開展腫瘤術前功能定位定向,確保了手術的安全性以及有效性;與身心科合作,開展了精神疾病診斷及臨床研究工作。'
        dp.userId= new_user_1.id
        DoctorProfile.save(dp)

        dp=DoctorProfile()
        dp.type=DoctorProfileType.Resume
        dp.userId= new_user_1.id
        dp.description='印弘, 西京醫院放射科主任,教授,主任醫師,博士,碩士研究生導師。 畢業於第四軍醫大學。先後在新加坡國立神經科學研究所及美國加州大學舊金山分校作為訪問學者工作。承擔或參加北京市自然科學基金,新加坡國家醫學基金,國家十一五科技支撐項目等多項科研基金,任職期間發表學術論文20餘篇,其中SCI 5篇。'
        DoctorProfile.save(dp)


        dp=DoctorProfile()
        dp.type=DoctorProfileType.Award
        dp.userId= new_user_1.id
        dp.description='擔任國家自然科學基金委主辦雜誌《自然》雜誌以及《實用放射學雜誌》特約審稿專家'
        DoctorProfile.save(dp)


        dp=DoctorProfile()
        dp.type=DoctorProfileType.Other
        dp.userId= new_user_1.id
#.........這裏部分代碼省略.........
開發者ID:LichuanLu,項目名稱:blueberry,代碼行數:103,代碼來源:real_model.py


注:本文中的DoctorSpring.models.User.phone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。