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


Python EMR_utilities.buildOneButton方法代码示例

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


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

示例1: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, id, ptID):
        wx.Panel.__init__(self, parent, id)

        self.PtID = ptID
        self.textctrl = {}
        self.not_billable = 0
        textcontrols = [("Date", 100)]
        cptsizer = wx.BoxSizer(wx.VERTICAL)
        for label, size in textcontrols:
            EMR_utilities.buildOneTextCtrl(self, label, size, cptsizer)
        cptsizer.Add((-1, 10))
        cptsizer.Add(wx.StaticText(self, -1, "Select a template:"))
        self.tmplist = wx.ListBox(
            self,
            -1,
            pos=wx.DefaultPosition,
            size=(90, 110),
            choices=["HTN", "DM", "Obesity", "GI", "Back Pain"],
            style=wx.LB_HSCROLL,
        )
        self.Bind(wx.EVT_LISTBOX, self.EvtSelTmplist, self.tmplist)

        cptsizer.Add(self.tmplist)
        cptsizer.Add((-1, 10))

        noteSizer = wx.BoxSizer(wx.VERTICAL)
        noteLabel = wx.StaticText(self, -1, "SOAP Note")
        self.educNote = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE)
        self.educNote.Show(False)
        self.neweducNote = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE)
        noteSizer.Add(noteLabel, 0, wx.ALIGN_TOP | wx.ALIGN_LEFT, 5)
        noteSizer.Add(self.educNote, 1, wx.EXPAND)
        noteSizer.Add(self.neweducNote, 1, wx.EXPAND)

        buttons = [("Save", self.OnSave), ("New", self.OnNew), ("Print", self.OnPrint), ("PDF", self.OnPDF)]
        leftsizer = wx.BoxSizer(wx.VERTICAL)
        for label, handler in buttons:
            EMR_utilities.buildOneButton(self, self, label, handler, leftsizer)
        self.listctrl = wx.ListBox(self, -1, pos=wx.DefaultPosition, size=(145, 200), choices=[], style=wx.LB_HSCROLL)
        leftsizer.AddMany([(-1, 20), (wx.StaticText(self, -1, "Select a note:")), (self.listctrl)])
        self.Bind(wx.EVT_LISTBOX, self.EvtSelListBox, self.listctrl)
        self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtSelListBox, self.listctrl)

        mainsizer = wx.BoxSizer(wx.HORIZONTAL)
        mainsizer.AddMany(
            [(leftsizer, 0, wx.ALL, 10), (noteSizer, 1, wx.EXPAND | wx.ALL, 10), (cptsizer, 0, wx.ALL, 10)]
        )
        self.SetSizer(mainsizer)
        self.loadList()
开发者ID:barronmo,项目名称:gecko_emr,代码行数:51,代码来源:Education.py

示例2: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, instance, parent, id, title):
	wx.Dialog.__init__(self, parent, id, title, size=(1100, 600))

	self.results = []
	self.textctrl = {}
	self.parentInstance = instance
	mainSizer = wx.BoxSizer(wx.VERTICAL)
	textSizer = wx.BoxSizer(wx.HORIZONTAL)
	btnSizer = wx.StdDialogButtonSizer()
	listSizer = wx.BoxSizer(wx.HORIZONTAL)
	self.textctrl['Search'] = wx.TextCtrl(self, -1, size=(250, -1), name='Search', style=wx.TE_PROCESS_ENTER)
	self.textctrl['Refine'] = wx.TextCtrl(self, -1, size=(150, -1), name='Refine', style=wx.TE_PROCESS_ENTER)
	textSizer.AddMany([(wx.StaticText(self, -1, 'Search')), (self.textctrl['Search']), (wx.StaticText(self, -1, 'Refine')), (self.textctrl['Refine'])])
	clearButton = EMR_utilities.buildOneButton(self, self, 'Clear', self.OnClear, textSizer)
	self.resultListBox = wx.ListBox(self, -1, pos=wx.DefaultPosition, choices = [], size=(700,300), style=wx.LB_HSCROLL)
	self.refineListBox = wx.ListBox(self, -1, pos=wx.DefaultPosition, choices = [], size=(200,300), style=wx.LB_HSCROLL)
	listSizer.AddMany([self.resultListBox, (20, -1), self.refineListBox])
	self.Bind(wx.EVT_TEXT_ENTER, self.OnSearchEnter, self.textctrl['Search'])
	self.Bind(wx.EVT_TEXT_ENTER, self.OnRefineEnter, self.textctrl['Refine'])
	btnOK = wx.Button(self, wx.ID_OK)
	btnCL = wx.Button(self, wx.ID_CANCEL)
        btnOK.SetDefault()
	btnCL.SetDefault()
	btnSizer.AddButton(btnOK)
	btnSizer.AddButton(btnCL)
	btnSizer.Realize()
	self.Bind(wx.EVT_LISTBOX, self.EvtSelRefineList, self.refineListBox)
	self.Bind(wx.EVT_LISTBOX, self.EvtSelResultList, self.resultListBox)
	mainSizer.AddMany([(textSizer, 0, wx.ALL, 10), (listSizer, 0, wx.ALL, 10), (btnSizer, 0, wx.ALL, 10)])
	self.SetSizer(mainSizer)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:32,代码来源:Notes.py

示例3: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, id=-1, title=None, ptID=None):
        wx.Panel.__init__(self, parent, id, title)
        self.ptID = ptID

        #sizers
        top = wx.BoxSizer(wx.HORIZONTAL)
        midtop = wx.BoxSizer(wx.VERTICAL)
        mainsizer = wx.BoxSizer(wx.VERTICAL)

        #list of table names in gecko, goes in top
        tables = [{'title':'allergies'}, {'title':'consultants'}, {'title':'demographics'}, {'title':'icd_9'}, {'title':'meds'}, \
                  {'title':'notes'}, {'title':'past_history'}, {'title':'problems'}, {'title':'todo'}, {'title':'vitals'}]
        self.tablesList = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
        self.tablesList.SetColumns([ColumnDefn("Tables", "center", 300, valueGetter='title')])
        self.tablesList.SetObjects(tables)
        top.Add(self.tablesList, 3, wx.EXPAND|wx.ALL, 5)

        #buttons go in midtop; midtop goes in top sizer
        btns = (('Show Columns', self.OnShowColumns),
                ('Delete Query', self.OnDelQuery),
                ('Run Query', self.OnRunQuery),
                ('Print Query', self.OnPrintQuery))
        for label, handler in btns:
            EMR_utilities.buildOneButton(self, self, label, handler, midtop)
        top.Add(midtop, 1, wx.EXPAND|wx.ALL, 5)

        #columns list goes in top sizer
        self.columns = []
        self.columnsList = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
        self.columnsList.SetColumns([ColumnDefn("Columns", "center", 300, valueGetter="Field")])
        self.columnsList.SetObjects(self.columns)
        top.Add(self.columnsList, 3, wx.EXPAND|wx.ALL, 5)
        mainsizer.Add(top, 3, wx.EXPAND)

        #textctrl for 'where' statement goes below top sizer in main sizer
        self.wherectrl = wx.TextCtrl(self, -1, size=(-1, -1))
        wheretxt = wx.StaticText(self, -1, 'e.g. WHERE patient_ID > 1000 AND short_des LIKE %%DM%%')
        mainsizer.Add(self.wherectrl, 1, wx.EXPAND|wx.ALL, 5)
        mainsizer.Add((-1, 10))
        mainsizer.Add(wheretxt, 1, wx.EXPAND| wx.ALL, 5)
        
        #results list goes below 'where' statement in mainsizer
        
        self.resultsList = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
        mainsizer.Add(self.resultsList, 5, wx.EXPAND|wx.ALL, 5)
        self.SetSizer(mainsizer)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:48,代码来源:Queries.py

示例4: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, ID, PtID):
	wx.Panel.__init__(self, parent, ID)
	#I need some way to set the max size for the grid
	self.PtID = PtID
	self.qry = "SELECT * FROM vitals WHERE patient_ID = %s;" % (str(self.PtID))
	self.vitals = list(EMR_utilities.getAllDictData(self.qry))
	self.textctrl = {}
	self.vitalsList = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
	self.vitalsList.SetColumns([
            ColumnDefn("Weight", "center", 80, valueGetter="wt"),
            ColumnDefn("Height", "center", 80, valueGetter="ht"),
            ColumnDefn("HC", "center", 80, valueGetter="hc"),
            ColumnDefn("Systolic", "center", 80, valueGetter="sBP"),
            ColumnDefn("Diastolic", "center", 80, valueGetter="dBP"),
            ColumnDefn("Pulse", "center", 80, valueGetter="pulse"),
            ColumnDefn("Resp", "center", 80, valueGetter="resp"),
            ColumnDefn("O2 Sat", "center", 80, valueGetter="sats"),
	    ColumnDefn("Temp", "center", 80, valueGetter="temp"),
	    ColumnDefn("Date", "center", 120, valueGetter="vitals_date")
            ])
	self.vitalsList.SetObjects(self.vitals)
	self.vitalsList.cellEditMode = ObjectListView.CELLEDIT_DOUBLECLICK
	self.vitalsList.Bind(EVT_CELL_EDIT_STARTING, self.HandleCellEditStarting)
	self.vitalsList.Bind(EVT_CELL_EDIT_FINISHED, self.listHandleCellEditFinished)
	self.vitalsbox = wx.BoxSizer(wx.HORIZONTAL)
	self.vitalsbox.Add(self.vitalsList, 1, wx.EXPAND |wx.ALL, 20)
	self.mainsizer = wx.BoxSizer(wx.VERTICAL)
	border = wx.StaticBox(self, -1, 'Add Vitals')
	f = wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.LIGHT)
	border.SetFont(f)
	addvitals = wx.StaticBoxSizer(border, wx.HORIZONTAL)
	controls = [('Wt', 40), ('Ht', 30), ('HC', 30), ('Temp', 40), ('SBP', 40), ('DBP', 40), ('Pulse', 40), ('Resp', 30), \
		    ('O2 Sats', 30), ('Date', 80)]
	for label, size in controls:
	    EMR_utilities.buildOneTextCtrl(self, label, size, addvitals)
	self.textctrl['Date'].SetValue(str(EMR_utilities.dateToday()))
	self.mainsizer.Add(self.vitalsbox)
	self.mainsizer.Add(addvitals, 0, wx.ALL, 20)
	buttonAdd = EMR_utilities.buildOneButton(self, self, 'Update Vitals', self.UpdateVitals)
	buttonDel = EMR_utilities.buildOneButton(self, self, 'Delete Vitals', self.DeleteVitals)
	self.mainsizer.Add(buttonAdd, 0, wx.ALIGN_LEFT|wx.ALIGN_TOP|wx.LEFT|wx.TOP, 20)
	self.mainsizer.Add(buttonDel, 0, wx.ALIGN_LEFT|wx.ALIGN_TOP|wx.LEFT|wx.TOP, 20)
	self.SetSizer(self.mainsizer)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:45,代码来源:Vitals.py

示例5: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, id, starts_with="ba"):
        wx.Panel.__init__(self, parent, id)

        self.log = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE)
        ptcolumns = (
            ("Patient ID", 95),
            ("Firstname", 125),
            ("Lastname", 150),
            ("Phone", 125),
            ("SSN", 125),
            ("DOB", 100),
        )
        patients = name_find(starts_with)
        self.list = EMR_utilities.buildCheckListCtrl(self, ptcolumns, patients)

        vbox = wx.BoxSizer(wx.VERTICAL)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        vbox2 = wx.BoxSizer(wx.VERTICAL)

        buttons = (
            ("Get Record", self.OnGetPt, vbox2),
            ("Deselect", self.OnDeselectAll, vbox2),
            ("Patient Info", self.OnApply, vbox2),
        )
        for label, handler, sizer in buttons:
            EMR_utilities.buildOneButton(self, self, label, handler, sizer)
        clock = EMR_utilities.makeClock(self, vbox2)

        vbox.Add(self.list, 2, wx.EXPAND | wx.TOP, 3)
        vbox.Add((-1, 10))
        vbox.Add(self.log, 1, wx.EXPAND)
        vbox.Add((-1, 10))
        hbox.Add(vbox2, 0, wx.RIGHT, 5)
        hbox.Add(vbox, 1, wx.EXPAND)
        hbox.Add((3, -1))

        self.SetSizer(hbox)

        self.Centre()
        self.Show(True)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:42,代码来源:Selectable.py

示例6: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, id, ptID):
        wx.Panel.__init__(self, parent, id)

        self.ptID = ptID
        self.problem = '' 	#receives the newly selected problem back from AddProblemDialog
        self.probs = []
        for items in prob_find(ptID):
                self.probs.append(Problem(items["short_des"], items["prob_date"], items["icd10"], items["problem_number"]))
        self.problist = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
        self.problist.SetColumns([
                ColumnDefn("Problem", "left", 400, valueGetter="short_des"),
                ColumnDefn("First Treated", "left", 100, valueGetter="prob_date"),
                ColumnDefn("ICD-10 Code", "left", 100, valueGetter="icd10")
                ])
        self.problist.rowFormatter = self.rowFormatter
        self.problist.useAlternateBackColors = False
        self.problist.SetObjects(self.probs)
        self.problist.cellEditMode = ObjectListView.CELLEDIT_DOUBLECLICK
        self.problist.Bind(EVT_CELL_EDIT_STARTING, self.HandleCellEditStarting)
        self.problist.Bind(EVT_CELL_EDIT_FINISHED, self.HandleCellEditFinished)
        
                
        leftprob = wx.BoxSizer(wx.VERTICAL)
        rightprob = wx.BoxSizer(wx.VERTICAL)
        mainsizer = wx.BoxSizer(wx.HORIZONTAL)

        buttons = (('Add', self.OnNewProb, leftprob),
             ('Remove', self.OnRemProb, leftprob),
             ('icd Toggle', self.OnToggle, leftprob))
        for label, handler, sizer in buttons:
            EMR_utilities.buildOneButton(self, self, label, handler, sizer)
        clock = EMR_utilities.makeClock(self, leftprob)
            
        rightprob.Add(self.problist, 1, wx.EXPAND | wx.TOP, 5)
        mainsizer.Add(leftprob, 0)
        mainsizer.Add(rightprob, 1, wx.EXPAND)
        self.SetSizer(mainsizer)
        listBilledICD(ptID)
        self.myFont = wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:41,代码来源:Problems.py

示例7: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, ID, PtID):
	wx.Panel.__init__(self, parent, ID)
	
	self.PtID = PtID
	self.toggler = 'Active'
	self.todoTitle = wx.StaticText(self, -1, self.toggler)
	titlefont = wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.BOLD)
	self.todoTitle.SetFont(titlefont)
	todo_columns = (('Date', 110), ('Description', 250), ('Priority', 55), ('Category', 100), ('Memo', 200), ('Due Date', 85), ('Completed', 0), ('ToDoNumber', 0))
	todo_items = todo_find(self.PtID)
	self.todo_list = EMR_utilities.buildCheckListCtrl(self, todo_columns, todo_items)
	
	lefttodo = wx.BoxSizer(wx.VERTICAL)
	righttodo = wx.BoxSizer(wx.VERTICAL)
	mainsizer = wx.BoxSizer(wx.HORIZONTAL)

        self.cal = wx.calendar.CalendarCtrl(self, -1, wx.DateTime_Now(),\
                             style = wx.calendar.CAL_SHOW_HOLIDAYS
                             | wx.calendar.CAL_SUNDAY_FIRST
                             | wx.calendar.CAL_SEQUENTIAL_MONTH_SELECTION)
        self.Bind(wx.calendar.EVT_CALENDAR, self.OnCalSelected, id=self.cal.GetId())

	buttons = (('Remove', self.OnRemove, lefttodo), ('Edit', self.OnEdit, lefttodo), \
		   ('Complete', self.OnComplete, lefttodo), \
		   ('Test', self.OnTest, lefttodo), ('Consult', self.OnConsult, lefttodo), \
		   ('Toggle', self.OnToggle, lefttodo), ('Not Done', self.OnNotDone, lefttodo))
	for label, handler, sizer in buttons:
	    EMR_utilities.buildOneButton(self, self, label, handler, sizer)
	
	self.addtodo = AddToDo(self, -1, self.PtID, self.todo_list)
	righttodo.Add(self.todoTitle, 0, wx.ALIGN_CENTER)
	righttodo.Add(self.todo_list, 1.5, wx.EXPAND|wx.ALL, 5)
	righttodo.Add(self.addtodo, 1, wx.EXPAND)
	righttodo.Add(self.cal, 1, wx.ALIGN_RIGHT|wx.ALL, 5)
	mainsizer.Add(lefttodo, 0, wx.ALL, 3)
	mainsizer.Add(righttodo, 1, wx.EXPAND|wx.ALL, 3)
	self.SetSizer(mainsizer)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:39,代码来源:ToDo.py

示例8: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [as 别名]
    def __init__(self, parent, id, ptID):
        wx.Panel.__init__(self, parent, id)

        self.ptID = ptID
	self.toggler = 'Current Meds'
	self.reviewed = 0
	meds = med_find(ptID)
	self.list = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
	self.list.SetColumns([
            ColumnDefn("Name", "left", 250, valueGetter="med_name"),
            ColumnDefn("Dose", "center", 180, valueGetter="dose"),
            ColumnDefn("Tablets", "center", 60, valueGetter="number_tablets"),
            ColumnDefn("Route", "left", 60, valueGetter="route"),
            ColumnDefn("Frequency", "left", 80, valueGetter="frequency"),
            ColumnDefn("#", "center", 40, valueGetter="number_pills"),
            ColumnDefn("Refills", "center", 50, valueGetter="refills"),
            ColumnDefn("Date", "left", 100, valueGetter="script_date")
            ])
	self.list.SetObjects(meds)
	self.list.cellEditMode = ObjectListView.CELLEDIT_DOUBLECLICK
	self.list.Bind(EVT_CELL_EDIT_STARTING, self.HandleCellEditStarting)
	self.list.Bind(EVT_CELL_EDIT_FINISHED, self.listHandleCellEditFinished)
	
	leftmed = wx.BoxSizer(wx.VERTICAL)
	rightmed = wx.BoxSizer(wx.VERTICAL)		
	mainmed = wx.BoxSizer(wx.HORIZONTAL)

	medbuttons = (('Archive', self.OnArchMed),
		   ('Print', self.OnpRintMed),
		   ('Delete', self.OnDeleteMed),
		   ('Toggle', self.OnToggleMed),
                   ('Interactions', self.OnInteractions),
		   ('Reviewed', self.OnReviewed))
	for label, handler in medbuttons:
	    EMR_utilities.buildOneButton(self, self, label, handler, leftmed)

	
	allergies = allergy_find(ptID)
	self.allergylist = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
	self.allergylist.SetColumns([
            ColumnDefn("Allergy", "left", 200, valueGetter = "allergy"),
            ColumnDefn("Reaction", "left", 250, valueGetter = "reaction")
            ])
	self.allergylist.SetObjects(allergies)
	self.allergylist.cellEditMode = ObjectListView.CELLEDIT_DOUBLECLICK
        self.allergylist.Bind(EVT_CELL_EDIT_STARTING, self.HandleCellEditStarting)
        self.allergylist.Bind(EVT_CELL_EDIT_FINISHED, self.allergyHandleCellEditFinished)
	
	leftall = wx.BoxSizer(wx.VERTICAL)
	rightall = wx.BoxSizer(wx.VERTICAL)
	mainall = wx.BoxSizer(wx.HORIZONTAL)

	allbuttons = (('Add', self.OnNewAll, leftall), ('Remove', self.OnRemAll, leftall))	
	for label, handler, sizer in allbuttons:
	    EMR_utilities.buildOneButton(self, self, label, handler, sizer)
	addmed = AddMed(self, -1, self.ptID)
#Set the sizers	that have not already been set
	mainsizer = wx.BoxSizer(wx.VERTICAL)
	rightmed.Add(self.list, 1, wx.EXPAND | wx.TOP, 3)
	self.medtitle = wx.StaticText(self, -1, self.toggler)
	titlefont = wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.BOLD)
	self.medtitle.SetFont(titlefont)
	mainmed.Add(leftmed, 0)
	mainmed.Add((15, -1))
	mainmed.Add(rightmed, 1, wx.EXPAND)
	rightall.Add(self.allergylist, 1, wx.EXPAND | wx.TOP, 3)
	rightmed.Add(addmed, 1, wx.EXPAND)
	mainall.Add(leftall, 0)
	mainall.Add((15, -1))
	mainall.Add(rightall, 1, wx.EXPAND)
	mainsizer.Add(mainall, 2, wx.EXPAND)
	mainsizer.Add(self.medtitle, 0, wx.ALIGN_CENTER | wx.ALL, 5)
	mainsizer.Add(mainmed, 4, wx.EXPAND)
	mainsizer.Add((-1, 5))
		
        self.SetSizer(mainsizer)
        self.Centre()
        self.Show(True)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:80,代码来源:Meds.py

示例9: __init__

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

#.........这里部分代码省略.........
	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)
	self.Bind(wx.EVT_RADIOBOX, self.OnSelectAcc, accBox)
	sizer.Add(accBox, pos=(4, 3), span=(1, 3))
	
	self.emplList = ['n/a', 'employed', 'full time student', 'part time student']
	emplBox = wx.RadioBox(self.panel, -1, "Employment Status?", choices=self.emplList)
	self.Bind(wx.EVT_RADIOBOX, self.OnSelectEmpl, emplBox)
	sizer.Add(emplBox, pos=(5, 3), span=(1, 3))

	self.marList = ['n/a', 'single', 'married', 'other']
	marBox = wx.RadioBox(self.panel, -1, "Marital status", choices=self.marList)
	self.Bind(wx.EVT_RADIOBOX, self.OnSelectMar, marBox)
	sizer.Add(marBox, pos=(6, 3), span=(1, 3))

	
	otherInsBox = wx.CheckBox(self.panel, -1, "Check if there is other insurance")
	sizer.Add(otherInsBox, pos=(1, 3))
	self.Bind(wx.EVT_CHECKBOX, self.OnSelectOtherIns, otherInsBox)

	self.billSecInsBox = wx.CheckBox(self.panel, -1, "Bill secondary insurance?")
	self.billSecAsPrim = wx.CheckBox(self.panel, -1, "as Primary?")
	secSizer = wx.BoxSizer(wx.HORIZONTAL)
	secSizer.Add(self.billSecInsBox, 0, wx.RIGHT, 5)
	secSizer.Add(self.billSecAsPrim, 0)
	sizer.Add(secSizer, pos=(2, 3))
	self.Bind(wx.EVT_CHECKBOX, self.OnSelectSecIns, self.billSecInsBox)

	self.billForSue = wx.CheckBox(self.panel, -1, "Sue Leon is rendering provider")
	sizer.Add(self.billForSue, pos=(3, 3))
	self.Bind(wx.EVT_CHECKBOX, self.OnBillForSue, self.billForSue)
	
	sizer.Add(wx.StaticText(self.panel, -1, "Date of Injury/Illness?"), pos=(7, 3))
	dpc = wx.TextCtrl(self.panel, size=(120,-1))
	sizer.Add(dpc, pos=(8, 3))
        self.Bind(wx.EVT_KILL_FOCUS, self.OnDateChanged, dpc)
	#below pulls problem date from problem list; if not available then puts in the note's date
	dxQry = 'SELECT short_des FROM icd10 WHERE icd10 = "%s";' % self.myparent.textctrl['ICD #1'].GetValue()
	dx = EMR_utilities.getData(dxQry)
	probDateQry = 'SELECT prob_date FROM problems10 WHERE short_des = "%s" AND patient_ID = %s;' % (dx[0], self.PtID)
	probDate = EMR_utilities.getData(probDateQry)
	if probDate:
	    dpc.SetValue(str(probDate[0]))
	else: 
	    dpc.SetValue(self.myparent.textctrl['Date'].GetValue()[:10])

	self.hospAdmBox = wx.CheckBox(self.panel, -1, "Hospital Admission?")
	sizer.Add(self.hospAdmBox, pos=(9, 3))
	self.admit_dpc = wx.DatePickerCtrl(self.panel, size=(100,-1), style = wx.DP_DEFAULT | wx.DP_SHOWCENTURY | wx.DP_ALLOWNONE)
	sizer.Add(self.admit_dpc, pos=(10, 3))
	self.admit_dpc.Show(False)
	self.Bind(wx.EVT_DATE_CHANGED, self.OnAdmitDateChanged, self.admit_dpc)
	self.Bind(wx.EVT_CHECKBOX, self.OnHospAdmCheck, self.hospAdmBox)

	self.hospDC_Text = wx.StaticText(self.panel, -1, "Hospital Discharge")
	sizer.Add(self.hospDC_Text, pos=(8, 4))
	self.hospDC_Text.Show(False)
	self.dc_dpc = wx.DatePickerCtrl(self.panel, size=(100,-1), style = wx.DP_DEFAULT | wx.DP_SHOWCENTURY | wx.DP_ALLOWNONE)
	self.dc_dpc.Show(False)
	sizer.Add(self.dc_dpc, pos=(9, 4))
	self.Bind(wx.EVT_DATE_CHANGED, self.OnDischargeDateChanged, self.dc_dpc)

	self.FieldText = wx.StaticText(self.panel, -1, "Column:Content eg, 62:marcaine 1% 3cc")
	sizer.Add(self.FieldText, pos=(7, 1), span=(1, 2))
	self.Field1 = wx.TextCtrl(self.panel, size=(200, -1))
	sizer.Add(self.Field1, pos=(8, 1), span=(1, 2))
	self.Field1.Bind(wx.EVT_KILL_FOCUS, self.OnFieldLoseFocus, self.Field1)
	

	doneBtn = EMR_utilities.buildOneButton(self, self.panel, "Done", self.OnDone)
	sizer.Add(doneBtn, pos=(11, 1))
        
	self.panel.SetSizer(sizer)

	dt = time.strptime(dpc.GetValue(), "%Y-%m-%d")
	self.columns[74] = time.strftime("%m/%d/%y", dt)
开发者ID:barronmo,项目名称:gecko_emr,代码行数:104,代码来源:CreateCMS.py

示例10: __init__

# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import buildOneButton [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.buildOneButton方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。