本文整理汇总了Python中EMR_utilities.valuesUpdateData方法的典型用法代码示例。如果您正苦于以下问题:Python EMR_utilities.valuesUpdateData方法的具体用法?Python EMR_utilities.valuesUpdateData怎么用?Python EMR_utilities.valuesUpdateData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EMR_utilities
的用法示例。
在下文中一共展示了EMR_utilities.valuesUpdateData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnSign
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import valuesUpdateData [as 别名]
def OnSign(self, event):
#check to see if note has already been signed
checkQry = 'SELECT stamp FROM notes WHERE patient_ID = "%s" AND date = "%s";' % (self.PtID, self.textctrl['Date'].GetValue())
nullCheck = EMR_utilities.getData(checkQry)
try:
if nullCheck[0]:
wx.MessageBox('Note has already been signed.', 'Message')
else:
#get user
prnt = wx.GetTopLevelParent(self)
userQry = EMR_utilities.getData('SELECT full_name FROM users WHERE user_name = "%s";' % prnt.user)
#add signed text at bottom of note
note = self.soapNote.GetValue() + '\n\n' + 'ELECTRONICALLY SIGNED BY %s ON %s' % (userQry[0], str(EMR_utilities.dateToday(t='sql')))
#use timestamper
cli = timestamping.ts_client.TimeStampClient('http://198.199.64.101:8000')
data = str(self.PtID) + note + self.textctrl['Date'].GetValue()
val = cli.stamp(data)
#update the record for that note to include utctime and stamp
noteQry = 'UPDATE notes SET soap = %s, utctime = %s, stamp = %s WHERE patient_ID = %s AND date = %s'
values = (note, val['utctime'], val['stamp'], self.PtID, self.textctrl['Date'].GetValue())
EMR_utilities.valuesUpdateData(noteQry, values)
self.listctrl.Set("")
self.loadList()
except:
# catch *all* exceptions
e0 = sys.exc_info()[0]
e1 = sys.exc_info()[1]
wx.MessageBox("Error: %s, %s" % (e0, e1))
示例2: OnSave
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import valuesUpdateData [as 别名]
def OnSave(self, event):
if self.textctrl['ICD #1'].GetValue():
#look to see which note is being saved, new vs old
prnt = wx.GetTopLevelParent(self)
if self.newsoapNote.IsShownOnScreen():
qry = 'INSERT INTO notes (patient_ID, soap, date, icd1, icd2, icd3, icd4, icd5, \
icd6, icd7, icd8, icd9, icd10, not_billable, user) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)'
values = (self.PtID, self.newsoapNote.GetValue(), EMR_utilities.strToDate(self.textctrl['Date'].GetValue()),
self.textctrl['ICD #1'].GetValue(), self.textctrl['ICD #2'].GetValue(),
self.textctrl['ICD #3'].GetValue(), self.textctrl['ICD #4'].GetValue(),
self.textctrl['ICD #5'].GetValue(), self.textctrl['ICD #6'].GetValue(),
self.textctrl['ICD #7'].GetValue(), self.textctrl['ICD #8'].GetValue(),
self.textctrl['ICD #9'].GetValue(), self.textctrl['ICD #10'].GetValue(),self.not_billable, prnt.user)
EMR_utilities.valuesUpdateData(qry, values)
else:
#check to see if note has already been signed
checkQry = 'SELECT stamp FROM notes WHERE patient_ID = "%s" AND date = "%s";' % (self.PtID, self.textctrl['Date'].GetValue())
nullCheck = EMR_utilities.getData(checkQry)
if nullCheck[0]:
wx.MessageBox('No changes allowed; note has already been signed.', 'Message')
else:
qry = 'UPDATE notes SET soap = %s, user = %s WHERE patient_ID = %s AND date = %s'
values = (self.soapNote.GetValue(), prnt.user, self.PtID, self.textctrl['Date'].GetValue())
EMR_utilities.valuesUpdateData(qry, values)
self.listctrl.Set("")
self.loadList()
self.textctrl['Date'].SetValue("")
self.soapNote.SetValue("")
self.newsoapNote.SetValue("")
self.billBtn.Show(True)
else:
wx.MessageBox('You forgot to enter an ICD-9 Code', 'Grave Mistake!')
示例3: OnSave
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import valuesUpdateData [as 别名]
def OnSave(self, event):
# look to see which note is being saved, new vs old
if self.neweducNote.IsShownOnScreen():
qry = "INSERT INTO education (patient_ID, note, date) VALUES (%s, %s, %s)"
values = (self.PtID, self.neweducNote.GetValue(), EMR_utilities.strToDate(self.textctrl["Date"].GetValue()))
EMR_utilities.valuesUpdateData(qry, values)
else:
qry = "UPDATE education SET note = %s WHERE patient_ID = %s AND date = %s"
values = (self.educNote.GetValue(), self.PtID, self.textctrl["Date"].GetValue())
EMR_utilities.valuesUpdateData(qry, values)
self.listctrl.Set("")
self.loadList()
self.textctrl["Date"].SetValue("")
self.educNote.SetValue("")
self.neweducNote.SetValue("")