浏览代码

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

XMLWAN 4 年前
父节点
当前提交
d0e7308815

+ 3 - 2
conf/app.conf 查看文件

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9532
3
-runmode = dev
3
+runmode = prod
4 4
 
5 5
 #
6 6
 copyrequestbody = true
@@ -44,7 +44,7 @@ appsecret="61ee2e6268497d5aa9de0b0187c39aea"
44 44
 
45 45
 
46 46
 [prod]
47
-org_id = 9504
47
+org_id = 9919
48 48
 mobile_token_expiration_second = 86400
49 49
 httpdomain = https://api.xt.kuyicloud.com
50 50
 sso_domain = https://sso.kuyicloud.com
@@ -54,6 +54,7 @@ front_end_domain = "https://xt.kuyicloud.com/#"
54 54
 url = "http://192.168.1.88:6666/szsi-portal/transData"
55 55
 gdyb_url = "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/"
56 56
 gdyb_paasid = "sg03_prd"
57
+
57 58
 readmysqlhost = shengws1.mysql.rds.aliyuncs.com
58 59
 readmysqlport = 3306
59 60
 readmysqluser = syh

+ 1 - 1
controllers/sg/gdyb_controller.go 查看文件

@@ -163,7 +163,7 @@ func (c *GdybController) PostFour() {
163 163
 	secret_key := c.GetString("secret_key")
164 164
 
165 165
 	var result string
166
-	if c.GetAdminUserInfo().CurrentOrgId == 10106 {
166
+	if insuplc_admdvs == "440781" { //
167 167
 		result = service.Gdyb2203A(psnNo, mdtrtId, doctor, department, diag, org_name, med_type, doctor_id, fixmedins_code, diag_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_code, sick_name)
168 168
 	} else {
169 169
 		result = service.Gdyb2203(psnNo, mdtrtId, doctor, department, diag, org_name, med_type, doctor_id, fixmedins_code, diag_code, insuplc_admdvs, mdtrtarea_admvs, secret_key, sick_code, sick_name)

文件差异内容过多而无法显示
+ 411 - 320
controllers/sg/his_api_controller.go


+ 171 - 170
controllers/sz/sz_his_api_controller.go 查看文件

@@ -3796,17 +3796,17 @@ func (c *SZHisApiController) GetDrugList() {
3796 3796
 
3797 3797
 		detail := &models.DrugDetail{
3798 3798
 			MedicalInsuranceNumber: item.SocialSecurityDirectoryCode,
3799
-			Code:                   item.Code,
3800
-			DrugName:               item.DrugName,
3801
-			DrugSpec:               item.DrugSpec,
3802
-			DrugDosageName:         item.DrugDosageName,
3803
-			ManufacturerName:       item.ManufacturerName,
3804
-			MinUnit:                item.MinUnit,
3805
-			RetailPrice:            item.RetailPrice,
3806
-			LastPrice:              item.LastPrice,
3807
-			LimitRemark:            item.LimitRemark,
3808
-			PrescriptionMark:       strconv.FormatInt(item.PrescriptionMark, 10),
3809
-			RecordDate:             recordDate,
3799
+			Code:             item.Code,
3800
+			DrugName:         item.DrugName,
3801
+			DrugSpec:         item.DrugSpec,
3802
+			DrugDosageName:   item.DrugDosageName,
3803
+			ManufacturerName: item.ManufacturerName,
3804
+			MinUnit:          item.MinUnit,
3805
+			RetailPrice:      item.RetailPrice,
3806
+			LastPrice:        item.LastPrice,
3807
+			LimitRemark:      item.LimitRemark,
3808
+			PrescriptionMark: strconv.FormatInt(item.PrescriptionMark, 10),
3809
+			RecordDate:       recordDate,
3810 3810
 		}
3811 3811
 
3812 3812
 		for _, it := range drugs {
@@ -3888,11 +3888,11 @@ func (c *SZHisApiController) GetTreatmentProject() {
3888 3888
 	for _, item := range list {
3889 3889
 
3890 3890
 		detail := &models.MyHisProject{
3891
-			MedicalCode:                 item.MedicalCode, //社保目录
3892
-			ProjectName:                 item.ProjectName,
3893
-			Price:                       item.Price,
3894
-			Category:                    item.Category,
3895
-			Remark:                      item.Remark,
3891
+			MedicalCode: item.MedicalCode, //社保目录
3892
+			ProjectName: item.ProjectName,
3893
+			Price:       item.Price,
3894
+			Category:    item.Category,
3895
+			Remark:      item.Remark,
3896 3896
 			SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
3897 3897
 			SpecailProject:              item.SpecailProject,
3898 3898
 			RecordDate:                  item.RecordDate,
@@ -3992,14 +3992,14 @@ func (c *SZHisApiController) GetRevocation() {
3992 3992
 					detail := &models.DrugDetail{
3993 3993
 
3994 3994
 						SocialSecurityDirectoryCode: item.MedicalInsuranceNumber, //社保目录
3995
-						Code:                        item.Code,                   //协议机构内部目录编码
3996
-						DrugName:                    item.DrugName,               //协议机构内部目录名称
3997
-						DrugSpec:                    item.DrugSpec,
3998
-						ManufacturerName:            item.ManufacturerName,
3999
-						MinUnit:                     item.MinUnit,
4000
-						RetailPrice:                 item.RetailPrice, //协议机构内部项目收费价格
4001
-						LimitRemark:                 item.LimitRemark,
4002
-						MedicalInsuranceNumber:      item.MedicalInsuranceNumber, //社保目录
3995
+						Code:                   item.Code,     //协议机构内部目录编码
3996
+						DrugName:               item.DrugName, //协议机构内部目录名称
3997
+						DrugSpec:               item.DrugSpec,
3998
+						ManufacturerName:       item.ManufacturerName,
3999
+						MinUnit:                item.MinUnit,
4000
+						RetailPrice:            item.RetailPrice, //协议机构内部项目收费价格
4001
+						LimitRemark:            item.LimitRemark,
4002
+						MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
4003 4003
 					}
4004 4004
 					customs = append(customs, detail)
4005 4005
 				}
@@ -4073,15 +4073,15 @@ func (c *SZHisApiController) GetRevocation() {
4073 4073
 				detail := &models.DrugDetail{
4074 4074
 					MedicalInsuranceNumber:      item.MedicalInsuranceNumber,
4075 4075
 					SocialSecurityDirectoryCode: item.MedicalInsuranceNumber,
4076
-					Code:                        item.Code,
4077
-					DrugName:                    item.DrugName,
4078
-					DrugSpec:                    item.DrugSpec,
4079
-					DrugDosageName:              item.DrugDosageName,
4080
-					ManufacturerName:            item.ManufacturerName,
4081
-					MinUnit:                     item.MinUnit,
4082
-					RetailPrice:                 item.RetailPrice,
4083
-					LastPrice:                   item.LastPrice,
4084
-					LimitRemark:                 item.LimitRemark,
4076
+					Code:             item.Code,
4077
+					DrugName:         item.DrugName,
4078
+					DrugSpec:         item.DrugSpec,
4079
+					DrugDosageName:   item.DrugDosageName,
4080
+					ManufacturerName: item.ManufacturerName,
4081
+					MinUnit:          item.MinUnit,
4082
+					RetailPrice:      item.RetailPrice,
4083
+					LastPrice:        item.LastPrice,
4084
+					LimitRemark:      item.LimitRemark,
4085 4085
 				}
4086 4086
 
4087 4087
 				for _, it := range drugs {
@@ -4485,41 +4485,42 @@ func (c *SZHisApiController) GetDoctorList() {
4485 4485
 	var isSuccess bool = true
4486 4486
 
4487 4487
 	for _, item := range list {
4488
+		depart, _ := service.GetDepartMentDetail(item.DepartmentId)
4488 4489
 
4489 4490
 		detail := &models.DocDetail{
4490
-			UserName:                                item.UserName,                                                       //医护姓名
4491
-			RoleId:                                  item.Name,                                                           //医护人员类别
4492
-			Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
4493
-			CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
4494
-			IdCard:                                  item.IdCard,                                                         //证件号码
4495
-			Phone:                                   item.Mobile,                                                         //联系电话
4496
-			WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
4497
-			Nation:                                  "1",                                                                 //民族
4498
-			BirthDay:                                20201022,                                                            // 出生日期
4499
-			WorkTime:                                20201022,                                                            //参加工作日期
4500
-			Education:                               strconv.FormatInt(item.Education, 10),                               //学历
4501
-			StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
4502
-			CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
4503
-			MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
4504
-			MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
4505
-			MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
4506
-			TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
4507
-			DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
4508
-			Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
4509
-			DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
4510
-			MonitoringLevel:                         "",                                                                  //监控等级
4511
-			DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
4512
-			HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
4513
-			PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
4514
-			PharmacistType:                          "",                                                                  //药师类别
4515
-			PharmacistPracticeCategory:              "",                                                                  //药师执业类别
4516
-			PharmacistsLicensing:                    "",                                                                  //药师执业范围
4517
-			PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
4518
-			OfficeCode:                              item.Department,                                                     //科室编码
4519
-			JobNumber:                               item.JobNumber,                                                      //工号
4520
-			PostName:                                "",                                                                  //职位名称
4521
-			TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
4522
-			IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
4491
+			UserName:                     item.UserName,                               //医护姓名
4492
+			RoleId:                       item.Name,                                   //医护人员类别
4493
+			Sex:                          strconv.FormatInt(item.Sex, 10),             //性别
4494
+			CardType:                     strconv.FormatInt(item.CardType, 10),        //证件类型
4495
+			IdCard:                       item.IdCard,                                 //证件号码
4496
+			Phone:                        item.Mobile,                                 //联系电话
4497
+			WorkMajorName:                item.WorkMajorName,                          // 现从事专业名称
4498
+			Nation:                       "1",                                         //民族
4499
+			BirthDay:                     20201022,                                    // 出生日期
4500
+			WorkTime:                     20201022,                                    //参加工作日期
4501
+			Education:                    strconv.FormatInt(item.Education, 10),       //学历
4502
+			StudyMajorName:               item.StudyMajorName,                         //所学的专业名称
4503
+			CertificateCode:              item.MedicalCode,                            //医(药)师执业证书编码
4504
+			MedicalCode:                  item.DoctorCode,                             //医(药)师资格证编码
4505
+			MedicalRangeCode:             strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
4506
+			MedicalLevel:                 strconv.FormatInt(item.DoctorLevel, 10),     //医生执业资格证中的医师级别
4507
+			TypeJob:                      strconv.FormatInt(item.DoctorTypeJob, 10),   //医生执业资格证中的执业类别
4508
+			DoctorNumber:                 item.DoctorNumber,                           //医保医师编号
4509
+			Licensing:                    strconv.FormatInt(item.Licensing, 10),       //多点执业标志
4510
+			DoctorServiceStatus:          "",                                          //医师医保服务资格状态
4511
+			MonitoringLevel:              "",                                          //监控等级
4512
+			DrugPsychotropicSubstances:   "",                                          //毒麻精神药品资格
4513
+			HealthCareCode:               "",                                          // 母婴保健技术考核合格证书编号
4514
+			PlanningTechnicalServiceCode: "",                                          //计划生育技术服务人员合格证编号
4515
+			PharmacistType:               "",                                          //药师类别
4516
+			PharmacistPracticeCategory:   "",                                          //药师执业类别
4517
+			PharmacistsLicensing:         "",                                          //药师执业范围
4518
+			PharmacistRegistrationNumber: "",                                          //执业药师注册证编号
4519
+			OfficeCode:                   depart.Number,                               //科室编码
4520
+			JobNumber:                    item.JobNumber,                              //工号
4521
+			PostName:                     "",                                          //职位名称
4522
+			TechnicalJobLevelCode:        "",                                          //专业技术职务级别编码
4523
+			IsActive:                     strconv.FormatInt(item.IsActive, 10),        //在职与否
4523 4524
 			PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4524 4525
 			IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4525 4526
 			OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
@@ -4608,39 +4609,39 @@ func (c *SZHisApiController) GetMedicalList() {
4608 4609
 		for _, item := range list {
4609 4610
 
4610 4611
 			detail := &models.DocDetail{
4611
-				UserName:                                item.UserName,                                                       //医护姓名
4612
-				RoleId:                                  item.Name,                                                           //医护人员类别
4613
-				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
4614
-				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
4615
-				IdCard:                                  item.IdCard,                                                         //证件号码
4616
-				Phone:                                   item.Mobile,                                                         //联系电话
4617
-				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
4618
-				Nation:                                  item.Nation,                                                         //民族
4619
-				BirthDay:                                20201022,                                                            // 出生日期
4620
-				WorkTime:                                20201022,                                                            //参加工作日期
4621
-				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
4622
-				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
4623
-				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
4624
-				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
4625
-				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
4626
-				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
4627
-				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
4628
-				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
4629
-				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
4630
-				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
4631
-				MonitoringLevel:                         "",                                                                  //监控等级
4632
-				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
4633
-				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
4634
-				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
4635
-				PharmacistType:                          "",                                                                  //药师类别
4636
-				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
4637
-				PharmacistsLicensing:                    "",                                                                  //药师执业范围
4638
-				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
4639
-				OfficeCode:                              "",                                                                  //科室编码
4640
-				JobNumber:                               item.JobNumber,                                                      //工号
4641
-				PostName:                                "",                                                                  //职位名称
4642
-				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
4643
-				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
4612
+				UserName:                     item.UserName,                               //医护姓名
4613
+				RoleId:                       item.Name,                                   //医护人员类别
4614
+				Sex:                          strconv.FormatInt(item.Sex, 10),             //性别
4615
+				CardType:                     strconv.FormatInt(item.CardType, 10),        //证件类型
4616
+				IdCard:                       item.IdCard,                                 //证件号码
4617
+				Phone:                        item.Mobile,                                 //联系电话
4618
+				WorkMajorName:                item.WorkMajorName,                          // 现从事专业名称
4619
+				Nation:                       item.Nation,                                 //民族
4620
+				BirthDay:                     20201022,                                    // 出生日期
4621
+				WorkTime:                     20201022,                                    //参加工作日期
4622
+				Education:                    strconv.FormatInt(item.Education, 10),       //学历
4623
+				StudyMajorName:               item.StudyMajorName,                         //所学的专业名称
4624
+				CertificateCode:              item.MedicalCode,                            //医(药)师执业证书编码
4625
+				MedicalCode:                  item.DoctorCode,                             //医(药)师资格证编码
4626
+				MedicalRangeCode:             strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
4627
+				MedicalLevel:                 strconv.FormatInt(item.DoctorLevel, 10),     //医生执业资格证中的医师级别
4628
+				TypeJob:                      strconv.FormatInt(item.DoctorTypeJob, 10),   //医生执业资格证中的执业类别
4629
+				DoctorNumber:                 item.DoctorNumber,                           //医保医师编号
4630
+				Licensing:                    strconv.FormatInt(item.Licensing, 10),       //多点执业标志
4631
+				DoctorServiceStatus:          "",                                          //医师医保服务资格状态
4632
+				MonitoringLevel:              "",                                          //监控等级
4633
+				DrugPsychotropicSubstances:   "",                                          //毒麻精神药品资格
4634
+				HealthCareCode:               "",                                          // 母婴保健技术考核合格证书编号
4635
+				PlanningTechnicalServiceCode: "",                                          //计划生育技术服务人员合格证编号
4636
+				PharmacistType:               "",                                          //药师类别
4637
+				PharmacistPracticeCategory:   "",                                          //药师执业类别
4638
+				PharmacistsLicensing:         "",                                          //药师执业范围
4639
+				PharmacistRegistrationNumber: "",                                          //执业药师注册证编号
4640
+				OfficeCode:                   "",                                          //科室编码
4641
+				JobNumber:                    item.JobNumber,                              //工号
4642
+				PostName:                     "",                                          //职位名称
4643
+				TechnicalJobLevelCode:        "",                                          //专业技术职务级别编码
4644
+				IsActive:                     strconv.FormatInt(item.IsActive, 10),        //在职与否
4644 4645
 				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4645 4646
 				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4646 4647
 				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
@@ -4715,39 +4716,39 @@ func (c *SZHisApiController) GetMedicalList() {
4715 4716
 		var isSuccess bool = true
4716 4717
 		for _, item := range list {
4717 4718
 			detail := &models.DocDetail{
4718
-				UserName:                                item.UserName,                                                       //医护姓名
4719
-				RoleId:                                  item.Name,                                                           //医护人员类别
4720
-				Sex:                                     strconv.FormatInt(item.Sex, 10),                                     //性别
4721
-				CardType:                                strconv.FormatInt(item.CardType, 10),                                //证件类型
4722
-				IdCard:                                  item.IdCard,                                                         //证件号码
4723
-				Phone:                                   item.Mobile,                                                         //联系电话
4724
-				WorkMajorName:                           item.WorkMajorName,                                                  // 现从事专业名称
4725
-				Nation:                                  item.Nation,                                                         //民族
4726
-				BirthDay:                                20201022,                                                            // 出生日期
4727
-				WorkTime:                                20201022,                                                            //参加工作日期
4728
-				Education:                               strconv.FormatInt(item.Education, 10),                               //学历
4729
-				StudyMajorName:                          item.StudyMajorName,                                                 //所学的专业名称
4730
-				CertificateCode:                         item.MedicalCode,                                                    //医(药)师执业证书编码
4731
-				MedicalCode:                             item.DoctorCode,                                                     //医(药)师资格证编码
4732
-				MedicalRangeCode:                        strconv.FormatInt(item.DoctorRangeCode, 10),                         //医师执业范围代码
4733
-				MedicalLevel:                            strconv.FormatInt(item.DoctorLevel, 10),                             //医生执业资格证中的医师级别
4734
-				TypeJob:                                 strconv.FormatInt(item.DoctorTypeJob, 10),                           //医生执业资格证中的执业类别
4735
-				DoctorNumber:                            item.DoctorNumber,                                                   //医保医师编号
4736
-				Licensing:                               strconv.FormatInt(item.Licensing, 10),                               //多点执业标志
4737
-				DoctorServiceStatus:                     "",                                                                  //医师医保服务资格状态
4738
-				MonitoringLevel:                         "",                                                                  //监控等级
4739
-				DrugPsychotropicSubstances:              "",                                                                  //毒麻精神药品资格
4740
-				HealthCareCode:                          "",                                                                  // 母婴保健技术考核合格证书编号
4741
-				PlanningTechnicalServiceCode:            "",                                                                  //计划生育技术服务人员合格证编号
4742
-				PharmacistType:                          "",                                                                  //药师类别
4743
-				PharmacistPracticeCategory:              "",                                                                  //药师执业类别
4744
-				PharmacistsLicensing:                    "",                                                                  //药师执业范围
4745
-				PharmacistRegistrationNumber:            "",                                                                  //执业药师注册证编号
4746
-				OfficeCode:                              "",                                                                  //科室编码
4747
-				JobNumber:                               item.JobNumber,                                                      //工号
4748
-				PostName:                                "",                                                                  //职位名称
4749
-				TechnicalJobLevelCode:                   "",                                                                  //专业技术职务级别编码
4750
-				IsActive:                                strconv.FormatInt(item.IsActive, 10),                                //在职与否
4719
+				UserName:                     item.UserName,                               //医护姓名
4720
+				RoleId:                       item.Name,                                   //医护人员类别
4721
+				Sex:                          strconv.FormatInt(item.Sex, 10),             //性别
4722
+				CardType:                     strconv.FormatInt(item.CardType, 10),        //证件类型
4723
+				IdCard:                       item.IdCard,                                 //证件号码
4724
+				Phone:                        item.Mobile,                                 //联系电话
4725
+				WorkMajorName:                item.WorkMajorName,                          // 现从事专业名称
4726
+				Nation:                       item.Nation,                                 //民族
4727
+				BirthDay:                     20201022,                                    // 出生日期
4728
+				WorkTime:                     20201022,                                    //参加工作日期
4729
+				Education:                    strconv.FormatInt(item.Education, 10),       //学历
4730
+				StudyMajorName:               item.StudyMajorName,                         //所学的专业名称
4731
+				CertificateCode:              item.MedicalCode,                            //医(药)师执业证书编码
4732
+				MedicalCode:                  item.DoctorCode,                             //医(药)师资格证编码
4733
+				MedicalRangeCode:             strconv.FormatInt(item.DoctorRangeCode, 10), //医师执业范围代码
4734
+				MedicalLevel:                 strconv.FormatInt(item.DoctorLevel, 10),     //医生执业资格证中的医师级别
4735
+				TypeJob:                      strconv.FormatInt(item.DoctorTypeJob, 10),   //医生执业资格证中的执业类别
4736
+				DoctorNumber:                 item.DoctorNumber,                           //医保医师编号
4737
+				Licensing:                    strconv.FormatInt(item.Licensing, 10),       //多点执业标志
4738
+				DoctorServiceStatus:          "",                                          //医师医保服务资格状态
4739
+				MonitoringLevel:              "",                                          //监控等级
4740
+				DrugPsychotropicSubstances:   "",                                          //毒麻精神药品资格
4741
+				HealthCareCode:               "",                                          // 母婴保健技术考核合格证书编号
4742
+				PlanningTechnicalServiceCode: "",                                          //计划生育技术服务人员合格证编号
4743
+				PharmacistType:               "",                                          //药师类别
4744
+				PharmacistPracticeCategory:   "",                                          //药师执业类别
4745
+				PharmacistsLicensing:         "",                                          //药师执业范围
4746
+				PharmacistRegistrationNumber: "",                                          //执业药师注册证编号
4747
+				OfficeCode:                   "",                                          //科室编码
4748
+				JobNumber:                    item.JobNumber,                              //工号
4749
+				PostName:                     "",                                          //职位名称
4750
+				TechnicalJobLevelCode:        "",                                          //专业技术职务级别编码
4751
+				IsActive:                     strconv.FormatInt(item.IsActive, 10),        //在职与否
4751 4752
 				PrescriptionQualificationIdentification: strconv.FormatInt(item.PrescriptionQualificationIdentification, 10), //处方资格标识
4752 4753
 				IdentificationOutpatients:               strconv.FormatInt(item.IdentificationOutpatients, 10),               //门诊大病医师标识
4753 4754
 				OutpatientIllnessCategory:               item.OutpatientIllnessCategory,                                      //门诊大病类别
@@ -4848,44 +4849,44 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
4848 4849
 		for _, item := range list {
4849 4850
 
4850 4851
 			detail := &models.DocDetail{
4851
-				StaffCode:                               "",            //医护人员编码
4852
-				UserName:                                item.UserName, //医护人员姓名
4853
-				RoleId:                                  item.Name,     //医护人员类别
4854
-				Sex:                                     "",            //性别
4855
-				CardType:                                "",            //证件类型
4856
-				IdCard:                                  "",            //证件号码
4857
-				Phone:                                   "",            //联系电话
4858
-				WorkMajorName:                           "",            //现从事专业名称
4859
-				Nation:                                  "",            //民族
4860
-				BirthDay:                                20201022,      //出生日期
4861
-				WorkTime:                                20201022,      //参加工作日期
4862
-				Education:                               "",            //学历
4863
-				StudyMajorName:                          "",            //所学的专业名称
4864
-				CertificateCode:                         "",            //证书编码
4865
-				MedicalCode:                             "",            //医师资格编码
4866
-				MedicalRangeCode:                        "",            //医师执业范围代码
4867
-				MedicalLevel:                            "",            //医生级别
4868
-				TypeJob:                                 "",            //职业类别
4869
-				DoctorNumber:                            "",            //医师编号
4870
-				Licensing:                               "",            //职业标志
4871
-				DoctorServiceStatus:                     "",            //医师医保服务资格状态
4872
-				MonitoringLevel:                         "",            //监控等级
4873
-				DrugPsychotropicSubstances:              "",            //毒麻精神药品资格
4874
-				HealthCareCode:                          "",            // 母婴保健技术考核合格证书编号
4875
-				PlanningTechnicalServiceCode:            "",            //计划生育技术服务人员合格证编号
4876
-				PharmacistType:                          "",            //药师类别
4877
-				PharmacistPracticeCategory:              "",            //药师执业类别
4878
-				PharmacistsLicensing:                    "",            //药师执业范围
4879
-				PharmacistRegistrationNumber:            "",            //执业药师注册证编号
4880
-				OfficeCode:                              "",            //科室编码
4881
-				JobNumber:                               "",            //工号
4882
-				PostName:                                "",            //职位名称
4883
-				TechnicalJobLevelCode:                   "",            //专业技术职务级别编码
4884
-				IsActive:                                "",            //在职与否
4885
-				PrescriptionQualificationIdentification: "",            //处方资格标识
4886
-				IdentificationOutpatients:               "",            //门诊大病医师标识
4887
-				OutpatientIllnessCategory:               "",            //门诊大病类别
4888
-				StartTime:                               20201022,      //开始日期
4852
+				StaffCode:                    "",            //医护人员编码
4853
+				UserName:                     item.UserName, //医护人员姓名
4854
+				RoleId:                       item.Name,     //医护人员类别
4855
+				Sex:                          "",            //性别
4856
+				CardType:                     "",            //证件类型
4857
+				IdCard:                       "",            //证件号码
4858
+				Phone:                        "",            //联系电话
4859
+				WorkMajorName:                "",            //现从事专业名称
4860
+				Nation:                       "",            //民族
4861
+				BirthDay:                     20201022,      //出生日期
4862
+				WorkTime:                     20201022,      //参加工作日期
4863
+				Education:                    "",            //学历
4864
+				StudyMajorName:               "",            //所学的专业名称
4865
+				CertificateCode:              "",            //证书编码
4866
+				MedicalCode:                  "",            //医师资格编码
4867
+				MedicalRangeCode:             "",            //医师执业范围代码
4868
+				MedicalLevel:                 "",            //医生级别
4869
+				TypeJob:                      "",            //职业类别
4870
+				DoctorNumber:                 "",            //医师编号
4871
+				Licensing:                    "",            //职业标志
4872
+				DoctorServiceStatus:          "",            //医师医保服务资格状态
4873
+				MonitoringLevel:              "",            //监控等级
4874
+				DrugPsychotropicSubstances:   "",            //毒麻精神药品资格
4875
+				HealthCareCode:               "",            // 母婴保健技术考核合格证书编号
4876
+				PlanningTechnicalServiceCode: "",            //计划生育技术服务人员合格证编号
4877
+				PharmacistType:               "",            //药师类别
4878
+				PharmacistPracticeCategory:   "",            //药师执业类别
4879
+				PharmacistsLicensing:         "",            //药师执业范围
4880
+				PharmacistRegistrationNumber: "",            //执业药师注册证编号
4881
+				OfficeCode:                   "",            //科室编码
4882
+				JobNumber:                    "",            //工号
4883
+				PostName:                     "",            //职位名称
4884
+				TechnicalJobLevelCode:        "",            //专业技术职务级别编码
4885
+				IsActive:                     "",            //在职与否
4886
+				PrescriptionQualificationIdentification: "",       //处方资格标识
4887
+				IdentificationOutpatients:               "",       //门诊大病医师标识
4888
+				OutpatientIllnessCategory:               "",       //门诊大病类别
4889
+				StartTime:                               20201022, //开始日期
4889 4890
 				EndTime:                                 20201022,
4890 4891
 			}
4891 4892
 			customs = append(customs, detail)

+ 1 - 0
models/dialysis.go 查看文件

@@ -916,6 +916,7 @@ type SgjUserAdminRole struct {
916 916
 	OutpatientIllnessCategory               string `gorm:"column:outpatient_illness_category" json:"outpatient_illness_category" form:"outpatient_illness_category"`
917 917
 	IsActive                                int64  `gorm:"column:is_active" json:"is_active" form:"is_active"`
918 918
 	ActiveStatus                            int64  `gorm:"column:active_status" json:"active_status" form:"active_status"`
919
+	DepartmentId                            int64  `gorm:"column:department_id" json:"department_id" form:"department_id"`
919 920
 	Mobile                                  string
920 921
 	Name                                    string
921 922
 	Department                              string `gorm:"column:department" json:"department" form:"department"`

+ 2 - 0
models/drug.go 查看文件

@@ -57,6 +57,8 @@ type BaseDrugLib struct {
57 57
 	SocialSecurityDirectoryCode string  `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
58 58
 	DoseCode                    string  `gorm:"column:dose_code" json:"dose_code" form:"dose_code"`
59 59
 	IsMark                      int64   `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
60
+	HospApprFlag                int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
61
+	LmtUsedFlag                 int64   `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
60 62
 	//MedicineInsurancePercentage []*MedicineInsurancePercentage `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
61 63
 }
62 64
 

+ 2 - 0
models/his_models.go 查看文件

@@ -435,6 +435,8 @@ type VMDrug struct {
435 435
 	OrgId                  int64   `gorm:"column:org_id" json:"org_id" form:"org_id"`
436 436
 	DrugCode               string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
437 437
 	MedicalInsuranceNumber string  `gorm:"column:medical_insurance_number" json:"medical_insurance_number"`
438
+	HospApprFlag           int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
439
+	LmtUsedFlag            int64   `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
438 440
 }
439 441
 
440 442
 func (VMDrug) TableName() string {

+ 2 - 0
models/self_drug_models.go 查看文件

@@ -64,6 +64,8 @@ type XtBaseDrug struct {
64 64
 	Mtime                  int64   `gorm:"column:mtime" json:"mtime" form:"mtime"`
65 65
 	OrgId                  int64   `gorm:"column:org_id" json:"org_id" form:"org_id"`
66 66
 	IsMark                 int64   `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
67
+	HospApprFlag           int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
68
+	LmtUsedFlag            int64   `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
67 69
 }
68 70
 
69 71
 func (XtBaseDrug) TableName() string {

+ 41 - 16
service/gdyb_service.go 查看文件

@@ -541,6 +541,8 @@ type Custom struct {
541 541
 	FeedetlSn        string
542 542
 	Price            string
543 543
 	MedListCodg      string
544
+	LmtUsedFlag      int64
545
+	HospApprFlag     int64
544 546
 }
545 547
 
546 548
 type RequestResult struct {
@@ -614,6 +616,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
614 616
 						FeedetlSn:        subItem.FeedetlSn,
615 617
 						Price:            fmt.Sprintf("%.2f", subItem.Price),
616 618
 						MedListCodg:      subItem.BaseDrugLib.MedicalInsuranceNumber,
619
+						HospApprFlag:     subItem.BaseDrugLib.HospApprFlag,
617 620
 					}
618 621
 
619 622
 					customs = append(customs, cus)
@@ -633,6 +636,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
633 636
 						FeedetlSn:        subItem.FeedetlSn,
634 637
 						Price:            fmt.Sprintf("%.2f", float64(subItem.Price)),
635 638
 						MedListCodg:      subItem.HisProject.MedicalCode,
639
+						HospApprFlag:     -1,
636 640
 					}
637 641
 					customs = append(customs, cus)
638 642
 				}
@@ -647,6 +651,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
647 651
 					FeedetlSn:        subItem.FeedetlSn,
648 652
 					Price:            fmt.Sprintf("%.2f", float64(subItem.Price)),
649 653
 					MedListCodg:      subItem.XtHisAddtionConfig.Code,
654
+					HospApprFlag:     -1,
650 655
 				}
651 656
 				customs = append(customs, cus)
652 657
 			}
@@ -687,12 +692,26 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
687 692
 		feedetailInfo["acord_dept_name"] = ""                        // 受单科室名称
688 693
 		feedetailInfo["orders_dr_code"] = ""                         // 受单医生编码
689 694
 		feedetailInfo["orders_dr_name"] = ""                         // 受单医生姓名
690
-		feedetailInfo["hosp_appr_flag"] = "1"                        // 医院审批标志
691
-		feedetailInfo["tcmdrug_used_way"] = ""                       // 中药使用方式
692
-		feedetailInfo["etip_flag"] = ""                              // 外检标志
693
-		feedetailInfo["etip_hosp_code"] = ""                         // 外检医院编码
694
-		feedetailInfo["dscg_tkdrug_flag"] = ""                       // 出院带药标志
695
-		feedetailInfo["matn_fee_flag"] = ""                          // 生育费用标志
695
+
696
+		if item.HospApprFlag != -1 {
697
+			if item.HospApprFlag == 1 {
698
+				feedetailInfo["hosp_appr_flag"] = "0" // 医院审批标志
699
+			} else if item.HospApprFlag == 2 {
700
+				feedetailInfo["hosp_appr_flag"] = "1" // 医院审批标志
701
+			} else if item.HospApprFlag == 3 {
702
+				feedetailInfo["hosp_appr_flag"] = "2" // 医院审批标志
703
+			} else {
704
+				feedetailInfo["hosp_appr_flag"] = "1" // 医院审批标志
705
+			}
706
+		} else {
707
+			feedetailInfo["hosp_appr_flag"] = "1" // 医院审批标志
708
+		}
709
+
710
+		feedetailInfo["tcmdrug_used_way"] = "" // 中药使用方式
711
+		feedetailInfo["etip_flag"] = ""        // 外检标志
712
+		feedetailInfo["etip_hosp_code"] = ""   // 外检医院编码
713
+		feedetailInfo["dscg_tkdrug_flag"] = "" // 出院带药标志
714
+		feedetailInfo["matn_fee_flag"] = ""    // 生育费用标志
696 715
 		feedetail = append(feedetail, feedetailInfo)
697 716
 	}
698 717
 	input["feedetail"] = feedetail
@@ -1294,10 +1313,10 @@ func Gdyb9102(baseParams models.BaseParams, file_name string, file_qury_no strin
1294 1313
 	inputMessage := SetInputMessage(nonce, timestamp, baseParams.OrgName, baseParams.Doctor, baseParams.FixmedinsCode, baseParams.InsuplcAdmdvs, baseParams.MdtrtareaAdmvs)
1295 1314
 	input := make(map[string]interface{})
1296 1315
 	inputData := make(map[string]interface{})
1297
-	inputMessage["infno"] = "9102"                                 // 交易编码
1298
-	inputData["file_name"] = file_name                             //文件名
1299
-	inputData["file_qury_no"] = "fsi/H44022900158/" + file_qury_no //文件数据
1300
-	inputData["fixmedins_code"] = baseParams.FixmedinsCode         //编码
1316
+	inputMessage["infno"] = "9102"                         // 交易编码
1317
+	inputData["file_name"] = file_name                     //文件名
1318
+	inputData["file_qury_no"] = file_qury_no               //文件数据
1319
+	inputData["fixmedins_code"] = baseParams.FixmedinsCode //编码
1301 1320
 	input["fsDownloadIn"] = inputData
1302 1321
 	inputMessage["input"] = input //交易输入
1303 1322
 
@@ -1526,7 +1545,7 @@ func Gdyb2001(baseParams models.BaseParams, psn_no string, insutype string, med_
1526 1545
 	return str
1527 1546
 }
1528 1547
 
1529
-func Gdyb3301(baseParams *models.BaseParams, name string, codg string, list_type_code string, start_time string, ent_time string) string {
1548
+func Gdyb3301(baseParams *models.BaseParams, name string, codg string, list_type_code string, start_time string, ent_time string, list_type string) string {
1530 1549
 	// 生成签名
1531 1550
 	nonce := GetRandomString(32)
1532 1551
 	timestamp := time.Now().Unix()
@@ -1539,7 +1558,7 @@ func Gdyb3301(baseParams *models.BaseParams, name string, codg string, list_type
1539 1558
 	inputMessage["infno"] = "3301" // 交易编码
1540 1559
 	inputData["fixmedins_hilist_id"] = codg
1541 1560
 	inputData["fixmedins_hilist_name"] = name
1542
-	inputData["list_type"] = list_type_code
1561
+	inputData["list_type"] = list_type
1543 1562
 	inputData["med_list_codg"] = codg
1544 1563
 	inputData["begndate"] = start_time
1545 1564
 	inputData["enddate"] = ent_time
@@ -1553,7 +1572,7 @@ func Gdyb3301(baseParams *models.BaseParams, name string, codg string, list_type
1553 1572
 	inputData["pacspec"] = ""
1554 1573
 	inputData["memo"] = ""
1555 1574
 
1556
-	input["catalogcompin"] = inputData
1575
+	input["data"] = inputData
1557 1576
 	inputMessage["input"] = input //交易输入
1558 1577
 	bytesData, err := json.Marshal(inputMessage)
1559 1578
 	fmt.Println(string(bytesData))
@@ -1613,7 +1632,7 @@ func Gdyb3302(baseParams *models.BaseParams, name string, codg string, list_type
1613 1632
 	inputData["begndate"] = "2021-01-01"
1614 1633
 	inputData["enddate"] = "2099-01-07"
1615 1634
 
1616
-	input["catalogcompin"] = inputData
1635
+	input["data"] = inputData
1617 1636
 	inputMessage["input"] = input //交易输入
1618 1637
 	bytesData, err := json.Marshal(inputMessage)
1619 1638
 	fmt.Println(string(bytesData))
@@ -1791,6 +1810,10 @@ func Gdyb2503(psnNo string, insutype string, org_name string, doctor string, fix
1791 1810
 
1792 1811
 	timeFormatTwo := tempTime.Format("2006-01-02")
1793 1812
 
1813
+	t := time.Now()
1814
+	last := time.Date(t.Year(), time.December, 31, 0, 0, 0, 0, time.UTC)
1815
+	tm := time.Unix(last.Unix(), 0)
1816
+
1794 1817
 	// 生成输入报文
1795 1818
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
1796 1819
 	input := make(map[string]interface{})
@@ -1809,7 +1832,7 @@ func Gdyb2503(psnNo string, insutype string, org_name string, doctor string, fix
1809 1832
 	inputData["begndate"] = timeFormatTwo          // 医师编码
1810 1833
 	inputData["tel"] = ""                          // 医师编码
1811 1834
 	inputData["addr"] = ""                         // 医师编码
1812
-	inputData["enddate"] = "2099-12-31"            // 医师编码
1835
+	inputData["enddate"] = tm.Format("2006-01-02") // 医师编码
1813 1836
 
1814 1837
 	input["data"] = inputData
1815 1838
 	inputMessage["input"] = input //交易输入
@@ -1867,6 +1890,8 @@ func Gdyb2504(psnNo string, org_name string, doctor string, fixmedins_code strin
1867 1890
 	inputMessage["infno"] = "2504"                   // 交易编码
1868 1891
 	inputData["psn_no"] = psnNo                      // 人员编号 (来自1101接口返回)
1869 1892
 	inputData["trt_dcla_detl_sn"] = trt_dcla_detl_sn // 人员编号 (来自1101接口返回)
1893
+	inputData["memo"] = "撤销备案"                       // 人员编号 (来自1101接口返回)
1894
+
1870 1895
 	input["data"] = inputData
1871 1896
 	inputMessage["input"] = input //交易输入
1872 1897
 	bytesData, err := json.Marshal(inputMessage)
@@ -2498,7 +2523,7 @@ func CreatePsnNCDSRecord(record *models.GdybPsnNcdsRecord) {
2498 2523
 }
2499 2524
 
2500 2525
 func GetPsnNCDSRecordById(id int64) (record models.GdybPsnNcdsRecord, err error) {
2501
-	err = readDb.Model(&models.GdybPsnNcdsRecord{}).Where("id = ?").First(&record).Error
2526
+	err = readDb.Model(&models.GdybPsnNcdsRecord{}).Where("id = ?", id).First(&record).Error
2502 2527
 	return
2503 2528
 }
2504 2529
 

+ 5 - 3
service/his_service.go 查看文件

@@ -390,6 +390,8 @@ type BaseDrugLib struct {
390 390
 	Mtime                  int64   `gorm:"column:mtime" json:"mtime" form:"mtime"`
391 391
 	OrgId                  int64   `gorm:"column:org_id" json:"org_id" form:"org_id"`
392 392
 	DrugCode               string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
393
+	HospApprFlag           int64   `gorm:"column:hosp_appr_flag" json:"hosp_appr_flag" form:"hosp_appr_flag"`
394
+	LmtUsedFlag            int64   `gorm:"column:lmt_used_flag" json:"lmt_used_flag" form:"lmt_used_flag"`
393 395
 	//MedicineInsurancePercentage []*MedicineInsurancePercentage `gorm:"ForeignKey:PatientId;AssociationForeignKey:PatientId" json:"monitoring_record"`
394 396
 	OtherDrugWarehouseInfo []*OtherDrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"stock_in"`
395 397
 	VMDrugSalesReturnInfo  []*VMDrugSalesReturnInfo  `gorm:"ForeignKey:DrugId;AssociationForeignKey:ID" json:"sales_return"`
@@ -864,17 +866,17 @@ func GetHisOrderInfoByNumber(order_number string) (order []*models.HisOrderInfo,
864 866
 }
865 867
 
866 868
 func GetOrderByTime(start_time int64, end_time int64, org_id int64, insutype string, clr_type string) (orders []*models.HisOrder, err error) {
867
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND settle_accounts_date <= ? AND settle_accounts_date >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
869
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND order_status = 2 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
868 870
 	return
869 871
 }
870 872
 
871 873
 func GetOrderByTimeThree(start_time int64, end_time int64, org_id int64, insutype string, clr_type string) (orders []*models.HisOrder, err error) {
872
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1  AND is_medicine_insurance = 1 AND settle_accounts_date <= ? AND settle_accounts_date >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
874
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1  AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time) <= ? AND UNIX_TIMESTAMP(setl_time) >= ? AND insutype = ?", org_id, end_time, start_time, insutype).Find(&orders).Error
873 875
 	return
874 876
 }
875 877
 
876 878
 func GetOrderByTimeTwo(start_time int64, end_time int64, org_id int64) (orders []*models.HisOrder, err error) {
877
-	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND is_medicine_insurance = 1 AND settle_accounts_date <= ? AND settle_accounts_date >= ? ", org_id, end_time, start_time).Find(&orders).Error
879
+	err = readDb.Model(&models.HisOrder{}).Where("user_org_id = ? AND status = 1 AND is_medicine_insurance = 1 AND UNIX_TIMESTAMP(setl_time)  <= ? AND UNIX_TIMESTAMP(setl_time) >= ?", org_id, end_time, start_time).Find(&orders).Error
878 880
 	return
879 881
 }
880 882