|
@@ -79,6 +79,7 @@ func HisProjectRouters() {
|
79
|
79
|
|
80
|
80
|
beego.Router("/api/hispatient/getalldepartmentlist", &HisProjectApiController{}, "Get:GetAllDepartmentList")
|
81
|
81
|
beego.Router("/api/hispatient/getprescription", &HisProjectApiController{}, "Get:GetPrescription")
|
|
82
|
+ beego.Router("/api/histpatient/getpatientdetail", &HisProjectApiController{}, "Get:GetPatientDetail")
|
82
|
83
|
}
|
83
|
84
|
|
84
|
85
|
func (this *HisProjectApiController) SaveProject() {
|
|
@@ -732,7 +733,6 @@ func (this *HisProjectApiController) SaveHisPatient() {
|
732
|
733
|
recordDateStr := time.Now().Format("2006-01-02")
|
733
|
734
|
recordDate, _ := utils.ParseTimeStringToTime("2006-01-02", recordDateStr)
|
734
|
735
|
nowtime := recordDate.Unix()
|
735
|
|
- fmt.Println("nowtime0000000000", nowtime)
|
736
|
736
|
phone := this.GetString("phone")
|
737
|
737
|
social_type, _ := this.GetInt64("social_type")
|
738
|
738
|
bloodPatient, errcode := service.GetBloodPatientByIdCard(idcard, orgId)
|
|
@@ -750,19 +750,19 @@ func (this *HisProjectApiController) SaveHisPatient() {
|
750
|
750
|
IsNeedCostOfProduction: cost_checked,
|
751
|
751
|
TreatmentCost: medicalExpense_float,
|
752
|
752
|
MedicalInsuranceNumber: medicalinsurancecard,
|
753
|
|
- Name: name,
|
754
|
|
- RegisterType: register,
|
755
|
|
- RegisterCost: registrationfees_float,
|
756
|
|
- BalanceAccountsType: settlementValue,
|
757
|
|
- Gender: sex,
|
758
|
|
- Total: totals_float,
|
759
|
|
- UserOrgId: orgId,
|
760
|
|
- Status: 1,
|
761
|
|
- RecordDate: nowtime,
|
762
|
|
- IsReturn: 1,
|
763
|
|
- Ctime: time.Now().Unix(),
|
764
|
|
- Phone: phone,
|
765
|
|
- SocialType: social_type,
|
|
753
|
+ Name: name,
|
|
754
|
+ RegisterType: register,
|
|
755
|
+ RegisterCost: registrationfees_float,
|
|
756
|
+ BalanceAccountsType: settlementValue,
|
|
757
|
+ Gender: sex,
|
|
758
|
+ Total: totals_float,
|
|
759
|
+ UserOrgId: orgId,
|
|
760
|
+ Status: 1,
|
|
761
|
+ RecordDate: nowtime,
|
|
762
|
+ IsReturn: 1,
|
|
763
|
+ Ctime: time.Now().Unix(),
|
|
764
|
+ Phone: phone,
|
|
765
|
+ SocialType: social_type,
|
766
|
766
|
}
|
767
|
767
|
err := service.CreateHisPatient(&patient)
|
768
|
768
|
lastPatient, err := service.GetLastPatient(orgId)
|
|
@@ -795,18 +795,20 @@ func (this *HisProjectApiController) SaveHisPatient() {
|
795
|
795
|
IsNeedCostOfProduction: cost_checked,
|
796
|
796
|
TreatmentCost: medicalExpense_float,
|
797
|
797
|
MedicalInsuranceNumber: medicalinsurancecard,
|
798
|
|
- Name: name,
|
799
|
|
- RegisterType: register,
|
800
|
|
- RegisterCost: registrationfees_float,
|
801
|
|
- BalanceAccountsType: settlementValue,
|
802
|
|
- Gender: sex,
|
803
|
|
- Total: totals_float,
|
804
|
|
- UserOrgId: orgId,
|
805
|
|
- PatientId: bloodPatient.ID,
|
806
|
|
- Ctime: time.Now().Unix(),
|
807
|
|
- Phone: phone,
|
808
|
|
- SocialType: social_type,
|
809
|
|
- RecordDate: nowtime,
|
|
798
|
+ Name: name,
|
|
799
|
+ RegisterType: register,
|
|
800
|
+ RegisterCost: registrationfees_float,
|
|
801
|
+ BalanceAccountsType: settlementValue,
|
|
802
|
+ Gender: sex,
|
|
803
|
+ Total: totals_float,
|
|
804
|
+ UserOrgId: orgId,
|
|
805
|
+ PatientId: bloodPatient.ID,
|
|
806
|
+ Ctime: time.Now().Unix(),
|
|
807
|
+ Phone: phone,
|
|
808
|
+ SocialType: social_type,
|
|
809
|
+ RecordDate: nowtime,
|
|
810
|
+ Status: 1,
|
|
811
|
+ IsReturn: 1,
|
810
|
812
|
}
|
811
|
813
|
err := service.CreateHisPatient(&patient)
|
812
|
814
|
lastPatient, err := service.GetLastPatient(orgId)
|
|
@@ -1377,3 +1379,17 @@ func (this *HisProjectApiController) GetPrescription() {
|
1377
|
1379
|
"list": list,
|
1378
|
1380
|
})
|
1379
|
1381
|
}
|
|
1382
|
+
|
|
1383
|
+func (this *HisProjectApiController) GetPatientDetail() {
|
|
1384
|
+
|
|
1385
|
+ id, _ := this.GetInt64("id")
|
|
1386
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
1387
|
+ patient, err := service.GetPatientByID(adminUserInfo.CurrentOrgId, id)
|
|
1388
|
+ if err != nil {
|
|
1389
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateConfig)
|
|
1390
|
+ return
|
|
1391
|
+ }
|
|
1392
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
1393
|
+ "patient": patient,
|
|
1394
|
+ })
|
|
1395
|
+}
|