Pārlūkot izejas kodu

Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch

陈少旭 2 mēnešus atpakaļ
vecāks
revīzija
11107305e9

Binārs
XT_New.exe Parādīt failu


+ 4 - 4
controllers/base_api_controller.go Parādīt failu

@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10495 //机构id
86
+		subscibe.OrgId = 10138 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,7 +93,7 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10495 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10138 //机构id小英9675或4
97 97
 		adminUserInfo.CurrentAppId = 17513 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10495 //机构id小英9675或4
332
+		subscibe.OrgId = 10138 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,7 +339,7 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10495 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10138 //机构id小英9675或4
343 343
 		adminUserInfo.CurrentAppId = 17513 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes

+ 4 - 0
controllers/dialysis_api_controller.go Parādīt failu

@@ -2536,6 +2536,10 @@ func (c *DialysisApiController) PostAssessmentBeforeDislysis() {
2536 2536
 			}
2537 2537
 		}
2538 2538
 
2539
+		if adminUserInfo.CurrentOrgId == 10644 {
2540
+			assessmentBeforeDislysis.PunctureNeedle = ""
2541
+		}
2542
+
2539 2543
 		err := service.AddSigleAssessmentBeforeDislysisRecord(&assessmentBeforeDislysis)
2540 2544
 		//记录日志
2541 2545
 		byterequest, _ := json.Marshal(assessmentBeforeDislysis)

+ 3 - 0
controllers/his_api_controller.go Parādīt failu

@@ -1705,6 +1705,8 @@ func (c *HisApiController) GetHisPatientInfo() {
1705 1705
 	beforThrity, _ := service.GetAssessmentBeforThrity(admin.CurrentOrgId, patient_id, recordDateTime)
1706 1706
 
1707 1707
 	LastCaseHistory, _ := service.GetLastHisPatientCaseHistory(admin.CurrentOrgId, patient_id)
1708
+
1709
+	prescriptionInfo, _ := service.GetDialysisPresriptionById(admin.CurrentOrgId, patient_id, recordDateTime)
1708 1710
 	c.ServeSuccessJSON(map[string]interface{}{
1709 1711
 		"his_info":     his_patient_info,
1710 1712
 		"xt_info":      xt_patient_info,
@@ -1723,6 +1725,7 @@ func (c *HisApiController) GetHisPatientInfo() {
1723 1725
 		"last_info":          lastPatientPrescriptionInfo,
1724 1726
 		"befor":              beforThrity,
1725 1727
 		"LastCaseHistory":    LastCaseHistory,
1728
+		"prescriptionInfo":   prescriptionInfo,
1726 1729
 	})
1727 1730
 	return
1728 1731
 

+ 43 - 0
controllers/inspection_api_controller.go Parādīt failu

@@ -3,6 +3,7 @@ package controllers
3 3
 import (
4 4
 	"encoding/json"
5 5
 	"fmt"
6
+	"reflect"
6 7
 	"strconv"
7 8
 	"strings"
8 9
 	"time"
@@ -37,6 +38,10 @@ func InspectionApiRegistRouters() {
37 38
 
38 39
 	beego.Router("/api/getnewinspectionList", &InspectionApiController{}, "Get:GetNewInspectionList")
39 40
 
41
+	beego.Router("/api/getnewinspectiondetaillist", &InspectionApiController{}, "Get:GetNewInspectionDetailList")
42
+
43
+	beego.Router("/api/editpatientnewinspection", &InspectionApiController{}, "Post:EditPatientNewInspection")
44
+
40 45
 }
41 46
 func (c *InspectionApiController) SetInspectionRemind() {
42 47
 	remind_cycle, _ := c.GetInt64("remind_cycle", 0)
@@ -1097,3 +1102,41 @@ func (c *InspectionApiController) GetNewInspectionList() {
1097 1102
 		"list":            inspectionInspectDateGroup,
1098 1103
 	})
1099 1104
 }
1105
+
1106
+func (c *InspectionApiController) GetNewInspectionDetailList() {
1107
+
1108
+	project_id, _ := c.GetInt64("project_id")
1109
+
1110
+	inspect_date, _ := c.GetInt64("inspect_date")
1111
+
1112
+	patient_id, _ := c.GetInt64("patient_id")
1113
+
1114
+	inspection, _ := service.GetNewInspectionDetailList(project_id, inspect_date, patient_id)
1115
+
1116
+	c.ServeSuccessJSON(map[string]interface{}{
1117
+		"inspection": inspection,
1118
+	})
1119
+}
1120
+
1121
+func (c *InspectionApiController) EditPatientNewInspection() {
1122
+
1123
+	dataBody := make(map[string]interface{}, 0)
1124
+	err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
1125
+	if err != nil {
1126
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1127
+		return
1128
+	}
1129
+
1130
+	inspection := models.Inspection{}
1131
+
1132
+	if dataBody["id"] == nil || reflect.TypeOf(dataBody["id"]).String() != "float64" {
1133
+		utils.ErrorLog("id")
1134
+		return
1135
+	}
1136
+
1137
+	id := int64(dataBody["id"].(float64))
1138
+
1139
+	inspection.ID = id
1140
+
1141
+	fmt.Println("id------------------------------", id)
1142
+}

+ 6 - 4
controllers/manager_center_api_controller.go Parādīt failu

@@ -1846,10 +1846,12 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1846 1846
 	}
1847 1847
 	err, goodInfos := service.ModifyGoodInfo(&goodInfo)
1848 1848
 
1849
-	list, _ := service.GetHisPrescripionProjectList(good_id, adminUserInfo.CurrentOrgId)
1850
-	if len(list) > 0 {
1851
-		for _, item := range list {
1852
-			service.UpdateHisPrescriptionProjectList(item.ID, sell_price)
1849
+	if adminUserInfo.CurrentOrgId != 10653 {
1850
+		list, _ := service.GetHisPrescripionProjectList(good_id, adminUserInfo.CurrentOrgId)
1851
+		if len(list) > 0 {
1852
+			for _, item := range list {
1853
+				service.UpdateHisPrescriptionProjectList(item.ID, sell_price)
1854
+			}
1853 1855
 		}
1854 1856
 	}
1855 1857
 

+ 12 - 0
controllers/mobile_api_controllers/check_weight_api_controller.go Parādīt failu

@@ -947,6 +947,18 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
947 947
 		evaluation.WeightBefore = weighing_before
948 948
 		evaluation.AssessmentTime = time.Now().Unix()
949 949
 
950
+		if adminUserInfo.Org.Id == 10644 {
951
+			evaluation.PunctureNeedle = ""
952
+		}
953
+
954
+		//针对患者称重两次没有数据的问题
955
+		if adminUserInfo.Org.Id == 10702 {
956
+
957
+			dewater_amount = evaluation.WeightBefore - evaluation.DryWeight - evaluation.AdditionalWeight
958
+			lastDialysisPrescription, _ := service.GetLastDialysisPrescription(id, adminUserInfo.Org.Id)
959
+			service.UpdateMobileGetDialysisPrescribeOne(lastDialysisPrescription.ID, dewater_amount)
960
+		}
961
+
950 962
 		err := service.UpadatePredialysisEvaluation(&evaluation)
951 963
 
952 964
 		//记录日志

+ 1 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go Parādīt failu

@@ -5532,6 +5532,7 @@ func (c *DialysisAPIController) GetLongAdviceOne() {
5532 5532
 			dayStr2 := "-" + dayStr
5533 5533
 			count, _ := strconv.ParseInt(dayStr2, 10, 64)
5534 5534
 			oldTime := time.Now().AddDate(0, 0, int(count)).Unix()
5535
+
5535 5536
 			advices, _ := service.FindAllDoctorAdviceByTime(now, oldTime, patient_id, adminUserInfo.Org.Id, advice.TemplateId)
5536 5537
 
5537 5538
 			for _, ad := range advices {

+ 94 - 94
controllers/mobile_api_controllers/patient_api_controller.go Parādīt failu

@@ -2236,100 +2236,100 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2236 2236
 				}
2237 2237
 
2238 2238
 				////针对异常未出库问题的脚本
2239
-				if adminInfo.Org.Id == 10644 {
2240
-
2241
-					newadviceInfo := &models.HisDoctorAdviceInfo{
2242
-						ID:                    advice.ID,
2243
-						UserOrgId:             advice.UserOrgId,
2244
-						PatientId:             advice.PatientId,
2245
-						HisPatientId:          advice.HisPatientId,
2246
-						AdviceType:            advice.AdviceType,
2247
-						AdviceDate:            advice.AdviceDate,
2248
-						StartTime:             advice.StartTime,
2249
-						AdviceName:            advice.AdviceName,
2250
-						AdviceDesc:            advice.AdviceDesc,
2251
-						ReminderDate:          advice.ReminderDate,
2252
-						SingleDose:            advice.SingleDose,
2253
-						SingleDoseUnit:        advice.SingleDoseUnit,
2254
-						PrescribingNumber:     advice.PrescribingNumber,
2255
-						PrescribingNumberUnit: advice.PrescribingNumberUnit,
2256
-						DeliveryWay:           advice.DeliveryWay,
2257
-						ExecutionFrequency:    advice.ExecutionFrequency,
2258
-						AdviceDoctor:          advice.AdviceDoctor,
2259
-						Status:                advice.Status,
2260
-						CreatedTime:           advice.CreatedTime,
2261
-						UpdatedTime:           advice.UpdatedTime,
2262
-						AdviceAffirm:          advice.AdviceAffirm,
2263
-						Remark:                advice.Remark,
2264
-						StopTime:              advice.StopTime,
2265
-						StopReason:            advice.StopReason,
2266
-						StopDoctor:            advice.StopDoctor,
2267
-						StopState:             advice.StopState,
2268
-						ParentId:              advice.ParentId,
2269
-						ExecutionTime:         advice.ExecutionTime,
2270
-						ExecutionStaff:        advice.ExecutionStaff,
2271
-						ExecutionState:        advice.ExecutionState,
2272
-						Checker:               advice.Checker,
2273
-						RecordDate:            advice.RecordDate,
2274
-						DialysisOrderId:       advice.DialysisOrderId,
2275
-						CheckTime:             advice.CheckTime,
2276
-						CheckState:            advice.CheckState,
2277
-						DrugSpec:              advice.DrugSpec,
2278
-						DrugSpecUnit:          advice.DrugSpecUnit,
2279
-						Groupno:               advice.Groupno,
2280
-						RemindType:            advice.RemindType,
2281
-						FrequencyType:         advice.FrequencyType,
2282
-						DayCount:              advice.DayCount,
2283
-						WeekDay:               advice.WeekDay,
2284
-						TemplateId:            advice.TemplateId,
2285
-						Modifier:              advice.Modifier,
2286
-						DrugId:                advice.DrugId,
2287
-						Price:                 advice.Price,
2288
-						PrescriptionId:        advice.PrescriptionId,
2289
-						MedListCodg:           advice.MedListCodg,
2290
-						FeedetlSn:             advice.FeedetlSn,
2291
-						Day:                   advice.DayCount,
2292
-						ChildDoctorAdvice:     nil,
2293
-						Drug:                  models.Drug{},
2294
-						Diagnosis:             advice.Diagnosis,
2295
-						Way:                   advice.Way,
2296
-						HospApprFlag:          advice.HospApprFlag,
2297
-						LmtUsedFlag:           advice.LmtUsedFlag,
2298
-						HisOrderInfo:          models.HisOrderInfo{},
2299
-						IsMedicine:            advice.IsMedicine,
2300
-						ExecutionFrequencyId:  advice.ExecutionFrequencyId,
2301
-						Child:                 nil,
2302
-						IsSettle:              advice.IsSettle,
2303
-						IsMobile:              advice.IsMobile,
2304
-						IsSelfDrug:            advice.IsSelfDrug,
2305
-						DrugWayCount:          advice.DrugWayCount,
2306
-					}
2307
-					outListExport, _ := service.GetWarehouseOutListExport(advice.DrugId, advice.PatientId, advice.AdviceDate, advice.ID)
2308
-					fmt.Println(outListExport)
2309
-					//var out_count int64
2310
-					//if len(outListExport) > 0 {
2311
-					//	for _, item := range outListExport {
2312
-					//		if item.CountUnit == medical.MaxUnit && medical.MaxUnit != medical.MinUnit {
2313
-					//			out_count = item.Count * medical.MinNumber
2314
-					//		}
2315
-					//		if item.CountUnit == medical.MinUnit && medical.MaxUnit != medical.MinUnit {
2316
-					//			out_count = item.Count
2317
-					//		}
2318
-					//		if item.CountUnit == medical.MaxUnit && medical.MaxUnit == medical.MinUnit {
2319
-					//			out_count = item.Count * medical.MinNumber
2320
-					//		}
2321
-					//
2322
-					//	}
2323
-					//}
2324
-					//按最小单位出库
2325
-					//var cha_count = total_count - out_count
2326
-
2327
-					var cha_count = 100
2328
-					fmt.Println("cha_count--------------------------------------", cha_count)
2329
-					newadviceInfo.PrescribingNumber = float64(cha_count)
2330
-					newadviceInfo.PrescribingNumberUnit = medical.MinUnit
2331
-					service.NewHisDrugsDelivery(advice.UserOrgId, creater, newadviceInfo, tx)
2332
-				}
2239
+				//if adminInfo.Org.Id == 10644 {
2240
+				//
2241
+				//	newadviceInfo := &models.HisDoctorAdviceInfo{
2242
+				//		ID:                    advice.ID,
2243
+				//		UserOrgId:             advice.UserOrgId,
2244
+				//		PatientId:             advice.PatientId,
2245
+				//		HisPatientId:          advice.HisPatientId,
2246
+				//		AdviceType:            advice.AdviceType,
2247
+				//		AdviceDate:            advice.AdviceDate,
2248
+				//		StartTime:             advice.StartTime,
2249
+				//		AdviceName:            advice.AdviceName,
2250
+				//		AdviceDesc:            advice.AdviceDesc,
2251
+				//		ReminderDate:          advice.ReminderDate,
2252
+				//		SingleDose:            advice.SingleDose,
2253
+				//		SingleDoseUnit:        advice.SingleDoseUnit,
2254
+				//		PrescribingNumber:     advice.PrescribingNumber,
2255
+				//		PrescribingNumberUnit: advice.PrescribingNumberUnit,
2256
+				//		DeliveryWay:           advice.DeliveryWay,
2257
+				//		ExecutionFrequency:    advice.ExecutionFrequency,
2258
+				//		AdviceDoctor:          advice.AdviceDoctor,
2259
+				//		Status:                advice.Status,
2260
+				//		CreatedTime:           advice.CreatedTime,
2261
+				//		UpdatedTime:           advice.UpdatedTime,
2262
+				//		AdviceAffirm:          advice.AdviceAffirm,
2263
+				//		Remark:                advice.Remark,
2264
+				//		StopTime:              advice.StopTime,
2265
+				//		StopReason:            advice.StopReason,
2266
+				//		StopDoctor:            advice.StopDoctor,
2267
+				//		StopState:             advice.StopState,
2268
+				//		ParentId:              advice.ParentId,
2269
+				//		ExecutionTime:         advice.ExecutionTime,
2270
+				//		ExecutionStaff:        advice.ExecutionStaff,
2271
+				//		ExecutionState:        advice.ExecutionState,
2272
+				//		Checker:               advice.Checker,
2273
+				//		RecordDate:            advice.RecordDate,
2274
+				//		DialysisOrderId:       advice.DialysisOrderId,
2275
+				//		CheckTime:             advice.CheckTime,
2276
+				//		CheckState:            advice.CheckState,
2277
+				//		DrugSpec:              advice.DrugSpec,
2278
+				//		DrugSpecUnit:          advice.DrugSpecUnit,
2279
+				//		Groupno:               advice.Groupno,
2280
+				//		RemindType:            advice.RemindType,
2281
+				//		FrequencyType:         advice.FrequencyType,
2282
+				//		DayCount:              advice.DayCount,
2283
+				//		WeekDay:               advice.WeekDay,
2284
+				//		TemplateId:            advice.TemplateId,
2285
+				//		Modifier:              advice.Modifier,
2286
+				//		DrugId:                advice.DrugId,
2287
+				//		Price:                 advice.Price,
2288
+				//		PrescriptionId:        advice.PrescriptionId,
2289
+				//		MedListCodg:           advice.MedListCodg,
2290
+				//		FeedetlSn:             advice.FeedetlSn,
2291
+				//		Day:                   advice.DayCount,
2292
+				//		ChildDoctorAdvice:     nil,
2293
+				//		Drug:                  models.Drug{},
2294
+				//		Diagnosis:             advice.Diagnosis,
2295
+				//		Way:                   advice.Way,
2296
+				//		HospApprFlag:          advice.HospApprFlag,
2297
+				//		LmtUsedFlag:           advice.LmtUsedFlag,
2298
+				//		HisOrderInfo:          models.HisOrderInfo{},
2299
+				//		IsMedicine:            advice.IsMedicine,
2300
+				//		ExecutionFrequencyId:  advice.ExecutionFrequencyId,
2301
+				//		Child:                 nil,
2302
+				//		IsSettle:              advice.IsSettle,
2303
+				//		IsMobile:              advice.IsMobile,
2304
+				//		IsSelfDrug:            advice.IsSelfDrug,
2305
+				//		DrugWayCount:          advice.DrugWayCount,
2306
+				//	}
2307
+				//	outListExport, _ := service.GetWarehouseOutListExport(advice.DrugId, advice.PatientId, advice.AdviceDate, advice.ID)
2308
+				//	fmt.Println(outListExport)
2309
+				//	//var out_count int64
2310
+				//	//if len(outListExport) > 0 {
2311
+				//	//	for _, item := range outListExport {
2312
+				//	//		if item.CountUnit == medical.MaxUnit && medical.MaxUnit != medical.MinUnit {
2313
+				//	//			out_count = item.Count * medical.MinNumber
2314
+				//	//		}
2315
+				//	//		if item.CountUnit == medical.MinUnit && medical.MaxUnit != medical.MinUnit {
2316
+				//	//			out_count = item.Count
2317
+				//	//		}
2318
+				//	//		if item.CountUnit == medical.MaxUnit && medical.MaxUnit == medical.MinUnit {
2319
+				//	//			out_count = item.Count * medical.MinNumber
2320
+				//	//		}
2321
+				//	//
2322
+				//	//	}
2323
+				//	//}
2324
+				//	//按最小单位出库
2325
+				//	//var cha_count = total_count - out_count
2326
+				//
2327
+				//	var cha_count = 100
2328
+				//	fmt.Println("cha_count--------------------------------------", cha_count)
2329
+				//	newadviceInfo.PrescribingNumber = float64(cha_count)
2330
+				//	newadviceInfo.PrescribingNumberUnit = medical.MinUnit
2331
+				//	service.NewHisDrugsDelivery(advice.UserOrgId, creater, newadviceInfo, tx)
2332
+				//}
2333 2333
 
2334 2334
 			}
2335 2335
 		}

+ 14 - 8
controllers/orginfo_api_controller.go Parādīt failu

@@ -1,13 +1,14 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
+	"encoding/json"
5
+	"reflect"
6
+	"time"
7
+
4 8
 	"XT_New/enums"
5 9
 	"XT_New/models"
6 10
 	"XT_New/service"
7 11
 	"XT_New/utils"
8
-	"encoding/json"
9
-	"reflect"
10
-	"time"
11 12
 
12 13
 	"github.com/astaxie/beego"
13 14
 )
@@ -32,13 +33,17 @@ func (c *OrgInfoApiController) GetOrgInfo() {
32 33
 	provinces, _ := service.GetDistrictsByUpid(0)
33 34
 	var citys []*models.District
34 35
 	var districts []*models.District
35
-	if orgInfo.Province > 0 {
36
-		citys, _ = service.GetDistrictsByUpid(orgInfo.Province)
37
-	}
38
-	if orgInfo.City > 0 {
39
-		districts, _ = service.GetDistrictsByUpid(orgInfo.City)
36
+	if orgInfo != nil {
37
+		if orgInfo.Province > 0 {
38
+			citys, _ = service.GetDistrictsByUpid(orgInfo.Province)
39
+		}
40
+		if orgInfo.City > 0 {
41
+			districts, _ = service.GetDistrictsByUpid(orgInfo.City)
42
+		}
40 43
 	}
44
+	gallery, _ := service.GetUserGallery(orgInfo.Id)
41 45
 
46
+	orgInfo.OrgGallery = gallery
42 47
 	orgtypes, _ := service.GetOrgTypes()
43 48
 
44 49
 	illness, _ := service.GetIllnessList()
@@ -50,6 +55,7 @@ func (c *OrgInfoApiController) GetOrgInfo() {
50 55
 		"districts": districts,
51 56
 		"orgtypes":  orgtypes,
52 57
 		"illness":   illness,
58
+		"gallery":   gallery,
53 59
 	})
54 60
 	return
55 61
 }

+ 7 - 0
service/district_service.go Parādīt failu

@@ -11,6 +11,13 @@ func GetDistrictsByUpid(id int64) (dis []*models.District, err error) {
11 11
 	return
12 12
 }
13 13
 
14
+func GetUserGallery(id int64) (gallery []*models.OrgGallery, err error) {
15
+
16
+	err = readUserDb.Where("org_id = ? and status=1", id).Find(&gallery).Error
17
+
18
+	return gallery, err
19
+}
20
+
14 21
 func GetProvinceWithName(name string) (*models.District, error) {
15 22
 	var province models.District
16 23
 	err := readUserDb.Model(&models.District{}).Where("level = 1 AND name like ?", "%"+name+"%").First(&province).Error

+ 9 - 0
service/his_service.go Parādīt failu

@@ -3511,3 +3511,12 @@ func GetBasedrugByIdOne(drug_id int64, user_org_id int64) (models.BaseDrugLib, e
3511 3511
 //	err = writeDb.Save(&order).Error
3512 3512
 //	return
3513 3513
 //}
3514
+
3515
+func GetDialysisPresriptionById(user_org_id int64, patient_id int64, record_date int64) (models.HisPrescriptionInfo, error) {
3516
+
3517
+	prescriptionInfo := models.HisPrescriptionInfo{}
3518
+
3519
+	err := XTReadDB().Where("user_org_id = ? and patient_id = ? and record_date = ? and status=1", user_org_id, patient_id, record_date).First(&prescriptionInfo).Error
3520
+
3521
+	return prescriptionInfo, err
3522
+}

+ 7 - 0
service/inspection_service.go Parādīt failu

@@ -435,3 +435,10 @@ func GetNewGroupInspectionInspectionList(patient_id int64, project_id int64, use
435 435
 	err = XTReadDB().Where("patient_id = ? and project_id = ? and org_id = ?", patient_id, project_id, user_org_id).Group("inspect_date").Order("inspect_date asc").Find(&inspection).Error
436 436
 	return inspection, err
437 437
 }
438
+
439
+func GetNewInspectionDetailList(project_id int64, inspect_value int64, patient_id int64) (inpection []*models.Inspection, err error) {
440
+
441
+	err = XTReadDB().Where("project_id =? and inspect_date = ? and patient_id = ?", project_id, inspect_value, patient_id).Find(&inpection).Error
442
+
443
+	return inpection, err
444
+}