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


Python EMR_utilities.getDictData方法代码示例

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


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

示例1: OnpRintMed

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def OnpRintMed(self, event):
        obj = self.list.GetSelectedObjects()
        string = ''
        for items in obj:
            string = '%s %s\n   take %s %s %s   #%s refills: %s\n\n' % \
                     (items["med_name"],
                      items["dose"],
                      items["number_tablets"],
                      items["route"],
                      items["frequency"],
                      items["number_pills"],
                      items["refills"]) + string
        
	form_lt = "%s/EMR_outputs/Script.html" % settings.LINUXPATH
	form_at = "%s/EMR_outputs/Script.html" % settings.APPLEPATH
	form_wt = "%s\EMR_outputs\Script.html" % settings.WINPATH
        form = open(EMR_utilities.platformText(form_lt, form_at, form_wt), 'r')
	s = form.read()
	form.close()
	dem_data = EMR_utilities.getDictData('SELECT * FROM demographics WHERE patient_ID = %s;' % self.ptID)
	dem_data['string'] = string
	dem_data['date'] = EMR_utilities.dateToday()
	dem_data['name_address'] = EMR_formats.format_address(dem_data)
	script_text = s % (dem_data)
	printer = EMR_utilities.Printer()
	printer.PreviewText(script_text)
	path_lt = "%s/EMR_outputs/%s/Orders" % (settings.LINUXPATH, self.ptID)
	path_at = "%s/EMR_outputs/%s/Orders" % (settings.APPLEPATH, self.ptID)
	path_wt = "%s\EMR_outputs\%s\Orders" % (settings.WINPATH, self.ptID)
	path = EMR_utilities.platformText(path_lt, path_at, path_wt)
	filename = "%s/script%s.html" % (path, EMR_utilities.dateToday(t='file format'))
	f = open(filename, 'w')
	f.write(script_text)
	f.close()	
开发者ID:barronmo,项目名称:gecko_emr,代码行数:36,代码来源:Meds.py

示例2: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def __init__(self, parent, ptID, text=""):
	'''Prints a letter, saves a copy to pt folder'''
	self.ptID = ptID
	filename = "/home/mb/Desktop/GECKO/EMR_outputs/%s/Other/ltr-%s.pdf" % (self.ptID, EMR_utilities.dateToday())
	doc = SimpleDocTemplate(filename, pagesize=letter, topMargin=60)
	# container for the 'Flowable' objects
	elements = []
 
	styleSheet = getSampleStyleSheet()
	styleSheet.add(ParagraphStyle(name='Address', fontSize=13, leading=15))
	styleSheet.add(ParagraphStyle(name='Body', fontSize=12, leading=14))

	elements.append(Paragraph('Barron Family Medicine', styleSheet['Address']))
	elements.append(Paragraph('1423 S Big Bend Blvd', styleSheet['Address']))
	elements.append(Paragraph('Richmond Heights, MO 63117', styleSheet['Address']))

	qry = 'SELECT * FROM demographics WHERE patient_ID = %s;' % self.ptID
	results = EMR_utilities.getDictData(qry)
	elements.append(Spacer(1,48))
	elements.append(Paragraph('%(firstname)s %(lastname)s' % (results), styleSheet['Address']))
	elements.append(Paragraph('%(address)s' % results, styleSheet['Address']))
	elements.append(Paragraph('%(city)s, %(state)s  %(zipcode)s' % results, styleSheet['Address']))
	elements.append(Spacer(1,24))
	elements.append(Paragraph('<para align=RIGHT>%s</para>' % EMR_utilities.dateToday(t='display'), styleSheet['Body']))
	
	elements.append(Spacer(1,36))

	if results['sex'] == 'male':
	    def_salutation = 'Dear Mr. %s:' % results['lastname']
	else: 
	    def_salutation = 'Dear Ms. %s:' % results['lastname']
	salutation = wx.GetTextFromUser("Dear ?:", default_value=def_salutation)
	elements.append(Paragraph(salutation, styleSheet['Body']))
	elements.append(Spacer(1,12))
	
	if text == "":
	    body = wx.TextEntryDialog(parent, "Main Paragraph", style=wx.TE_MULTILINE|wx.OK|wx.CANCEL)
	    body.ShowModal()
	    elements.append(Paragraph(body.GetValue(), styleSheet['Body']))
	else:
	    elements.append(Paragraph(text, styleSheet['Body']))
	elements.append(Spacer(1,12))
	elements.append(Paragraph("If you have any questions, don't hesitate to call me at (314) 667-5276.", styleSheet['Body']))
	elements.append(Spacer(1,12))

	elements.append(Paragraph('Sincerely,', styleSheet['Body']))
	elements.append(Spacer(1, 48))
	'''If you want the signature automatically then can un-comment these lines.  For now I will sign all.
	logo = "/home/mb/Dropbox/Office/Signature.png"
	im = Image(logo, 2*inch, 0.75*inch)
	im.hAlign = "LEFT"
	elements.append(im)'''

	elements.append(Paragraph('Michael Barron MD', styleSheet['Body']))
	
	# write the document to disk
	doc.build(elements)
	os.system("lp %s" % filename)	#extremely slick: prints directly to Updox Printer
开发者ID:barronmo,项目名称:gecko_emr,代码行数:60,代码来源:Printer1.py

示例3: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def __init__(self, parent, ptID, text=""):
	'''Prints a letter, saves a copy to pt folder'''
	self.ptID = ptID
	lt = "%s/EMR_outputs/%s/Other/ltr-%s.pdf" % (settings.LINUXPATH, self.ptID, EMR_utilities.dateToday('file format'))
	at = "%s/EMR_outputs/%s/Other/ltr-%s.pdf" % (settings.APPLEPATH, self.ptID, EMR_utilities.dateToday('file format'))
	wt = "%s\EMR_outputs\%s\Other\ltr-%s.pdf" % (settings.WINPATH, self.ptID, EMR_utilities.dateToday('file format'))
	filename = EMR_utilities.platformText(lt, at, wt)
	doc = SimpleDocTemplate(filename, pagesize=letter, topMargin=60)
	# container for the 'Flowable' objects
	elements = []
 
	styleSheet = getSampleStyleSheet()
	styleSheet.add(ParagraphStyle(name='Address', fontSize=13, leading=15))
	styleSheet.add(ParagraphStyle(name='Body', fontSize=12, leading=14))

	elements.append(Paragraph('Barron Family Medicine', styleSheet['Address']))
	elements.append(Paragraph('8515 Delmar Blvd #217', styleSheet['Address']))
	elements.append(Paragraph('University City, MO 63124', styleSheet['Address']))

	qry = 'SELECT * FROM demographics WHERE patient_ID = %s;' % self.ptID
	results = EMR_utilities.getDictData(qry)
	elements.append(Spacer(1,48))
	elements.append(Paragraph('%(firstname)s %(lastname)s' % (results), styleSheet['Address']))
	elements.append(Paragraph('%(address)s' % results, styleSheet['Address']))
	elements.append(Paragraph('%(city)s, %(state)s  %(zipcode)s' % results, styleSheet['Address']))
	elements.append(Spacer(1,24))
	elements.append(Paragraph('<para align=RIGHT>%s</para>' % EMR_utilities.dateToday(t='display'), styleSheet['Body']))
	
	elements.append(Spacer(1,36))

	if results['sex'] == 'male':
	    def_salutation = 'Dear Mr. %s:' % results['lastname']
	else: 
	    def_salutation = 'Dear Ms. %s:' % results['lastname']
	salutation = wx.GetTextFromUser("Dear ?:", default_value=def_salutation)
	elements.append(Paragraph(salutation, styleSheet['Body']))
	elements.append(Spacer(1,12))
	
	if text == "":
	    body = wx.TextEntryDialog(parent, "Main Paragraph", style=wx.TE_MULTILINE|wx.OK|wx.CANCEL)
	    body.ShowModal()
	    elements.append(Paragraph(body.GetValue(), styleSheet['Body']))
	else:
	    elements.append(Paragraph(text, styleSheet['Body']))
	elements.append(Spacer(1,12))
	elements.append(Paragraph("If you have any questions, don't hesitate to call me at (314) 667-5276.", styleSheet['Body']))
	elements.append(Spacer(1,12))

	elements.append(Paragraph('Sincerely,', styleSheet['Body']))
	chooseSig(elements)

	elements.append(Paragraph(settings.NAME, styleSheet['Body']))
	
	# write the document to disk
	doc.build(elements)
	choosePrinter(filename)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:58,代码来源:Printer.py

示例4: get1500Data

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def get1500Data(self):
	#collect CPT info from the Billing module
	noteQry = 'SELECT * FROM notes WHERE date = "%s";' % self.myparent.textctrl['Date'].GetValue()
	noteResults = EMR_utilities.getDictData(noteQry)
	self.noteNumber = noteResults['note_number']	#need this for OnDone
	self.columns[89] = noteResults['icd1']		#DiagCode1, etc
	self.columns[90] = noteResults['icd2']
	self.columns[91] = noteResults['icd3']
	self.columns[92] = noteResults['icd4']
	self.columns[93] = noteResults['icd5']
	self.columns[94] = noteResults['icd6']
	self.columns[95] = noteResults['icd7']
	self.columns[96] = noteResults['icd8']
	self.printImageDict['icd9'] = noteResults['icd9']
	self.printImageDict['icd10'] = noteResults['icd10']
	
	cptQry = 'SELECT * FROM billing WHERE note_number = %d;' % noteResults['note_number']
	cptResults = EMR_utilities.getAllDictData(cptQry)
	#amt_pd = decimal.Decimal()
	res = len(cptResults)
	if res > 6:
	    dlg = wx.MessageDialog(None, "No more than 6 CPT codes per 1500 form.", "Error")
	    dlg.ShowModal()
	else:
	    for n in range(res):
	    	self.columns[101 + (n*16)] = cptResults[n]['date']		#FromDateOfService
		self.columns[102 + (n*16)] = cptResults[n]['date']		#ToDateOfService
		self.columns[103 + (n*16)] = cptResults[n]['POS']		#PlaceOfService
		self.columns[104 + (n*16)] = ""					#EMG (not used so blank)
		self.columns[105 + (n*16)] = cptResults[n]['CPT_code']		#CPT
		self.columns[106 + (n*16)] = cptResults[n]['mod_A']		#ModifierA
		self.columns[107 + (n*16)] = cptResults[n]['mod_B']		#ModifierB
		self.columns[108 + (n*16)] = cptResults[n]['mod_C']		#ModifierC
		self.columns[109 + (n*16)] = cptResults[n]['mod_D']		#ModifierD
		self.columns[110 + (n*16)] = cptResults[n]['dx_pter']		#DiagCodePointer
		self.columns[111 + (n*16)] = cptResults[n]['total_charge']	#Charges
		self.columns[112 + (n*16)] = cptResults[n]['units']		#Units
		try:
		    if int(cptResults[n]['CPT_code']) > 99380 and int(cptResults[n]['CPT_code']) < 99396:
			self.columns[113 + (n*16)] = 'Y'			#EPSDT- catches well-baby and physicals
			#puts Y in all physicals, should only be EPSDT physicals
		except: pass							#J/G codes raise error- not integers
		self.columns[114 + (n*16)] = ""					#RenderingPhysQualifier
		self.columns[115 + (n*16)] = ""					#RenderingPhysID
		self.columns[116 + (n*16)] = self.renderingNPI			#RenderingPhysNPI  
		emptyStringProblemChildren = ['total_charge', '1_ins_pmt', '2_ins_pmt', 'pt_pmt']
		for kids in emptyStringProblemChildren:				#empty strings raised decimal error
		    try: decimal.Decimal(cptResults[n][kids])
		    except decimal.InvalidOperation: cptResults[n][kids] = 0 	#must convert them to 0 before using them
		self.columns[267] = self.columns[267] + decimal.Decimal(cptResults[n]['total_charge'])	#TotalCharges
		self.columns[268] = self.columns[268] + decimal.Decimal(cptResults[n]['1_ins_pmt']) + \
				    decimal.Decimal(cptResults[n]['2_ins_pmt']) + \
				    decimal.Decimal(cptResults[n]['pt_pmt'])	#AmountPaid
	    for i in range(101, 292):
		self.printImageDict[str(i)] = self.columns[i]
开发者ID:barronmo,项目名称:gecko_emr,代码行数:57,代码来源:CreateCMS.py

示例5: OnApply

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
 def OnApply(self, event):
     num = self.list.GetItemCount()
     for i in range(num):
         if i == 0:
             self.log.Clear()
         if self.list.IsChecked(i):
             # retrieve the patient_ID: p = patient_ID
             # query database for complete demographic info on that patient
             results = EMR_utilities.getDictData(
                 "SELECT * FROM demographics WHERE patient_ID = %s;" % (self.list.GetItemText(i))
             )
             b = EMR_formats.format_address(results)
             self.log.AppendText(b + "\n")
开发者ID:barronmo,项目名称:gecko_emr,代码行数:15,代码来源:Selectable.py

示例6: OnPrint

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def OnPrint(self, event):
        if self.soapNote.IsShown():
            note = self.soapNote.GetValue() 
        else:
            note = self.newsoapNote.GetValue()
        qry = 'SELECT firstname, lastname \
                FROM demographics \
                WHERE patient_ID = "%s";' % self.PtID
        print_data = EMR_utilities.getDictData(qry)
        print_data['date'] = self.textctrl['Date'].GetValue()
        print_data['soap'] = EMR_utilities.wrapper(note, 80)
	print print_data['soap']
	lt = "%s/EMR_outputs/SoapNote.html" % settings.LINUXPATH
	at = "%s/EMR_outputs/SoapNote.html" % settings.APPLEPATH
	wt = "%s\EMR_outputs\SoapNote.html" % settings.WINPATH
        form = open(EMR_utilities.platformText(lt, at, wt), 'r')
        s = form.read()
        form.close()        
        note_text = s % (print_data)
        printer = EMR_utilities.Printer()
	printer.PreviewText(note_text)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:23,代码来源:Notes.py

示例7: OnGetPt

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def OnGetPt(self, event):
        t1 = time.clock()
        import Meds, Problems, PMH, Vitals, Notes, demographics, ToDo, Queries, Prevention, Education

        t2 = time.clock()
        lt = "%s/EMR_outputs" % settings.LINUXPATH
        at = "%s/EMR_outputs" % settings.APPLEPATH
        wt = "%s\EMR_outputs" % settings.WINPATH
        f = wx.GetTopLevelParent(self)
        num = self.list.GetItemCount()
        if num == 0:
            dlg = wx.MessageDialog(
                None, "There are no patients to select.  Close window?", "Problem", style=wx.YES_NO | wx.YES_DEFAULT
            )
            answer = dlg.ShowModal()
            if answer == wx.ID_YES:
                f.nb.DeletePage(self)

        else:
            for i in range(num):
                if self.list.IsChecked(i):
                    medspage = Meds.Meds(f.nb, -1, self.list.GetItemText(i))
                    medspage.ptID = self.list.GetItemText(i)
                    probpage = Problems.Problems(f.nb, -1, self.list.GetItemText(i))
                    probpage.ptID = self.list.GetItemText(i)
                    pmhpage = PMH.PMH(f.nb, -1, self.list.GetItemText(i))
                    pmhpage.ptID = self.list.GetItemText(i)
                    vitalspage = Vitals.Vitals(f.nb, -1, self.list.GetItemText(i))
                    vitalspage.ptID = self.list.GetItemText(i)
                    notespage = Notes.Notes(f.nb, -1, self.list.GetItemText(i))
                    f.nb.DeletePage(0)
                    demogr_page = demographics.demographics(f.nb, ptID=self.list.GetItemText(i))
                    todo_page = ToDo.todo(f.nb, -1, PtID=self.list.GetItemText(i))
                    queries_page = Queries.queries(f.nb, ptID=self.list.GetItemText(i))
                    preventspage = Prevention.Prevention(f.nb, -1, ptID=self.list.GetItemText(i))
                    preventspage.ptID = self.list.GetItemText(i)
                    educpage = Education.Notes(f.nb, -1, self.list.GetItemText(i))
                    f.nb.AddPage(demogr_page, "Demographics")
                    f.nb.AddPage(medspage, "Medications")
                    f.nb.AddPage(probpage, "Problems")
                    f.nb.AddPage(pmhpage, "Past Medical History")
                    f.nb.AddPage(vitalspage, "Vitals")
                    f.nb.AddPage(notespage, "Notes")
                    f.nb.AddPage(educpage, "Education")
                    f.nb.AddPage(todo_page, "To Do")
                    f.nb.AddPage(preventspage, "Health Maintenance")
                    f.nb.AddPage(queries_page, "Queries")
                    base_path = EMR_utilities.platformText(lt, at, wt)
                    folders = [
                        "SOAP_notes",
                        "Labs",
                        "Radiology",
                        "Consults",
                        "Old_Records",
                        "Insurance",
                        "Other",
                        "Orders",
                    ]
                    if sys.platform == "win32":
                        if os.path.exists("%s\%s" % (base_path, self.list.GetItemText(i))):
                            pass
                        else:
                            for item in folders:
                                os.makedirs("%s\%s\%s" % (base_path, self.list.GetItemText(i), item))
                    else:
                        if os.path.exists("%s/%s" % (base_path, self.list.GetItemText(i))):
                            pass
                        else:
                            for item in folders:
                                os.makedirs("%s/%s/%s" % (base_path, self.list.GetItemText(i), item))
                    qry = (
                        'SELECT firstname, lastname, SUM(balance) FROM demographics INNER JOIN billing \
				USING (patient_ID) WHERE patient_ID = "%s";'
                        % self.list.GetItemText(i)
                    )
                    results = EMR_utilities.getDictData(qry)
                    try:
                        f.ptText.SetLabel(
                            "  %s %s    %s        $%d"
                            % (
                                results["firstname"],
                                results["lastname"],
                                EMR_utilities.getAge(self.list.GetItemText(i)),
                                results["SUM(balance)"],
                            )
                        )
                    except:
                        f.ptText.SetLabel(
                            "  %s %s    %s    no balance"
                            % (
                                results["firstname"],
                                results["lastname"],
                                EMR_utilities.getAge(self.list.GetItemText(i)),
                            )
                        )
                    f.ptID = self.list.GetItemText(i)

        t3 = time.clock()
        if f.ptMsgs:
            f.ptMsgs.messages.SetLabel(EMR_utilities.MESSAGES)
#.........这里部分代码省略.........
开发者ID:barronmo,项目名称:gecko_emr,代码行数:103,代码来源:Selectable.py

示例8: OnDone

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [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

示例9: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]
    def __init__(self, parent, PtID):
	wx.Frame.__init__(self, parent, -1, title='Create CMS 1500 Form', pos=(100,100), size=(800,775))
	self.PtID = PtID
	self.myparent = parent	#allows access to notes page
	self.panel = wx.Panel(self, -1)
	self.columns = {}
	#this one is for the Gateway EDI print image file
	self.printImageDict = {}
	for n in range(1, 292):
	    self.columns[n] = ""
	qry = "SELECT * FROM demographics WHERE patient_ID = %s;" % self.PtID
	self.ptResults = EMR_utilities.getDictData(qry)
	self.printImageDict.update(self.ptResults)	#starts collecting the data we need for print image
	self.columns[56] = 'X'
	self.columns[58] = 'X'
	self.columns[61] = 'X'
	self.renderingNPI = '1326063991'
	self.printImageDict['Admit'] = ''
	self.printImageDict['DC'] = ''
	self.whichIns = self.ptResults['insurance_company']
	if self.ptResults['sex'].lower() == 'male':
	    self.columns[21] = 'X'
	    self.printImageDict['msex'] = 'X'
	elif self.ptResults['sex'] == '':
	    dlg = wx.MessageBox('Gender information is missing on this patient.', 'Need more info', style=wx.OK)
	else: 
	    self.columns[22] = 'X'
	    self.printImageDict['fsex'] = 'X'
	if self.ptResults['OtherInsuredGender'] == None:
	    pass
	elif self.ptResults['OtherInsuredGender'].lower() == 'male':
	    self.columns[51] = 'X'
	else: self.columns[52] = 'X'
	if self.ptResults['InsuredGender'] == None:
	    pass
	elif self.ptResults['InsuredGender'].lower() == 'male':
	    self.columns[65] = 'X'
	else: self.columns[66] = 'X'
	self.columns[70] = 'X'
	self.columns[71] = 'sof'			#patient signature
	self.columns[73] = 'sof'			#insured signature- authorizes payment to provider
	self.columns[100] = '26D2013625'		#CLIA number
	self.columns[261] = '386525225'			#TaxID
	self.columns[262] = 'X'				#SSN; either SSN or EIN is checked
	self.columns[264] = self.PtID			#PatientAcctNumber
	self.columns[265] = 'X'				#AcceptAssignYes
	self.columns[267] = decimal.Decimal()		#TotalCharges
	self.columns[268] = decimal.Decimal()		#AmountPaid
	self.columns[270] = 'sof'			#PhysicianSignature
	self.columns[271] = str(EMR_utilities.dateToday())	#PhysicianSignatureDate
	self.columns[272] = 'Barron'			#PhysicianLast
	self.columns[273] = 'Michael'			#PhysicianFirst
	self.columns[274] = 'O'				#PhysicianMidInit
	self.columns[275] = 'Michael Barron MD'		#FacilityName
	self.columns[276] = '8515 Delmar Blvd 217'	#FacilityStreetAddr
	self.columns[277] = 'St. Louis'			#FacilityCity
	self.columns[278] = 'MO'			#FacilityState
	self.columns[279] = '63124-2168'		#FacilityZip
	self.columns[280] = 'St. Louis, MO 63124-2168'	#FacilityCityStateZip
	self.columns[281] = '1326063991'		#FacilityNPI
	self.columns[284] = 'Michael Barron MD'		#SupplierName
	self.columns[285] = '8515 Delmar Blvd #217'	#SupplierStreetAddr
	self.columns[286] = 'St. Louis'			#SupplierCity
	self.columns[287] = 'MO'			#SupplierState
	self.columns[288] = '63124-2168'		#SupplierZip
	self.columns[289] = 'St. Louis, MO 63124-2168'	#SupplierCityStateZip
	self.columns[290] = '3146675276'		#SupplierPhone
	self.columns[291] = '1326063991'		#SupplierNPI
	self.columns[292] = '1326063991'		#GroupID
	
	self.printImageDict['Fac_Adr'] = self.columns[280]

	
	"""Basic plan is to create a dictionary with keys numbered from 1-228 which correspond to the columns in the 
	office ally headers.  Will then fill in the values based on queried data.  Finally will step through the 
	dictionary by key values and build the text file to submit to Office Ally.  The columns are numbers rather 
	than the columns names because we can easily step the number range to create the text file for OA.  Comments
	include the Office Ally header names."""

	#Insurance Address
	cpt_aFields = ('date', 'date', 'POS')
	cpt_bFields = ('CPT_code', 'mod_A', 'mod_B', 'mod_C', 'mod_D', 'dx_pter', 'total_charge')
	
	#insurance type, Box 1, is handled in OnSelectIns
        
	
	sizer = wx.GridBagSizer(10, 30)

	sizer.Add(wx.StaticText(self.panel, -1, "Insurance Type"), pos=(1, 1))
	insListBox = wx.ListBox(self.panel, -1, choices=['Medicare', 'Medicaid', 'Tricare', 'Champus', 'GHP', 'FECA', 'Other'], style=wx.LB_SINGLE)
	sizer.Add(insListBox, pos=(2, 1), span=(4, 1), flag=wx.EXPAND)
	self.Bind(wx.EVT_LISTBOX, self.OnSelectIns, insListBox)

	sizer.Add(wx.StaticText(self.panel, -1, "Relation to Insured"), pos=(1, 2))
	relListBox = wx.ListBox(self.panel, -1, choices=['self', 'spouse', 'child', 'other'], style=wx.LB_SINGLE)
	sizer.Add(relListBox, pos=(2, 2), span=(3, 1), flag=wx.EXPAND)
	self.Bind(wx.EVT_LISTBOX, self.OnSelectRel, relListBox)
	
	self.accList = ['n/a', 'employment', 'auto accident', 'other accident']
	accBox = wx.RadioBox(self.panel, -1, "Illness/Injury due to ..?", choices=self.accList)
#.........这里部分代码省略.........
开发者ID:barronmo,项目名称:gecko_emr,代码行数:103,代码来源:CreateCMS.py

示例10: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import getDictData [as 别名]

#.........这里部分代码省略.........
	demo4sizer.Add(self.textctrl['Guarantor Address'], 0, wx.EXPAND)
	gCityLabel = wx.StaticText(self, -1, 'City State Zip Phone')
	gCityLabel.SetFont(Font2)
	demo4sizer.Add(gCityLabel, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
	guarcstsizer = wx.BoxSizer(wx.HORIZONTAL)
	guarcstsizer.Add(self.textctrl['Guarantor City'], 3)
	guarcstsizer.Add(self.textctrl['Guarantor State'], 1, wx.LEFT|wx.RIGHT, 5)
	guarcstsizer.Add(self.textctrl['Guarantor Zip'], 2, wx.RIGHT, 5)
	guarcstsizer.Add(self.textctrl['Guarantor Phone'], 4, wx.EXPAND)
	demo4sizer.Add(guarcstsizer, 0, wx.EXPAND)

	#Other Info (mainly added for NCQA purposes)
	demo5sizer.Add(wx.StaticText(self, -1, '                        ')) #no label needed, spacing only
	marriedSizer = wx.BoxSizer(wx.HORIZONTAL)
	self.marriedBox = wx.CheckBox(self, -1, "Married?")
	self.marriedBox.SetFont(Font2)
	marriedSizer.Add(self.marriedBox)
	self.inactiveBox = wx.CheckBox(self, -1, "Inactive Patient")
	self.inactiveBox.SetFont(Font2)
	marriedSizer.Add(self.inactiveBox)
	demo5sizer.Add(marriedSizer, 0, wx.EXPAND)
	languageLabel = wx.StaticText(self, -1, 'Language, PCP')
	languageLabel.SetFont(Font2)
	demo5sizer.Add(languageLabel, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
	languageSizer = wx.BoxSizer(wx.HORIZONTAL)
	languageSizer.Add(self.textctrl['Primary Language'], 1, wx.RIGHT, 5)
	languageSizer.Add(self.textctrl['PCP'], 1, wx.EXPAND)
	demo5sizer.Add(languageSizer, 0, wx.EXPAND)
	raceLabel = wx.StaticText(self, -1, 'Race')
	raceLabel.SetFont(Font2)
	demo5sizer.Add(raceLabel, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
	demo5sizer.Add(self.textctrl['Race'], 0, wx.EXPAND)


	
	box = wx.StaticBox(self, -1, 'Patient')
	box2 = wx.StaticBox(self, -1, 'Insured')		
	box3 = wx.StaticBox(self, -1, 'Insurance Information')		
	box4 = wx.StaticBox(self, -1, 'Contact')
	box5 = wx.StaticBox(self, -1, 'Other Info')	
	box.SetFont(font1)
	box2.SetFont(font1)
	box3.SetFont(font1)
	box4.SetFont(font1)
	box5.SetFont(font1)
	boxsizer = wx.StaticBoxSizer(box, wx.HORIZONTAL)
	box2sizer = wx.StaticBoxSizer(box2, wx.HORIZONTAL)
	box3sizer = wx.StaticBoxSizer(box3, wx.HORIZONTAL)
	box4sizer = wx.StaticBoxSizer(box4, wx.HORIZONTAL)
	box5sizer = wx.StaticBoxSizer(box5, wx.HORIZONTAL)
	boxsizer.Add(demosizer, 1, wx.EXPAND|wx.TOP|wx.BOTTOM, 25)
	box2sizer.Add(demo2sizer, 1, wx.EXPAND|wx.TOP|wx.BOTTOM, 25)
	box3sizer.Add(demo3sizer, 1, wx.EXPAND|wx.TOP|wx.BOTTOM, 25)
	box4sizer.Add(demo4sizer, 1, wx.EXPAND|wx.TOP|wx.BOTTOM, 25)
	box5sizer.Add(demo5sizer, 1, wx.EXPAND|wx.TOP|wx.BOTTOM, 25)

	leftsizer = wx.BoxSizer(wx.VERTICAL)
	leftsizer.Add(boxsizer, 0, wx.EXPAND|wx.BOTTOM, 10)
	leftsizer.Add(box3sizer, 0, wx.EXPAND)
	addPtBtn = EMR_utilities.buildOneButton(self, self, "Add New Patient", self.OnAddPt)
	buttonSizer = wx.BoxSizer(wx.HORIZONTAL)
	leftsizer.Add((-1, 25))
	buttonSizer.Add(addPtBtn, 0)
	rightsizer = wx.BoxSizer(wx.VERTICAL)
	rightsizer.Add(box2sizer, 0, wx.EXPAND|wx.BOTTOM, 10)
	rightsizer.Add(box4sizer, 0, wx.EXPAND|wx.BOTTOM, 10)
	rightsizer.Add(box5sizer, 0, wx.EXPAND)

	if ptID == None:
	    pass
	else:
	    results = EMR_utilities.getDictData('SELECT * FROM demographics WHERE patient_ID = %s;' % (ptID))
	    for label, size, field in self.labels:
		self.textctrl[label].SetValue(str(results[field]))
	    self.textctrl['Phone'].SetValue(EMR_formats.phone_format(self.textctrl['Phone'].GetValue()))
	    self.textctrl['Ins Phone'].SetValue(EMR_formats.phone_format(self.textctrl['Ins Phone'].GetValue()))
	    self.textctrl['Guarantor Phone'].SetValue(EMR_formats.phone_format(self.textctrl['Guarantor Phone'].GetValue()))
	    self.insChoice.SetStringSelection(self.textctrl['Insurance Co'].GetValue())
	    if results['adv_dir'] == '1':
		self.adv_dirYesRB.SetValue(True)
	    elif results['adv_dir'] == '2':
		self.adv_dirNoRB.SetValue(True)
	    else: 
		self.adv_dirUnknownRB.SetValue(True)
	    if results['proxy'] == '1':
		self.proxyBox.SetValue(1)
	    if results['marital_status'] == '1':
		self.marriedBox.SetValue(1)
	    if results['inactive'] == '1':
		self.inactiveBox.SetValue(1)
	    editPtBtn = EMR_utilities.buildOneButton(self, self, "Update Demographics", self.OnEditPt)
	    scanBtn = EMR_utilities.buildOneButton(self, self, "Scan", self.OnScan)
	    buttonSizer.Add(scanBtn, wx.ALL, 10)
	    buttonSizer.Add(editPtBtn, 0)

	leftsizer.Add(buttonSizer, 0)
	mainsizer = wx.BoxSizer(wx.HORIZONTAL)
	mainsizer.Add(leftsizer, 0, wx.RIGHT, 10)
	mainsizer.Add(rightsizer, 0, wx.EXPAND)
	self.SetSizer(mainsizer)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:104,代码来源:demographics.py


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