|
@@ -1772,6 +1772,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
1772
|
1772
|
newprescribe.ID = dialysisPrescription.ID
|
1773
|
1773
|
|
1774
|
1774
|
if dialysisPrescription.ID == 0 {
|
|
1775
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
1776
|
+ newprescribe.Sodium = 138
|
|
1777
|
+ newprescribe.Bicarbonate = 31.1
|
|
1778
|
+ newprescribe.DialysateFlow = 500
|
|
1779
|
+ }
|
1775
|
1780
|
err := service.AddSigleRecord(&newprescribe)
|
1776
|
1781
|
//获取key,清空redis
|
1777
|
1782
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
@@ -1797,6 +1802,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
1797
|
1802
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
1798
|
1803
|
}
|
1799
|
1804
|
} else {
|
|
1805
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
1806
|
+ newprescribe.Sodium = 138
|
|
1807
|
+ newprescribe.Bicarbonate = 31.1
|
|
1808
|
+ newprescribe.DialysateFlow = 500
|
|
1809
|
+ }
|
1800
|
1810
|
err := service.UpDateDialysisPrescription(&newprescribe)
|
1801
|
1811
|
//获取key,清空redis
|
1802
|
1812
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
@@ -1879,6 +1889,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
1879
|
1889
|
_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
|
1880
|
1890
|
newprescribe.ID = dialysisPrescription.ID
|
1881
|
1891
|
if dialysisPrescription.ID == 0 {
|
|
1892
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
1893
|
+ newprescribe.Sodium = 138
|
|
1894
|
+ newprescribe.Bicarbonate = 31.1
|
|
1895
|
+ newprescribe.DialysateFlow = 500
|
|
1896
|
+ }
|
1882
|
1897
|
err := service.AddSigleRecord(&newprescribe)
|
1883
|
1898
|
//获取key,清空redis
|
1884
|
1899
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
@@ -1900,7 +1915,7 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
1900
|
1915
|
|
1901
|
1916
|
keySeven := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":dialysis_prescribe_by_mode"
|
1902
|
1917
|
redis.Set(keySeven, "", time.Second)
|
1903
|
|
- fmt.Println("处方2222222222")
|
|
1918
|
+
|
1904
|
1919
|
if err != nil {
|
1905
|
1920
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
1906
|
1921
|
}
|
|
@@ -1987,9 +2002,13 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
1987
|
2002
|
_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
|
1988
|
2003
|
newprescribe.ID = dialysisPrescription.ID
|
1989
|
2004
|
if dialysisPrescription.ID == 0 {
|
|
2005
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
2006
|
+ newprescribe.Sodium = 138
|
|
2007
|
+ newprescribe.Bicarbonate = 31.1
|
|
2008
|
+ newprescribe.DialysateFlow = 500
|
|
2009
|
+ }
|
1990
|
2010
|
err := service.AddSigleRecord(&newprescribe)
|
1991
|
2011
|
|
1992
|
|
- fmt.Println("处方2222222222")
|
1993
|
2012
|
//获取key,清空redis
|
1994
|
2013
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
1995
|
2014
|
redis := service.RedisClient()
|
|
@@ -2014,6 +2033,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
2014
|
2033
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
2015
|
2034
|
}
|
2016
|
2035
|
} else {
|
|
2036
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
2037
|
+ newprescribe.Sodium = 138
|
|
2038
|
+ newprescribe.Bicarbonate = 31.1
|
|
2039
|
+ newprescribe.DialysateFlow = 500
|
|
2040
|
+ }
|
2017
|
2041
|
err := service.UpDateDialysisPrescription(&newprescribe)
|
2018
|
2042
|
//获取key,清空redis
|
2019
|
2043
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
|
@@ -2058,8 +2082,13 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
2058
|
2082
|
_, dialysisPrescription := service.FindDialysisPrescriptionByReordDate(id, theAssessmentDateTime, adminUserInfo.Org.Id)
|
2059
|
2083
|
newprescribe.ID = dialysisPrescription.ID
|
2060
|
2084
|
if dialysisPrescription.ID == 0 {
|
|
2085
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
2086
|
+ newprescribe.Sodium = 138
|
|
2087
|
+ newprescribe.Bicarbonate = 31.1
|
|
2088
|
+ newprescribe.DialysateFlow = 500
|
|
2089
|
+ }
|
2061
|
2090
|
err := service.AddSigleRecord(&newprescribe)
|
2062
|
|
- fmt.Println("处方44444444444")
|
|
2091
|
+
|
2063
|
2092
|
//获取key,清空redis
|
2064
|
2093
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|
2065
|
2094
|
redis := service.RedisClient()
|
|
@@ -2084,6 +2113,11 @@ func (c *PatientApiController) EditAssessmentBeforeDislysis() {
|
2084
|
2113
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCommitFail)
|
2085
|
2114
|
}
|
2086
|
2115
|
} else {
|
|
2116
|
+ if adminUserInfo.Org.Id == 10340 {
|
|
2117
|
+ newprescribe.Sodium = 138
|
|
2118
|
+ newprescribe.Bicarbonate = 31.1
|
|
2119
|
+ newprescribe.DialysateFlow = 500
|
|
2120
|
+ }
|
2087
|
2121
|
err := service.UpDateDialysisPrescription(&newprescribe)
|
2088
|
2122
|
//获取key,清空redis
|
2089
|
2123
|
key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(id, 10) + ":" + strconv.FormatInt(theAssessmentDateTime, 10) + ":" + strconv.FormatInt(mode_id, 10) + ":dialysis_prescribe"
|