|
@@ -1076,6 +1076,9 @@ func (c *HisApiController) GetPrivateExpensesOrder() {
|
1076
|
1076
|
case 9:
|
1077
|
1077
|
item.MedChrgitmType = "14"
|
1078
|
1078
|
break
|
|
1079
|
+ default:
|
|
1080
|
+ item.MedChrgitmType = "14"
|
|
1081
|
+ break
|
1079
|
1082
|
}
|
1080
|
1083
|
}
|
1081
|
1084
|
} else if item.HisPrescriptionProject.Type == 3 {
|
|
@@ -10795,12 +10798,25 @@ func (c *HisApiController) GetHisMonthChargePatientInfo() {
|
10795
|
10798
|
case_history, _ := service.GetHisPatientCaseHistoryInfo(admin.CurrentOrgId, patient_id, recordDateTime)
|
10796
|
10799
|
patientPrescriptionInfo, _ := service.FindPatientPrescriptionInfo(admin.CurrentOrgId, patient_id, recordDateTime, p_type, his_patient_id)
|
10797
|
10800
|
|
|
10801
|
+ month_p_info, _ := service.FindPatientPrescriptionInfoTen(admin.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime, p_type)
|
|
10802
|
+
|
10798
|
10803
|
lastPatientPrescriptionInfo, _ := service.FindLastPatientPrescriptionInfoTwo(admin.CurrentOrgId, patient_id, recordDateTime, p_type)
|
10799
|
10804
|
|
10800
|
10805
|
doctors, _ := service.GetHisAdminUserDoctors(admin.CurrentOrgId)
|
10801
|
10806
|
//获取所有科室信息
|
10802
|
10807
|
department, _ := service.GetAllDepartMent(admin.CurrentOrgId)
|
10803
|
10808
|
|
|
10809
|
+ var dia string
|
|
10810
|
+ for _, item := range month_p_info {
|
|
10811
|
+ if len(dia) == 0 {
|
|
10812
|
+ dia = item.Diagnosis
|
|
10813
|
+ } else {
|
|
10814
|
+ dia = dia + "," + item.Diagnosis
|
|
10815
|
+ }
|
|
10816
|
+ }
|
|
10817
|
+
|
|
10818
|
+ dia_arr := removeDuplicates(strings.Split(dia, ","))
|
|
10819
|
+ dia_arr = removeEmptyStrings(dia_arr)
|
10804
|
10820
|
c.ServeSuccessJSON(map[string]interface{}{
|
10805
|
10821
|
"his_info": his_patient_info,
|
10806
|
10822
|
"xt_info": xt_patient_info,
|
|
@@ -10812,10 +10828,37 @@ func (c *HisApiController) GetHisMonthChargePatientInfo() {
|
10812
|
10828
|
"doctors": doctors,
|
10813
|
10829
|
"department": department,
|
10814
|
10830
|
"settle_total": settle_total,
|
|
10831
|
+ "dia_arr": dia_arr,
|
10815
|
10832
|
})
|
10816
|
10833
|
return
|
10817
|
10834
|
}
|
10818
|
10835
|
|
|
10836
|
+func removeEmptyStrings(input []string) []string {
|
|
10837
|
+ var output []string
|
|
10838
|
+
|
|
10839
|
+ for _, s := range input {
|
|
10840
|
+ if s != "" {
|
|
10841
|
+ output = append(output, s)
|
|
10842
|
+ }
|
|
10843
|
+ }
|
|
10844
|
+
|
|
10845
|
+ return output
|
|
10846
|
+}
|
|
10847
|
+
|
|
10848
|
+func removeDuplicates(input []string) []string {
|
|
10849
|
+ seen := make(map[string]bool)
|
|
10850
|
+ output := []string{}
|
|
10851
|
+
|
|
10852
|
+ for _, s := range input {
|
|
10853
|
+ if _, exists := seen[s]; !exists {
|
|
10854
|
+ seen[s] = true
|
|
10855
|
+ output = append(output, s)
|
|
10856
|
+ }
|
|
10857
|
+ }
|
|
10858
|
+
|
|
10859
|
+ return output
|
|
10860
|
+}
|
|
10861
|
+
|
10819
|
10862
|
func (c *HisApiController) GetHisMonthPatientInfo() {
|
10820
|
10863
|
patient_id, _ := c.GetInt64("patient_id")
|
10821
|
10864
|
his_patient_id, _ := c.GetInt64("his_patient_id")
|