刘韬 há 5 anos atrás
pai
commit
6d2854bd08

+ 87 - 77
DataFusion/src/com/zskk/model/_DataDictionary.txt

@@ -1,83 +1,93 @@
 Table: doctors
-----------------+---------------+------+-----+---------+---------
- Field          | Type          | Null | Key | Default | Remarks 
-----------------+---------------+------+-----+---------+---------
- id             | VARCHAR(32)   | NO   | PRI |         |         
- username       | VARCHAR(100)  | NO   |     |         | 用户名     
- password       | VARCHAR(200)  | NO   |     |         | 密码      
- realname       | VARCHAR(200)  | YES  |     |         | 真实姓名    
- email          | VARCHAR(200)  | YES  |     |         | email   
- login_time     | DATETIME(19)  | YES  |     |         | 登录时间    
- createdAt      | DATETIME(19)  | YES  |     |         | 创建时间    
- updatedAt      | DATETIME(19)  | YES  |     |         | 修改时间    
- token          | VARCHAR(255)  | YES  |     |         | 每次登陆产生新的Session标识
- phone          | VARCHAR(20)   | YES  |     |         | 电话      
- remark         | VARCHAR(1000) | YES  |     |         | 备注      
- doctor_title   | VARCHAR(255)  | YES  |     |         | 职称      
- status         | VARCHAR(50)   | YES  |     |         |         
- attachment     | VARCHAR(2000) | YES  |     |         | 附件      
- institution_id | VARCHAR(50)   | YES  |     |         | 医疗机构ID  
- department_id  | VARCHAR(50)   | YES  |     |         | 主要科室ID  
- doctor_role    | VARCHAR(20)   | YES  |     |         | 1.本地医生2.远程医生(可多选)
- login_failure  | INT(10)       | YES  |     |         | 登录失败次数  
- is_report      | VARCHAR(10)   | YES  |     |         | 是否能写报告  
- exam_class     | VARCHAR(255)  | YES  |     | *       |         
- send_sms       | INT(10)       | YES  |     | 0       |         
- message_push   | VARCHAR(10)   | YES  |     | 0       |         
-----------------+---------------+------+-----+---------+---------
+------------------+---------------+------+-----+---------+---------
+ Field            | Type          | Null | Key | Default | Remarks 
+------------------+---------------+------+-----+---------+---------
+ id               | VARCHAR(32)   | NO   | PRI |         |         
+ username         | VARCHAR(100)  | NO   |     |         | 用户名     
+ password         | VARCHAR(200)  | NO   |     |         | 密码      
+ realname         | VARCHAR(200)  | YES  |     |         | 真实姓名    
+ email            | VARCHAR(200)  | YES  |     |         | email   
+ login_time       | DATETIME(19)  | YES  |     |         | 登录时间    
+ createdAt        | DATETIME(19)  | YES  |     |         | 创建时间    
+ updatedAt        | DATETIME(19)  | YES  |     |         | 修改时间    
+ token            | VARCHAR(255)  | YES  |     |         | 每次登陆产生新的Session标识
+ phone            | VARCHAR(20)   | YES  |     |         | 电话      
+ remark           | VARCHAR(1000) | YES  |     |         | 备注      
+ doctor_title     | VARCHAR(255)  | YES  |     |         | 职称      
+ status           | VARCHAR(50)   | YES  |     |         |         
+ attachment       | VARCHAR(2000) | YES  |     |         | 附件      
+ institution_id   | VARCHAR(50)   | YES  |     |         | 医疗机构ID  
+ department_id    | VARCHAR(50)   | YES  |     |         | 主要科室ID  
+ doctor_role      | VARCHAR(20)   | YES  |     |         | 1.本地医生2.远程医生(可多选)
+ login_failure    | INT(10)       | YES  |     |         | 登录失败次数  
+ is_report        | VARCHAR(10)   | YES  |     |         | 是否能写报告  
+ exam_class       | VARCHAR(255)  | YES  |     | *       |         
+ send_sms         | VARCHAR(10)   | YES  |     | 0       | 发送短信通知  
+ message_push     | VARCHAR(10)   | YES  |     | 0       | 是否推送消息  
+ is_admin         | VARCHAR(255)  | YES  |     | 0       | 是否为管理员  
+ is_send_message  | VARCHAR(255)  | YES  |     | 0       | 登录是否发送短信
+ is_use_autograph | VARCHAR(255)  | YES  |     | 0       | 是否使用电子签名
+ autograph        | VARCHAR(255)  | YES  |     |         | 电子签名    
+------------------+---------------+------+-----+---------+---------
 
 Table: exams
--------------------+---------------+------+-----+---------+---------
- Field             | Type          | Null | Key | Default | Remarks 
--------------------+---------------+------+-----+---------+---------
- id                | VARCHAR(32)   | NO   | PRI |         |         
- dept_id           | VARCHAR(100)  | YES  |     |         | 检查科室(执行科室)
- patient_id        | VARCHAR(100)  | YES  |     |         | 患者id    
- patient_num       | VARCHAR(200)  | YES  |     |         | 病历号     
- accession_num     | VARCHAR(100)  | YES  |     |         | 科室检查号   
- exam_datetime     | VARCHAR(20)   | YES  |     |         | 检查日期    
- exam_class        | VARCHAR(200)  | YES  |     |         | 检查类型    
- exam_sub_class    | VARCHAR(200)  | YES  |     |         | 检查子类    
- exam_project      | VARCHAR(200)  | YES  |     |         | 检查项目    
- device            | VARCHAR(200)  | YES  |     |         | 检查设备    
- body_part         | VARCHAR(200)  | YES  |     |         | 检查部位    
- exam_method       | VARCHAR(200)  | YES  |     |         | 检查方法    
- hopitalized_no    | VARCHAR(200)  | YES  |     |         | 住院号     
- bed_no            | VARCHAR(200)  | YES  |     |         | 床位号     
- clin_dept_id      | VARCHAR(50)   | YES  |     |         | 送诊科室id  
- technician        | VARCHAR(200)  | YES  |     |         | 技师      
- charge            | VARCHAR(200)  | YES  |     |         | 检查费用    
- cost              | VARCHAR(200)  | YES  |     |         | 实际费用    
- clin_doctors      | VARCHAR(200)  | YES  |     |         | 送诊医生    
- phone             | VARCHAR(20)   | YES  |     |         | 联系方式    
- institution_id    | VARCHAR(200)  | YES  |     |         | 医院id    
- study_id          | VARCHAR(50)   | YES  |     |         | studyuid(studykey)
- illness_desc      | TEXT(65535)   | YES  |     |         | 主诉      
- phys_sign         | VARCHAR(200)  | YES  |     |         | 体征      
- clin_diag         | VARCHAR(1000) | YES  |     |         | 临床诊断    
- clin_symp         | VARCHAR(4000) | YES  |     |         | 临床症状    
- patient_source    | VARCHAR(20)   | YES  |     |         | 病人来源 1门诊 2住院 3外来
- req_datetime      | DATETIME(19)  | YES  |     |         | 申请时间    
- req_doctor        | VARCHAR(50)   | YES  |     |         | 申请医生(医生id)
- remark            | TEXT(65535)   | YES  |     |         | 其他说明    
- register          | VARCHAR(50)   | YES  |     |         | 登记人员( 医生id)
- register_datetime | DATETIME(19)  | YES  |     |         | 注册登记时间  
- exam_status       | TINYINT(3)    | YES  |     | 1       | 1、登记 2、开始检查3、检查完毕 4、申请 5、驳回 6、接收、7、初步报告 8、审核报告 9、确认、
- status            | VARCHAR(20)   | YES  |     | 1       | 记录状态 0禁用 1正常
- pay_status        | VARCHAR(10)   | YES  |     | 0       | 支付状态    
- is_remote         | VARCHAR(10)   | YES  |     |         | 远程诊断是被接受 0,未接受  1,已接受
- urgent            | VARCHAR(10)   | NO   |     | 0       | 是否急诊 0否  1是
- film_type         | VARCHAR(20)   | YES  |     | 0       | 0 未定义  1传统胶片  2电子胶片
- anamnesis         | VARCHAR(255)  | YES  |     |         |         
- family_ill        | VARCHAR(255)  | YES  |     |         |         
- createdAt         | DATETIME(19)  | YES  |     |         |         
- updatedAt         | DATETIME(19)  | YES  |     |         |         
- delivery_doctor   | VARCHAR(100)  | YES  |     |         | 送诊医生    
- exam_report       | VARCHAR(10)   | YES  |     |         | 检查结果    
- ext               | JSON          | YES  |     |         |         
- id_card           | VARCHAR(50)   | YES  |     |         | 身份证号    
- study_uid         | VARCHAR(100)  | YES  |     |         |         
--------------------+---------------+------+-----+---------+---------
+------------------------+---------------+------+-----+---------+---------
+ Field                  | Type          | Null | Key | Default | Remarks 
+------------------------+---------------+------+-----+---------+---------
+ id                     | VARCHAR(32)   | NO   | PRI |         |         
+ dept_id                | VARCHAR(100)  | YES  |     |         | 检查科室(执行科室)
+ patient_id             | VARCHAR(100)  | YES  |     |         | 患者id    
+ patient_num            | VARCHAR(200)  | YES  |     |         | 病历号     
+ accession_num          | VARCHAR(100)  | YES  |     |         | 科室检查号   
+ exam_datetime          | VARCHAR(20)   | YES  |     |         | 检查日期    
+ exam_class             | VARCHAR(200)  | YES  |     |         | 检查类型    
+ exam_sub_class         | VARCHAR(200)  | YES  |     |         | 检查子类    
+ exam_project           | VARCHAR(200)  | YES  |     |         | 检查项目    
+ device                 | VARCHAR(200)  | YES  |     |         | 检查设备    
+ body_part              | VARCHAR(200)  | YES  |     |         | 检查部位    
+ exam_method            | VARCHAR(200)  | YES  |     |         | 检查方法    
+ hopitalized_no         | VARCHAR(200)  | YES  |     |         | 住院号     
+ bed_no                 | VARCHAR(200)  | YES  |     |         | 床位号     
+ clin_dept_id           | VARCHAR(50)   | YES  |     |         | 送诊科室id  
+ technician             | VARCHAR(200)  | YES  |     |         | 技师      
+ charge                 | VARCHAR(200)  | YES  |     |         | 检查费用    
+ cost                   | VARCHAR(200)  | YES  |     |         | 实际费用    
+ clin_doctors           | VARCHAR(200)  | YES  |     |         | 送诊医生    
+ phone                  | VARCHAR(20)   | YES  |     |         | 联系方式    
+ institution_id         | VARCHAR(200)  | YES  |     |         | 医院id    
+ study_id               | VARCHAR(50)   | YES  |     |         | studyuid(studykey)
+ illness_desc           | TEXT(65535)   | YES  |     |         | 主诉      
+ phys_sign              | VARCHAR(200)  | YES  |     |         | 体征      
+ clin_diag              | VARCHAR(1000) | YES  |     |         | 临床诊断    
+ clin_symp              | VARCHAR(4000) | YES  |     |         | 临床症状    
+ patient_source         | VARCHAR(20)   | YES  |     |         | 病人来源 1门诊 2住院 3外来
+ req_datetime           | DATETIME(19)  | YES  |     |         | 申请时间    
+ req_doctor             | VARCHAR(50)   | YES  |     |         | 申请医生(医生id)
+ remark                 | TEXT(65535)   | YES  |     |         | 其他说明    
+ register               | VARCHAR(50)   | YES  |     |         | 登记人员( 医生id)
+ register_datetime      | DATETIME(19)  | YES  |     |         | 注册登记时间  
+ exam_status            | TINYINT(3)    | YES  |     | 1       | 1、登记 2、开始检查3、检查完毕 4、申请 5、驳回 6、接收、7、初步报告 8、审核报告 9、确认、
+ status                 | VARCHAR(20)   | YES  |     | 1       | 记录状态 0禁用 1正常
+ pay_status             | VARCHAR(10)   | YES  |     | 0       | 支付状态    
+ is_remote              | VARCHAR(10)   | YES  |     |         | 远程诊断是被接受 0,未接受  1,已接受
+ urgent                 | VARCHAR(10)   | NO   |     | 0       | 是否急诊 0否  1是
+ film_type              | VARCHAR(20)   | YES  |     | 2       | 0 未定义  1传统胶片  2电子胶片
+ anamnesis              | VARCHAR(255)  | YES  |     |         |         
+ family_ill             | VARCHAR(255)  | YES  |     |         |         
+ createdAt              | DATETIME(19)  | YES  |     |         |         
+ updatedAt              | DATETIME(19)  | YES  |     |         |         
+ delivery_doctor        | VARCHAR(100)  | YES  |     |         | 送诊医生    
+ exam_report            | VARCHAR(10)   | YES  |     |         | 检查结果    
+ ext                    | JSON          | YES  |     |         |         
+ id_card                | VARCHAR(50)   | YES  |     |         | 身份证号    
+ study_uid              | VARCHAR(100)  | YES  |     |         |         
+ application_department | VARCHAR(255)  | YES  |     |         | 申请科室    
+ application_doctor     | VARCHAR(255)  | YES  |     |         | 申请医生    
+ severe                 | VARCHAR(255)  | YES  |     | 0       | 重症标识    
+ patient_area           | VARCHAR(255)  | YES  |     |         | 病区      
+ del_doctor_name        | VARCHAR(255)  | YES  |     |         | 删除信息的医生姓名
+ del_time               | DATETIME(19)  | YES  |     |         |         
+------------------------+---------------+------+-----+---------+---------
 
 Table: patient_infos
 -----------------+--------------+------+-----+---------+---------

+ 39 - 3
DataFusion/src/com/zskk/model/base/BaseDoctors.java

@@ -189,13 +189,13 @@ public abstract class BaseDoctors<M extends BaseDoctors<M>> extends Model<M> imp
 		return getStr("exam_class");
 	}
 
-	public M setSendSms(java.lang.Integer sendSms) {
+	public M setSendSms(java.lang.String sendSms) {
 		set("send_sms", sendSms);
 		return (M)this;
 	}
 	
-	public java.lang.Integer getSendSms() {
-		return getInt("send_sms");
+	public java.lang.String getSendSms() {
+		return getStr("send_sms");
 	}
 
 	public M setMessagePush(java.lang.String messagePush) {
@@ -207,4 +207,40 @@ public abstract class BaseDoctors<M extends BaseDoctors<M>> extends Model<M> imp
 		return getStr("message_push");
 	}
 
+	public M setIsAdmin(java.lang.String isAdmin) {
+		set("is_admin", isAdmin);
+		return (M)this;
+	}
+	
+	public java.lang.String getIsAdmin() {
+		return getStr("is_admin");
+	}
+
+	public M setIsSendMessage(java.lang.String isSendMessage) {
+		set("is_send_message", isSendMessage);
+		return (M)this;
+	}
+	
+	public java.lang.String getIsSendMessage() {
+		return getStr("is_send_message");
+	}
+
+	public M setIsUseAutograph(java.lang.String isUseAutograph) {
+		set("is_use_autograph", isUseAutograph);
+		return (M)this;
+	}
+	
+	public java.lang.String getIsUseAutograph() {
+		return getStr("is_use_autograph");
+	}
+
+	public M setAutograph(java.lang.String autograph) {
+		set("autograph", autograph);
+		return (M)this;
+	}
+	
+	public java.lang.String getAutograph() {
+		return getStr("autograph");
+	}
+
 }

+ 54 - 0
DataFusion/src/com/zskk/model/base/BaseExams.java

@@ -432,4 +432,58 @@ public abstract class BaseExams<M extends BaseExams<M>> extends Model<M> impleme
 		return getStr("study_uid");
 	}
 
+	public M setApplicationDepartment(java.lang.String applicationDepartment) {
+		set("application_department", applicationDepartment);
+		return (M)this;
+	}
+	
+	public java.lang.String getApplicationDepartment() {
+		return getStr("application_department");
+	}
+
+	public M setApplicationDoctor(java.lang.String applicationDoctor) {
+		set("application_doctor", applicationDoctor);
+		return (M)this;
+	}
+	
+	public java.lang.String getApplicationDoctor() {
+		return getStr("application_doctor");
+	}
+
+	public M setSevere(java.lang.String severe) {
+		set("severe", severe);
+		return (M)this;
+	}
+	
+	public java.lang.String getSevere() {
+		return getStr("severe");
+	}
+
+	public M setPatientArea(java.lang.String patientArea) {
+		set("patient_area", patientArea);
+		return (M)this;
+	}
+	
+	public java.lang.String getPatientArea() {
+		return getStr("patient_area");
+	}
+
+	public M setDelDoctorName(java.lang.String delDoctorName) {
+		set("del_doctor_name", delDoctorName);
+		return (M)this;
+	}
+	
+	public java.lang.String getDelDoctorName() {
+		return getStr("del_doctor_name");
+	}
+
+	public M setDelTime(java.util.Date delTime) {
+		set("del_time", delTime);
+		return (M)this;
+	}
+	
+	public java.util.Date getDelTime() {
+		return get("del_time");
+	}
+
 }

+ 9 - 7
DataFusion/src/com/zskk/task/DataTask.java

@@ -25,7 +25,7 @@ public class DataTask implements ITask {
 			List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=33600001 order by createdAt desc limit 50");
 			for (Exams exams2 : exams) {
 				Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
-				Record record = Db.use("connected").findFirst("select * from reportinfo where accessionNumber=?",exams2.getAccessionNum());
+				Record record = Db.use("connected").findFirst("select * from reportinfo where studyuid=?",studies.getStudyuid());
 				if (record == null) {
 					continue;
 				}
@@ -35,8 +35,8 @@ public class DataTask implements ITask {
 				if (record.getStr("impression") == null && record.getStr("description") == null) {
 					continue;
 				}
-				report.setImpression(record.getStr("description"));
-				report.setDescription(record.getStr("impression"));
+				report.setImpression(record.getStr("impression"));
+				report.setDescription(record.getStr("description"));
 				report.setExamId(exams2.getId());
 				report.setCreatedAt(new Date());
 				report.setReportDoctorId(getDoctorIdByName(record.getStr("reportdoctor")));
@@ -47,9 +47,11 @@ public class DataTask implements ITask {
 				report.save();
 				PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
 				patientInfos.setName(record.getStr("patientname"));
-				patientInfos.setPhone(record.getStr("phone"));
-//				patientInfos.setCardNum(record.getStr("IDCARD"));
+//				patientInfos.setPhone(record.getStr("phone"));
+				patientInfos.setCardNum(record.getStr("idcard"));
 				patientInfos.update();
+				exams2.setApplicationDepartment(record.getStr("department"));
+				exams2.setApplicationDoctor(record.getStr("clinicaldoctor"));
 				exams2.setExamStatus(9);
 				exams2.update();
 				WeixinService wService = ServiceFactory.getService(WeixinService.class);
@@ -78,7 +80,7 @@ public class DataTask implements ITask {
 		if (name == null) {
 			return null;
 		}
-		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=81069902 and realname<>''", name);
+		Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=33600001 and realname<>''", name);
 		if (doctors == null) {
 			Doctors newDoctors = new Doctors().use("zskk");
 			newDoctors.setId(creatId());
@@ -98,7 +100,7 @@ public class DataTask implements ITask {
 		if (dateStr == null) {
 			return new Date();
 		}
-		SimpleDateFormat sdf= new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
+		SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 	    Date date = null;
 		try {
 			date = sdf.parse(dateStr);

+ 1 - 1
DataFusion/src/com/zskk/tools/_JFinalDemoGenerator.java

@@ -38,7 +38,7 @@ public class _JFinalDemoGenerator {
 		// 设置是否生成链式 setter 方法
 		generator.setGenerateChainSetter(false);
 		// 添加不需要生成的表名
-		generator.addExcludedTable("bodypart","constant","department","device","doctor_class","dr_cla_permission","exam_class","exam_project","exam_subclass","institution","manager","menu","messages","operating","remote_application","report_record","series","sys_logs","sys_menus","templates","bbs","images","open_application","oss_callbacks","user","user_bind","version","wechat_bind");
+		generator.addExcludedTable("bodypart","constant","department","device","doctor_class","dr_cla_permission","exam_class","exam_project","exam_subclass","images","institution","manager","menu","messages","operating","remote_application","report_record","series","sys_logs","sys_menus","templates","bbs","default_cost","every_studies","open_application","oss_callbacks","remote_contact","remote_cost","remote_order","remote_water","remote_water_log","send_message","user","user_bind","version","wechat_bind","wechat_pay_log","wechat_refund_log");
 		// 设置是否在 Model 中生成 dao 对象
 		generator.setGenerateDaoInModel(true);
 		// 设置是否生成链式 setter 方法