|
@@ -187,8 +187,9 @@ func SZHisManagerApiRegistRouters() {
|
187
|
187
|
beego.Router("/sz/api/drug/get", &SZHisApiController{}, "get:GetDrugList")
|
188
|
188
|
//协议机构诊疗项目
|
189
|
189
|
beego.Router("/sz/api/treatment/get", &SZHisApiController{}, "get:GetTreatmentProject")
|
190
|
|
- //协议机构目录
|
|
190
|
+ //协议机构目录备案撤销
|
191
|
191
|
beego.Router("/sz/api/revocation/get", &SZHisApiController{}, "get:GetRevocation")
|
|
192
|
+
|
192
|
193
|
//定点机构约定信息查询
|
193
|
194
|
//beego.Router("/sz/api/information/query/get",&SZHisApiController{},"get:GetInformationQuery")
|
194
|
195
|
//-医药师信息登记
|
|
@@ -197,7 +198,9 @@ func SZHisManagerApiRegistRouters() {
|
197
|
198
|
beego.Router("/sz/api/medical/get", &SZHisApiController{}, "get:GetMedicalList")
|
198
|
199
|
//医药师信息更新
|
199
|
200
|
beego.Router("/sz/api/update/medical/get", &SZHisApiController{}, "get:GetUpdateMedicalList")
|
|
201
|
+ //协议机构材料目录备案
|
200
|
202
|
|
|
203
|
+ beego.Router("/sz/api/goods/get", &SZHisApiController{}, "get:GetGoodsList")
|
201
|
204
|
}
|
202
|
205
|
|
203
|
206
|
func IntPtr(n int) uintptr {
|
|
@@ -1313,7 +1316,7 @@ func (c *SZHisApiController) GetDrugList() {
|
1313
|
1316
|
for _, item := range list {
|
1314
|
1317
|
fmt.Println(item.DrugDosageForm)
|
1315
|
1318
|
for _, it := range drugs {
|
1316
|
|
- fmt.Println("2222", it.Value, it.Name)
|
|
1319
|
+
|
1317
|
1320
|
if item.DrugDosageForm == it.Value {
|
1318
|
1321
|
item.DrugDosageName = it.Name
|
1319
|
1322
|
}
|
|
@@ -1392,7 +1395,7 @@ func (c *SZHisApiController) GetDrugList() {
|
1392
|
1395
|
isSuccess = false
|
1393
|
1396
|
//失败
|
1394
|
1397
|
|
1395
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
1398
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1396
|
1399
|
return
|
1397
|
1400
|
}
|
1398
|
1401
|
fmt.Println(isSuccess)
|
|
@@ -1472,7 +1475,7 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1472
|
1475
|
isSuccess = false
|
1473
|
1476
|
//失败
|
1474
|
1477
|
|
1475
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
1478
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1476
|
1479
|
return
|
1477
|
1480
|
}
|
1478
|
1481
|
fmt.Println(isSuccess)
|
|
@@ -1481,82 +1484,165 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1481
|
1484
|
|
1482
|
1485
|
func (c *SZHisApiController) GetRevocation() {
|
1483
|
1486
|
|
1484
|
|
- //获取药品库数据
|
1485
|
|
- list, _ := service.GetDrugList(10028)
|
|
1487
|
+ id, _ := c.GetInt64("id")
|
|
1488
|
+ //用来区分是药品的撤销还是耗材的撤销 1.药品 2.诊疗项目 3.材料 5.辅助器具项目
|
1486
|
1489
|
|
1487
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
1488
|
|
- var doctor_name string
|
1489
|
|
- var doctor_code string
|
|
1490
|
+ type_id, _ := c.GetInt64("type_id")
|
|
1491
|
+ fmt.Println("type_id2222222", type_id)
|
|
1492
|
+ if type_id == 1 {
|
|
1493
|
+ //获取药品库数据
|
|
1494
|
+ list, _ := service.GetDrugListByDetail(10028, id)
|
1490
|
1495
|
|
1491
|
|
- doctor_name = "黄亦轩"
|
1492
|
|
- doctor_code = "1001"
|
|
1496
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
1497
|
+ var doctor_name string
|
|
1498
|
+ var doctor_code string
|
1493
|
1499
|
|
1494
|
|
- var pagesize int = 50
|
1495
|
|
- var start int = 1
|
1496
|
|
- var stop int
|
1497
|
|
- var pagecount int
|
1498
|
|
- var curpage int
|
1499
|
|
- var isSuccess bool = true
|
1500
|
|
- //总页数,向上取整,注意除之前要先转换类型为float64
|
1501
|
|
- pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
1500
|
+ doctor_name = "黄亦轩"
|
|
1501
|
+ doctor_code = "1001"
|
1502
|
1502
|
|
1503
|
|
- var ress []*Result
|
1504
|
|
- for curpage = 1; curpage <= pagecount; curpage++ {
|
1505
|
|
- if curpage == 1 {
|
1506
|
|
- start = 1
|
1507
|
|
- } else {
|
1508
|
|
- start = (curpage-1)*pagesize + 1
|
1509
|
|
- }
|
1510
|
|
- stop = curpage * pagesize
|
1511
|
|
- if stop > len(list) {
|
1512
|
|
- stop = len(list)
|
1513
|
|
- }
|
1514
|
|
- //这里就可以查看开始和结束了
|
1515
|
|
- fmt.Println(list[start-1 : stop])
|
1516
|
|
- var customs []*models.DrugDetail
|
1517
|
|
- for _, item := range list {
|
1518
|
|
- fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
1519
|
|
- detail := &models.DrugDetail{
|
|
1503
|
+ var pagesize int = 50
|
|
1504
|
+ var start int = 1
|
|
1505
|
+ var stop int
|
|
1506
|
+ var pagecount int
|
|
1507
|
+ var curpage int
|
|
1508
|
+ var isSuccess bool = true
|
|
1509
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
1510
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
1511
|
+
|
|
1512
|
+ var ress []*Result
|
|
1513
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
1514
|
+ if curpage == 1 {
|
|
1515
|
+ start = 1
|
|
1516
|
+ } else {
|
|
1517
|
+ start = (curpage-1)*pagesize + 1
|
|
1518
|
+ }
|
|
1519
|
+ stop = curpage * pagesize
|
|
1520
|
+ if stop > len(list) {
|
|
1521
|
+ stop = len(list)
|
|
1522
|
+ }
|
|
1523
|
+ //这里就可以查看开始和结束了
|
|
1524
|
+ fmt.Println(list[start-1 : stop])
|
|
1525
|
+ var customs []*models.DrugDetail
|
|
1526
|
+ for _, item := range list {
|
|
1527
|
+ fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
|
1528
|
+ detail := &models.DrugDetail{
|
|
1529
|
+
|
|
1530
|
+ MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
|
|
1531
|
+ Code: item.Code, //协议机构内部目录编码
|
|
1532
|
+ DrugName: item.DrugName, //协议机构内部目录名称
|
|
1533
|
+ DrugSpec: item.DrugSpec,
|
|
1534
|
+ ManufacturerName: item.ManufacturerName,
|
|
1535
|
+ MinUnit: item.MinUnit,
|
|
1536
|
+ RetailPrice: item.RetailPrice, //协议机构内部项目收费价格
|
|
1537
|
+ LimitRemark: item.LimitRemark,
|
|
1538
|
+ }
|
|
1539
|
+ customs = append(customs, detail)
|
|
1540
|
+ }
|
|
1541
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
1542
|
+ fmt.Println("reuslt", result)
|
|
1543
|
+ var dat map[string]interface{}
|
|
1544
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
1545
|
+ fmt.Println(dat)
|
|
1546
|
+ } else {
|
|
1547
|
+ fmt.Println(err)
|
|
1548
|
+ }
|
1520
|
1549
|
|
1521
|
|
- MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
|
1522
|
|
- Code: item.Code, //协议机构内部目录编码
|
1523
|
|
- DrugName: item.DrugName, //协议机构内部目录名称
|
1524
|
|
- DrugSpec: item.DrugSpec,
|
1525
|
|
- ManufacturerName: item.ManufacturerName,
|
1526
|
|
- MinUnit: item.MinUnit,
|
1527
|
|
- RetailPrice: item.RetailPrice, //协议机构内部项目收费价格
|
1528
|
|
- LimitRemark: item.LimitRemark,
|
|
1550
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
1551
|
+
|
|
1552
|
+ var res Result
|
|
1553
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
1554
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
1555
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1556
|
+ return
|
1529
|
1557
|
}
|
1530
|
|
- customs = append(customs, detail)
|
1531
|
|
- }
|
1532
|
|
- result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs)
|
1533
|
|
- fmt.Println("reuslt9999999999999999", result)
|
1534
|
|
- var dat map[string]interface{}
|
1535
|
|
- if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
1536
|
|
- fmt.Println(dat)
|
1537
|
|
- } else {
|
1538
|
|
- fmt.Println(err)
|
|
1558
|
+ if res.Transreturncode == "00000000" {
|
|
1559
|
+ ress = append(ress, &res)
|
|
1560
|
+ } else {
|
|
1561
|
+ isSuccess = false
|
|
1562
|
+ //失败
|
|
1563
|
+
|
|
1564
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
1565
|
+ return
|
|
1566
|
+ }
|
|
1567
|
+ fmt.Println(isSuccess)
|
1539
|
1568
|
}
|
1540
|
1569
|
|
1541
|
|
- userJSONBytes, _ := json.Marshal(dat)
|
|
1570
|
+ }
|
1542
|
1571
|
|
1543
|
|
- var res Result
|
1544
|
|
- if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
1545
|
|
- utils.ErrorLog("解析失败:%v", err)
|
1546
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
1547
|
|
- return
|
1548
|
|
- }
|
1549
|
|
- if res.Transreturncode == "00000000" {
|
1550
|
|
- ress = append(ress, &res)
|
1551
|
|
- } else {
|
1552
|
|
- isSuccess = false
|
1553
|
|
- //失败
|
|
1572
|
+ if type_id == 3 {
|
1554
|
1573
|
|
1555
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
1556
|
|
- return
|
|
1574
|
+ //获取药品库数据
|
|
1575
|
+ list, _ := service.GetGoodListByDetail(10028, id)
|
|
1576
|
+
|
|
1577
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
1578
|
+ var doctor_name string
|
|
1579
|
+ var doctor_code string
|
|
1580
|
+
|
|
1581
|
+ doctor_name = "黄亦轩"
|
|
1582
|
+ doctor_code = "1001"
|
|
1583
|
+
|
|
1584
|
+ var pagesize int = 50
|
|
1585
|
+ var start int = 1
|
|
1586
|
+ var stop int
|
|
1587
|
+ var pagecount int
|
|
1588
|
+ var curpage int
|
|
1589
|
+ var isSuccess bool = true
|
|
1590
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
1591
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
1592
|
+
|
|
1593
|
+ var ress []*Result
|
|
1594
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
1595
|
+ if curpage == 1 {
|
|
1596
|
+ start = 1
|
|
1597
|
+ } else {
|
|
1598
|
+ start = (curpage-1)*pagesize + 1
|
|
1599
|
+ }
|
|
1600
|
+ stop = curpage * pagesize
|
|
1601
|
+ if stop > len(list) {
|
|
1602
|
+ stop = len(list)
|
|
1603
|
+ }
|
|
1604
|
+ //这里就可以查看开始和结束了
|
|
1605
|
+ fmt.Println(list[start-1 : stop])
|
|
1606
|
+ var customs []*models.DrugDetail
|
|
1607
|
+ for _, item := range list {
|
|
1608
|
+ fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
|
1609
|
+ detail := &models.DrugDetail{
|
|
1610
|
+ SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
1611
|
+ ManufacturerName: item.ManufacturerName,
|
|
1612
|
+ }
|
|
1613
|
+ customs = append(customs, detail)
|
|
1614
|
+ }
|
|
1615
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
1616
|
+ fmt.Println("reuslt", result)
|
|
1617
|
+ var dat map[string]interface{}
|
|
1618
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
1619
|
+ fmt.Println(dat)
|
|
1620
|
+ } else {
|
|
1621
|
+ fmt.Println(err)
|
|
1622
|
+ }
|
|
1623
|
+
|
|
1624
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
1625
|
+
|
|
1626
|
+ var res Result
|
|
1627
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
1628
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
1629
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1630
|
+ return
|
|
1631
|
+ }
|
|
1632
|
+ if res.Transreturncode == "00000000" {
|
|
1633
|
+ ress = append(ress, &res)
|
|
1634
|
+ } else {
|
|
1635
|
+ isSuccess = false
|
|
1636
|
+ //失败
|
|
1637
|
+
|
|
1638
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
1639
|
+ return
|
|
1640
|
+ }
|
|
1641
|
+ fmt.Println(isSuccess)
|
1557
|
1642
|
}
|
1558
|
|
- fmt.Println(isSuccess)
|
|
1643
|
+
|
1559
|
1644
|
}
|
|
1645
|
+
|
1560
|
1646
|
}
|
1561
|
1647
|
|
1562
|
1648
|
//func (c *SZHisApiController) GetInformationQuery() {
|
|
@@ -1646,41 +1732,41 @@ func (c *SZHisApiController) GetDoctorList() {
|
1646
|
1732
|
detail := &models.DocDetail{
|
1647
|
1733
|
UserName: item.UserName,
|
1648
|
1734
|
RoleId: item.Name,
|
1649
|
|
- Sex: "",
|
1650
|
|
- CardType: "",
|
1651
|
|
- IdCard: "",
|
1652
|
|
- Phone: "",
|
1653
|
|
- WorkMajorName: "",
|
1654
|
|
- Nation: "",
|
|
1735
|
+ Sex: "1",
|
|
1736
|
+ CardType: "01",
|
|
1737
|
+ IdCard: "430526199408156511",
|
|
1738
|
+ Phone: "13318464642",
|
|
1739
|
+ WorkMajorName: "医生",
|
|
1740
|
+ Nation: "01",
|
1655
|
1741
|
BirthDay: 20201022,
|
1656
|
|
- WorkTime: 12,
|
1657
|
|
- Education: "",
|
1658
|
|
- StudyMajorName: "",
|
1659
|
|
- CertificateCode: "", //证书编码
|
1660
|
|
- MedicalCode: "", //医师资格编码
|
1661
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
1662
|
|
- MedicalLevel: "", //医生级别
|
1663
|
|
- TypeJob: "", //职业类别
|
1664
|
|
- DoctorNumber: "", //医师编号
|
1665
|
|
- Licensing: "", //职业标志
|
1666
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
1667
|
|
- MonitoringLevel: "", //监控等级
|
1668
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
1669
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
1670
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
1671
|
|
- PharmacistType: "", //药师类别
|
1672
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
1673
|
|
- PharmacistsLicensing: "", //药师执业范围
|
1674
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
1675
|
|
- OfficeCode: "", //科室编码
|
1676
|
|
- JobNumber: "", //工号
|
1677
|
|
- PostName: "", //职位名称
|
1678
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
1679
|
|
- IsActive: "", //在职与否
|
1680
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
1681
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
1682
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
1683
|
|
- StartTime: 1233, //开始日期
|
|
1742
|
+ WorkTime: 20201022,
|
|
1743
|
+ Education: "21",
|
|
1744
|
+ StudyMajorName: "医生",
|
|
1745
|
+ CertificateCode: "y2222222", //证书编码
|
|
1746
|
+ MedicalCode: "y2222222", //医师资格编码
|
|
1747
|
+ MedicalRangeCode: "101", //医师执业范围代码
|
|
1748
|
+ MedicalLevel: "1", //医生级别
|
|
1749
|
+ TypeJob: "1", //职业类别
|
|
1750
|
+ DoctorNumber: "22222", //医师编号b
|
|
1751
|
+ Licensing: "1", //职业标志
|
|
1752
|
+ DoctorServiceStatus: "1", //医师医保服务资格状态
|
|
1753
|
+ MonitoringLevel: "1", //监控等级
|
|
1754
|
+ DrugPsychotropicSubstances: "1", //毒麻精神药品资格
|
|
1755
|
+ HealthCareCode: "1001", // 母婴保健技术考核合格证书编号
|
|
1756
|
+ PlanningTechnicalServiceCode: "1002", //计划生育技术服务人员合格证编号
|
|
1757
|
+ PharmacistType: "1", //药师类别
|
|
1758
|
+ PharmacistPracticeCategory: "1", //药师执业类别
|
|
1759
|
+ PharmacistsLicensing: "1", //药师执业范围
|
|
1760
|
+ PharmacistRegistrationNumber: "000200", //执业药师注册证编号
|
|
1761
|
+ OfficeCode: "9933", //科室编码
|
|
1762
|
+ JobNumber: "82021344", //工号
|
|
1763
|
+ PostName: "主任", //职位名称
|
|
1764
|
+ TechnicalJobLevelCode: "231", //专业技术职务级别编码
|
|
1765
|
+ IsActive: "1", //在职与否
|
|
1766
|
+ PrescriptionQualificationIdentification: "1", //处方资格标识
|
|
1767
|
+ IdentificationOutpatients: "1", //门诊大病医师标识
|
|
1768
|
+ OutpatientIllnessCategory: "血友病", //门诊大病类别
|
|
1769
|
+ StartTime: 20210311, //开始日期
|
1684
|
1770
|
}
|
1685
|
1771
|
customs = append(customs, detail)
|
1686
|
1772
|
}
|
|
@@ -1708,7 +1794,7 @@ func (c *SZHisApiController) GetDoctorList() {
|
1708
|
1794
|
isSuccess = false
|
1709
|
1795
|
//失败
|
1710
|
1796
|
|
1711
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
1797
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1712
|
1798
|
return
|
1713
|
1799
|
}
|
1714
|
1800
|
fmt.Println(isSuccess)
|
|
@@ -1763,43 +1849,44 @@ func (c *SZHisApiController) GetMedicalList() {
|
1763
|
1849
|
for _, item := range list {
|
1764
|
1850
|
fmt.Println("医护类别", item.Name)
|
1765
|
1851
|
detail := &models.DocDetail{
|
|
1852
|
+ StaffCode: "H27224269",
|
1766
|
1853
|
UserName: item.UserName,
|
1767
|
1854
|
RoleId: item.Name,
|
1768
|
|
- Sex: "",
|
1769
|
|
- CardType: "",
|
1770
|
|
- IdCard: "",
|
1771
|
|
- Phone: "",
|
1772
|
|
- WorkMajorName: "",
|
1773
|
|
- Nation: "",
|
|
1855
|
+ Sex: "1",
|
|
1856
|
+ CardType: "01",
|
|
1857
|
+ IdCard: "430526199408156511",
|
|
1858
|
+ Phone: "13318464642",
|
|
1859
|
+ WorkMajorName: "医生",
|
|
1860
|
+ Nation: "01",
|
1774
|
1861
|
BirthDay: 20201022,
|
1775
|
|
- WorkTime: 12,
|
1776
|
|
- Education: "",
|
1777
|
|
- StudyMajorName: "",
|
1778
|
|
- CertificateCode: "", //证书编码
|
1779
|
|
- MedicalCode: "", //医师资格编码
|
1780
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
1781
|
|
- MedicalLevel: "", //医生级别
|
1782
|
|
- TypeJob: "", //职业类别
|
1783
|
|
- DoctorNumber: "", //医师编号
|
1784
|
|
- Licensing: "", //职业标志
|
1785
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
1786
|
|
- MonitoringLevel: "", //监控等级
|
1787
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
1788
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
1789
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
1790
|
|
- PharmacistType: "", //药师类别
|
1791
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
1792
|
|
- PharmacistsLicensing: "", //药师执业范围
|
1793
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
1794
|
|
- OfficeCode: "", //科室编码
|
1795
|
|
- JobNumber: "", //工号
|
1796
|
|
- PostName: "", //职位名称
|
1797
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
1798
|
|
- IsActive: "", //在职与否
|
1799
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
1800
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
1801
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
1802
|
|
- StartTime: 1233, //开始日期
|
|
1862
|
+ WorkTime: 20201022,
|
|
1863
|
+ Education: "21",
|
|
1864
|
+ StudyMajorName: "医生",
|
|
1865
|
+ CertificateCode: "y2222222", //证书编码
|
|
1866
|
+ MedicalCode: "y2222222", //医师资格编码
|
|
1867
|
+ MedicalRangeCode: "101", //医师执业范围代码
|
|
1868
|
+ MedicalLevel: "1", //医生级别
|
|
1869
|
+ TypeJob: "1", //职业类别
|
|
1870
|
+ DoctorNumber: "22222", //医师编号b
|
|
1871
|
+ Licensing: "1", //职业标志
|
|
1872
|
+ DoctorServiceStatus: "1", //医师医保服务资格状态
|
|
1873
|
+ MonitoringLevel: "1", //监控等级
|
|
1874
|
+ DrugPsychotropicSubstances: "1", //毒麻精神药品资格
|
|
1875
|
+ HealthCareCode: "1001", // 母婴保健技术考核合格证书编号
|
|
1876
|
+ PlanningTechnicalServiceCode: "1002", //计划生育技术服务人员合格证编号
|
|
1877
|
+ PharmacistType: "1", //药师类别
|
|
1878
|
+ PharmacistPracticeCategory: "1", //药师执业类别
|
|
1879
|
+ PharmacistsLicensing: "1", //药师执业范围
|
|
1880
|
+ PharmacistRegistrationNumber: "000200", //执业药师注册证编号
|
|
1881
|
+ OfficeCode: "9933", //科室编码
|
|
1882
|
+ JobNumber: "82021344", //工号
|
|
1883
|
+ PostName: "主任", //职位名称
|
|
1884
|
+ TechnicalJobLevelCode: "231", //专业技术职务级别编码
|
|
1885
|
+ IsActive: "1", //在职与否
|
|
1886
|
+ PrescriptionQualificationIdentification: "1", //处方资格标识
|
|
1887
|
+ IdentificationOutpatients: "1", //门诊大病医师标识
|
|
1888
|
+ OutpatientIllnessCategory: "血友病", //门诊大病类别
|
|
1889
|
+ StartTime: 20210311, //开始日期
|
1803
|
1890
|
}
|
1804
|
1891
|
customs = append(customs, detail)
|
1805
|
1892
|
}
|
|
@@ -1827,7 +1914,7 @@ func (c *SZHisApiController) GetMedicalList() {
|
1827
|
1914
|
isSuccess = false
|
1828
|
1915
|
//失败
|
1829
|
1916
|
|
1830
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
1917
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1831
|
1918
|
return
|
1832
|
1919
|
}
|
1833
|
1920
|
fmt.Println(isSuccess)
|
|
@@ -1882,45 +1969,45 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
1882
|
1969
|
for _, item := range list {
|
1883
|
1970
|
fmt.Println("医护类别", item.Name)
|
1884
|
1971
|
detail := &models.DocDetail{
|
1885
|
|
- StaffCode: "", //医护人员编码
|
1886
|
|
- UserName: item.UserName, //医护人员姓名
|
1887
|
|
- RoleId: item.Name, //医护人员类别
|
1888
|
|
- Sex: "", //性别
|
1889
|
|
- CardType: "", //证件类型
|
1890
|
|
- IdCard: "", //证件号码
|
1891
|
|
- Phone: "", //联系电话
|
1892
|
|
- WorkMajorName: "", //现从事专业名称
|
1893
|
|
- Nation: "", //民族
|
1894
|
|
- BirthDay: 20201022, //出生日期
|
1895
|
|
- WorkTime: 12, //参加工作日期
|
1896
|
|
- Education: "", //学历
|
1897
|
|
- StudyMajorName: "", //所学的专业名称
|
1898
|
|
- CertificateCode: "", //证书编码
|
1899
|
|
- MedicalCode: "", //医师资格编码
|
1900
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
1901
|
|
- MedicalLevel: "", //医生级别
|
1902
|
|
- TypeJob: "", //职业类别
|
1903
|
|
- DoctorNumber: "", //医师编号
|
1904
|
|
- Licensing: "", //职业标志
|
1905
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
1906
|
|
- MonitoringLevel: "", //监控等级
|
1907
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
1908
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
1909
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
1910
|
|
- PharmacistType: "", //药师类别
|
1911
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
1912
|
|
- PharmacistsLicensing: "", //药师执业范围
|
1913
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
1914
|
|
- OfficeCode: "", //科室编码
|
1915
|
|
- JobNumber: "", //工号
|
1916
|
|
- PostName: "", //职位名称
|
1917
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
1918
|
|
- IsActive: "", //在职与否
|
1919
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
1920
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
1921
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
1922
|
|
- StartTime: 1233, //开始日期
|
1923
|
|
- EndTime: 123333,
|
|
1972
|
+ StaffCode: "H27224269", //医护人员编码
|
|
1973
|
+ UserName: item.UserName,
|
|
1974
|
+ RoleId: "1",
|
|
1975
|
+ Sex: "1",
|
|
1976
|
+ CardType: "01",
|
|
1977
|
+ IdCard: "430526199408156511",
|
|
1978
|
+ Phone: "13318464642",
|
|
1979
|
+ WorkMajorName: "医生",
|
|
1980
|
+ Nation: "01",
|
|
1981
|
+ BirthDay: 20201022,
|
|
1982
|
+ WorkTime: 20201022,
|
|
1983
|
+ Education: "21",
|
|
1984
|
+ StudyMajorName: "医生",
|
|
1985
|
+ CertificateCode: "y2222222", //证书编码
|
|
1986
|
+ MedicalCode: "y2222222", //医师资格编码
|
|
1987
|
+ MedicalRangeCode: "101", //医师执业范围代码
|
|
1988
|
+ MedicalLevel: "1", //医生级别
|
|
1989
|
+ TypeJob: "1", //职业类别
|
|
1990
|
+ DoctorNumber: "22222", //医师编号b
|
|
1991
|
+ Licensing: "1", //职业标志
|
|
1992
|
+ DoctorServiceStatus: "1", //医师医保服务资格状态
|
|
1993
|
+ MonitoringLevel: "1", //监控等级
|
|
1994
|
+ DrugPsychotropicSubstances: "1", //毒麻精神药品资格
|
|
1995
|
+ HealthCareCode: "1001", // 母婴保健技术考核合格证书编号
|
|
1996
|
+ PlanningTechnicalServiceCode: "1002", //计划生育技术服务人员合格证编号
|
|
1997
|
+ PharmacistType: "1", //药师类别
|
|
1998
|
+ PharmacistPracticeCategory: "1", //药师执业类别
|
|
1999
|
+ PharmacistsLicensing: "1", //药师执业范围
|
|
2000
|
+ PharmacistRegistrationNumber: "000200", //执业药师注册证编号
|
|
2001
|
+ OfficeCode: "9933", //科室编码
|
|
2002
|
+ JobNumber: "82021344", //工号
|
|
2003
|
+ PostName: "主任", //职位名称
|
|
2004
|
+ TechnicalJobLevelCode: "231", //专业技术职务级别编码
|
|
2005
|
+ IsActive: "1", //在职与否
|
|
2006
|
+ PrescriptionQualificationIdentification: "1", //处方资格标识
|
|
2007
|
+ IdentificationOutpatients: "1", //门诊大病医师标识
|
|
2008
|
+ OutpatientIllnessCategory: "血友病", //门诊大病类别
|
|
2009
|
+ StartTime: 20210311, //开始日期
|
|
2010
|
+ EndTime: 20210313,
|
1924
|
2011
|
}
|
1925
|
2012
|
customs = append(customs, detail)
|
1926
|
2013
|
}
|
|
@@ -1948,7 +2035,89 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
1948
|
2035
|
isSuccess = false
|
1949
|
2036
|
//失败
|
1950
|
2037
|
|
1951
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
2038
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
|
2039
|
+ return
|
|
2040
|
+ }
|
|
2041
|
+ fmt.Println(isSuccess)
|
|
2042
|
+
|
|
2043
|
+ }
|
|
2044
|
+}
|
|
2045
|
+
|
|
2046
|
+func (c *SZHisApiController) GetGoodsList() {
|
|
2047
|
+
|
|
2048
|
+ //获取所有耗材信息
|
|
2049
|
+ list, _ := service.GetGoodInformationList(10028)
|
|
2050
|
+ fmt.Println("list22222", list)
|
|
2051
|
+ //获取单位
|
|
2052
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
2053
|
+ var doctor_name string
|
|
2054
|
+ var doctor_code string
|
|
2055
|
+
|
|
2056
|
+ doctor_name = "黄亦轩"
|
|
2057
|
+ doctor_code = "1001"
|
|
2058
|
+
|
|
2059
|
+ var pagesize int = 50
|
|
2060
|
+ var start int = 1
|
|
2061
|
+ var stop int
|
|
2062
|
+ var pagecount int
|
|
2063
|
+ var curpage int
|
|
2064
|
+ var isSuccess bool = true
|
|
2065
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
2066
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
2067
|
+
|
|
2068
|
+ var ress []*Result
|
|
2069
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
2070
|
+ if curpage == 1 {
|
|
2071
|
+ start = 1
|
|
2072
|
+ } else {
|
|
2073
|
+ start = (curpage-1)*pagesize + 1
|
|
2074
|
+ }
|
|
2075
|
+ stop = curpage * pagesize
|
|
2076
|
+ if stop > len(list) {
|
|
2077
|
+ stop = len(list)
|
|
2078
|
+ }
|
|
2079
|
+ //这里就可以查看开始和结束了
|
|
2080
|
+ fmt.Println(list[start-1 : stop])
|
|
2081
|
+ var customs []*models.GoodDetail
|
|
2082
|
+ for _, item := range list {
|
|
2083
|
+
|
|
2084
|
+ detail := &models.GoodDetail{
|
|
2085
|
+ GoodName: item.GoodName,
|
|
2086
|
+ SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
2087
|
+ ManufacturerName: item.ManufacturerName,
|
|
2088
|
+ ProductionType: item.ProductionType,
|
|
2089
|
+ SpecialMedical: item.SpecialMedical,
|
|
2090
|
+ BuyPrice: item.BuyPrice,
|
|
2091
|
+ SellPrice: item.SellPrice,
|
|
2092
|
+ Remark: item.Remark,
|
|
2093
|
+ }
|
|
2094
|
+ customs = append(customs, detail)
|
|
2095
|
+ }
|
|
2096
|
+
|
|
2097
|
+ result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2098
|
+ fmt.Println("reuslt8888", result)
|
|
2099
|
+ var dat map[string]interface{}
|
|
2100
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2101
|
+ fmt.Println(dat)
|
|
2102
|
+ } else {
|
|
2103
|
+ fmt.Println(err)
|
|
2104
|
+ }
|
|
2105
|
+
|
|
2106
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
2107
|
+
|
|
2108
|
+ var res Result
|
|
2109
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2110
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2111
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2112
|
+ return
|
|
2113
|
+ }
|
|
2114
|
+ if res.Transreturncode == "00000000" {
|
|
2115
|
+ ress = append(ress, &res)
|
|
2116
|
+ } else {
|
|
2117
|
+ isSuccess = false
|
|
2118
|
+ //失败
|
|
2119
|
+
|
|
2120
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1952
|
2121
|
return
|
1953
|
2122
|
}
|
1954
|
2123
|
fmt.Println(isSuccess)
|