|
@@ -241,6 +241,8 @@ func (this *NewDialysisApiController) SavePatient() {
|
241
|
241
|
|
242
|
242
|
treatmentmethod := int64(dataBody["treatmentMethod"].(float64))
|
243
|
243
|
|
|
244
|
+ remark := dataBody["remark"].(string)
|
|
245
|
+
|
244
|
246
|
//查询身份证号码是否存在
|
245
|
247
|
thisPatientOne, _ := service.FindPatientByIdCardNoFive(orgid, idCard)
|
246
|
248
|
if thisPatientOne.ID > 0 {
|
|
@@ -289,6 +291,7 @@ func (this *NewDialysisApiController) SavePatient() {
|
289
|
291
|
IsInfectious: is_infectious,
|
290
|
292
|
RegistrarsId: adminInfo.AdminUser.Id,
|
291
|
293
|
RelativePhone: relative_phone,
|
|
294
|
+ Remark: remark,
|
292
|
295
|
}
|
293
|
296
|
err = service.CreateOldPatient(&patients)
|
294
|
297
|
fmt.Print("报错", err)
|
|
@@ -330,6 +333,7 @@ func (this *NewDialysisApiController) SavePatient() {
|
330
|
333
|
IdCardNo: idCard,
|
331
|
334
|
RegistrarsId: adminInfo.AdminUser.Id,
|
332
|
335
|
RelativePhone: relative_phone,
|
|
336
|
+ Remark: remark,
|
333
|
337
|
}
|
334
|
338
|
err = service.CreateNewPatient(&patientsNew)
|
335
|
339
|
key := strconv.FormatInt(orgid, 10) + ":" + strconv.FormatInt(patient.ID, 10) + ":patient_info"
|
|
@@ -346,12 +350,9 @@ func (this *NewDialysisApiController) SavePatient() {
|
346
|
350
|
"patient": patientsNew,
|
347
|
351
|
})
|
348
|
352
|
}
|
349
|
|
-
|
350
|
|
- fmt.Print("slowpatient", slowpatient)
|
351
|
353
|
//如果是慢病病人
|
352
|
354
|
if slowpatient == 1 {
|
353
|
355
|
_, errcodetwo := service.GetSlowPatientData(phone, orgid)
|
354
|
|
- fmt.Print("查询慢慢是吧", errcodetwo)
|
355
|
356
|
if errcodetwo == gorm.ErrRecordNotFound {
|
356
|
357
|
patients := models.CdmPatients{
|
357
|
358
|
Name: name,
|
|
@@ -399,6 +400,7 @@ func (this *NewDialysisApiController) SavePatient() {
|
399
|
400
|
IsInfectious: is_infectious,
|
400
|
401
|
IdCardNo: idCard,
|
401
|
402
|
EquitmentId: requipmentId,
|
|
403
|
+ Remark: remark,
|
402
|
404
|
}
|
403
|
405
|
err = service.CreateNewPatient(&patientsNew)
|
404
|
406
|
if err != nil {
|
|
@@ -409,9 +411,8 @@ func (this *NewDialysisApiController) SavePatient() {
|
409
|
411
|
"patient": patientsNew,
|
410
|
412
|
})
|
411
|
413
|
} else if errcodetwo == nil {
|
412
|
|
- fmt.Print("病人已存在")
|
|
414
|
+
|
413
|
415
|
if memberpatient == 1 {
|
414
|
|
- fmt.Print("进来没有", memberpatient)
|
415
|
416
|
_, errmembercode := service.GetMemberPatientInfo(orgid, phone)
|
416
|
417
|
if errmembercode == gorm.ErrRecordNotFound {
|
417
|
418
|
customer := models.SgjUserCustomer{
|
|
@@ -498,7 +499,6 @@ func (this *NewDialysisApiController) SavePatient() {
|
498
|
499
|
}
|
499
|
500
|
|
500
|
501
|
if memberpatient == 1 {
|
501
|
|
- fmt.Print("进来没有", memberpatient)
|
502
|
502
|
_, errmembercode := service.GetMemberPatientInfo(orgid, phone)
|
503
|
503
|
if errmembercode == gorm.ErrRecordNotFound {
|
504
|
504
|
customer := models.SgjUserCustomer{
|
|
@@ -547,6 +547,7 @@ func (this *NewDialysisApiController) SavePatient() {
|
547
|
547
|
MemberPatienttype: patient_type,
|
548
|
548
|
MemberTreatement: treatmentmethod,
|
549
|
549
|
RelativePhone: relative_phone,
|
|
550
|
+ Remark: remark,
|
550
|
551
|
}
|
551
|
552
|
err = service.CreateNewPatient(&patientsNew)
|
552
|
553
|
fmt.Print("报错", err)
|
|
@@ -1330,6 +1331,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
|
1330
|
1331
|
|
1331
|
1332
|
out_reason := dataBody["out_reason"].(string)
|
1332
|
1333
|
|
|
1334
|
+ remark := dataBody["remark"].(string)
|
1333
|
1335
|
fmt.Print(fisttime)
|
1334
|
1336
|
//如果是血透病人
|
1335
|
1337
|
if bloodPatient == 1 {
|
|
@@ -1384,6 +1386,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
|
1384
|
1386
|
DeathTime: death_time,
|
1385
|
1387
|
OutReason: out_reason,
|
1386
|
1388
|
RelativePhone: relative_phone,
|
|
1389
|
+ Remark: remark,
|
1387
|
1390
|
}
|
1388
|
1391
|
err = service.UpdatedPatient(patients, patient.BloodId)
|
1389
|
1392
|
key := strconv.FormatInt(orgid, 10) + ":" + strconv.FormatInt(patient.BloodId, 10) + ":patient_info"
|
|
@@ -1414,6 +1417,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
|
1414
|
1417
|
OutReason: out_reason,
|
1415
|
1418
|
DeathTime: death_time,
|
1416
|
1419
|
RelativePhone: relative_phone,
|
|
1420
|
+ Remark: remark,
|
1417
|
1421
|
}
|
1418
|
1422
|
err = service.UpdateXtPatientNew(patientsNew, id)
|
1419
|
1423
|
if err != nil {
|
|
@@ -1472,6 +1476,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
|
1472
|
1476
|
OutReason: out_reason,
|
1473
|
1477
|
DeathTime: death_time,
|
1474
|
1478
|
RelativePhone: relative_phone,
|
|
1479
|
+ Remark: remark,
|
1475
|
1480
|
}
|
1476
|
1481
|
err = service.UpdateXtPatientNew(xtPatientsNew, id)
|
1477
|
1482
|
fmt.Print("更新失败", err)
|
|
@@ -1529,6 +1534,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
|
1529
|
1534
|
OutReason: out_reason,
|
1530
|
1535
|
DeathTime: death_time,
|
1531
|
1536
|
RelativePhone: relative_phone,
|
|
1537
|
+ Remark: remark,
|
1532
|
1538
|
}
|
1533
|
1539
|
err = service.UpdateXtPatientNewOne(patientsNew, id)
|
1534
|
1540
|
if err != nil {
|