|
@@ -1615,11 +1615,12 @@ func (c *SZHisApiController) GetDrugList() {
|
1615
|
1615
|
}
|
1616
|
1616
|
|
1617
|
1617
|
func (c *SZHisApiController) GetTreatmentProject() {
|
|
1618
|
+ fmt.Println("触发了吗2222222222")
|
1618
|
1619
|
adminUserInfo := c.GetAdminUserInfo()
|
1619
|
1620
|
orgId := adminUserInfo.CurrentOrgId
|
1620
|
1621
|
|
1621
|
1622
|
//获取药品库数据
|
1622
|
|
- list, _ := service.GetDrugList(orgId)
|
|
1623
|
+ list, _ := service.GetMyPorjecgList(orgId)
|
1623
|
1624
|
|
1624
|
1625
|
miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
1625
|
1626
|
var doctor_name string
|
|
@@ -1650,19 +1651,16 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1650
|
1651
|
}
|
1651
|
1652
|
//这里就可以查看开始和结束了
|
1652
|
1653
|
fmt.Println(list[start-1 : stop])
|
1653
|
|
- var customs []*models.DrugDetail
|
|
1654
|
+ var customs []*models.ProjectDetail
|
1654
|
1655
|
for _, item := range list {
|
1655
|
|
- fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
1656
|
|
- detail := &models.DrugDetail{
|
1657
|
1656
|
|
1658
|
|
- MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
|
1659
|
|
- Code: item.Code, //协议机构内部目录编码
|
1660
|
|
- DrugName: item.DrugName, //协议机构内部目录名称
|
1661
|
|
- DrugSpec: item.DrugSpec,
|
1662
|
|
- ManufacturerName: item.ManufacturerName,
|
1663
|
|
- MinUnit: item.MinUnit,
|
1664
|
|
- RetailPrice: item.RetailPrice, //协议机构内部项目收费价格
|
1665
|
|
- LimitRemark: item.LimitRemark,
|
|
1657
|
+ detail := &models.ProjectDetail{
|
|
1658
|
+
|
|
1659
|
+ SocialSecurityDirectoryCode: item.MedicalCode, //社保目录
|
|
1660
|
+ ProjectName: item.ProjectName,
|
|
1661
|
+ Price: item.Price,
|
|
1662
|
+ Category: strconv.FormatInt(item.Category, 10),
|
|
1663
|
+ Remark: item.Remark,
|
1666
|
1664
|
}
|
1667
|
1665
|
customs = append(customs, detail)
|
1668
|
1666
|
}
|
|
@@ -1783,6 +1781,77 @@ func (c *SZHisApiController) GetRevocation() {
|
1783
|
1781
|
fmt.Println(isSuccess)
|
1784
|
1782
|
}
|
1785
|
1783
|
|
|
1784
|
+ if type_id == 2 {
|
|
1785
|
+
|
|
1786
|
+ //获取药品库数据
|
|
1787
|
+ list, _ := service.GetMyPorjecgListDetail(orgId, id)
|
|
1788
|
+
|
|
1789
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
1790
|
+ var doctor_name string
|
|
1791
|
+ var doctor_code string
|
|
1792
|
+
|
|
1793
|
+ doctor_name = "黄亦轩"
|
|
1794
|
+ doctor_code = "1001"
|
|
1795
|
+
|
|
1796
|
+ var pagesize int = 50
|
|
1797
|
+ var start int = 1
|
|
1798
|
+ var stop int
|
|
1799
|
+ var pagecount int
|
|
1800
|
+ var curpage int
|
|
1801
|
+ var isSuccess bool = true
|
|
1802
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
1803
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
1804
|
+
|
|
1805
|
+ var ress []*Result
|
|
1806
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
1807
|
+ if curpage == 1 {
|
|
1808
|
+ start = 1
|
|
1809
|
+ } else {
|
|
1810
|
+ start = (curpage-1)*pagesize + 1
|
|
1811
|
+ }
|
|
1812
|
+ stop = curpage * pagesize
|
|
1813
|
+ if stop > len(list) {
|
|
1814
|
+ stop = len(list)
|
|
1815
|
+ }
|
|
1816
|
+ //这里就可以查看开始和结束了
|
|
1817
|
+ fmt.Println(list[start-1 : stop])
|
|
1818
|
+ var customs []*models.DrugDetail
|
|
1819
|
+ for _, item := range list {
|
|
1820
|
+ detail := &models.DrugDetail{
|
|
1821
|
+ SocialSecurityDirectoryCode: item.MedicalCode,
|
|
1822
|
+ }
|
|
1823
|
+ customs = append(customs, detail)
|
|
1824
|
+ }
|
|
1825
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
1826
|
+ fmt.Println("reuslt", result)
|
|
1827
|
+ var dat map[string]interface{}
|
|
1828
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
1829
|
+ fmt.Println(dat)
|
|
1830
|
+ } else {
|
|
1831
|
+ fmt.Println(err)
|
|
1832
|
+ }
|
|
1833
|
+
|
|
1834
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
1835
|
+
|
|
1836
|
+ var res Result
|
|
1837
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
1838
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
1839
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1840
|
+ return
|
|
1841
|
+ }
|
|
1842
|
+ if res.Transreturncode == "00000000" {
|
|
1843
|
+ ress = append(ress, &res)
|
|
1844
|
+ } else {
|
|
1845
|
+ isSuccess = false
|
|
1846
|
+ //失败
|
|
1847
|
+
|
|
1848
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
1849
|
+ return
|
|
1850
|
+ }
|
|
1851
|
+ fmt.Println(isSuccess)
|
|
1852
|
+ }
|
|
1853
|
+ }
|
|
1854
|
+
|
1786
|
1855
|
if type_id == 3 {
|
1787
|
1856
|
|
1788
|
1857
|
//获取药品库数据
|
|
@@ -1903,11 +1972,11 @@ func (c *SZHisApiController) GetDoctorList() {
|
1903
|
1972
|
orgid := adminUserInfo.CurrentOrgId
|
1904
|
1973
|
fmt.Println("or3gi", orgid)
|
1905
|
1974
|
//获取所有医生护士信息
|
1906
|
|
- list, _ := service.GetDoctorList(orgid)
|
|
1975
|
+ list, _ := service.GetDoctorList(9671)
|
1907
|
1976
|
//获取所有角色名称
|
1908
|
|
- roleList, _ := service.GetRoleList(orgid)
|
|
1977
|
+ roleList, _ := service.GetRoleList(9671)
|
1909
|
1978
|
|
1910
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(orgid)
|
|
1979
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(9671)
|
1911
|
1980
|
for _, item := range list {
|
1912
|
1981
|
for _, it := range roleList {
|
1913
|
1982
|
if item.RoleId == it.ID {
|
|
@@ -1946,44 +2015,48 @@ func (c *SZHisApiController) GetDoctorList() {
|
1946
|
2015
|
var customs []*models.DocDetail
|
1947
|
2016
|
for _, item := range list {
|
1948
|
2017
|
fmt.Println("医护类别", item.Name)
|
|
2018
|
+ sex := strconv.FormatInt(item.Sex, 10)
|
|
2019
|
+ card_type := strconv.FormatInt(item.CardType, 10)
|
|
2020
|
+ is_active := strconv.FormatInt(item.IsActive, 10)
|
|
2021
|
+
|
1949
|
2022
|
detail := &models.DocDetail{
|
1950
|
2023
|
UserName: item.UserName,
|
1951
|
2024
|
RoleId: item.Name,
|
1952
|
|
- Sex: "",
|
1953
|
|
- CardType: "",
|
1954
|
|
- IdCard: "",
|
|
2025
|
+ Sex: sex,
|
|
2026
|
+ CardType: card_type,
|
|
2027
|
+ IdCard: item.IdCard,
|
1955
|
2028
|
Phone: "",
|
1956
|
|
- WorkMajorName: "",
|
1957
|
|
- Nation: "",
|
|
2029
|
+ WorkMajorName: item.WorkMajorName,
|
|
2030
|
+ Nation: item.Nation,
|
1958
|
2031
|
BirthDay: 20201022,
|
1959
|
2032
|
WorkTime: 12,
|
1960
|
|
- Education: "",
|
1961
|
|
- StudyMajorName: "",
|
1962
|
|
- CertificateCode: "", //证书编码
|
1963
|
|
- MedicalCode: "", //医师资格编码
|
1964
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
1965
|
|
- MedicalLevel: "", //医生级别
|
1966
|
|
- TypeJob: "", //职业类别
|
1967
|
|
- DoctorNumber: "", //医师编号
|
1968
|
|
- Licensing: "", //职业标志
|
1969
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
1970
|
|
- MonitoringLevel: "", //监控等级
|
1971
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
1972
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
1973
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
1974
|
|
- PharmacistType: "", //药师类别
|
1975
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
1976
|
|
- PharmacistsLicensing: "", //药师执业范围
|
1977
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
1978
|
|
- OfficeCode: "", //科室编码
|
1979
|
|
- JobNumber: "", //工号
|
1980
|
|
- PostName: "", //职位名称
|
1981
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
1982
|
|
- IsActive: "", //在职与否
|
1983
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
1984
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
1985
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
1986
|
|
- StartTime: 1233, //开始日期
|
|
2033
|
+ Education: strconv.FormatInt(item.Education, 10),
|
|
2034
|
+ StudyMajorName: item.StudyMajorName,
|
|
2035
|
+ CertificateCode: "", //证书编码
|
|
2036
|
+ MedicalCode: item.MedicalCode, //医师资格编码
|
|
2037
|
+ MedicalRangeCode: strconv.FormatInt(item.MedicalRangeCode, 10), //医师执业范围代码
|
|
2038
|
+ MedicalLevel: strconv.FormatInt(item.MedicalLevel, 10), //医生级别
|
|
2039
|
+ TypeJob: strconv.FormatInt(item.DoctorTypeJob, 10), //职业类别
|
|
2040
|
+ DoctorNumber: item.DoctorNumber, //医师编号
|
|
2041
|
+ Licensing: strconv.FormatInt(item.Licensing, 10), //职业标志
|
|
2042
|
+ DoctorServiceStatus: "", //医师医保服务资格状态
|
|
2043
|
+ MonitoringLevel: "", //监控等级
|
|
2044
|
+ DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
|
2045
|
+ HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
|
2046
|
+ PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
|
2047
|
+ PharmacistType: "", //药师类别
|
|
2048
|
+ PharmacistPracticeCategory: "", //药师执业类别
|
|
2049
|
+ PharmacistsLicensing: "", //药师执业范围
|
|
2050
|
+ PharmacistRegistrationNumber: item.PharmacistRegistrationNumber, //执业药师注册证编号
|
|
2051
|
+ OfficeCode: "", //科室编码
|
|
2052
|
+ JobNumber: item.JobNumber, //工号
|
|
2053
|
+ PostName: "", //职位名称
|
|
2054
|
+ TechnicalJobLevelCode: "", //专业技术职务级别编码
|
|
2055
|
+ IsActive: is_active, //在职与否
|
|
2056
|
+ PrescriptionQualificationIdentification: item.PharmacistRegistrationNumber, //处方资格标识
|
|
2057
|
+ IdentificationOutpatients: "", //门诊大病医师标识
|
|
2058
|
+ OutpatientIllnessCategory: item.OutpatientIllnessCategory, //门诊大病类别
|
|
2059
|
+ StartTime: 1233, //开始日期
|
1987
|
2060
|
}
|
1988
|
2061
|
customs = append(customs, detail)
|
1989
|
2062
|
}
|
|
@@ -2023,8 +2096,11 @@ func (c *SZHisApiController) GetMedicalList() {
|
2023
|
2096
|
|
2024
|
2097
|
adminUserInfo := c.GetAdminUserInfo()
|
2025
|
2098
|
orgId := adminUserInfo.CurrentOrgId
|
|
2099
|
+
|
|
2100
|
+ id, _ := c.GetInt64("id")
|
|
2101
|
+ fmt.Println("id22222222", id)
|
2026
|
2102
|
//获取所有医生护士信息
|
2027
|
|
- list, _ := service.GetDoctorList(orgId)
|
|
2103
|
+ list, _ := service.GetDoctorListByDetail(orgId, id)
|
2028
|
2104
|
//获取所有角色名称
|
2029
|
2105
|
roleList, _ := service.GetRoleList(orgId)
|
2030
|
2106
|
|
|
@@ -2134,7 +2210,7 @@ func (c *SZHisApiController) GetMedicalList() {
|
2134
|
2210
|
isSuccess = false
|
2135
|
2211
|
//失败
|
2136
|
2212
|
|
2137
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
|
2213
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
2138
|
2214
|
return
|
2139
|
2215
|
}
|
2140
|
2216
|
fmt.Println(isSuccess)
|