瀏覽代碼

体积小

XMLWAN 3 年之前
父節點
當前提交
406166d393

+ 4 - 0
controllers/xcx_mobile_api_controller.go/xcx_api_controller.go 查看文件

@@ -253,6 +253,9 @@ func (this *XcxApiController) GetScheduleInfo() {
253 253
 	//获取今日下机日期
254 254
 	order, _ := service.GetTodayDialysis(timeNowUnix.Unix(), patient_id)
255 255
 
256
+	//获取今日的处方
257
+	prescription, _ := service.GetTodayPrescription(timeNowUnix.Unix(), patient_id)
258
+
256 259
 	//获取下一次排班信息
257 260
 	patientSchedule, _ := service.GetNextPatientSchedule(1, timeNowUnix.Unix())
258 261
 	if err != nil {
@@ -358,6 +361,7 @@ func (this *XcxApiController) GetScheduleInfo() {
358 361
 		"array":           array,
359 362
 		"order":           order,
360 363
 		"patientSchedule": patientSchedule,
364
+		"prescription":    prescription,
361 365
 	})
362 366
 }
363 367
 

+ 105 - 0
models/xcx_user_models.go 查看文件

@@ -422,3 +422,108 @@ type XcxHisDoctorAdviceInfo struct {
422 422
 func (XcxHisDoctorAdviceInfo) TableName() string {
423 423
 	return "his_doctor_advice_info"
424 424
 }
425
+
426
+type XcxXtDialysisPrescription struct {
427
+	ID                         int64   `gorm:"column:id" json:"id" form:"id"`
428
+	UserOrgId                  int64   `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
429
+	PatientId                  int64   `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
430
+	Dialyzer                   int64   `gorm:"column:dialyzer" json:"dialyzer" form:"dialyzer"`
431
+	MachineType                string  `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
432
+	DewaterAmount              float64 `gorm:"column:dewater_amount" json:"dewater_amount" form:"dewater_amount"`
433
+	DialyzerPerfusionApparatus string  `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
434
+	PrescriptionDewatering     float64 `gorm:"column:prescription_dewatering" json:"prescription_dewatering" form:"prescription_dewatering"`
435
+	Anticoagulant              int64   `gorm:"column:anticoagulant" json:"anticoagulant" form:"anticoagulant"`
436
+	AnticoagulantShouji        float64 `gorm:"column:anticoagulant_shouji" json:"anticoagulant_shouji" form:"anticoagulant_shouji"`
437
+	AnticoagulantStopTimeHour  int64   `gorm:"column:anticoagulant_stop_time_hour" json:"anticoagulant_stop_time_hour" form:"anticoagulant_stop_time_hour"`
438
+	AnticoagulantWeichi        float64 `gorm:"column:anticoagulant_weichi" json:"anticoagulant_weichi" form:"anticoagulant_weichi"`
439
+	AnticoagulantZongliang     float64 `gorm:"column:anticoagulant_zongliang" json:"anticoagulant_zongliang" form:"anticoagulant_zongliang"`
440
+	AnticoagulantGaimingcheng  string  `gorm:"column:anticoagulant_gaimingcheng" json:"anticoagulant_gaimingcheng" form:"anticoagulant_gaimingcheng"`
441
+	ModeId                     int64   `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
442
+	AnticoagulantGaijiliang    string  `gorm:"column:anticoagulant_gaijiliang" json:"anticoagulant_gaijiliang" form:"anticoagulant_gaijiliang"`
443
+	DialysisDurationHour       int64   `gorm:"column:dialysis_duration_hour" json:"dialysis_duration_hour" form:"dialysis_duration_hour"`
444
+	DialysisDurationMinute     int64   `gorm:"column:dialysis_duration_minute" json:"dialysis_duration_minute" form:"dialysis_duration_minute"`
445
+	DialysisDuration           float64 `gorm:"column:dialysis_duration" json:"dialysis_duration" form:"dialysis_duration"`
446
+	ReplacementTotal           float64 `gorm:"column:replacement_total" json:"replacement_total" form:"replacement_total"`
447
+	ReplacementWay             int64   `gorm:"column:replacement_way" json:"replacement_way" form:"replacement_way"`
448
+	HemodialysisMachine        int64   `gorm:"column:hemodialysis_machine" json:"hemodialysis_machine" form:"hemodialysis_machine"`
449
+	BloodFilter                int64   `gorm:"column:blood_filter" json:"blood_filter" form:"blood_filter"`
450
+	PerfusionApparatus         int64   `gorm:"column:perfusion_apparatus" json:"perfusion_apparatus" form:"perfusion_apparatus"`
451
+	DryWeight                  float64 `gorm:"column:dry_weight" json:"dry_weight" form:"dry_weight"`
452
+	VascularAccessMode         int64   `gorm:"column:vascular_access_mode" json:"vascular_access_mode" form:"vascular_access_mode"`
453
+	VascularAccess             int64   `gorm:"column:vascular_access" json:"vascular_access" form:"vascular_access"`
454
+	BloodFlowVolume            float64 `gorm:"column:blood_flow_volume" json:"blood_flow_volume" form:"blood_flow_volume"`
455
+	DialysateFlow              float64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
456
+	DisplaceLiqui              float64 `gorm:"column:displace_liqui" json:"displace_liqui" form:"displace_liqui"`
457
+	Kalium                     float64 `gorm:"column:kalium" json:"kalium" form:"kalium"`
458
+	Sodium                     float64 `gorm:"column:sodium" json:"sodium" form:"sodium"`
459
+	Calcium                    float64 `gorm:"column:calcium" json:"calcium" form:"calcium"`
460
+	Bicarbonate                float64 `gorm:"column:bicarbonate" json:"bicarbonate" form:"bicarbonate"`
461
+	Glucose                    float64 `gorm:"column:glucose" json:"glucose" form:"glucose"`
462
+	DialysateTemperature       float64 `gorm:"column:dialysate_temperature" json:"dialysate_temperature" form:"dialysate_temperature"`
463
+	Conductivity               float64 `gorm:"column:conductivity" json:"conductivity" form:"conductivity"`
464
+	PrescriptionDoctor         int64   `gorm:"column:prescription_doctor" json:"prescription_doctor" form:"prescription_doctor"`
465
+	Creater                    int64   `gorm:"column:creater" json:"creater" form:"creater"`
466
+	Modifier                   int64   `gorm:"column:modifier" json:"modifier" form:"modifier"`
467
+	Remark                     string  `gorm:"column:remark" json:"remark" form:"remark"`
468
+	Status                     int64   `gorm:"column:status" json:"status" form:"status"`
469
+	CreatedTime                int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
470
+	UpdatedTime                int64   `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
471
+	RecordDate                 int64   `gorm:"column:record_date" json:"record_date" form:"record_date"`
472
+	RecordId                   int64   `gorm:"column:record_id" json:"record_id" form:"record_id"`
473
+	TargetUltrafiltration      float64 `gorm:"column:target_ultrafiltration" json:"target_ultrafiltration" form:"target_ultrafiltration"`
474
+	DialysateFormulation       int64   `gorm:"column:dialysate_formulation" json:"dialysate_formulation" form:"dialysate_formulation"`
475
+	BodyFluid                  int64   `gorm:"column:body_fluid" json:"body_fluid" form:"body_fluid"`
476
+	SpecialMedicine            int64   `gorm:"column:special_medicine" json:"special_medicine" form:"special_medicine"`
477
+	SpecialMedicineOther       string  `gorm:"column:special_medicine_other" json:"special_medicine_other" form:"special_medicine_other"`
478
+	DisplaceLiquiPart          int64   `gorm:"column:displace_liqui_part" json:"displace_liqui_part" form:"displace_liqui_part"`
479
+	BloodAccess                int64   `gorm:"column:blood_access" json:"blood_access" form:"blood_access"`
480
+	DisplaceLiquiValue         float64 `gorm:"column:displace_liqui_value" json:"displace_liqui_value" form:"displace_liqui_value"`
481
+	Ultrafiltration            float64 `gorm:"column:ultrafiltration" json:"ultrafiltration" form:"ultrafiltration"`
482
+	BodyFluidOther             string  `gorm:"column:body_fluid_other" json:"body_fluid_other" form:"body_fluid_other"`
483
+	Niprocart                  int64   `gorm:"column:niprocart" json:"niprocart" form:"niprocart"`
484
+	Jms                        int64   `gorm:"column:jms" json:"jms" form:"jms"`
485
+	FistulaNeedleSet           int64   `gorm:"column:fistula_needle_set" json:"fistula_needle_set" form:"fistula_needle_set"`
486
+	FistulaNeedleSet16         int64   `gorm:"column:fistula_needle_set_16" json:"fistula_needle_set_16" form:"fistula_needle_set_16"`
487
+	Hemoperfusion              int64   `gorm:"column:hemoperfusion" json:"hemoperfusion" form:"hemoperfusion"`
488
+	DialyserSterilised         int64   `gorm:"column:dialyser_sterilised" json:"dialyser_sterilised" form:"dialyser_sterilised"`
489
+	Filtryzer                  int64   `gorm:"column:filtryzer" json:"filtryzer" form:"filtryzer"`
490
+	TargetKtv                  float64 `gorm:"column:target_ktv" json:"target_ktv" form:"target_ktv"`
491
+	Dialyzers                  int64   `gorm:"column:dialyzers" json:"dialyzers" form:"dialyzers"`
492
+	Injector                   int64   `gorm:"column:injector" json:"injector" form:"injector"`
493
+	Bloodlines                 int64   `gorm:"column:bloodlines" json:"bloodlines" form:"bloodlines"`
494
+	TubingHemodialysis         int64   `gorm:"column:tubing_hemodialysis" json:"tubing_hemodialysis" form:"tubing_hemodialysis"`
495
+	Package                    int64   `gorm:"column:package" json:"package" form:"package"`
496
+	ALiquid                    int64   `gorm:"column:a_liquid" json:"a_liquid" form:"a_liquid"`
497
+	PreImpulse                 float64 `gorm:"column:pre_impulse" json:"pre_impulse" form:"pre_impulse"`
498
+	AnticoagulantStopTimeMin   int64   `gorm:"column:anticoagulant_stop_time_min" json:"anticoagulant_stop_time_min" form:"anticoagulant_stop_time_min"`
499
+	HeparinSodium              string  `gorm:"column:heparin_sodium" json:"heparin_sodium" form:"heparin_sodium"`
500
+	Nucleoprotamine            string  `gorm:"column:nucleoprotamine" json:"nucleoprotamine" form:"nucleoprotamine"`
501
+	PushTheProtamine           string  `gorm:"column:push_the_protamine" json:"push_the_protamine" form:"push_the_protamine"`
502
+	NoHeparinRemarks           string  `gorm:"column:no_heparin_remarks" json:"no_heparin_remarks" form:"no_heparin_remarks"`
503
+	Blood                      string  `gorm:"column:blood" json:"blood" form:"blood"`
504
+	DialysisDialyszers         string  `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
505
+	DialysisIrrigation         string  `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
506
+	AntioxidantCommodityName   string  `gorm:"column:antioxidant_commodity_name" json:"antioxidant_commodity_name" form:"antioxidant_commodity_name"`
507
+	DisplaceSpeed              string  `gorm:"column:displace_speed" json:"displace_speed" form:"displace_speed"`
508
+	Illness                    int64   `gorm:"column:illness" json:"illness" form:"illness"`
509
+	Amylaceum                  string  `gorm:"column:amylaceum" json:"amylaceum" form:"amylaceum"`
510
+	SingleTime                 string  `gorm:"column:single_time" json:"single_time" form:"single_time"`
511
+	SingleWater                string  `gorm:"column:single_water" json:"single_water" form:"single_water"`
512
+	ReplacementFlow            string  `gorm:"column:replacement_flow" json:"replacement_flow" form:"replacement_flow"`
513
+	PlasmaSeparator            string  `gorm:"column:plasma_separator" json:"plasma_separator" form:"plasma_separator"`
514
+	BilirubinAdsorptionColumn  string  `gorm:"column:bilirubin_adsorption_column" json:"bilirubin_adsorption_column" form:"bilirubin_adsorption_column"`
515
+	OxygenUptake               int64   `gorm:"column:oxygen_uptake" json:"oxygen_uptake" form:"oxygen_uptake"`
516
+	OxygenFlow                 string  `gorm:"column:oxygen_flow" json:"oxygen_flow" form:"oxygen_flow"`
517
+	OxygenTime                 string  `gorm:"column:oxygen_time" json:"oxygen_time" form:"oxygen_time"`
518
+	HemodialysisPipelines      string  `gorm:"column:hemodialysis_pipelines" json:"hemodialysis_pipelines" form:"hemodialysis_pipelines"`
519
+	HemodialysisPipelinesCount float64 `gorm:"column:hemodialysis_pipelines_count" json:"hemodialysis_pipelines_count" form:"hemodialysis_pipelines_count"`
520
+	PunctureNeedle             string  `gorm:"column:puncture_needle" json:"puncture_needle" form:"puncture_needle"`
521
+	PunctureNeedleCount        float64 `gorm:"column:puncture_needle_count" json:"puncture_needle_count" form:"puncture_needle_count"`
522
+	Epo                        string  `gorm:"column:epo" json:"epo" form:"epo"`
523
+	EpoCount                   float64 `gorm:"column:epo_count" json:"epo_count" form:"epo_count"`
524
+	MaxUltrafiltrationRate     string  `gorm:"column:max_ultrafiltration_rate" json:"max_ultrafiltration_rate" form:"max_ultrafiltration_rate"`
525
+}
526
+
527
+func (XcxXtDialysisPrescription) TableName() string {
528
+	return "xt_dialysis_prescription"
529
+}

+ 7 - 0
service/xcx_mobile_api_service.go 查看文件

@@ -219,6 +219,13 @@ func GetTodayDialysis(recordDate int64, patient_id int64) (models.XcXDialysisOrd
219 219
 	return order, err
220 220
 }
221 221
 
222
+func GetTodayPrescription(recordDate int64, patient_id int64) (models.XcxXtDialysisPrescription, error) {
223
+
224
+	prescription := models.XcxXtDialysisPrescription{}
225
+	err := XTReadDB().Model(&prescription).Where("record_date = ? and patient_id = ? and status = 1", recordDate, patient_id).Find(&prescription).Error
226
+	return prescription, err
227
+}
228
+
222 229
 func GetNextPatientSchedule(patient_id int64, dialysis_date int64) (models.BloodSchedule, error) {
223 230
 	schedule := models.BloodSchedule{}
224 231