|
@@ -2659,3 +2659,75 @@ func (this *NewDialysisApiController) UpdateImage() {
|
2659
|
2659
|
"electronic_signature": Url,
|
2660
|
2660
|
})
|
2661
|
2661
|
}
|
|
2662
|
+
|
|
2663
|
+func (this *NewDialysisApiController) SaveCourseManageMent() {
|
|
2664
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
2665
|
+ orgid := adminUser.Org.Id
|
|
2666
|
+ content := this.GetString("content")
|
|
2667
|
+ fmt.Println("content", content)
|
|
2668
|
+ patientid, _ := this.GetInt64("patientid")
|
|
2669
|
+ patient, _ := service.GetPatientDetailTwo(patientid)
|
|
2670
|
+ fmt.Println("patientid", patientid)
|
|
2671
|
+ course_content := this.GetString("course_content")
|
|
2672
|
+ fmt.Println("courese_content", course_content)
|
|
2673
|
+ startTime := this.GetString("start_time")
|
|
2674
|
+ checkDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", startTime)
|
|
2675
|
+ title := this.GetString("title")
|
|
2676
|
+ fmt.Println("title", title)
|
|
2677
|
+ record := models.PatientDiseaseCourse{
|
|
2678
|
+ OrgID: orgid,
|
|
2679
|
+ PatientID: patient.BloodId,
|
|
2680
|
+ Recorder: adminUser.AdminUser.Id,
|
|
2681
|
+ RecordTime: checkDate.Unix(),
|
|
2682
|
+ Content: content,
|
|
2683
|
+ Status: 1,
|
|
2684
|
+ CreateTime: time.Now().Unix(),
|
|
2685
|
+ Title: title,
|
|
2686
|
+ }
|
|
2687
|
+ err := service.CreatePatientCourseOfDisease(&record)
|
|
2688
|
+ if err != nil {
|
|
2689
|
+ this.ErrorLog("创建患者病程记录失败:%v", err)
|
|
2690
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2691
|
+ return
|
|
2692
|
+ }
|
|
2693
|
+
|
|
2694
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2695
|
+ "record": record,
|
|
2696
|
+ })
|
|
2697
|
+}
|
|
2698
|
+
|
|
2699
|
+func (this *NewDialysisApiController) SaveCourseManageMentTwo() {
|
|
2700
|
+
|
|
2701
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
2702
|
+ orgid := adminUser.Org.Id
|
|
2703
|
+ content := this.GetString("content")
|
|
2704
|
+ fmt.Println("content", content)
|
|
2705
|
+ patientid, _ := this.GetInt64("patientid")
|
|
2706
|
+ fmt.Println("patientid", patientid)
|
|
2707
|
+ course_content := this.GetString("course_content")
|
|
2708
|
+ fmt.Println("courese_content", course_content)
|
|
2709
|
+ startTime := this.GetString("start_time")
|
|
2710
|
+ checkDate, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", startTime)
|
|
2711
|
+ title := this.GetString("title")
|
|
2712
|
+ fmt.Println("title", title)
|
|
2713
|
+ record := models.PatientDiseaseCourse{
|
|
2714
|
+ OrgID: orgid,
|
|
2715
|
+ PatientID: patientid,
|
|
2716
|
+ Recorder: adminUser.AdminUser.Id,
|
|
2717
|
+ RecordTime: checkDate.Unix(),
|
|
2718
|
+ Content: content,
|
|
2719
|
+ Status: 1,
|
|
2720
|
+ CreateTime: time.Now().Unix(),
|
|
2721
|
+ Title: title,
|
|
2722
|
+ }
|
|
2723
|
+ err := service.CreatePatientCourseOfDisease(&record)
|
|
2724
|
+ if err != nil {
|
|
2725
|
+ this.ErrorLog("创建患者病程记录失败:%v", err)
|
|
2726
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2727
|
+ return
|
|
2728
|
+ }
|
|
2729
|
+
|
|
2730
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2731
|
+ "record": record,
|
|
2732
|
+ })
|
|
2733
|
+}
|