28169 il y a 10 mois
Parent
révision
9b23a0151f

+ 5 - 1
controllers/his_api_controller.go Voir le fichier

@@ -3175,7 +3175,7 @@ func (c *HisApiController) CreateHisPrescription() {
3175 3175
 	var adviceList []models.HisDoctorAdviceInfo
3176 3176
 	var projectList []models.HisPrescriptionProject
3177 3177
 
3178
-	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10610 {
3178
+	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 {
3179 3179
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3180 3180
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3181 3181
 
@@ -3715,6 +3715,10 @@ func (c *HisApiController) CreateHisPrescription() {
3715 3715
 										if p.Price != lastWarehouse.PackingPrice {
3716 3716
 											p.Price = lastWarehouse.PackingPrice
3717 3717
 										}
3718
+										if p.Price == 0 {
3719
+											lastWarehouseTwo, _ := service.FindFirstWarehousingInfoByStockFour(p.ProjectId, storeConfig.DrugStorehouseOut)
3720
+											p.Price = lastWarehouseTwo.PackingPrice
3721
+										}
3718 3722
 										if p.Unit == "" {
3719 3723
 											goodInfoOne, _ := service.GetGoodInformationByGoodIdOne(p.ProjectId)
3720 3724
 											p.Unit = goodInfoOne.PackingUnit

+ 1 - 1
controllers/mobile_api_controllers/check_weight_api_controller.go Voir le fichier

@@ -286,7 +286,7 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
286 286
 
287 287
 	template, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
288 288
 
289
-	if template.TemplateId == 22 || template.TemplateId == 17 || template.TemplateId == 21 || template.TemplateId == 26 || template.TemplateId == 27 || template.TemplateId == 34 || template.TemplateId == 30 || template.TemplateId == 32 || template.TemplateId == 36 || template.TemplateId == 40 || template.TemplateId == 38 || template.TemplateId == 43 || template.TemplateId == 46 || template.TemplateId == 53 || template.TemplateId == 48 || adminUserInfo.Org.Id == 10345 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10441 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10138 || adminUserInfo.Org.Id == 10278 || adminUserInfo.Org.Id == 9829 || adminUserInfo.Org.Id == 10440 || adminUserInfo.Org.Id == 10469 || adminUserInfo.Org.Id == 10471 || adminUserInfo.Org.Id == 10537 {
289
+	if template.TemplateId == 22 || template.TemplateId == 17 || template.TemplateId == 21 || template.TemplateId == 26 || template.TemplateId == 27 || template.TemplateId == 34 || template.TemplateId == 30 || template.TemplateId == 32 || template.TemplateId == 36 || template.TemplateId == 40 || template.TemplateId == 38 || template.TemplateId == 43 || template.TemplateId == 46 || template.TemplateId == 53 || template.TemplateId == 48 || adminUserInfo.Org.Id == 10345 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10441 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10138 || adminUserInfo.Org.Id == 10278 || adminUserInfo.Org.Id == 9829 || adminUserInfo.Org.Id == 10440 || adminUserInfo.Org.Id == 10469 || adminUserInfo.Org.Id == 10471 || adminUserInfo.Org.Id == 10537 || adminUserInfo.Org.Id == 10667 {
290 290
 		if adminUserInfo.Org.Id != 10447 {
291 291
 			dewater_amount = dewater_amount * 1000
292 292
 		}

+ 32 - 4
controllers/mobile_api_controllers/dialysis_api_controller.go Voir le fichier

@@ -1794,6 +1794,7 @@ func (c *DialysisAPIController) PostDialysisPrescription() {
1794 1794
 	single_time := c.GetString("single_time")
1795 1795
 	single_water := c.GetString("single_water")
1796 1796
 	replacement_flow := c.GetString("replacement_flow")
1797
+
1797 1798
 	plasma_separator := c.GetString("plasma_separator")
1798 1799
 	bilirubin_adsorption_column := c.GetString("bilirubin_adsorption_column")
1799 1800
 	oxygen_uptake, _ := c.GetInt64("oxygen_uptake")
@@ -2760,6 +2761,11 @@ func (c *DialysisAPIController) Finish() {
2760 2761
 		tempassessmentAfterDislysis.DiastolicBloodPressure = 0
2761 2762
 	}
2762 2763
 
2764
+	if endmonitorRecords.ID > 0 && adminUserInfo.Org.Id == 10683 {
2765
+		tempassessmentAfterDislysis.SystolicBloodPressure = 0
2766
+		tempassessmentAfterDislysis.DiastolicBloodPressure = 0
2767
+	}
2768
+
2763 2769
 	if lastAssessmentAfterDislysis != nil {
2764 2770
 		tempassessmentAfterDislysis.BloodPressureType = lastAssessmentAfterDislysis.BloodPressureType
2765 2771
 
@@ -2834,6 +2840,11 @@ func (c *DialysisAPIController) Finish() {
2834 2840
 			tempassessmentAfterDislysis.DiastolicBloodPressure = 0
2835 2841
 		}
2836 2842
 
2843
+		if endmonitorRecords.ID > 0 && adminUserInfo.Org.Id == 10683 {
2844
+			tempassessmentAfterDislysis.SystolicBloodPressure = 0
2845
+			tempassessmentAfterDislysis.DiastolicBloodPressure = 0
2846
+		}
2847
+
2837 2848
 	}
2838 2849
 
2839 2850
 	finish := models.XtDialysisFinish{
@@ -3442,6 +3453,10 @@ func (this *DialysisAPIController) StartDialysis() {
3442 3453
 				ultrafiltration_rate = math.Floor(prescription.PrescriptionWater * 60 / float64(totalMin))
3443 3454
 			}
3444 3455
 
3456
+			if adminUserInfo.Org.Id == 10667 {
3457
+				ultrafiltration_rate = math.Floor(prescription.PrescriptionWater * 60 / float64(totalMin))
3458
+			}
3459
+
3445 3460
 			if template.TemplateId == 20 || template.TemplateId == 22 { //adminUserInfo.Org.Id == 9538
3446 3461
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60)
3447 3462
 			}
@@ -3484,6 +3499,11 @@ func (this *DialysisAPIController) StartDialysis() {
3484 3499
 				ultrafiltration_rate = ultrafiltration_rate / 1000
3485 3500
 			}
3486 3501
 
3502
+			if adminUserInfo.Org.Id == 10667 {
3503
+				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
3504
+				ultrafiltration_rate = ultrafiltration_rate / 1000
3505
+			}
3506
+
3487 3507
 		}
3488 3508
 	}
3489 3509
 
@@ -3538,7 +3558,7 @@ func (this *DialysisAPIController) StartDialysis() {
3538 3558
 			record.BreathingRate = "20"
3539 3559
 		}
3540 3560
 		//针对兰溪人民医院的需求
3541
-		if adminUserInfo.Org.Id == 10430 || adminUserInfo.Org.Id == 9671 {
3561
+		if adminUserInfo.Org.Id == 10430 || adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10683 {
3542 3562
 			befor, _ := service.GetAssessmentBeforThrity(adminUserInfo.Org.Id, patientID, recordDate.Unix())
3543 3563
 			record.SystolicBloodPressure = befor.SystolicBloodPressure
3544 3564
 			record.DiastolicBloodPressure = befor.DiastolicBloodPressure
@@ -4516,6 +4536,14 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4516 4536
 
4517 4537
 			}
4518 4538
 
4539
+			if adminInfo.Org.Id == 10667 {
4540
+
4541
+				ultrafiltration_rate = math.Floor(prescription.PrescriptionWater * 60 / 1000 / float64(totalMin) * 1000)
4542
+
4543
+				record.UltrafiltrationRate = ultrafiltration_rate
4544
+
4545
+			}
4546
+
4519 4547
 			if adminInfo.Org.Id == 10471 {
4520 4548
 
4521 4549
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
@@ -4523,7 +4551,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4523 4551
 
4524 4552
 			}
4525 4553
 
4526
-			if adminInfo.Org.Id == 10460 || adminInfo.Org.Id == 10644 {
4554
+			if adminInfo.Org.Id == 10460 || adminInfo.Org.Id == 10644 || adminInfo.Org.Id == 10667 {
4527 4555
 
4528 4556
 				ultrafiltration_rate = math.Floor(prescription.TargetUltrafiltration / float64(totalMin) * 60 * 1000)
4529 4557
 				record.UltrafiltrationRate = ultrafiltration_rate / 1000
@@ -4570,7 +4598,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4570 4598
 	}
4571 4599
 
4572 4600
 	//长沙南雅
4573
-	if adminInfo.Org.Id == 10395 || adminInfo.Org.Id == 10138 || adminInfo.Org.Id == 10278 || adminInfo.Org.Id == 10432 || adminInfo.Org.Id == 10441 || adminInfo.Org.Id == 10445 || adminInfo.Org.Id == 10469 || adminInfo.Org.Id == 10375 || adminInfo.Org.Id == 10610 || adminInfo.Org.Id == 10537 {
4601
+	if adminInfo.Org.Id == 10395 || adminInfo.Org.Id == 10138 || adminInfo.Org.Id == 10278 || adminInfo.Org.Id == 10432 || adminInfo.Org.Id == 10441 || adminInfo.Org.Id == 10445 || adminInfo.Org.Id == 10469 || adminInfo.Org.Id == 10375 || adminInfo.Org.Id == 10610 || adminInfo.Org.Id == 10537 || adminInfo.Org.Id == 10667 {
4574 4602
 
4575 4603
 		if ultrafiltration_rate > 0 {
4576 4604
 			ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
@@ -4587,7 +4615,7 @@ func (this *DialysisAPIController) GetLastMonitorRecordTody() {
4587 4615
 		record.UltrafiltrationVolume = ultrafiltration_volume / 1000
4588 4616
 	}
4589 4617
 
4590
-	if adminInfo.Org.Id == 10460 || adminInfo.Org.Id == 10644 {
4618
+	if adminInfo.Org.Id == 10460 || adminInfo.Org.Id == 10644 || adminInfo.Org.Id == 10667 {
4591 4619
 
4592 4620
 		ultrafiltration_volume := math.Floor(float64(record.OperateTime+3600-fristrecord.OperateTime) / 3600 * ultrafiltration_rate)
4593 4621
 

+ 1 - 1
service/self_drug_service.go Voir le fichier

@@ -2785,7 +2785,7 @@ func GetDrugWarehouseInfoStorehouseList(orgid int64) (info []*models.DrugWarehou
2785 2785
 func GetDrugStockCout(drug_id int64, storehouse_id int64, user_org_id int64) (models.XtDrugStockCount, error) {
2786 2786
 
2787 2787
 	drugCount := models.XtDrugStockCount{}
2788
-	err := XTReadDB().Where("drug_id = ? and storehouse_id = ? and user_org_id = ? and is_check =1 and status = 1", drug_id, storehouse_id, user_org_id).Find(&drugCount).Error
2788
+	err := XTReadDB().Where("drug_id = ? and storehouse_id = ? and user_org_id = ? and status = 1", drug_id, storehouse_id, user_org_id).Find(&drugCount).Error
2789 2789
 	return drugCount, err
2790 2790
 }
2791 2791
 

+ 1 - 1
service/sign_service.go Voir le fichier

@@ -2112,7 +2112,7 @@ func UpdateAllPatient(id int64, diagose string, orgid int64) error {
2112 2112
 
2113 2113
 func GetAllDialysisOrder(user_org_id int64) (list []*models.XtDialysisOrder, err error) {
2114 2114
 
2115
-	err = XTReadDB().Where("patient_id = ? and status =1", 14749).Find(&list).Error
2115
+	err = XTReadDB().Where("patient_id = ? and status =1", 29083).Find(&list).Error
2116 2116
 
2117 2117
 	return list, err
2118 2118
 }

+ 14 - 0
service/stock_service.go Voir le fichier

@@ -7209,6 +7209,13 @@ func GetAllGoodList(orgid int64) (good []*models.GoodInfo, err error) {
7209 7209
 	return good, err
7210 7210
 }
7211 7211
 
7212
+func GetAllMobileProjectList(orgid int64) (project []*models.HisProject, err error) {
7213
+
7214
+	err = XTReadDB().Where("user_org_id =? and status =1", orgid).Find(&project).Error
7215
+
7216
+	return project, err
7217
+}
7218
+
7212 7219
 func ModifyGoodAddInformationSeven(good_id int64, sum_count int64, orgid int64) (models.GoodInfo, error) {
7213 7220
 
7214 7221
 	info := models.GoodInfo{}
@@ -9166,6 +9173,13 @@ func FindFirstWarehousingInfoByStockThree(good_id int64, storehouse_id int64) (i
9166 9173
 	return info, err
9167 9174
 }
9168 9175
 
9176
+func FindFirstWarehousingInfoByStockFour(good_id int64, storehouse_id int64) (info models.WarehousingInfo, err error) {
9177
+
9178
+	err = readDb.Model(&models.WarehousingInfo{}).Where("good_id = ?  AND status = 1  and storehouse_id =? ", good_id, storehouse_id).Order("ctime").Last(&info).Error
9179
+
9180
+	return info, err
9181
+}
9182
+
9169 9183
 func GetHisPrescriptionNumberList(project_id int64, record_date int64, orgid int64, patient_id int64) (list []*models.HisPrescriptionProject, err error) {
9170 9184
 
9171 9185
 	err = readDb.Where("project_id = ? and record_date =? and user_org_id =? and status =1 and patient_id = ?", project_id, record_date, orgid, patient_id).Find(&list).Error

+ 2 - 2
service/warhouse_service.go Voir le fichier

@@ -4542,7 +4542,7 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4542 4542
 			ProductDate:           warehouse.ProductDate,
4543 4543
 			ExpiryDate:            warehouse.ExpiryDate,
4544 4544
 			WarehousingCount:      deliver_number,
4545
-			Price:                 warehouse.RetailPrice,
4545
+			Price:                 warehouse.Price,
4546 4546
 			TotalPrice:            warehouse.TotalPrice,
4547 4547
 			Status:                1,
4548 4548
 			Ctime:                 warehouse.Ctime,
@@ -4720,7 +4720,7 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4720 4720
 			ProductDate:           warehouse.ProductDate,
4721 4721
 			ExpiryDate:            warehouse.ExpiryDate,
4722 4722
 			WarehousingCount:      stock_number,
4723
-			Price:                 warehouse.RetailPrice,
4723
+			Price:                 warehouse.Price,
4724 4724
 			TotalPrice:            warehouse.TotalPrice,
4725 4725
 			Status:                1,
4726 4726
 			Ctime:                 warehouse.Ctime,