|
@@ -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
|
+
|
|
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)
|