瀏覽代碼

历史排班

28169 1 年之前
父節點
當前提交
1f6819103c

二進制
XT_New.exe 查看文件


+ 8 - 2
controllers/dialysis_record_api_controller.go 查看文件

@@ -420,7 +420,7 @@ func (this *DialysisRecordAPIController) DialysisSchedule() {
420 420
 	allDoctor, _ := service.GetAllDoctor(adminInfo.CurrentOrgId, adminInfo.CurrentAppId)
421 421
 
422 422
 	lastAcceptTreatment, _ := service.GetLastAcceptTreatment(adminInfo.CurrentOrgId, patientID)
423
-	fmt.Println("--------------------", lastAcceptTreatment)
423
+
424 424
 	if getDryErr != nil {
425 425
 		this.ErrorLog("获取最后一条干体重失败:%v", getDryErr)
426 426
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
@@ -1146,6 +1146,7 @@ func (this *DialysisRecordAPIController) StartDialysis() {
1146 1146
 		OrderRemark:            order_remark,
1147 1147
 		CatheterOperation:      catheter_operation,
1148 1148
 		BloodFlowVolume:        blood_flow_volume,
1149
+		BloodDrawing:           blood_drawing,
1149 1150
 	}
1150 1151
 
1151 1152
 	createErr := service.MobileCreateDialysisOrder(adminUserInfo.CurrentOrgId, patientID, dialysisRecord)
@@ -1217,6 +1218,10 @@ func (this *DialysisRecordAPIController) StartDialysis() {
1217 1218
 			tempdispose = "引血" + strconv.FormatInt(blood_drawing, 10) + "ml/min"
1218 1219
 		}
1219 1220
 
1221
+		if blood_drawing > 0 && adminUserInfo.CurrentOrgId == 10629 { //adminUserInfo.CurrentOrgId == 9538
1222
+			tempdispose = "引血" + strconv.FormatInt(blood_drawing, 10) + "ml/min"
1223
+		}
1224
+
1220 1225
 		var ultrafiltration_rate float64
1221 1226
 		_, prescription := service.FindDialysisPrescriptionByReordDate(patientID, schedulestartTime, adminUserInfo.CurrentOrgId)
1222 1227
 
@@ -1857,7 +1862,7 @@ func (this *DialysisRecordAPIController) ModifyStartDialysis() {
1857 1862
 	order_remark := this.GetString("order_remark")
1858 1863
 	catheter_operation := this.GetString("catheter_operation")
1859 1864
 	blood_flow_volume := this.GetString("blood_flow_volume")
1860
-
1865
+	blood_drawing, _ := this.GetInt64("blood_drawing")
1861 1866
 	if record_id == 0 {
1862 1867
 		this.ErrorLog("id:%v", record_id)
1863 1868
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -2025,6 +2030,7 @@ func (this *DialysisRecordAPIController) ModifyStartDialysis() {
2025 2030
 		OrderRemark:            order_remark,
2026 2031
 		CatheterOperation:      catheter_operation,
2027 2032
 		BloodFlowVolume:        blood_flow_volume,
2033
+		BloodDrawing:           blood_drawing,
2028 2034
 	}
2029 2035
 
2030 2036
 	infor, _ := service.GetDialysisInformationSetting(adminUserInfo.CurrentOrgId)

+ 7 - 1
controllers/mobile_api_controllers/dialysis_api_controller.go 查看文件

@@ -3311,6 +3311,7 @@ func (this *DialysisAPIController) StartDialysis() {
3311 3311
 		OrderRemark:            order_remark,
3312 3312
 		CatheterOperation:      catheter_operation,
3313 3313
 		BloodFlowVolume:        blood_flow_volume,
3314
+		BloodDrawing:           blood_drawing,
3314 3315
 	}
3315 3316
 	//查询该床位是否有人用了
3316 3317
 	_, errorscode := service.GetDialysisOrderByBedId(adminUserInfo.Org.Id, schedulestartTime, bedID, schedual_type)
@@ -3377,6 +3378,10 @@ func (this *DialysisAPIController) StartDialysis() {
3377 3378
 		tempdispose = "引血" + strconv.FormatInt(blood_drawing, 10) + "ml/min"
3378 3379
 	}
3379 3380
 
3381
+	if blood_drawing > 0 && adminUserInfo.Org.Id == 10629 {
3382
+		tempdispose = "引血" + strconv.FormatInt(blood_drawing, 10) + "ml/min"
3383
+	}
3384
+
3380 3385
 	var ultrafiltration_rate float64
3381 3386
 	_, prescription := service.FindDialysisPrescriptionByReordDate(patientID, schedulestartTime, adminUserInfo.Org.Id)
3382 3387
 	//后期预增脱水量
@@ -4596,7 +4601,6 @@ func (this *DialysisAPIController) ModifyStartDialysisOrder() {
4596 4601
 	difficult_puncture_nurse, _ := this.GetInt64("difficult_puncture_nurse")
4597 4602
 	new_fistula_nurse, _ := this.GetInt64("new_fistula_nurse")
4598 4603
 	quality_nurse_id, _ := this.GetInt64("quality_nurse_id")
4599
-	fmt.Println("quality_nurse_id", quality_nurse_id)
4600 4604
 	patient_id, _ := this.GetInt64("patient_id")
4601 4605
 	record_date, _ := this.GetInt64("record_date")
4602 4606
 	puncture_needle := this.GetString("puncture_needle")
@@ -4609,6 +4613,7 @@ func (this *DialysisAPIController) ModifyStartDialysisOrder() {
4609 4613
 	schedule_remark := this.GetString("schedule_remark")
4610 4614
 	catheter_operation := this.GetString("catheter_operation")
4611 4615
 	blood_flow_volume := this.GetString("blood_flow_volume")
4616
+	blood_drawing, _ := this.GetInt64("blood_drawing")
4612 4617
 	if record_id == 0 {
4613 4618
 		this.ErrorLog("id:%v", record_id)
4614 4619
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -4775,6 +4780,7 @@ func (this *DialysisAPIController) ModifyStartDialysisOrder() {
4775 4780
 		ScheduleRemark:         schedule_remark,
4776 4781
 		CatheterOperation:      catheter_operation,
4777 4782
 		BloodFlowVolume:        blood_flow_volume,
4783
+		BloodDrawing:           blood_drawing,
4778 4784
 	}
4779 4785
 
4780 4786
 	//修改床位号需要重新消毒

+ 26 - 0
controllers/patient_dataconfig_api_controller.go 查看文件

@@ -69,6 +69,10 @@ func PatientDataConfigAPIControllerRegistRouters() {
69 69
 
70 70
 	beego.Router("/api/patient/getbeddiatricfallassessmentlist", &PatientDataConfigAPIController{}, "Get:GetBedDiatricFallassessmentList")
71 71
 
72
+	beego.Router("/api/patient/getpedpatientfallassessmentbyid", &PatientDataConfigAPIController{}, "Get:GetPedPatientFallassessmentById")
73
+
74
+	beego.Router("/api/patient/deletepedpatientfallassment", &PatientDataConfigAPIController{}, "Get:DeletePadPatientFallassment")
75
+
72 76
 }
73 77
 
74 78
 type PatientDataConfigAPIController struct {
@@ -2808,3 +2812,25 @@ func (this *PatientDataConfigAPIController) GetBedDiatricFallassessmentList() {
2808 2812
 		"total": total,
2809 2813
 	})
2810 2814
 }
2815
+
2816
+func (this *PatientDataConfigAPIController) GetPedPatientFallassessmentById() {
2817
+
2818
+	id, _ := this.GetInt64("id")
2819
+
2820
+	fallassessment, _ := service.GetPedPatientFallassessmentById(id)
2821
+
2822
+	this.ServeSuccessJSON(map[string]interface{}{
2823
+		"fallassessment": fallassessment,
2824
+	})
2825
+}
2826
+
2827
+func (this *PatientDataConfigAPIController) DeletePadPatientFallassment() {
2828
+
2829
+	id, _ := this.GetInt64("id")
2830
+
2831
+	service.DeletePadPatientFallassment(id)
2832
+
2833
+	this.ServeSuccessJSON(map[string]interface{}{
2834
+		"msg": "ok",
2835
+	})
2836
+}

+ 2 - 0
models/dialysis.go 查看文件

@@ -869,6 +869,7 @@ type DialysisOrder struct {
869 869
 	CatheterOperation          string        `gorm:"column:catheter_operation" json:"catheter_operation" form:"catheter_operation"`
870 870
 	BloodFlowVolume            string        `gorm:"column:blood_flow_volume" json:"blood_flow_volume" form:"blood_flow_volume"`
871 871
 	Condenser                  string        `gorm:"column:condenser" json:"condenser" form:"condenser"`
872
+	BloodDrawing               int64         `gorm:"column:blood_drawing" json:"blood_drawing" form:"blood_drawing"`
872 873
 }
873 874
 
874 875
 func (DialysisOrder) TableName() string {
@@ -953,6 +954,7 @@ type XtDialysisOrders struct {
953 954
 	WashpipeNurse  int64  `gorm:"column:washpipe_nurse" json:"washpipe_nurse" form:"washpipe_nurse"`
954 955
 	ModeId         int64  `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
955 956
 	QualityNurseId int64  `gorm:"column:quality_nurse_id" json:"quality_nurse_id" form:"quality_nurse_id"`
957
+	BloodDrawing   int64  `gorm:"column:blood_drawing" json:"blood_drawing" form:"blood_drawing"`
956 958
 }
957 959
 
958 960
 type TreatmentMode struct {

+ 1 - 1
service/dialysis_service.go 查看文件

@@ -646,7 +646,7 @@ func FindDialysisMacher(orgid int64, patientid int64, dialysisDate int64) (model
646 646
 	db := readDb.Table("xt_dialysis_order as o").Where("o.status = 1")
647 647
 	table := readDb.Table("xt_device_number as n")
648 648
 	fmt.Print("table", table)
649
-	err := db.Select("o.id,o.dialysis_date,o.user_org_id,o.patient_id,o.prescription_id,o.stage,remark,o.bed_id,o.start_nurse,o.finish_nurse,o.status,o.created_time,o.updated_time,o.start_time,o.end_time,o.puncture_nurse,o.creator,o.modifier,o.finish_creator,o.finish_modifier,o.schedual_type,o.quality_nurse_id,n.number,r.user_name").Joins("left join xt_device_number as n on n.id = o.bed_id").Joins("left join sgj_users.sgj_user_admin_role  as r on r.admin_user_id = o.start_nurse").Where("o.user_org_id = ? and o.patient_id = ? and o.dialysis_date =?", orgid, patientid, dialysisDate).Scan(&orders).Error
649
+	err := db.Select("o.id,o.dialysis_date,o.user_org_id,o.patient_id,o.prescription_id,o.stage,remark,o.bed_id,o.start_nurse,o.finish_nurse,o.status,o.created_time,o.updated_time,o.start_time,o.end_time,o.puncture_nurse,o.creator,o.modifier,o.finish_creator,o.finish_modifier,o.schedual_type,o.quality_nurse_id,o.blood_drawing,n.number,r.user_name").Joins("left join xt_device_number as n on n.id = o.bed_id").Joins("left join sgj_users.sgj_user_admin_role  as r on r.admin_user_id = o.start_nurse").Where("o.user_org_id = ? and o.patient_id = ? and o.dialysis_date =?", orgid, patientid, dialysisDate).Scan(&orders).Error
650 650
 	return orders, err
651 651
 }
652 652
 func FindPunctureNurse(adminid int64, appid int64, orgid int64) (models.App_Roles, error) {

+ 1 - 2
service/mobile_dialysis_service.go 查看文件

@@ -129,7 +129,6 @@ type MDialysisScheduleVM struct {
129 129
 	Advices                  []*VMDoctorAdvice                 `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"doctor_advice"`
130 130
 	TreatmentSummary         *VMTreatmentSummary               `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"treatment_summary"`
131 131
 	NewDeviceInformation     *NewDeviceInformation             `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"device_information"`
132
-	LastTreatmentSummary     *VMTreatmentSummary               `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"treatment_summary"`
133 132
 }
134 133
 
135 134
 func (MDialysisScheduleVM) TableName() string {
@@ -2242,7 +2241,7 @@ func BatchUpdateMonitors(monitors []*models.MonitoringRecord) error {
2242 2241
 func ModifyStartDialysisOrder(order *models.DialysisOrder) error {
2243 2242
 	tx := writeDb.Begin()
2244 2243
 	updateTime := time.Now().Unix()
2245
-	err := tx.Model(&models.DialysisOrder{}).Where("user_org_id = ? AND id = ? AND status = 1 ", order.UserOrgId, order.ID).Updates(map[string]interface{}{"start_nurse": order.StartNurse, "updated_time": updateTime, "bed_id": order.BedID, "puncture_nurse": order.PunctureNurse, "start_time": order.StartTime, "modifier": order.Modifier, "schedual_type": order.SchedualType, "washpipe_nurse": order.WashpipeNurse, "change_nurse": order.ChangeNurse, "difficult_puncture_nurse": order.DifficultPunctureNurse, "new_fistula_nurse": order.NewFistulaNurse, "quality_nurse_id": order.QualityNurseId, "puncture_needle": order.PunctureNeedle, "puncture_way": order.PunctureWay, "dialysis_dialyszers": order.DialysisDialyszers, "dialysis_irrigation": order.DialysisIrrigation, "blood_access_id": order.BloodAccessId, "nuclein_date": order.NucleinDate, "schedule_remark": order.ScheduleRemark, "order_remark": order.OrderRemark, "catheter_operation": order.CatheterOperation, "blood_flow_volume": order.BloodFlowVolume}).Error
2244
+	err := tx.Model(&models.DialysisOrder{}).Where("user_org_id = ? AND id = ? AND status = 1 ", order.UserOrgId, order.ID).Updates(map[string]interface{}{"start_nurse": order.StartNurse, "updated_time": updateTime, "bed_id": order.BedID, "puncture_nurse": order.PunctureNurse, "start_time": order.StartTime, "modifier": order.Modifier, "schedual_type": order.SchedualType, "washpipe_nurse": order.WashpipeNurse, "change_nurse": order.ChangeNurse, "difficult_puncture_nurse": order.DifficultPunctureNurse, "new_fistula_nurse": order.NewFistulaNurse, "quality_nurse_id": order.QualityNurseId, "puncture_needle": order.PunctureNeedle, "puncture_way": order.PunctureWay, "dialysis_dialyszers": order.DialysisDialyszers, "dialysis_irrigation": order.DialysisIrrigation, "blood_access_id": order.BloodAccessId, "nuclein_date": order.NucleinDate, "schedule_remark": order.ScheduleRemark, "order_remark": order.OrderRemark, "catheter_operation": order.CatheterOperation, "blood_flow_volume": order.BloodFlowVolume, "blood_drawing": order.BloodDrawing}).Error
2246 2245
 	if err != nil {
2247 2246
 		tx.Rollback()
2248 2247
 		return err

+ 17 - 1
service/patient_service.go 查看文件

@@ -4087,9 +4087,25 @@ func GetBedDiatricFallassessmentList(patient_id int64, is_type int64, user_org_i
4087 4087
 		db = db.Where("user_org_id = ?", user_org_id)
4088 4088
 	}
4089 4089
 	if is_type > 0 {
4090
-		db = db.Where("is_type = ?", is_type)
4090
+		db = db.Where("type = ?", is_type)
4091 4091
 	}
4092 4092
 	err = db.Count(&total).Offset(offset).Limit(limit).Find(&list).Error
4093 4093
 
4094 4094
 	return list, total, err
4095 4095
 }
4096
+
4097
+func GetPedPatientFallassessmentById(id int64) (models.XtPatientFallassessment, error) {
4098
+
4099
+	fallassessment := models.XtPatientFallassessment{}
4100
+
4101
+	err := XTReadDB().Where("id = ? and status=1", id).Find(&fallassessment).Error
4102
+
4103
+	return fallassessment, err
4104
+}
4105
+
4106
+func DeletePadPatientFallassment(id int64) (err error) {
4107
+
4108
+	err = XTWriteDB().Model(&models.XtPatientPedFallssessment{}).Where("id=? and status=1", id).Updates(map[string]interface{}{"status": 0}).Error
4109
+	return err
4110
+
4111
+}

+ 1 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go 查看文件

@@ -110,6 +110,7 @@ type DialysisOrderVM struct {
110 110
 	DialysisDialyszers string          `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
111 111
 	PunctureWay        string          `gorm:"column:puncture_way" json:"puncture_way" form:"puncture_way"`
112 112
 	PunctureNeedle     string          `gorm:"column:puncture_needle" json:"puncture_needle" form:"puncture_needle"`
113
+	BloodDrawing       int64           `gorm:"column:blood_drawing" json:"blood_drawing" form:"blood_drawing"`
113 114
 }
114 115
 
115 116
 func (DialysisOrderVM) TableName() string {