Kaynağa Gözat

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 3 yıl önce
ebeveyn
işleme
a8b8437eac
2 değiştirilmiş dosya ile 57 ekleme ve 56 silme
  1. 53 51
      models/his_models.go
  2. 4 5
      service/gdyb_service.go

+ 53 - 51
models/his_models.go Dosyayı Görüntüle

@@ -174,57 +174,59 @@ func (HisCaseHistoryTemplate) TableName() string {
174 174
 }
175 175
 
176 176
 type HisDoctorAdviceInfo struct {
177
-	ID                    int64       `gorm:"column:id" json:"id" form:"id"`
178
-	UserOrgId             int64       `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
179
-	PatientId             int64       `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
180
-	HisPatientId          int64       `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
181
-	AdviceType            int64       `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
182
-	AdviceDate            int64       `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
183
-	StartTime             int64       `gorm:"column:start_time" json:"start_time" form:"start_time"`
184
-	AdviceName            string      `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
185
-	AdviceDesc            string      `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
186
-	ReminderDate          int64       `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
187
-	SingleDose            float64     `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
188
-	SingleDoseUnit        string      `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
189
-	PrescribingNumber     float64     `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
190
-	PrescribingNumberUnit string      `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
191
-	DeliveryWay           string      `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
192
-	ExecutionFrequency    string      `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
193
-	AdviceDoctor          int64       `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
194
-	Status                int64       `gorm:"column:status" json:"status" form:"status"`
195
-	CreatedTime           int64       `gorm:"column:created_time" json:"created_time" form:"created_time"`
196
-	UpdatedTime           int64       `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
197
-	AdviceAffirm          string      `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
198
-	Remark                string      `gorm:"column:remark" json:"remark" form:"remark"`
199
-	StopTime              int64       `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
200
-	StopReason            string      `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
201
-	StopDoctor            int64       `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
202
-	StopState             int64       `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
203
-	ParentId              int64       `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
204
-	ExecutionTime         int64       `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
205
-	ExecutionStaff        int64       `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
206
-	ExecutionState        int64       `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
207
-	Checker               int64       `gorm:"column:checker" json:"checker" form:"checker"`
208
-	RecordDate            int64       `gorm:"column:record_date" json:"record_date" form:"record_date"`
209
-	DialysisOrderId       int64       `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
210
-	CheckTime             int64       `gorm:"column:check_time" json:"check_time" form:"check_time"`
211
-	CheckState            int64       `gorm:"column:check_state" json:"check_state" form:"check_state"`
212
-	DrugSpec              float64     `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
213
-	DrugSpecUnit          string      `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
214
-	Groupno               int64       `gorm:"column:groupno" json:"groupno" form:"groupno"`
215
-	RemindType            int64       `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
216
-	FrequencyType         int64       `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
217
-	DayCount              int64       `gorm:"column:day_count" json:"day_count" form:"day_count"`
218
-	WeekDay               string      `gorm:"column:week_day" json:"week_day" form:"week_day"`
219
-	TemplateId            string      `gorm:"column:template_id" json:"template_id" form:"template_id"`
220
-	Modifier              int64       `gorm:"column:modifier" json:"modifier" form:"modifier"`
221
-	DrugId                int64       `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
222
-	Price                 float64     `gorm:"column:price" json:"price" form:"price"`
223
-	PrescriptionId        int64       `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
224
-	MedListCodg           string      `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
225
-	FeedetlSn             string      `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
226
-	Day                   int64       `gorm:"column:day" json:"day" form:"day"`
227
-	BaseDrugLib           BaseDrugLib `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug"`
177
+	ID                    int64   `gorm:"column:id" json:"id" form:"id"`
178
+	UserOrgId             int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
179
+	PatientId             int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
180
+	HisPatientId          int64   `gorm:"column:his_patient_id" json:"his_patient_id" form:"his_patient_id"`
181
+	AdviceType            int64   `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
182
+	AdviceDate            int64   `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
183
+	StartTime             int64   `gorm:"column:start_time" json:"start_time" form:"start_time"`
184
+	AdviceName            string  `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
185
+	AdviceDesc            string  `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
186
+	ReminderDate          int64   `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
187
+	SingleDose            float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
188
+	SingleDoseUnit        string  `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
189
+	PrescribingNumber     float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
190
+	PrescribingNumberUnit string  `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
191
+	DeliveryWay           string  `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
192
+	ExecutionFrequency    string  `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
193
+	AdviceDoctor          int64   `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
194
+	Status                int64   `gorm:"column:status" json:"status" form:"status"`
195
+	CreatedTime           int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
196
+	UpdatedTime           int64   `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
197
+	AdviceAffirm          string  `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
198
+	Remark                string  `gorm:"column:remark" json:"remark" form:"remark"`
199
+	StopTime              int64   `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
200
+	StopReason            string  `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
201
+	StopDoctor            int64   `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
202
+	StopState             int64   `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
203
+	ParentId              int64   `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
204
+	ExecutionTime         int64   `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
205
+	ExecutionStaff        int64   `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
206
+	ExecutionState        int64   `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
207
+	Checker               int64   `gorm:"column:checker" json:"checker" form:"checker"`
208
+	RecordDate            int64   `gorm:"column:record_date" json:"record_date" form:"record_date"`
209
+	DialysisOrderId       int64   `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
210
+	CheckTime             int64   `gorm:"column:check_time" json:"check_time" form:"check_time"`
211
+	CheckState            int64   `gorm:"column:check_state" json:"check_state" form:"check_state"`
212
+	DrugSpec              float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
213
+	DrugSpecUnit          string  `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
214
+	Groupno               int64   `gorm:"column:groupno" json:"groupno" form:"groupno"`
215
+	RemindType            int64   `gorm:"column:remind_type" json:"remind_type" form:"remind_type"`
216
+	FrequencyType         int64   `gorm:"column:frequency_type" json:"frequency_type" form:"frequency_type"`
217
+	DayCount              int64   `gorm:"column:day_count" json:"day_count" form:"day_count"`
218
+	WeekDay               string  `gorm:"column:week_day" json:"week_day" form:"week_day"`
219
+	TemplateId            string  `gorm:"column:template_id" json:"template_id" form:"template_id"`
220
+	Modifier              int64   `gorm:"column:modifier" json:"modifier" form:"modifier"`
221
+	DrugId                int64   `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
222
+	Price                 float64 `gorm:"column:price" json:"price" form:"price"`
223
+	PrescriptionId        int64   `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
224
+	MedListCodg           string  `gorm:"column:med_list_codg" json:"med_list_codg" form:"med_list_codg"`
225
+	FeedetlSn             string  `gorm:"column:feedetl_sn" json:"feedetl_sn" form:"feedetl_sn"`
226
+	Day                   int64   `gorm:"column:day" json:"day" form:"day"`
227
+	HospApprFlag          int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
228
+
229
+	BaseDrugLib BaseDrugLib `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"drug"`
228 230
 }
229 231
 
230 232
 func (HisDoctorAdviceInfo) TableName() string {

+ 4 - 5
service/gdyb_service.go Dosyayı Görüntüle

@@ -808,7 +808,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
808 808
 						FeedetlSn:        subItem.FeedetlSn,
809 809
 						Price:            fmt.Sprintf("%.2f", subItem.Price),
810 810
 						MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
811
-						HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
811
+						HospApprFlag:     subItem.HospApprFlag,
812 812
 					}
813 813
 
814 814
 					customs = append(customs, cus)
@@ -904,14 +904,13 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
904 904
 		if balance_accounts_type == "8" {
905 905
 			feedetailInfo["hosp_appr_flag"] = "2" // 医院审批标志
906 906
 		} else {
907
-
908 907
 			if item.HospApprFlag != -1 {
909 908
 				if item.HospApprFlag == 1 {
910
-					feedetailInfo["hosp_appr_flag"] = "0" // 医院审批标志
911
-				} else if item.HospApprFlag == 2 {
912 909
 					feedetailInfo["hosp_appr_flag"] = "1" // 医院审批标志
913
-				} else if item.HospApprFlag == 3 {
910
+				} else if item.HospApprFlag == 2 {
914 911
 					feedetailInfo["hosp_appr_flag"] = "2" // 医院审批标志
912
+				} else if item.HospApprFlag == 3 {
913
+					feedetailInfo["hosp_appr_flag"] = "0" // 医院审批标志
915 914
 				} else {
916 915
 					feedetailInfo["hosp_appr_flag"] = "1" // 医院审批标志
917 916
 				}