├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── LICENSE ├── README.md ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── edu │ │ └── neu │ │ └── hoso │ │ ├── HosoApplication.java │ │ ├── config │ │ └── RedisCacheConfig.java │ │ ├── controller │ │ ├── CalculationTypeController.java │ │ ├── DayCalculateController.java │ │ ├── DepartmentController.java │ │ ├── DiseaseController.java │ │ ├── DiseaseFolderController.java │ │ ├── DiseaseTypeController.java │ │ ├── DispensingController.java │ │ ├── DoctorCommonController.java │ │ ├── DoctorExaminationController.java │ │ ├── DoctorFinalDiagnosisController.java │ │ ├── DoctorHerbalPrescriptionController.java │ │ ├── DoctorMedicalRecordHomePageController.java │ │ ├── DoctorPatentPrescriptionController.java │ │ ├── DoctorTreatmentController.java │ │ ├── DrugController.java │ │ ├── ExpenseTypeController.java │ │ ├── FmedicalItemsController.java │ │ ├── LoginController.java │ │ ├── RedisController.java │ │ ├── RegistrationController.java │ │ ├── RegistrationLevelController.java │ │ ├── SchedulingController.java │ │ ├── TechController.java │ │ ├── TestController.java │ │ ├── UserController.java │ │ └── WorkloadController.java │ │ ├── converter │ │ ├── DateConverter.java │ │ └── WorkloadsConverter.java │ │ ├── dto │ │ ├── LoginResult.java │ │ └── ResultDTO.java │ │ ├── example │ │ ├── CalculationTypeExample.java │ │ ├── CommonlyUsedDiagnosisExample.java │ │ ├── CommonlyUsedDrugsExample.java │ │ ├── CommonlyUsedFmedicalExample.java │ │ ├── ConstantItemsExample.java │ │ ├── ConstantTypeExample.java │ │ ├── DayCalExample.java │ │ ├── DepartmentExample.java │ │ ├── DiagnosisExample.java │ │ ├── DiagnosisTemplateExample.java │ │ ├── DiseaseExample.java │ │ ├── DiseaseFolderExample.java │ │ ├── DiseaseTypeExample.java │ │ ├── DrugsExample.java │ │ ├── ExaminationDrugsItemsExample.java │ │ ├── ExaminationExample.java │ │ ├── ExaminationFmedicalItemsExample.java │ │ ├── ExaminationResultExample.java │ │ ├── ExaminationResultImageExample.java │ │ ├── ExpenseItemsExample.java │ │ ├── ExpenseTypeExample.java │ │ ├── FmedicalItemsExample.java │ │ ├── FunctionExample.java │ │ ├── GroupExaminationDrugsItemsExample.java │ │ ├── GroupExaminationExample.java │ │ ├── GroupExaminationFmedicalItemsExample.java │ │ ├── GroupPrescriptionExample.java │ │ ├── GroupPrescriptionItemsExample.java │ │ ├── GroupTreatmentExample.java │ │ ├── GroupTreatmentItemsExample.java │ │ ├── InvoiceExample.java │ │ ├── MedicalRecordExample.java │ │ ├── MedicalRecordHomePageExample.java │ │ ├── MedicalRecordHomePageTemplateExample.java │ │ ├── PatientExample.java │ │ ├── PrescriptionExample.java │ │ ├── PrescriptionItemsExample.java │ │ ├── RegistrationExample.java │ │ ├── RegistrationLevelExample.java │ │ ├── RoleExample.java │ │ ├── SchedulingInfoExample.java │ │ ├── SchedulingRuleExample.java │ │ ├── TreatmentExample.java │ │ ├── TreatmentItemsExample.java │ │ └── UserExample.java │ │ ├── model │ │ ├── CalculationType.java │ │ ├── CalculationTypeMapper.java │ │ ├── CommonlyUsedDiagnosis.java │ │ ├── CommonlyUsedDiagnosisMapper.java │ │ ├── CommonlyUsedDrugs.java │ │ ├── CommonlyUsedDrugsMapper.java │ │ ├── CommonlyUsedFmedical.java │ │ ├── CommonlyUsedFmedicalMapper.java │ │ ├── ConstantItems.java │ │ ├── ConstantItemsMapper.java │ │ ├── ConstantType.java │ │ ├── ConstantTypeMapper.java │ │ ├── DayCal.java │ │ ├── DayCalMapper.java │ │ ├── Department.java │ │ ├── DepartmentMapper.java │ │ ├── Diagnosis.java │ │ ├── DiagnosisMapper.java │ │ ├── DiagnosisTemplate.java │ │ ├── DiagnosisTemplateMapper.java │ │ ├── Disease.java │ │ ├── DiseaseFolder.java │ │ ├── DiseaseFolderMapper.java │ │ ├── DiseaseMapper.java │ │ ├── DiseaseType.java │ │ ├── DiseaseTypeMapper.java │ │ ├── DispensingDrugsDecoratingClass.java │ │ ├── Drugs.java │ │ ├── DrugsMapper.java │ │ ├── Examination.java │ │ ├── ExaminationDrugsItems.java │ │ ├── ExaminationDrugsItemsMapper.java │ │ ├── ExaminationFmedicalItems.java │ │ ├── ExaminationFmedicalItemsMapper.java │ │ ├── ExaminationMapper.java │ │ ├── ExaminationResult.java │ │ ├── ExaminationResultImage.java │ │ ├── ExaminationResultImageMapper.java │ │ ├── ExaminationResultMapper.java │ │ ├── ExpenseItems.java │ │ ├── ExpenseItemsListWithUserId.java │ │ ├── ExpenseItemsMapper.java │ │ ├── ExpenseType.java │ │ ├── ExpenseTypeMapper.java │ │ ├── FmedicalItems.java │ │ ├── FmedicalItemsMapper.java │ │ ├── Function.java │ │ ├── FunctionMapper.java │ │ ├── GroupExamination.java │ │ ├── GroupExaminationDrugsItems.java │ │ ├── GroupExaminationDrugsItemsMapper.java │ │ ├── GroupExaminationFmedicalItems.java │ │ ├── GroupExaminationFmedicalItemsMapper.java │ │ ├── GroupExaminationMapper.java │ │ ├── GroupPrescription.java │ │ ├── GroupPrescriptionItems.java │ │ ├── GroupPrescriptionItemsMapper.java │ │ ├── GroupPrescriptionMapper.java │ │ ├── GroupTreatment.java │ │ ├── GroupTreatmentItems.java │ │ ├── GroupTreatmentItemsMapper.java │ │ ├── GroupTreatmentMapper.java │ │ ├── Invoice.java │ │ ├── InvoiceMapper.java │ │ ├── MedicalRecord.java │ │ ├── MedicalRecordHomePage.java │ │ ├── MedicalRecordHomePageMapper.java │ │ ├── MedicalRecordHomePageTemplate.java │ │ ├── MedicalRecordHomePageTemplateMapper.java │ │ ├── MedicalRecordMapper.java │ │ ├── Patient.java │ │ ├── PatientMapper.java │ │ ├── Prescription.java │ │ ├── PrescriptionItems.java │ │ ├── PrescriptionItemsMapper.java │ │ ├── PrescriptionMapper.java │ │ ├── Registration.java │ │ ├── RegistrationLevel.java │ │ ├── RegistrationLevelMapper.java │ │ ├── RegistrationMapper.java │ │ ├── Role.java │ │ ├── RoleMapper.java │ │ ├── SchedulingInfo.java │ │ ├── SchedulingInfoMapper.java │ │ ├── SchedulingRule.java │ │ ├── SchedulingRuleMapper.java │ │ ├── Treatment.java │ │ ├── TreatmentItems.java │ │ ├── TreatmentItemsMapper.java │ │ ├── TreatmentMapper.java │ │ ├── User.java │ │ ├── UserMapper.java │ │ ├── WorkLoadMapper.java │ │ ├── WorkLoadRequest.java │ │ ├── Workload.java │ │ └── WorkloadItem.java │ │ ├── service │ │ ├── CalculationTypeService.java │ │ ├── CommonlyUsedService.java │ │ ├── DayCalculateService.java │ │ ├── DepartmentService.java │ │ ├── DiseaseFolderService.java │ │ ├── DiseaseService.java │ │ ├── DiseaseTypeService.java │ │ ├── DispensingService.java │ │ ├── DoctorExaminationService.java │ │ ├── DoctorPrescriptionService.java │ │ ├── DoctorRegistrationService.java │ │ ├── DoctorTreatmentService.java │ │ ├── DrugService.java │ │ ├── ExpenseTypeService.java │ │ ├── FmedicalItemsService.java │ │ ├── InfoListService.java │ │ ├── MedicalRecordHomePageService.java │ │ ├── MedicalRecordService.java │ │ ├── PersonalWorkloadService.java │ │ ├── RegistrationLevelService.java │ │ ├── RegistrationService.java │ │ ├── RoleService.java │ │ ├── SchedulingService.java │ │ ├── SerialNumberService.java │ │ ├── TechService.java │ │ ├── UserService.java │ │ └── impl │ │ │ ├── CalculationTypeServiceImpl.java │ │ │ ├── CommonlyUsedServiceImpl.java │ │ │ ├── DayCalculateServiceImpl.java │ │ │ ├── DepartmentServiceImpl.java │ │ │ ├── DiseaseFolderServiceImpl.java │ │ │ ├── DiseaseServiceImpl.java │ │ │ ├── DiseaseTypeServiceImpl.java │ │ │ ├── DispensingServiceImpl.java │ │ │ ├── DoctorExaminationServiceImpl.java │ │ │ ├── DoctorPrescriptionServiceImpl.java │ │ │ ├── DoctorRegistrationServiceImpl.java │ │ │ ├── DoctorTreatmentServiceImpl.java │ │ │ ├── DrugServiceImpl.java │ │ │ ├── ExpenseTypeServiceImpl.java │ │ │ ├── FmedicalItemsServiceImpl.java │ │ │ ├── InfoListServiceImpl.java │ │ │ ├── MedicalRecordHomePageServiceImpl.java │ │ │ ├── MedicalRecordServiceImpl.java │ │ │ ├── PersonalWorkloadServiceImpl.java │ │ │ ├── RegistrationLevelServiceImpl.java │ │ │ ├── RegistrationServiceImpl.java │ │ │ ├── RoleImpl.java │ │ │ ├── SchedulingServiceImpl.java │ │ │ ├── SerialNumberServiceImpl.java │ │ │ ├── TechServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ └── utils │ │ ├── JsonUtils.java │ │ └── RedisUtils.java └── resources │ ├── ValidationMessages.properties │ ├── application.yml │ └── mapper │ ├── CalculationTypeMapper.xml │ ├── CommonlyUsedDiagnosisMapper.xml │ ├── CommonlyUsedDrugsMapper.xml │ ├── CommonlyUsedFmedicalMapper.xml │ ├── ConstantItemsMapper.xml │ ├── ConstantTypeMapper.xml │ ├── DayCalMapper.xml │ ├── DepartmentMapper.xml │ ├── DiagnosisMapper.xml │ ├── DiagnosisTemplateMapper.xml │ ├── DiseaseFolderMapper.xml │ ├── DiseaseMapper.xml │ ├── DiseaseTypeMapper.xml │ ├── DrugsMapper.xml │ ├── ExaminationDrugsItemsMapper.xml │ ├── ExaminationFmedicalItemsMapper.xml │ ├── ExaminationMapper.xml │ ├── ExaminationResultImageMapper.xml │ ├── ExaminationResultMapper.xml │ ├── ExpenseItemsMapper.xml │ ├── ExpenseTypeMapper.xml │ ├── FmedicalItemsMapper.xml │ ├── FunctionMapper.xml │ ├── GroupExaminationDrugsItemsMapper.xml │ ├── GroupExaminationFmedicalItemsMapper.xml │ ├── GroupExaminationMapper.xml │ ├── GroupPrescriptionItemsMapper.xml │ ├── GroupPrescriptionMapper.xml │ ├── GroupTreatmentItemsMapper.xml │ ├── GroupTreatmentMapper.xml │ ├── InvoiceMapper.xml │ ├── MedicalRecordHomePageMapper.xml │ ├── MedicalRecordHomePageTemplateMapper.xml │ ├── MedicalRecordMapper.xml │ ├── PatientMapper.xml │ ├── PrescriptionItemsMapper.xml │ ├── PrescriptionMapper.xml │ ├── RegistrationLevelMapper.xml │ ├── RegistrationMapper.xml │ ├── RoleMapper.xml │ ├── SchedulingInfoMapper.xml │ ├── SchedulingRuleMapper.xml │ ├── TreatmentItemsMapper.xml │ ├── TreatmentMapper.xml │ ├── UserMapper.xml │ └── WorkLoadMapper.xml └── test └── java └── edu └── neu └── hoso ├── HosoApplicationTests.java └── controller └── TechControllerTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | .yml 31 | 32 | .properties 33 | 34 | ### local ### 35 | application-dev.yml 36 | db.properties 37 | generatorConfig.xml 38 | .yml -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosoneu/his/77f0460e8bb9526cfbfe5c4a84b032946f54ca01/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 hosoneu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # his 2 | 3 | ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/hosoneu/his) 4 | ![GitHub](https://img.shields.io/github/license/hosoneu/his) 5 | [![HitCount](http://hits.dwyl.com/hosoneu/his.svg)](http://hits.dwyl.com/hosoneu/his) 6 | ![GitHub last commit](https://img.shields.io/github/last-commit/hosoneu/his) 7 | 8 | Hospital Information System(HIS, 医疗管理系统) 9 | 10 | HIS系统的主要功能按照数据流量、流向及处理过程分为临床诊疗、药品管理、经济管理、综合管理与统计分析等。 11 | 12 | 🐏哥真的很厉害啊 13 | 14 | 第二名开发者也觉得阳哥很厉害 15 | 16 | 第三名开发者也觉得阳哥很厉害 17 | 18 | 第四名开发者也觉得🐏哥很厉害 19 | 20 | 第五名开发者也觉得秋阳很厉害 21 | 22 | 第六名开发者昧着良心觉得阳哥很厉害 23 | 24 | 第七名alan同学也昧着良心进来了,而且觉得很棒 25 | 26 | 第八名Viola同学终于进来了啊啊啊啊 27 | 28 | 第九名Mike同学殿后 29 | 30 | 第五名开发者29-y同学又来了 31 | 32 | --- 33 | 34 | 项目所需Bean、Mapper已通过Mybatis生成,可以开始开发。 35 | 36 | TestController、RedisController均为测试使用 37 | 38 | 如TestController中所示,经测试,可成功添加删除记录。 39 | 40 | 如RedisController中所示,经测试,可成功取出缓存内容。 41 | 42 | 43 | 44 | 由于数据库修改 已重新生成对应model、mapper 45 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.5.RELEASE 9 | 10 | 11 | edu.neu 12 | hoso 13 | 0.0.1-SNAPSHOT 14 | hoso 15 | jar 16 | Demo project for Spring Boot 17 | 18 | 19 | 1.8 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | org.mybatis.spring.boot 29 | mybatis-spring-boot-starter 30 | 2.0.1 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-cache 35 | 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-data-redis 40 | 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-devtools 45 | runtime 46 | true 47 | 48 | 49 | mysql 50 | mysql-connector-java 51 | runtime 52 | 53 | 54 | mysql 55 | mysql-connector-java 56 | runtime 57 | 58 | 59 | 60 | org.projectlombok 61 | lombok 62 | true 63 | 64 | 65 | org.springframework.boot 66 | spring-boot-starter-test 67 | test 68 | 69 | 70 | 71 | com.alibaba 72 | fastjson 73 | 1.2.54 74 | 75 | 76 | 77 | 78 | 79 | org.springframework.boot 80 | spring-boot-maven-plugin 81 | 82 | 83 | true 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/HosoApplication.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 7 | 8 | @SpringBootApplication 9 | @MapperScan("edu.neu.hoso.model") 10 | public class HosoApplication { 11 | 12 | public static void main(String[] args) { 13 | SpringApplication.run(HosoApplication.class, args); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/config/RedisCacheConfig.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.config; 2 | 3 | import org.springframework.cache.CacheManager; 4 | import org.springframework.cache.annotation.CachingConfigurerSupport; 5 | import org.springframework.cache.annotation.EnableCaching; 6 | import org.springframework.cache.interceptor.KeyGenerator; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.data.redis.cache.RedisCacheConfiguration; 10 | import org.springframework.data.redis.cache.RedisCacheManager; 11 | import org.springframework.data.redis.cache.RedisCacheWriter; 12 | import org.springframework.data.redis.connection.RedisConnectionFactory; 13 | import org.springframework.data.redis.core.RedisTemplate; 14 | 15 | import java.lang.reflect.Method; 16 | 17 | @Configuration 18 | @EnableCaching 19 | public class RedisCacheConfig extends CachingConfigurerSupport { 20 | @Bean 21 | public KeyGenerator KeyGenerator() { 22 | return new KeyGenerator() { 23 | @Override 24 | public Object generate(Object target, Method method, Object... params) { 25 | StringBuilder sb = new StringBuilder(); 26 | sb.append(target.getClass().getName()); 27 | sb.append(method.getName()); 28 | for (Object obj : params) { 29 | sb.append(obj.toString()); 30 | } 31 | return sb.toString(); 32 | } 33 | }; 34 | } 35 | 36 | // RedisTemplate 对 RedisConnection 进行了封装。提供连接管理,序列化等功能,它对 Redis 的交互进行了更高层次的抽象,极大的方便和简化了 Redis 的操作 37 | @Bean 38 | public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) { 39 | RedisTemplate redisTemplate = new RedisTemplate(); 40 | redisTemplate.setConnectionFactory(redisConnectionFactory); 41 | return redisTemplate; 42 | } 43 | 44 | // RedisCacheManager 作为 redis 统一的调度和管理者 45 | @Bean 46 | public CacheManager cacheManager(RedisConnectionFactory connectionFactory) { 47 | RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(connectionFactory); 48 | RedisCacheConfiguration defaultCacheConfig = RedisCacheConfiguration.defaultCacheConfig(); 49 | RedisCacheManager cacheManager = new RedisCacheManager(redisCacheWriter, defaultCacheConfig); 50 | return cacheManager; 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/controller/DoctorFinalDiagnosisController.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.controller; 2 | 3 | import edu.neu.hoso.dto.ResultDTO; 4 | import edu.neu.hoso.model.Diagnosis; 5 | import edu.neu.hoso.model.MedicalRecordMapper; 6 | import edu.neu.hoso.service.MedicalRecordHomePageService; 7 | import edu.neu.hoso.service.MedicalRecordService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.CrossOrigin; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import java.util.List; 15 | 16 | /** 17 | * @title: DoctorFinalDiagnosisController 18 | * @package edu.neu.hoso.controller 19 | * @description: 门诊医生用户确诊的控制类 20 | * @author: 29-y 21 | * @date: 2019-06-17 17:38 22 | * @version: V1.0 23 | */ 24 | @RequestMapping("doctor/diagnosis") 25 | @RestController 26 | @CrossOrigin 27 | public class DoctorFinalDiagnosisController { 28 | // 确诊 录入终诊信息 29 | @Autowired 30 | MedicalRecordHomePageService medicalRecordHomePageService; 31 | @Autowired 32 | MedicalRecordService medicalRecordService; 33 | 34 | //列出终诊诊信息 35 | @RequestMapping("/listFinalDiagnosisByMedicalRecordId") 36 | public ResultDTO> listFinalDiagnosisByMedicalRecordId(Integer medicalRecordId){ 37 | ResultDTO> resultDTO = new ResultDTO<>(); 38 | try { 39 | resultDTO.setData(medicalRecordHomePageService.listFinalDiagnosisByMedicalRecordId(medicalRecordId)); 40 | resultDTO.setStatus("OK"); 41 | resultDTO.setMsg("终诊信息查询成功!"); 42 | } catch (Exception e) { 43 | e.printStackTrace(); 44 | resultDTO.setStatus("ERROR"); 45 | resultDTO.setMsg("终诊信息查询失败!"); 46 | } 47 | return resultDTO; 48 | } 49 | 50 | 51 | @RequestMapping("/insertFinalDiagnosis") 52 | public ResultDTO insertFinalDiagnosis(@RequestBody List diagnosisList){ 53 | ResultDTO resultDTO = new ResultDTO<>(); 54 | try { 55 | resultDTO.setData(medicalRecordHomePageService.insertFinalDiagnosis(diagnosisList)); 56 | resultDTO.setStatus("OK"); 57 | resultDTO.setMsg("终诊信息录入成功!"); 58 | } catch (Exception e) { 59 | e.printStackTrace(); 60 | resultDTO.setStatus("ERROR"); 61 | resultDTO.setMsg("终诊信息录入失败!"); 62 | } 63 | return resultDTO; 64 | } 65 | 66 | // 确诊 录入辅助检查结果 67 | @RequestMapping("/insertAssistantExamination") 68 | public ResultDTO insertAssistantExamination(String assistantExamination,Integer medicalRecordId){ 69 | ResultDTO resultDTO = new ResultDTO<>(); 70 | try { 71 | medicalRecordHomePageService.insertAssistantExamination(assistantExamination,medicalRecordId); 72 | resultDTO.setStatus("OK"); 73 | resultDTO.setMsg("辅助检查结果录入成功!"); 74 | } catch (Exception e) { 75 | e.printStackTrace(); 76 | resultDTO.setStatus("ERROR"); 77 | resultDTO.setMsg("辅助检查结果录入失败!"); 78 | } 79 | return resultDTO; 80 | } 81 | // 诊毕 82 | @RequestMapping("/treatmentOver") 83 | public ResultDTO treatmentOver(Integer medicalRecordId){ 84 | ResultDTO resultDTO = new ResultDTO<>(); 85 | try { 86 | medicalRecordService.treamentOver(medicalRecordId); 87 | resultDTO.setStatus("OK"); 88 | resultDTO.setMsg("诊毕成功!"); 89 | } catch (Exception e) { 90 | e.printStackTrace(); 91 | resultDTO.setStatus("ERROR"); 92 | resultDTO.setMsg("诊毕失败!"); 93 | } 94 | return resultDTO; 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.controller; 2 | 3 | import edu.neu.hoso.dto.LoginResult; 4 | import edu.neu.hoso.dto.ResultDTO; 5 | import edu.neu.hoso.model.Department; 6 | import edu.neu.hoso.model.Role; 7 | import edu.neu.hoso.model.User; 8 | import edu.neu.hoso.service.DepartmentService; 9 | import edu.neu.hoso.service.RoleService; 10 | import edu.neu.hoso.service.UserService; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.CrossOrigin; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import java.util.List; 17 | 18 | @CrossOrigin 19 | @RestController 20 | @RequestMapping("login") 21 | public class LoginController { 22 | @Autowired 23 | UserService userService; 24 | @Autowired 25 | DepartmentService departmentService; 26 | @Autowired 27 | RoleService roleService; 28 | @RequestMapping("/LoginUser") 29 | public ResultDTO findUser(String userLoginName,String password){ 30 | ResultDTO result = new ResultDTO<>(); 31 | List users=userService.getUserByLoginname(userLoginName); 32 | if (users.size()==0){ 33 | result.setStatus("Error"); 34 | result.setMsg("用户名或密码错误"); 35 | return result; 36 | } 37 | for (User user:users){ 38 | if(user.getUserPassword().equals(password)){ 39 | Department department=departmentService.getDepartmentById(user.getDepartmentId()); 40 | Role role = roleService.findRoleByID(user.getRoleId()); 41 | System.out.println("role:"+role.getRoleName()); 42 | System.out.println("department"+department.getDepartmentName()); 43 | System.out.println(role.getRoleId()); 44 | LoginResult loginResult = new LoginResult(user,department,role); 45 | result.setData(loginResult); 46 | result.setStatus("OK"); 47 | result.setMsg("请求成功"); 48 | return result; 49 | } 50 | } 51 | result.setStatus("Error"); 52 | result.setMsg("用户名或密码错误"); 53 | return result; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/controller/RedisController.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.controller; 2 | 3 | 4 | import edu.neu.hoso.utils.RedisUtils; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.redis.core.RedisTemplate; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import javax.annotation.Resource; 11 | 12 | //Redis 测试 13 | @RestController 14 | public class RedisController { 15 | @Resource 16 | private RedisTemplate redisTemplate; 17 | @Resource 18 | private RedisUtils redisUtils; 19 | 20 | @RequestMapping("/redis") 21 | public void t1() { 22 | // Role role = (Role) redisTemplate.opsForValue().get("role_1"); 23 | String key = "alan"; 24 | redisUtils.set(key, "handsome"); 25 | String result = (String)redisUtils.get(key); 26 | System.out.println(result); 27 | 28 | String str = redisTemplate.opsForValue().get(key).toString(); 29 | 30 | System.out.println(str); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.controller; 2 | 3 | import edu.neu.hoso.example.DepartmentExample; 4 | import edu.neu.hoso.model.Department; 5 | import edu.neu.hoso.model.DepartmentMapper; 6 | import org.mybatis.spring.annotation.MapperScan; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | //SpringBoot 测试 12 | @RestController 13 | public class TestController { 14 | //不知为何报错,但运行正常 15 | @Autowired 16 | DepartmentMapper departmentMapper; 17 | 18 | @RequestMapping("/test") 19 | public String index(){ 20 | return ("hello"); 21 | } 22 | @RequestMapping("/insert") 23 | public String insert(){ 24 | Department department = new Department(); 25 | department.setDepartmentName("测试插入自增ID"); 26 | department.setDepartmentCode("mike"); 27 | department.setDepartmentType("1"); 28 | department.setDepartmentCategoryId(1); 29 | departmentMapper.insert(department); 30 | return ("insert success!"); 31 | } 32 | @RequestMapping("/delete") 33 | public String delete(){ 34 | DepartmentExample example = new DepartmentExample(); 35 | DepartmentExample.Criteria criteria = example.createCriteria(); 36 | criteria.andDepartmentCodeEqualTo("mike"); 37 | departmentMapper.deleteByExample(example); 38 | //相当于:delete from department where department_code='mike' 39 | return ("delete success!"); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/converter/DateConverter.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.converter; 2 | 3 | import org.springframework.core.convert.converter.Converter; 4 | import org.springframework.stereotype.Component; 5 | 6 | import java.text.ParseException; 7 | import java.text.SimpleDateFormat; 8 | import java.util.Date; 9 | 10 | @Component 11 | public class DateConverter implements Converter { 12 | @Override 13 | public Date convert(String s) { 14 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); 15 | Date date = null; 16 | try { 17 | date = simpleDateFormat.parse(s); 18 | } catch (ParseException e) { 19 | e.printStackTrace(); 20 | } 21 | return date; 22 | } 23 | public String convert(Date date){ 24 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); 25 | String s = null; 26 | s = simpleDateFormat.format(date); 27 | return s; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/converter/WorkloadsConverter.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.converter; 2 | 3 | import edu.neu.hoso.model.Workload; 4 | import edu.neu.hoso.model.WorkloadItem; 5 | import org.springframework.stereotype.Component; 6 | 7 | import java.util.List; 8 | 9 | @Component 10 | public class WorkloadsConverter { 11 | public WorkloadItem convert(List workloads) { 12 | WorkloadItem workloadItem = new WorkloadItem(); 13 | 14 | 15 | for (Workload workload : workloads) { 16 | switch (workload.getExpense_Type_Name()) { 17 | case "挂号费": 18 | workloadItem.setGHF(workload.getCosts()); 19 | break; 20 | case "诊疗费": 21 | workloadItem.setZLF(workload.getCosts()); 22 | break; 23 | case "检验费": 24 | workloadItem.setJYF(workload.getCosts()); 25 | break; 26 | case "检验材料费": 27 | workloadItem.setJYCLF(workload.getCosts()); 28 | break; 29 | case "超声检查费": 30 | workloadItem.setCSJCF(workload.getCosts()); 31 | break; 32 | case "超声材料费": 33 | workloadItem.setCSCLF(workload.getCosts()); 34 | break; 35 | case "放射检查费": 36 | workloadItem.setFSJCF(workload.getCosts()); 37 | break; 38 | case "放射材料费": 39 | workloadItem.setFSCLF(workload.getCosts()); 40 | break; 41 | case "MRI检查费": 42 | workloadItem.setMRIJCF(workload.getCosts()); 43 | break; 44 | case "MRI材料费": 45 | workloadItem.setMRICLF(workload.getCosts()); 46 | break; 47 | case "CT检查费": 48 | workloadItem.setCTJCF(workload.getCosts()); 49 | break; 50 | case "CT材料费": 51 | workloadItem.setCTCLF(workload.getCosts()); 52 | break; 53 | case "西药费": 54 | workloadItem.setXYF(workload.getCosts()); 55 | break; 56 | case "中成药费": 57 | workloadItem.setZCPYF(workload.getCosts()); 58 | break; 59 | case "中草药费": 60 | workloadItem.setZCYF(workload.getCosts()); 61 | break; 62 | case "处置费": 63 | workloadItem.setCZF(workload.getCosts()); 64 | break; 65 | case "处置材料费": 66 | workloadItem.setCZCLF(workload.getCosts()); 67 | break; 68 | case "麻醉费": 69 | workloadItem.setMZF(workload.getCosts()); 70 | break; 71 | case "麻醉药费": 72 | workloadItem.setMZYF(workload.getCosts()); 73 | break; 74 | case "门诊手术费": 75 | workloadItem.setMZSSF(workload.getCosts()); 76 | break; 77 | default: 78 | workloadItem.setQT(workload.getCosts());//其他 79 | } 80 | 81 | 82 | } 83 | return workloadItem; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/dto/LoginResult.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.dto; 2 | 3 | import edu.neu.hoso.model.Department; 4 | import edu.neu.hoso.model.Role; 5 | import edu.neu.hoso.model.User; 6 | 7 | public class LoginResult { 8 | private User user; 9 | private Department department; 10 | private Role role; 11 | 12 | public LoginResult(User user, Department department, Role role) { 13 | this.user = user; 14 | this.department = department; 15 | this.role = role; 16 | } 17 | 18 | 19 | public User getUser() { 20 | return user; 21 | } 22 | 23 | public void setUser(User user) { 24 | this.user = user; 25 | } 26 | 27 | public Department getDepartment() { 28 | return department; 29 | } 30 | 31 | public void setDepartment(Department department) { 32 | this.department = department; 33 | } 34 | 35 | public Role getRole() { 36 | return role; 37 | } 38 | 39 | public void setRole(Role role) { 40 | this.role = role; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/dto/ResultDTO.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.dto; 2 | 3 | public class ResultDTO { 4 | private String status; 5 | private String msg; 6 | private T data; 7 | 8 | public T getData() { 9 | return data; 10 | } 11 | 12 | public void setData(T data) { 13 | this.data = data; 14 | } 15 | 16 | public String getStatus() { 17 | return status; 18 | } 19 | 20 | public void setStatus(String status) { 21 | this.status = status; 22 | } 23 | 24 | public String getMsg() { 25 | return msg; 26 | } 27 | 28 | public void setMsg(String msg) { 29 | this.msg = msg; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "ResultDTO{" + 35 | "status='" + status + '\'' + 36 | ", msg='" + msg + '\'' + 37 | ", data=" + data + 38 | '}'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/CalculationType.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class CalculationType { 4 | private Integer calculationTypeId; 5 | 6 | private String calculationTypeName; 7 | 8 | public CalculationType(Integer calculationTypeId, String calculationTypeName) { 9 | this.calculationTypeId = calculationTypeId; 10 | this.calculationTypeName = calculationTypeName; 11 | } 12 | 13 | public CalculationType() { 14 | super(); 15 | } 16 | 17 | public Integer getCalculationTypeId() { 18 | return calculationTypeId; 19 | } 20 | 21 | public void setCalculationTypeId(Integer calculationTypeId) { 22 | this.calculationTypeId = calculationTypeId; 23 | } 24 | 25 | public String getCalculationTypeName() { 26 | return calculationTypeName; 27 | } 28 | 29 | public void setCalculationTypeName(String calculationTypeName) { 30 | this.calculationTypeName = calculationTypeName == null ? null : calculationTypeName.trim(); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/CalculationTypeMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.CalculationTypeExample; 4 | 5 | import java.sql.Time; 6 | import java.util.List; 7 | import org.apache.ibatis.annotations.Delete; 8 | import org.apache.ibatis.annotations.Insert; 9 | import org.apache.ibatis.annotations.Param; 10 | import org.apache.ibatis.annotations.ResultMap; 11 | import org.apache.ibatis.annotations.Select; 12 | import org.apache.ibatis.annotations.SelectKey; 13 | import org.apache.ibatis.annotations.Update; 14 | 15 | import javax.xml.crypto.Data; 16 | 17 | public interface CalculationTypeMapper { 18 | int countByExample(CalculationTypeExample example); 19 | 20 | int deleteByExample(CalculationTypeExample example); 21 | 22 | @Delete({ 23 | "delete from calculation_type", 24 | "where Calculation_Type_ID = #{calculationTypeId,jdbcType=INTEGER}" 25 | }) 26 | int deleteByPrimaryKey(Integer calculationTypeId); 27 | 28 | @Insert({ 29 | "insert into calculation_type (Calculation_Type_Name)", 30 | "values (#{calculationTypeName,jdbcType=VARCHAR})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="calculationTypeId", before=false, resultType=Integer.class) 33 | int insert(CalculationType record); 34 | 35 | int insertSelective(CalculationType record); 36 | 37 | List selectByExample(CalculationTypeExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Calculation_Type_ID, Calculation_Type_Name", 42 | "from calculation_type", 43 | "where Calculation_Type_ID = #{calculationTypeId,jdbcType=INTEGER}" 44 | }) 45 | @ResultMap("BaseResultMap") 46 | CalculationType selectByPrimaryKey(Integer calculationTypeId); 47 | 48 | int updateByExampleSelective(@Param("record") CalculationType record, @Param("example") CalculationTypeExample example); 49 | 50 | int updateByExample(@Param("record") CalculationType record, @Param("example") CalculationTypeExample example); 51 | 52 | int updateByPrimaryKeySelective(CalculationType record); 53 | 54 | @Update({ 55 | "update calculation_type", 56 | "set Calculation_Type_Name = #{calculationTypeName,jdbcType=VARCHAR}", 57 | "where Calculation_Type_ID = #{calculationTypeId,jdbcType=INTEGER}" 58 | }) 59 | int updateByPrimaryKey(CalculationType record); 60 | 61 | Time get(); 62 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/CommonlyUsedDiagnosis.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class CommonlyUsedDiagnosis { 4 | private Integer commonlyUsedDiagnosisId; 5 | 6 | private Integer doctorId; 7 | 8 | private Integer diseaseId; 9 | 10 | private Disease disease; 11 | 12 | public CommonlyUsedDiagnosis(Integer commonlyUsedDiagnosisId, Integer doctorId, Integer diseaseId) { 13 | this.commonlyUsedDiagnosisId = commonlyUsedDiagnosisId; 14 | this.doctorId = doctorId; 15 | this.diseaseId = diseaseId; 16 | } 17 | 18 | public CommonlyUsedDiagnosis(Integer commonlyUsedDiagnosisId, Integer doctorId, Integer diseaseId, Disease disease) { 19 | this.commonlyUsedDiagnosisId = commonlyUsedDiagnosisId; 20 | this.doctorId = doctorId; 21 | this.diseaseId = diseaseId; 22 | this.disease = disease; 23 | } 24 | 25 | public Disease getDisease() { 26 | return disease; 27 | } 28 | 29 | public void setDisease(Disease disease) { 30 | this.disease = disease; 31 | } 32 | 33 | public CommonlyUsedDiagnosis() { 34 | super(); 35 | } 36 | 37 | public Integer getCommonlyUsedDiagnosisId() { 38 | return commonlyUsedDiagnosisId; 39 | } 40 | 41 | public void setCommonlyUsedDiagnosisId(Integer commonlyUsedDiagnosisId) { 42 | this.commonlyUsedDiagnosisId = commonlyUsedDiagnosisId; 43 | } 44 | 45 | public Integer getDoctorId() { 46 | return doctorId; 47 | } 48 | 49 | public void setDoctorId(Integer doctorId) { 50 | this.doctorId = doctorId; 51 | } 52 | 53 | public Integer getDiseaseId() { 54 | return diseaseId; 55 | } 56 | 57 | public void setDiseaseId(Integer diseaseId) { 58 | this.diseaseId = diseaseId; 59 | } 60 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/CommonlyUsedDrugs.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class CommonlyUsedDrugs { 4 | private Integer commonlyUsedDrugs; 5 | 6 | private Integer doctorId; 7 | 8 | private Integer drugsId; 9 | 10 | /* 对应的药品对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.14*/ 11 | private Drugs drugs; 12 | 13 | public CommonlyUsedDrugs(Integer commonlyUsedDrugs, Integer doctorId, Integer drugsId) { 14 | this.commonlyUsedDrugs = commonlyUsedDrugs; 15 | this.doctorId = doctorId; 16 | this.drugsId = drugsId; 17 | } 18 | 19 | public CommonlyUsedDrugs(Integer commonlyUsedDrugs, Integer doctorId, Integer drugsId, Drugs drugs) { 20 | this.commonlyUsedDrugs = commonlyUsedDrugs; 21 | this.doctorId = doctorId; 22 | this.drugsId = drugsId; 23 | this.drugs = drugs; 24 | } 25 | 26 | public Drugs getDrugs() { 27 | return drugs; 28 | } 29 | 30 | public void setDrugs(Drugs drugs) { 31 | this.drugs = drugs; 32 | } 33 | 34 | public CommonlyUsedDrugs() { 35 | super(); 36 | } 37 | 38 | public Integer getCommonlyUsedDrugs() { 39 | return commonlyUsedDrugs; 40 | } 41 | 42 | public void setCommonlyUsedDrugs(Integer commonlyUsedDrugs) { 43 | this.commonlyUsedDrugs = commonlyUsedDrugs; 44 | } 45 | 46 | public Integer getDoctorId() { 47 | return doctorId; 48 | } 49 | 50 | public void setDoctorId(Integer doctorId) { 51 | this.doctorId = doctorId; 52 | } 53 | 54 | public Integer getDrugsId() { 55 | return drugsId; 56 | } 57 | 58 | public void setDrugsId(Integer drugsId) { 59 | this.drugsId = drugsId; 60 | } 61 | 62 | @Override 63 | public String toString() { 64 | return "CommonlyUsedDrugs{" + 65 | "commonlyUsedDrugs=" + commonlyUsedDrugs + 66 | ", doctorId=" + doctorId + 67 | ", drugsId=" + drugsId + 68 | ", drugs=" + drugs + 69 | '}'; 70 | } 71 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/CommonlyUsedFmedical.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class CommonlyUsedFmedical { 4 | private Integer commonlyUsedFmedicalId; 5 | 6 | private Integer doctorId; 7 | 8 | private Integer fmedicalItemsId; 9 | 10 | /* 对应的非药品对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.14*/ 11 | private FmedicalItems fmedicalItems; 12 | 13 | public CommonlyUsedFmedical(Integer commonlyUsedFmedicalId, Integer doctorId, Integer fmedicalItemsId) { 14 | this.commonlyUsedFmedicalId = commonlyUsedFmedicalId; 15 | this.doctorId = doctorId; 16 | this.fmedicalItemsId = fmedicalItemsId; 17 | } 18 | 19 | 20 | public CommonlyUsedFmedical(Integer commonlyUsedFmedicalId, Integer doctorId, Integer fmedicalItemsId, FmedicalItems fmedicalItems) { 21 | this.commonlyUsedFmedicalId = commonlyUsedFmedicalId; 22 | this.doctorId = doctorId; 23 | this.fmedicalItemsId = fmedicalItemsId; 24 | this.fmedicalItems = fmedicalItems; 25 | } 26 | 27 | public FmedicalItems getFmedicalItems() { 28 | return fmedicalItems; 29 | } 30 | 31 | public void setFmedicalItems(FmedicalItems fmedicalItems) { 32 | this.fmedicalItems = fmedicalItems; 33 | } 34 | 35 | public CommonlyUsedFmedical(Integer doctorId, Integer fmedicalItemsId) { 36 | this.doctorId = doctorId; 37 | this.fmedicalItemsId = fmedicalItemsId; 38 | } 39 | public CommonlyUsedFmedical() { 40 | super(); 41 | } 42 | 43 | public Integer getCommonlyUsedFmedicalId () { 44 | return commonlyUsedFmedicalId; 45 | } 46 | 47 | public void setCommonlyUsedFmedicalId (Integer commonlyUsedFmedicalId){ 48 | this.commonlyUsedFmedicalId = commonlyUsedFmedicalId; 49 | } 50 | 51 | public Integer getDoctorId () { 52 | return doctorId; 53 | } 54 | 55 | public void setDoctorId (Integer doctorId){ 56 | this.doctorId = doctorId; 57 | } 58 | 59 | public Integer getFmedicalItemsId () { 60 | return fmedicalItemsId; 61 | } 62 | 63 | public void setFmedicalItemsId (Integer fmedicalItemsId){ 64 | this.fmedicalItemsId = fmedicalItemsId; 65 | } 66 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ConstantItems.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class ConstantItems { 4 | private Integer constantItemsId; 5 | 6 | private Integer constantTypeId; 7 | 8 | private String constantItemsCode; 9 | 10 | private String constantItemsName; 11 | 12 | public ConstantItems(Integer constantItemsId, Integer constantTypeId, String constantItemsCode, String constantItemsName) { 13 | this.constantItemsId = constantItemsId; 14 | this.constantTypeId = constantTypeId; 15 | this.constantItemsCode = constantItemsCode; 16 | this.constantItemsName = constantItemsName; 17 | } 18 | 19 | public ConstantItems() { 20 | super(); 21 | } 22 | 23 | public Integer getConstantItemsId() { 24 | return constantItemsId; 25 | } 26 | 27 | public void setConstantItemsId(Integer constantItemsId) { 28 | this.constantItemsId = constantItemsId; 29 | } 30 | 31 | public Integer getConstantTypeId() { 32 | return constantTypeId; 33 | } 34 | 35 | public void setConstantTypeId(Integer constantTypeId) { 36 | this.constantTypeId = constantTypeId; 37 | } 38 | 39 | public String getConstantItemsCode() { 40 | return constantItemsCode; 41 | } 42 | 43 | public void setConstantItemsCode(String constantItemsCode) { 44 | this.constantItemsCode = constantItemsCode == null ? null : constantItemsCode.trim(); 45 | } 46 | 47 | public String getConstantItemsName() { 48 | return constantItemsName; 49 | } 50 | 51 | public void setConstantItemsName(String constantItemsName) { 52 | this.constantItemsName = constantItemsName == null ? null : constantItemsName.trim(); 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ConstantItemsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.ConstantItemsExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface ConstantItemsMapper { 14 | int countByExample(ConstantItemsExample example); 15 | 16 | int deleteByExample(ConstantItemsExample example); 17 | 18 | @Delete({ 19 | "delete from constant_items", 20 | "where Constant_Items_ID = #{constantItemsId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer constantItemsId); 23 | 24 | @Insert({ 25 | "insert into constant_items (Constant_Type_ID, Constant_Items_Code, ", 26 | "Constant_Items_Name)", 27 | "values (#{constantTypeId,jdbcType=INTEGER}, #{constantItemsCode,jdbcType=VARCHAR}, ", 28 | "#{constantItemsName,jdbcType=VARCHAR})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="constantItemsId", before=false, resultType=Integer.class) 31 | int insert(ConstantItems record); 32 | 33 | int insertSelective(ConstantItems record); 34 | 35 | List selectByExample(ConstantItemsExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Constant_Items_ID, Constant_Type_ID, Constant_Items_Code, Constant_Items_Name", 40 | "from constant_items", 41 | "where Constant_Items_ID = #{constantItemsId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | ConstantItems selectByPrimaryKey(Integer constantItemsId); 45 | 46 | int updateByExampleSelective(@Param("record") ConstantItems record, @Param("example") ConstantItemsExample example); 47 | 48 | int updateByExample(@Param("record") ConstantItems record, @Param("example") ConstantItemsExample example); 49 | 50 | int updateByPrimaryKeySelective(ConstantItems record); 51 | 52 | @Update({ 53 | "update constant_items", 54 | "set Constant_Type_ID = #{constantTypeId,jdbcType=INTEGER},", 55 | "Constant_Items_Code = #{constantItemsCode,jdbcType=VARCHAR},", 56 | "Constant_Items_Name = #{constantItemsName,jdbcType=VARCHAR}", 57 | "where Constant_Items_ID = #{constantItemsId,jdbcType=INTEGER}" 58 | }) 59 | int updateByPrimaryKey(ConstantItems record); 60 | 61 | List getDrugsDosage(); 62 | 63 | List getDrugsType(); 64 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ConstantType.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class ConstantType { 4 | private Integer constantTypeId; 5 | 6 | private String constantTypeCode; 7 | 8 | private String constantTypeName; 9 | 10 | public ConstantType(Integer constantTypeId, String constantTypeCode, String constantTypeName) { 11 | this.constantTypeId = constantTypeId; 12 | this.constantTypeCode = constantTypeCode; 13 | this.constantTypeName = constantTypeName; 14 | } 15 | 16 | public ConstantType() { 17 | super(); 18 | } 19 | 20 | public Integer getConstantTypeId() { 21 | return constantTypeId; 22 | } 23 | 24 | public void setConstantTypeId(Integer constantTypeId) { 25 | this.constantTypeId = constantTypeId; 26 | } 27 | 28 | public String getConstantTypeCode() { 29 | return constantTypeCode; 30 | } 31 | 32 | public void setConstantTypeCode(String constantTypeCode) { 33 | this.constantTypeCode = constantTypeCode == null ? null : constantTypeCode.trim(); 34 | } 35 | 36 | public String getConstantTypeName() { 37 | return constantTypeName; 38 | } 39 | 40 | public void setConstantTypeName(String constantTypeName) { 41 | this.constantTypeName = constantTypeName == null ? null : constantTypeName.trim(); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ConstantTypeMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.ConstantTypeExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface ConstantTypeMapper { 14 | int countByExample(ConstantTypeExample example); 15 | 16 | int deleteByExample(ConstantTypeExample example); 17 | 18 | @Delete({ 19 | "delete from constant_type", 20 | "where Constant_Type_ID = #{constantTypeId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer constantTypeId); 23 | 24 | @Insert({ 25 | "insert into constant_type (Constant_Type_Code, Constant_Type_Name)", 26 | "values (#{constantTypeCode,jdbcType=VARCHAR}, #{constantTypeName,jdbcType=VARCHAR})" 27 | }) 28 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="constantTypeId", before=false, resultType=Integer.class) 29 | int insert(ConstantType record); 30 | 31 | int insertSelective(ConstantType record); 32 | 33 | List selectByExample(ConstantTypeExample example); 34 | 35 | @Select({ 36 | "select", 37 | "Constant_Type_ID, Constant_Type_Code, Constant_Type_Name", 38 | "from constant_type", 39 | "where Constant_Type_ID = #{constantTypeId,jdbcType=INTEGER}" 40 | }) 41 | @ResultMap("BaseResultMap") 42 | ConstantType selectByPrimaryKey(Integer constantTypeId); 43 | 44 | int updateByExampleSelective(@Param("record") ConstantType record, @Param("example") ConstantTypeExample example); 45 | 46 | int updateByExample(@Param("record") ConstantType record, @Param("example") ConstantTypeExample example); 47 | 48 | int updateByPrimaryKeySelective(ConstantType record); 49 | 50 | @Update({ 51 | "update constant_type", 52 | "set Constant_Type_Code = #{constantTypeCode,jdbcType=VARCHAR},", 53 | "Constant_Type_Name = #{constantTypeName,jdbcType=VARCHAR}", 54 | "where Constant_Type_ID = #{constantTypeId,jdbcType=INTEGER}" 55 | }) 56 | int updateByPrimaryKey(ConstantType record); 57 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DayCal.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | 5 | public class DayCal { 6 | private Integer dayCalId; 7 | 8 | private Integer userId; 9 | 10 | private Date dayCalDate; 11 | 12 | private Double yfTotal; 13 | 14 | private Double ghTotal; 15 | 16 | private Double dayCalTotal; 17 | 18 | private Double clTotal; 19 | 20 | private Double jcTotal; 21 | 22 | private Double czTotal; 23 | 24 | private Double qtTotal; 25 | 26 | public DayCal(Integer dayCalId, Integer userId, Date dayCalDate, Double yfTotal, Double ghTotal, Double dayCalTotal, Double clTotal, Double jcTotal, Double czTotal, Double qtTotal) { 27 | this.dayCalId = dayCalId; 28 | this.userId = userId; 29 | this.dayCalDate = dayCalDate; 30 | this.yfTotal = yfTotal; 31 | this.ghTotal = ghTotal; 32 | this.dayCalTotal = dayCalTotal; 33 | this.clTotal = clTotal; 34 | this.jcTotal = jcTotal; 35 | this.czTotal = czTotal; 36 | this.qtTotal = qtTotal; 37 | } 38 | 39 | public DayCal() { 40 | super(); 41 | } 42 | 43 | public Integer getDayCalId() { 44 | return dayCalId; 45 | } 46 | 47 | public void setDayCalId(Integer dayCalId) { 48 | this.dayCalId = dayCalId; 49 | } 50 | 51 | public Integer getUserId() { 52 | return userId; 53 | } 54 | 55 | public void setUserId(Integer userId) { 56 | this.userId = userId; 57 | } 58 | 59 | public Date getDayCalDate() { 60 | return dayCalDate; 61 | } 62 | 63 | public void setDayCalDate(Date dayCalDate) { 64 | this.dayCalDate = dayCalDate; 65 | } 66 | 67 | public Double getYfTotal() { 68 | return yfTotal; 69 | } 70 | 71 | public void setYfTotal(Double yfTotal) { 72 | this.yfTotal = yfTotal; 73 | } 74 | 75 | public Double getGhTotal() { 76 | return ghTotal; 77 | } 78 | 79 | public void setGhTotal(Double ghTotal) { 80 | this.ghTotal = ghTotal; 81 | } 82 | 83 | public Double getDayCalTotal() { 84 | return dayCalTotal; 85 | } 86 | 87 | public void setDayCalTotal(Double dayCalTotal) { 88 | this.dayCalTotal = dayCalTotal; 89 | } 90 | 91 | public Double getClTotal() { 92 | return clTotal; 93 | } 94 | 95 | public void setClTotal(Double clTotal) { 96 | this.clTotal = clTotal; 97 | } 98 | 99 | public Double getJcTotal() { 100 | return jcTotal; 101 | } 102 | 103 | public void setJcTotal(Double jcTotal) { 104 | this.jcTotal = jcTotal; 105 | } 106 | 107 | public Double getCzTotal() { 108 | return czTotal; 109 | } 110 | 111 | public void setCzTotal(Double czTotal) { 112 | this.czTotal = czTotal; 113 | } 114 | 115 | public Double getQtTotal() { 116 | return qtTotal; 117 | } 118 | 119 | public void setQtTotal(Double qtTotal) { 120 | this.qtTotal = qtTotal; 121 | } 122 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DayCalMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DayCalExample; 4 | import org.apache.ibatis.annotations.*; 5 | 6 | import java.util.List; 7 | 8 | public interface DayCalMapper { 9 | int countByExample(DayCalExample example); 10 | 11 | int deleteByExample(DayCalExample example); 12 | 13 | @Delete({ 14 | "delete from day_cal", 15 | "where Day_Cal_ID = #{dayCalId,jdbcType=INTEGER}" 16 | }) 17 | int deleteByPrimaryKey(Integer dayCalId); 18 | 19 | @Insert({ 20 | "insert into day_cal (User_ID, Day_Cal_Date, ", 21 | "YF_Total, GH_Total, ", 22 | "Day_Cal_Total, CL_Total, ", 23 | "JC_Total, CZ_Total, ", 24 | "QT_Total)", 25 | "values (#{userId,jdbcType=INTEGER}, #{dayCalDate,jdbcType=TIMESTAMP}, ", 26 | "#{yfTotal,jdbcType=DOUBLE}, #{ghTotal,jdbcType=DOUBLE}, ", 27 | "#{dayCalTotal,jdbcType=DOUBLE}, #{clTotal,jdbcType=DOUBLE}, ", 28 | "#{jcTotal,jdbcType=DOUBLE}, #{czTotal,jdbcType=DOUBLE}, ", 29 | "#{qtTotal,jdbcType=DOUBLE})" 30 | }) 31 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="dayCalId", before=false, resultType=Integer.class) 32 | int insert(DayCal record); 33 | 34 | int insertSelective(DayCal record); 35 | 36 | List selectByExample(DayCalExample example); 37 | 38 | @Select({ 39 | "select", 40 | "Day_Cal_ID, User_ID, Day_Cal_Date, YF_Total, GH_Total, Day_Cal_Total, CL_Total, ", 41 | "JC_Total, CZ_Total, QT_Total", 42 | "from day_cal", 43 | "where Day_Cal_ID = #{dayCalId,jdbcType=INTEGER}" 44 | }) 45 | @ResultMap("BaseResultMap") 46 | DayCal selectByPrimaryKey(Integer dayCalId); 47 | 48 | int updateByExampleSelective(@Param("record") DayCal record, @Param("example") DayCalExample example); 49 | 50 | int updateByExample(@Param("record") DayCal record, @Param("example") DayCalExample example); 51 | 52 | int updateByPrimaryKeySelective(DayCal record); 53 | 54 | @Update({ 55 | "update day_cal", 56 | "set User_ID = #{userId,jdbcType=INTEGER},", 57 | "Day_Cal_Date = #{dayCalDate,jdbcType=TIMESTAMP},", 58 | "YF_Total = #{yfTotal,jdbcType=DOUBLE},", 59 | "GH_Total = #{ghTotal,jdbcType=DOUBLE},", 60 | "Day_Cal_Total = #{dayCalTotal,jdbcType=DOUBLE},", 61 | "CL_Total = #{clTotal,jdbcType=DOUBLE},", 62 | "JC_Total = #{jcTotal,jdbcType=DOUBLE},", 63 | "CZ_Total = #{czTotal,jdbcType=DOUBLE},", 64 | "QT_Total = #{qtTotal,jdbcType=DOUBLE}", 65 | "where Day_Cal_ID = #{dayCalId,jdbcType=INTEGER}" 66 | }) 67 | int updateByPrimaryKey(DayCal record); 68 | @Select({"SELECT DISTINCT User_ID FROM day_cal"}) 69 | List FindHistoryDalUserID(); 70 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Department.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | public class Department { 7 | private Integer departmentId; 8 | 9 | private String departmentCode; 10 | 11 | private String departmentName; 12 | 13 | private Integer departmentCategoryId; 14 | 15 | private String departmentType; 16 | 17 | @Getter 18 | @Setter 19 | private ConstantItems constantItems; 20 | 21 | public Department(Integer departmentId, String departmentCode, String departmentName, Integer departmentCategoryId, String departmentType) { 22 | this.departmentId = departmentId; 23 | this.departmentCode = departmentCode; 24 | this.departmentName = departmentName; 25 | this.departmentCategoryId = departmentCategoryId; 26 | this.departmentType = departmentType; 27 | } 28 | 29 | public Department() { 30 | super(); 31 | } 32 | 33 | public Integer getDepartmentId() { 34 | return departmentId; 35 | } 36 | 37 | public void setDepartmentId(Integer departmentId) { 38 | this.departmentId = departmentId; 39 | } 40 | 41 | public String getDepartmentCode() { 42 | return departmentCode; 43 | } 44 | 45 | public void setDepartmentCode(String departmentCode) { 46 | this.departmentCode = departmentCode == null ? null : departmentCode.trim(); 47 | } 48 | 49 | public String getDepartmentName() { 50 | return departmentName; 51 | } 52 | 53 | public void setDepartmentName(String departmentName) { 54 | this.departmentName = departmentName == null ? null : departmentName.trim(); 55 | } 56 | 57 | public Integer getDepartmentCategoryId() { 58 | return departmentCategoryId; 59 | } 60 | 61 | public void setDepartmentCategoryId(Integer departmentCategoryId) { 62 | this.departmentCategoryId = departmentCategoryId; 63 | } 64 | 65 | public String getDepartmentType() { 66 | return departmentType; 67 | } 68 | 69 | public void setDepartmentType(String departmentType) { 70 | this.departmentType = departmentType == null ? null : departmentType.trim(); 71 | } 72 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DepartmentMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DepartmentExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DepartmentMapper { 14 | int countByExample(DepartmentExample example); 15 | 16 | int deleteByExample(DepartmentExample example); 17 | 18 | @Delete({ 19 | "delete from department", 20 | "where Department_ID = #{departmentId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer departmentId); 23 | 24 | @Insert({ 25 | "insert into department (Department_Code, Department_Name, ", 26 | "Department_Category_ID, Department_Type)", 27 | "values (#{departmentCode,jdbcType=VARCHAR}, #{departmentName,jdbcType=VARCHAR}, ", 28 | "#{departmentCategoryId,jdbcType=INTEGER}, #{departmentType,jdbcType=CHAR})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="departmentId", before=false, resultType=Integer.class) 31 | int insert(Department record); 32 | 33 | int insertSelective(Department record); 34 | 35 | List selectByExample(DepartmentExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Department_ID, Department_Code, Department_Name, Department_Category_ID, Department_Type", 40 | "from department", 41 | "where Department_ID = #{departmentId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | Department selectByPrimaryKey(Integer departmentId); 45 | 46 | int updateByExampleSelective(@Param("record") Department record, @Param("example") DepartmentExample example); 47 | 48 | int updateByExample(@Param("record") Department record, @Param("example") DepartmentExample example); 49 | 50 | int updateByPrimaryKeySelective(Department record); 51 | 52 | @Update({ 53 | "update department", 54 | "set Department_Code = #{departmentCode,jdbcType=VARCHAR},", 55 | "Department_Name = #{departmentName,jdbcType=VARCHAR},", 56 | "Department_Category_ID = #{departmentCategoryId,jdbcType=INTEGER},", 57 | "Department_Type = #{departmentType,jdbcType=CHAR}", 58 | "where Department_ID = #{departmentId,jdbcType=INTEGER}" 59 | }) 60 | int updateByPrimaryKey(Department record); 61 | 62 | List getAllDepartmentWithCategory(); 63 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Diagnosis.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | 5 | public class Diagnosis { 6 | private Integer diagnosisId; 7 | 8 | private Integer diseaseId; 9 | 10 | private Integer medicalRecordId; 11 | 12 | private String mainDiagnosisMark; 13 | 14 | private String suspectMark; 15 | 16 | private Date onsetDate; 17 | 18 | private String diagnosisMark; 19 | 20 | /* 对应的疾病对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.14*/ 21 | private Disease disease; 22 | 23 | public Diagnosis(Integer diagnosisId, Integer diseaseId, Integer medicalRecordId, String mainDiagnosisMark, String suspectMark, Date onsetDate, String diagnosisMark) { 24 | this.diagnosisId = diagnosisId; 25 | this.diseaseId = diseaseId; 26 | this.medicalRecordId = medicalRecordId; 27 | this.mainDiagnosisMark = mainDiagnosisMark; 28 | this.suspectMark = suspectMark; 29 | this.onsetDate = onsetDate; 30 | this.diagnosisMark = diagnosisMark; 31 | } 32 | 33 | public Diagnosis(Integer diagnosisId, Integer diseaseId, Integer medicalRecordId, String mainDiagnosisMark, String suspectMark, Date onsetDate, String diagnosisMark, Disease disease) { 34 | this.diagnosisId = diagnosisId; 35 | this.diseaseId = diseaseId; 36 | this.medicalRecordId = medicalRecordId; 37 | this.mainDiagnosisMark = mainDiagnosisMark; 38 | this.suspectMark = suspectMark; 39 | this.onsetDate = onsetDate; 40 | this.diagnosisMark = diagnosisMark; 41 | this.disease = disease; 42 | } 43 | 44 | public Disease getDisease() { 45 | return disease; 46 | } 47 | 48 | public void setDisease(Disease disease) { 49 | this.disease = disease; 50 | } 51 | 52 | public Diagnosis() { 53 | super(); 54 | } 55 | 56 | public Integer getDiagnosisId() { 57 | return diagnosisId; 58 | } 59 | 60 | public void setDiagnosisId(Integer diagnosisId) { 61 | this.diagnosisId = diagnosisId; 62 | } 63 | 64 | public Integer getDiseaseId() { 65 | return diseaseId; 66 | } 67 | 68 | public void setDiseaseId(Integer diseaseId) { 69 | this.diseaseId = diseaseId; 70 | } 71 | 72 | public Integer getMedicalRecordId() { 73 | return medicalRecordId; 74 | } 75 | 76 | public void setMedicalRecordId(Integer medicalRecordId) { 77 | this.medicalRecordId = medicalRecordId; 78 | } 79 | 80 | public String getMainDiagnosisMark() { 81 | return mainDiagnosisMark; 82 | } 83 | 84 | public void setMainDiagnosisMark(String mainDiagnosisMark) { 85 | this.mainDiagnosisMark = mainDiagnosisMark == null ? null : mainDiagnosisMark.trim(); 86 | } 87 | 88 | public String getSuspectMark() { 89 | return suspectMark; 90 | } 91 | 92 | public void setSuspectMark(String suspectMark) { 93 | this.suspectMark = suspectMark == null ? null : suspectMark.trim(); 94 | } 95 | 96 | public Date getOnsetDate() { 97 | return onsetDate; 98 | } 99 | 100 | public void setOnsetDate(Date onsetDate) { 101 | this.onsetDate = onsetDate; 102 | } 103 | 104 | public String getDiagnosisMark() { 105 | return diagnosisMark; 106 | } 107 | 108 | public void setDiagnosisMark(String diagnosisMark) { 109 | this.diagnosisMark = diagnosisMark == null ? null : diagnosisMark.trim(); 110 | } 111 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiagnosisMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DiagnosisExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DiagnosisMapper { 14 | int countByExample(DiagnosisExample example); 15 | 16 | int deleteByExample(DiagnosisExample example); 17 | 18 | @Delete({ 19 | "delete from diagnosis", 20 | "where Diagnosis_ID = #{diagnosisId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer diagnosisId); 23 | 24 | @Insert({ 25 | "insert into diagnosis (Disease_ID, Medical_Record_ID, ", 26 | "Main_Diagnosis_Mark, Suspect_Mark, ", 27 | "Onset_Date, Diagnosis_Mark)", 28 | "values (#{diseaseId,jdbcType=INTEGER}, #{medicalRecordId,jdbcType=INTEGER}, ", 29 | "#{mainDiagnosisMark,jdbcType=CHAR}, #{suspectMark,jdbcType=CHAR}, ", 30 | "#{onsetDate,jdbcType=DATE}, #{diagnosisMark,jdbcType=CHAR})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="diagnosisId", before=false, resultType=Integer.class) 33 | int insert(Diagnosis record); 34 | 35 | int insertSelective(Diagnosis record); 36 | 37 | List selectByExample(DiagnosisExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Diagnosis_ID, Disease_ID, Medical_Record_ID, Main_Diagnosis_Mark, Suspect_Mark, ", 42 | "Onset_Date, Diagnosis_Mark", 43 | "from diagnosis", 44 | "where Diagnosis_ID = #{diagnosisId,jdbcType=INTEGER}" 45 | }) 46 | @ResultMap("BaseResultMap") 47 | Diagnosis selectByPrimaryKey(Integer diagnosisId); 48 | 49 | int updateByExampleSelective(@Param("record") Diagnosis record, @Param("example") DiagnosisExample example); 50 | 51 | int updateByExample(@Param("record") Diagnosis record, @Param("example") DiagnosisExample example); 52 | 53 | int updateByPrimaryKeySelective(Diagnosis record); 54 | 55 | @Update({ 56 | "update diagnosis", 57 | "set Disease_ID = #{diseaseId,jdbcType=INTEGER},", 58 | "Medical_Record_ID = #{medicalRecordId,jdbcType=INTEGER},", 59 | "Main_Diagnosis_Mark = #{mainDiagnosisMark,jdbcType=CHAR},", 60 | "Suspect_Mark = #{suspectMark,jdbcType=CHAR},", 61 | "Onset_Date = #{onsetDate,jdbcType=DATE},", 62 | "Diagnosis_Mark = #{diagnosisMark,jdbcType=CHAR}", 63 | "where Diagnosis_ID = #{diagnosisId,jdbcType=INTEGER}" 64 | }) 65 | int updateByPrimaryKey(Diagnosis record); 66 | 67 | /** 68 | * @title: listFirstDiagnosisByMedicalRecordId 69 | * @description: 列出病历ID对应的初诊信息 70 | * @author: 29-y 71 | * @date: 2019-06-26 1:11 72 | * @param: [medicalRecordId] 73 | * @return: java.util.List 74 | * @throws: 75 | */ 76 | @Select({ 77 | "select dia.*,dis.* " , 78 | "from diagnosis dia join disease dis on dia.Disease_ID = dis.Disease_ID " , 79 | "where dia.Medical_Record_ID=#{medicalRecordId,jdbcType=INTEGER} and dia.Diagnosis_Mark=#{type,jdbcType=CHAR} " 80 | }) 81 | @ResultMap("SecondResultMap") 82 | List listDiagnosisByMedicalRecordId(Integer medicalRecordId,String type); 83 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiagnosisTemplate.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class DiagnosisTemplate { 4 | private Integer diagnosisTemplateId; 5 | 6 | private Integer medicalRecordHomePageTemplateId; 7 | 8 | private Integer diseaseId; 9 | 10 | private String mainDiagnosisMark; 11 | 12 | private String suspectMark; 13 | 14 | /* 对应的疾病对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.14*/ 15 | private Disease disease; 16 | 17 | public DiagnosisTemplate(Integer diagnosisTemplateId, Integer medicalRecordHomePageTemplateId, Integer diseaseId, String mainDiagnosisMark, String suspectMark) { 18 | this.diagnosisTemplateId = diagnosisTemplateId; 19 | this.medicalRecordHomePageTemplateId = medicalRecordHomePageTemplateId; 20 | this.diseaseId = diseaseId; 21 | this.mainDiagnosisMark = mainDiagnosisMark; 22 | this.suspectMark = suspectMark; 23 | } 24 | 25 | public DiagnosisTemplate(Integer diagnosisTemplateId, Integer medicalRecordHomePageTemplateId, Integer diseaseId, String mainDiagnosisMark, String suspectMark, Disease disease) { 26 | this.diagnosisTemplateId = diagnosisTemplateId; 27 | this.medicalRecordHomePageTemplateId = medicalRecordHomePageTemplateId; 28 | this.diseaseId = diseaseId; 29 | this.mainDiagnosisMark = mainDiagnosisMark; 30 | this.suspectMark = suspectMark; 31 | this.disease = disease; 32 | } 33 | 34 | public Disease getDisease() { 35 | return disease; 36 | } 37 | 38 | public void setDisease(Disease disease) { 39 | this.disease = disease; 40 | } 41 | 42 | public DiagnosisTemplate() { 43 | super(); 44 | } 45 | 46 | public Integer getDiagnosisTemplateId() { 47 | return diagnosisTemplateId; 48 | } 49 | 50 | public void setDiagnosisTemplateId(Integer diagnosisTemplateId) { 51 | this.diagnosisTemplateId = diagnosisTemplateId; 52 | } 53 | 54 | public Integer getMedicalRecordHomePageTemplateId() { 55 | return medicalRecordHomePageTemplateId; 56 | } 57 | 58 | public void setMedicalRecordHomePageTemplateId(Integer medicalRecordHomePageTemplateId) { 59 | this.medicalRecordHomePageTemplateId = medicalRecordHomePageTemplateId; 60 | } 61 | 62 | public Integer getDiseaseId() { 63 | return diseaseId; 64 | } 65 | 66 | public void setDiseaseId(Integer diseaseId) { 67 | this.diseaseId = diseaseId; 68 | } 69 | 70 | public String getMainDiagnosisMark() { 71 | return mainDiagnosisMark; 72 | } 73 | 74 | public void setMainDiagnosisMark(String mainDiagnosisMark) { 75 | this.mainDiagnosisMark = mainDiagnosisMark == null ? null : mainDiagnosisMark.trim(); 76 | } 77 | 78 | public String getSuspectMark() { 79 | return suspectMark; 80 | } 81 | 82 | public void setSuspectMark(String suspectMark) { 83 | this.suspectMark = suspectMark == null ? null : suspectMark.trim(); 84 | } 85 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiagnosisTemplateMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DiagnosisTemplateExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DiagnosisTemplateMapper { 14 | int countByExample(DiagnosisTemplateExample example); 15 | 16 | int deleteByExample(DiagnosisTemplateExample example); 17 | 18 | @Delete({ 19 | "delete from diagnosis_template", 20 | "where Diagnosis_Template_ID = #{diagnosisTemplateId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer diagnosisTemplateId); 23 | 24 | @Insert({ 25 | "insert into diagnosis_template (Medical_Record_Home_Page_Template_ID, ", 26 | "Disease_ID, Main_Diagnosis_Mark, ", 27 | "Suspect_Mark)", 28 | "values (#{medicalRecordHomePageTemplateId,jdbcType=INTEGER}, ", 29 | "#{diseaseId,jdbcType=INTEGER}, #{mainDiagnosisMark,jdbcType=CHAR}, ", 30 | "#{suspectMark,jdbcType=CHAR})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="diagnosisTemplateId", before=false, resultType=Integer.class) 33 | int insert(DiagnosisTemplate record); 34 | 35 | int insertSelective(DiagnosisTemplate record); 36 | 37 | List selectByExample(DiagnosisTemplateExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Diagnosis_Template_ID, Medical_Record_Home_Page_Template_ID, Disease_ID, Main_Diagnosis_Mark, ", 42 | "Suspect_Mark", 43 | "from diagnosis_template", 44 | "where Diagnosis_Template_ID = #{diagnosisTemplateId,jdbcType=INTEGER}" 45 | }) 46 | @ResultMap("BaseResultMap") 47 | DiagnosisTemplate selectByPrimaryKey(Integer diagnosisTemplateId); 48 | 49 | int updateByExampleSelective(@Param("record") DiagnosisTemplate record, @Param("example") DiagnosisTemplateExample example); 50 | 51 | int updateByExample(@Param("record") DiagnosisTemplate record, @Param("example") DiagnosisTemplateExample example); 52 | 53 | int updateByPrimaryKeySelective(DiagnosisTemplate record); 54 | 55 | @Update({ 56 | "update diagnosis_template", 57 | "set Medical_Record_Home_Page_Template_ID = #{medicalRecordHomePageTemplateId,jdbcType=INTEGER},", 58 | "Disease_ID = #{diseaseId,jdbcType=INTEGER},", 59 | "Main_Diagnosis_Mark = #{mainDiagnosisMark,jdbcType=CHAR},", 60 | "Suspect_Mark = #{suspectMark,jdbcType=CHAR}", 61 | "where Diagnosis_Template_ID = #{diagnosisTemplateId,jdbcType=INTEGER}" 62 | }) 63 | int updateByPrimaryKey(DiagnosisTemplate record); 64 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Disease.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | public class Disease { 7 | private Integer diseaseId; 8 | 9 | private String diseaseCode; 10 | 11 | private String diseaseName; 12 | 13 | private String diseaseIcd; 14 | 15 | private Integer diseaseTypeId; 16 | 17 | private String diseaseCustomizeName1; 18 | 19 | private String diseaseCustomizeName2; 20 | 21 | @Getter 22 | @Setter 23 | private DiseaseType diseaseType; 24 | 25 | public Disease(Integer diseaseId, String diseaseCode, String diseaseName, String diseaseIcd, Integer diseaseTypeId, String diseaseCustomizeName1, String diseaseCustomizeName2) { 26 | this.diseaseId = diseaseId; 27 | this.diseaseCode = diseaseCode; 28 | this.diseaseName = diseaseName; 29 | this.diseaseIcd = diseaseIcd; 30 | this.diseaseTypeId = diseaseTypeId; 31 | this.diseaseCustomizeName1 = diseaseCustomizeName1; 32 | this.diseaseCustomizeName2 = diseaseCustomizeName2; 33 | } 34 | 35 | public Disease() { 36 | super(); 37 | } 38 | 39 | public Integer getDiseaseId() { 40 | return diseaseId; 41 | } 42 | 43 | public void setDiseaseId(Integer diseaseId) { 44 | this.diseaseId = diseaseId; 45 | } 46 | 47 | public String getDiseaseCode() { 48 | return diseaseCode; 49 | } 50 | 51 | public void setDiseaseCode(String diseaseCode) { 52 | this.diseaseCode = diseaseCode == null ? null : diseaseCode.trim(); 53 | } 54 | 55 | public String getDiseaseName() { 56 | return diseaseName; 57 | } 58 | 59 | public void setDiseaseName(String diseaseName) { 60 | this.diseaseName = diseaseName == null ? null : diseaseName.trim(); 61 | } 62 | 63 | public String getDiseaseIcd() { 64 | return diseaseIcd; 65 | } 66 | 67 | public void setDiseaseIcd(String diseaseIcd) { 68 | this.diseaseIcd = diseaseIcd == null ? null : diseaseIcd.trim(); 69 | } 70 | 71 | public Integer getDiseaseTypeId() { 72 | return diseaseTypeId; 73 | } 74 | 75 | public void setDiseaseTypeId(Integer diseaseTypeId) { 76 | this.diseaseTypeId = diseaseTypeId; 77 | } 78 | 79 | public String getDiseaseCustomizeName1() { 80 | return diseaseCustomizeName1; 81 | } 82 | 83 | public void setDiseaseCustomizeName1(String diseaseCustomizeName1) { 84 | this.diseaseCustomizeName1 = diseaseCustomizeName1 == null ? null : diseaseCustomizeName1.trim(); 85 | } 86 | 87 | public String getDiseaseCustomizeName2() { 88 | return diseaseCustomizeName2; 89 | } 90 | 91 | public void setDiseaseCustomizeName2(String diseaseCustomizeName2) { 92 | this.diseaseCustomizeName2 = diseaseCustomizeName2 == null ? null : diseaseCustomizeName2.trim(); 93 | } 94 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiseaseFolder.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class DiseaseFolder { 4 | private Integer diseaseFolderId; 5 | 6 | private String diseaseFolderName; 7 | 8 | public DiseaseFolder(Integer diseaseFolderId, String diseaseFolderName) { 9 | this.diseaseFolderId = diseaseFolderId; 10 | this.diseaseFolderName = diseaseFolderName; 11 | } 12 | 13 | public DiseaseFolder() { 14 | super(); 15 | } 16 | 17 | public Integer getDiseaseFolderId() { 18 | return diseaseFolderId; 19 | } 20 | 21 | public void setDiseaseFolderId(Integer diseaseFolderId) { 22 | this.diseaseFolderId = diseaseFolderId; 23 | } 24 | 25 | public String getDiseaseFolderName() { 26 | return diseaseFolderName; 27 | } 28 | 29 | public void setDiseaseFolderName(String diseaseFolderName) { 30 | this.diseaseFolderName = diseaseFolderName == null ? null : diseaseFolderName.trim(); 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiseaseFolderMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DiseaseFolderExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DiseaseFolderMapper { 14 | int countByExample(DiseaseFolderExample example); 15 | 16 | int deleteByExample(DiseaseFolderExample example); 17 | 18 | @Delete({ 19 | "delete from disease_folder", 20 | "where Disease_Folder_ID = #{diseaseFolderId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer diseaseFolderId); 23 | 24 | @Insert({ 25 | "insert into disease_folder (Disease_Folder_Name)", 26 | "values (#{diseaseFolderName,jdbcType=VARCHAR})" 27 | }) 28 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="diseaseFolderId", before=false, resultType=Integer.class) 29 | int insert(DiseaseFolder record); 30 | 31 | int insertSelective(DiseaseFolder record); 32 | 33 | List selectByExample(DiseaseFolderExample example); 34 | 35 | @Select({ 36 | "select", 37 | "Disease_Folder_ID, Disease_Folder_Name", 38 | "from disease_folder", 39 | "where Disease_Folder_ID = #{diseaseFolderId,jdbcType=INTEGER}" 40 | }) 41 | @ResultMap("BaseResultMap") 42 | DiseaseFolder selectByPrimaryKey(Integer diseaseFolderId); 43 | 44 | int updateByExampleSelective(@Param("record") DiseaseFolder record, @Param("example") DiseaseFolderExample example); 45 | 46 | int updateByExample(@Param("record") DiseaseFolder record, @Param("example") DiseaseFolderExample example); 47 | 48 | int updateByPrimaryKeySelective(DiseaseFolder record); 49 | 50 | @Update({ 51 | "update disease_folder", 52 | "set Disease_Folder_Name = #{diseaseFolderName,jdbcType=VARCHAR}", 53 | "where Disease_Folder_ID = #{diseaseFolderId,jdbcType=INTEGER}" 54 | }) 55 | int updateByPrimaryKey(DiseaseFolder record); 56 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiseaseMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DiseaseExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DiseaseMapper { 14 | int countByExample(DiseaseExample example); 15 | 16 | int deleteByExample(DiseaseExample example); 17 | 18 | @Delete({ 19 | "delete from disease", 20 | "where Disease_ID = #{diseaseId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer diseaseId); 23 | 24 | @Insert({ 25 | "insert into disease (Disease_Code, Disease_Name, ", 26 | "Disease_ICD, Disease_Type_ID, ", 27 | "Disease_Customize_Name1, Disease_Customize_Name2)", 28 | "values (#{diseaseCode,jdbcType=VARCHAR}, #{diseaseName,jdbcType=VARCHAR}, ", 29 | "#{diseaseIcd,jdbcType=VARCHAR}, #{diseaseTypeId,jdbcType=INTEGER}, ", 30 | "#{diseaseCustomizeName1,jdbcType=VARCHAR}, #{diseaseCustomizeName2,jdbcType=VARCHAR})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="diseaseId", before=false, resultType=Integer.class) 33 | int insert(Disease record); 34 | 35 | int insertSelective(Disease record); 36 | 37 | List selectByExample(DiseaseExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Disease_ID, Disease_Code, Disease_Name, Disease_ICD, Disease_Type_ID, Disease_Customize_Name1, ", 42 | "Disease_Customize_Name2", 43 | "from disease", 44 | "where Disease_ID = #{diseaseId,jdbcType=INTEGER}" 45 | }) 46 | @ResultMap("BaseResultMap") 47 | Disease selectByPrimaryKey(Integer diseaseId); 48 | 49 | int updateByExampleSelective(@Param("record") Disease record, @Param("example") DiseaseExample example); 50 | 51 | int updateByExample(@Param("record") Disease record, @Param("example") DiseaseExample example); 52 | 53 | int updateByPrimaryKeySelective(Disease record); 54 | 55 | @Update({ 56 | "update disease", 57 | "set Disease_Code = #{diseaseCode,jdbcType=VARCHAR},", 58 | "Disease_Name = #{diseaseName,jdbcType=VARCHAR},", 59 | "Disease_ICD = #{diseaseIcd,jdbcType=VARCHAR},", 60 | "Disease_Type_ID = #{diseaseTypeId,jdbcType=INTEGER},", 61 | "Disease_Customize_Name1 = #{diseaseCustomizeName1,jdbcType=VARCHAR},", 62 | "Disease_Customize_Name2 = #{diseaseCustomizeName2,jdbcType=VARCHAR}", 63 | "where Disease_ID = #{diseaseId,jdbcType=INTEGER}" 64 | }) 65 | int updateByPrimaryKey(Disease record); 66 | 67 | List getAllDiseaseWithType(); 68 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiseaseType.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class DiseaseType { 4 | private Integer diseaseTypeId; 5 | 6 | private String diseaseTypeCode; 7 | 8 | private String diseaseTypeName; 9 | 10 | private Integer diseaseTypeSequence; 11 | 12 | private String diseaseTypeType; 13 | 14 | private Integer diseaseFolderId; 15 | 16 | public DiseaseType(Integer diseaseTypeId, String diseaseTypeCode, String diseaseTypeName, Integer diseaseTypeSequence, String diseaseTypeType, Integer diseaseFolderId) { 17 | this.diseaseTypeId = diseaseTypeId; 18 | this.diseaseTypeCode = diseaseTypeCode; 19 | this.diseaseTypeName = diseaseTypeName; 20 | this.diseaseTypeSequence = diseaseTypeSequence; 21 | this.diseaseTypeType = diseaseTypeType; 22 | this.diseaseFolderId = diseaseFolderId; 23 | } 24 | 25 | public DiseaseType() { 26 | super(); 27 | } 28 | 29 | public Integer getDiseaseTypeId() { 30 | return diseaseTypeId; 31 | } 32 | 33 | public void setDiseaseTypeId(Integer diseaseTypeId) { 34 | this.diseaseTypeId = diseaseTypeId; 35 | } 36 | 37 | public String getDiseaseTypeCode() { 38 | return diseaseTypeCode; 39 | } 40 | 41 | public void setDiseaseTypeCode(String diseaseTypeCode) { 42 | this.diseaseTypeCode = diseaseTypeCode == null ? null : diseaseTypeCode.trim(); 43 | } 44 | 45 | public String getDiseaseTypeName() { 46 | return diseaseTypeName; 47 | } 48 | 49 | public void setDiseaseTypeName(String diseaseTypeName) { 50 | this.diseaseTypeName = diseaseTypeName == null ? null : diseaseTypeName.trim(); 51 | } 52 | 53 | public Integer getDiseaseTypeSequence() { 54 | return diseaseTypeSequence; 55 | } 56 | 57 | public void setDiseaseTypeSequence(Integer diseaseTypeSequence) { 58 | this.diseaseTypeSequence = diseaseTypeSequence; 59 | } 60 | 61 | public String getDiseaseTypeType() { 62 | return diseaseTypeType; 63 | } 64 | 65 | public void setDiseaseTypeType(String diseaseTypeType) { 66 | this.diseaseTypeType = diseaseTypeType == null ? null : diseaseTypeType.trim(); 67 | } 68 | 69 | public Integer getDiseaseFolderId() { 70 | return diseaseFolderId; 71 | } 72 | 73 | public void setDiseaseFolderId(Integer diseaseFolderId) { 74 | this.diseaseFolderId = diseaseFolderId; 75 | } 76 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DiseaseTypeMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DiseaseTypeExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DiseaseTypeMapper { 14 | int countByExample(DiseaseTypeExample example); 15 | 16 | int deleteByExample(DiseaseTypeExample example); 17 | 18 | @Delete({ 19 | "delete from disease_type", 20 | "where Disease_Type_ID = #{diseaseTypeId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer diseaseTypeId); 23 | 24 | @Insert({ 25 | "insert into disease_type (Disease_Type_Code, Disease_Type_Name, ", 26 | "Disease_Type_Sequence, Disease_Type_Type, ", 27 | "Disease_Folder_ID)", 28 | "values (#{diseaseTypeCode,jdbcType=VARCHAR}, #{diseaseTypeName,jdbcType=VARCHAR}, ", 29 | "#{diseaseTypeSequence,jdbcType=INTEGER}, #{diseaseTypeType,jdbcType=CHAR}, ", 30 | "#{diseaseFolderId,jdbcType=INTEGER})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="diseaseTypeId", before=false, resultType=Integer.class) 33 | int insert(DiseaseType record); 34 | 35 | int insertSelective(DiseaseType record); 36 | 37 | List selectByExample(DiseaseTypeExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Disease_Type_ID, Disease_Type_Code, Disease_Type_Name, Disease_Type_Sequence, ", 42 | "Disease_Type_Type, Disease_Folder_ID", 43 | "from disease_type", 44 | "where Disease_Type_ID = #{diseaseTypeId,jdbcType=INTEGER}" 45 | }) 46 | @ResultMap("BaseResultMap") 47 | DiseaseType selectByPrimaryKey(Integer diseaseTypeId); 48 | 49 | int updateByExampleSelective(@Param("record") DiseaseType record, @Param("example") DiseaseTypeExample example); 50 | 51 | int updateByExample(@Param("record") DiseaseType record, @Param("example") DiseaseTypeExample example); 52 | 53 | int updateByPrimaryKeySelective(DiseaseType record); 54 | 55 | @Update({ 56 | "update disease_type", 57 | "set Disease_Type_Code = #{diseaseTypeCode,jdbcType=VARCHAR},", 58 | "Disease_Type_Name = #{diseaseTypeName,jdbcType=VARCHAR},", 59 | "Disease_Type_Sequence = #{diseaseTypeSequence,jdbcType=INTEGER},", 60 | "Disease_Type_Type = #{diseaseTypeType,jdbcType=CHAR},", 61 | "Disease_Folder_ID = #{diseaseFolderId,jdbcType=INTEGER}", 62 | "where Disease_Type_ID = #{diseaseTypeId,jdbcType=INTEGER}" 63 | }) 64 | int updateByPrimaryKey(DiseaseType record); 65 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DispensingDrugsDecoratingClass.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.List; 4 | 5 | public class DispensingDrugsDecoratingClass { 6 | private List examinationDrugsItemsList; 7 | private int medicalRecordID; 8 | 9 | public DispensingDrugsDecoratingClass(List examinationDrugsItemsList, int medicalRecordID) { 10 | this.examinationDrugsItemsList = examinationDrugsItemsList; 11 | medicalRecordID = medicalRecordID; 12 | } 13 | 14 | public List getExaminationDrugsItemsList() { 15 | return examinationDrugsItemsList; 16 | } 17 | 18 | public void setExaminationDrugsItemsList(List examinationDrugsItemsList) { 19 | this.examinationDrugsItemsList = examinationDrugsItemsList; 20 | } 21 | 22 | public int getMedicalRecordID() { 23 | return medicalRecordID; 24 | } 25 | 26 | public void setMedicalRecordID(int medicalRecordID) { 27 | this.medicalRecordID = medicalRecordID; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return "DispensingDrugsDecoratingClass{" + 33 | "examinationDrugsItemsList=" + examinationDrugsItemsList + 34 | ", medicalRecordID=" + medicalRecordID + 35 | '}'; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/DrugsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.DrugsExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface DrugsMapper { 14 | int countByExample(DrugsExample example); 15 | 16 | int deleteByExample(DrugsExample example); 17 | 18 | @Delete({ 19 | "delete from drugs", 20 | "where Drugs_ID = #{drugsId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer drugsId); 23 | 24 | @Insert({ 25 | "insert into drugs (Drugs_Code, Drugs_Name, ", 26 | "Drugs_Format, Drugs_Unit, ", 27 | "Drugs_Manufacturer, Drugs_Dosage_ID, ", 28 | "Drugs_Type_ID, Drugs_Price, ", 29 | "Drugs_MnemonicCode, Create_Time, ", 30 | "Reverse1, Reverse2, ", 31 | "Reverse3)", 32 | "values (#{drugsCode,jdbcType=VARCHAR}, #{drugsName,jdbcType=VARCHAR}, ", 33 | "#{drugsFormat,jdbcType=VARCHAR}, #{drugsUnit,jdbcType=VARCHAR}, ", 34 | "#{drugsManufacturer,jdbcType=VARCHAR}, #{drugsDosageId,jdbcType=INTEGER}, ", 35 | "#{drugsTypeId,jdbcType=INTEGER}, #{drugsPrice,jdbcType=DOUBLE}, ", 36 | "#{drugsMnemoniccode,jdbcType=VARCHAR}, #{createTime,jdbcType=DATE}, ", 37 | "#{reverse1,jdbcType=VARCHAR}, #{reverse2,jdbcType=VARCHAR}, ", 38 | "#{reverse3,jdbcType=VARCHAR})" 39 | }) 40 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="drugsId", before=false, resultType=Integer.class) 41 | int insert(Drugs record); 42 | 43 | int insertSelective(Drugs record); 44 | 45 | List selectByExample(DrugsExample example); 46 | 47 | @Select({ 48 | "select", 49 | "Drugs_ID, Drugs_Code, Drugs_Name, Drugs_Format, Drugs_Unit, Drugs_Manufacturer, ", 50 | "Drugs_Dosage_ID, Drugs_Type_ID, Drugs_Price, Drugs_MnemonicCode, Create_Time, ", 51 | "Reverse1, Reverse2, Reverse3", 52 | "from drugs", 53 | "where Drugs_ID = #{drugsId,jdbcType=INTEGER}" 54 | }) 55 | @ResultMap("BaseResultMap") 56 | Drugs selectByPrimaryKey(Integer drugsId); 57 | 58 | int updateByExampleSelective(@Param("record") Drugs record, @Param("example") DrugsExample example); 59 | 60 | int updateByExample(@Param("record") Drugs record, @Param("example") DrugsExample example); 61 | 62 | int updateByPrimaryKeySelective(Drugs record); 63 | 64 | @Update({ 65 | "update drugs", 66 | "set Drugs_Code = #{drugsCode,jdbcType=VARCHAR},", 67 | "Drugs_Name = #{drugsName,jdbcType=VARCHAR},", 68 | "Drugs_Format = #{drugsFormat,jdbcType=VARCHAR},", 69 | "Drugs_Unit = #{drugsUnit,jdbcType=VARCHAR},", 70 | "Drugs_Manufacturer = #{drugsManufacturer,jdbcType=VARCHAR},", 71 | "Drugs_Dosage_ID = #{drugsDosageId,jdbcType=INTEGER},", 72 | "Drugs_Type_ID = #{drugsTypeId,jdbcType=INTEGER},", 73 | "Drugs_Price = #{drugsPrice,jdbcType=DOUBLE},", 74 | "Drugs_MnemonicCode = #{drugsMnemoniccode,jdbcType=VARCHAR},", 75 | "Create_Time = #{createTime,jdbcType=DATE},", 76 | "Reverse1 = #{reverse1,jdbcType=VARCHAR},", 77 | "Reverse2 = #{reverse2,jdbcType=VARCHAR},", 78 | "Reverse3 = #{reverse3,jdbcType=VARCHAR}", 79 | "where Drugs_ID = #{drugsId,jdbcType=INTEGER}" 80 | }) 81 | int updateByPrimaryKey(Drugs record); 82 | 83 | List getAllDrugsWithTypeAndDosage(); 84 | //by-alan 85 | List getAllDrugs(); 86 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExaminationResult.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class ExaminationResult { 7 | private Integer examinationResultId; 8 | 9 | private Integer doctorId; 10 | 11 | private String findings; 12 | 13 | private String diagnosticSuggestion; 14 | 15 | private Date submitTime; 16 | 17 | /* 对应的检查检验结果图片列表对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.18*/ 18 | private List examinationResultImageList; 19 | 20 | public ExaminationResult(Integer examinationResultId, Integer doctorId, String findings, String diagnosticSuggestion, Date submitTime) { 21 | this.examinationResultId = examinationResultId; 22 | this.doctorId = doctorId; 23 | this.findings = findings; 24 | this.diagnosticSuggestion = diagnosticSuggestion; 25 | this.submitTime = submitTime; 26 | } 27 | 28 | public ExaminationResult(Integer examinationResultId, Integer doctorId, String findings, String diagnosticSuggestion, Date submitTime, List examinationResultImageList) { 29 | this.examinationResultId = examinationResultId; 30 | this.doctorId = doctorId; 31 | this.findings = findings; 32 | this.diagnosticSuggestion = diagnosticSuggestion; 33 | this.submitTime = submitTime; 34 | this.examinationResultImageList = examinationResultImageList; 35 | } 36 | 37 | public List getExaminationResultImageList() { 38 | return examinationResultImageList; 39 | } 40 | 41 | public void setExaminationResultImageList(List examinationResultImageList) { 42 | this.examinationResultImageList = examinationResultImageList; 43 | } 44 | 45 | public ExaminationResult() { 46 | super(); 47 | } 48 | 49 | public Integer getExaminationResultId() { 50 | return examinationResultId; 51 | } 52 | 53 | public void setExaminationResultId(Integer examinationResultId) { 54 | this.examinationResultId = examinationResultId; 55 | } 56 | 57 | public Integer getDoctorId() { 58 | return doctorId; 59 | } 60 | 61 | public void setDoctorId(Integer doctorId) { 62 | this.doctorId = doctorId; 63 | } 64 | 65 | public String getFindings() { 66 | return findings; 67 | } 68 | 69 | public void setFindings(String findings) { 70 | this.findings = findings == null ? null : findings.trim(); 71 | } 72 | 73 | public String getDiagnosticSuggestion() { 74 | return diagnosticSuggestion; 75 | } 76 | 77 | public void setDiagnosticSuggestion(String diagnosticSuggestion) { 78 | this.diagnosticSuggestion = diagnosticSuggestion == null ? null : diagnosticSuggestion.trim(); 79 | } 80 | 81 | public Date getSubmitTime() { 82 | return submitTime; 83 | } 84 | 85 | public void setSubmitTime(Date submitTime) { 86 | this.submitTime = submitTime; 87 | } 88 | 89 | @Override 90 | public String toString() { 91 | return "ExaminationResult{" + 92 | "examinationResultId=" + examinationResultId + 93 | ", doctorId=" + doctorId + 94 | ", findings='" + findings + '\'' + 95 | ", diagnosticSuggestion='" + diagnosticSuggestion + '\'' + 96 | ", submitTime=" + submitTime + 97 | ", examinationResultImageList=" + examinationResultImageList + 98 | '}'; 99 | } 100 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExaminationResultImage.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class ExaminationResultImage { 4 | private Integer examinationResultImageId; 5 | 6 | private Integer examinationResultId; 7 | 8 | private String imageUrl; 9 | 10 | private String imageName; 11 | 12 | public ExaminationResultImage(Integer examinationResultImageId, Integer examinationResultId, String imageUrl, String imageName) { 13 | this.examinationResultImageId = examinationResultImageId; 14 | this.examinationResultId = examinationResultId; 15 | this.imageUrl = imageUrl; 16 | this.imageName = imageName; 17 | } 18 | 19 | public ExaminationResultImage() { 20 | super(); 21 | } 22 | 23 | public Integer getExaminationResultImageId() { 24 | return examinationResultImageId; 25 | } 26 | 27 | public void setExaminationResultImageId(Integer examinationResultImageId) { 28 | this.examinationResultImageId = examinationResultImageId; 29 | } 30 | 31 | public Integer getExaminationResultId() { 32 | return examinationResultId; 33 | } 34 | 35 | public void setExaminationResultId(Integer examinationResultId) { 36 | this.examinationResultId = examinationResultId; 37 | } 38 | 39 | public String getImageUrl() { 40 | return imageUrl; 41 | } 42 | 43 | public void setImageUrl(String imageUrl) { 44 | this.imageUrl = imageUrl == null ? null : imageUrl.trim(); 45 | } 46 | 47 | public String getImageName() { 48 | return imageName; 49 | } 50 | 51 | public void setImageName(String imageName) { 52 | this.imageName = imageName == null ? null : imageName.trim(); 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExaminationResultImageMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.ExaminationResultImageExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface ExaminationResultImageMapper { 14 | int countByExample(ExaminationResultImageExample example); 15 | 16 | int deleteByExample(ExaminationResultImageExample example); 17 | 18 | @Delete({ 19 | "delete from examination_result_image", 20 | "where Examination_Result_Image_ID = #{examinationResultImageId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer examinationResultImageId); 23 | 24 | @Insert({ 25 | "insert into examination_result_image (Examination_Result_ID, Image_URL, ", 26 | "Image_Name)", 27 | "values (#{examinationResultId,jdbcType=INTEGER}, #{imageUrl,jdbcType=VARCHAR}, ", 28 | "#{imageName,jdbcType=VARCHAR})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="examinationResultImageId", before=false, resultType=Integer.class) 31 | int insert(ExaminationResultImage record); 32 | 33 | int insertSelective(ExaminationResultImage record); 34 | 35 | List selectByExample(ExaminationResultImageExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Examination_Result_Image_ID, Examination_Result_ID, Image_URL, Image_Name", 40 | "from examination_result_image", 41 | "where Examination_Result_Image_ID = #{examinationResultImageId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | ExaminationResultImage selectByPrimaryKey(Integer examinationResultImageId); 45 | 46 | int updateByExampleSelective(@Param("record") ExaminationResultImage record, @Param("example") ExaminationResultImageExample example); 47 | 48 | int updateByExample(@Param("record") ExaminationResultImage record, @Param("example") ExaminationResultImageExample example); 49 | 50 | int updateByPrimaryKeySelective(ExaminationResultImage record); 51 | 52 | @Update({ 53 | "update examination_result_image", 54 | "set Examination_Result_ID = #{examinationResultId,jdbcType=INTEGER},", 55 | "Image_URL = #{imageUrl,jdbcType=VARCHAR},", 56 | "Image_Name = #{imageName,jdbcType=VARCHAR}", 57 | "where Examination_Result_Image_ID = #{examinationResultImageId,jdbcType=INTEGER}" 58 | }) 59 | int updateByPrimaryKey(ExaminationResultImage record); 60 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExaminationResultMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.ExaminationResultExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface ExaminationResultMapper { 14 | int countByExample(ExaminationResultExample example); 15 | 16 | int deleteByExample(ExaminationResultExample example); 17 | 18 | @Delete({ 19 | "delete from examination_result", 20 | "where Examination_Result_ID = #{examinationResultId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer examinationResultId); 23 | 24 | @Insert({ 25 | "insert into examination_result (Doctor_ID, Findings, ", 26 | "Diagnostic_Suggestion, Submit_Time)", 27 | "values (#{doctorId,jdbcType=INTEGER}, #{findings,jdbcType=VARCHAR}, ", 28 | "#{diagnosticSuggestion,jdbcType=VARCHAR}, #{submitTime,jdbcType=TIMESTAMP})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="examinationResultId", before=false, resultType=Integer.class) 31 | int insert(ExaminationResult record); 32 | 33 | int insertSelective(ExaminationResult record); 34 | 35 | List selectByExample(ExaminationResultExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Examination_Result_ID, Doctor_ID, Findings, Diagnostic_Suggestion, Submit_Time", 40 | "from examination_result", 41 | "where Examination_Result_ID = #{examinationResultId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | ExaminationResult selectByPrimaryKey(Integer examinationResultId); 45 | 46 | int updateByExampleSelective(@Param("record") ExaminationResult record, @Param("example") ExaminationResultExample example); 47 | 48 | int updateByExample(@Param("record") ExaminationResult record, @Param("example") ExaminationResultExample example); 49 | 50 | int updateByPrimaryKeySelective(ExaminationResult record); 51 | 52 | @Update({ 53 | "update examination_result", 54 | "set Doctor_ID = #{doctorId,jdbcType=INTEGER},", 55 | "Findings = #{findings,jdbcType=VARCHAR},", 56 | "Diagnostic_Suggestion = #{diagnosticSuggestion,jdbcType=VARCHAR},", 57 | "Submit_Time = #{submitTime,jdbcType=TIMESTAMP}", 58 | "where Examination_Result_ID = #{examinationResultId,jdbcType=INTEGER}" 59 | }) 60 | int updateByPrimaryKey(ExaminationResult record); 61 | 62 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExpenseItems.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | public class ExpenseItems { 7 | private Integer expenseItemsId; 8 | 9 | private Integer medicalRecordId; 10 | 11 | private Double totalCost; 12 | 13 | private String payStatus; 14 | 15 | private Integer invoiceId; 16 | 17 | private Integer expenseTypeId; 18 | 19 | @Getter 20 | @Setter 21 | private ExpenseType expenseType; 22 | 23 | @Getter 24 | @Setter 25 | private Invoice invoice; 26 | 27 | @Getter 28 | @Setter 29 | private Drugs drugs; 30 | 31 | @Getter 32 | @Setter 33 | private Drugs exDrugs; 34 | 35 | @Getter 36 | @Setter 37 | private FmedicalItems fmedicalItems; 38 | 39 | @Getter 40 | @Setter 41 | private FmedicalItems exFmedicalItems; 42 | 43 | @Getter 44 | @Setter 45 | private PrescriptionItems prescriptionItems; 46 | 47 | @Getter 48 | @Setter 49 | private TreatmentItems treatmentItems; 50 | 51 | @Getter 52 | @Setter 53 | private ExaminationDrugsItems examinationDrugsItems; 54 | 55 | @Getter 56 | @Setter 57 | private ExaminationFmedicalItems examinationFmedicalItems; 58 | 59 | public ExpenseItems(Integer expenseItemsId, Integer medicalRecordId, Double totalCost, String payStatus, Integer invoiceId, Integer expenseTypeId) { 60 | this.expenseItemsId = expenseItemsId; 61 | this.medicalRecordId = medicalRecordId; 62 | this.totalCost = totalCost; 63 | this.payStatus = payStatus; 64 | this.invoiceId = invoiceId; 65 | this.expenseTypeId = expenseTypeId; 66 | } 67 | 68 | public ExpenseItems() { 69 | super(); 70 | } 71 | 72 | public Integer getExpenseItemsId() { 73 | return expenseItemsId; 74 | } 75 | 76 | public void setExpenseItemsId(Integer expenseItemsId) { 77 | this.expenseItemsId = expenseItemsId; 78 | } 79 | 80 | public Integer getMedicalRecordId() { 81 | return medicalRecordId; 82 | } 83 | 84 | public void setMedicalRecordId(Integer medicalRecordId) { 85 | this.medicalRecordId = medicalRecordId; 86 | } 87 | 88 | public Double getTotalCost() { 89 | return totalCost; 90 | } 91 | 92 | public void setTotalCost(Double totalCost) { 93 | this.totalCost = totalCost; 94 | } 95 | 96 | public String getPayStatus() { 97 | return payStatus; 98 | } 99 | 100 | public void setPayStatus(String payStatus) { 101 | this.payStatus = payStatus == null ? null : payStatus.trim(); 102 | } 103 | 104 | public Integer getInvoiceId() { 105 | return invoiceId; 106 | } 107 | 108 | public void setInvoiceId(Integer invoiceId) { 109 | this.invoiceId = invoiceId; 110 | } 111 | 112 | public Integer getExpenseTypeId() { 113 | return expenseTypeId; 114 | } 115 | 116 | public void setExpenseTypeId(Integer expenseTypeId) { 117 | this.expenseTypeId = expenseTypeId; 118 | } 119 | 120 | @Override 121 | public String toString() { 122 | return "ExpenseItems{" + 123 | "expenseItemsId=" + expenseItemsId + 124 | ", medicalRecordId=" + medicalRecordId + 125 | ", totalCost=" + totalCost + 126 | ", payStatus='" + payStatus + '\'' + 127 | ", invoiceId=" + invoiceId + 128 | ", expenseTypeId=" + expenseTypeId + 129 | ", expenseType=" + expenseType + 130 | ", invoice=" + invoice + 131 | '}'; 132 | } 133 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExpenseItemsListWithUserId.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | 6 | import java.util.List; 7 | 8 | public class ExpenseItemsListWithUserId { 9 | @Getter 10 | @Setter 11 | private Integer userId; 12 | 13 | @Getter 14 | @Setter 15 | private List expenseItemsList; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExpenseItemsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.ExpenseItemsExample; 4 | import org.apache.ibatis.annotations.*; 5 | 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | import jdk.nashorn.internal.objects.annotations.Setter; 10 | 11 | public interface ExpenseItemsMapper { 12 | 13 | int countByExample(ExpenseItemsExample example); 14 | 15 | int deleteByExample(ExpenseItemsExample example); 16 | 17 | @Delete({ 18 | "delete from expense_items", 19 | "where Expense_Items_ID = #{expenseItemsId,jdbcType=INTEGER}" 20 | }) 21 | int deleteByPrimaryKey(Integer expenseItemsId); 22 | 23 | @Insert({ 24 | "insert into expense_items (Medical_Record_ID, Total_Cost, ", 25 | "Pay_Status, Invoice_ID, ", 26 | "Expense_Type_ID)", 27 | "values (#{medicalRecordId,jdbcType=INTEGER}, #{totalCost,jdbcType=DOUBLE}, ", 28 | "#{payStatus,jdbcType=CHAR}, #{invoiceId,jdbcType=INTEGER}, ", 29 | "#{expenseTypeId,jdbcType=INTEGER})" 30 | }) 31 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="expenseItemsId", before=false, resultType=Integer.class) 32 | int insert(ExpenseItems record); 33 | 34 | int insertSelective(ExpenseItems record); 35 | 36 | List selectByExample(ExpenseItemsExample example); 37 | 38 | @Select({ 39 | "select", 40 | "Expense_Items_ID, Medical_Record_ID, Total_Cost, Pay_Status, Invoice_ID, Expense_Type_ID", 41 | "from expense_items", 42 | "where Expense_Items_ID = #{expenseItemsId,jdbcType=INTEGER}" 43 | }) 44 | @ResultMap("BaseResultMap") 45 | ExpenseItems selectByPrimaryKey(Integer expenseItemsId); 46 | 47 | int updateByExampleSelective(@Param("record") ExpenseItems record, @Param("example") ExpenseItemsExample example); 48 | 49 | int updateByExample(@Param("record") ExpenseItems record, @Param("example") ExpenseItemsExample example); 50 | 51 | int updateByPrimaryKeySelective(ExpenseItems record); 52 | 53 | @Update({ 54 | "update expense_items", 55 | "set Medical_Record_ID = #{medicalRecordId,jdbcType=INTEGER},", 56 | "Total_Cost = #{totalCost,jdbcType=DOUBLE},", 57 | "Pay_Status = #{payStatus,jdbcType=CHAR},", 58 | "Invoice_ID = #{invoiceId,jdbcType=INTEGER},", 59 | "Expense_Type_ID = #{expenseTypeId,jdbcType=INTEGER}", 60 | "where Expense_Items_ID = #{expenseItemsId,jdbcType=INTEGER}" 61 | }) 62 | int updateByPrimaryKey(ExpenseItems record); 63 | 64 | List getUnWithdrawExpenseItems(String invoiceNO); 65 | 66 | List getPatientUnPayExpenseItems(Integer medicalRecordId); 67 | 68 | List getPatientPayExpenseItems(@Param("medicalRecordId")Integer medicalRecordId, @Param("startDate")Date startDate, @Param("endDate")Date endDate); 69 | 70 | List getAllExpenseItems(); 71 | 72 | List getPatientExpenseItems(@Param("medicalRecordId")Integer medicalRecordId); 73 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExpenseType.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class ExpenseType { 4 | private Integer expenseTypeId; 5 | 6 | private String expenseTypeCode; 7 | 8 | private String expenseTypeName; 9 | 10 | public ExpenseType(Integer expenseTypeId, String expenseTypeCode, String expenseTypeName) { 11 | this.expenseTypeId = expenseTypeId; 12 | this.expenseTypeCode = expenseTypeCode; 13 | this.expenseTypeName = expenseTypeName; 14 | } 15 | 16 | public ExpenseType() { 17 | super(); 18 | } 19 | 20 | public Integer getExpenseTypeId() { 21 | return expenseTypeId; 22 | } 23 | 24 | public void setExpenseTypeId(Integer expenseTypeId) { 25 | this.expenseTypeId = expenseTypeId; 26 | } 27 | 28 | public String getExpenseTypeCode() { 29 | return expenseTypeCode; 30 | } 31 | 32 | public void setExpenseTypeCode(String expenseTypeCode) { 33 | this.expenseTypeCode = expenseTypeCode == null ? null : expenseTypeCode.trim(); 34 | } 35 | 36 | public String getExpenseTypeName() { 37 | return expenseTypeName; 38 | } 39 | 40 | public void setExpenseTypeName(String expenseTypeName) { 41 | this.expenseTypeName = expenseTypeName == null ? null : expenseTypeName.trim(); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/ExpenseTypeMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.ExpenseTypeExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface ExpenseTypeMapper { 14 | int countByExample(ExpenseTypeExample example); 15 | 16 | int deleteByExample(ExpenseTypeExample example); 17 | 18 | @Delete({ 19 | "delete from expense_type", 20 | "where Expense_Type_ID = #{expenseTypeId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer expenseTypeId); 23 | 24 | @Insert({ 25 | "insert into expense_type (Expense_Type_Code, Expense_Type_Name)", 26 | "values (#{expenseTypeCode,jdbcType=VARCHAR}, #{expenseTypeName,jdbcType=VARCHAR})" 27 | }) 28 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="expenseTypeId", before=false, resultType=Integer.class) 29 | int insert(ExpenseType record); 30 | 31 | int insertSelective(ExpenseType record); 32 | 33 | List selectByExample(ExpenseTypeExample example); 34 | 35 | @Select({ 36 | "select", 37 | "Expense_Type_ID, Expense_Type_Code, Expense_Type_Name", 38 | "from expense_type", 39 | "where Expense_Type_ID = #{expenseTypeId,jdbcType=INTEGER}" 40 | }) 41 | @ResultMap("BaseResultMap") 42 | ExpenseType selectByPrimaryKey(Integer expenseTypeId); 43 | 44 | int updateByExampleSelective(@Param("record") ExpenseType record, @Param("example") ExpenseTypeExample example); 45 | 46 | int updateByExample(@Param("record") ExpenseType record, @Param("example") ExpenseTypeExample example); 47 | 48 | int updateByPrimaryKeySelective(ExpenseType record); 49 | 50 | @Update({ 51 | "update expense_type", 52 | "set Expense_Type_Code = #{expenseTypeCode,jdbcType=VARCHAR},", 53 | "Expense_Type_Name = #{expenseTypeName,jdbcType=VARCHAR}", 54 | "where Expense_Type_ID = #{expenseTypeId,jdbcType=INTEGER}" 55 | }) 56 | int updateByPrimaryKey(ExpenseType record); 57 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Function.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class Function { 4 | private Integer functionId; 5 | 6 | private Integer roleId; 7 | 8 | private String functionUrl; 9 | 10 | private String functionName; 11 | 12 | private Integer reverse1; 13 | 14 | public Function(Integer functionId, Integer roleId, String functionUrl, String functionName, Integer reverse1) { 15 | this.functionId = functionId; 16 | this.roleId = roleId; 17 | this.functionUrl = functionUrl; 18 | this.functionName = functionName; 19 | this.reverse1 = reverse1; 20 | } 21 | 22 | public Function() { 23 | super(); 24 | } 25 | 26 | public Integer getFunctionId() { 27 | return functionId; 28 | } 29 | 30 | public void setFunctionId(Integer functionId) { 31 | this.functionId = functionId; 32 | } 33 | 34 | public Integer getRoleId() { 35 | return roleId; 36 | } 37 | 38 | public void setRoleId(Integer roleId) { 39 | this.roleId = roleId; 40 | } 41 | 42 | public String getFunctionUrl() { 43 | return functionUrl; 44 | } 45 | 46 | public void setFunctionUrl(String functionUrl) { 47 | this.functionUrl = functionUrl == null ? null : functionUrl.trim(); 48 | } 49 | 50 | public String getFunctionName() { 51 | return functionName; 52 | } 53 | 54 | public void setFunctionName(String functionName) { 55 | this.functionName = functionName == null ? null : functionName.trim(); 56 | } 57 | 58 | public Integer getReverse1() { 59 | return reverse1; 60 | } 61 | 62 | public void setReverse1(Integer reverse1) { 63 | this.reverse1 = reverse1; 64 | } 65 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/FunctionMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.FunctionExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface FunctionMapper { 14 | int countByExample(FunctionExample example); 15 | 16 | int deleteByExample(FunctionExample example); 17 | 18 | @Delete({ 19 | "delete from function", 20 | "where Function_ID = #{functionId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer functionId); 23 | 24 | @Insert({ 25 | "insert into function (Role_ID, Function_URL, ", 26 | "Function_Name, Reverse1)", 27 | "values (#{roleId,jdbcType=INTEGER}, #{functionUrl,jdbcType=VARCHAR}, ", 28 | "#{functionName,jdbcType=VARCHAR}, #{reverse1,jdbcType=INTEGER})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="functionId", before=false, resultType=Integer.class) 31 | int insert(Function record); 32 | 33 | int insertSelective(Function record); 34 | 35 | List selectByExample(FunctionExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Function_ID, Role_ID, Function_URL, Function_Name, Reverse1", 40 | "from function", 41 | "where Function_ID = #{functionId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | Function selectByPrimaryKey(Integer functionId); 45 | 46 | int updateByExampleSelective(@Param("record") Function record, @Param("example") FunctionExample example); 47 | 48 | int updateByExample(@Param("record") Function record, @Param("example") FunctionExample example); 49 | 50 | int updateByPrimaryKeySelective(Function record); 51 | 52 | @Update({ 53 | "update function", 54 | "set Role_ID = #{roleId,jdbcType=INTEGER},", 55 | "Function_URL = #{functionUrl,jdbcType=VARCHAR},", 56 | "Function_Name = #{functionName,jdbcType=VARCHAR},", 57 | "Reverse1 = #{reverse1,jdbcType=INTEGER}", 58 | "where Function_ID = #{functionId,jdbcType=INTEGER}" 59 | }) 60 | int updateByPrimaryKey(Function record); 61 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/GroupExaminationFmedicalItemsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.GroupExaminationFmedicalItemsExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface GroupExaminationFmedicalItemsMapper { 14 | int countByExample(GroupExaminationFmedicalItemsExample example); 15 | 16 | int deleteByExample(GroupExaminationFmedicalItemsExample example); 17 | 18 | @Delete({ 19 | "delete from group_examination_fmedical_items", 20 | "where Group_Examination_Fmedical_Items_ID = #{groupExaminationFmedicalItemsId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer groupExaminationFmedicalItemsId); 23 | 24 | @Insert({ 25 | "insert into group_examination_fmedical_items (Group_Examination_ID, Fmedical_Items_ID, ", 26 | "Purpose_Requirements, Quantity)", 27 | "values (#{groupExaminationId,jdbcType=INTEGER}, #{fmedicalItemsId,jdbcType=INTEGER}, ", 28 | "#{purposeRequirements,jdbcType=VARCHAR}, #{quantity,jdbcType=INTEGER})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="groupExaminationFmedicalItemsId", before=false, resultType=Integer.class) 31 | int insert(GroupExaminationFmedicalItems record); 32 | 33 | int insertSelective(GroupExaminationFmedicalItems record); 34 | 35 | List selectByExample(GroupExaminationFmedicalItemsExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Group_Examination_Fmedical_Items_ID, Group_Examination_ID, Fmedical_Items_ID, ", 40 | "Purpose_Requirements, Quantity", 41 | "from group_examination_fmedical_items", 42 | "where Group_Examination_Fmedical_Items_ID = #{groupExaminationFmedicalItemsId,jdbcType=INTEGER}" 43 | }) 44 | @ResultMap("BaseResultMap") 45 | GroupExaminationFmedicalItems selectByPrimaryKey(Integer groupExaminationFmedicalItemsId); 46 | 47 | int updateByExampleSelective(@Param("record") GroupExaminationFmedicalItems record, @Param("example") GroupExaminationFmedicalItemsExample example); 48 | 49 | int updateByExample(@Param("record") GroupExaminationFmedicalItems record, @Param("example") GroupExaminationFmedicalItemsExample example); 50 | 51 | int updateByPrimaryKeySelective(GroupExaminationFmedicalItems record); 52 | 53 | @Update({ 54 | "update group_examination_fmedical_items", 55 | "set Group_Examination_ID = #{groupExaminationId,jdbcType=INTEGER},", 56 | "Fmedical_Items_ID = #{fmedicalItemsId,jdbcType=INTEGER},", 57 | "Purpose_Requirements = #{purposeRequirements,jdbcType=VARCHAR},", 58 | "Quantity = #{quantity,jdbcType=INTEGER}", 59 | "where Group_Examination_Fmedical_Items_ID = #{groupExaminationFmedicalItemsId,jdbcType=INTEGER}" 60 | }) 61 | int updateByPrimaryKey(GroupExaminationFmedicalItems record); 62 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/GroupPrescriptionItemsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.GroupPrescriptionItemsExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface GroupPrescriptionItemsMapper { 14 | int countByExample(GroupPrescriptionItemsExample example); 15 | 16 | int deleteByExample(GroupPrescriptionItemsExample example); 17 | 18 | @Delete({ 19 | "delete from group_prescription_items", 20 | "where Group_Prescription_Items_ID = #{groupPrescriptionItemsId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer groupPrescriptionItemsId); 23 | 24 | @Insert({ 25 | "insert into group_prescription_items (Group_Prescription_ID, Drugs_ID, ", 26 | "Drugs_Usage, Dosage, ", 27 | "Times, Days, Quantity, ", 28 | "Drugs_Advice)", 29 | "values (#{groupPrescriptionId,jdbcType=INTEGER}, #{drugsId,jdbcType=INTEGER}, ", 30 | "#{drugsUsage,jdbcType=CHAR}, #{dosage,jdbcType=DOUBLE}, ", 31 | "#{times,jdbcType=INTEGER}, #{days,jdbcType=INTEGER}, #{quantity,jdbcType=INTEGER}, ", 32 | "#{drugsAdvice,jdbcType=VARCHAR})" 33 | }) 34 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="groupPrescriptionItemsId", before=false, resultType=Integer.class) 35 | int insert(GroupPrescriptionItems record); 36 | 37 | int insertSelective(GroupPrescriptionItems record); 38 | 39 | List selectByExample(GroupPrescriptionItemsExample example); 40 | 41 | @Select({ 42 | "select", 43 | "Group_Prescription_Items_ID, Group_Prescription_ID, Drugs_ID, Drugs_Usage, Dosage, ", 44 | "Times, Days, Quantity, Drugs_Advice", 45 | "from group_prescription_items", 46 | "where Group_Prescription_Items_ID = #{groupPrescriptionItemsId,jdbcType=INTEGER}" 47 | }) 48 | @ResultMap("BaseResultMap") 49 | GroupPrescriptionItems selectByPrimaryKey(Integer groupPrescriptionItemsId); 50 | 51 | int updateByExampleSelective(@Param("record") GroupPrescriptionItems record, @Param("example") GroupPrescriptionItemsExample example); 52 | 53 | int updateByExample(@Param("record") GroupPrescriptionItems record, @Param("example") GroupPrescriptionItemsExample example); 54 | 55 | int updateByPrimaryKeySelective(GroupPrescriptionItems record); 56 | 57 | @Update({ 58 | "update group_prescription_items", 59 | "set Group_Prescription_ID = #{groupPrescriptionId,jdbcType=INTEGER},", 60 | "Drugs_ID = #{drugsId,jdbcType=INTEGER},", 61 | "Drugs_Usage = #{drugsUsage,jdbcType=CHAR},", 62 | "Dosage = #{dosage,jdbcType=DOUBLE},", 63 | "Times = #{times,jdbcType=INTEGER},", 64 | "Days = #{days,jdbcType=INTEGER},", 65 | "Quantity = #{quantity,jdbcType=INTEGER},", 66 | "Drugs_Advice = #{drugsAdvice,jdbcType=VARCHAR}", 67 | "where Group_Prescription_Items_ID = #{groupPrescriptionItemsId,jdbcType=INTEGER}" 68 | }) 69 | int updateByPrimaryKey(GroupPrescriptionItems record); 70 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/GroupTreatment.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class GroupTreatment { 7 | private Integer groupTreatmentId; 8 | 9 | private Integer doctorId; 10 | 11 | private String groupTreatmentCode; 12 | 13 | private String groupTreatmentName; 14 | 15 | private String groupTreatmentScope; 16 | 17 | private Date createTime; 18 | 19 | /* 对应的处置条目模板对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.17*/ 20 | private List groupTreatmentItemsList; 21 | 22 | public GroupTreatment(Integer groupTreatmentId, Integer doctorId, String groupTreatmentCode, String groupTreatmentName, String groupTreatmentScope, Date createTime) { 23 | this.groupTreatmentId = groupTreatmentId; 24 | this.doctorId = doctorId; 25 | this.groupTreatmentCode = groupTreatmentCode; 26 | this.groupTreatmentName = groupTreatmentName; 27 | this.groupTreatmentScope = groupTreatmentScope; 28 | this.createTime = createTime; 29 | } 30 | 31 | public GroupTreatment(Integer groupTreatmentId, Integer doctorId, String groupTreatmentCode, String groupTreatmentName, String groupTreatmentScope, Date createTime, List groupTreatmentItemsList) { 32 | this.groupTreatmentId = groupTreatmentId; 33 | this.doctorId = doctorId; 34 | this.groupTreatmentCode = groupTreatmentCode; 35 | this.groupTreatmentName = groupTreatmentName; 36 | this.groupTreatmentScope = groupTreatmentScope; 37 | this.createTime = createTime; 38 | this.groupTreatmentItemsList = groupTreatmentItemsList; 39 | } 40 | 41 | public List getGroupTreatmentItemsList() { 42 | return groupTreatmentItemsList; 43 | } 44 | 45 | public void setGroupTreatmentItemsList(List groupTreatmentItemsList) { 46 | this.groupTreatmentItemsList = groupTreatmentItemsList; 47 | } 48 | 49 | public GroupTreatment() { 50 | super(); 51 | } 52 | 53 | public Integer getGroupTreatmentId() { 54 | return groupTreatmentId; 55 | } 56 | 57 | public void setGroupTreatmentId(Integer groupTreatmentId) { 58 | this.groupTreatmentId = groupTreatmentId; 59 | } 60 | 61 | public Integer getDoctorId() { 62 | return doctorId; 63 | } 64 | 65 | public void setDoctorId(Integer doctorId) { 66 | this.doctorId = doctorId; 67 | } 68 | 69 | public String getGroupTreatmentCode() { 70 | return groupTreatmentCode; 71 | } 72 | 73 | public void setGroupTreatmentCode(String groupTreatmentCode) { 74 | this.groupTreatmentCode = groupTreatmentCode == null ? null : groupTreatmentCode.trim(); 75 | } 76 | 77 | public String getGroupTreatmentName() { 78 | return groupTreatmentName; 79 | } 80 | 81 | public void setGroupTreatmentName(String groupTreatmentName) { 82 | this.groupTreatmentName = groupTreatmentName == null ? null : groupTreatmentName.trim(); 83 | } 84 | 85 | public String getGroupTreatmentScope() { 86 | return groupTreatmentScope; 87 | } 88 | 89 | public void setGroupTreatmentScope(String groupTreatmentScope) { 90 | this.groupTreatmentScope = groupTreatmentScope == null ? null : groupTreatmentScope.trim(); 91 | } 92 | 93 | public Date getCreateTime() { 94 | return createTime; 95 | } 96 | 97 | public void setCreateTime(Date createTime) { 98 | this.createTime = createTime; 99 | } 100 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/GroupTreatmentItems.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class GroupTreatmentItems { 4 | private Integer groupTreatmentItemsId; 5 | 6 | private Integer groupTreatmentId; 7 | 8 | private Integer fmedicalItemsId; 9 | 10 | private Integer quantity; 11 | 12 | private String groupTreatmentScope; 13 | 14 | /* 对应的处置非药品对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.17*/ 15 | private FmedicalItems fmedicalItems; 16 | 17 | public GroupTreatmentItems(Integer groupTreatmentItemsId, Integer groupTreatmentId, Integer fmedicalItemsId, Integer quantity, String groupTreatmentScope) { 18 | this.groupTreatmentItemsId = groupTreatmentItemsId; 19 | this.groupTreatmentId = groupTreatmentId; 20 | this.fmedicalItemsId = fmedicalItemsId; 21 | this.quantity = quantity; 22 | this.groupTreatmentScope = groupTreatmentScope; 23 | } 24 | 25 | public GroupTreatmentItems(Integer groupTreatmentItemsId, Integer groupTreatmentId, Integer fmedicalItemsId, Integer quantity, String groupTreatmentScope, FmedicalItems fmedicalItems) { 26 | this.groupTreatmentItemsId = groupTreatmentItemsId; 27 | this.groupTreatmentId = groupTreatmentId; 28 | this.fmedicalItemsId = fmedicalItemsId; 29 | this.quantity = quantity; 30 | this.groupTreatmentScope = groupTreatmentScope; 31 | this.fmedicalItems = fmedicalItems; 32 | } 33 | 34 | public FmedicalItems getFmedicalItems() { 35 | return fmedicalItems; 36 | } 37 | 38 | public void setFmedicalItems(FmedicalItems fmedicalItems) { 39 | this.fmedicalItems = fmedicalItems; 40 | } 41 | 42 | public GroupTreatmentItems() { 43 | super(); 44 | } 45 | 46 | public Integer getGroupTreatmentItemsId() { 47 | return groupTreatmentItemsId; 48 | } 49 | 50 | public void setGroupTreatmentItemsId(Integer groupTreatmentItemsId) { 51 | this.groupTreatmentItemsId = groupTreatmentItemsId; 52 | } 53 | 54 | public Integer getGroupTreatmentId() { 55 | return groupTreatmentId; 56 | } 57 | 58 | public void setGroupTreatmentId(Integer groupTreatmentId) { 59 | this.groupTreatmentId = groupTreatmentId; 60 | } 61 | 62 | public Integer getFmedicalItemsId() { 63 | return fmedicalItemsId; 64 | } 65 | 66 | public void setFmedicalItemsId(Integer fmedicalItemsId) { 67 | this.fmedicalItemsId = fmedicalItemsId; 68 | } 69 | 70 | public Integer getQuantity() { 71 | return quantity; 72 | } 73 | 74 | public void setQuantity(Integer quantity) { 75 | this.quantity = quantity; 76 | } 77 | 78 | public String getGroupTreatmentScope() { 79 | return groupTreatmentScope; 80 | } 81 | 82 | public void setGroupTreatmentScope(String groupTreatmentScope) { 83 | this.groupTreatmentScope = groupTreatmentScope == null ? null : groupTreatmentScope.trim(); 84 | } 85 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/GroupTreatmentItemsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.GroupTreatmentItemsExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface GroupTreatmentItemsMapper { 14 | int countByExample(GroupTreatmentItemsExample example); 15 | 16 | int deleteByExample(GroupTreatmentItemsExample example); 17 | 18 | @Delete({ 19 | "delete from group_treatment_items", 20 | "where Group_Treatment_Items_ID = #{groupTreatmentItemsId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer groupTreatmentItemsId); 23 | 24 | @Insert({ 25 | "insert into group_treatment_items (Group_Treatment_ID, Fmedical_Items_ID, ", 26 | "Quantity, Group_Treatment_Scope)", 27 | "values (#{groupTreatmentId,jdbcType=INTEGER}, #{fmedicalItemsId,jdbcType=INTEGER}, ", 28 | "#{quantity,jdbcType=INTEGER}, #{groupTreatmentScope,jdbcType=CHAR})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="groupTreatmentItemsId", before=false, resultType=Integer.class) 31 | int insert(GroupTreatmentItems record); 32 | 33 | int insertSelective(GroupTreatmentItems record); 34 | 35 | List selectByExample(GroupTreatmentItemsExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Group_Treatment_Items_ID, Group_Treatment_ID, Fmedical_Items_ID, Quantity, Group_Treatment_Scope", 40 | "from group_treatment_items", 41 | "where Group_Treatment_Items_ID = #{groupTreatmentItemsId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | GroupTreatmentItems selectByPrimaryKey(Integer groupTreatmentItemsId); 45 | 46 | int updateByExampleSelective(@Param("record") GroupTreatmentItems record, @Param("example") GroupTreatmentItemsExample example); 47 | 48 | int updateByExample(@Param("record") GroupTreatmentItems record, @Param("example") GroupTreatmentItemsExample example); 49 | 50 | int updateByPrimaryKeySelective(GroupTreatmentItems record); 51 | 52 | @Update({ 53 | "update group_treatment_items", 54 | "set Group_Treatment_ID = #{groupTreatmentId,jdbcType=INTEGER},", 55 | "Fmedical_Items_ID = #{fmedicalItemsId,jdbcType=INTEGER},", 56 | "Quantity = #{quantity,jdbcType=INTEGER},", 57 | "Group_Treatment_Scope = #{groupTreatmentScope,jdbcType=CHAR}", 58 | "where Group_Treatment_Items_ID = #{groupTreatmentItemsId,jdbcType=INTEGER}" 59 | }) 60 | int updateByPrimaryKey(GroupTreatmentItems record); 61 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Invoice.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | 5 | public class Invoice { 6 | private Integer invoiceId; 7 | 8 | private String invoiceNo; 9 | 10 | private Double totalCost; 11 | 12 | private String isDayCal; 13 | 14 | private Date payTime; 15 | 16 | private Integer userId; 17 | 18 | private Integer payModeId; 19 | 20 | public Invoice(Integer invoiceId, String invoiceNo, Double totalCost, String isDayCal, Date payTime, Integer userId, Integer payModeId) { 21 | this.invoiceId = invoiceId; 22 | this.invoiceNo = invoiceNo; 23 | this.totalCost = totalCost; 24 | this.isDayCal = isDayCal; 25 | this.payTime = payTime; 26 | this.userId = userId; 27 | this.payModeId = payModeId; 28 | } 29 | 30 | public Invoice() { 31 | super(); 32 | } 33 | 34 | public Integer getInvoiceId() { 35 | return invoiceId; 36 | } 37 | 38 | public void setInvoiceId(Integer invoiceId) { 39 | this.invoiceId = invoiceId; 40 | } 41 | 42 | public String getInvoiceNo() { 43 | return invoiceNo; 44 | } 45 | 46 | public void setInvoiceNo(String invoiceNo) { 47 | this.invoiceNo = invoiceNo == null ? null : invoiceNo.trim(); 48 | } 49 | 50 | public Double getTotalCost() { 51 | return totalCost; 52 | } 53 | 54 | public void setTotalCost(Double totalCost) { 55 | this.totalCost = totalCost; 56 | } 57 | 58 | public String getIsDayCal() { 59 | return isDayCal; 60 | } 61 | 62 | public void setIsDayCal(String isDayCal) { 63 | this.isDayCal = isDayCal == null ? null : isDayCal.trim(); 64 | } 65 | 66 | public Date getPayTime() { 67 | return payTime; 68 | } 69 | 70 | public void setPayTime(Date payTime) { 71 | this.payTime = payTime; 72 | } 73 | 74 | public Integer getUserId() { 75 | return userId; 76 | } 77 | 78 | public void setUserId(Integer userId) { 79 | this.userId = userId; 80 | } 81 | 82 | public Integer getPayModeId() { 83 | return payModeId; 84 | } 85 | 86 | public void setPayModeId(Integer payModeId) { 87 | this.payModeId = payModeId; 88 | } 89 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/InvoiceMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.InvoiceExample; 4 | import org.apache.ibatis.annotations.*; 5 | 6 | import java.util.List; 7 | 8 | public interface InvoiceMapper { 9 | int countByExample(InvoiceExample example); 10 | 11 | int deleteByExample(InvoiceExample example); 12 | 13 | @Delete({ 14 | "delete from invoice", 15 | "where Invoice_ID = #{invoiceId,jdbcType=INTEGER}" 16 | }) 17 | int deleteByPrimaryKey(Integer invoiceId); 18 | 19 | @Insert({ 20 | "insert into invoice (Invoice_NO, Total_Cost, ", 21 | "Is_Day_Cal, Pay_Time, ", 22 | "User_ID, Pay_Mode_ID)", 23 | "values (#{invoiceNo,jdbcType=CHAR}, #{totalCost,jdbcType=DOUBLE}, ", 24 | "#{isDayCal,jdbcType=CHAR}, #{payTime,jdbcType=TIMESTAMP}, ", 25 | "#{userId,jdbcType=INTEGER}, #{payModeId,jdbcType=INTEGER})" 26 | }) 27 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="invoiceId", before=false, resultType=Integer.class) 28 | int insert(Invoice record); 29 | 30 | int insertSelective(Invoice record); 31 | 32 | List selectByExample(InvoiceExample example); 33 | 34 | @Select({ 35 | "select", 36 | "Invoice_ID, Invoice_NO, Total_Cost, Is_Day_Cal, Pay_Time, User_ID, Pay_Mode_ID", 37 | "from invoice", 38 | "where Invoice_ID = #{invoiceId,jdbcType=INTEGER}" 39 | }) 40 | @ResultMap("BaseResultMap") 41 | Invoice selectByPrimaryKey(Integer invoiceId); 42 | 43 | int updateByExampleSelective(@Param("record") Invoice record, @Param("example") InvoiceExample example); 44 | 45 | int updateByExample(@Param("record") Invoice record, @Param("example") InvoiceExample example); 46 | 47 | @Select({ 48 | "SELECT invoice.User_ID FROM invoice WHERE invoice.Is_Day_Cal='1'" 49 | }) 50 | List FindNotCalUsers(); 51 | 52 | int updateByPrimaryKeySelective(Invoice record); 53 | 54 | @Update({ 55 | "update invoice", 56 | "set Invoice_NO = #{invoiceNo,jdbcType=CHAR},", 57 | "Total_Cost = #{totalCost,jdbcType=DOUBLE},", 58 | "Is_Day_Cal = #{isDayCal,jdbcType=CHAR},", 59 | "Pay_Time = #{payTime,jdbcType=TIMESTAMP},", 60 | "User_ID = #{userId,jdbcType=INTEGER},", 61 | "Pay_Mode_ID = #{payModeId,jdbcType=INTEGER}", 62 | "where Invoice_ID = #{invoiceId,jdbcType=INTEGER}" 63 | }) 64 | int updateByPrimaryKey(Invoice record); 65 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/MedicalRecordHomePageMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.MedicalRecordHomePageExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface MedicalRecordHomePageMapper { 14 | int countByExample(MedicalRecordHomePageExample example); 15 | 16 | int deleteByExample(MedicalRecordHomePageExample example); 17 | 18 | @Delete({ 19 | "delete from medical_record_home_page", 20 | "where Medical_Record_Home_Page_ID = #{medicalRecordHomePageId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer medicalRecordHomePageId); 23 | 24 | @Insert({ 25 | "insert into medical_record_home_page (Medical_Record_ID, Doctor_ID, ", 26 | "Chief_Complaint, Present_History, ", 27 | "Present_Treatment, Past_History, ", 28 | "Allergic_History, Physical_Examination, ", 29 | "Assistant_Examination)", 30 | "values (#{medicalRecordId,jdbcType=INTEGER}, #{doctorId,jdbcType=INTEGER}, ", 31 | "#{chiefComplaint,jdbcType=VARCHAR}, #{presentHistory,jdbcType=VARCHAR}, ", 32 | "#{presentTreatment,jdbcType=VARCHAR}, #{pastHistory,jdbcType=VARCHAR}, ", 33 | "#{allergicHistory,jdbcType=VARCHAR}, #{physicalExamination,jdbcType=VARCHAR}, ", 34 | "#{assistantExamination,jdbcType=VARCHAR})" 35 | }) 36 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="medicalRecordHomePageId", before=false, resultType=Integer.class) 37 | int insert(MedicalRecordHomePage record); 38 | 39 | int insertSelective(MedicalRecordHomePage record); 40 | 41 | List selectByExample(MedicalRecordHomePageExample example); 42 | 43 | @Select({ 44 | "select", 45 | "Medical_Record_Home_Page_ID, Medical_Record_ID, Doctor_ID, Chief_Complaint, ", 46 | "Present_History, Present_Treatment, Past_History, Allergic_History, Physical_Examination, ", 47 | "Assistant_Examination", 48 | "from medical_record_home_page", 49 | "where Medical_Record_Home_Page_ID = #{medicalRecordHomePageId,jdbcType=INTEGER}" 50 | }) 51 | @ResultMap("BaseResultMap") 52 | MedicalRecordHomePage selectByPrimaryKey(Integer medicalRecordHomePageId); 53 | 54 | int updateByExampleSelective(@Param("record") MedicalRecordHomePage record, @Param("example") MedicalRecordHomePageExample example); 55 | 56 | int updateByExample(@Param("record") MedicalRecordHomePage record, @Param("example") MedicalRecordHomePageExample example); 57 | 58 | int updateByPrimaryKeySelective(MedicalRecordHomePage record); 59 | 60 | @Update({ 61 | "update medical_record_home_page", 62 | "set Medical_Record_ID = #{medicalRecordId,jdbcType=INTEGER},", 63 | "Doctor_ID = #{doctorId,jdbcType=INTEGER},", 64 | "Chief_Complaint = #{chiefComplaint,jdbcType=VARCHAR},", 65 | "Present_History = #{presentHistory,jdbcType=VARCHAR},", 66 | "Present_Treatment = #{presentTreatment,jdbcType=VARCHAR},", 67 | "Past_History = #{pastHistory,jdbcType=VARCHAR},", 68 | "Allergic_History = #{allergicHistory,jdbcType=VARCHAR},", 69 | "Physical_Examination = #{physicalExamination,jdbcType=VARCHAR},", 70 | "Assistant_Examination = #{assistantExamination,jdbcType=VARCHAR}", 71 | "where Medical_Record_Home_Page_ID = #{medicalRecordHomePageId,jdbcType=INTEGER}" 72 | }) 73 | int updateByPrimaryKey(MedicalRecordHomePage record); 74 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Patient.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | 5 | public class Patient { 6 | private Integer patientId; 7 | 8 | private String patientName; 9 | 10 | private String patientGender; 11 | 12 | private Date patientBirth; 13 | 14 | private Integer patientAge; 15 | 16 | private String patientIdentity; 17 | 18 | private String patientAddress; 19 | 20 | public Patient(Integer patientId, String patientName, String patientGender, Date patientBirth, Integer patientAge, String patientIdentity, String patientAddress) { 21 | this.patientId = patientId; 22 | this.patientName = patientName; 23 | this.patientGender = patientGender; 24 | this.patientBirth = patientBirth; 25 | this.patientAge = patientAge; 26 | this.patientIdentity = patientIdentity; 27 | this.patientAddress = patientAddress; 28 | } 29 | 30 | public Patient() { 31 | super(); 32 | } 33 | 34 | public Integer getPatientId() { 35 | return patientId; 36 | } 37 | 38 | public void setPatientId(Integer patientId) { 39 | this.patientId = patientId; 40 | } 41 | 42 | public String getPatientName() { 43 | return patientName; 44 | } 45 | 46 | public void setPatientName(String patientName) { 47 | this.patientName = patientName == null ? null : patientName.trim(); 48 | } 49 | 50 | public String getPatientGender() { 51 | return patientGender; 52 | } 53 | 54 | public void setPatientGender(String patientGender) { 55 | this.patientGender = patientGender == null ? null : patientGender.trim(); 56 | } 57 | 58 | public Date getPatientBirth() { 59 | return patientBirth; 60 | } 61 | 62 | public void setPatientBirth(Date patientBirth) { 63 | this.patientBirth = patientBirth; 64 | } 65 | 66 | public Integer getPatientAge() { 67 | return patientAge; 68 | } 69 | 70 | public void setPatientAge(Integer patientAge) { 71 | this.patientAge = patientAge; 72 | } 73 | 74 | public String getPatientIdentity() { 75 | return patientIdentity; 76 | } 77 | 78 | public void setPatientIdentity(String patientIdentity) { 79 | this.patientIdentity = patientIdentity == null ? null : patientIdentity.trim(); 80 | } 81 | 82 | public String getPatientAddress() { 83 | return patientAddress; 84 | } 85 | 86 | public void setPatientAddress(String patientAddress) { 87 | this.patientAddress = patientAddress == null ? null : patientAddress.trim(); 88 | } 89 | 90 | @Override 91 | public String toString() { 92 | return "Patient{" + 93 | "patientId=" + patientId + 94 | ", patientName='" + patientName + '\'' + 95 | ", patientGender='" + patientGender + '\'' + 96 | ", patientBirth=" + patientBirth + 97 | ", patientAge=" + patientAge + 98 | ", patientIdentity='" + patientIdentity + '\'' + 99 | ", patientAddress='" + patientAddress + '\'' + 100 | '}'; 101 | } 102 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/PatientMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.PatientExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface PatientMapper { 14 | int countByExample(PatientExample example); 15 | 16 | int deleteByExample(PatientExample example); 17 | 18 | @Delete({ 19 | "delete from patient", 20 | "where Patient_ID = #{patientId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer patientId); 23 | 24 | @Insert({ 25 | "insert into patient (Patient_Name, Patient_Gender, ", 26 | "Patient_Birth, Patient_Age, ", 27 | "Patient_IDentity, Patient_Address)", 28 | "values (#{patientName,jdbcType=VARCHAR}, #{patientGender,jdbcType=CHAR}, ", 29 | "#{patientBirth,jdbcType=DATE}, #{patientAge,jdbcType=INTEGER}, ", 30 | "#{patientIdentity,jdbcType=VARCHAR}, #{patientAddress,jdbcType=VARCHAR})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="patientId", before=false, resultType=Integer.class) 33 | int insert(Patient record); 34 | 35 | int insertSelective(Patient record); 36 | 37 | List selectByExample(PatientExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Patient_ID, Patient_Name, Patient_Gender, Patient_Birth, Patient_Age, Patient_IDentity, ", 42 | "Patient_Address", 43 | "from patient", 44 | "where Patient_ID = #{patientId,jdbcType=INTEGER}" 45 | }) 46 | @ResultMap("BaseResultMap") 47 | Patient selectByPrimaryKey(Integer patientId); 48 | 49 | int updateByExampleSelective(@Param("record") Patient record, @Param("example") PatientExample example); 50 | 51 | int updateByExample(@Param("record") Patient record, @Param("example") PatientExample example); 52 | 53 | int updateByPrimaryKeySelective(Patient record); 54 | 55 | @Update({ 56 | "update patient", 57 | "set Patient_Name = #{patientName,jdbcType=VARCHAR},", 58 | "Patient_Gender = #{patientGender,jdbcType=CHAR},", 59 | "Patient_Birth = #{patientBirth,jdbcType=DATE},", 60 | "Patient_Age = #{patientAge,jdbcType=INTEGER},", 61 | "Patient_IDentity = #{patientIdentity,jdbcType=VARCHAR},", 62 | "Patient_Address = #{patientAddress,jdbcType=VARCHAR}", 63 | "where Patient_ID = #{patientId,jdbcType=INTEGER}" 64 | }) 65 | int updateByPrimaryKey(Patient record); 66 | 67 | //根据病历号获得Patient 68 | Patient getPatientById(@Param("medicalRecordId")int medicalRecordId); 69 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/RegistrationLevel.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class RegistrationLevel { 4 | private Integer registrationLevelId; 5 | 6 | private String registrationLevelName; 7 | 8 | private String isDefault; 9 | 10 | private Integer registrationSequence; 11 | 12 | private Double registrationCost; 13 | 14 | public RegistrationLevel(Integer registrationLevelId, String registrationLevelName, String isDefault, Integer registrationSequence, Double registrationCost) { 15 | this.registrationLevelId = registrationLevelId; 16 | this.registrationLevelName = registrationLevelName; 17 | this.isDefault = isDefault; 18 | this.registrationSequence = registrationSequence; 19 | this.registrationCost = registrationCost; 20 | } 21 | 22 | public RegistrationLevel() { 23 | super(); 24 | } 25 | 26 | public Integer getRegistrationLevelId() { 27 | return registrationLevelId; 28 | } 29 | 30 | public void setRegistrationLevelId(Integer registrationLevelId) { 31 | this.registrationLevelId = registrationLevelId; 32 | } 33 | 34 | public String getRegistrationLevelName() { 35 | return registrationLevelName; 36 | } 37 | 38 | public void setRegistrationLevelName(String registrationLevelName) { 39 | this.registrationLevelName = registrationLevelName == null ? null : registrationLevelName.trim(); 40 | } 41 | 42 | public String getIsDefault() { 43 | return isDefault; 44 | } 45 | 46 | public void setIsDefault(String isDefault) { 47 | this.isDefault = isDefault == null ? null : isDefault.trim(); 48 | } 49 | 50 | public Integer getRegistrationSequence() { 51 | return registrationSequence; 52 | } 53 | 54 | public void setRegistrationSequence(Integer registrationSequence) { 55 | this.registrationSequence = registrationSequence; 56 | } 57 | 58 | public Double getRegistrationCost() { 59 | return registrationCost; 60 | } 61 | 62 | public void setRegistrationCost(Double registrationCost) { 63 | this.registrationCost = registrationCost; 64 | } 65 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/RegistrationLevelMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.RegistrationLevelExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface RegistrationLevelMapper { 14 | int countByExample(RegistrationLevelExample example); 15 | 16 | int deleteByExample(RegistrationLevelExample example); 17 | 18 | @Delete({ 19 | "delete from registration_level", 20 | "where Registration_Level_ID = #{registrationLevelId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer registrationLevelId); 23 | 24 | @Insert({ 25 | "insert into registration_level (Registration_Level_Name, Is_Default, ", 26 | "Registration_Sequence, Registration_Cost)", 27 | "values (#{registrationLevelName,jdbcType=VARCHAR}, #{isDefault,jdbcType=VARCHAR}, ", 28 | "#{registrationSequence,jdbcType=INTEGER}, #{registrationCost,jdbcType=DOUBLE})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="registrationLevelId", before=false, resultType=Integer.class) 31 | int insert(RegistrationLevel record); 32 | 33 | int insertSelective(RegistrationLevel record); 34 | 35 | List selectByExample(RegistrationLevelExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Registration_Level_ID, Registration_Level_Name, Is_Default, Registration_Sequence, ", 40 | "Registration_Cost", 41 | "from registration_level", 42 | "where Registration_Level_ID = #{registrationLevelId,jdbcType=INTEGER}" 43 | }) 44 | @ResultMap("BaseResultMap") 45 | RegistrationLevel selectByPrimaryKey(Integer registrationLevelId); 46 | 47 | int updateByExampleSelective(@Param("record") RegistrationLevel record, @Param("example") RegistrationLevelExample example); 48 | 49 | int updateByExample(@Param("record") RegistrationLevel record, @Param("example") RegistrationLevelExample example); 50 | 51 | int updateByPrimaryKeySelective(RegistrationLevel record); 52 | 53 | @Update({ 54 | "update registration_level", 55 | "set Registration_Level_Name = #{registrationLevelName,jdbcType=VARCHAR},", 56 | "Is_Default = #{isDefault,jdbcType=VARCHAR},", 57 | "Registration_Sequence = #{registrationSequence,jdbcType=INTEGER},", 58 | "Registration_Cost = #{registrationCost,jdbcType=DOUBLE}", 59 | "where Registration_Level_ID = #{registrationLevelId,jdbcType=INTEGER}" 60 | }) 61 | int updateByPrimaryKey(RegistrationLevel record); 62 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Role.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class Role { 4 | private Integer roleId; 5 | 6 | private Integer functionId; 7 | 8 | private String roleName; 9 | 10 | public Role(Integer roleId, Integer functionId, String roleName) { 11 | this.roleId = roleId; 12 | this.functionId = functionId; 13 | this.roleName = roleName; 14 | } 15 | 16 | public Role() { 17 | super(); 18 | } 19 | 20 | public Integer getRoleId() { 21 | return roleId; 22 | } 23 | 24 | public void setRoleId(Integer roleId) { 25 | this.roleId = roleId; 26 | } 27 | 28 | public Integer getFunctionId() { 29 | return functionId; 30 | } 31 | 32 | public void setFunctionId(Integer functionId) { 33 | this.functionId = functionId; 34 | } 35 | 36 | public String getRoleName() { 37 | return roleName; 38 | } 39 | 40 | public void setRoleName(String roleName) { 41 | this.roleName = roleName == null ? null : roleName.trim(); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.RoleExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface RoleMapper { 14 | int countByExample(RoleExample example); 15 | 16 | int deleteByExample(RoleExample example); 17 | 18 | @Delete({ 19 | "delete from role", 20 | "where Role_ID = #{roleId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer roleId); 23 | 24 | @Insert({ 25 | "insert into role (Function_id, Role_Name)", 26 | "values (#{functionId,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR})" 27 | }) 28 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="roleId", before=false, resultType=Integer.class) 29 | int insert(Role record); 30 | 31 | int insertSelective(Role record); 32 | 33 | List selectByExample(RoleExample example); 34 | 35 | @Select({ 36 | "select", 37 | "Role_ID, Function_id, Role_Name", 38 | "from role", 39 | "where Role_ID = #{roleId,jdbcType=INTEGER}" 40 | }) 41 | @ResultMap("BaseResultMap") 42 | Role selectByPrimaryKey(Integer roleId); 43 | 44 | int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example); 45 | 46 | int updateByExample(@Param("record") Role record, @Param("example") RoleExample example); 47 | 48 | int updateByPrimaryKeySelective(Role record); 49 | 50 | @Update({ 51 | "update role", 52 | "set Function_id = #{functionId,jdbcType=INTEGER},", 53 | "Role_Name = #{roleName,jdbcType=VARCHAR}", 54 | "where Role_ID = #{roleId,jdbcType=INTEGER}" 55 | }) 56 | int updateByPrimaryKey(Role record); 57 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/SchedulingInfo.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import java.util.Date; 8 | 9 | public class SchedulingInfo { 10 | private Integer schedulingInfoId; 11 | 12 | private Integer doctorId; 13 | 14 | private String schedulingNoonbreak; 15 | 16 | private Date schedulingStarttime; 17 | 18 | private Date schedulingEndtime; 19 | 20 | private String schedulingWeekday; 21 | 22 | private Integer schedulingLimitcount; 23 | 24 | private Integer schedulingRestcount; 25 | 26 | @Getter 27 | @Setter 28 | private User user; 29 | 30 | public SchedulingInfo(Integer schedulingInfoId, Integer doctorId, String schedulingNoonbreak, Date schedulingStarttime, Date schedulingEndtime, String schedulingWeekday, Integer schedulingLimitcount, Integer schedulingRestcount) { 31 | this.schedulingInfoId = schedulingInfoId; 32 | this.doctorId = doctorId; 33 | this.schedulingNoonbreak = schedulingNoonbreak; 34 | this.schedulingStarttime = schedulingStarttime; 35 | this.schedulingEndtime = schedulingEndtime; 36 | this.schedulingWeekday = schedulingWeekday; 37 | this.schedulingLimitcount = schedulingLimitcount; 38 | this.schedulingRestcount = schedulingRestcount; 39 | } 40 | 41 | public SchedulingInfo() { 42 | super(); 43 | } 44 | 45 | public Integer getSchedulingInfoId() { 46 | return schedulingInfoId; 47 | } 48 | 49 | public void setSchedulingInfoId(Integer schedulingInfoId) { 50 | this.schedulingInfoId = schedulingInfoId; 51 | } 52 | 53 | public Integer getDoctorId() { 54 | return doctorId; 55 | } 56 | 57 | public void setDoctorId(Integer doctorId) { 58 | this.doctorId = doctorId; 59 | } 60 | 61 | public String getSchedulingNoonbreak() { 62 | return schedulingNoonbreak; 63 | } 64 | 65 | public void setSchedulingNoonbreak(String schedulingNoonbreak) { 66 | this.schedulingNoonbreak = schedulingNoonbreak == null ? null : schedulingNoonbreak.trim(); 67 | } 68 | 69 | public Date getSchedulingStarttime() { 70 | return schedulingStarttime; 71 | } 72 | 73 | public void setSchedulingStarttime(Date schedulingStarttime) { 74 | this.schedulingStarttime = schedulingStarttime; 75 | } 76 | 77 | public Date getSchedulingEndtime() { 78 | return schedulingEndtime; 79 | } 80 | 81 | public void setSchedulingEndtime(Date schedulingEndtime) { 82 | this.schedulingEndtime = schedulingEndtime; 83 | } 84 | 85 | public String getSchedulingWeekday() { 86 | return schedulingWeekday; 87 | } 88 | 89 | public void setSchedulingWeekday(String schedulingWeekday) { 90 | this.schedulingWeekday = schedulingWeekday == null ? null : schedulingWeekday.trim(); 91 | } 92 | 93 | public Integer getSchedulingLimitcount() { 94 | return schedulingLimitcount; 95 | } 96 | 97 | public void setSchedulingLimitcount(Integer schedulingLimitcount) { 98 | this.schedulingLimitcount = schedulingLimitcount; 99 | } 100 | 101 | public Integer getSchedulingRestcount() { 102 | return schedulingRestcount; 103 | } 104 | 105 | public void setSchedulingRestcount(Integer schedulingRestcount) { 106 | this.schedulingRestcount = schedulingRestcount; 107 | } 108 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/SchedulingInfoMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.List; 4 | 5 | import edu.neu.hoso.example.SchedulingInfoExample; 6 | import org.apache.ibatis.annotations.Delete; 7 | import org.apache.ibatis.annotations.Insert; 8 | import org.apache.ibatis.annotations.Param; 9 | import org.apache.ibatis.annotations.ResultMap; 10 | import org.apache.ibatis.annotations.Select; 11 | import org.apache.ibatis.annotations.SelectKey; 12 | import org.apache.ibatis.annotations.Update; 13 | 14 | public interface SchedulingInfoMapper { 15 | int countByExample(SchedulingInfoExample example); 16 | 17 | int deleteByExample(SchedulingInfoExample example); 18 | 19 | @Delete({ 20 | "delete from scheduling_info", 21 | "where Scheduling_Info_ID = #{schedulingInfoId,jdbcType=INTEGER}" 22 | }) 23 | int deleteByPrimaryKey(Integer schedulingInfoId); 24 | 25 | @Insert({ 26 | "insert into scheduling_info (Doctor_ID, Scheduling_NoonBreak, ", 27 | "Scheduling_StartTime, Scheduling_EndTime, ", 28 | "Scheduling_Weekday, Scheduling_LimitCount, ", 29 | "Scheduling_RestCount)", 30 | "values (#{doctorId,jdbcType=INTEGER}, #{schedulingNoonbreak,jdbcType=CHAR}, ", 31 | "#{schedulingStarttime,jdbcType=TIMESTAMP}, #{schedulingEndtime,jdbcType=TIMESTAMP}, ", 32 | "#{schedulingWeekday,jdbcType=VARCHAR}, #{schedulingLimitcount,jdbcType=INTEGER}, ", 33 | "#{schedulingRestcount,jdbcType=INTEGER})" 34 | }) 35 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="schedulingInfoId", before=false, resultType=Integer.class) 36 | int insert(SchedulingInfo record); 37 | 38 | int insertSelective(SchedulingInfo record); 39 | 40 | List selectByExample(SchedulingInfoExample example); 41 | 42 | @Select({ 43 | "select", 44 | "Scheduling_Info_ID, Doctor_ID, Scheduling_NoonBreak, Scheduling_StartTime, Scheduling_EndTime, ", 45 | "Scheduling_Weekday, Scheduling_LimitCount, Scheduling_RestCount", 46 | "from scheduling_info", 47 | "where Scheduling_Info_ID = #{schedulingInfoId,jdbcType=INTEGER}" 48 | }) 49 | @ResultMap("BaseResultMap") 50 | SchedulingInfo selectByPrimaryKey(Integer schedulingInfoId); 51 | 52 | int updateByExampleSelective(@Param("record") SchedulingInfo record, @Param("example") SchedulingInfoExample example); 53 | 54 | int updateByExample(@Param("record") SchedulingInfo record, @Param("example") SchedulingInfoExample example); 55 | 56 | int updateByPrimaryKeySelective(SchedulingInfo record); 57 | 58 | @Update({ 59 | "update scheduling_info", 60 | "set Doctor_ID = #{doctorId,jdbcType=INTEGER},", 61 | "Scheduling_NoonBreak = #{schedulingNoonbreak,jdbcType=CHAR},", 62 | "Scheduling_StartTime = #{schedulingStarttime,jdbcType=TIMESTAMP},", 63 | "Scheduling_EndTime = #{schedulingEndtime,jdbcType=TIMESTAMP},", 64 | "Scheduling_Weekday = #{schedulingWeekday,jdbcType=VARCHAR},", 65 | "Scheduling_LimitCount = #{schedulingLimitcount,jdbcType=INTEGER},", 66 | "Scheduling_RestCount = #{schedulingRestcount,jdbcType=INTEGER}", 67 | "where Scheduling_Info_ID = #{schedulingInfoId,jdbcType=INTEGER}" 68 | }) 69 | int updateByPrimaryKey(SchedulingInfo record); 70 | List getAllSchedulingInfoWithUserName(); 71 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/SchedulingRule.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | 5 | public class SchedulingRule { 6 | private Integer schedulingRuleId; 7 | 8 | private Integer doctorId; 9 | 10 | private String schedulingRuleNoonbreak; 11 | 12 | private Date schedulingRuleStarttime; 13 | 14 | private Date schedulingRuleEndtime; 15 | 16 | private String schedulingRuleWeekday; 17 | 18 | private Integer schedulingRuleLimitcount; 19 | 20 | public SchedulingRule(Integer schedulingRuleId, Integer doctorId, String schedulingRuleNoonbreak, Date schedulingRuleStarttime, Date schedulingRuleEndtime, String schedulingRuleWeekday, Integer schedulingRuleLimitcount) { 21 | this.schedulingRuleId = schedulingRuleId; 22 | this.doctorId = doctorId; 23 | this.schedulingRuleNoonbreak = schedulingRuleNoonbreak; 24 | this.schedulingRuleStarttime = schedulingRuleStarttime; 25 | this.schedulingRuleEndtime = schedulingRuleEndtime; 26 | this.schedulingRuleWeekday = schedulingRuleWeekday; 27 | this.schedulingRuleLimitcount = schedulingRuleLimitcount; 28 | } 29 | 30 | public SchedulingRule() { 31 | super(); 32 | } 33 | 34 | public Integer getSchedulingRuleId() { 35 | return schedulingRuleId; 36 | } 37 | 38 | public void setSchedulingRuleId(Integer schedulingRuleId) { 39 | this.schedulingRuleId = schedulingRuleId; 40 | } 41 | 42 | public Integer getDoctorId() { 43 | return doctorId; 44 | } 45 | 46 | public void setDoctorId(Integer doctorId) { 47 | this.doctorId = doctorId; 48 | } 49 | 50 | public String getSchedulingRuleNoonbreak() { 51 | return schedulingRuleNoonbreak; 52 | } 53 | 54 | public void setSchedulingRuleNoonbreak(String schedulingRuleNoonbreak) { 55 | this.schedulingRuleNoonbreak = schedulingRuleNoonbreak == null ? null : schedulingRuleNoonbreak.trim(); 56 | } 57 | 58 | public Date getSchedulingRuleStarttime() { 59 | return schedulingRuleStarttime; 60 | } 61 | 62 | public void setSchedulingRuleStarttime(Date schedulingRuleStarttime) { 63 | this.schedulingRuleStarttime = schedulingRuleStarttime; 64 | } 65 | 66 | public Date getSchedulingRuleEndtime() { 67 | return schedulingRuleEndtime; 68 | } 69 | 70 | public void setSchedulingRuleEndtime(Date schedulingRuleEndtime) { 71 | this.schedulingRuleEndtime = schedulingRuleEndtime; 72 | } 73 | 74 | public String getSchedulingRuleWeekday() { 75 | return schedulingRuleWeekday; 76 | } 77 | 78 | public void setSchedulingRuleWeekday(String schedulingRuleWeekday) { 79 | this.schedulingRuleWeekday = schedulingRuleWeekday == null ? null : schedulingRuleWeekday.trim(); 80 | } 81 | 82 | public Integer getSchedulingRuleLimitcount() { 83 | return schedulingRuleLimitcount; 84 | } 85 | 86 | public void setSchedulingRuleLimitcount(Integer schedulingRuleLimitcount) { 87 | this.schedulingRuleLimitcount = schedulingRuleLimitcount; 88 | } 89 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/SchedulingRuleMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.List; 4 | 5 | import edu.neu.hoso.example.SchedulingRuleExample; 6 | import org.apache.ibatis.annotations.Delete; 7 | import org.apache.ibatis.annotations.Insert; 8 | import org.apache.ibatis.annotations.Param; 9 | import org.apache.ibatis.annotations.ResultMap; 10 | import org.apache.ibatis.annotations.Select; 11 | import org.apache.ibatis.annotations.SelectKey; 12 | import org.apache.ibatis.annotations.Update; 13 | 14 | public interface SchedulingRuleMapper { 15 | int countByExample(SchedulingRuleExample example); 16 | 17 | int deleteByExample(SchedulingRuleExample example); 18 | 19 | @Delete({ 20 | "delete from scheduling_rule", 21 | "where Scheduling_Rule_ID = #{schedulingRuleId,jdbcType=INTEGER}" 22 | }) 23 | int deleteByPrimaryKey(Integer schedulingRuleId); 24 | 25 | @Insert({ 26 | "insert into scheduling_rule (Doctor_ID, Scheduling_Rule_NoonBreak, ", 27 | "Scheduling_Rule_StartTime, Scheduling_Rule_EndTime, ", 28 | "Scheduling_Rule_Weekday, Scheduling_Rule_LimitCount)", 29 | "values (#{doctorId,jdbcType=INTEGER}, #{schedulingRuleNoonbreak,jdbcType=VARCHAR}, ", 30 | "#{schedulingRuleStarttime,jdbcType=TIMESTAMP}, #{schedulingRuleEndtime,jdbcType=TIMESTAMP}, ", 31 | "#{schedulingRuleWeekday,jdbcType=VARCHAR}, #{schedulingRuleLimitcount,jdbcType=INTEGER})" 32 | }) 33 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="schedulingRuleId", before=false, resultType=Integer.class) 34 | int insert(SchedulingRule record); 35 | 36 | int insertSelective(SchedulingRule record); 37 | 38 | List selectByExample(SchedulingRuleExample example); 39 | 40 | @Select({ 41 | "select", 42 | "Scheduling_Rule_ID, Doctor_ID, Scheduling_Rule_NoonBreak, Scheduling_Rule_StartTime, ", 43 | "Scheduling_Rule_EndTime, Scheduling_Rule_Weekday, Scheduling_Rule_LimitCount", 44 | "from scheduling_rule", 45 | "where Scheduling_Rule_ID = #{schedulingRuleId,jdbcType=INTEGER}" 46 | }) 47 | @ResultMap("BaseResultMap") 48 | SchedulingRule selectByPrimaryKey(Integer schedulingRuleId); 49 | 50 | int updateByExampleSelective(@Param("record") SchedulingRule record, @Param("example") SchedulingRuleExample example); 51 | 52 | int updateByExample(@Param("record") SchedulingRule record, @Param("example") SchedulingRuleExample example); 53 | 54 | int updateByPrimaryKeySelective(SchedulingRule record); 55 | 56 | @Update({ 57 | "update scheduling_rule", 58 | "set Doctor_ID = #{doctorId,jdbcType=INTEGER},", 59 | "Scheduling_Rule_NoonBreak = #{schedulingRuleNoonbreak,jdbcType=VARCHAR},", 60 | "Scheduling_Rule_StartTime = #{schedulingRuleStarttime,jdbcType=TIMESTAMP},", 61 | "Scheduling_Rule_EndTime = #{schedulingRuleEndtime,jdbcType=TIMESTAMP},", 62 | "Scheduling_Rule_Weekday = #{schedulingRuleWeekday,jdbcType=VARCHAR},", 63 | "Scheduling_Rule_LimitCount = #{schedulingRuleLimitcount,jdbcType=INTEGER}", 64 | "where Scheduling_Rule_ID = #{schedulingRuleId,jdbcType=INTEGER}" 65 | }) 66 | int updateByPrimaryKey(SchedulingRule record); 67 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Treatment.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class Treatment { 7 | private Integer treatmentId; 8 | 9 | private Integer medicalRecordId; 10 | 11 | private Integer doctorId; 12 | 13 | private Date submitTime; 14 | 15 | /* 对应的处置条目对象 重载了构造方法 新建了getter和setter 同时修改Mapper @29-y 2019.06.17*/ 16 | private List treatmentItemsList; 17 | 18 | public Treatment(Integer treatmentId, Integer medicalRecordId, Integer doctorId, Date submitTime) { 19 | this.treatmentId = treatmentId; 20 | this.medicalRecordId = medicalRecordId; 21 | this.doctorId = doctorId; 22 | this.submitTime = submitTime; 23 | } 24 | 25 | public Treatment(Integer treatmentId, Integer medicalRecordId, Integer doctorId, Date submitTime, List treatmentItemsList) { 26 | this.treatmentId = treatmentId; 27 | this.medicalRecordId = medicalRecordId; 28 | this.doctorId = doctorId; 29 | this.submitTime = submitTime; 30 | this.treatmentItemsList = treatmentItemsList; 31 | } 32 | 33 | public List getTreatmentItemsList() { 34 | return treatmentItemsList; 35 | } 36 | 37 | public void setTreatmentItemsList(List treatmentItemsList) { 38 | this.treatmentItemsList = treatmentItemsList; 39 | } 40 | 41 | public Treatment() { 42 | super(); 43 | } 44 | 45 | public Integer getTreatmentId() { 46 | return treatmentId; 47 | } 48 | 49 | public void setTreatmentId(Integer treatmentId) { 50 | this.treatmentId = treatmentId; 51 | } 52 | 53 | public Integer getMedicalRecordId() { 54 | return medicalRecordId; 55 | } 56 | 57 | public void setMedicalRecordId(Integer medicalRecordId) { 58 | this.medicalRecordId = medicalRecordId; 59 | } 60 | 61 | public Integer getDoctorId() { 62 | return doctorId; 63 | } 64 | 65 | public void setDoctorId(Integer doctorId) { 66 | this.doctorId = doctorId; 67 | } 68 | 69 | public Date getSubmitTime() { 70 | return submitTime; 71 | } 72 | 73 | public void setSubmitTime(Date submitTime) { 74 | this.submitTime = submitTime; 75 | } 76 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/TreatmentItemsMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.TreatmentItemsExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface TreatmentItemsMapper { 14 | int countByExample(TreatmentItemsExample example); 15 | 16 | int deleteByExample(TreatmentItemsExample example); 17 | 18 | @Delete({ 19 | "delete from treatment_items", 20 | "where Treatment_Items_ID = #{treatmentItemsId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer treatmentItemsId); 23 | 24 | @Insert({ 25 | "insert into treatment_items (Treatment_ID, Fmedical_Items_ID, ", 26 | "Quantity, Actual_Quantity, ", 27 | "Expense_Items_ID, Valid_Status)", 28 | "values (#{treatmentId,jdbcType=INTEGER}, #{fmedicalItemsId,jdbcType=INTEGER}, ", 29 | "#{quantity,jdbcType=INTEGER}, #{actualQuantity,jdbcType=INTEGER}, ", 30 | "#{expenseItemsId,jdbcType=INTEGER}, #{validStatus,jdbcType=VARCHAR})" 31 | }) 32 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="treatmentItemsId", before=false, resultType=Integer.class) 33 | int insert(TreatmentItems record); 34 | 35 | int insertSelective(TreatmentItems record); 36 | 37 | List selectByExample(TreatmentItemsExample example); 38 | 39 | @Select({ 40 | "select", 41 | "Treatment_Items_ID, Treatment_ID, Fmedical_Items_ID, Quantity, Actual_Quantity, ", 42 | "Expense_Items_ID, Valid_Status", 43 | "from treatment_items", 44 | "where Treatment_Items_ID = #{treatmentItemsId,jdbcType=INTEGER}" 45 | }) 46 | @ResultMap("BaseResultMap") 47 | TreatmentItems selectByPrimaryKey(Integer treatmentItemsId); 48 | 49 | int updateByExampleSelective(@Param("record") TreatmentItems record, @Param("example") TreatmentItemsExample example); 50 | 51 | int updateByExample(@Param("record") TreatmentItems record, @Param("example") TreatmentItemsExample example); 52 | 53 | int updateByPrimaryKeySelective(TreatmentItems record); 54 | 55 | @Update({ 56 | "update treatment_items", 57 | "set Treatment_ID = #{treatmentId,jdbcType=INTEGER},", 58 | "Fmedical_Items_ID = #{fmedicalItemsId,jdbcType=INTEGER},", 59 | "Quantity = #{quantity,jdbcType=INTEGER},", 60 | "Actual_Quantity = #{actualQuantity,jdbcType=INTEGER},", 61 | "Expense_Items_ID = #{expenseItemsId,jdbcType=INTEGER},", 62 | "Valid_Status = #{validStatus,jdbcType=VARCHAR}", 63 | "where Treatment_Items_ID = #{treatmentItemsId,jdbcType=INTEGER}" 64 | }) 65 | int updateByPrimaryKey(TreatmentItems record); 66 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/TreatmentMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.TreatmentExample; 4 | import java.util.List; 5 | import org.apache.ibatis.annotations.Delete; 6 | import org.apache.ibatis.annotations.Insert; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.apache.ibatis.annotations.ResultMap; 9 | import org.apache.ibatis.annotations.Select; 10 | import org.apache.ibatis.annotations.SelectKey; 11 | import org.apache.ibatis.annotations.Update; 12 | 13 | public interface TreatmentMapper { 14 | int countByExample(TreatmentExample example); 15 | 16 | int deleteByExample(TreatmentExample example); 17 | 18 | @Delete({ 19 | "delete from treatment", 20 | "where Treatment_ID = #{treatmentId,jdbcType=INTEGER}" 21 | }) 22 | int deleteByPrimaryKey(Integer treatmentId); 23 | 24 | @Insert({ 25 | "insert into treatment (Medical_Record_ID, Doctor_ID, ", 26 | "Submit_Time)", 27 | "values (#{medicalRecordId,jdbcType=INTEGER}, #{doctorId,jdbcType=INTEGER}, ", 28 | "#{submitTime,jdbcType=TIMESTAMP})" 29 | }) 30 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="treatmentId", before=false, resultType=Integer.class) 31 | int insert(Treatment record); 32 | 33 | int insertSelective(Treatment record); 34 | 35 | List selectByExample(TreatmentExample example); 36 | 37 | @Select({ 38 | "select", 39 | "Treatment_ID, Medical_Record_ID, Doctor_ID, Submit_Time", 40 | "from treatment", 41 | "where Treatment_ID = #{treatmentId,jdbcType=INTEGER}" 42 | }) 43 | @ResultMap("BaseResultMap") 44 | Treatment selectByPrimaryKey(Integer treatmentId); 45 | 46 | int updateByExampleSelective(@Param("record") Treatment record, @Param("example") TreatmentExample example); 47 | 48 | int updateByExample(@Param("record") Treatment record, @Param("example") TreatmentExample example); 49 | 50 | int updateByPrimaryKeySelective(Treatment record); 51 | 52 | @Update({ 53 | "update treatment", 54 | "set Medical_Record_ID = #{medicalRecordId,jdbcType=INTEGER},", 55 | "Doctor_ID = #{doctorId,jdbcType=INTEGER},", 56 | "Submit_Time = #{submitTime,jdbcType=TIMESTAMP}", 57 | "where Treatment_ID = #{treatmentId,jdbcType=INTEGER}" 58 | }) 59 | int updateByPrimaryKey(Treatment record); 60 | 61 | @Select({ 62 | "select t.*,ti.*,f.* " , 63 | "from treatment t join treatment_items ti on t.Treatment_ID = ti.Treatment_ID join fmedical_items f on f.Fmedical_Items_ID=ti.Fmedical_Items_ID " , 64 | "where t.Treatment_ID = #{treatmentId,jdbcType=INTEGER} " 65 | }) 66 | @ResultMap("SecondResultMap") 67 | Treatment selectTreatmentById(Integer treatmentId); 68 | 69 | @Select({ 70 | "select t.*,ti.*,f.*,d.* " , 71 | "from treatment t join treatment_items ti on t.Treatment_ID = ti.Treatment_ID join fmedical_items f on f.Fmedical_Items_ID=ti.Fmedical_Items_ID join department d on d.Department_ID = f.Department_ID " , 72 | "where t.Medical_Record_ID = #{medicalRecordId,jdbcType=INTEGER} " 73 | }) 74 | @ResultMap("SecondResultMap") 75 | List listTreatmentByMedicalRecordId(Integer medicalRecordId); 76 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/UserMapper.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import edu.neu.hoso.example.UserExample; 4 | import org.apache.ibatis.annotations.*; 5 | 6 | import java.util.List; 7 | 8 | public interface UserMapper { 9 | int countByExample(UserExample example); 10 | 11 | int deleteByExample(UserExample example); 12 | 13 | @Delete({ 14 | "delete from user", 15 | "where User_ID = #{userId,jdbcType=INTEGER}" 16 | }) 17 | int deleteByPrimaryKey(Integer userId); 18 | 19 | @Insert({ 20 | "insert into user (User_loginName, User_password, ", 21 | "Role_ID, User_Name, ", 22 | "Department_ID, User_Title_ID, ", 23 | "User_Gender, User_Status, ", 24 | "User_Scheduling_LimitCount)", 25 | "values (#{userLoginname,jdbcType=VARCHAR}, #{userPassword,jdbcType=VARCHAR}, ", 26 | "#{roleId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, ", 27 | "#{departmentId,jdbcType=INTEGER}, #{userTitleId,jdbcType=INTEGER}, ", 28 | "#{userGender,jdbcType=CHAR}, #{userStatus,jdbcType=CHAR}, ", 29 | "#{userSchedulingLimitcount,jdbcType=INTEGER})" 30 | }) 31 | @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="userId", before=false, resultType=Integer.class) 32 | int insert(User record); 33 | 34 | int insertSelective(User record); 35 | 36 | List selectByExample(UserExample example); 37 | 38 | @Select({ 39 | "select", 40 | "User_ID, User_loginName, User_password, Role_ID, User_Name, Department_ID, User_Title_ID, ", 41 | "User_Gender, User_Status, User_Scheduling_LimitCount", 42 | "from user", 43 | "where User_ID = #{userId,jdbcType=INTEGER}" 44 | }) 45 | @ResultMap("BaseResultMap") 46 | User selectByPrimaryKey(Integer userId); 47 | 48 | int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example); 49 | 50 | int updateByExample(@Param("record") User record, @Param("example") UserExample example); 51 | 52 | int updateByPrimaryKeySelective(User record); 53 | 54 | @Update({ 55 | "update user", 56 | "set User_loginName = #{userLoginname,jdbcType=VARCHAR},", 57 | "User_password = #{userPassword,jdbcType=VARCHAR},", 58 | "Role_ID = #{roleId,jdbcType=INTEGER},", 59 | "User_Name = #{userName,jdbcType=VARCHAR},", 60 | "Department_ID = #{departmentId,jdbcType=INTEGER},", 61 | "User_Title_ID = #{userTitleId,jdbcType=INTEGER},", 62 | "User_Gender = #{userGender,jdbcType=CHAR},", 63 | "User_Status = #{userStatus,jdbcType=CHAR},", 64 | "User_Scheduling_LimitCount = #{userSchedulingLimitcount,jdbcType=INTEGER}", 65 | "where User_ID = #{userId,jdbcType=INTEGER}" 66 | }) 67 | int updateByPrimaryKey(User record); 68 | @Select({"SELECT department.Department_Type " , 69 | "FROM `user`,department " , 70 | "WHERE `user`.Department_ID=department.Department_ID AND `user`.User_ID =#{userID};"}) 71 | String FindDepartmentTypeByUserID(int userID); 72 | 73 | List getUserByRole(Integer roleId); 74 | 75 | List getAllUserWithRole(); 76 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/WorkLoadRequest.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | import java.util.List; 4 | 5 | public class WorkLoadRequest { 6 | private String sdate; 7 | private String edate; 8 | 9 | 10 | public String getDate() { 11 | return date; 12 | } 13 | 14 | public void setDate(String date) { 15 | this.date = date; 16 | } 17 | 18 | public double getDrugCost() { 19 | return drugCost; 20 | } 21 | 22 | public void setDrugCost(double drugCost) { 23 | this.drugCost = drugCost; 24 | } 25 | 26 | public double getRegistrateCost() { 27 | return registrateCost; 28 | } 29 | 30 | public void setRegistrateCost(double registrateCost) { 31 | this.registrateCost = registrateCost; 32 | } 33 | 34 | public double getMaterialCost() { 35 | return materialCost; 36 | } 37 | 38 | public void setMaterialCost(double materialCost) { 39 | this.materialCost = materialCost; 40 | } 41 | 42 | public double getExaminateCost() { 43 | return examinateCost; 44 | } 45 | 46 | public void setExaminateCost(double examinateCost) { 47 | this.examinateCost = examinateCost; 48 | } 49 | 50 | public double getTreatCost() { 51 | return treatCost; 52 | } 53 | 54 | public void setTreatCost(double treatCost) { 55 | this.treatCost = treatCost; 56 | } 57 | 58 | public double getQtCost() { 59 | return qtCost; 60 | } 61 | 62 | public void setQtCost(double qtCost) { 63 | this.qtCost = qtCost; 64 | } 65 | 66 | public double getTotalCost() { 67 | return totalCost; 68 | } 69 | 70 | public void setTotalCost(double totalCost) { 71 | this.totalCost = totalCost; 72 | } 73 | 74 | public int[] getInvoiceIDs() { 75 | return invoiceIDs; 76 | } 77 | 78 | public void setInvoiceIDs(int[] invoiceIDs) { 79 | this.invoiceIDs = invoiceIDs; 80 | } 81 | 82 | private int departmentID; 83 | 84 | public int getUserID() { 85 | return userID; 86 | } 87 | 88 | public void setUserID(int userID) { 89 | this.userID = userID; 90 | } 91 | 92 | private int userID; 93 | private String date; 94 | private double drugCost; 95 | private double registrateCost; 96 | private double materialCost; 97 | private double examinateCost; 98 | private double treatCost; 99 | private double qtCost; 100 | private double totalCost; 101 | private int[] invoiceIDs; 102 | 103 | public int getDoctorID() { 104 | return doctorID; 105 | } 106 | 107 | public void setDoctorID(int doctorID) { 108 | this.doctorID = doctorID; 109 | } 110 | 111 | private int doctorID; 112 | public int getDepartmentID() { 113 | return departmentID; 114 | } 115 | 116 | public void setDepartmentID(int departmentID) { 117 | this.departmentID = departmentID; 118 | } 119 | 120 | public String getSdate() { 121 | return sdate; 122 | } 123 | 124 | public void setSdate(String sdate) { 125 | this.sdate = sdate; 126 | } 127 | 128 | public String getEdate() { 129 | return edate; 130 | } 131 | 132 | public void setEdate(String edate) { 133 | this.edate = edate; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/model/Workload.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.model; 2 | 3 | public class Workload { 4 | private String Expense_Type_Name; 5 | private double Costs; 6 | 7 | public Workload(String expense_Type_Name, double costs) { 8 | Expense_Type_Name = expense_Type_Name; 9 | Costs = costs; 10 | } 11 | 12 | @Override 13 | public String toString() { 14 | return "Workload{" + 15 | "Expense_Type_Name='" + Expense_Type_Name + '\'' + 16 | ", Costs=" + Costs + 17 | '}'; 18 | } 19 | 20 | public String getExpense_Type_Name() { 21 | return Expense_Type_Name; 22 | } 23 | 24 | public void setExpense_Type_Name(String expense_Type_Name) { 25 | Expense_Type_Name = expense_Type_Name; 26 | } 27 | 28 | public double getCosts() { 29 | return Costs; 30 | } 31 | 32 | public void setCosts(double costs) { 33 | Costs = costs; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/CalculationTypeService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.CalculationType; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: CalculationTypeService 9 | * @package edu.neu.hoso.service 10 | * @description: 结算类别类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-11 14:37 13 | * @version: V1.0 14 | */ 15 | public interface CalculationTypeService { 16 | Integer insert(CalculationType calculationType); 17 | void deleteById(Integer id); 18 | void deleteByName(String name); 19 | void update(CalculationType calculationType); 20 | CalculationType getCalculationTypeById(Integer id); 21 | List getCalculationTypeByName(String name); 22 | List getAllCalculationType(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/CommonlyUsedService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.CommonlyUsedDiagnosis; 4 | import edu.neu.hoso.model.CommonlyUsedDrugs; 5 | import edu.neu.hoso.model.CommonlyUsedFmedical; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @title: CommonlyUsedService 11 | * @package edu.neu.hoso.service 12 | * @description: 定义对医生常用项的操作 13 | * @author: 29-y 14 | * @date: 2019-06-14 10:26 15 | * @version: V1.0 16 | */ 17 | public interface CommonlyUsedService { 18 | // 获取常用药品 19 | List listCommonlyUsedDrugsByUserId(Integer userId); 20 | // 获取常用成药 21 | List listCommonlyUsedPatentDrugsByUserId(Integer userId); 22 | // 获取常用草药 23 | List listCommonlyUsedHerbalDrugsByUserId(Integer userId); 24 | // 获取常用诊断 25 | List listCommonlyUsedDiagnosisByUserId(Integer userId); 26 | // 获取常用检查 27 | List listCommonlyUsedExamination1ByUserId(Integer userId); 28 | // 获取常用检验 29 | List listCommonlyUsedExamination2ByUserId(Integer userId); 30 | // 获取常用处置 31 | List listCommonlyUsedTreatmentByUserId(Integer userId); 32 | //获取常用中医诊断 33 | List listCommonlyUsedChineseDiagnosisByUserId(Integer userId); 34 | //获取常用西医诊断 35 | List listCommonlyUsedWesternDiagnosisByUserId(Integer userId); 36 | 37 | // 新增常用药品 38 | Integer insertCommonlyUsedDrugs(CommonlyUsedDrugs commonlyUsedDrugs); 39 | // 新增常用诊断 40 | Integer insertCommonlyUsedDiagnosis(CommonlyUsedDiagnosis commonlyUsedDiagnosis); 41 | // 新增常用检查\检验\处置 需要在后台判断类型 42 | Integer insertCommonlyUsedFmedical(CommonlyUsedFmedical commonlyUsedFmedical); 43 | 44 | // 删除常用药品 45 | void deleteCommonlyUsedDrugs(Integer commonlyUsedDrugsId); 46 | // 删除常用诊断 47 | void deleteCommonlyUsedDiagnosis(Integer commonlyUsedDiagnosisId); 48 | // 删除常用检查\检验\处置 需要在后台判断类型 49 | void deleteCommonlyUsedFmedical(Integer commonlyUsedFmedicalId); 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DayCalculateService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.DayCal; 4 | import edu.neu.hoso.model.Invoice; 5 | import edu.neu.hoso.model.User; 6 | import edu.neu.hoso.model.Workload; 7 | 8 | import java.util.Date; 9 | import java.util.List; 10 | 11 | 12 | public interface DayCalculateService { 13 | /** 14 | 方法类型:功能方法 15 | 参数:userID 16 | 返回值:发票列表 17 | 涉及表:发票 18 | 逻辑描述 :通过收费员的ID获取其经手的发票 19 | */ 20 | List FindCalInvoicesByUserID(Date startdate,Date enddate,int userID); 21 | /** 22 | 方法类型:功能方法 23 | 参数:开始时间 结束时间 uerID 24 | 返回值:日结工作量 25 | 涉及表:所有涉及到消费的表 26 | 逻辑描述 :通过用户号搜索其经手的所有收费项对应费用 27 | */ 28 | List FindWorkLoadByDateAndUserID(Date startdate, Date enddate ,int userID); 29 | List FindWorkLoadByInvoices(ListinvoiceIDs); 30 | List FindNotCalUsers(); 31 | List FindNotCalInvoicesByUserID(int userID); 32 | List UserDayCalculateHistory(Date sdate, Date edate,int userID); 33 | List AllUserDayCalculateHistory(Date startdate, Date enddate); 34 | void UpdateInvoice(List invoiceIDs); 35 | void InsertNewDayCal(DayCal dayCal); 36 | List FindHistoryCalUsers(); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DepartmentService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.ConstantItems; 4 | import edu.neu.hoso.model.Department; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: DepartmentService 10 | * @package edu.neu.hoso.service 11 | * @description: 科室类业务接口 12 | * @author: Mike 13 | * @date: 2019-06-11 11:07 14 | * @version: V1.0 15 | */ 16 | public interface DepartmentService { 17 | Integer insert(Department department); 18 | Integer insertSelective(Department department); 19 | void deleteById(Integer id); 20 | void deleteByCode(String code); 21 | void deleteByName(String name); 22 | void update(Department department); 23 | Department getDepartmentById(Integer id); 24 | List getDepartmentByCode(String code); 25 | List getDepartmentByName(String name); 26 | List getDepartmentByCategoryId(Integer categoryId); 27 | List getDepartmentByType(String type); 28 | List getAllDepartment(); 29 | List getAllDepartmentWithCategory(); 30 | List getAllDepartmentCategory(); 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DiseaseFolderService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.DiseaseFolder; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: DiseaseFolderService 9 | * @package edu.neu.hoso.service 10 | * @description: 疾病文件夹类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-17 9:32 13 | * @version: V1.0 14 | */ 15 | public interface DiseaseFolderService { 16 | Integer insert(DiseaseFolder diseaseFolder); 17 | void deleteById(Integer id); 18 | void deleteByName(String name); 19 | void update(DiseaseFolder diseaseFolder); 20 | DiseaseFolder getDiseaseFolderById(Integer id); 21 | List getDiseaseFolderByName(String name); 22 | List getAllDiseaseFolder(); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DiseaseService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Disease; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: DiseaseService 9 | * @package edu.neu.hoso.service 10 | * @description: 疾病类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-12 14:34 13 | * @version: V1.0 14 | */ 15 | public interface DiseaseService { 16 | Integer insert(Disease disease); 17 | void deleteById(Integer id); 18 | void deleteByCode(String code); 19 | void deleteByName(String name); 20 | void deleteByICD(String icd); 21 | void update(Disease disease); 22 | Disease getDiseaseById(Integer id); 23 | List getDiseaseByCode(String code); 24 | List getDiseaseByName(String name); 25 | List getDiseaseByICD(String icd); 26 | List getDiseaseByTypeId(Integer typeId); 27 | List getAllDisease(); 28 | List getAllDiseaseWithType(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DiseaseTypeService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.DiseaseType; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: DiseaseTypeService 9 | * @package edu.neu.hoso.service 10 | * @description: 疾病类别类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-12 14:40 13 | * @version: V1.0 14 | */ 15 | public interface DiseaseTypeService { 16 | Integer insert(DiseaseType diseaseType); 17 | void deleteById(Integer id); 18 | void deleteByCode(String code); 19 | void deleteByName(String name); 20 | void deleteByType(String type); 21 | void update(DiseaseType diseaseType); 22 | DiseaseType getDiseaseTypeById(Integer id); 23 | List getDiseaseTypeByCode(String code); 24 | List getDiseaseTypeByName(String name); 25 | List getDiseaseTypeByType(String type); 26 | List getAllDiseaseType(); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DispensingService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.*; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: DispensingService 9 | * @package edu.neu.hoso.service 10 | * @description:用于提供门诊发药退药服务 11 | * @author: alan 12 | * @date: 2019/6/17 11:13 13 | * @version: V1.0 14 | */ 15 | public interface DispensingService { 16 | 17 | //更改发药状态 18 | int dispensing(int Medical_record_ID, int DrugsId); 19 | 20 | //退检查检验药 21 | int returnExaminationDurgs(ExaminationDrugsItems examinationDrugsItems); 22 | 23 | //退处方药 24 | int returnPrescription(PrescriptionItems prescriptionItems); 25 | 26 | //获得所有药房检查检验药 27 | List getAllExaminationMedical(); 28 | 29 | // 获得所有药房处方药 30 | List getAllPrescriptionMedical(); 31 | 32 | //根据病历号获得Patient 33 | Patient getPatientById(int medicalRecordId); 34 | 35 | //根据非药品id获得该非药品的有效状态 36 | ExaminationFmedicalItems getFmedicalItem(int examinationFmedicalItemsId); 37 | 38 | //根据收费id获得ExpenseItems 39 | ExpenseItems getExpenseItems(int expenseItemsId); 40 | // //退检查检验药 41 | // int returExaminationDrugs(ExaminationDrugsItems examinationDrugsItems); 42 | // 43 | // //退处方药 44 | // int returPrescriptionDrugs(PrescriptionItems prescriptionItems); 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DoctorExaminationService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Examination; 4 | import edu.neu.hoso.model.ExaminationResult; 5 | import edu.neu.hoso.model.GroupExamination; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @title: DoctorExaminationService 11 | * @package edu.neu.hoso.service 12 | * @description: 13 | * @author: 29-y 14 | * @date: 2019-06-18 22:40 15 | * @version: V1.0 16 | */ 17 | public interface DoctorExaminationService { 18 | // 获取当前已开立的检查检验单列表( type: 1 检查 2 检验 ) 19 | List listExaminationByMedicalRecordId(Integer medicalRecordId, String type); 20 | 21 | // 根据ID查询具体的检查检验条目 ( type: 1 检查 2 检验 ) 22 | Examination selectExaminationById(Integer examinationId,String type); 23 | 24 | // 列出检查检验组套 ( type: 1 检查 2 检验 )( scope: 1个人、2科室、3全院 ) 25 | List listGroupExamination(Integer userId, String type, String scope); 26 | 27 | // 根据ID查找检查检验组套( type: 1 检查 2 检验 ) 28 | GroupExamination selectGroupExaminationById(Integer groupExaminationId, String type); 29 | 30 | // 存为检查检验模板 根据 检查检验组套(List<检查检验组套非药品条目表(List<检查检验组套药品条目表>)>) 31 | Integer insertGroupExamination(GroupExamination groupExamination); 32 | // 删除检查检验模板 33 | void deleteGroupExamination(Integer groupExaminationId); 34 | 35 | // 开立项目 根据 检查检验申请表(List<检查检验非药品条目表(List<检查检验药品条目表>)>)并自动生成收费条目 36 | Integer insertExamination(Examination examination); 37 | 38 | // 查看项目是否可作废 根据 非药品收费条目的ID 查找(非药品收费条目表的登记状态 【不管是否已缴费 已缴费的由用户自己去退费】) 39 | Integer ifExaminationFmedicalItemsCanCancel(Integer examinationFmedicalItemsId); 40 | 41 | // 作废项目 根据 非药品收费条目的ID 查找(更改非药品条目表的有效状态) 42 | void cancelExaminationFmedicalItems(Integer examinationFmedicalItemsId); 43 | 44 | // 查看结果 根据 examinationResultId 45 | ExaminationResult selectExaminationResultById(Integer examinationResultId); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DoctorPrescriptionService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.GroupPrescription; 4 | import edu.neu.hoso.model.Prescription; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: DoctorPrescriptionService 10 | * @package edu.neu.hoso.service 11 | * @description: 定义对处方的操作 12 | * @author: 29-y 13 | * @date: 2019-06-18 10:40 14 | * @version: V1.0 15 | */ 16 | public interface DoctorPrescriptionService { 17 | //展示成药处方组套(个人、科室、医院) 18 | List listGroupPatentPrescription(Integer userId,String scope); 19 | //展示草药处方组套(个人、科室、医院) 20 | List listGroupHerbalPrescription(Integer userId,String scope); 21 | //根据组套ID查找成药处方组套 22 | GroupPrescription selectGroupPatentPrescriptionById(Integer prescriptionId); 23 | //根据组套ID查找草药处方组套 24 | GroupPrescription selectGroupHerbalPrescriptionById(Integer prescriptionId); 25 | //插入成药组套 26 | Integer insertGroupPatentPrescription(GroupPrescription groupPrescription); 27 | //插入草药组套 28 | Integer insertGroupHerbalPrescription(GroupPrescription groupPrescription); 29 | //获取当前成药处方列表 30 | List listPatentPrescriptionByMedicalRecordId(Integer medicalRecordId); 31 | //获取当前草药处方列表 32 | List listHerbalPrescriptionByMedicalRecordId(Integer medicalRecordId); 33 | //开立成药处方 34 | Integer insertPatentPrescription(Prescription prescription); 35 | //开立草药处方 36 | Integer insertHerbalPrescription(Prescription prescription); 37 | //废除成药处方 在废除之前需要调用是否可废除函数 才能进行该操作 38 | void cancelPatentPrescription(Integer prescriptionId); 39 | //废除草药处方 在废除之前需要调用是否可废除函数 才能进行该操作 40 | void cancelHerbalPrescription(Integer prescriptionId); 41 | //判断处方是否可废除 1可废除 2不可废除 3已废除 42 | Integer ifPrescriptionCanCancel(Integer prescriptionId); 43 | //根据处方ID查找处方 44 | Prescription selectPatentPrescription(Integer prescriptionId); 45 | //根据处方ID查找草药处方 46 | Prescription selectHerbalPrescription(Integer prescriptionId); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DoctorRegistrationService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.MedicalRecord; 4 | import edu.neu.hoso.model.Registration; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: DoctorService 10 | * @package edu.neu.hoso.service 11 | * @description: 定义对门诊医生的挂号列表操作 12 | * @author: 29-y 13 | * @date: 2019-06-14 10:13 14 | * @version: V1.0 15 | */ 16 | public interface DoctorRegistrationService { 17 | // 得到该医生的个人挂号列表(挂号日期为当天) 包括:1.挂号到他自己的(除去当天下线后被别人操作的) 2.挂号到其他医生的(但是该医生已下线且未对患者进行确诊操作)被加入到自己挂号列表的 18 | List listRegistrationFromUserByUserId(Integer userId); 19 | // 得到该医生所在科室的挂号列表(挂号日期为当天) 包括:1.挂号到科室的 2.挂号到其他医生但是该医生已下线且未对患者进行确诊操作的 20 | List listRegistrationFromDepartmentByUserId(Integer userId); 21 | // 从个人的患者列表中切换病人 22 | void changePatientFromUserByMedicalRecordId(Integer medicalRecordId,Integer userId); 23 | // 从科室的患者列表中切换病人 24 | void changePatientFromDepartmentByMedicalRecordId(Integer medicalRecordId,Integer userId); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DoctorTreatmentService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.GroupTreatment; 4 | import edu.neu.hoso.model.Treatment; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: DoctorTreatmentService 10 | * @package edu.neu.hoso.service 11 | * @description: 定义对处置的操作:展示处置模板、添加处置单等 12 | * @author: 29-y 13 | * @date: 2019-06-17 20:49 14 | * @version: V1.0 15 | */ 16 | public interface DoctorTreatmentService { 17 | // 列出病历ID对应的处置单列表 18 | List listTreatmentByMedicalRecordId(Integer medicalRecordId); 19 | // 根据处置单ID得到处置单的详细内容 20 | Treatment selectTreatmentById(Integer treatmentId); 21 | // 开立处置项目 22 | Integer insertTreatment(Treatment treatment); 23 | // 插入处置组套 24 | Integer insertGroupTreatment(GroupTreatment groupTreatment); 25 | // 作废处置条目 26 | void cancelTreatmentItemsById(Integer treatmentItemsId); 27 | //判断处置条目是否可废除 1可废除 2不可废除 3已废除 28 | Integer ifTreatmentItemsCanCancel(Integer treatmentItemsId); 29 | // 展示处置组套列表 (scope 1个人、2科室、3全院) 30 | List listGroupTreatment(Integer userId, String scope); 31 | // 查找处置组套的详细信息 32 | GroupTreatment selectGroupTreatmentById(Integer groupTreatmentId); 33 | // 删除处置组套 34 | void deleteGroupTreatmentById(Integer groupTreatmentId); 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/DrugService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.ConstantItems; 4 | import edu.neu.hoso.model.Drugs; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: DrugService 10 | * @package edu.neu.hoso.service 11 | * @description: 药品类业务接口 12 | * @author: Mike 13 | * @date: 2019-06-17 11:03 14 | * @version: V1.0 15 | */ 16 | public interface DrugService { 17 | Integer insertSelective(Drugs drugs); 18 | void deleteById(Integer id); 19 | void deleteByCode(String code); 20 | void deleteByName(String name); 21 | void update(Drugs drugs); 22 | Drugs getDrugsById(Integer id); 23 | List getDrugsByCode(String code); 24 | List getDrugsByName(String name); 25 | List getDrugsByDrugsManufacturer(String drugsManufacturer); 26 | List getDrugsByMnemoniccode(String mnemoniccode); 27 | List getAllDrugs(); 28 | List getAllDrugsWithTypeAndDosage(); 29 | List getDrugsDosage(); 30 | List getDrugsType(); 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/ExpenseTypeService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.ExpenseType; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: ExpenseTypeService 9 | * @package edu.neu.hoso.service 10 | * @description: 费用科目类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-17 11:14 13 | * @version: V1.0 14 | */ 15 | public interface ExpenseTypeService { 16 | Integer insertSelective(ExpenseType expenseType); 17 | void deleteById(Integer id); 18 | void deleteByCode(String code); 19 | void deleteByName(String name); 20 | void update(ExpenseType expenseType); 21 | ExpenseType getExpenseTypeById(Integer id); 22 | List getExpenseTypeByCode(String code); 23 | List getExpenseTypeByName(String name); 24 | List getAllExpenseType(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/FmedicalItemsService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.FmedicalItems; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: FmedicalItemsService 9 | * @package edu.neu.hoso.service 10 | * @description: 非药品项目类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-17 9:41 13 | * @version: V1.0 14 | */ 15 | public interface FmedicalItemsService { 16 | Integer insert(FmedicalItems fmedicalItems); 17 | Integer insertSelective(FmedicalItems fmedicalItems); 18 | void deleteById(Integer id); 19 | void deleteByCode(String code); 20 | void deleteByName(String name); 21 | void update(FmedicalItems fmedicalItems); 22 | FmedicalItems getFmedicalItemsById(Integer id); 23 | List getFmedicalItemsByCode(String code); 24 | List getFmedicalItemsByName(String name); 25 | List getFmedicalItemsByDepartmentId(Integer departmentId); 26 | List getFmedicalItemsByMnemoniccode(String mnemoniccode); 27 | List getAllFmedicalItems(); 28 | List getAllFmedicalItemsForShow(); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/InfoListService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Disease; 4 | import edu.neu.hoso.model.Drugs; 5 | import edu.neu.hoso.model.FmedicalItems; 6 | 7 | import java.util.List; 8 | 9 | public interface InfoListService { 10 | //展示所有的成药 11 | List listPatentDrugs(); 12 | //展示所有的草药 13 | List listHerbalDrugs(); 14 | //展示所有的检查 15 | List listExamination1(); 16 | //展示所有的检验 17 | List listExamination2(); 18 | //展示所有的处置 19 | List listTreatment(); 20 | //展示所有的中医疾病 21 | List listChineseDisease(); 22 | //展示所有的西医疾病 23 | List listWesternDisease(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/MedicalRecordHomePageService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Diagnosis; 4 | import edu.neu.hoso.model.MedicalRecordHomePage; 5 | import edu.neu.hoso.model.MedicalRecordHomePageTemplate; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @title: MedicalRecordHomePageService 11 | * @package edu.neu.hoso.service 12 | * @description: 定义对病历首页的操作 13 | * @author: 29-y 14 | * @date: 2019-06-14 10:04 15 | * @version: V1.0 16 | */ 17 | public interface MedicalRecordHomePageService { 18 | 19 | // 录入病历首页的文字部分(除初步诊断、辅助检查的部分 该部分由insertFirstDiagnosis实现) 20 | Integer insertMedicalRecordHomePage(MedicalRecordHomePage medicalRecordHomePage); 21 | // 录入初诊结果 22 | Integer insertFirstDiagnosis(List diagnosisList); 23 | // 录入终诊结果 24 | Integer insertFinalDiagnosis(List diagnosisList); 25 | // 录入辅助检查结果 26 | void insertAssistantExamination(String assistantExamination,Integer medicalRecordId); 27 | // 列出病历首页模板(1个人/2科室/3医院) 28 | List listMedicalRecordHomePageTemplate(Integer userId,String scope); 29 | // 查询病历首页模板 包括诊断信息 30 | MedicalRecordHomePageTemplate selectMedicalRecordHomePageTemplateById(Integer medicalRecordHomePageTemplateId); 31 | // 存为病历首页模板 32 | Integer insertMedicalRecordHomePageTemplate(MedicalRecordHomePageTemplate medicalRecordHomePageTemplate); 33 | //删除病历首页模板 34 | void deleteMedicalRecordHomePageTemplate(Integer medicalRecordHomePageTemplateId); 35 | 36 | // 查询病历首页内容 37 | MedicalRecordHomePage selectMedicalRecordHomePageByMedicalRecordId(Integer medicalRecordId); 38 | // 查询初诊结果 39 | List listFirstDiagnosisByMedicalRecordId(Integer medicalRecordId); 40 | // 查询终诊结果 41 | List listFinalDiagnosisByMedicalRecordId(Integer medicalRecordId); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/MedicalRecordService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.ExpenseItems; 4 | import edu.neu.hoso.model.MedicalRecord; 5 | import edu.neu.hoso.model.Registration; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @title: MedicalRecordService 11 | * @package edu.neu.hoso.service 12 | * @description: 定义对病历的操作 13 | * @author: 29-y 14 | * @date: 2019-06-14 10:24 15 | * @version: V1.0 16 | */ 17 | public interface MedicalRecordService { 18 | // 历史病历查询:查找该患者对应的历史挂号信息(包括病历首页和诊断)并返回改挂号对应的病历 19 | List listMedicalRecordHistoryByPatientId(Integer patientId); 20 | // 诊毕 21 | void treamentOver(Integer medicalRecordId); 22 | // 查询患者费用 23 | List getPatientExpenseItems(Integer medicalRecordId); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/PersonalWorkloadService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Workload; 4 | 5 | import java.util.Date; 6 | import java.util.List; 7 | 8 | public interface PersonalWorkloadService { 9 | /** 10 | 方法类型:功能方法 11 | 参数:开始时间 结束时间 医生ID 12 | 返回值:该医生的挂号费工作量(元) 13 | 涉及表:挂号表 14 | 逻辑描述 :该医生在某个时间段的所有挂号费 15 | */ 16 | double FindSumRegistrationCostsByDateAndDoctorID(Date startdate, Date enddate, int doctorID); 17 | /** 18 | 方法类型:功能方法 19 | 参数:开始时间 结束时间 医生ID 20 | 返回值:病人数量 21 | 涉及表:病例表,挂号表 22 | 逻辑描述 :查询医生在时间段内所有经手过的患者总数 23 | */ 24 | int FindPatientsByDateAndDoctorID(Date startdate, Date enddate, int doctorID); 25 | /** 26 | 方法类型:功能方法 27 | 参数:开始时间 结束时间 医生ID 28 | 返回值:该医生的所有工作量(除了患者人数和挂号总费用) 29 | 涉及表:处方 处方条目 检查 非药品检查 处置 处置条目 收费条目 收费类型 30 | 逻辑描述 :该医生在某个时间段的所有工作量 31 | */ 32 | List FindWorkloadByDateAndDoctorID(Date startdate, Date enddate, int doctorID); 33 | /** 34 | 方法类型:功能方法 35 | 参数:开始时间 结束时间 技师医生ID 36 | 返回值:该技师医生的所有工作量(除了患者人数和挂号总费用) 37 | 涉及表:检查药品 非药品检查 收费条目 收费类型 38 | 逻辑描述 :该医生在某个时间段的所有工作量 39 | */ 40 | List FindWorkloadByDateAndTechID(Date startdate, Date enddate, int techID); 41 | /** 42 | 方法类型:功能方法 43 | 参数:开始时间 结束时间 技师医生ID 44 | 返回值:该技师医生经手的所有患者人数 45 | 涉及表:检查药品 非药品检查 病例 46 | 逻辑描述 :技师医生在某个时间段的所有经手的患者个数 47 | */ 48 | int FindPaitentsByDateAndTechID(Date startdate, Date enddate, int techID); 49 | /** 50 | 方法类型:功能方法 51 | 参数:开始时间 结束时间 科室ID 52 | 返回值:病人数量 53 | 涉及表:病例表,挂号表 54 | 逻辑描述 :查询医生在时间段内所有经手过的患者总数 55 | */ 56 | int FindPatientsByDateAnddepartmentID(Date startdate, Date enddate, int departmentID); 57 | /** 58 | 方法类型:功能方法 59 | 参数:开始时间 结束时间 医生ID 60 | 返回值:该医生的挂号费工作量(元) 61 | 涉及表:挂号表 62 | 逻辑描述 :该医生在某个时间段的所有挂号费 63 | */ 64 | double FindSumRegistrationCostsByDateAnddepartmentID(Date startdate, Date enddate, int departmentID); 65 | /** 66 | 方法类型:功能方法 67 | 参数:开始时间 结束时间 科室ID 68 | 返回值:该科室所有医生的所有工作量(除了患者人数和挂号总费用) 69 | 涉及表:处方 处方条目 检查 非药品检查 处置 处置条目 收费条目 收费类型 70 | 逻辑描述 :该科室所有医生在某个时间段的所有工作量 71 | */ 72 | List FindWorkloadByDateAndDoctordepartmentID(Date startdate, Date enddate, int departmentID); 73 | /** 74 | 方法类型:功能方法 75 | 参数:开始时间 结束时间 技师科室ID 76 | 返回值:该技师科室所有医生的所有工作量(除了患者人数和挂号总费用) 77 | 涉及表: 检查 非药品检查 收费条目 收费类型 78 | 逻辑描述 :该技师科室所有医生在某个时间段的所有工作量 79 | */ 80 | List FindWorkloadByDateAndTechdepartmentID(Date startdate, Date enddate, int departmentID); 81 | /** 82 | 方法类型:功能方法 83 | 参数:开始时间 结束时间 技师科室ID 84 | 返回值:该科室所有医生的所有工作量(除了患者人数和挂号总费用) 85 | 涉及表:病例 检查 非药品检查 86 | 逻辑描述 :该科室所有医生在某个时间段的经手的病人数 87 | */ 88 | int FindPaitentsByDateAndTechdepartmentID(Date startdate, Date enddate, int techDepartmentID); 89 | /** 90 | 方法类型:功能方法 91 | 参数: 科室ID 92 | 返回值:科室类型 93 | 涉及表:科室 94 | 逻辑描述 :通过科室ID查询科室类型 95 | */ 96 | String FindDepartmentTypeByDeportmentID(int departmentID); 97 | /** 98 | 方法类型:功能方法 99 | 参数: 用户ID 100 | 返回值:科室类型 101 | 涉及表:科室 用户 102 | 逻辑描述 :通过UserID查询科室类型 103 | */ 104 | String FindDepartmentTypeByDoctorID(int doctorID); 105 | } 106 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/RegistrationLevelService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.RegistrationLevel; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @title: RegistrationLevelService 9 | * @package edu.neu.hoso.service 10 | * @description: 挂号级别类业务接口 11 | * @author: Mike 12 | * @date: 2019-06-11 14:28 13 | * @version: V1.0 14 | */ 15 | public interface RegistrationLevelService { 16 | Integer insert(RegistrationLevel registrationLevel); 17 | void deleteById(Integer id); 18 | void deleteByName(String name); 19 | void update(RegistrationLevel registrationLevel); 20 | RegistrationLevel getRegistrationLevelById(Integer id); 21 | List getRegistrationLevelByName(String name); 22 | List getRegistrationLevelByIsDefault(String isDefault); 23 | List getAllRegistrationLevel(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/RegistrationService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.*; 4 | 5 | import java.util.Date; 6 | import java.util.List; 7 | 8 | /** 9 | * @title: RegistrationService 10 | * @package edu.neu.hoso.service 11 | * @description: 挂号类业务接口 12 | * @author: Mike 13 | * @date: 2019-06-13 14:07 14 | * @version: V1.0 15 | */ 16 | public interface RegistrationService { 17 | Integer insert(Registration registration); 18 | Integer insertSelective(Registration registration); 19 | void deleteById(Integer id); 20 | void update(Registration registration); 21 | Registration getRegistrationById(Integer id); 22 | List getAllRegistration(); 23 | List getRegistrationByMedicalRecordId(Integer medicalRecordId); 24 | List getRegistration(); 25 | Registration register(Registration registration, Patient patient, MedicalRecord medicalRecord, ExpenseItems expenseItems, Integer userId, Integer payModeId); 26 | List getPatientByIdentity(String patientIdentity); 27 | void updateSchedulingRestcount(Registration registration); 28 | void withdraw(Integer expenseItemsId, Integer userId); 29 | void charge(List expenseItemsIds, Integer userId, Integer payModeId); 30 | void refund(List expenseItemsIds, Integer userId); 31 | Invoice offsetInvoice(Invoice oldInvoice, Integer userId); 32 | List getPatientPayExpenseItems(Integer medicalRecordId, Date startDate, Date endDate); 33 | List getPatientUnPayExpenseItems(Integer medicalRecordId); 34 | List getAllPatient(); 35 | List getAllExpenseItems(); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/RoleService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Role; 4 | 5 | public interface RoleService { 6 | Role findRoleByID(int roleID); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/SchedulingService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.SchedulingInfo; 4 | import edu.neu.hoso.model.SchedulingRule; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: SchedulingService 10 | * @package edu.neu.hoso.service 11 | * @description: 排班类业务接口 12 | * @author: Mike 13 | * @date: 2019-06-17 10:10 14 | * @version: V1.0 15 | */ 16 | public interface SchedulingService { 17 | Integer insertSelectiveInfo(SchedulingInfo schedulingInfo); 18 | void deleteInfoById(Integer id); 19 | void deleteInfoByDoctorId(Integer doctorId); 20 | void updateInfo(Integer doctorId, String weekday, String noonbreak, SchedulingRule schedulingRule); 21 | SchedulingInfo getSchedulingInfoById(Integer id); 22 | List getSchedulingInfoByDoctorId(Integer doctorId); 23 | List getSchedulingInfoByWeekday(String weekday); 24 | List getAllSchedulingInfo(); 25 | 26 | Integer insertSelectiveRule(SchedulingInfo schedulingInfo); 27 | void deleteRuleById(Integer id); 28 | void deleteRuleByDoctorId(Integer doctorId); 29 | void updateRule(SchedulingRule schedulingRule); 30 | SchedulingRule getSchedulingRuleById(Integer id); 31 | List getSchedulingRuleByDoctorId(Integer doctorId); 32 | List getSchedulingRuleByWeekday(String weekday); 33 | List getAllSchedulingRule(); 34 | 35 | List getAllSchedulingInfoWithUserName(); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/SerialNumberService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import java.text.ParseException; 4 | 5 | public interface SerialNumberService { 6 | public String generateSerialNumber(int choice) throws ParseException; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/TechService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.*; 4 | 5 | import java.util.List; 6 | 7 | public interface TechService { 8 | 9 | // 根据病历号查到患者的信息 10 | Patient getInfoByMedical_record_ID(int Medical_record_ID); 11 | 12 | // 根据姓名查到患者的信息 13 | List getInfoByPatient_Name(String name); 14 | 15 | //根据病历号获得该科室的非药品项目 16 | List getAllFmedicalByMedicalID(int Medical_record_ID, int Department_ID); 17 | 18 | //更新患者在该科室的登记状态,该科室的1->2 19 | void updateRegistrationStatus(int examinationFmedicalItemdId); 20 | 21 | //输出该患者在该科室的全部项目 22 | List getAllFmedical(int Medical_record_ID, int Department_ID); 23 | 24 | //将数据插入Examination_Drugs_Items表中并加入Expense_Items中,并将其生成的expenseid加入Examination_Drugs_Items表中 25 | void insertExaminationDrugsAndExpense(List examinationDrugsItems, int patientId); 26 | 27 | //医技医生维护常用项目,向Commonly_Used_Fmedical表里面插入数据 28 | void maintainCommonFmedical(List commonlyUsedFmedicals); 29 | 30 | //检查检验结果录入 31 | void insertExaminationResult(ExaminationResult examinationResult, int examinationFmedicalItemsId); 32 | 33 | //检查检验结果照片录入 34 | void insertExaminationResultImage(int examinationResultId, String imageURL, String imageName); 35 | 36 | //根据科室号获得所有病人 37 | List getAllPatientByDepartmentId(int departmentId); 38 | 39 | //获得所有药 40 | List getAllDrugs(); 41 | 42 | //根据医生id获得其常用项目 43 | List getCommonUsedDrugs(int doctorId); 44 | 45 | //删除常用项 46 | void deleteCommonUsedDrugs(CommonlyUsedDrugs commonlyUsedDrugsList); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/UserService.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service; 2 | 3 | import edu.neu.hoso.model.Role; 4 | import edu.neu.hoso.model.User; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @title: UserService 10 | * @package edu.neu.hoso.service 11 | * @description: 用户类业务接口 12 | * @author: Mike 13 | * @date: 2019-06-11 11:07 14 | * @version: V1.0 15 | */ 16 | public interface UserService { 17 | Integer insert(User user); 18 | void deleteById(Integer id); 19 | void deleteByLoginname(String loginname); 20 | void deleteByUserName(String userName); 21 | void update(User user); 22 | User getUserById(Integer id); 23 | List getUserByLoginname(String loginname); 24 | List getUserByUserName(String userName); 25 | List getUserByRoleId(Integer roleId); 26 | List getUserByUserTitleId(Integer userTitleId); 27 | List getUserByUserGender(String userGender); 28 | List getAllUser(); 29 | List getUserByDepartmentID(int departmentID); 30 | List getUserByRole(Integer roleId); 31 | List getAllUserWithRole(); 32 | List getAllRole(); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/impl/MedicalRecordServiceImpl.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service.impl; 2 | 3 | import edu.neu.hoso.model.ExpenseItems; 4 | import edu.neu.hoso.model.ExpenseItemsMapper; 5 | import edu.neu.hoso.model.MedicalRecord; 6 | import edu.neu.hoso.model.MedicalRecordMapper; 7 | import edu.neu.hoso.service.MedicalRecordService; 8 | import org.springframework.stereotype.Service; 9 | 10 | import javax.annotation.Resource; 11 | import java.util.List; 12 | 13 | /** 14 | * @title: MedicalRecordServiceImpl 15 | * @package edu.neu.hoso.service.impl 16 | * @description: 实现对病历的操作:根据患者ID列出历史病历等 17 | * @author: 29-y 18 | * @date: 2019-06-14 10:19 19 | * @version: V1.0 20 | */ 21 | @Service 22 | public class MedicalRecordServiceImpl implements MedicalRecordService { 23 | @Resource 24 | MedicalRecordMapper medicalRecordMapper; 25 | @Resource 26 | ExpenseItemsMapper expenseItemsMapper; 27 | 28 | /** 29 | * @title: listMedicalRecordHistoryByPatientId 30 | * @description: 根据患者ID列出历史病历(诊毕的) 31 | * @author: 29-y 32 | * @date: 2019-06-17 10:18 33 | * @param: [patientId] 34 | * @return: java.util.List 35 | * @throws: 36 | */ 37 | @Override 38 | public List listMedicalRecordHistoryByPatientId(Integer patientId) { 39 | return medicalRecordMapper.listMedicalRecordHistoryByPatientId(patientId); 40 | } 41 | 42 | /** 43 | * @title: treament_Over 44 | * @description: 诊毕 45 | * @author: 29-y 46 | * @date: 2019-06-20 10:44 47 | * @param: [medicalRecordId] 48 | * @return: void 49 | * @throws: 50 | */ 51 | @Override 52 | public void treamentOver(Integer medicalRecordId) { 53 | MedicalRecord medicalRecord = new MedicalRecord(); 54 | medicalRecord.setMedicalRecordId(medicalRecordId); 55 | medicalRecord.setIsTreamentOver("2"); 56 | medicalRecordMapper.updateByPrimaryKeySelective(medicalRecord); 57 | } 58 | 59 | @Override 60 | public List getPatientExpenseItems(Integer medicalRecordId) { 61 | return expenseItemsMapper.getPatientExpenseItems(medicalRecordId); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/impl/RoleImpl.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service.impl; 2 | 3 | import edu.neu.hoso.model.Role; 4 | import edu.neu.hoso.model.RoleMapper; 5 | import edu.neu.hoso.service.RoleService; 6 | import org.springframework.stereotype.Service; 7 | 8 | import javax.annotation.Resource; 9 | 10 | @Service 11 | public class RoleImpl implements RoleService { 12 | @Resource 13 | RoleMapper roleMapper; 14 | @Override 15 | public Role findRoleByID(int roleID) { 16 | return roleMapper.selectByPrimaryKey(roleID); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/service/impl/SerialNumberServiceImpl.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.service.impl; 2 | 3 | import edu.neu.hoso.service.SerialNumberService; 4 | import edu.neu.hoso.utils.RedisUtils; 5 | import org.springframework.data.redis.core.RedisTemplate; 6 | import org.springframework.stereotype.Service; 7 | 8 | import javax.annotation.Resource; 9 | import java.text.ParseException; 10 | import java.text.SimpleDateFormat; 11 | import java.util.Date; 12 | 13 | @Service 14 | public class SerialNumberServiceImpl implements SerialNumberService { 15 | @Resource 16 | private RedisUtils redisUtils; 17 | /** 18 | * 定义流水号工单默认前缀 19 | */ 20 | private static final String SERIAL_NUMBER = "itsm:serial:"; 21 | private static final String MEDICAL_CODE = "ME"; 22 | private static final String INVOICE_NO = "IN"; 23 | 24 | @Override 25 | public String generateSerialNumber(int choice) throws ParseException { 26 | /** 27 | *@title: generateSerialNumber 28 | *@description: 生成序列号 1为ME 2为IN 29 | *@author: Mike 30 | *@date: 2019-06-14 13:53 31 | *@param: [choice] 32 | *@return: java.lang.String 33 | *@throws: 34 | */ 35 | //获取当前时间,返回格式如yyyyMMdd 36 | String date = new SimpleDateFormat("yyyyMMdd").format(new Date()); 37 | 38 | //构造redis过期时间 UnixMillis 39 | //设置过期时间为当天的最后一秒 40 | long expire = (new SimpleDateFormat("yyyyMMdd HH:mm:ss").parse(date + " 23:59:59").getTime() - new Date().getTime()) / 1000; 41 | 42 | //判断choice 43 | String code = ""; 44 | switch (choice){ 45 | case 1: 46 | code = MEDICAL_CODE; 47 | break; 48 | case 2: 49 | code = INVOICE_NO; 50 | break; 51 | } 52 | //构造redis的key 53 | String key = SERIAL_NUMBER + date + ":" + code; 54 | 55 | //判断key是否存在 56 | Boolean exists = redisUtils.hasKey(key); 57 | 58 | Long incr = redisUtils.incr(key, 1); 59 | 60 | //设置过期时间 61 | if (!exists) { 62 | redisUtils.expire(key, expire); 63 | } 64 | 65 | //默认编码需要3位,位数不够前面补0 66 | String number = String.format("%03d", incr); 67 | StringBuilder sb = new StringBuilder(20); 68 | //转换成业务需要的格式 bizCode + date + incr 69 | sb.append(code).append(date).append(number); 70 | 71 | return sb.toString(); 72 | } 73 | } -------------------------------------------------------------------------------- /src/main/java/edu/neu/hoso/utils/JsonUtils.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.utils; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | 5 | import java.util.Map; 6 | 7 | public class JsonUtils { 8 | public static String objToJson(Object obj) throws Exception { 9 | return JSON.toJSONString(obj); 10 | } 11 | 12 | public static T jsonToObj(String jsonStr, Class clazz) throws Exception { 13 | return JSON.parseObject(jsonStr, clazz); 14 | } 15 | 16 | public static Map jsonToMap(String jsonStr) throws Exception { 17 | return JSON.parseObject(jsonStr, Map.class); 18 | } 19 | 20 | public static T mapToObj(Map map, Class clazz) throws Exception { 21 | return JSON.parseObject(JSON.toJSONString(map), clazz); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hosoneu/his/77f0460e8bb9526cfbfe5c4a84b032946f54ca01/src/main/resources/ValidationMessages.properties -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /hoso 5 | session: 6 | timeout: 5m 7 | spring: 8 | http: 9 | encoding: 10 | charset: UTF-8 11 | force: true 12 | enabled: true 13 | # datasource: 14 | # url: jdbc:mysql://120.79.88.98:3306/hosoneu?characterEncoding=utf-8&serverTimezone=GMT%2B8 15 | # username: root 16 | # password: 123456 17 | # driver-class-name: com.mysql.cj.jdbc.Driver 18 | # 操作自己本地数据库进行测试 19 | # datasource: 20 | # # url: jdbc:mysql://120.79.88.98:3306/hosoneu?characterEncoding=utf-8&serverTimezone=GMT%2B8 21 | # # 29-y的url:@author 29-y 本地数据库地址 @time 2019.06.10 22 | # # url: jdbc:mysql://localhost:3306/hoso_local_dev?characterEncoding=utf-8&serverTimezone=GMT%2B8 23 | # 24 | # url: jdbc:mysql://localhost:3306/hosoneu?characterEncoding=utf-8&serverTimezone=Asia/Shanghai 25 | # username: root 26 | # password: 123456 27 | # driver-class-name: com.mysql.cj.jdbc.Driver 28 | datasource: 29 | # url: jdbc:mysql://120.79.88.98:3306/hosoneu?characterEncoding=utf-8&serverTimezone=GMT%2B8 30 | url: jdbc:mysql://120.79.88.98:3306/hosoneu?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false 31 | username: root 32 | password: 123456 33 | driver-class-name: com.mysql.cj.jdbc.Driver 34 | redis: 35 | host: 120.79.88.98 36 | password: 123456 37 | port: 6379 38 | mybatis: 39 | type-aliases-package: edu.neu.hoso.model 40 | mapper-locations: classpath:mapper/*.xml 41 | -------------------------------------------------------------------------------- /src/main/resources/mapper/WorkLoadMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/test/java/edu/neu/hoso/controller/TechControllerTest.java: -------------------------------------------------------------------------------- 1 | package edu.neu.hoso.controller; 2 | 3 | import edu.neu.hoso.dto.ResultDTO; 4 | import edu.neu.hoso.model.Registration; 5 | import edu.neu.hoso.service.TechService; 6 | import org.junit.Test; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | 9 | import java.util.List; 10 | 11 | public class TechControllerTest { 12 | 13 | // @Autowired 14 | // TechService techService; 15 | 16 | // @Test 17 | // public void getAllPatientByDepartmentId() { 18 | // System.out.println("123"); 19 | // Integer departmentId = 128; 20 | // techService.getAllPatientByDepartmentId(departmentId); 21 | //// List registrationList = techService.getAllPatientByDepartmentId(departmentId); 22 | //// for (Registration registration:registrationList){ 23 | //// System.out.println(registration.toString()); 24 | //// } 25 | // } 26 | } --------------------------------------------------------------------------------