Kaynağa Gözat

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

csx 1 yıl önce
ebeveyn
işleme
a252594f42
1 değiştirilmiş dosya ile 41 ekleme ve 14 silme
  1. 41 14
      controllers/sg/his_api_controller.go

+ 41 - 14
controllers/sg/his_api_controller.go Dosyayı Görüntüle

@@ -5129,20 +5129,47 @@ func (c *HisApiController) GetRegisterInfo() {
5129 5129
 			verify_number = psn_info.VerifyNumber
5130 5130
 
5131 5131
 		} else if miConfig.MdtrtareaAdmvs == "350500" {
5132
-			psn_info, _ := service.GetPsnByPatientId(id)
5133
-			PsnNo = psn_info.PsnNo
5134
-			PsnCertType = psn_info.PsnCertType
5135
-			Certno = psn_info.Certno
5136
-			PsnName = psn_info.PsnName
5137
-			Gend = psn_info.Gend
5138
-			Naty = psn_info.Naty
5139
-			Brdy = psn_info.Brdy
5140
-			Age = psn_info.Age
5141
-			infoStr = psn_info.Insuinfo
5142
-			idetinfoStr = psn_info.Idetinfo
5143
-			infocode = 0
5144
-			verify_number = psn_info.VerifyNumber
5132
+			if id_card_type == 1{
5133
+				psn_info, _ := service.GetPsnByPatientId(id)
5134
+				PsnNo = psn_info.PsnNo
5135
+				PsnCertType = psn_info.PsnCertType
5136
+				Certno = psn_info.Certno
5137
+				PsnName = psn_info.PsnName
5138
+				Gend = psn_info.Gend
5139
+				Naty = psn_info.Naty
5140
+				Brdy = psn_info.Brdy
5141
+				Age = psn_info.Age
5142
+				infoStr = psn_info.Insuinfo
5143
+				idetinfoStr = psn_info.Idetinfo
5144
+				infocode = 0
5145
+				verify_number = psn_info.VerifyNumber
5146
+			}else if id_card_type == 2{
5147
+
5148
+				result, requestLog, errMsgLog := service.FJyb1101(patient.IdCardNo, miConfig.OrgName, roles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, id_card_type, patient.IdCardNo, certificates, miConfig.Url, miConfig.Cainfo, miConfig.AppSecret, miConfig.SignKey, miConfig.EncKey)
5149
+				fmt.Println(errMsgLog)
5150
+				saveLog(result, requestLog, "1101", "人员基本信息获取")
5151
+
5152
+				if err := json.Unmarshal([]byte(result), &res); err != nil {
5153
+						utils.ErrorLog("解析失败:%v", err)
5154
+						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
5155
+						return
5156
+				}
5157
+
5145 5158
 
5159
+				PsnNo = res.Output.Baseinfo.PsnNo
5160
+				PsnCertType = res.Output.Baseinfo.PsnCertType
5161
+				Certno = res.Output.Baseinfo.Certno
5162
+				PsnName = res.Output.Baseinfo.PsnName
5163
+				Gend = res.Output.Baseinfo.Gend
5164
+				Naty = res.Output.Baseinfo.Naty
5165
+				Brdy = res.Output.Baseinfo.Brdy
5166
+				Age = res.Output.Baseinfo.Age
5167
+				Iinfos, _ := json.Marshal(res.Output.Iinfo)
5168
+				Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
5169
+				infoStr = string(Iinfos)
5170
+				idetinfoStr = string(Idetinfos)
5171
+				infocode = res.Infcode
5172
+			}
5146 5173
 		} else {
5147 5174
 			var result string
5148 5175
 			var requestLog string
@@ -5419,7 +5446,7 @@ func (c *HisApiController) GetRegisterInfo() {
5419 5446
 				psn_info, _ := service.GetPsnByPatientId(id)
5420 5447
 				var cert_no string
5421 5448
 				if id_card_type == 1 {
5422
-					cert_no = strings.Split(psn_info.CardInfo, "|")[0]
5449
+					cert_no =
5423 5450
 				} else {
5424 5451
 					cert_no = strings.Split(psn_info.CardInfo, "|")[1]
5425 5452