|
@@ -2640,6 +2640,18 @@ type ResultFourteen struct {
|
2640
|
2640
|
WarnInfo interface{} `json:"warn_info"`
|
2641
|
2641
|
}
|
2642
|
2642
|
|
|
2643
|
+type ResultFourteen10265 struct {
|
|
2644
|
+ ErrMsg string `json:"err_msg"`
|
|
2645
|
+ InfRefmsgid string `json:"inf_refmsgid"`
|
|
2646
|
+ Infcode string `json:"infcode"`
|
|
2647
|
+ Output struct {
|
|
2648
|
+ } `json:"output"`
|
|
2649
|
+ RefmsgTime string `json:"refmsg_time"`
|
|
2650
|
+ RespondTime string `json:"respond_time"`
|
|
2651
|
+ Signtype interface{} `json:"signtype"`
|
|
2652
|
+ WarnInfo interface{} `json:"warn_info"`
|
|
2653
|
+}
|
|
2654
|
+
|
2643
|
2655
|
type ResultSixteen struct {
|
2644
|
2656
|
Cainfo string `json:"cainfo"`
|
2645
|
2657
|
ErrMsg string `json:"err_msg"`
|
|
@@ -7900,6 +7912,11 @@ func (c *HisApiController) PsnPutUnNCDSOnRecord() {
|
7900
|
7912
|
//} else {
|
7901
|
7913
|
// user_name = role.UserName
|
7902
|
7914
|
//}
|
|
7915
|
+ psn_record, _ := service.GetPsnNCDSRecordById(id)
|
|
7916
|
+ if psn_record.ID == 0 {
|
|
7917
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorPsnRecordNoExistWrong)
|
|
7918
|
+ return
|
|
7919
|
+ }
|
7903
|
7920
|
result, _ := service.Gdyb1101(patient.IdCardNo, miConfig.OrgName, role.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 2, "", "0", patient.Name)
|
7904
|
7921
|
var res ResultTwo
|
7905
|
7922
|
var res10265 ResultTwo10265
|
|
@@ -7965,6 +7982,7 @@ func (c *HisApiController) PsnPutUnNCDSOnRecord() {
|
7965
|
7982
|
if len(insutypes) == 0 {
|
7966
|
7983
|
insutype = "310"
|
7967
|
7984
|
}
|
|
7985
|
+ insutype = psn_record.Insutype
|
7968
|
7986
|
|
7969
|
7987
|
for _, item := range rf {
|
7970
|
7988
|
if item.Insutype == insutype {
|
|
@@ -7972,11 +7990,6 @@ func (c *HisApiController) PsnPutUnNCDSOnRecord() {
|
7972
|
7990
|
}
|
7973
|
7991
|
}
|
7974
|
7992
|
|
7975
|
|
- psn_record, _ := service.GetPsnNCDSRecordById(id)
|
7976
|
|
- if psn_record.ID == 0 {
|
7977
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorPsnRecordNoExistWrong)
|
7978
|
|
- return
|
7979
|
|
- }
|
7980
|
7993
|
if config.IsOpen == 1 {
|
7981
|
7994
|
result := service.Gdyb2504(psn_record.PsnNo, miConfig.OrgName, role.UserName, miConfig.Code, insuplc_admdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, psn_record.TrtDclaDetlSn)
|
7982
|
7995
|
var dat map[string]interface{}
|
|
@@ -7988,11 +8001,33 @@ func (c *HisApiController) PsnPutUnNCDSOnRecord() {
|
7988
|
8001
|
|
7989
|
8002
|
userJSONBytes, _ := json.Marshal(dat)
|
7990
|
8003
|
var res ResultFourteen
|
7991
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
7992
|
|
- utils.ErrorLog("解析失败:%v", err)
|
7993
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
7994
|
|
- return
|
|
8004
|
+ var res10265 ResultFourteen10265
|
|
8005
|
+
|
|
8006
|
+ if miConfig.Code == "H15049901371" {
|
|
8007
|
+ if err := json.Unmarshal(userJSONBytes, &res10265); err != nil {
|
|
8008
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8009
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8010
|
+ return
|
|
8011
|
+ }
|
|
8012
|
+ res.ErrMsg = res10265.ErrMsg
|
|
8013
|
+ infocode, _ := strconv.ParseInt(res10265.Infcode, 10, 64)
|
|
8014
|
+ res.Infcode = infocode
|
|
8015
|
+ res.Output = res10265.Output
|
|
8016
|
+ res.InfRefmsgid = res10265.InfRefmsgid
|
|
8017
|
+
|
|
8018
|
+ } else {
|
|
8019
|
+ if err := json.Unmarshal([]byte(result), &res); err != nil {
|
|
8020
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
8021
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8022
|
+ return
|
|
8023
|
+ }
|
7995
|
8024
|
}
|
|
8025
|
+
|
|
8026
|
+ //if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
8027
|
+ // utils.ErrorLog("解析失败:%v", err)
|
|
8028
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
8029
|
+ // return
|
|
8030
|
+ //}
|
7996
|
8031
|
if res.Infcode == 0 {
|
7997
|
8032
|
psn_record.IsCancel = 2
|
7998
|
8033
|
service.CreatePsnNCDSRecord(&psn_record)
|