|
@@ -62,27 +62,30 @@ func (this *DialysisParamerterApiController) GetMobileDialysisParameters() {
|
62
|
62
|
var elist []interface{}
|
63
|
63
|
for _, item := range patient {
|
64
|
64
|
//查询当前日期的病人是否存在数据
|
65
|
|
- _, errcode := service.GetToDayDialysisPrescription(item.PatientId, orgid, theTime.Unix())
|
66
|
|
- if errcode == gorm.ErrRecordNotFound {
|
67
|
|
- //查询每个病人透析处方的最后一次数据
|
68
|
|
- prescription, _ := service.GetLastDialysisPrescription(item.PatientId, orgid)
|
69
|
|
- vlist = append(vlist, prescription)
|
70
|
|
- } else if errcode == nil {
|
71
|
|
- //获取当前日期
|
72
|
|
- prescription, _ := service.GetDialysisPrescriptionList(item.PatientId, orgid, theTime.Unix())
|
73
|
|
- vlist = append(vlist, prescription)
|
74
|
|
- }
|
75
|
|
-
|
76
|
|
- _, errcodes := service.GetTodayAssessmentBeforDialysis(item.PatientId, orgid, theTime.Unix())
|
77
|
|
- if errcodes == gorm.ErrRecordNotFound {
|
78
|
|
- //查询每个病人透前评估的最后一次数据
|
79
|
|
- dialysis, _ := service.GetLastAssessmentBeforDialysis(item.PatientId, orgid)
|
80
|
|
- elist = append(elist, dialysis)
|
81
|
|
- } else if errcodes == nil {
|
82
|
|
- dialysis, _ := service.GetAssessmentBeforDialysisByStartime(item.PatientId, orgid, theTime.Unix())
|
83
|
|
- elist = append(elist, dialysis)
|
84
|
|
- }
|
85
|
|
-
|
|
65
|
+ //_, errcode := service.GetToDayDialysisPrescription(item.PatientId, orgid, theTime.Unix())
|
|
66
|
+ //if errcode == gorm.ErrRecordNotFound {
|
|
67
|
+ // //查询每个病人透析处方的最后一次数据
|
|
68
|
+ // prescription, _ := service.GetLastDialysisPrescription(item.PatientId, orgid)
|
|
69
|
+ // vlist = append(vlist, prescription)
|
|
70
|
+ //} else if errcode == nil {
|
|
71
|
+ // //获取当前日期
|
|
72
|
+ // prescription, _ := service.GetDialysisPrescriptionList(item.PatientId, orgid, theTime.Unix())
|
|
73
|
+ // vlist = append(vlist, prescription)
|
|
74
|
+ //}
|
|
75
|
+ //
|
|
76
|
+ //_, errcodes := service.GetTodayAssessmentBeforDialysis(item.PatientId, orgid, theTime.Unix())
|
|
77
|
+ //if errcodes == gorm.ErrRecordNotFound {
|
|
78
|
+ // //查询每个病人透前评估的最后一次数据
|
|
79
|
+ // dialysis, _ := service.GetLastAssessmentBeforDialysis(item.PatientId, orgid)
|
|
80
|
+ // elist = append(elist, dialysis)
|
|
81
|
+ //} else if errcodes == nil {
|
|
82
|
+ // dialysis, _ := service.GetAssessmentBeforDialysisByStartime(item.PatientId, orgid, theTime.Unix())
|
|
83
|
+ // elist = append(elist, dialysis)
|
|
84
|
+ //}
|
|
85
|
+ prescription, _ := service.GetDialysisPrescriptionList(item.PatientId, orgid, theTime.Unix())
|
|
86
|
+ vlist = append(vlist, prescription)
|
|
87
|
+ dialysis, _ := service.GetAssessmentBeforDialysisByStartime(item.PatientId, orgid, theTime.Unix())
|
|
88
|
+ elist = append(elist, dialysis)
|
86
|
89
|
}
|
87
|
90
|
if err == nil {
|
88
|
91
|
this.ServeSuccessJSON(map[string]interface{}{
|
|
@@ -108,11 +111,14 @@ func (this *DialysisParamerterApiController) GetMobileWareHouseOutList() {
|
108
|
111
|
fmt.Println(start_time, end_time)
|
109
|
112
|
orgId := this.GetMobileAdminUserInfo().Org.Id
|
110
|
113
|
wareoutlist, err := service.GetWareHouseOutList(startime.Unix(), endtime.Unix(), orgId)
|
|
114
|
+ count, err := service.GetAnticoagulantCount(startime.Unix(), endtime.Unix(), orgId)
|
111
|
115
|
if err == nil {
|
112
|
116
|
this.ServeSuccessJSON(map[string]interface{}{
|
113
|
117
|
"wareoutlist": wareoutlist,
|
|
118
|
+ "count": count,
|
114
|
119
|
})
|
115
|
120
|
}
|
|
121
|
+
|
116
|
122
|
}
|
117
|
123
|
|
118
|
124
|
func (this *DialysisParamerterApiController) GetAllMobileMaterial() {
|