|
@@ -1136,3 +1136,101 @@ func (this *NewDialysisApiController) DeleteManagement() {
|
1136
|
1136
|
this.ServeSuccessJSON(returnData)
|
1137
|
1137
|
return
|
1138
|
1138
|
}
|
|
1139
|
+
|
|
1140
|
+func (this *NewDialysisApiController) UpdatedPatient() {
|
|
1141
|
+ adminInfo := this.GetMobileAdminUserInfo()
|
|
1142
|
+ orgid := adminInfo.Org.Id
|
|
1143
|
+ fmt.Print("机构ID", orgid)
|
|
1144
|
+ dataBody := make(map[string]interface{}, 0)
|
|
1145
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
|
1146
|
+ fmt.Print("err", err)
|
|
1147
|
+ name := dataBody["name"].(string)
|
|
1148
|
+ fmt.Println("姓名", name)
|
|
1149
|
+ sex := int64(dataBody["sex"].(float64))
|
|
1150
|
+ fmt.Print("性别", sex)
|
|
1151
|
+ idCard := dataBody["idCard"].(string)
|
|
1152
|
+ fmt.Print("身份证", idCard)
|
|
1153
|
+ birthday := dataBody["birthday"].(string)
|
|
1154
|
+ births := strings.Split(birthday, "-")
|
|
1155
|
+ fmt.Print("生日", birthday)
|
|
1156
|
+ birYear, _ := strconv.Atoi(births[0])
|
|
1157
|
+ age := time.Now().Year() - birYear
|
|
1158
|
+ ages := int64(age)
|
|
1159
|
+ fmt.Println("age是多少", ages)
|
|
1160
|
+ timeLayout := "2006-01-02 15:04:05"
|
|
1161
|
+ theTime, err := utils.ParseTimeStringToTime(timeLayout, birthday+" 00:00:00")
|
|
1162
|
+ birth := theTime.Unix()
|
|
1163
|
+ fmt.Print(birth)
|
|
1164
|
+ phone := dataBody["phone"].(string)
|
|
1165
|
+ fmt.Print("电话号码", phone)
|
|
1166
|
+ patientType := dataBody["result"].([]interface{})
|
|
1167
|
+ fmt.Print("患者标签", patientType)
|
|
1168
|
+ dialysis := dataBody["dialysis"].(string)
|
|
1169
|
+ fmt.Print("透析号", dialysis)
|
|
1170
|
+ patientsoure := int64(dataBody["patientsoure"].(float64))
|
|
1171
|
+ fmt.Print("患者来源", patientsoure)
|
|
1172
|
+ lapseto := int64(dataBody["lapseto"].(float64))
|
|
1173
|
+ fmt.Print("留置状态", lapseto)
|
|
1174
|
+ contagions := dataBody["resultTwo"].([]interface{})
|
|
1175
|
+ fmt.Print("传染病", contagions)
|
|
1176
|
+ ids := make([]int64, 0)
|
|
1177
|
+ for _, contagion := range contagions {
|
|
1178
|
+ id, _ := strconv.ParseInt(contagion.(string), 10, 64)
|
|
1179
|
+ ids = append(ids, id)
|
|
1180
|
+ }
|
|
1181
|
+ fmt.Print("传染病2", contagions)
|
|
1182
|
+ is_infectious := int64(dataBody["is_infectious"].(float64))
|
|
1183
|
+ fmt.Print("传染病", is_infectious)
|
|
1184
|
+ adminssionNumber := dataBody["admissionNumber"].(string)
|
|
1185
|
+ fmt.Print("住院号", adminssionNumber)
|
|
1186
|
+
|
|
1187
|
+ fistdate := dataBody["fistDate"].(string)
|
|
1188
|
+ fmt.Print("首次透析日期", fistdate)
|
|
1189
|
+ timeLayouts := "2006-01-02"
|
|
1190
|
+ loc, _ := time.LoadLocation("Local")
|
|
1191
|
+ times, err := time.ParseInLocation(timeLayouts+" 15:04:05", fistdate+" 00:00:00", loc)
|
|
1192
|
+ //times, err := utils.ParseTimeStringToTime(timeLayout, fistdate+"00:00:00")
|
|
1193
|
+ fisttime := times.Unix()
|
|
1194
|
+ fmt.Print(fisttime)
|
|
1195
|
+
|
|
1196
|
+ diagonse := dataBody["diagnose"].(string)
|
|
1197
|
+ fmt.Print("诊断", diagonse)
|
|
1198
|
+ avatar := dataBody["avatar"].(string)
|
|
1199
|
+ fmt.Print("头像", avatar)
|
|
1200
|
+ //慢性病
|
|
1201
|
+ requipmentId := dataBody["requipmentId"].(string)
|
|
1202
|
+ fmt.Print("设备ID", requipmentId)
|
|
1203
|
+ slowContagions := dataBody["resultThree"].([]interface{})
|
|
1204
|
+ fmt.Print("慢性传染病", slowContagions)
|
|
1205
|
+ idss := make([]int64, 0)
|
|
1206
|
+ for _, contagion := range slowContagions {
|
|
1207
|
+ id, _ := strconv.ParseInt(contagion.(string), 10, 64)
|
|
1208
|
+ idss = append(ids, id)
|
|
1209
|
+ }
|
|
1210
|
+ fmt.Print(idss)
|
|
1211
|
+ slowDiseases := dataBody["resultFour"].([]interface{})
|
|
1212
|
+ idsss := make([]int64, 0)
|
|
1213
|
+ for _, contagion := range slowDiseases {
|
|
1214
|
+ id, _ := strconv.ParseInt(contagion.(string), 10, 64)
|
|
1215
|
+ idsss = append(ids, id)
|
|
1216
|
+ }
|
|
1217
|
+ fmt.Print("idsss", idsss)
|
|
1218
|
+ fmt.Print("慢性病", slowDiseases)
|
|
1219
|
+ bloodPatient := int64(dataBody["bloodPatient"].(float64))
|
|
1220
|
+ fmt.Print("血透病人", bloodPatient)
|
|
1221
|
+ slowpatient := int64(dataBody["slowPatient"].(float64))
|
|
1222
|
+ fmt.Print("慢病病人", slowpatient)
|
|
1223
|
+ memberpatient := int64(dataBody["memberPatient"].(float64))
|
|
1224
|
+ fmt.Print("会员病人", memberpatient)
|
|
1225
|
+ //会员
|
|
1226
|
+ memberFistDate := dataBody["memberFistDate"].(string)
|
|
1227
|
+ fmt.Print("首次透析日期", memberFistDate)
|
|
1228
|
+ //membertimes, err := utils.ParseTimeStringToTime(timeLayout, memberFistDate+"00:00:00")
|
|
1229
|
+ membertimes, _ := time.ParseInLocation(timeLayouts+" 15:04:05", memberFistDate+" 00:00:00", loc)
|
|
1230
|
+ memtime := membertimes.Unix()
|
|
1231
|
+ fmt.Print("会员透析日期", memtime)
|
|
1232
|
+ patient_type := int64(dataBody["patientType"].(float64))
|
|
1233
|
+ fmt.Print("病种", patient_type)
|
|
1234
|
+ treatmentmethod := int64(dataBody["treatmentMethod"].(float64))
|
|
1235
|
+ fmt.Print("治疗方式", treatmentmethod)
|
|
1236
|
+}
|