|
@@ -253,8 +253,9 @@ func SZHisManagerApiRegistRouters() {
|
253
|
253
|
beego.Router("/sz/api/drug/get", &SZHisApiController{}, "get:GetDrugList")
|
254
|
254
|
//协议机构诊疗项目
|
255
|
255
|
beego.Router("/sz/api/treatment/get", &SZHisApiController{}, "get:GetTreatmentProject")
|
256
|
|
- //协议机构目录
|
|
256
|
+ //协议机构目录备案撤销
|
257
|
257
|
beego.Router("/sz/api/revocation/get", &SZHisApiController{}, "get:GetRevocation")
|
|
258
|
+
|
258
|
259
|
//定点机构约定信息查询
|
259
|
260
|
//beego.Router("/sz/api/information/query/get",&SZHisApiController{},"get:GetInformationQuery")
|
260
|
261
|
//-医药师信息登记
|
|
@@ -263,7 +264,9 @@ func SZHisManagerApiRegistRouters() {
|
263
|
264
|
beego.Router("/sz/api/medical/get", &SZHisApiController{}, "get:GetMedicalList")
|
264
|
265
|
//医药师信息更新
|
265
|
266
|
beego.Router("/sz/api/update/medical/get", &SZHisApiController{}, "get:GetUpdateMedicalList")
|
|
267
|
+ //协议机构材料目录备案
|
266
|
268
|
|
|
269
|
+ beego.Router("/sz/api/goods/get", &SZHisApiController{}, "get:GetGoodsList")
|
267
|
270
|
}
|
268
|
271
|
|
269
|
272
|
func IntPtr(n int) uintptr {
|
|
@@ -1722,21 +1725,23 @@ func ReadCardGetCode(request string) (string, string) {
|
1722
|
1725
|
|
1723
|
1726
|
func (c *SZHisApiController) GetDrugList() {
|
1724
|
1727
|
|
|
1728
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
1729
|
+ orgId := adminUserInfo.CurrentOrgId
|
1725
|
1730
|
//获取药品库数据
|
1726
|
|
- list, _ := service.GetDrugList(10028)
|
|
1731
|
+ list, _ := service.GetDrugList(orgId)
|
1727
|
1732
|
//获取药品剂型
|
1728
|
|
- drugs, _ := service.GetDrugDosageForm(10028)
|
|
1733
|
+ drugs, _ := service.GetDrugDosageForm(orgId)
|
1729
|
1734
|
for _, item := range list {
|
1730
|
1735
|
fmt.Println(item.DrugDosageForm)
|
1731
|
1736
|
for _, it := range drugs {
|
1732
|
|
- fmt.Println("2222", it.Value, it.Name)
|
|
1737
|
+
|
1733
|
1738
|
if item.DrugDosageForm == it.Value {
|
1734
|
1739
|
item.DrugDosageName = it.Name
|
1735
|
1740
|
}
|
1736
|
1741
|
}
|
1737
|
1742
|
}
|
1738
|
1743
|
fmt.Print("list22222222", list)
|
1739
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
1744
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
1740
|
1745
|
var doctor_name string
|
1741
|
1746
|
var doctor_code string
|
1742
|
1747
|
|
|
@@ -1771,15 +1776,15 @@ func (c *SZHisApiController) GetDrugList() {
|
1771
|
1776
|
detail := &models.DrugDetail{
|
1772
|
1777
|
|
1773
|
1778
|
MedicalInsuranceNumber: item.MedicalInsuranceNumber,
|
1774
|
|
- Code: item.Code,
|
1775
|
|
- DrugName: item.DrugName,
|
1776
|
|
- DrugSpec: item.DrugSpec,
|
1777
|
|
- DrugDosageName: item.DrugDosageName,
|
1778
|
|
- ManufacturerName: item.ManufacturerName,
|
1779
|
|
- MinUnit: item.MinUnit,
|
1780
|
|
- RetailPrice: item.RetailPrice,
|
1781
|
|
- LastPrice: item.LastPrice,
|
1782
|
|
- LimitRemark: item.LimitRemark,
|
|
1779
|
+ Code: item.Code,
|
|
1780
|
+ DrugName: item.DrugName,
|
|
1781
|
+ DrugSpec: item.DrugSpec,
|
|
1782
|
+ DrugDosageName: item.DrugDosageName,
|
|
1783
|
+ ManufacturerName: item.ManufacturerName,
|
|
1784
|
+ MinUnit: item.MinUnit,
|
|
1785
|
+ RetailPrice: item.RetailPrice,
|
|
1786
|
+ LastPrice: item.LastPrice,
|
|
1787
|
+ LimitRemark: item.LimitRemark,
|
1783
|
1788
|
}
|
1784
|
1789
|
customs = append(customs, detail)
|
1785
|
1790
|
}
|
|
@@ -1808,7 +1813,7 @@ func (c *SZHisApiController) GetDrugList() {
|
1808
|
1813
|
isSuccess = false
|
1809
|
1814
|
//失败
|
1810
|
1815
|
|
1811
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
1816
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1812
|
1817
|
return
|
1813
|
1818
|
}
|
1814
|
1819
|
fmt.Println(isSuccess)
|
|
@@ -1816,11 +1821,14 @@ func (c *SZHisApiController) GetDrugList() {
|
1816
|
1821
|
}
|
1817
|
1822
|
|
1818
|
1823
|
func (c *SZHisApiController) GetTreatmentProject() {
|
|
1824
|
+ fmt.Println("触发了吗2222222222")
|
|
1825
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
1826
|
+ orgId := adminUserInfo.CurrentOrgId
|
1819
|
1827
|
|
1820
|
1828
|
//获取药品库数据
|
1821
|
|
- list, _ := service.GetDrugList(10028)
|
|
1829
|
+ list, _ := service.GetMyPorjecgList(orgId)
|
1822
|
1830
|
|
1823
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
1831
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
1824
|
1832
|
var doctor_name string
|
1825
|
1833
|
var doctor_code string
|
1826
|
1834
|
|
|
@@ -1849,19 +1857,16 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1849
|
1857
|
}
|
1850
|
1858
|
//这里就可以查看开始和结束了
|
1851
|
1859
|
fmt.Println(list[start-1 : stop])
|
1852
|
|
- var customs []*models.DrugDetail
|
|
1860
|
+ var customs []*models.ProjectDetail
|
1853
|
1861
|
for _, item := range list {
|
1854
|
|
- fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
1855
|
|
- detail := &models.DrugDetail{
|
1856
|
1862
|
|
1857
|
|
- MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
|
1858
|
|
- Code: item.Code, //协议机构内部目录编码
|
1859
|
|
- DrugName: item.DrugName, //协议机构内部目录名称
|
1860
|
|
- DrugSpec: item.DrugSpec,
|
1861
|
|
- ManufacturerName: item.ManufacturerName,
|
1862
|
|
- MinUnit: item.MinUnit,
|
1863
|
|
- RetailPrice: item.RetailPrice, //协议机构内部项目收费价格
|
1864
|
|
- LimitRemark: item.LimitRemark,
|
|
1863
|
+ detail := &models.ProjectDetail{
|
|
1864
|
+
|
|
1865
|
+ SocialSecurityDirectoryCode: item.MedicalCode, //社保目录
|
|
1866
|
+ ProjectName: item.ProjectName,
|
|
1867
|
+ Price: item.Price,
|
|
1868
|
+ Category: strconv.FormatInt(item.Category, 10),
|
|
1869
|
+ Remark: item.Remark,
|
1865
|
1870
|
}
|
1866
|
1871
|
customs = append(customs, detail)
|
1867
|
1872
|
}
|
|
@@ -1888,7 +1893,7 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1888
|
1893
|
isSuccess = false
|
1889
|
1894
|
//失败
|
1890
|
1895
|
|
1891
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
1896
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
1892
|
1897
|
return
|
1893
|
1898
|
}
|
1894
|
1899
|
fmt.Println(isSuccess)
|
|
@@ -1897,10 +1902,294 @@ func (c *SZHisApiController) GetTreatmentProject() {
|
1897
|
1902
|
|
1898
|
1903
|
func (c *SZHisApiController) GetRevocation() {
|
1899
|
1904
|
|
1900
|
|
- //获取药品库数据
|
1901
|
|
- list, _ := service.GetDrugList(10028)
|
|
1905
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
1906
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
1907
|
+ id, _ := c.GetInt64("id")
|
|
1908
|
+ //用来区分是药品的撤销还是耗材的撤销 1.药品 2.诊疗项目 3.材料 5.辅助器具项目
|
|
1909
|
+
|
|
1910
|
+ type_id, _ := c.GetInt64("type_id")
|
|
1911
|
+ fmt.Println("type_id2222222", type_id)
|
|
1912
|
+ if type_id == 1 {
|
|
1913
|
+ //获取药品库数据
|
|
1914
|
+ list, _ := service.GetDrugListByDetail(orgId, id)
|
|
1915
|
+
|
|
1916
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
1917
|
+ var doctor_name string
|
|
1918
|
+ var doctor_code string
|
|
1919
|
+
|
|
1920
|
+ doctor_name = "黄亦轩"
|
|
1921
|
+ doctor_code = "1001"
|
|
1922
|
+
|
|
1923
|
+ var pagesize int = 50
|
|
1924
|
+ var start int = 1
|
|
1925
|
+ var stop int
|
|
1926
|
+ var pagecount int
|
|
1927
|
+ var curpage int
|
|
1928
|
+ var isSuccess bool = true
|
|
1929
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
1930
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
1931
|
+
|
|
1932
|
+ var ress []*Result
|
|
1933
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
1934
|
+ if curpage == 1 {
|
|
1935
|
+ start = 1
|
|
1936
|
+ } else {
|
|
1937
|
+ start = (curpage-1)*pagesize + 1
|
|
1938
|
+ }
|
|
1939
|
+ stop = curpage * pagesize
|
|
1940
|
+ if stop > len(list) {
|
|
1941
|
+ stop = len(list)
|
|
1942
|
+ }
|
|
1943
|
+ //这里就可以查看开始和结束了
|
|
1944
|
+ fmt.Println(list[start-1 : stop])
|
|
1945
|
+ var customs []*models.DrugDetail
|
|
1946
|
+ for _, item := range list {
|
|
1947
|
+ fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
|
1948
|
+ detail := &models.DrugDetail{
|
|
1949
|
+
|
|
1950
|
+ MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
|
|
1951
|
+ Code: item.Code, //协议机构内部目录编码
|
|
1952
|
+ DrugName: item.DrugName, //协议机构内部目录名称
|
|
1953
|
+ DrugSpec: item.DrugSpec,
|
|
1954
|
+ ManufacturerName: item.ManufacturerName,
|
|
1955
|
+ MinUnit: item.MinUnit,
|
|
1956
|
+ RetailPrice: item.RetailPrice, //协议机构内部项目收费价格
|
|
1957
|
+ LimitRemark: item.LimitRemark,
|
|
1958
|
+ }
|
|
1959
|
+ customs = append(customs, detail)
|
|
1960
|
+ }
|
|
1961
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
1962
|
+ fmt.Println("reuslt", result)
|
|
1963
|
+ var dat map[string]interface{}
|
|
1964
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
1965
|
+ fmt.Println(dat)
|
|
1966
|
+ } else {
|
|
1967
|
+ fmt.Println(err)
|
|
1968
|
+ }
|
|
1969
|
+
|
|
1970
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
1971
|
+
|
|
1972
|
+ var res Result
|
|
1973
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
1974
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
1975
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
1976
|
+ return
|
|
1977
|
+ }
|
|
1978
|
+ if res.Transreturncode == "00000000" {
|
|
1979
|
+ ress = append(ress, &res)
|
|
1980
|
+ } else {
|
|
1981
|
+ isSuccess = false
|
|
1982
|
+ //失败
|
|
1983
|
+
|
|
1984
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
1985
|
+ return
|
|
1986
|
+ }
|
|
1987
|
+ fmt.Println(isSuccess)
|
|
1988
|
+ }
|
|
1989
|
+
|
|
1990
|
+ if type_id == 2 {
|
|
1991
|
+
|
|
1992
|
+ //获取药品库数据
|
|
1993
|
+ list, _ := service.GetMyPorjecgListDetail(orgId, id)
|
|
1994
|
+
|
|
1995
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
1996
|
+ var doctor_name string
|
|
1997
|
+ var doctor_code string
|
1902
|
1998
|
|
1903
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
1999
|
+ doctor_name = "黄亦轩"
|
|
2000
|
+ doctor_code = "1001"
|
|
2001
|
+
|
|
2002
|
+ var pagesize int = 50
|
|
2003
|
+ var start int = 1
|
|
2004
|
+ var stop int
|
|
2005
|
+ var pagecount int
|
|
2006
|
+ var curpage int
|
|
2007
|
+ var isSuccess bool = true
|
|
2008
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
2009
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
2010
|
+
|
|
2011
|
+ var ress []*Result
|
|
2012
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
2013
|
+ if curpage == 1 {
|
|
2014
|
+ start = 1
|
|
2015
|
+ } else {
|
|
2016
|
+ start = (curpage-1)*pagesize + 1
|
|
2017
|
+ }
|
|
2018
|
+ stop = curpage * pagesize
|
|
2019
|
+ if stop > len(list) {
|
|
2020
|
+ stop = len(list)
|
|
2021
|
+ }
|
|
2022
|
+ //这里就可以查看开始和结束了
|
|
2023
|
+ fmt.Println(list[start-1 : stop])
|
|
2024
|
+ var customs []*models.DrugDetail
|
|
2025
|
+ for _, item := range list {
|
|
2026
|
+ detail := &models.DrugDetail{
|
|
2027
|
+ SocialSecurityDirectoryCode: item.MedicalCode,
|
|
2028
|
+ }
|
|
2029
|
+ customs = append(customs, detail)
|
|
2030
|
+ }
|
|
2031
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
2032
|
+ fmt.Println("reuslt", result)
|
|
2033
|
+ var dat map[string]interface{}
|
|
2034
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2035
|
+ fmt.Println(dat)
|
|
2036
|
+ } else {
|
|
2037
|
+ fmt.Println(err)
|
|
2038
|
+ }
|
|
2039
|
+
|
|
2040
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
2041
|
+
|
|
2042
|
+ var res Result
|
|
2043
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2044
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2045
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2046
|
+ return
|
|
2047
|
+ }
|
|
2048
|
+ if res.Transreturncode == "00000000" {
|
|
2049
|
+ ress = append(ress, &res)
|
|
2050
|
+ } else {
|
|
2051
|
+ isSuccess = false
|
|
2052
|
+ //失败
|
|
2053
|
+
|
|
2054
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
2055
|
+ return
|
|
2056
|
+ }
|
|
2057
|
+ fmt.Println(isSuccess)
|
|
2058
|
+ }
|
|
2059
|
+ }
|
|
2060
|
+
|
|
2061
|
+ if type_id == 3 {
|
|
2062
|
+
|
|
2063
|
+ //获取药品库数据
|
|
2064
|
+ list, _ := service.GetGoodListByDetail(orgId, id)
|
|
2065
|
+
|
|
2066
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
|
2067
|
+ var doctor_name string
|
|
2068
|
+ var doctor_code string
|
|
2069
|
+
|
|
2070
|
+ doctor_name = "黄亦轩"
|
|
2071
|
+ doctor_code = "1001"
|
|
2072
|
+
|
|
2073
|
+ var pagesize int = 50
|
|
2074
|
+ var start int = 1
|
|
2075
|
+ var stop int
|
|
2076
|
+ var pagecount int
|
|
2077
|
+ var curpage int
|
|
2078
|
+ var isSuccess bool = true
|
|
2079
|
+ //总页数,向上取整,注意除之前要先转换类型为float64
|
|
2080
|
+ pagecount = int(math.Ceil(float64(len(list)) / float64(pagesize)))
|
|
2081
|
+
|
|
2082
|
+ var ress []*Result
|
|
2083
|
+ for curpage = 1; curpage <= pagecount; curpage++ {
|
|
2084
|
+ if curpage == 1 {
|
|
2085
|
+ start = 1
|
|
2086
|
+ } else {
|
|
2087
|
+ start = (curpage-1)*pagesize + 1
|
|
2088
|
+ }
|
|
2089
|
+ stop = curpage * pagesize
|
|
2090
|
+ if stop > len(list) {
|
|
2091
|
+ stop = len(list)
|
|
2092
|
+ }
|
|
2093
|
+ //这里就可以查看开始和结束了
|
|
2094
|
+ fmt.Println(list[start-1 : stop])
|
|
2095
|
+ var customs []*models.DrugDetail
|
|
2096
|
+ for _, item := range list {
|
|
2097
|
+ fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
|
2098
|
+ detail := &models.DrugDetail{
|
|
2099
|
+ SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
2100
|
+ ManufacturerName: item.ManufacturerName,
|
|
2101
|
+ }
|
|
2102
|
+ customs = append(customs, detail)
|
|
2103
|
+ }
|
|
2104
|
+ result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs, type_id)
|
|
2105
|
+ fmt.Println("reuslt", result)
|
|
2106
|
+ var dat map[string]interface{}
|
|
2107
|
+ if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2108
|
+ fmt.Println(dat)
|
|
2109
|
+ } else {
|
|
2110
|
+ fmt.Println(err)
|
|
2111
|
+ }
|
|
2112
|
+
|
|
2113
|
+ userJSONBytes, _ := json.Marshal(dat)
|
|
2114
|
+
|
|
2115
|
+ var res Result
|
|
2116
|
+ if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2117
|
+ utils.ErrorLog("解析失败:%v", err)
|
|
2118
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2119
|
+ return
|
|
2120
|
+ }
|
|
2121
|
+ if res.Transreturncode == "00000000" {
|
|
2122
|
+ ress = append(ress, &res)
|
|
2123
|
+ } else {
|
|
2124
|
+ isSuccess = false
|
|
2125
|
+ //失败
|
|
2126
|
+
|
|
2127
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
|
2128
|
+ return
|
|
2129
|
+ }
|
|
2130
|
+ fmt.Println(isSuccess)
|
|
2131
|
+ }
|
|
2132
|
+
|
|
2133
|
+ }
|
|
2134
|
+
|
|
2135
|
+ }
|
|
2136
|
+
|
|
2137
|
+ //func (c *SZHisApiController) GetInformationQuery() {
|
|
2138
|
+ //
|
|
2139
|
+ // var doctor_name string
|
|
2140
|
+ // var doctor_code string
|
|
2141
|
+ //
|
|
2142
|
+ // doctor_name = "黄亦轩"
|
|
2143
|
+ // doctor_code = "1001"
|
|
2144
|
+ // miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
2145
|
+ // result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2146
|
+ // fmt.Println("reuslt9999999999999999", result)
|
|
2147
|
+ // var dat map[string]interface{}
|
|
2148
|
+ // if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
2149
|
+ // fmt.Println(dat)
|
|
2150
|
+ // } else {
|
|
2151
|
+ // fmt.Println(err)
|
|
2152
|
+ // }
|
|
2153
|
+ //
|
|
2154
|
+ // userJSONBytes, _ := json.Marshal(dat)
|
|
2155
|
+ //
|
|
2156
|
+ // var res Result
|
|
2157
|
+ // if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
2158
|
+ // utils.ErrorLog("解析失败:%v", err)
|
|
2159
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
2160
|
+ // return
|
|
2161
|
+ // }
|
|
2162
|
+ // if res.Transreturncode == "00000000" {
|
|
2163
|
+ // ress = append(ress, &res)
|
|
2164
|
+ // } else {
|
|
2165
|
+ // isSuccess = false
|
|
2166
|
+ // //失败
|
|
2167
|
+ //
|
|
2168
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
2169
|
+ // return
|
|
2170
|
+ // }
|
|
2171
|
+ // fmt.Println(isSuccess)
|
|
2172
|
+ //
|
|
2173
|
+ //}
|
|
2174
|
+}
|
|
2175
|
+func (c *SZHisApiController) GetDoctorList() {
|
|
2176
|
+
|
|
2177
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
2178
|
+ orgid := adminUserInfo.CurrentOrgId
|
|
2179
|
+ fmt.Println("or3gi", orgid)
|
|
2180
|
+ //获取所有医生护士信息
|
|
2181
|
+ list, _ := service.GetDoctorList(9671)
|
|
2182
|
+ //获取所有角色名称
|
|
2183
|
+ roleList, _ := service.GetRoleList(9671)
|
|
2184
|
+
|
|
2185
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(9671)
|
|
2186
|
+ for _, item := range list {
|
|
2187
|
+ for _, it := range roleList {
|
|
2188
|
+ if item.RoleId == it.ID {
|
|
2189
|
+ item.Name = it.RoleName
|
|
2190
|
+ }
|
|
2191
|
+ }
|
|
2192
|
+ }
|
1904
|
2193
|
var doctor_name string
|
1905
|
2194
|
var doctor_code string
|
1906
|
2195
|
|
|
@@ -1929,23 +2218,56 @@ func (c *SZHisApiController) GetRevocation() {
|
1929
|
2218
|
}
|
1930
|
2219
|
//这里就可以查看开始和结束了
|
1931
|
2220
|
fmt.Println(list[start-1 : stop])
|
1932
|
|
- var customs []*models.DrugDetail
|
|
2221
|
+ var customs []*models.DocDetail
|
1933
|
2222
|
for _, item := range list {
|
1934
|
|
- fmt.Println("医疗机构编码", item.MedicalInsuranceNumber)
|
1935
|
|
- detail := &models.DrugDetail{
|
|
2223
|
+ fmt.Println("医护类别", item.Name)
|
|
2224
|
+ sex := strconv.FormatInt(item.Sex, 10)
|
|
2225
|
+ card_type := strconv.FormatInt(item.CardType, 10)
|
|
2226
|
+ is_active := strconv.FormatInt(item.IsActive, 10)
|
1936
|
2227
|
|
1937
|
|
- MedicalInsuranceNumber: item.MedicalInsuranceNumber, //社保目录
|
1938
|
|
- Code: item.Code, //协议机构内部目录编码
|
1939
|
|
- DrugName: item.DrugName, //协议机构内部目录名称
|
1940
|
|
- DrugSpec: item.DrugSpec,
|
1941
|
|
- ManufacturerName: item.ManufacturerName,
|
1942
|
|
- MinUnit: item.MinUnit,
|
1943
|
|
- RetailPrice: item.RetailPrice, //协议机构内部项目收费价格
|
1944
|
|
- LimitRemark: item.LimitRemark,
|
|
2228
|
+ detail := &models.DocDetail{
|
|
2229
|
+ UserName: item.UserName,
|
|
2230
|
+ RoleId: item.Name,
|
|
2231
|
+ Sex: sex,
|
|
2232
|
+ CardType: card_type,
|
|
2233
|
+ IdCard: item.IdCard,
|
|
2234
|
+ Phone: "",
|
|
2235
|
+ WorkMajorName: item.WorkMajorName,
|
|
2236
|
+ Nation: item.Nation,
|
|
2237
|
+ BirthDay: 20201022,
|
|
2238
|
+ WorkTime: 12,
|
|
2239
|
+ Education: strconv.FormatInt(item.Education, 10),
|
|
2240
|
+ StudyMajorName: item.StudyMajorName,
|
|
2241
|
+ CertificateCode: "", //证书编码
|
|
2242
|
+ MedicalCode: item.MedicalCode, //医师资格编码
|
|
2243
|
+ MedicalRangeCode: strconv.FormatInt(item.MedicalRangeCode, 10), //医师执业范围代码
|
|
2244
|
+ MedicalLevel: strconv.FormatInt(item.MedicalLevel, 10), //医生级别
|
|
2245
|
+ TypeJob: strconv.FormatInt(item.DoctorTypeJob, 10), //职业类别
|
|
2246
|
+ DoctorNumber: item.DoctorNumber, //医师编号
|
|
2247
|
+ Licensing: strconv.FormatInt(item.Licensing, 10), //职业标志
|
|
2248
|
+ DoctorServiceStatus: "", //医师医保服务资格状态
|
|
2249
|
+ MonitoringLevel: "", //监控等级
|
|
2250
|
+ DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
|
2251
|
+ HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
|
2252
|
+ PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
|
2253
|
+ PharmacistType: "", //药师类别
|
|
2254
|
+ PharmacistPracticeCategory: "", //药师执业类别
|
|
2255
|
+ PharmacistsLicensing: "", //药师执业范围
|
|
2256
|
+ PharmacistRegistrationNumber: item.PharmacistRegistrationNumber, //执业药师注册证编号
|
|
2257
|
+ OfficeCode: "", //科室编码
|
|
2258
|
+ JobNumber: item.JobNumber, //工号
|
|
2259
|
+ PostName: "", //职位名称
|
|
2260
|
+ TechnicalJobLevelCode: "", //专业技术职务级别编码
|
|
2261
|
+ IsActive: is_active, //在职与否
|
|
2262
|
+ PrescriptionQualificationIdentification: item.PharmacistRegistrationNumber, //处方资格标识
|
|
2263
|
+ IdentificationOutpatients: "", //门诊大病医师标识
|
|
2264
|
+ OutpatientIllnessCategory: item.OutpatientIllnessCategory, //门诊大病类别
|
|
2265
|
+ StartTime: 1233, //开始日期
|
1945
|
2266
|
}
|
1946
|
2267
|
customs = append(customs, detail)
|
1947
|
2268
|
}
|
1948
|
|
- result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2269
|
+
|
|
2270
|
+ result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, customs)
|
1949
|
2271
|
fmt.Println("reuslt9999999999999999", result)
|
1950
|
2272
|
var dat map[string]interface{}
|
1951
|
2273
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
@@ -1968,59 +2290,27 @@ func (c *SZHisApiController) GetRevocation() {
|
1968
|
2290
|
isSuccess = false
|
1969
|
2291
|
//失败
|
1970
|
2292
|
|
1971
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
2293
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDoctorLoginFaildParamWrong)
|
1972
|
2294
|
return
|
1973
|
2295
|
}
|
1974
|
2296
|
fmt.Println(isSuccess)
|
1975
|
2297
|
}
|
|
2298
|
+
|
1976
|
2299
|
}
|
1977
|
2300
|
|
1978
|
|
-//func (c *SZHisApiController) GetInformationQuery() {
|
1979
|
|
-//
|
1980
|
|
-// var doctor_name string
|
1981
|
|
-// var doctor_code string
|
1982
|
|
-//
|
1983
|
|
-// doctor_name = "黄亦轩"
|
1984
|
|
-// doctor_code = "1001"
|
1985
|
|
-// miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
1986
|
|
-// result := service.SzybML010(doctor_name, doctor_code, miConfig.Code, customs)
|
1987
|
|
-// fmt.Println("reuslt9999999999999999", result)
|
1988
|
|
-// var dat map[string]interface{}
|
1989
|
|
-// if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
1990
|
|
-// fmt.Println(dat)
|
1991
|
|
-// } else {
|
1992
|
|
-// fmt.Println(err)
|
1993
|
|
-// }
|
1994
|
|
-//
|
1995
|
|
-// userJSONBytes, _ := json.Marshal(dat)
|
1996
|
|
-//
|
1997
|
|
-// var res Result
|
1998
|
|
-// if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
1999
|
|
-// utils.ErrorLog("解析失败:%v", err)
|
2000
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
2001
|
|
-// return
|
2002
|
|
-// }
|
2003
|
|
-// if res.Transreturncode == "00000000" {
|
2004
|
|
-// ress = append(ress, &res)
|
2005
|
|
-// } else {
|
2006
|
|
-// isSuccess = false
|
2007
|
|
-// //失败
|
2008
|
|
-//
|
2009
|
|
-// c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
2010
|
|
-// return
|
2011
|
|
-// }
|
2012
|
|
-// fmt.Println(isSuccess)
|
2013
|
|
-//
|
2014
|
|
-//}
|
|
2301
|
+func (c *SZHisApiController) GetMedicalList() {
|
2015
|
2302
|
|
2016
|
|
-func (c *SZHisApiController) GetDoctorList() {
|
|
2303
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
2304
|
+ orgId := adminUserInfo.CurrentOrgId
|
2017
|
2305
|
|
|
2306
|
+ id, _ := c.GetInt64("id")
|
|
2307
|
+ fmt.Println("id22222222", id)
|
2018
|
2308
|
//获取所有医生护士信息
|
2019
|
|
- list, _ := service.GetDoctorList(10028)
|
|
2309
|
+ list, _ := service.GetDoctorListByDetail(orgId, id)
|
2020
|
2310
|
//获取所有角色名称
|
2021
|
|
- roleList, _ := service.GetRoleList(10028)
|
|
2311
|
+ roleList, _ := service.GetRoleList(orgId)
|
2022
|
2312
|
|
2023
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
2313
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2024
|
2314
|
for _, item := range list {
|
2025
|
2315
|
for _, it := range roleList {
|
2026
|
2316
|
if item.RoleId == it.ID {
|
|
@@ -2060,48 +2350,50 @@ func (c *SZHisApiController) GetDoctorList() {
|
2060
|
2350
|
for _, item := range list {
|
2061
|
2351
|
fmt.Println("医护类别", item.Name)
|
2062
|
2352
|
detail := &models.DocDetail{
|
2063
|
|
- UserName: item.UserName,
|
2064
|
|
- RoleId: item.Name,
|
2065
|
|
- Sex: "",
|
2066
|
|
- CardType: "",
|
2067
|
|
- IdCard: "",
|
2068
|
|
- Phone: "",
|
2069
|
|
- WorkMajorName: "",
|
2070
|
|
- Nation: "",
|
2071
|
|
- BirthDay: 20201022,
|
2072
|
|
- WorkTime: 12,
|
2073
|
|
- Education: "",
|
2074
|
|
- StudyMajorName: "",
|
2075
|
|
- CertificateCode: "", //证书编码
|
2076
|
|
- MedicalCode: "", //医师资格编码
|
2077
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
2078
|
|
- MedicalLevel: "", //医生级别
|
2079
|
|
- TypeJob: "", //职业类别
|
2080
|
|
- DoctorNumber: "", //医师编号
|
2081
|
|
- Licensing: "", //职业标志
|
2082
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
2083
|
|
- MonitoringLevel: "", //监控等级
|
2084
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
2085
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
2086
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
2087
|
|
- PharmacistType: "", //药师类别
|
2088
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
2089
|
|
- PharmacistsLicensing: "", //药师执业范围
|
2090
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
2091
|
|
- OfficeCode: "", //科室编码
|
2092
|
|
- JobNumber: "", //工号
|
2093
|
|
- PostName: "", //职位名称
|
2094
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
2095
|
|
- IsActive: "", //在职与否
|
2096
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
2097
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
2098
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
2099
|
|
- StartTime: 1233, //开始日期
|
|
2353
|
+ StaffCode: "H27224269",
|
|
2354
|
+ UserName: item.UserName,
|
|
2355
|
+ RoleId: item.Name,
|
|
2356
|
+ Sex: "1",
|
|
2357
|
+ CardType: "01",
|
|
2358
|
+ IdCard: "430526199408156511",
|
|
2359
|
+ Phone: "13318464642",
|
|
2360
|
+ WorkMajorName: "医生",
|
|
2361
|
+ Nation: "01",
|
|
2362
|
+ BirthDay: 20201022,
|
|
2363
|
+ WorkTime: 20201022,
|
|
2364
|
+ Education: "21",
|
|
2365
|
+ StudyMajorName: "医生",
|
|
2366
|
+ CertificateCode: "y2222222", //证书编码
|
|
2367
|
+ MedicalCode: "y2222222", //医师资格编码
|
|
2368
|
+ MedicalRangeCode: "101", //医师执业范围代码
|
|
2369
|
+ MedicalLevel: "1", //医生级别
|
|
2370
|
+ TypeJob: "1", //职业类别
|
|
2371
|
+ DoctorNumber: "22222", //医师编号b
|
|
2372
|
+ Licensing: "1", //职业标志
|
|
2373
|
+ DoctorServiceStatus: "1", //医师医保服务资格状态
|
|
2374
|
+ MonitoringLevel: "1", //监控等级
|
|
2375
|
+ DrugPsychotropicSubstances: "1", //毒麻精神药品资格
|
|
2376
|
+ HealthCareCode: "1001", // 母婴保健技术考核合格证书编号
|
|
2377
|
+ PlanningTechnicalServiceCode: "1002", //计划生育技术服务人员合格证编号
|
|
2378
|
+ PharmacistType: "1", //药师类别
|
|
2379
|
+ PharmacistPracticeCategory: "1", //药师执业类别
|
|
2380
|
+ PharmacistsLicensing: "1", //药师执业范围
|
|
2381
|
+ PharmacistRegistrationNumber: "000200", //执业药师注册证编号
|
|
2382
|
+ OfficeCode: "9933", //科室编码
|
|
2383
|
+ JobNumber: "82021344", //工号
|
|
2384
|
+ PostName: "主任", //职位名称
|
|
2385
|
+ TechnicalJobLevelCode: "231", //专业技术职务级别编码
|
|
2386
|
+ IsActive: "1", //在职与否
|
|
2387
|
+ PrescriptionQualificationIdentification: "1", //处方资格标识
|
|
2388
|
+ IdentificationOutpatients: "1", //门诊大病医师标识
|
|
2389
|
+ OutpatientIllnessCategory: "血友病", //门诊大病类别
|
|
2390
|
+ StartTime: 20210311, //开始日期
|
|
2391
|
+
|
2100
|
2392
|
}
|
2101
|
2393
|
customs = append(customs, detail)
|
2102
|
2394
|
}
|
2103
|
2395
|
|
2104
|
|
- result := service.SzybYS001(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2396
|
+ result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, customs)
|
2105
|
2397
|
fmt.Println("reuslt9999999999999999", result)
|
2106
|
2398
|
var dat map[string]interface{}
|
2107
|
2399
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
@@ -2124,7 +2416,7 @@ func (c *SZHisApiController) GetDoctorList() {
|
2124
|
2416
|
isSuccess = false
|
2125
|
2417
|
//失败
|
2126
|
2418
|
|
2127
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
2419
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugReturnFaildParamWrong)
|
2128
|
2420
|
return
|
2129
|
2421
|
}
|
2130
|
2422
|
fmt.Println(isSuccess)
|
|
@@ -2132,14 +2424,16 @@ func (c *SZHisApiController) GetDoctorList() {
|
2132
|
2424
|
}
|
2133
|
2425
|
}
|
2134
|
2426
|
|
2135
|
|
-func (c *SZHisApiController) GetMedicalList() {
|
|
2427
|
+func (c *SZHisApiController) GetUpdateMedicalList() {
|
2136
|
2428
|
|
|
2429
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
2430
|
+ orgId := adminUserInfo.CurrentOrgId
|
2137
|
2431
|
//获取所有医生护士信息
|
2138
|
|
- list, _ := service.GetDoctorList(10028)
|
|
2432
|
+ list, _ := service.GetDoctorList(orgId)
|
2139
|
2433
|
//获取所有角色名称
|
2140
|
|
- roleList, _ := service.GetRoleList(10028)
|
|
2434
|
+ roleList, _ := service.GetRoleList(orgId)
|
2141
|
2435
|
|
2142
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
|
2436
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2143
|
2437
|
for _, item := range list {
|
2144
|
2438
|
for _, it := range roleList {
|
2145
|
2439
|
if item.RoleId == it.ID {
|
|
@@ -2179,48 +2473,50 @@ func (c *SZHisApiController) GetMedicalList() {
|
2179
|
2473
|
for _, item := range list {
|
2180
|
2474
|
fmt.Println("医护类别", item.Name)
|
2181
|
2475
|
detail := &models.DocDetail{
|
2182
|
|
- UserName: item.UserName,
|
2183
|
|
- RoleId: item.Name,
|
2184
|
|
- Sex: "",
|
2185
|
|
- CardType: "",
|
2186
|
|
- IdCard: "",
|
2187
|
|
- Phone: "",
|
2188
|
|
- WorkMajorName: "",
|
2189
|
|
- Nation: "",
|
2190
|
|
- BirthDay: 20201022,
|
2191
|
|
- WorkTime: 12,
|
2192
|
|
- Education: "",
|
2193
|
|
- StudyMajorName: "",
|
2194
|
|
- CertificateCode: "", //证书编码
|
2195
|
|
- MedicalCode: "", //医师资格编码
|
2196
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
2197
|
|
- MedicalLevel: "", //医生级别
|
2198
|
|
- TypeJob: "", //职业类别
|
2199
|
|
- DoctorNumber: "", //医师编号
|
2200
|
|
- Licensing: "", //职业标志
|
2201
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
2202
|
|
- MonitoringLevel: "", //监控等级
|
2203
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
2204
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
2205
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
2206
|
|
- PharmacistType: "", //药师类别
|
2207
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
2208
|
|
- PharmacistsLicensing: "", //药师执业范围
|
2209
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
2210
|
|
- OfficeCode: "", //科室编码
|
2211
|
|
- JobNumber: "", //工号
|
2212
|
|
- PostName: "", //职位名称
|
2213
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
2214
|
|
- IsActive: "", //在职与否
|
2215
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
2216
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
2217
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
2218
|
|
- StartTime: 1233, //开始日期
|
|
2476
|
+ StaffCode: "", //医护人员编码
|
|
2477
|
+ UserName: item.UserName, //医护人员姓名
|
|
2478
|
+ RoleId: item.Name, //医护人员类别
|
|
2479
|
+ Sex: "", //性别
|
|
2480
|
+ CardType: "", //证件类型
|
|
2481
|
+ IdCard: "", //证件号码
|
|
2482
|
+ Phone: "", //联系电话
|
|
2483
|
+ WorkMajorName: "", //现从事专业名称
|
|
2484
|
+ Nation: "", //民族
|
|
2485
|
+ BirthDay: 20201022, //出生日期
|
|
2486
|
+ WorkTime: 12, //参加工作日期
|
|
2487
|
+ Education: "", //学历
|
|
2488
|
+ StudyMajorName: "", //所学的专业名称
|
|
2489
|
+ CertificateCode: "", //证书编码
|
|
2490
|
+ MedicalCode: "", //医师资格编码
|
|
2491
|
+ MedicalRangeCode: "", //医师执业范围代码
|
|
2492
|
+ MedicalLevel: "", //医生级别
|
|
2493
|
+ TypeJob: "", //职业类别
|
|
2494
|
+ DoctorNumber: "", //医师编号
|
|
2495
|
+ Licensing: "", //职业标志
|
|
2496
|
+ DoctorServiceStatus: "", //医师医保服务资格状态
|
|
2497
|
+ MonitoringLevel: "", //监控等级
|
|
2498
|
+ DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
|
2499
|
+ HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
|
2500
|
+ PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
|
2501
|
+ PharmacistType: "", //药师类别
|
|
2502
|
+ PharmacistPracticeCategory: "", //药师执业类别
|
|
2503
|
+ PharmacistsLicensing: "", //药师执业范围
|
|
2504
|
+ PharmacistRegistrationNumber: "", //执业药师注册证编号
|
|
2505
|
+ OfficeCode: "", //科室编码
|
|
2506
|
+ JobNumber: "", //工号
|
|
2507
|
+ PostName: "", //职位名称
|
|
2508
|
+ TechnicalJobLevelCode: "", //专业技术职务级别编码
|
|
2509
|
+ IsActive: "", //在职与否
|
|
2510
|
+ PrescriptionQualificationIdentification: "", //处方资格标识
|
|
2511
|
+ IdentificationOutpatients: "", //门诊大病医师标识
|
|
2512
|
+ OutpatientIllnessCategory: "", //门诊大病类别
|
|
2513
|
+ StartTime: 1233, //开始日期
|
|
2514
|
+ EndTime: 123333,
|
2219
|
2515
|
}
|
2220
|
2516
|
customs = append(customs, detail)
|
2221
|
2517
|
}
|
2222
|
2518
|
|
2223
|
|
- result := service.SzybYS002(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2519
|
+ result := service.SzybYS003(doctor_name, doctor_code, miConfig.Code, customs)
|
2224
|
2520
|
fmt.Println("reuslt9999999999999999", result)
|
2225
|
2521
|
var dat map[string]interface{}
|
2226
|
2522
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
|
@@ -2243,7 +2539,7 @@ func (c *SZHisApiController) GetMedicalList() {
|
2243
|
2539
|
isSuccess = false
|
2244
|
2540
|
//失败
|
2245
|
2541
|
|
2246
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
2542
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
2247
|
2543
|
return
|
2248
|
2544
|
}
|
2249
|
2545
|
fmt.Println(isSuccess)
|
|
@@ -2251,21 +2547,15 @@ func (c *SZHisApiController) GetMedicalList() {
|
2251
|
2547
|
}
|
2252
|
2548
|
}
|
2253
|
2549
|
|
2254
|
|
-func (c *SZHisApiController) GetUpdateMedicalList() {
|
|
2550
|
+func (c *SZHisApiController) GetGoodsList() {
|
2255
|
2551
|
|
2256
|
|
- //获取所有医生护士信息
|
2257
|
|
- list, _ := service.GetDoctorList(10028)
|
2258
|
|
- //获取所有角色名称
|
2259
|
|
- roleList, _ := service.GetRoleList(10028)
|
2260
|
|
-
|
2261
|
|
- miConfig, _ := service.FindMedicalInsuranceInfo(10028)
|
2262
|
|
- for _, item := range list {
|
2263
|
|
- for _, it := range roleList {
|
2264
|
|
- if item.RoleId == it.ID {
|
2265
|
|
- item.Name = it.RoleName
|
2266
|
|
- }
|
2267
|
|
- }
|
2268
|
|
- }
|
|
2552
|
+ adminUserInfo := c.GetAdminUserInfo()
|
|
2553
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
2554
|
+ //获取所有耗材信息
|
|
2555
|
+ list, _ := service.GetGoodInformationList(orgId)
|
|
2556
|
+ fmt.Println("list22222", list)
|
|
2557
|
+ //获取单位
|
|
2558
|
+ miConfig, _ := service.FindMedicalInsuranceInfo(orgId)
|
2269
|
2559
|
var doctor_name string
|
2270
|
2560
|
var doctor_code string
|
2271
|
2561
|
|
|
@@ -2294,55 +2584,24 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
2294
|
2584
|
}
|
2295
|
2585
|
//这里就可以查看开始和结束了
|
2296
|
2586
|
fmt.Println(list[start-1 : stop])
|
2297
|
|
- var customs []*models.DocDetail
|
|
2587
|
+ var customs []*models.GoodDetail
|
2298
|
2588
|
for _, item := range list {
|
2299
|
|
- fmt.Println("医护类别", item.Name)
|
2300
|
|
- detail := &models.DocDetail{
|
2301
|
|
- StaffCode: "", //医护人员编码
|
2302
|
|
- UserName: item.UserName, //医护人员姓名
|
2303
|
|
- RoleId: item.Name, //医护人员类别
|
2304
|
|
- Sex: "", //性别
|
2305
|
|
- CardType: "", //证件类型
|
2306
|
|
- IdCard: "", //证件号码
|
2307
|
|
- Phone: "", //联系电话
|
2308
|
|
- WorkMajorName: "", //现从事专业名称
|
2309
|
|
- Nation: "", //民族
|
2310
|
|
- BirthDay: 20201022, //出生日期
|
2311
|
|
- WorkTime: 12, //参加工作日期
|
2312
|
|
- Education: "", //学历
|
2313
|
|
- StudyMajorName: "", //所学的专业名称
|
2314
|
|
- CertificateCode: "", //证书编码
|
2315
|
|
- MedicalCode: "", //医师资格编码
|
2316
|
|
- MedicalRangeCode: "", //医师执业范围代码
|
2317
|
|
- MedicalLevel: "", //医生级别
|
2318
|
|
- TypeJob: "", //职业类别
|
2319
|
|
- DoctorNumber: "", //医师编号
|
2320
|
|
- Licensing: "", //职业标志
|
2321
|
|
- DoctorServiceStatus: "", //医师医保服务资格状态
|
2322
|
|
- MonitoringLevel: "", //监控等级
|
2323
|
|
- DrugPsychotropicSubstances: "", //毒麻精神药品资格
|
2324
|
|
- HealthCareCode: "", // 母婴保健技术考核合格证书编号
|
2325
|
|
- PlanningTechnicalServiceCode: "", //计划生育技术服务人员合格证编号
|
2326
|
|
- PharmacistType: "", //药师类别
|
2327
|
|
- PharmacistPracticeCategory: "", //药师执业类别
|
2328
|
|
- PharmacistsLicensing: "", //药师执业范围
|
2329
|
|
- PharmacistRegistrationNumber: "", //执业药师注册证编号
|
2330
|
|
- OfficeCode: "", //科室编码
|
2331
|
|
- JobNumber: "", //工号
|
2332
|
|
- PostName: "", //职位名称
|
2333
|
|
- TechnicalJobLevelCode: "", //专业技术职务级别编码
|
2334
|
|
- IsActive: "", //在职与否
|
2335
|
|
- PrescriptionQualificationIdentification: "", //处方资格标识
|
2336
|
|
- IdentificationOutpatients: "", //门诊大病医师标识
|
2337
|
|
- OutpatientIllnessCategory: "", //门诊大病类别
|
2338
|
|
- StartTime: 1233, //开始日期
|
2339
|
|
- EndTime: 123333,
|
|
2589
|
+
|
|
2590
|
+ detail := &models.GoodDetail{
|
|
2591
|
+ GoodName: item.GoodName,
|
|
2592
|
+ SocialSecurityDirectoryCode: item.SocialSecurityDirectoryCode,
|
|
2593
|
+ ManufacturerName: item.ManufacturerName,
|
|
2594
|
+ ProductionType: item.ProductionType,
|
|
2595
|
+ SpecialMedical: item.SpecialMedical,
|
|
2596
|
+ BuyPrice: item.BuyPrice,
|
|
2597
|
+ SellPrice: item.SellPrice,
|
|
2598
|
+ Remark: item.Remark,
|
2340
|
2599
|
}
|
2341
|
2600
|
customs = append(customs, detail)
|
2342
|
2601
|
}
|
2343
|
2602
|
|
2344
|
|
- result := service.SzybYS003(doctor_name, doctor_code, miConfig.Code, customs)
|
2345
|
|
- fmt.Println("reuslt9999999999999999", result)
|
|
2603
|
+ result := service.SzybYML007(doctor_name, doctor_code, miConfig.Code, customs)
|
|
2604
|
+ fmt.Println("reuslt8888", result)
|
2346
|
2605
|
var dat map[string]interface{}
|
2347
|
2606
|
if err := json.Unmarshal([]byte(result), &dat); err == nil {
|
2348
|
2607
|
fmt.Println(dat)
|
|
@@ -2364,7 +2623,7 @@ func (c *SZHisApiController) GetUpdateMedicalList() {
|
2364
|
2623
|
isSuccess = false
|
2365
|
2624
|
//失败
|
2366
|
2625
|
|
2367
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePreSettleFaildParamWrong)
|
|
2626
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorDrugPreSettleFaildParamWrong)
|
2368
|
2627
|
return
|
2369
|
2628
|
}
|
2370
|
2629
|
fmt.Println(isSuccess)
|