|
@@ -11,7 +11,6 @@ import (
|
11
|
11
|
"gdyb/service"
|
12
|
12
|
"gdyb/utils"
|
13
|
13
|
"github.com/astaxie/beego"
|
14
|
|
- "github.com/axgle/mahonia"
|
15
|
14
|
"github.com/jinzhu/gorm"
|
16
|
15
|
"github.com/shopspring/decimal"
|
17
|
16
|
"io"
|
|
@@ -3629,7 +3628,7 @@ func (c *HisApiController) GetCheckCode() {
|
3629
|
3628
|
ID: item.ID,
|
3630
|
3629
|
Name: item.DrugName,
|
3631
|
3630
|
Code: item.MedicalInsuranceNumber,
|
3632
|
|
- List_type_code: item.MedicalInsuranceNumber,
|
|
3631
|
+ List_type_code: "101",
|
3633
|
3632
|
}
|
3634
|
3633
|
queryResult = append(queryResult, result)
|
3635
|
3634
|
}
|
|
@@ -3642,7 +3641,7 @@ func (c *HisApiController) GetCheckCode() {
|
3642
|
3641
|
ID: item.ID,
|
3643
|
3642
|
Name: item.GoodName,
|
3644
|
3643
|
Code: item.MedicalInsuranceNumber,
|
3645
|
|
- List_type_code: item.MedicalInsuranceNumber,
|
|
3644
|
+ List_type_code: "301",
|
3646
|
3645
|
}
|
3647
|
3646
|
queryResult = append(queryResult, result)
|
3648
|
3647
|
}
|
|
@@ -3653,7 +3652,7 @@ func (c *HisApiController) GetCheckCode() {
|
3653
|
3652
|
ID: item.ID,
|
3654
|
3653
|
Name: item.ProjectName,
|
3655
|
3654
|
Code: item.MedicalCode,
|
3656
|
|
- List_type_code: item.MedicalCode,
|
|
3655
|
+ List_type_code: "201",
|
3657
|
3656
|
}
|
3658
|
3657
|
queryResult = append(queryResult, result)
|
3659
|
3658
|
}
|
|
@@ -3683,14 +3682,20 @@ func (c *HisApiController) GetCheckCode() {
|
3683
|
3682
|
|
3684
|
3683
|
if config.IsOpen == 1 {
|
3685
|
3684
|
for _, item := range queryResult {
|
3686
|
|
- result := service.Gdyb3301(baseParams, item.Name, item.Code, item.List_type_code, "2021-04-26", "")
|
|
3685
|
+ var result string
|
|
3686
|
+ if record_type == 1 {
|
|
3687
|
+ result = service.Gdyb3301(baseParams, item.Name, item.Code, item.List_type_code, "2021-04-26", "", item.List_type_code)
|
|
3688
|
+ } else if record_type == 2 {
|
|
3689
|
+ result = service.Gdyb3301(baseParams, item.Name, item.Code, item.List_type_code, "2021-04-26", "", item.List_type_code)
|
|
3690
|
+ } else if record_type == 3 {
|
|
3691
|
+ result = service.Gdyb3301(baseParams, item.Name, item.Code, item.List_type_code, "2021-04-26", "", item.List_type_code)
|
|
3692
|
+ }
|
3687
|
3693
|
var dat map[string]interface{}
|
3688
|
3694
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
3689
|
3695
|
fmt.Println(dat)
|
3690
|
3696
|
} else {
|
3691
|
3697
|
fmt.Println(err)
|
3692
|
3698
|
}
|
3693
|
|
-
|
3694
|
3699
|
userJSONBytes, _ := json.Marshal(dat)
|
3695
|
3700
|
var res ResultSix
|
3696
|
3701
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
@@ -3738,7 +3743,7 @@ func (c *HisApiController) UnCheckCode() {
|
3738
|
3743
|
ID: item.ID,
|
3739
|
3744
|
Name: item.DrugName,
|
3740
|
3745
|
Code: item.MedicalInsuranceNumber,
|
3741
|
|
- List_type_code: item.MedicalInsuranceNumber,
|
|
3746
|
+ List_type_code: "101",
|
3742
|
3747
|
}
|
3743
|
3748
|
queryResult = append(queryResult, result)
|
3744
|
3749
|
}
|
|
@@ -3751,7 +3756,7 @@ func (c *HisApiController) UnCheckCode() {
|
3751
|
3756
|
ID: item.ID,
|
3752
|
3757
|
Name: item.GoodName,
|
3753
|
3758
|
Code: item.MedicalInsuranceNumber,
|
3754
|
|
- List_type_code: item.MedicalInsuranceNumber,
|
|
3759
|
+ List_type_code: "301",
|
3755
|
3760
|
}
|
3756
|
3761
|
queryResult = append(queryResult, result)
|
3757
|
3762
|
}
|
|
@@ -3762,7 +3767,7 @@ func (c *HisApiController) UnCheckCode() {
|
3762
|
3767
|
ID: item.ID,
|
3763
|
3768
|
Name: item.ProjectName,
|
3764
|
3769
|
Code: item.MedicalCode,
|
3765
|
|
- List_type_code: item.MedicalCode,
|
|
3770
|
+ List_type_code: "201",
|
3766
|
3771
|
}
|
3767
|
3772
|
queryResult = append(queryResult, result)
|
3768
|
3773
|
}
|
|
@@ -3792,15 +3797,20 @@ func (c *HisApiController) UnCheckCode() {
|
3792
|
3797
|
|
3793
|
3798
|
if config.IsOpen == 1 {
|
3794
|
3799
|
for _, item := range queryResult {
|
3795
|
|
-
|
3796
|
|
- result := service.Gdyb3302(baseParams, item.Name, item.Code, item.List_type_code)
|
|
3800
|
+ var result string
|
|
3801
|
+ if record_type == 1 {
|
|
3802
|
+ result = service.Gdyb3302(baseParams, item.Name, item.Code, item.List_type_code)
|
|
3803
|
+ } else if record_type == 2 {
|
|
3804
|
+ result = service.Gdyb3302(baseParams, item.Name, item.Code, item.List_type_code)
|
|
3805
|
+ } else if record_type == 3 {
|
|
3806
|
+ result = service.Gdyb3302(baseParams, item.Name, item.Code, item.List_type_code)
|
|
3807
|
+ }
|
3797
|
3808
|
var dat2 map[string]interface{}
|
3798
|
3809
|
if err := json.Unmarshal([]byte(result), &dat2); err == nil {
|
3799
|
3810
|
fmt.Println(dat2)
|
3800
|
3811
|
} else {
|
3801
|
3812
|
fmt.Println(err)
|
3802
|
3813
|
}
|
3803
|
|
-
|
3804
|
3814
|
userJSONBytes, _ := json.Marshal(dat2)
|
3805
|
3815
|
var res ResultSix
|
3806
|
3816
|
if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
@@ -3813,7 +3823,6 @@ func (c *HisApiController) UnCheckCode() {
|
3813
|
3823
|
service.UpdateDrugByIdDetail(item.ID)
|
3814
|
3824
|
} else if record_type == 2 {
|
3815
|
3825
|
service.UpdateGoodInfoById(item.ID)
|
3816
|
|
-
|
3817
|
3826
|
} else if record_type == 3 {
|
3818
|
3827
|
service.UpdateMyProjectById(item.ID)
|
3819
|
3828
|
}
|
|
@@ -4046,7 +4055,6 @@ func (c *HisApiController) PsnPutNCDSOnRecord() {
|
4046
|
4055
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
4047
|
4056
|
config, _ := service.GetMedicalInsuranceConfig(adminUser.CurrentOrgId)
|
4048
|
4057
|
sick, _ := service.FindSickById(sick_id)
|
4049
|
|
- //role, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
|
4050
|
4058
|
doctor, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, doctor_id)
|
4051
|
4059
|
if config.IsOpen == 1 {
|
4052
|
4060
|
result := service.Gdyb2503(psn_no, insutype, miConfig.OrgName, doctor.UserName, miConfig.Code, strconv.FormatInt(doctor.ID, 10), miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, sick.ClassName, sick.CountryCode)
|
|
@@ -4261,19 +4269,3 @@ func RemoveRepeatedCode(arr []string) (newArr []string) {
|
4261
|
4269
|
}
|
4262
|
4270
|
return
|
4263
|
4271
|
}
|
4264
|
|
-
|
4265
|
|
-type Charset string
|
4266
|
|
-
|
4267
|
|
-const (
|
4268
|
|
- UTF8 = Charset("UTF-8")
|
4269
|
|
- GB18030 = Charset("GB18030")
|
4270
|
|
-)
|
4271
|
|
-
|
4272
|
|
-func ConvertToString(src string, srcCode string, tagCode string) string {
|
4273
|
|
- srcCoder := mahonia.NewDecoder(srcCode)
|
4274
|
|
- srcResult := srcCoder.ConvertString(src)
|
4275
|
|
- tagCoder := mahonia.NewDecoder(tagCode)
|
4276
|
|
- _, cdata, _ := tagCoder.Translate([]byte(srcResult), true)
|
4277
|
|
- result := string(cdata)
|
4278
|
|
- return result
|
4279
|
|
-}
|