本文整理汇总了Python中EMR_utilities.strToDate方法的典型用法代码示例。如果您正苦于以下问题:Python EMR_utilities.strToDate方法的具体用法?Python EMR_utilities.strToDate怎么用?Python EMR_utilities.strToDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EMR_utilities
的用法示例。
在下文中一共展示了EMR_utilities.strToDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnSave
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import strToDate [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!')
示例2: OnSave
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import strToDate [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("")