|
@@ -1898,7 +1898,7 @@ func (c *DialysisAPIController) Finish() {
|
1898
|
1898
|
|
1899
|
1899
|
}
|
1900
|
1900
|
|
1901
|
|
- if adminUserInfo.Org.Id == 10101 || adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9675 || adminUserInfo.Org.Id == 10215 || adminUserInfo.Org.Id == 10233 || adminUserInfo.Org.Id == 10223 || adminUserInfo.Org.Id == 10243 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10414 || adminUserInfo.Org.Id == 10430 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10223 || adminUserInfo.Org.Id == 9829 {
|
|
1901
|
+ if adminUserInfo.Org.Id == 10101 || adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 3877 || adminUserInfo.Org.Id == 9675 || adminUserInfo.Org.Id == 10215 || adminUserInfo.Org.Id == 10233 || adminUserInfo.Org.Id == 10223 || adminUserInfo.Org.Id == 10243 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 10414 || adminUserInfo.Org.Id == 10430 || adminUserInfo.Org.Id == 10432 || adminUserInfo.Org.Id == 10445 || adminUserInfo.Org.Id == 10223 || adminUserInfo.Org.Id == 9829 || adminUserInfo.Org.Id == 10432 {
|
1902
|
1902
|
evaluation, _ := service.MobileGetPredialysisEvaluationOne(adminUserInfo.Org.Id, id, recordDate.Unix())
|
1903
|
1903
|
if evaluation.SystolicBloodPressure == 0 {
|
1904
|
1904
|
evaluation.SystolicBloodPressure = fmonitorRecords.SystolicBloodPressure
|
|
@@ -2000,6 +2000,11 @@ func (c *DialysisAPIController) Finish() {
|
2000
|
2000
|
tempassessmentAfterDislysis.DiastolicBloodPressure = endmonitorRecords.DiastolicBloodPressure
|
2001
|
2001
|
}
|
2002
|
2002
|
|
|
2003
|
+ if endmonitorRecords.ID > 0 && adminUserInfo.Org.Id == 10432 {
|
|
2004
|
+ tempassessmentAfterDislysis.SystolicBloodPressure = endmonitorRecords.SystolicBloodPressure
|
|
2005
|
+ tempassessmentAfterDislysis.DiastolicBloodPressure = endmonitorRecords.DiastolicBloodPressure
|
|
2006
|
+ }
|
|
2007
|
+
|
2003
|
2008
|
if lastAssessmentAfterDislysis != nil {
|
2004
|
2009
|
tempassessmentAfterDislysis.BloodPressureType = lastAssessmentAfterDislysis.BloodPressureType
|
2005
|
2010
|
|
|
@@ -2087,85 +2092,6 @@ func (c *DialysisAPIController) Finish() {
|
2087
|
2092
|
return
|
2088
|
2093
|
}
|
2089
|
2094
|
|
2090
|
|
- //下机完自动消毒,针对长沙南雅
|
2091
|
|
- if dialysisOrder.Stage == 1 {
|
2092
|
|
- if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 {
|
2093
|
|
- //根据床位号获取设备型号
|
2094
|
|
- unitType, _ := service.GetUnitType(dialysisOrder.BedID, dialysisOrder.UserOrgId)
|
2095
|
|
- //查询使用消毒最后一条消毒记录
|
2096
|
|
- _, err := service.GetLaseDeviceInfomation(dialysisOrder.UserOrgId, dialysisOrder.BedID, dialysisOrder.DialysisDate, dialysisOrder.SchedualType)
|
2097
|
|
- fmt.Println("err", err)
|
2098
|
|
- if err == gorm.ErrRecordNotFound {
|
2099
|
|
- //查找排班
|
2100
|
|
- scheduleByPatient, _ := service.GetScheduleByPatient(dialysisOrder.PatientId, dialysisOrder.DialysisDate, dialysisOrder.UserOrgId)
|
2101
|
|
- //查询改设备是否有消毒计划
|
2102
|
|
- plan, errcode := service.GetDisInfectionTime(dialysisOrder.UserOrgId, unitType.UnitType, dialysisOrder.SchedualType, scheduleByPatient.ScheduleWeek)
|
2103
|
|
-
|
2104
|
|
- //根据床位号获取设备id
|
2105
|
|
- addmacher, _ := service.GetEquimentIDTwo(dialysisOrder.BedID, dialysisOrder.UserOrgId)
|
2106
|
|
-
|
2107
|
|
- //查询病人信息
|
2108
|
|
- patients, _ := service.GetPatientInfoMation(dialysisOrder.PatientId)
|
2109
|
|
- var con = ""
|
2110
|
|
- if patients.IsInfectious == 0 {
|
2111
|
|
- con = ""
|
2112
|
|
- }
|
2113
|
|
- if patients.IsInfectious == 1 {
|
2114
|
|
- con = "无"
|
2115
|
|
- }
|
2116
|
|
- if patients.IsInfectious == 2 {
|
2117
|
|
- con = "有"
|
2118
|
|
- }
|
2119
|
|
-
|
2120
|
|
- //如果没有消毒计划,去查询该设备的上次消毒时间
|
2121
|
|
- if errcode == gorm.ErrRecordNotFound {
|
2122
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
2123
|
|
- return
|
2124
|
|
- }
|
2125
|
|
- if errcode == nil {
|
2126
|
|
- var end_time int64
|
2127
|
|
- end_time = endDate.Unix() + plan.DisinfecTime*60
|
2128
|
|
- //新增消毒
|
2129
|
|
- information := models.DeviceInformation{
|
2130
|
|
- Date: dialysisOrder.DialysisDate,
|
2131
|
|
- Zone: dialysisOrder.ZoneId,
|
2132
|
|
- Class: dialysisOrder.SchedualType,
|
2133
|
|
- BedNumber: dialysisOrder.BedID,
|
2134
|
|
- PatientId: dialysisOrder.PatientId,
|
2135
|
|
- DialysisMode: scheduleByPatient.ModeId,
|
2136
|
|
- LongTime: strconv.FormatInt(plan.DisinfecTime, 10),
|
2137
|
|
- Disinfection: 1,
|
2138
|
|
- DialysisConcentration: 1,
|
2139
|
|
- DisinfectionStatus: 1,
|
2140
|
|
- Move: 1,
|
2141
|
|
- UserOrgId: dialysisOrder.UserOrgId,
|
2142
|
|
- DisinfectType: plan.Way,
|
2143
|
|
- DisinfectantType: plan.MachineDisinfectant,
|
2144
|
|
- FluidPath: plan.DisinfectanWay, //液路消毒方式
|
2145
|
|
- Disinfectant: plan.Disinfectant,
|
2146
|
|
- Ctime: time.Now().Unix(),
|
2147
|
|
- Status: 1,
|
2148
|
|
- SignName: dialysisOrder.FinishNurse,
|
2149
|
|
- EquimentId: addmacher.ID,
|
2150
|
|
- DisinfectionResidue: 2,
|
2151
|
|
- Bed: addmacher.BedNumber,
|
2152
|
|
- StartTime: dialysisOrder.StartTime,
|
2153
|
|
- EndTime: dialysisOrder.EndTime,
|
2154
|
|
- Contagion: con,
|
2155
|
|
- WeightLoss: 0,
|
2156
|
|
- Hyperfiltratio: 0,
|
2157
|
|
- DialysisHour: "",
|
2158
|
|
- MachineRun: 1,
|
2159
|
|
- DisinfecStartime: endDate.Unix(),
|
2160
|
|
- DisinfecEndtime: end_time,
|
2161
|
|
- }
|
2162
|
|
- err := service.CreateInformationTwo(&information)
|
2163
|
|
- fmt.Println("报错", err)
|
2164
|
|
- }
|
2165
|
|
- }
|
2166
|
|
- }
|
2167
|
|
- }
|
2168
|
|
-
|
2169
|
2095
|
if dialysisOrder.Stage == 1 {
|
2170
|
2096
|
err := service.ModifyDialysisRecord(dialysisOrder.ID, nurseID, endDate.Unix(), adminUserInfo.AdminUser.Id, puncture_point_haematoma, internal_fistula, catheter, cruor, mission)
|
2171
|
2097
|
|
|
@@ -2180,6 +2106,80 @@ func (c *DialysisAPIController) Finish() {
|
2180
|
2106
|
//结束时候透析次数加1
|
2181
|
2107
|
service.UpdateSolutionByPatientId(id)
|
2182
|
2108
|
|
|
2109
|
+ //下机完自动消毒,针对长沙南雅
|
|
2110
|
+ if dialysisOrder.Stage == 1 {
|
|
2111
|
+ if adminUserInfo.Org.Id == 9671 || adminUserInfo.Org.Id == 10340 || adminUserInfo.Org.Id == 3877 {
|
|
2112
|
+ //根据床位号获取设备型号
|
|
2113
|
+ unitType, _ := service.GetUnitType(dialysisOrder.BedID, dialysisOrder.UserOrgId)
|
|
2114
|
+ //查询使用消毒最后一条消毒记录
|
|
2115
|
+ _, err := service.GetLaseDeviceInfomation(dialysisOrder.UserOrgId, dialysisOrder.BedID, dialysisOrder.DialysisDate, dialysisOrder.SchedualType)
|
|
2116
|
+ fmt.Println("err", err)
|
|
2117
|
+ if err == gorm.ErrRecordNotFound {
|
|
2118
|
+ //查找排班
|
|
2119
|
+ scheduleByPatient, _ := service.GetScheduleByPatient(dialysisOrder.PatientId, dialysisOrder.DialysisDate, dialysisOrder.UserOrgId)
|
|
2120
|
+ //查询改设备是否有消毒计划
|
|
2121
|
+ plan, errcode := service.GetDisInfectionTime(dialysisOrder.UserOrgId, unitType.UnitType, dialysisOrder.SchedualType, scheduleByPatient.ScheduleWeek)
|
|
2122
|
+
|
|
2123
|
+ //根据床位号获取设备id
|
|
2124
|
+ addmacher, _ := service.GetEquimentIDTwo(dialysisOrder.BedID, dialysisOrder.UserOrgId)
|
|
2125
|
+
|
|
2126
|
+ //查询病人信息
|
|
2127
|
+ patients, _ := service.GetPatientInfoMation(dialysisOrder.PatientId)
|
|
2128
|
+ var con = ""
|
|
2129
|
+ if patients.IsInfectious == 0 {
|
|
2130
|
+ con = ""
|
|
2131
|
+ }
|
|
2132
|
+ if patients.IsInfectious == 1 {
|
|
2133
|
+ con = "无"
|
|
2134
|
+ }
|
|
2135
|
+ if patients.IsInfectious == 2 {
|
|
2136
|
+ con = "有"
|
|
2137
|
+ }
|
|
2138
|
+
|
|
2139
|
+ if errcode == nil {
|
|
2140
|
+ var end_time int64
|
|
2141
|
+ end_time = endDate.Unix() + plan.DisinfecTime*60
|
|
2142
|
+ //新增消毒
|
|
2143
|
+ information := models.DeviceInformation{
|
|
2144
|
+ Date: dialysisOrder.DialysisDate,
|
|
2145
|
+ Zone: dialysisOrder.ZoneId,
|
|
2146
|
+ Class: dialysisOrder.SchedualType,
|
|
2147
|
+ BedNumber: dialysisOrder.BedID,
|
|
2148
|
+ PatientId: dialysisOrder.PatientId,
|
|
2149
|
+ DialysisMode: scheduleByPatient.ModeId,
|
|
2150
|
+ LongTime: strconv.FormatInt(plan.DisinfecTime, 10),
|
|
2151
|
+ Disinfection: 1,
|
|
2152
|
+ DialysisConcentration: 1,
|
|
2153
|
+ DisinfectionStatus: 1,
|
|
2154
|
+ Move: 1,
|
|
2155
|
+ UserOrgId: dialysisOrder.UserOrgId,
|
|
2156
|
+ DisinfectType: plan.Way,
|
|
2157
|
+ DisinfectantType: plan.MachineDisinfectant,
|
|
2158
|
+ FluidPath: plan.DisinfectanWay, //液路消毒方式
|
|
2159
|
+ Disinfectant: plan.Disinfectant,
|
|
2160
|
+ Ctime: time.Now().Unix(),
|
|
2161
|
+ Status: 1,
|
|
2162
|
+ SignName: nurseID,
|
|
2163
|
+ EquimentId: addmacher.ID,
|
|
2164
|
+ DisinfectionResidue: 2,
|
|
2165
|
+ Bed: addmacher.BedNumber,
|
|
2166
|
+ StartTime: dialysisOrder.StartTime,
|
|
2167
|
+ EndTime: dialysisOrder.EndTime,
|
|
2168
|
+ Contagion: con,
|
|
2169
|
+ WeightLoss: 0,
|
|
2170
|
+ Hyperfiltratio: 0,
|
|
2171
|
+ DialysisHour: "",
|
|
2172
|
+ MachineRun: 1,
|
|
2173
|
+ DisinfecStartime: endDate.Unix(),
|
|
2174
|
+ DisinfecEndtime: end_time,
|
|
2175
|
+ }
|
|
2176
|
+ err := service.CreateInformationTwo(&information)
|
|
2177
|
+ fmt.Println("报错", err)
|
|
2178
|
+ }
|
|
2179
|
+ }
|
|
2180
|
+ }
|
|
2181
|
+ }
|
|
2182
|
+
|
2183
|
2183
|
dialysisOrder.Stage = 2
|
2184
|
2184
|
dialysisOrder.FinishNurse = nurseID
|
2185
|
2185
|
dialysisOrder.FinishCreator = adminUserInfo.AdminUser.Id
|
|
@@ -2596,8 +2596,9 @@ func (this *DialysisAPIController) StartDialysis() {
|
2596
|
2596
|
if errcode == nil {
|
2597
|
2597
|
record.SystolicBloodPressure = befor.SystolicBloodPressure
|
2598
|
2598
|
record.DiastolicBloodPressure = befor.DiastolicBloodPressure
|
2599
|
|
-
|
2600
|
|
- record.BreathingRate = befor.BreathingRate
|
|
2599
|
+ if adminUserInfo.Org.Id != 10445 {
|
|
2600
|
+ record.BreathingRate = befor.BreathingRate
|
|
2601
|
+ }
|
2601
|
2602
|
record.PulseFrequency = befor.PulseFrequency
|
2602
|
2603
|
record.Temperature = befor.Temperature
|
2603
|
2604
|
}
|