|
@@ -507,8 +507,10 @@ func (this *XcxApiController) GetMobileSchedule() {
|
507
|
507
|
loc, _ := time.LoadLocation("Local")
|
508
|
508
|
time_now := time.Now().Format("2006-01-02")
|
509
|
509
|
timeNowUnix, _ := time.ParseInLocation(timeLayout+"15:04:05", time_now+"00:00:00", loc)
|
510
|
|
- fmt.Println("timeNowUnix", timeNowUnix.Unix())
|
511
|
510
|
|
|
511
|
+ fmt.Println("timeNowUnix", timeNowUnix.Unix())
|
|
512
|
+ //获取该患者最后一次排班
|
|
513
|
+ list, _ := service.GetLastScheduleList(patientID)
|
512
|
514
|
patient, getPatientErr := service.MobileGetPatientDetail(info.UserOrgId, patientID)
|
513
|
515
|
if getPatientErr != nil {
|
514
|
516
|
this.ErrorLog("获取患者信息失败:%v", getPatientErr)
|
|
@@ -527,14 +529,14 @@ func (this *XcxApiController) GetMobileSchedule() {
|
527
|
529
|
return
|
528
|
530
|
}
|
529
|
531
|
|
530
|
|
- receiverTreatmentAccess, getRTARErr := service.MobileGetReceiverTreatmentAccessRecordOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
532
|
+ receiverTreatmentAccess, getRTARErr := service.MobileGetReceiverTreatmentAccessRecordOne(info.UserOrgId, patientID, list.ScheduleDate)
|
531
|
533
|
if getRTARErr != nil {
|
532
|
534
|
this.ErrorLog("获取接诊评估失败:%v", getRTARErr)
|
533
|
535
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
534
|
536
|
return
|
535
|
537
|
}
|
536
|
538
|
|
537
|
|
- predialysisEvaluation, getPEErr := service.MobileGetPredialysisEvaluationOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
539
|
+ predialysisEvaluation, getPEErr := service.MobileGetPredialysisEvaluationOne(info.UserOrgId, patientID, list.ScheduleDate)
|
538
|
540
|
if getPEErr != nil {
|
539
|
541
|
this.ErrorLog("获取透前评估失败:%v", getPEErr)
|
540
|
542
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -548,28 +550,28 @@ func (this *XcxApiController) GetMobileSchedule() {
|
548
|
550
|
return
|
549
|
551
|
}
|
550
|
552
|
|
551
|
|
- doctorAdvices, getDoctorAdvicesErr := service.MobileGetDoctorAdvicesByGroupsOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
553
|
+ doctorAdvices, getDoctorAdvicesErr := service.MobileGetDoctorAdvicesByGroupsOne(info.UserOrgId, patientID, list.ScheduleDate)
|
552
|
554
|
if getDoctorAdvicesErr != nil {
|
553
|
555
|
this.ErrorLog("获取临时医嘱失败:%v", getDoctorAdvicesErr)
|
554
|
556
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
555
|
557
|
return
|
556
|
558
|
}
|
557
|
559
|
|
558
|
|
- dialysisOrder, getDialysisOrderErr := service.MobileGetSchedualDialysisRecordOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
560
|
+ dialysisOrder, getDialysisOrderErr := service.MobileGetSchedualDialysisRecordOne(info.UserOrgId, patientID, list.ScheduleDate)
|
559
|
561
|
if getDialysisOrderErr != nil {
|
560
|
562
|
this.ErrorLog("获取透析记录失败:%v", getDialysisOrderErr)
|
561
|
563
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
562
|
564
|
return
|
563
|
565
|
}
|
564
|
566
|
|
565
|
|
- doubleCheck, getDoubleCheckErr := service.MobileGetDoubleCheckOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
567
|
+ doubleCheck, getDoubleCheckErr := service.MobileGetDoubleCheckOne(info.UserOrgId, patientID, list.ScheduleDate)
|
566
|
568
|
if getDoubleCheckErr != nil {
|
567
|
569
|
this.ErrorLog("获取双人核对记录失败:%v", getDoubleCheckErr)
|
568
|
570
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
569
|
571
|
return
|
570
|
572
|
}
|
571
|
573
|
|
572
|
|
- monitorRecords, getMonitorRecordsErr := service.MobileGetMonitorRecordsOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
574
|
+ monitorRecords, getMonitorRecordsErr := service.MobileGetMonitorRecordsOne(info.UserOrgId, patientID, list.ScheduleDate)
|
573
|
575
|
if getMonitorRecordsErr != nil {
|
574
|
576
|
this.ErrorLog("获取透析监测记录失败:%v", getMonitorRecordsErr)
|
575
|
577
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -584,21 +586,21 @@ func (this *XcxApiController) GetMobileSchedule() {
|
584
|
586
|
return
|
585
|
587
|
}
|
586
|
588
|
|
587
|
|
- assessmentAfterDislysis, getAADErr := service.MobileGetAssessmentAfterDislysisOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
589
|
+ assessmentAfterDislysis, getAADErr := service.MobileGetAssessmentAfterDislysisOne(info.UserOrgId, patientID, list.ScheduleDate)
|
588
|
590
|
if getAADErr != nil {
|
589
|
591
|
this.ErrorLog("获取透后评估失败:%v", getAADErr)
|
590
|
592
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
591
|
593
|
return
|
592
|
594
|
}
|
593
|
595
|
|
594
|
|
- lastAssessmentAfterDislysis, getLAADErr := service.MobileGetAssessmentAfterDislysisOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
596
|
+ lastAssessmentAfterDislysis, getLAADErr := service.MobileGetAssessmentAfterDislysisOne(info.UserOrgId, patientID, list.ScheduleDate)
|
595
|
597
|
if getLAADErr != nil {
|
596
|
598
|
this.ErrorLog("获取上一次透后评估失败:%v", getLAADErr)
|
597
|
599
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
598
|
600
|
return
|
599
|
601
|
}
|
600
|
602
|
|
601
|
|
- treatmentSummary, getTreatmentSummaryErr := service.MobileGetTreatmentSummaryOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
603
|
+ treatmentSummary, getTreatmentSummaryErr := service.MobileGetTreatmentSummaryOne(info.UserOrgId, patientID, list.ScheduleDate)
|
602
|
604
|
if getTreatmentSummaryErr != nil {
|
603
|
605
|
this.ErrorLog("获取治疗小结失败:%v", getTreatmentSummaryErr)
|
604
|
606
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -625,10 +627,10 @@ func (this *XcxApiController) GetMobileSchedule() {
|
625
|
627
|
//获取最后一次血管通路
|
626
|
628
|
lastAssessment, _ := service.GetLastPassWayAssessment(info.UserOrgId, patientID)
|
627
|
629
|
|
628
|
|
- prescribeOne, _ := service.MobileGetDialysisPrescribeByModeIdFive(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
630
|
+ prescribeOne, _ := service.MobileGetDialysisPrescribeByModeIdFive(info.UserOrgId, patientID, list.ScheduleDate)
|
629
|
631
|
var his_advices []*models.HisDoctorAdviceInfo
|
630
|
632
|
if is_open_config.IsOpen == 1 {
|
631
|
|
- his_advices, _ = service.GetAllHisDoctorAdviceOne(info.UserOrgId, patientID, timeNowUnix.Unix())
|
|
633
|
+ his_advices, _ = service.GetAllHisDoctorAdviceOne(info.UserOrgId, patientID, list.ScheduleDate)
|
632
|
634
|
}
|
633
|
635
|
|
634
|
636
|
if getLPEErr != nil {
|