|
@@ -625,6 +625,8 @@ func (c *HisApiController) CreateHisPatientCaseHistory() {
|
625
|
625
|
remark := c.GetString("remark")
|
626
|
626
|
breathingfloat, _ := strconv.ParseFloat(breathing, 64)
|
627
|
627
|
fmt.Println("breathingfloat", breathingfloat)
|
|
628
|
+ sick, _ := c.GetInt64("sick")
|
|
629
|
+ diagnose, _ := c.GetInt64("diagnose")
|
628
|
630
|
timeLayout := "2006-01-02"
|
629
|
631
|
loc, _ := time.LoadLocation("Local")
|
630
|
632
|
theTime, err := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
|
|
@@ -671,6 +673,8 @@ func (c *HisApiController) CreateHisPatientCaseHistory() {
|
671
|
673
|
Breathing: breathingfloat,
|
672
|
674
|
DoctorAdvice: doctor_advice,
|
673
|
675
|
Remark: remark,
|
|
676
|
+ Sick: sick,
|
|
677
|
+ Diagnose: diagnose,
|
674
|
678
|
}
|
675
|
679
|
|
676
|
680
|
err = service.SaveHisPatientCaseHistory(&caseHistory)
|
|
@@ -1348,9 +1352,22 @@ func (c *HisApiController) GetRegisterInfo() {
|
1348
|
1352
|
Idetinfo: idetinfoStr,
|
1349
|
1353
|
PatientId: patient.ID,
|
1350
|
1354
|
RecordDate: theTime.Unix(),
|
|
1355
|
+ UserOrgId: adminInfo.CurrentOrgId,
|
|
1356
|
+ AdminUserId: adminInfo.AdminUser.Id,
|
|
1357
|
+ IsReturn: 1,
|
1351
|
1358
|
}
|
1352
|
1359
|
fmt.Println(his)
|
1353
|
1360
|
|
|
1361
|
+ lastPatient, _ := service.GetLastPatient(adminInfo.CurrentOrgId)
|
|
1362
|
+ timeStr := time.Now().Format("2006-01-02")
|
|
1363
|
+ timeArr := strings.Split(timeStr, "-")
|
|
1364
|
+ var str = timeArr[0] + timeArr[1] + timeArr[2] + strconv.FormatInt(lastPatient.ID, 10)
|
|
1365
|
+
|
|
1366
|
+ hisPatient := models.HisPatient{
|
|
1367
|
+ Number: str,
|
|
1368
|
+ }
|
|
1369
|
+ err = service.UpdateHisPatient(lastPatient.ID, hisPatient)
|
|
1370
|
+
|
1354
|
1371
|
if res.Output.Iinfo == nil || len(res.Output.Iinfo) == 0 {
|
1355
|
1372
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeRegisterOneException)
|
1356
|
1373
|
return
|