|
@@ -1939,16 +1939,53 @@ func (c *HisApiController) GetRegisterInfo() {
|
1939
|
1939
|
IdCardNo = patient.IdCardNo
|
1940
|
1940
|
}
|
1941
|
1941
|
|
|
1942
|
+ //var insutypes []string
|
|
1943
|
+ //
|
|
1944
|
+ //var insutype string
|
|
1945
|
+ //var is390 int = 0
|
|
1946
|
+ //var is310 int = 0
|
|
1947
|
+ //for _, item := range res.Output.Iinfo {
|
|
1948
|
+ // if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
|
|
1949
|
+ // insutypes = append(insutypes, item.Insutype)
|
|
1950
|
+ // }
|
|
1951
|
+ //}
|
|
1952
|
+ //if len(insutypes) == 1 {
|
|
1953
|
+ // insutype = insutypes[0]
|
|
1954
|
+ //} else {
|
|
1955
|
+ // for _, i := range insutypes {
|
|
1956
|
+ // if i == "390" {
|
|
1957
|
+ // is390 = 1
|
|
1958
|
+ // }
|
|
1959
|
+ //
|
|
1960
|
+ // if i == "310" {
|
|
1961
|
+ // is310 = 1
|
|
1962
|
+ // }
|
|
1963
|
+ // }
|
|
1964
|
+ //}
|
|
1965
|
+ //if is390 == 1 {
|
|
1966
|
+ // insutype = "390"
|
|
1967
|
+ //}
|
|
1968
|
+ //if is310 == 1 {
|
|
1969
|
+ // insutype = "310"
|
|
1970
|
+ //}
|
|
1971
|
+ //
|
|
1972
|
+ //if len(insutypes) == 0 {
|
|
1973
|
+ // insutype = "310"
|
|
1974
|
+ //}
|
|
1975
|
+
|
|
1976
|
+ var rf []*ResultFive
|
|
1977
|
+ json.Unmarshal([]byte(his.Iinfo), &rf)
|
1942
|
1978
|
var insutypes []string
|
1943
|
|
-
|
1944
|
1979
|
var insutype string
|
1945
|
1980
|
var is390 int = 0
|
1946
|
1981
|
var is310 int = 0
|
1947
|
|
- for _, item := range res.Output.Iinfo {
|
|
1982
|
+
|
|
1983
|
+ for _, item := range rf {
|
1948
|
1984
|
if (item.Insutype == "390" && item.PsnInsuStas == "1") || (item.Insutype == "310" && item.PsnInsuStas == "1") {
|
1949
|
1985
|
insutypes = append(insutypes, item.Insutype)
|
1950
|
1986
|
}
|
1951
|
1987
|
}
|
|
1988
|
+
|
1952
|
1989
|
if len(insutypes) == 1 {
|
1953
|
1990
|
insutype = insutypes[0]
|
1954
|
1991
|
} else {
|
|
@@ -1965,6 +2002,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
1965
|
2002
|
if is390 == 1 {
|
1966
|
2003
|
insutype = "390"
|
1967
|
2004
|
}
|
|
2005
|
+
|
1968
|
2006
|
if is310 == 1 {
|
1969
|
2007
|
insutype = "310"
|
1970
|
2008
|
}
|