|
@@ -34,6 +34,8 @@ import (
|
34
|
34
|
"syscall"
|
35
|
35
|
"time"
|
36
|
36
|
"unsafe"
|
|
37
|
+ "github.com/go-ole/go-ole"
|
|
38
|
+
|
37
|
39
|
)
|
38
|
40
|
|
39
|
41
|
type HisApiController struct {
|
|
@@ -8004,7 +8006,6 @@ func (c *HisApiController) GetCFYLJG001() {
|
8004
|
8006
|
patient_id, _ := c.GetInt64("patient_id")
|
8005
|
8007
|
his_patient_id, _ := c.GetInt64("his_patient_id")
|
8006
|
8008
|
record_time := c.GetString("record_time")
|
8007
|
|
- admin_user_id = 3626
|
8008
|
8009
|
his, _ := service.GetHisPatientRecord(c.GetAdminUserInfo().CurrentOrgId, his_patient_id)
|
8009
|
8010
|
psn, _ := service.GetPsnByPatientId(patient_id)
|
8010
|
8011
|
curRoles, _ := service.GetAdminUserInfoByID(c.GetAdminUserInfo().CurrentOrgId, admin_user_id)
|
|
@@ -8067,9 +8068,9 @@ func (c *HisApiController) GetCFYLJG001() {
|
8067
|
8068
|
}
|
8068
|
8069
|
}
|
8069
|
8070
|
cFYLJG001.RxDrugCnt = count
|
8070
|
|
- cFYLJG001.ValiDays = "5"
|
|
8071
|
+ cFYLJG001.ValiDays = "2"
|
8071
|
8072
|
ts := time.Unix(item.PreTime, 0)
|
8072
|
|
- record_time2 := ts.AddDate(0, 0, int(5)).Unix()
|
|
8073
|
+ record_time2 := ts.AddDate(0, 0, int(2)).Unix()
|
8073
|
8074
|
tempTime3 := time.Unix(record_time2, 0)
|
8074
|
8075
|
timeFormat3 := tempTime3.Format("2006-01-02 15:04:05")
|
8075
|
8076
|
cFYLJG001.ValiEndTime = timeFormat3
|
|
@@ -8147,10 +8148,10 @@ func (c *HisApiController) GetCFYLJG001() {
|
8147
|
8148
|
tempTime6 := time.Unix(tempTime2, 0)
|
8148
|
8149
|
timeFormatTwo := tempTime6.Format("2006-01-02 15:04:05")
|
8149
|
8150
|
cFYLJG001.Mdtrtinfo.MdtrtTime = timeFormatTwo
|
8150
|
|
- cFYLJG001.Mdtrtinfo.DiseCodg = "M07803"
|
|
8151
|
+ cFYLJG001.Mdtrtinfo.DiseCodg = ""
|
8151
|
8152
|
cFYLJG001.Mdtrtinfo.SpDiseFlag = "1"
|
8152
|
|
- cFYLJG001.Mdtrtinfo.MaindiagCode = "N18.500"
|
8153
|
|
- cFYLJG001.Mdtrtinfo.MaindiagName = "慢性肾脏病5期"
|
|
8153
|
+ cFYLJG001.Mdtrtinfo.MaindiagCode = "I10.x00x002"
|
|
8154
|
+ cFYLJG001.Mdtrtinfo.MaindiagName = "高血压"
|
8154
|
8155
|
|
8155
|
8156
|
diagnosis_ids := strings.Split(info.Diagnosis, ",")
|
8156
|
8157
|
var config []*models.HisXtDiagnoseConfig
|
|
@@ -8193,7 +8194,7 @@ func (c *HisApiController) GetCFYLJG001() {
|
8193
|
8194
|
if miConfig.MdtrtareaAdmvs == "340699" {
|
8194
|
8195
|
result, request := service.GetAHCFYLJG001("http://10.66.149.64:8080/epc/api", cFYLJG001, his.Insutype)
|
8195
|
8196
|
saveLog(result, request, "GetCFYLJG001", "GetCFYLJG001")
|
8196
|
|
- var res ResultCFYLJG001
|
|
8197
|
+ var res ResultCFYLJG001AH
|
8197
|
8198
|
var respJSON2 map[string]interface{}
|
8198
|
8199
|
if err := json.Unmarshal([]byte(string(result)), &respJSON2); err != nil {
|
8199
|
8200
|
utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
@@ -8206,19 +8207,12 @@ func (c *HisApiController) GetCFYLJG001() {
|
8206
|
8207
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
8207
|
8208
|
return
|
8208
|
8209
|
}
|
8209
|
|
- if res.Infcode == -1 {
|
8210
|
|
- c.ServeSuccessJSON(map[string]interface{}{
|
8211
|
|
- "failed_code": -10,
|
8212
|
|
- "msg": res.ErrMsg,
|
8213
|
|
- })
|
8214
|
|
- return
|
8215
|
8210
|
|
8216
|
|
- } else {
|
8217
|
8211
|
var flow models.HisPrescriptionFlow
|
8218
|
8212
|
flow.Ctime = time.Now().Unix()
|
8219
|
8213
|
flow.SignDigest = ""
|
8220
|
|
- flow.RxTraceCode = res.Output.RxTraceCode
|
8221
|
|
- flow.HiRxno = res.Output.HiRxno
|
|
8214
|
+ flow.RxTraceCode = res.RxTraceCode
|
|
8215
|
+ flow.HiRxno = res.HiRxno
|
8222
|
8216
|
flow.MID = his.Number
|
8223
|
8217
|
flow.Status = 1
|
8224
|
8218
|
flow.DCode = doctor_info.DoctorNumber
|
|
@@ -8233,7 +8227,7 @@ func (c *HisApiController) GetCFYLJG001() {
|
8233
|
8227
|
c.ServeSuccessJSON(map[string]interface{}{
|
8234
|
8228
|
"msg": "上传成功",
|
8235
|
8229
|
})
|
8236
|
|
- }
|
|
8230
|
+
|
8237
|
8231
|
|
8238
|
8232
|
} else {
|
8239
|
8233
|
result, request := service.GetCFYLJG001(miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, cFYLJG001, his.Insutype)
|
|
@@ -25398,6 +25392,12 @@ type ResultCFYLJG001 struct {
|
25398
|
25392
|
WarnInfo interface{} `json:"warn_info"`
|
25399
|
25393
|
}
|
25400
|
25394
|
|
|
25395
|
+type ResultCFYLJG001AH struct {
|
|
25396
|
+ RxTraceCode string `json:"rxTraceCode"`
|
|
25397
|
+ HiRxno string `json:"hiRxno"`
|
|
25398
|
+
|
|
25399
|
+}
|
|
25400
|
+
|
25401
|
25401
|
type ResultCFYLJG007 struct {
|
25402
|
25402
|
ErrMsg string `json:"err_msg"`
|
25403
|
25403
|
InfRefmsgid string `json:"inf_refmsgid"`
|
|
@@ -32231,6 +32231,11 @@ func (c *HisApiController) GetPreUploadInfo() {
|
32231
|
32231
|
data["sick_code"] = sickConfig.CountryCode
|
32232
|
32232
|
data["sick_name"] = sickConfig.ClassName
|
32233
|
32233
|
}
|
|
32234
|
+ if reg_type == 11 {
|
|
32235
|
+ med_type = "11"
|
|
32236
|
+ data["sick_code"] = sickConfig.CountryCode
|
|
32237
|
+ data["sick_name"] = sickConfig.ClassName
|
|
32238
|
+ }
|
32234
|
32239
|
} else if his.Insutype == "310" {
|
32235
|
32240
|
if reg_type == 992102 {
|
32236
|
32241
|
med_type = "992102"
|
|
@@ -32253,6 +32258,12 @@ func (c *HisApiController) GetPreUploadInfo() {
|
32253
|
32258
|
data["sick_code"] = sickConfig.CountryCode
|
32254
|
32259
|
data["sick_name"] = sickConfig.ClassName
|
32255
|
32260
|
}
|
|
32261
|
+
|
|
32262
|
+ if reg_type == 11 {
|
|
32263
|
+ med_type = "11"
|
|
32264
|
+ data["sick_code"] = sickConfig.CountryCode
|
|
32265
|
+ data["sick_name"] = sickConfig.ClassName
|
|
32266
|
+ }
|
32256
|
32267
|
}
|
32257
|
32268
|
|
32258
|
32269
|
data["med_type"] = med_type
|
|
@@ -35082,6 +35093,7 @@ func (c *HisApiController) Refund() {
|
35082
|
35093
|
})
|
35083
|
35094
|
return
|
35084
|
35095
|
}
|
|
35096
|
+ return
|
35085
|
35097
|
roles, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
35086
|
35098
|
if order.ID == 0 {
|
35087
|
35099
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|