Example #1
0
	def __init__(self, parent,id=-1):
		self.patientID=None
		wxPanel.__init__(self,parent,id,wxDefaultPosition,wxDefaultSize,style = wxRAISED_BORDER)
		PatientHolder.__init__(self)
		self.parent=parent
		self.create_widgets()
		self.layout_widgets()
		self.register_interests()
		self._con = gmPG.ConnectionPool()
Example #2
0
 def __init__(self, parent, id=-1):
     self.patientID = None
     wxPanel.__init__(self,
                      parent,
                      id,
                      wxDefaultPosition,
                      wxDefaultSize,
                      style=wxRAISED_BORDER)
     PatientHolder.__init__(self)
     self.parent = parent
     self.create_widgets()
     self.layout_widgets()
     self.register_interests()
     self._con = gmPG.ConnectionPool()
Example #3
0
    def __init__(self, parent, id):
        wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize,
                         wxRAISED_BORDER)
        PatientHolder.__init__(self)

        #--------------------
        #add the main heading
        #--------------------
        self.pasthistorypanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(
            self, -1, " PAST HISTORY  ")
        #----------------------------------
        #dummy panel above the editing area
        #----------------------------------
        self.dummypanel1 = wxPanel(self, -1, wxDefaultPosition, wxDefaultSize,
                                   0)
        self.dummypanel1.SetBackgroundColour(wxColor(222, 222, 222))
        #--------------------------------------------------
        #now create the editarea specific for past history
        #-------------------------------------------------
        #self.editarea = gmEditArea.EditArea(self,-1,pasthistoryprompts,gmSECTION_PASTHISTORY)
        self.editarea = gmEditArea.gmPastHistoryEditArea(self, -1)
        self.dummypanel2 = wxPanel(self, -1, wxDefaultPosition, wxDefaultSize,
                                   0)
        self.dummypanel2.SetBackgroundColour(wxColor(222, 222, 222))
        #-----------------------------------------------
        #add the divider headings below the editing area
        #-----------------------------------------------
        self.significant_history_heading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, _("Significant Past Problems"))
        self.sizer_significant_history_heading = wxBoxSizer(wxHORIZONTAL)
        self.sizer_significant_history_heading.Add(
            self.significant_history_heading, 1, wxEXPAND)
        #--------------------------------------------------------------------------------------
        #add the list of significant problems
        #
        # c++ Default Constructor:
        # wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
        # const wxSize& size = wxDefaultSize, long style = wxLC_ICON,
        # const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
        #
        #--------------------------------------------------------------------------------------
        #self.significant_problem_list = wxListCtrl(self, ID_SIGNIFICANTPASTHISTORYLIST,  wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
        self.significant_problem_list = gmMultiColumnList.MultiColumnList(
            self, -1)
        self.significant_problem_list.SetFont(
            wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ''))
        #self.active_problem_list = wxListCtrl(self, ID_ACTIVEPROBLEMLIST,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
        self.active_problem_list = gmMultiColumnList.MultiColumnList(self, -1)
        self.active_problem_list.SetFont(
            wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ''))
        #---------------------------------------------------------
        # add some dummy data to the significant past problem list
        #---------------------------------------------------------
        #self.significant_problem_list.InsertColumn(0, _("year onset"))
        #self.significant_problem_list.InsertColumn(1, _("Condition"))
        #self.significant_problem_list.InsertColumn(2, _("Notes"))
        #-------------------------------------------------------------------------
        #loop through the significanthistorydata array and add to the list control
        #note the different syntax for the first column of each row
        #i.e. here > self.significant_problem_list.InsertItem(x, data[0])!!
        #--------------------------------------------------------------------------
        #self.significant_mapper = gmListCtrlMapper(self.significant_problem_list)
        #self.significant_mapper.SetData( significanthistorydata)
        self.significant_problem_list.SetData(significanthistorydata)
        #items = significanthistorydata.items()
        #for x in range(len(items)):
        #	key, data = items[x]
        #	gmLog.gmDefLog.Log (gmLog.lData, items[x])
        #	self.significant_problem_list.InsertItem(x, data[0])
        #	self.significant_problem_list.SetItem(x, 1, data[1])
        #	self.significant_problem_list.SetItemData(x, key)
        #	self.significant_problem_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
        #self.significant_problem_list.SetColumnWidth(1, wxLIST_AUTOSIZE)
        #------------------------------------------------
        #add some dummy data to the active problems list
        #------------------------------------------------
        #self.active_problem_list.InsertColumn(0, _("Year Onset"))
        #self.active_problem_list.InsertColumn(1, _("Condition"))
        #self.active_problem_list.InsertColumn(2, _("Notes"))
        #-------------------------------------------------------------
        #loop through the activehistorydata array and add to the list control
        #note the different syntax for the first column of each row
        #i.e. here > self.significant_problem_list.InsertItem(x, data[0])!!
        #-------------------------------------------------------------
        #self.active_mapper = gmListCtrlMapper(self.active_problem_list)
        #self.active_mapper.SetData( activehistorydata)
        self.active_problem_list.SetData(activehistorydata)

        #items = activehistorydata.items()
        #for x in range(len(items)):
        #	key, data = items[x]
        #	gmLog.gmDefLog.Log (gmLog.lData, items[x])
        #	self.active_problem_list.InsertItem(x, data[0])
        #	self.active_problem_list.SetItem(x, 1, data[1])
        #	self.active_problem_list.SetItemData(x, key)
        #self.active_problem_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
        #self.active_problem_list.SetColumnWidth(1, wxLIST_AUTOSIZE)
        #--------------------------------------------------------------------------------------
        #add a richtext control or a wxTextCtrl multiline to display the class text information
        #e.g. would contain say information re the penicillins
        #--------------------------------------------------------------------------------------
        self.active_problems_heading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, _("Active Problems"))
        #----------------------------------------
        #add an alert caption panel to the bottom
        #----------------------------------------
        self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(
            self, -1, "  Alerts  ")
        #---------------------------------------------
        #add all elements to the main background sizer
        #---------------------------------------------
        self.mainsizer = wxBoxSizer(wxVERTICAL)
        self.mainsizer.Add(self.pasthistorypanelheading, 0, wxEXPAND)
        #self.mainsizer.Add(self.dummypanel1,0,wxEXPAND)
        self.mainsizer.Add(self.editarea, 6, wxEXPAND)
        #self.mainsizer.Add(self.dummypanel2,0,wxEXPAND)
        self.mainsizer.Add(self.significant_history_heading, 0, wxEXPAND)
        self.mainsizer.Add(self.significant_problem_list, 4, wxEXPAND)
        self.mainsizer.Add(self.active_problems_heading, 0, wxEXPAND)
        self.mainsizer.Add(self.active_problem_list, 4, wxEXPAND)
        self.mainsizer.Add(self.alertpanel, 0, wxEXPAND)
        self.SetSizer(self.mainsizer)
        self.mainsizer.Fit
        self.SetAutoLayout(True)
        self.Show(True)

        gmDispatcher.connect(self._updateUI, 'clin_history_updated')

        self.significant_problem_list.addItemListener(
            self._significantPastItemSelected)

        self.active_problem_list.addItemListener(self._activePastItemSelected)
Example #4
0
    def __init__(self, parent, id):
        wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize,
                         wxRAISED_BORDER)
        PatientHolder.__init__(self)
        # main heading
        self.FamilyHistoryPanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(
            self, -1, "  FAMILY AND SOCIAL HISTORY  ")
        # editarea
        self.editarea = gmEditArea.gmFamilyHxEditArea(self, -1)
        #self.editarea = gmFamilyHxEditArea(self, -1)
        #-----------------------------------------------
        #add the divider headings below the editing area
        #-----------------------------------------------
        self.family_members_heading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, "Family Members")
        self.members_disease_conditions = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, "Condition")
        self.sizer_divider_members_condition = wxBoxSizer(wxHORIZONTAL)
        self.sizer_divider_members_condition.Add(self.family_members_heading,
                                                 1, wxEXPAND)
        self.sizer_divider_members_condition.Add(
            self.members_disease_conditions, 1, wxEXPAND)
        #--------------------------------------------------------------------------------------
        #add the list to contain the family members
        #
        # c++ Default Constructor:
        # wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
        # const wxSize& size = wxDefaultSize, long style = wxLC_ICON,
        # const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
        #
        #--------------------------------------------------------------------------------------
        self.family_members_list = wxListCtrl(
            self, ID_FAMILYMEMBERSLIST, wxDefaultPosition, wxDefaultSize,
            wxLC_REPORT | wxLC_NO_HEADER | wxSUNKEN_BORDER)
        self.family_members_list.SetFont(
            wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ''))
        self.member_conditions_list = wxListCtrl(
            self, ID_MEMBERCONDITIONSLIST, wxDefaultPosition, wxDefaultSize,
            wxLC_REPORT | wxLC_NO_HEADER | wxSUNKEN_BORDER)
        self.member_conditions_list.SetFont(
            wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ''))
        self.sizer_members_conditions = wxBoxSizer(wxHORIZONTAL)
        self.sizer_members_conditions.Add(self.family_members_list, 4,
                                          wxEXPAND)
        self.sizer_members_conditions.Add(self.member_conditions_list, 6,
                                          wxEXPAND)
        #----------------------------------------
        # add some dummy data to the Members list
        #-----------------------------------------
        self.family_members_list.InsertColumn(0, "Member")
        self.family_members_list.InsertColumn(1, "null")
        #-------------------------------------------------------------
        #loop through the familymemberdata array and add to the list control
        #note the different syntax for the first coloum of each row
        #i.e. here > self.family_members_list.InsertItem(x, data[0])!!
        #-------------------------------------------------------------
        items = familymemberdata.items()
        for x in range(len(items)):
            key, data = items[x]
            #gmLog.gmDefLog.Log (gmLog.lData, items[x])
            self.family_members_list.InsertItem(x, data[0])
            self.family_members_list.SetItem(x, 1, data[1])
            self.family_members_list.SetItemData(x, key)
        self.family_members_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
        #-------------------------------------------
        # add some dummy data to the conditions list
        #-------------------------------------------
        self.member_conditions_list.InsertColumn(0, "Condition")
        self.member_conditions_list.InsertColumn(1, "null")
        #-------------------------------------------------------------
        #loop through the familymemberdata array and add to the list control
        #note the different syntax for the first coloum of each row
        #i.e. here > self.family_members_list.InsertItem(x, data[0])!!
        #-------------------------------------------------------------
        items = membersconditionsdata.items()
        for x in range(len(items)):
            key, data = items[x]
            #gmLog.gmDefLog.Log (gmLog.lData, items[x])
            self.member_conditions_list.InsertItem(x, data[0])
            self.member_conditions_list.SetItem(x, 1, data[1])
            self.member_conditions_list.SetItemData(x, key)

        self.member_conditions_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
        self.member_conditions_list.SetColumnWidth(1, wxLIST_AUTOSIZE)
        #------------------------------------------------------------------------------------------
        #add a richtext control or a wxTextCtrl multiline to allow user to enter the social history
        #------------------------------------------------------------------------------------------
        self.social_history_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, "Social History")
        self.txt_social_history = wxTextCtrl(
            self,
            30,
            "Born in QLD, son of an itinerant drover. Mother worked as a bush nurse. "
            "Two brothers, Fred and Peter. Left school aged 15yrs, apprentice fitter "
            "then worked in industry for 10ys. At 22yrs age married Joan, two children"
            "Peter b1980 and Rachaelb1981. Retired in 1990 due to receiving a fortune.",
            wxDefaultPosition,
            wxDefaultSize,
            style=wxTE_MULTILINE | wxNO_3D | wxSIMPLE_BORDER)
        self.txt_social_history.SetInsertionPoint(0)
        self.txt_social_history.SetFont(
            wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ''))
        #----------------------------------------
        #add an alert caption panel to the bottom
        #----------------------------------------
        self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(
            self, -1, "  Alerts  ")
        #---------------------------------------------
        #add all elements to the main background sizer
        #---------------------------------------------
        self.mainsizer = wxBoxSizer(wxVERTICAL)
        self.mainsizer.Add(self.FamilyHistoryPanelheading, 0, wxEXPAND)
        #		self.mainsizer.Add(self.dummypanel1,1,wxEXPAND)
        self.mainsizer.Add(self.editarea, 6, wxEXPAND)
        self.mainsizer.Add(self.sizer_divider_members_condition, 0, wxEXPAND)
        self.mainsizer.Add(self.sizer_members_conditions, 4, wxEXPAND)
        self.mainsizer.Add(self.social_history_subheading, 0, wxEXPAND)
        self.mainsizer.Add(self.txt_social_history, 4, wxEXPAND)
        self.mainsizer.Add(self.alertpanel, 0, wxEXPAND)
        self.SetSizer(self.mainsizer)
        self.mainsizer.Fit(self)
        self.SetAutoLayout(True)
        EVT_SIZE(self, self.OnSize)
Example #5
0
	def __init__(self,parent, id):
		#wxPanel.__init__(self,parent, id)
		wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER)
		PatientHolder.__init__(self)
		#--------------------
		#add the main heading
		#--------------------
		self.scriptpanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self,-1,"  SCRIPTS  ")
		#--------------------------------------------
		#sizer to hold either just date, or the
		#authority details, aia, authority number
		#--------------------------------------------
		self.sizer_authority  = wxGridSizer(1,0,0,0)
		self.sizer1 = wxBoxSizer(wxHORIZONTAL)
		self.txt_scriptDate = wxTextCtrl(self,-1,"12/06/2002",wxDefaultPosition,wxDefaultSize)
		self.spacer = wxWindow(self,-1, wxDefaultPosition,wxDefaultSize,0) 
		self.spacer.SetBackgroundColour(wxColor(222,222,222))
		#self.lbl_authorityindication = gmEditArea.EditAreaPromptLabel(self,-1,"Indication")
		#self.lbl_authoritynumber = gmEditArea.EditAreaPromptLabel(self,-1,"Auth No.")
		#self.txt_authorityindication =  wxTextCtrl(self,-1,"",wxDefaultPosition,wxDefaultSize)
		#self.txt_authorityindication.Hide()
		#self.sizer_authority.Add(self.spacer,1,wxEXPAND)
		self.sizer1.Add(1,0,20)
		self.sizer1.Add(self.txt_scriptDate,3,wxEXPAND|wxALL,3)
		#self.sizer1.Add(1,0,1)
		self.sizer_authority.Add(self.sizer1,0,wxEXPAND)
		#-------------------------------------------------
		#now create the editarea specific for prescribing
		#-------------------------------------------------
		#self.editarea = gmEditArea.EditArea(self,-1,scriptprompts,gmSECTION_SCRIPT)
		self.editarea = gmEditArea.gmPrescriptionEditArea(self,-1)
		#---------------------------------------------------------------------
		#add the divider headings below the editing area for drug interactions
		#and add text control to show mini-drug interactions
		#---------------------------------------------------------------------
		self.interactiontext_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Drug Interactions"))
		self.sizer_divider_interaction_text = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_divider_interaction_text.Add(self.interactiontext_subheading,1, wxEXPAND)
		self.interactiontxt = wxTextCtrl(self,-1,
			"Mini-Drug interaction text goes here (click this for full description)\n \n"
			"Also, try clicking on the list below with the right mouse button to see a pop up menu",		    
			style=wxTE_MULTILINE)
		self.interactiontxt.SetFont(wxFont(10,wxSWISS,wxNORMAL,wxNORMAL,False,''))
		#------------------------------------------------------------------------------------
		#add the divider headings below the drug interactions as heading for items prescribed
		#------------------------------------------------------------------------------------
		self.itemsprescribedheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Items prescribed this consultation"))
		self.sizer_itemsprescribed = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_itemsprescribed.Add(self.itemsprescribedheading,1, wxEXPAND)
		#--------------------------------------------------------------------------------------                                                                               
		#add the list to contain the drugs person is allergic to
		#
		# c++ Default Constructor:
		# wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
		# const wxSize& size = wxDefaultSize, long style = wxLC_ICON, 
		# const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
		#
		#--------------------------------------------------------------------------------------
		self.list_script = wxListCtrl(self, -1,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		self.list_script.SetFont(wxFont(10,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		EVT_RIGHT_UP(self.list_script, self.OnRightClickUp)
		#----------------------------------------
		# add some dummy data to the allergy list
		self.list_script.InsertColumn(0, _("Drug"))
		self.list_script.InsertColumn(1, _("Strength"))
		self.list_script.InsertColumn(2, _("Directions"))
		self.list_script.InsertColumn(3, _("For"))
		#-------------------------------------------------------------
		#loop through the scriptdata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.list_script.InsertStringItem(x, data[0])!!
		#-------------------------------------------------------------
		items = scriptdata.items()
		for x in range(len(items)):
			key, data = items[x]
			self.list_script.InsertStringItem(x, data[0])
			self.list_script.SetStringItem(x, 1, data[1])
			self.list_script.SetStringItem(x, 2, data[2])
			self.list_script.SetStringItem(x, 3, data[3])
			self.list_script.SetItemData(x, key)

		self.list_script.SetColumnWidth(0, wxLIST_AUTOSIZE)
		self.list_script.SetColumnWidth(1, wxLIST_AUTOSIZE)
		self.list_script.SetColumnWidth(2, wxLIST_AUTOSIZE)
		self.list_script.SetColumnWidth(3, wxLIST_AUTOSIZE)
		#----------------------------------------
		#add an alert caption panel to the bottom
		#----------------------------------------
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,"  Alerts  ")
		#---------------------------------------------
		#add all elements to the main background sizer
		#---------------------------------------------
		self.mainsizer = wxBoxSizer(wxVERTICAL)
		self.mainsizer.Add(self.scriptpanelheading,0,wxEXPAND)
		self.mainsizer.Add(self.sizer_authority,1,wxEXPAND)
		self.mainsizer.Add(self.editarea,15,wxEXPAND)
		self.mainsizer.Add(self.sizer_divider_interaction_text,0,wxEXPAND)
		self.mainsizer.Add(self.interactiontxt,4,wxEXPAND)
		self.mainsizer.Add(self.itemsprescribedheading,0,wxEXPAND)
		self.mainsizer.Add(self.list_script,4,wxEXPAND)
		self.mainsizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.mainsizer)
		self.SetAutoLayout(True)
		self.Show(True)
Example #6
0
	def __init__(self, parent,id):
		wxPanel.__init__(self, parent, id,wxDefaultPosition,wxDefaultSize,wxRAISED_BORDER)
		PatientHolder.__init__(self)
		# main heading
		self.FamilyHistoryPanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self,-1,"  FAMILY AND SOCIAL HISTORY  ")
		# editarea
		self.editarea = gmEditArea.gmFamilyHxEditArea(self, -1)
		#self.editarea = gmFamilyHxEditArea(self, -1)
		#-----------------------------------------------
		#add the divider headings below the editing area
		#-----------------------------------------------
		self.family_members_heading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,"Family Members")
		self.members_disease_conditions = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,"Condition")
		self.sizer_divider_members_condition = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_divider_members_condition.Add(self.family_members_heading,1, wxEXPAND)
		self.sizer_divider_members_condition.Add( self.members_disease_conditions,1, wxEXPAND)
		#--------------------------------------------------------------------------------------
		#add the list to contain the family members
		#
		# c++ Default Constructor:
		# wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
		# const wxSize& size = wxDefaultSize, long style = wxLC_ICON, 
		# const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
		#
		#--------------------------------------------------------------------------------------
		self.family_members_list = wxListCtrl(self, ID_FAMILYMEMBERSLIST,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		self.family_members_list.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		self.member_conditions_list = wxListCtrl(self,ID_MEMBERCONDITIONSLIST,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		self.member_conditions_list.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		self.sizer_members_conditions = wxBoxSizer(wxHORIZONTAL)
		self.sizer_members_conditions.Add(self.family_members_list,4,wxEXPAND)
		self.sizer_members_conditions.Add(self.member_conditions_list,6, wxEXPAND)
		#----------------------------------------
		# add some dummy data to the Members list
		#-----------------------------------------
		self.family_members_list.InsertColumn(0, "Member")
		self.family_members_list.InsertColumn(1, "null")
		#-------------------------------------------------------------
		#loop through the familymemberdata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.family_members_list.InsertItem(x, data[0])!!
		#-------------------------------------------------------------
		items = familymemberdata.items()
		for x in range(len(items)):
			key, data = items[x]
			#gmLog.gmDefLog.Log (gmLog.lData, items[x])
			self.family_members_list.InsertItem(x, data[0])
			self.family_members_list.SetItem(x, 1, data[1])
			self.family_members_list.SetItemData(x, key)
		self.family_members_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
		#-------------------------------------------	  
		# add some dummy data to the conditions list
		#-------------------------------------------
		self.member_conditions_list.InsertColumn(0, "Condition")
		self.member_conditions_list.InsertColumn(1, "null")
		#-------------------------------------------------------------
		#loop through the familymemberdata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.family_members_list.InsertItem(x, data[0])!!
		#-------------------------------------------------------------
		items = membersconditionsdata.items()
		for x in range(len(items)):
			key, data = items[x]
			#gmLog.gmDefLog.Log (gmLog.lData, items[x])
			self.member_conditions_list.InsertItem(x, data[0])
			self.member_conditions_list.SetItem(x, 1, data[1])
			self.member_conditions_list.SetItemData(x, key)

		self.member_conditions_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
		self.member_conditions_list.SetColumnWidth(1, wxLIST_AUTOSIZE)
		#------------------------------------------------------------------------------------------
		#add a richtext control or a wxTextCtrl multiline to allow user to enter the social history
		#------------------------------------------------------------------------------------------
		self.social_history_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,"Social History")
		self.txt_social_history = wxTextCtrl(self, 30,
					"Born in QLD, son of an itinerant drover. Mother worked as a bush nurse. "
					"Two brothers, Fred and Peter. Left school aged 15yrs, apprentice fitter "
					"then worked in industry for 10ys. At 22yrs age married Joan, two children"
					"Peter b1980 and Rachaelb1981. Retired in 1990 due to receiving a fortune.",
					wxDefaultPosition,wxDefaultSize, style=wxTE_MULTILINE|wxNO_3D|wxSIMPLE_BORDER)
		self.txt_social_history.SetInsertionPoint(0)
		self.txt_social_history.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, False, ''))		
		#----------------------------------------
		#add an alert caption panel to the bottom
		#----------------------------------------
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,"  Alerts  ")
		#---------------------------------------------
		#add all elements to the main background sizer
		#---------------------------------------------
		self.mainsizer = wxBoxSizer(wxVERTICAL)
		self.mainsizer.Add(self.FamilyHistoryPanelheading,0,wxEXPAND)
#		self.mainsizer.Add(self.dummypanel1,1,wxEXPAND)
		self.mainsizer.Add(self.editarea,6,wxEXPAND)
		self.mainsizer.Add(self.sizer_divider_members_condition,0,wxEXPAND)
		self.mainsizer.Add(self.sizer_members_conditions,4,wxEXPAND)
		self.mainsizer.Add(self.social_history_subheading,0,wxEXPAND)
		self.mainsizer.Add(self.txt_social_history,4,wxEXPAND)
		self.mainsizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.mainsizer)
		self.mainsizer.Fit (self)
		self.SetAutoLayout(True)
		EVT_SIZE (self, self.OnSize)
Example #7
0
    def __init__(self, parent, id):
        wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize,
                         wxRAISED_BORDER)
        PatientHolder.__init__(self)
        #--------------------
        #add the main heading
        #--------------------
        self.requestspanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(
            self, -1, "     REQUESTS     ")
        #--------------------------------------------

        #--------------------------------------------
        self.sizer_top = wxBoxSizer(wxHORIZONTAL)
        #FIXME remove the date text below
        self.txt_requestDate = wxTextCtrl(self, -1, "12/06/2002",
                                          wxDefaultPosition, wxDefaultSize)
        self.spacer = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize, 0)
        self.spacer.SetBackgroundColour(wxColor(222, 222, 222))
        self.sizer_top.Add(self.spacer, 6, wxEXPAND)
        self.sizer_top.Add(self.txt_requestDate, 1, wxEXPAND | wxALL, 2)
        self.sizer_top.Add(10, 0, 0)
        #---------------------------------------------
        #now create the editarea specific for requests
        #---------------------------------------------
        self.editarea = gmEditArea.gmRequestEditArea(self, -1)
        #-----------------------------------------------------------------
        #add the divider headings for requests generated this consultation
        #-----------------------------------------------------------------
        self.requestsgenerated_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, _("Requests generated this consultation"))
        self.sizer_requestsgenerated = wxBoxSizer(wxHORIZONTAL)
        self.sizer_requestsgenerated.Add(self.requestsgenerated_subheading, 1,
                                         wxEXPAND)
        #--------------------------------------------------------------------------------------
        #add the list to contain the requests the doctor has ordered for person this consult
        #
        # c++ Default Constructor:
        # wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
        # const wxSize& size = wxDefaultSize, long style = wxLC_ICON,
        # const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
        #
        #--------------------------------------------------------------------------------------
        self.list_requests = wxListCtrl(
            self, ID_REQUESTSLIST, wxDefaultPosition, wxDefaultSize,
            wxLC_REPORT | wxLC_NO_HEADER | wxSUNKEN_BORDER)
        self.list_requests.SetFont(
            wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ''))
        #----------------------------------------
        # add some dummy data to the allergy list
        self.list_requests.InsertColumn(0, _("Request summary"))
        self.list_requests.InsertColumn(1, "")
        #-------------------------------------------------------------
        #loop through the requestdata array and add to the list control
        #note the different syntax for the first coloum of each row
        #i.e. here > self.list_requests.InsertStringItem(x, data[0])!!
        #-------------------------------------------------------------
        items = requestdata.items()
        for x in range(len(items)):
            key, data = items[x]
            self.list_requests.InsertStringItem(x, data[0])
            self.list_requests.SetStringItem(x, 1, data[1])
            self.list_requests.SetItemData(x, key)
        self.list_requests.SetColumnWidth(0, wxLIST_AUTOSIZE)
        self.list_requests.SetColumnWidth(1, wxLIST_AUTOSIZE)
        #----------------------------------------
        #add an alert caption panel to the bottom
        #----------------------------------------
        self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(
            self, -1, "  Alerts  ")
        #---------------------------------------------
        #add all elements to the main background sizer
        #---------------------------------------------
        self.mainsizer = wxBoxSizer(wxVERTICAL)

        self.mainsizer.Add(self.requestspanelheading, 0, wxEXPAND)
        self.mainsizer.Add(0, 5, 0)
        self.mainsizer.Add(self.sizer_top, 0, wxEXPAND)
        self.mainsizer.Add(self.editarea, 9, wxEXPAND)
        self.mainsizer.Add(self.requestsgenerated_subheading, 0, wxEXPAND)
        self.mainsizer.Add(self.list_requests, 7, wxEXPAND)
        self.mainsizer.Add(self.alertpanel, 0, wxEXPAND)
        self.SetSizer(self.mainsizer)
        self.SetAutoLayout(True)
        self.Show(True)
Example #8
0
	def __init__(self,parent, id):
		#wxPanel.__init__(self,parent, id)
		wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER)
		PatientHolder.__init__(self)
		#--------------------
		#add the main heading
		#--------------------
		self.scriptpanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self,-1,"  SCRIPTS  ")
		#--------------------------------------------
		#sizer to hold either just date, or the
		#authority details, aia, authority number
		#--------------------------------------------
		self.sizer_authority  = wxGridSizer(1,0,0,0)
		self.sizer1 = wxBoxSizer(wxHORIZONTAL)
		self.txt_scriptDate = wxTextCtrl(self,-1,"12/06/2002",wxDefaultPosition,wxDefaultSize)
		self.spacer = wxWindow(self,-1, wxDefaultPosition,wxDefaultSize,0) 
		self.spacer.SetBackgroundColour(wxColor(222,222,222))
		#self.lbl_authorityindication = gmEditArea.EditAreaPromptLabel(self,-1,"Indication")
		#self.lbl_authoritynumber = gmEditArea.EditAreaPromptLabel(self,-1,"Auth No.")
		#self.txt_authorityindication =  wxTextCtrl(self,-1,"",wxDefaultPosition,wxDefaultSize)
		#self.txt_authorityindication.Hide()
		#self.sizer_authority.Add(self.spacer,1,wxEXPAND)
		self.sizer1.Add(1,0,20)
		self.sizer1.Add(self.txt_scriptDate,3,wxEXPAND|wxALL,3)
		#self.sizer1.Add(1,0,1)
		self.sizer_authority.Add(self.sizer1,0,wxEXPAND)
		#-------------------------------------------------
		#now create the editarea specific for prescribing
		#-------------------------------------------------
		#self.editarea = gmEditArea.EditArea(self,-1,scriptprompts,gmSECTION_SCRIPT)
		self.editarea = gmEditArea.gmPrescriptionEditArea(self,-1)
		#---------------------------------------------------------------------
		#add the divider headings below the editing area for drug interactions
		#and add text control to show mini-drug interactions
		#---------------------------------------------------------------------
		self.interactiontext_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Drug Interactions"))
		self.sizer_divider_interaction_text = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_divider_interaction_text.Add(self.interactiontext_subheading,1, wxEXPAND)
		self.interactiontxt = wxTextCtrl(self,-1,
			"Mini-Drug interaction text goes here (click this for full description)\n \n"
			"Also, try clicking on the list below with the right mouse button to see a pop up menu",		    
			style=wxTE_MULTILINE)
		self.interactiontxt.SetFont(wxFont(10,wxSWISS,wxNORMAL,wxNORMAL,False,''))
		#------------------------------------------------------------------------------------
		#add the divider headings below the drug interactions as heading for items prescribed
		#------------------------------------------------------------------------------------
		self.itemsprescribedheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Items prescribed this consultation"))
		self.sizer_itemsprescribed = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_itemsprescribed.Add(self.itemsprescribedheading,1, wxEXPAND)
		#--------------------------------------------------------------------------------------                                                                               
		#add the list to contain the drugs person is allergic to
		#
		# c++ Default Constructor:
		# wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
		# const wxSize& size = wxDefaultSize, long style = wxLC_ICON, 
		# const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
		#
		#--------------------------------------------------------------------------------------
		self.list_script = wxListCtrl(self, -1,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		self.list_script.SetFont(wxFont(10,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		EVT_RIGHT_UP(self.list_script, self.OnRightClickUp)
		#----------------------------------------
		# add some dummy data to the allergy list
		self.list_script.InsertColumn(0, _("Drug"))
		self.list_script.InsertColumn(1, _("Strength"))
		self.list_script.InsertColumn(2, _("Directions"))
		self.list_script.InsertColumn(3, _("For"))
		#-------------------------------------------------------------
		#loop through the scriptdata array and add to the list control
		#note the different syntax for the first column of each row
		#i.e. here > self.list_script.InsertItem(x, data[0])!!
		#-------------------------------------------------------------
		items = scriptdata.items()
		for x in range(len(items)):
			key, data = items[x]
			self.list_script.InsertItem(x, data[0])
			self.list_script.SetItem(x, 1, data[1])
			self.list_script.SetItem(x, 2, data[2])
			self.list_script.SetItem(x, 3, data[3])
			self.list_script.SetItemData(x, key)

		self.list_script.SetColumnWidth(0, wxLIST_AUTOSIZE)
		self.list_script.SetColumnWidth(1, wxLIST_AUTOSIZE)
		self.list_script.SetColumnWidth(2, wxLIST_AUTOSIZE)
		self.list_script.SetColumnWidth(3, wxLIST_AUTOSIZE)
		#----------------------------------------
		#add an alert caption panel to the bottom
		#----------------------------------------
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,"  Alerts  ")
		#---------------------------------------------
		#add all elements to the main background sizer
		#---------------------------------------------
		self.mainsizer = wxBoxSizer(wxVERTICAL)
		self.mainsizer.Add(self.scriptpanelheading,0,wxEXPAND)
		self.mainsizer.Add(self.sizer_authority,1,wxEXPAND)
		self.mainsizer.Add(self.editarea,15,wxEXPAND)
		self.mainsizer.Add(self.sizer_divider_interaction_text,0,wxEXPAND)
		self.mainsizer.Add(self.interactiontxt,4,wxEXPAND)
		self.mainsizer.Add(self.itemsprescribedheading,0,wxEXPAND)
		self.mainsizer.Add(self.list_script,4,wxEXPAND)
		self.mainsizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.mainsizer)
		self.SetAutoLayout(True)
		self.Show(True)
Example #9
0
	def __init__(self, parent,id):
		wxPanel.__init__(self, parent, id,wxDefaultPosition,wxDefaultSize,wxRAISED_BORDER)
		PatientHolder.__init__(self)

		#--------------------
		#add the main heading
		#--------------------
		self.pasthistorypanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self,-1, " PAST HISTORY  ")
		#----------------------------------
		#dummy panel above the editing area
		#----------------------------------
		self.dummypanel1 = wxPanel(self,-1,wxDefaultPosition,wxDefaultSize,0)
		self.dummypanel1.SetBackgroundColour(wxColor(222,222,222))
		#--------------------------------------------------
		#now create the editarea specific for past history
		#-------------------------------------------------
		#self.editarea = gmEditArea.EditArea(self,-1,pasthistoryprompts,gmSECTION_PASTHISTORY)
		self.editarea = gmEditArea.gmPastHistoryEditArea(self,-1)
		self.dummypanel2 = wxPanel(self,-1,wxDefaultPosition,wxDefaultSize,0)
		self.dummypanel2.SetBackgroundColour(wxColor(222,222,222))
		#-----------------------------------------------
		#add the divider headings below the editing area
		#-----------------------------------------------
		self.significant_history_heading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Significant Past Problems"))
		self.sizer_significant_history_heading = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_significant_history_heading.Add(self.significant_history_heading,1, wxEXPAND)
		#--------------------------------------------------------------------------------------                                                                               
		#add the list of significant problems
		#
		# c++ Default Constructor:
		# wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
		# const wxSize& size = wxDefaultSize, long style = wxLC_ICON, 
		# const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
		#
		#--------------------------------------------------------------------------------------
		#self.significant_problem_list = wxListCtrl(self, ID_SIGNIFICANTPASTHISTORYLIST,  wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		self.significant_problem_list = gmMultiColumnList.MultiColumnList(self, -1)
		self.significant_problem_list.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		#self.active_problem_list = wxListCtrl(self, ID_ACTIVEPROBLEMLIST,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		self.active_problem_list = gmMultiColumnList.MultiColumnList(self, -1)
		self.active_problem_list.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		#---------------------------------------------------------	  
		# add some dummy data to the significant past problem list
		#---------------------------------------------------------
		#self.significant_problem_list.InsertColumn(0, _("year onset"))
		#self.significant_problem_list.InsertColumn(1, _("Condition"))
		#self.significant_problem_list.InsertColumn(2, _("Notes"))
		#-------------------------------------------------------------------------
		#loop through the significanthistorydata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.significant_problem_list.InsertItem(x, data[0])!!
		#--------------------------------------------------------------------------
		#self.significant_mapper = gmListCtrlMapper(self.significant_problem_list)
		#self.significant_mapper.SetData( significanthistorydata)
		self.significant_problem_list.SetData( significanthistorydata)
		#items = significanthistorydata.items()
		#for x in range(len(items)):
		#	key, data = items[x]
		#	gmLog.gmDefLog.Log (gmLog.lData, items[x])
		#	self.significant_problem_list.InsertItem(x, data[0])
		#	self.significant_problem_list.SetItem(x, 1, data[1])
		#	self.significant_problem_list.SetItemData(x, key)
		#	self.significant_problem_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
		#self.significant_problem_list.SetColumnWidth(1, wxLIST_AUTOSIZE)
		#------------------------------------------------	  
		#add some dummy data to the active problems list
		#------------------------------------------------
		#self.active_problem_list.InsertColumn(0, _("Year Onset"))
		#self.active_problem_list.InsertColumn(1, _("Condition"))
		#self.active_problem_list.InsertColumn(2, _("Notes"))
		#-------------------------------------------------------------
		#loop through the activehistorydata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.significant_problem_list.InsertItem(x, data[0])!!
		#-------------------------------------------------------------
		#self.active_mapper = gmListCtrlMapper(self.active_problem_list)
		#self.active_mapper.SetData( activehistorydata)
		self.active_problem_list.SetData( activehistorydata)

		#items = activehistorydata.items()
		#for x in range(len(items)):
		#	key, data = items[x]
		#	gmLog.gmDefLog.Log (gmLog.lData, items[x])
		#	self.active_problem_list.InsertItem(x, data[0])
		#	self.active_problem_list.SetItem(x, 1, data[1])
		#	self.active_problem_list.SetItemData(x, key)
		#self.active_problem_list.SetColumnWidth(0, wxLIST_AUTOSIZE)
		#self.active_problem_list.SetColumnWidth(1, wxLIST_AUTOSIZE)
		#--------------------------------------------------------------------------------------
		#add a richtext control or a wxTextCtrl multiline to display the class text information
		#e.g. would contain say information re the penicillins
		#--------------------------------------------------------------------------------------
		self.active_problems_heading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Active Problems"))
		#----------------------------------------
		#add an alert caption panel to the bottom
		#----------------------------------------
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,"  Alerts  ")
		#---------------------------------------------                                                                               
		#add all elements to the main background sizer
		#---------------------------------------------
		self.mainsizer = wxBoxSizer(wxVERTICAL)
		self.mainsizer.Add(self.pasthistorypanelheading,0,wxEXPAND)
		#self.mainsizer.Add(self.dummypanel1,0,wxEXPAND)
		self.mainsizer.Add(self.editarea,6,wxEXPAND)
		#self.mainsizer.Add(self.dummypanel2,0,wxEXPAND)
		self.mainsizer.Add(self.significant_history_heading,0,wxEXPAND)
		self.mainsizer.Add(self.significant_problem_list,4,wxEXPAND)
		self.mainsizer.Add(self.active_problems_heading,0,wxEXPAND)
		self.mainsizer.Add(self.active_problem_list,4,wxEXPAND)
		self.mainsizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.mainsizer)
		self.mainsizer.Fit
		self.SetAutoLayout(True)
		self.Show(True)

		gmDispatcher.connect(self._updateUI,  'clin_history_updated')
	
		self.significant_problem_list.addItemListener( self._significantPastItemSelected)	

		self.active_problem_list.addItemListener(self._activePastItemSelected)
Example #10
0
    def __init__(self, parent, id):
        wxPanel.__init__(self, parent, id, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER)
        PatientHolder.__init__(self)
        # --------------------
        # add the main heading
        # --------------------
        self.requestspanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self, -1, "     REQUESTS     ")
        # --------------------------------------------

        # --------------------------------------------
        self.sizer_top = wxBoxSizer(wxHORIZONTAL)
        # FIXME remove the date text below
        self.txt_requestDate = wxTextCtrl(self, -1, "12/06/2002", wxDefaultPosition, wxDefaultSize)
        self.spacer = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize, 0)
        self.spacer.SetBackgroundColour(wxColor(222, 222, 222))
        self.sizer_top.Add(self.spacer, 6, wxEXPAND)
        self.sizer_top.Add(self.txt_requestDate, 1, wxEXPAND | wxALL, 2)
        self.sizer_top.Add(10, 0, 0)
        # ---------------------------------------------
        # now create the editarea specific for requests
        # ---------------------------------------------
        self.editarea = gmEditArea.gmRequestEditArea(self, -1)
        # -----------------------------------------------------------------
        # add the divider headings for requests generated this consultation
        # -----------------------------------------------------------------
        self.requestsgenerated_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(
            self, -1, _("Requests generated this consultation")
        )
        self.sizer_requestsgenerated = wxBoxSizer(wxHORIZONTAL)
        self.sizer_requestsgenerated.Add(self.requestsgenerated_subheading, 1, wxEXPAND)
        # --------------------------------------------------------------------------------------
        # add the list to contain the requests the doctor has ordered for person this consult
        #
        # c++ Default Constructor:
        # wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
        # const wxSize& size = wxDefaultSize, long style = wxLC_ICON,
        # const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
        #
        # --------------------------------------------------------------------------------------
        self.list_requests = wxListCtrl(
            self, ID_REQUESTSLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER | wxSUNKEN_BORDER
        )
        self.list_requests.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, False, ""))
        # ----------------------------------------
        # add some dummy data to the allergy list
        self.list_requests.InsertColumn(0, _("Request summary"))
        self.list_requests.InsertColumn(1, "")
        # -------------------------------------------------------------
        # loop through the requestdata array and add to the list control
        # note the different syntax for the first coloum of each row
        # i.e. here > self.list_requests.InsertStringItem(x, data[0])!!
        # -------------------------------------------------------------
        items = requestdata.items()
        for x in range(len(items)):
            key, data = items[x]
            self.list_requests.InsertStringItem(x, data[0])
            self.list_requests.SetStringItem(x, 1, data[1])
            self.list_requests.SetItemData(x, key)
        self.list_requests.SetColumnWidth(0, wxLIST_AUTOSIZE)
        self.list_requests.SetColumnWidth(1, wxLIST_AUTOSIZE)
        # ----------------------------------------
        # add an alert caption panel to the bottom
        # ----------------------------------------
        self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self, -1, "  Alerts  ")
        # ---------------------------------------------
        # add all elements to the main background sizer
        # ---------------------------------------------
        self.mainsizer = wxBoxSizer(wxVERTICAL)

        self.mainsizer.Add(self.requestspanelheading, 0, wxEXPAND)
        self.mainsizer.Add(0, 5, 0)
        self.mainsizer.Add(self.sizer_top, 0, wxEXPAND)
        self.mainsizer.Add(self.editarea, 9, wxEXPAND)
        self.mainsizer.Add(self.requestsgenerated_subheading, 0, wxEXPAND)
        self.mainsizer.Add(self.list_requests, 7, wxEXPAND)
        self.mainsizer.Add(self.alertpanel, 0, wxEXPAND)
        self.SetSizer(self.mainsizer)
        self.SetAutoLayout(True)
        self.Show(True)
Example #11
0
	def __init__(self, parent,id):
		wxPanel.__init__(self,parent,id,wxDefaultPosition,wxDefaultSize,style = wxRAISED_BORDER)
		PatientHolder.__init__(self)
		#------------------------------------------------------------------------
		#import social history if available this will be the top item on the page
		#------------------------------------------------------------------------
		try:
			import gmGP_SocialHistory
			self.socialhistory = gmGP_SocialHistory.SocialHistory(self,-1)
		except:
			pass
		#------------------------------------------------------------------------
		#import social history if available this will be the top item on the page
		#------------------------------------------------------------------------
		try:
			import gmGP_FamilyHistorySummary
			self.familyhistorysummary = gmGP_FamilyHistorySummary.FamilyHistorySummary(self,-1)
		except:
			pass
		#---------------------------------------
		#import active problem list if available 
		#---------------------------------------
		try:
			import gmGP_ActiveProblems
			self.activeproblemlist = gmGP_ActiveProblems.ActiveProblems(self,-1)
		except:
			pass	       
		#------------------------------
		#import habits and risk factors
		#------------------------------
		try:
			import gmGP_HabitsRiskFactors
			self.habitsriskfactors = gmGP_HabitsRiskFactors.HabitsRiskFactors(self,-1)
		except:
			pass
		#------------
		#import inbox
		#------------
		try:
			import gmGP_Inbox
			self.inbox = gmGP_Inbox.Inbox(self,-1)
		except:
			sys.exit(0)
			pass

		self.heading1 = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Active Problems" ))
		self.heading2 = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("     Habits            Risk Factors"))
		self.heading3 = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Inbox"))
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,_("   Alerts   "))
		#------------------------------------------------------------ 
		#now that we have all the elements, construct the whole panel
		#------------------------------------------------------------
		# FIXME: NO !! maybe we DON'T have all the elements ...
		self.sizer = wxBoxSizer(wxVERTICAL)
		self.sizer.Add(self.socialhistory,5,wxEXPAND)
		self.sizer.Add(self.familyhistorysummary,5,wxEXPAND)
		self.sizer.Add(self.heading1,0,wxEXPAND)
		self.sizer.Add(self.activeproblemlist,8,wxEXPAND)
		self.sizer.Add(self.heading2,0,wxEXPAND)
		self.sizer.Add(self.habitsriskfactors,5,wxEXPAND)
		self.sizer.Add(self.heading3,0,wxEXPAND)
		self.sizer.Add(self.inbox,5,wxEXPAND)
		self.sizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.sizer)                         #set the sizer 
		self.sizer.Fit(self)                              #set to minimum size as calculated by sizer
		self.SetAutoLayout(True)                     #tell frame to use the sizer
		self.Show(True) 
		gmDispatcher.connect(self._updateActiveProblemsUI, u'clin_history_updated')
Example #12
0
	def __init__(self, parent,id):
		wxPanel.__init__(self, parent, id,wxDefaultPosition,wxDefaultSize,wxRAISED_BORDER)	  
		PatientHolder.__init__(self)
		#--------------------
		#add the main heading
		#--------------------
		self.recallspanelheading = gmGuiElement_HeadingCaptionPanel.HeadingCaptionPanel(self,-1,"  RECALLS & REVIEWS  ")
		#-------------------------------------------- 
		#dummy panel will later hold the editing area
		#--------------------------------------------
		self.dummypanel = wxPanel(self,-1,wxDefaultPosition,wxDefaultSize,0)
		self.dummypanel.SetBackgroundColour(wxColor(222,222,222))
		#----------------------------------------------
		#now create the editarea specific for allergies
		#----------------------------------------------
		self.editarea = gmEditArea.gmRecallEditArea(self,-1)
		self.dummypanel2 = wxPanel(self,-1,wxDefaultPosition,wxDefaultSize,0)
		self.dummypanel2.SetBackgroundColour(wxColor(222,222,222))
		#-----------------------------------------------
		#add the divider headings below the editing area
		#-----------------------------------------------
		self.recall_subheading = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Recalls entered this consultation"))
		self.sizer_divider_recalls = wxBoxSizer(wxHORIZONTAL) 
		self.sizer_divider_recalls.Add(self.recall_subheading,1, wxEXPAND)
		#--------------------------------------------------------------------------------------                                                                               
		#add the list to contain the recalls entered this session
		#
		# c++ Default Constructor:
		# wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition,
		# const wxSize& size = wxDefaultSize, long style = wxLC_ICON, 
		# const wxValidator& validator = wxDefaultValidator, const wxString& name = "listCtrl")
		#
		#--------------------------------------------------------------------------------------
		self.list_recalls = wxListCtrl(self, ID_RECALL_LIST,  wxDefaultPosition, wxDefaultSize,wxLC_REPORT|wxLC_NO_HEADER|wxSUNKEN_BORDER)
		#self.list_recalls.SetForegroundColour(wxColor(131,129,131))	
		self.list_recalls.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, False, ''))
		#----------------------------------------	  
		# add some dummy data to the allergy list
		self.list_recalls.InsertColumn(0, _("Recall Details"))
		self.list_recalls.InsertColumn(1, _("Status"))
		#-------------------------------------------------------------
		#loop through the scriptdata array and add to the list control
		#note the different syntax for the first coloum of each row
		#i.e. here > self.list_recalls.InsertStringItem(x, data[0])!!
		#-------------------------------------------------------------
		items = recalldata.items()
		for x in range(len(items)):
			key, data = items[x]
			self.list_recalls.InsertStringItem(x, data[0])
			self.list_recalls.SetStringItem(x, 1, data[1])
			self.list_recalls.SetItemData(x, key)
		self.list_recalls.SetColumnWidth(0, wxLIST_AUTOSIZE)
		self.list_recalls.SetColumnWidth(1, wxLIST_AUTOSIZE)
		#----------------------------------------
		#add an alert caption panel to the bottom
		#----------------------------------------
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,"  Alerts  ")
		#---------------------------------------------                                                                               
		#add all elements to the main background sizer
		#---------------------------------------------
		self.mainsizer = wxBoxSizer(wxVERTICAL)
		self.mainsizer.Add(self.recallspanelheading,0,wxEXPAND)
		#self.mainsizer.Add(self.dummypanel,1,wxEXPAND)
		self.mainsizer.Add(self.editarea,6,wxEXPAND)
		#self.mainsizer.Add(self.dummypanel2,1,wxEXPAND)
		self.mainsizer.Add(self.sizer_divider_recalls,0,wxEXPAND)
		self.mainsizer.Add(self.list_recalls,4,wxEXPAND)
		self.mainsizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.mainsizer)
		self.mainsizer.Fit
		self.SetAutoLayout(True)
		self.Show(True)
Example #13
0
	def __init__(self, parent,id):
		wxPanel.__init__(self,parent,id,wxDefaultPosition,wxDefaultSize,style = wxRAISED_BORDER)
		PatientHolder.__init__(self)
		#------------------------------------------------------------------------
		#import social history if available this will be the top item on the page
		#------------------------------------------------------------------------
		try:
			import gmGP_SocialHistory
			self.socialhistory = gmGP_SocialHistory.SocialHistory(self,-1)
		except Exception:
			pass
		#------------------------------------------------------------------------
		#import social history if available this will be the top item on the page
		#------------------------------------------------------------------------
		try:
			import gmGP_FamilyHistorySummary
			self.familyhistorysummary = gmGP_FamilyHistorySummary.FamilyHistorySummary(self,-1)
		except Exception:
			pass
		#---------------------------------------
		#import active problem list if available 
		#---------------------------------------
		try:
			import gmGP_ActiveProblems
			self.activeproblemlist = gmGP_ActiveProblems.ActiveProblems(self,-1)
		except Exception:
			pass	       
		#------------------------------
		#import habits and risk factors
		#------------------------------
		try:
			import gmGP_HabitsRiskFactors
			self.habitsriskfactors = gmGP_HabitsRiskFactors.HabitsRiskFactors(self,-1)
		except Exception:
			pass
		#------------
		#import inbox
		#------------
		try:
			import gmGP_Inbox
			self.inbox = gmGP_Inbox.Inbox(self,-1)
		except Exception:
			sys.exit(0)
			pass

		self.heading1 = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Active Problems" ))
		self.heading2 = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("     Habits            Risk Factors"))
		self.heading3 = gmGuiElement_DividerCaptionPanel.DividerCaptionPanel(self,-1,_("Inbox"))
		self.alertpanel = gmGuiElement_AlertCaptionPanel.AlertCaptionPanel(self,-1,_("   Alerts   "))
		#------------------------------------------------------------ 
		#now that we have all the elements, construct the whole panel
		#------------------------------------------------------------
		# FIXME: NO !! maybe we DON'T have all the elements ...
		self.sizer = wxBoxSizer(wxVERTICAL)
		self.sizer.Add(self.socialhistory,5,wxEXPAND)
		self.sizer.Add(self.familyhistorysummary,5,wxEXPAND)
		self.sizer.Add(self.heading1,0,wxEXPAND)
		self.sizer.Add(self.activeproblemlist,8,wxEXPAND)
		self.sizer.Add(self.heading2,0,wxEXPAND)
		self.sizer.Add(self.habitsriskfactors,5,wxEXPAND)
		self.sizer.Add(self.heading3,0,wxEXPAND)
		self.sizer.Add(self.inbox,5,wxEXPAND)
		self.sizer.Add(self.alertpanel,0,wxEXPAND)
		self.SetSizer(self.sizer)                         #set the sizer 
		self.sizer.Fit(self)                              #set to minimum size as calculated by sizer
		self.SetAutoLayout(True)                     #tell frame to use the sizer
		self.Show(True) 
		gmDispatcher.connect(self._updateActiveProblemsUI, 'clin_history_updated')