def test_add_skill(self): 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)
def test_add_location(self): new_location_1 = Location("陕西,西安") Skill.save(new_location_1) new_location_2 = Location("陕西,榆林") Skill.save(new_location_2) new_location_3 = Location("陕西,延安") Skill.save(new_location_3) new_location_4 = Location("陕西,宝鸡") Skill.save(new_location_4) new_location_5 = Location("其他") Skill.save(new_location_5)
def test_add_position(self): 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_skill_4 = Position("呼吸纵隔") Skill.save(new_skill_4)
def test_add_department(self): 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_department_4 = Department("肿瘤科") Skill.save(new_department_4)
def test_add_location(self): new_location_1 = Location("陕西,西安") Skill.save(new_location_1) new_location_2 = Location("陕西,汉中") Skill.save(new_location_2) new_location_3 = Location("北京") Skill.save(new_location_3) new_location_4 = Location("四川,成都") Skill.save(new_location_4)
def doctor_list(): result = {} hospitals = Hospital.getAllHospitals(db_session) hospitalsDict = object2dict.objects2dicts(hospitals) result['hospitals'] = hospitalsDict skills = Skill.getSkills() skillsDict = object2dict.objects2dicts(skills) result['skills'] = skillsDict return render_template("doctorList.html", result=result)
def doctor_list(): result = {} hospitals = Hospital.getAllHospitals(db_session) hospitalsDict = object2dict.objects2dicts(hospitals) result['hospitals'] = hospitalsDict skills = Skill.getSkills() skillsDict = object2dict.objects2dicts(skills) result['skills'] = skillsDict result['isdoctorlist'] = True return render_template("doctorList.html", data=result)
def test_add_position(self): 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)
def test_add_location(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)
def test_add_hospital(self): new_hospital_1 = Hospital("西11安西京医院", "地址——西11安西京医院", "描述-西22安西京医院", "11") Skill.save(new_hospital_1) new_hospital_2 = Hospital("西22安西京医院", "地址——西22安西京医院", "描述-西22安西京医院", "22") Skill.save(new_hospital_2) new_hospital_3 = Hospital("西33安西京医院", "地址——西33安西京医院", "描述-西22安西京医院", "33") Skill.save(new_hospital_3)
def test_add_hospital(self): new_hospital_1 = Hospital("西安西京医院", "地址——西安西京医院", "描述-西安西京医院", 1) Skill.save(new_hospital_1) new_hospital_2 = Hospital("榆林市第二医院", "地址——榆林市第二医院", "描述-榆林市第二医院", 2) Skill.save(new_hospital_2) new_hospital_3 = Hospital("榆林市中医医院", "地址——榆林市中医医院", "描述-榆林市中医医院", 2) Skill.save(new_hospital_3) new_hospital_4 = Hospital("榆林市第一医院", "地址——榆林市第一医院", "描述-榆林市第一医院", 2) Skill.save(new_hospital_4) new_hospital_5 = Hospital("榆林市星元医院", "地址——榆林市星元医院", "描述-榆林市星元医院", 2) Skill.save(new_hospital_5) new_hospital_6 = Hospital("榆林市榆阳区人民医院", "地址——榆林市榆阳区人民医院", "描述-榆林市榆阳区人民医院", 2) Skill.save(new_hospital_6) new_hospital_7 = Hospital("其他", "地址——其他", "描述-其他", 5) Skill.save(new_hospital_7)
def test_add_hospital(self): new_hospital_1 = Hospital("西安西京医院", "地址——西安西京医院", "描述-西安西京医院", 1) Skill.save(new_hospital_1)
def test_add_skill(self): 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_4 = Skill("内分泌科") Skill.save(new_skill_4)
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 = "*****@*****.**" 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 = "*****@*****.**" 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 = "*****@*****.**" 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 Doctor.save(new_doctor_3) new_doctor2skill_3_1 = Doctor2Skill(new_doctor_3.id, new_skill_1.id) Doctor2Skill.save(new_doctor2skill_3_1) new_doctor2skill_3_2 = Doctor2Skill(new_doctor_3.id, new_skill_2.id) Doctor2Skill.save(new_doctor2skill_3_2) new_userrole = UserRole(new_user_3.id, RoleId.Doctor) UserRole.save(new_userrole) new_user_1 = User("18511114676", "123456") new_user_1.email = "*****@*****.**" new_user_1.phone = "18511234676" new_user_1.type = UserStatus.doctor User.save(new_user_1) new_doctor_1 = Doctor(new_user_1.id) new_doctor_1.identityPhone = "020-12345567" new_doctor_1.username = "******" new_doctor_1.diagnoseCount = 775 new_doctor_1.feedbackCount = 788 new_doctor_1.hospitalId = new_hospital.id new_doctor_1.departmentId = new_department_1.id new_doctor_1.title = "副主任医师2" 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_1 = User("18511114676", "123456") new_user_1.email = "*****@*****.**" new_user_1.phone = "18511234676" new_user_1.type = UserStatus.doctor User.save(new_user_1) new_doctor_1 = Doctor(new_user_1.id) new_doctor_1.identityPhone = "020-12345567" new_doctor_1.username = "******" new_doctor_1.diagnoseCount = 775 new_doctor_1.feedbackCount = 788 new_doctor_1.hospitalId = new_hospital.id new_doctor_1.departmentId = new_department_1.id new_doctor_1.title = "副主任医师2" 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_1 = User("18511114676", "123456") new_user_1.email = "*****@*****.**" new_user_1.phone = "18511234676" new_user_1.type = UserStatus.doctor User.save(new_user_1) new_doctor_1 = Doctor(new_user_1.id) new_doctor_1.identityPhone = "020-12345567" new_doctor_1.username = "******" new_doctor_1.diagnoseCount = 775 new_doctor_1.feedbackCount = 788 new_doctor_1.hospitalId = new_hospital.id new_doctor_1.departmentId = new_department_1.id new_doctor_1.title = "副主任医师2" 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_1 = User("18511114676", "123456") new_user_1.email = "*****@*****.**" new_user_1.phone = "18511234676" new_user_1.type = UserStatus.doctor User.save(new_user_1) new_doctor_1 = Doctor(new_user_1.id) new_doctor_1.identityPhone = "020-12345567" new_doctor_1.username = "******" new_doctor_1.diagnoseCount = 775 new_doctor_1.feedbackCount = 788 new_doctor_1.hospitalId = new_hospital.id new_doctor_1.departmentId = new_department_1.id new_doctor_1.title = "副主任医师2" 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_1 = User("18511114676", "123456") new_user_1.email = "*****@*****.**" new_user_1.phone = "18511234676" new_user_1.type = UserStatus.doctor User.save(new_user_1) new_doctor_1 = Doctor(new_user_1.id) new_doctor_1.identityPhone = "020-12345567" new_doctor_1.username = "******" new_doctor_1.diagnoseCount = 775 new_doctor_1.feedbackCount = 788 new_doctor_1.hospitalId = new_hospital.id new_doctor_1.departmentId = new_department_1.id new_doctor_1.title = "副主任医师2" 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)
def getAllSkillList(): skills=Skill.getSkills() skillsDict=dataChangeService.getAllSkills(skills) result=rs.ResultStatus(rs.SUCCESS.status,rs.SUCCESS.msg,skillsDict) return json.dumps(result.__dict__,ensure_ascii=False)
def getAllSkillList(): skills = Skill.getSkills() skillsDict = dataChangeService.getAllSkills(skills) result = rs.ResultStatus(rs.SUCCESS.status, rs.SUCCESS.msg, skillsDict) return json.dumps(result.__dict__, ensure_ascii=False)