当前位置: 首页>>代码示例>>Python>>正文


Python EMR_utilities.updateData方法代码示例

本文整理汇总了Python中EMR_utilities.updateData方法的典型用法代码示例。如果您正苦于以下问题:Python EMR_utilities.updateData方法的具体用法?Python EMR_utilities.updateData怎么用?Python EMR_utilities.updateData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EMR_utilities的用法示例。


在下文中一共展示了EMR_utilities.updateData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: OnArchMed

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
 def OnArchMed(self, event):		#need add/edit form pulled up on selected meds, update query, requery meds 
     #open AddEditMed form with selected/checked med filled in
     obj = self.list.GetSelectedObjects()
     for items in obj:
         qry = 'UPDATE meds SET archive = 1 WHERE med_number = %s;' % items['med_number']
         self.list.RemoveObject(items)
         EMR_utilities.updateData(qry)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:9,代码来源:Meds.py

示例2: OnOk

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnOk(self, event):
	qry = 'INSERT INTO todo SET date = "%s", description = "%s", priority = "%s", category = "%s", memo = "%s", due_date = "%s", complete = "0", patient_ID = %s;' % (self.textctrl['Date'].GetValue(), 
		     self.textctrl['Description'].GetValue(), self.textctrl['Priority'].GetValue(), 
		     self.textctrl['Category'].GetValue(), self.textctrl['Memo'].GetValue(), 
		     self.textctrl['Due Date'].GetValue(), self.PtID)
	EMR_utilities.updateData(qry)	
	EMR_utilities.updateList(todo_find(self.PtID), self.List)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:9,代码来源:ToDo.py

示例3: OnEditPt

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnEditPt(self, event):
	self.textctrl['Insurance Co'].SetValue(self.insChoice.GetStringSelection())
	checkBoxes = ''
	if self.adv_dirYesRB.GetValue() == True:
	    checkBoxes = ' adv_dir = "1",'
	elif self.adv_dirNoRB.GetValue() == True:
	    checkBoxes = ' adv_dir = "2",'
	else:
	    checkBoxes = ' adv_dir = "0",'
	if self.proxyBox.IsChecked():
	    checkBoxes = checkBoxes + ' proxy = "1",'
	else:
	    checkBoxes = checkBoxes + ' proxy = "0",'
	if self.marriedBox.IsChecked():
	    checkBoxes = checkBoxes + ' marital_status = "1",'
	else:
	    checkBoxes = checkBoxes + ' marital_status = "0",'
	if self.inactiveBox.IsChecked():
	    checkBoxes = checkBoxes + ' inactive = "1",'
	else:
	    checkBoxes = checkBoxes + ' inactive = "0",'
	qry = 'UPDATE demographics SET' + checkBoxes
	for label, size, field in self.labels:
	    qry = ' '.join([qry, '%s = "%s",' % (field, self.textctrl[label].GetValue())])
	qry = qry.rstrip(',') + ' WHERE patient_ID = %s;' % (self.ptID)
	EMR_utilities.updateData(qry)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:28,代码来源:demographics.py

示例4: OnAddPt

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnAddPt(self, event):
	self.textctrl['Insurance Co'].SetValue(self.insChoice.GetStringSelection())
	checkBoxes = ''
	if self.adv_dirYesRB.GetValue() == True:
	    checkBoxes = ' adv_dir = "1",'
	elif self.adv_dirNoRB.GetValue() == True:
	    checkBoxes = ' adv_dir = "2",'
	else: 
	    checkBoxes = ' adv_dir = "0",'
	if self.proxyBox.IsChecked():
	    checkBoxes = checkBoxes + ' proxy = "1",'
	if self.marriedBox.IsChecked():
	    checkBoxes = checkBoxes + ' marital_status = "1",'
	qry = 'INSERT INTO demographics SET' + checkBoxes
	for label, size, field in self.labels:
	    qry = ' '.join([qry, '%s = "%s",' % (field, self.textctrl[label].GetValue())])
	qry = qry.rstrip(',') + ';'
	#check to make sure patient doesn't already exist
	dupCheck = 'SELECT firstname, lastname, dob FROM demographics WHERE firstname = "%s" AND lastname = "%s";' \
		% (self.textctrl['First Name'].GetValue(), self.textctrl['Last Name'].GetValue())
	dupResults = EMR_utilities.getData(dupCheck)
	if dupResults:
	    wx.MessageBox("A patient with this name already exists.", 'DUPLICATE', wx.OK)
	else:
	    EMR_utilities.updateData(qry)
	    pt_ID = EMR_utilities.getData("SELECT LAST_INSERT_ID();")
	    UpdoxImporter.Importer(str(pt_ID[0]))
开发者ID:barronmo,项目名称:gecko_emr,代码行数:29,代码来源:demographics.py

示例5: add_consultant

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def add_consultant(self, evt):
        qry = "INSERT INTO consultants SET firstname = '%s', lastname = '%s', address = '%s', city = '%s', state = '%s', zipcode = '%s', phone = '%s', fax = '%s', specialty = '%s';" % \
		(self.textctrl['firstname'].GetValue(), self.textctrl['lastname'].GetValue(), self.textctrl['address'].GetValue(), \
		self.textctrl['city'].GetValue(), self.textctrl['state'].GetValue(), self.textctrl['zipcode'].GetValue(), \
		self.textctrl['phonenumber'].GetValue(), self.textctrl['fax'].GetValue(), self.textctrl['specialty'].GetValue())
	EMR_utilities.updateData(qry)
	self.consultant = self.textctrl['firstname'].GetValue() + ' ' + self.textctrl['lastname'].GetValue() + ','
	self.addSpecialist = 1	#tells whether Add Consultant button has been pushed
开发者ID:barronmo,项目名称:gecko_emr,代码行数:10,代码来源:ToDo.py

示例6: OnComplete

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnComplete(self, event):
	num = self.todo_list.GetItemCount()
	for i in range(num):
            if i == 0: pass
            if self.todo_list.IsChecked(i):
		qry = 'UPDATE todo SET complete = 1 WHERE todo_number = %s;' % (self.todo_list.GetItem(i, 7).GetText())
		EMR_utilities.updateData(qry)
		self.todo_list.DeleteItem(i)	
开发者ID:barronmo,项目名称:gecko_emr,代码行数:10,代码来源:ToDo.py

示例7: OnRemove

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnRemove(self, event):
	
	num = self.todo_list.GetItemCount()
	for i in range(num):
            if i == 0: pass
            if self.todo_list.IsChecked(i):
		qry = 'DELETE FROM todo WHERE todo_number = %s;' % (self.todo_list.GetItem(i, 7).GetText())
		EMR_utilities.updateData(qry)
		self.todo_list.DeleteItem(i)		
开发者ID:barronmo,项目名称:gecko_emr,代码行数:11,代码来源:ToDo.py

示例8: OnNewAll

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnNewAll(self, event):
	allergy = wx.GetTextFromUser('What is the patient allergic to?', 'New Allergy')
	if allergy == "": pass
	else:
	    reaction = wx.GetTextFromUser('What happened?', 'Reaction')
	    query = 'INSERT INTO allergies SET allergy = "%s", reaction = "%s", patient_ID = %s;' % \
			(allergy, reaction, self.ptID)
	    EMR_utilities.updateData(query)
	    self.UpdateAllergy()
开发者ID:barronmo,项目名称:gecko_emr,代码行数:11,代码来源:Meds.py

示例9: OnNewProb

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
 def OnNewProb(self, event):
     #opens dialog window with fields for new problem, does lookup based on description only, updates MySQL,
     #then clears the list and resets the lists with new query for problems
     dlg = AddProblemDialog(self, self, -1, 'New Problem')
     dlg.ProbInstance = self
     dlg.CenterOnScreen()
     if dlg.ShowModal() == wx.ID_OK:
         today = datetime.date.today()
         newICD = EMR_utilities.getData('SELECT icd10 FROM ICD10billable WHERE short_des = "%s";' % self.problem)
         query = 'INSERT INTO problems10 SET short_des = "%s", prob_date = "%s", patient_ID = "%s", icd10 = "%s";' % \
             (self.problem, today, self.ptID, newICD[0])
         EMR_utilities.updateData(query)
         self.UpdateList()
     dlg.Destroy()
开发者ID:barronmo,项目名称:gecko_emr,代码行数:16,代码来源:Problems.py

示例10: OnEdit

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnEdit(self, event):
	num = self.todo_list.GetItemCount()
	items = []
	n = 0
	for i in range(num):
            if i == 0: pass
            if self.todo_list.IsChecked(i):
		qry = 'DELETE FROM todo WHERE todo_number = %s;' % (self.todo_list.GetItem(i, 7).GetText())
		EMR_utilities.updateData(qry)
		for columns in range(self.todo_list.GetColumnCount()):
		    items.append(self.todo_list.GetItem(i, columns).GetText())
		self.todo_list.DeleteItem(i)
	ctrls = ['Date', 'Description', 'Priority', 'Category', 'Memo', 'Due Date']	
	for i in ctrls:
	    self.addtodo.textctrl[i].SetValue(items[n])
	    n = n + 1
开发者ID:barronmo,项目名称:gecko_emr,代码行数:18,代码来源:ToDo.py

示例11: UpdateVitals

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def UpdateVitals(self, event):
	updateqry = 'INSERT INTO vitals SET wt = "%s", ht = "%s", hc = "%s", temp = "%s", sBP = "%s", dBP = "%s", \
	      pulse = "%s", resp = "%s", sats = "%s", vitals_date = "%s", patient_ID = %s;' % (self.textctrl['Wt'].GetValue(), 
	      self.textctrl['Ht'].GetValue(), self.textctrl['HC'].GetValue(), self.textctrl['Temp'].GetValue(), 
	      self.textctrl['SBP'].GetValue(), self.textctrl['DBP'].GetValue(), self.textctrl['Pulse'].GetValue(), 
	      self.textctrl['Resp'].GetValue(), self.textctrl['O2 Sats'].GetValue(), self.textctrl['Date'].GetValue(), 
	      self.PtID)
	EMR_utilities.updateData(updateqry)
	self.UpdateList()
	data = EMR_utilities.getData("SELECT dob, sex FROM demographics WHERE patient_ID = %s;" % self.PtID)
	if data[1] == 'male':
	    sex = 'boy'
	else: sex = 'girl'
	s = data[0].strftime("%B") + ',' + str(data[0].day) + ',' + str(data[0].year) + ',' + sex + ',' + \
		self.textctrl['Ht'].GetValue() + ',' + self.textctrl['Wt'].GetValue() + ',' + self.textctrl['HC'].GetValue()
	with open('/home/mb/Dropbox/iMacros/Datasources/growth.txt', 'w') as f:
	    f.write(s)
	    f.close()
	self.Layout()			#this line from C M and Robin Dunn on the mailing list; see 20 Feb 08 email
	for items in self.textctrl:
	    self.textctrl[items].SetValue("")
开发者ID:barronmo,项目名称:gecko_emr,代码行数:23,代码来源:Vitals.py

示例12: OnKillFocusICD

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnKillFocusICD(self, event):
	#for item in dir(event.GetEventObject()):
	#    print item, ": ", getattr(event.GetEventObject(), item)
	
	if event.GetEventObject().IsModified():
	    #remove any decimal points
	    icd = event.GetEventObject().GetValue().replace('.', '')
	    #save any updates to the database
	    d = {"ICD #1":"icd1", "ICD #2":"icd2", "ICD #3":"icd3", "ICD #4":"icd4", "ICD #5":"icd5",
		 "ICD #6":"icd6", "ICD #7":"icd7", "ICD #8":"icd8", "ICD #9":"icd9", "ICD #10":"icd10"}
	    try:
		qry = 'UPDATE notes SET %s = "%s" WHERE date = "%s";' % (d[event.GetEventObject().Name], \
				icd, self.textctrl['Date'].GetValue())
		EMR_utilities.updateData(qry)
	    except:
		print 'icd query didnt work, line 374'
	    if icd == ' ' or icd == '?' or icd == 'f' or icd == 'g':
		pass	#setting these values was triggering the OnTextEnterICD resulting in two dialog boxes
	    else:
		event.GetEventObject().SetValue(icd)
	    qry = 'SELECT * FROM notes WHERE patient_ID = %s ORDER BY date DESC;' % (self.PtID)
	    self.results = EMR_utilities.getAllData(qry)
	    
	else: pass
开发者ID:barronmo,项目名称:gecko_emr,代码行数:26,代码来源:Notes.py

示例13: OnRemProb

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
 def OnRemProb(self, event):
     obj = self.problist.GetSelectedObjects()
     for items in obj:
         qry = 'DELETE FROM problems10 WHERE problem_number = %s;' % items.problem_number
         self.problist.RemoveObject(items)
         EMR_utilities.updateData(qry)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:8,代码来源:Problems.py

示例14: OnDeleteMed

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
 def OnDeleteMed(self, event):
     obj = self.list.GetSelectedObjects()
     for items in obj:
         qry = 'DELETE FROM meds WHERE med_number = %s;' % items['med_number']
         self.list.RemoveObject(items)
         EMR_utilities.updateData(qry)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:8,代码来源:Meds.py

示例15: OnDone

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import updateData [as 别名]
    def OnDone(self, event):
	#create file
	prnt = wx.GetTopLevelParent(self.myparent)
	#dem_page = parent.nb.GetPage(1)		#figured this out using PyCrust (*this will mess up if you have extra pages*)
	path = EMR_utilities.getData("SELECT home_dir FROM users WHERE user_name = '%s'" % prnt.user)
	linuxpath = "/home/%s/Desktop/GECKO/Billing/OfficeAlly" % path[0] + "_%s.txt"
	applepath = "/Users/%s/Desktop/GECKO/Billing/OfficeAlly" % path[0] + "_%s.txt"
	windowspath = "C:\\Documents and Settings\\%s\\My Documents\\GECKO\\Billing\\OfficeAlly" % path[0] + "_%s.txt"
        daily_billing = EMR_utilities.platformText(linuxpath, applepath, windowspath) % EMR_utilities.dateToday()
	a_file = open(daily_billing, 'a')		#'a' will both append to existing and create if nonexistent
	gateway_file = open("/home/%s/Desktop/GECKO/Billing/Gateway" % settings.HOME_FOLDER + "%s.txt" % EMR_utilities.dateToday(), 'a')
	
	#get demographic and insurance data
	insFields = (('InsurancePlanName', 1), ('InsurancePayerID', 2), ('InsuranceStreetAddr', 3), ('InsuranceCity', 4), \
		     ('InsuranceState', 5), ('InsuranceZip', 6), ('InsuranceCityStateZip', 7), ('InsurancePhone', 8))
	fields = (('lastname', 17), ('firstname', 18), ('mid_init', 19), ('dob', 20), ('address', 26), \
		     ('city', 27), ('state', 28), ('zipcode', 29), ('phonenumber', 30), ('sof', 72), \
		     \
		     ('policy_ID', 16), ('InsuredLast', 23), ('InsuredFirst', 24), ('InsuredMidInit', 25), \
		     ('InsuredStreetAddress', 35), ('InsuredCity', 36), ('InsuredState', 37), \
		     ('InsuredZip', 38), ('InsuredPhone', 39), \
		     ('InsuredPolicyGroupOrFecaNumber', 63), ('InsuredDOB', 64), \
		     ('InsuredEmployerNameOrSchoolName', 67), ('InsuredInsurancePlanNameOrProgramName', 68), \
		     \
		     ('OtherInsuredLast', 46), ('OtherInsuredFirst', 47), ('OtherInsuredMidInit', 48), \
		     ('OtherInsuredPolicyOrGroupNumber', 49), ('OtherInsuredDOB', 50), \
		     ('OtherInsuredEmployerNameOrSchoolName', 53), ('OtherInsuredInsurancePlanOrProgramName', 54))    
	
        insQry = "SELECT * FROM ins_companies WHERE InsurancePlanName = '%s';" % self.whichIns
	insResults = EMR_utilities.getDictData(insQry)
	self.printImageDict.update(insResults)	#adds more necessary data for print image
	self.createOADict(insFields, insResults)
	self.createOADict(fields, self.ptResults)
	self.get1500Data()
	self.columns[269] = self.columns[267] - self.columns[268]	#BalanceDue
	if self.billSecInsBox.IsChecked():
	    EMR_utilities.updateData('UPDATE billing SET 2ndDate = CURDATE() \
					WHERE note_number = %s;' % (self.noteNumber))
	    self.columns[16] = self.ptResults['secondary_ins_ID']			#replaces the primary ins ID
	    self.columns[63] = self.ptResults['sec_PolicyGroupOrFecaNumber']	#replaces primary ins policy number
	    if self.billSecAsPrim.IsChecked():						#allows billing secondary as primary
		pass
	    else:
		self.columns[1] = self.columns[1] + ' secondary'		#this is how OA does sec ins billing
	else: 
	    EMR_utilities.updateData('UPDATE billing SET 1stDate = CURDATE() \
					WHERE note_number = %s;' % (self.noteNumber))
	if self.hospAdmBox.IsChecked():					#checks to make sure dates are filled in
	    if not self.columns[83]:
		self.columns[83] = EMR_utilities.dateToday('OA')
	    if not self.columns[84]:
		self.columns[84] = EMR_utilities.dateToday('OA')
	for n in range(1, 292):						#remove all the None entries which OA doesn't like
	    if self.columns[n] == None:
		self.columns[n] = ''
	    else: pass
	for n in range(1, 292):
	    a_file.write(str(self.columns[n]) + '\t')
	a_file.write('\n')
	

	"""Print image for Gateway EDI"""

	self.printImageDict['Name'] = self.printImageDict['lastname'] + ', ' + self.printImageDict['firstname']
	self.printImageDict['InsuredName'] = self.printImageDict['InsuredLast'] + ', ' + self.printImageDict['InsuredFirst']
	self.printImageDict['InsuranceCityStateZip'] = insResults['InsuranceCity'] + ', ' + insResults['InsuranceState'] + ' ' \
		+ insResults['InsuranceZip']
	self.printImageDict['Medicare'] = self.columns[9]
	self.printImageDict['Medicaid'] = self.columns[10]
	self.printImageDict['Other'] = self.columns[15]
	self.printImageDict['self'] = self.columns[31]
	self.printImageDict['spouse'] = self.columns[32]
	self.printImageDict['child'] = self.columns[33]
	self.printImageDict['other'] = self.columns[34]
	self.printImageDict['empl_no'] = self.columns[56]
	self.printImageDict['auto_no'] = self.columns[58]
	self.printImageDict['other_no'] = self.columns[61]
	self.printImageDict['empl_yes'] = self.columns[55]
	self.printImageDict['auto_yes'] = self.columns[57]
	self.printImageDict['other_yes'] = self.columns[60]
    	self.printImageDict['auto_state'] = self.columns[59]
	self.printImageDict['icd1'] = self.columns[89]
	self.printImageDict['icd2'] = self.columns[90]
	self.printImageDict['icd3'] = self.columns[91]
	self.printImageDict['icd4'] = self.columns[92]
	self.printImageDict['icd5'] = self.columns[93]
	self.printImageDict['icd6'] = self.columns[94]
	self.printImageDict['icd7'] = self.columns[95]
	self.printImageDict['icd8'] = self.columns[96]
	dateList = ['dob', 'sof', 'Admit', 'DC', '101', '117', '133', '149', '165', '181']
	for item in dateList:	#fixes problem with dates not showing up on print image
	    try:
		self.printImageDict[item] = self.printImageDict[item].strftime("%m %d %y")
	    except: 
		self.printImageDict[item] = self.printImageDict[item].replace('/', ' ')
	self.printImageDict['sig'] = 'Signature on File'
	self.printImageDict['267'] = str(self.columns[267])	#total charges converting decimal.decimal to string
	self.printImageDict['268'] = str(self.columns[268])	#this is amount paid, same as above
	#this brings in secondary/other insurance info if present
	if self.ptResults['secondary_ins']:
#.........这里部分代码省略.........
开发者ID:barronmo,项目名称:gecko_emr,代码行数:103,代码来源:CreateCMS.py


注:本文中的EMR_utilities.updateData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。