示例#1
0
		if parent is None:
			#print "No parent org for sub org"
			return
		
		if parent.getId() is None:
			#print "Please save parent org first"
			return
		
		if not parent.getParent() is None:	
			#print "Only one level of sub-org implemented"
			return
		
		w.newOrg(parent)
		


		

	def displayOrg(self, event):
		w = self._last_widget
		w.load_all_orgs()
		


if __name__ == "__main__":
	app = wx.wxPyWidgetTester(size = (800, 600))
	app.SetWidget(cContactsPanel, -1)
	app.MainLoop()

#======================================================
示例#2
0
		if parent is None:
			print "No parent org for sub org"
			return
		
		if parent.getId() is None:
			print "Please save parent org first"
			return
		
		if not parent.getParent() is None:	
			print "Only one level of sub-org implemented"
			return
		
		w.newOrg(parent)
		


		

	def displayOrg(self, event):
		w = self._last_widget
		w.load_all_orgs()
		


if __name__ == "__main__":
	app = wx.wxPyWidgetTester(size = (800, 600))
	app.SetWidget(cContactsPanel, -1)
	app.MainLoop()

#======================================================
示例#3
0
    import wx

    from Gnumed.exporters import gmPatientExporter
    from Gnumed.business import gmPersonSearch

    _log.info("starting emr browser plugin...")

    # obtain patient
    patient = gmPersonSearch.ask_for_patient()
    if patient is None:
        print("None patient. Exiting gracefully...")
        sys.exit(0)
    gmPatSearchWidgets.set_active_patient(patient=patient)

    # display standalone browser
    application = wx.wxPyWidgetTester(size=(800, 600))
    emr_browser = gmEMRBrowser.cEMRBrowserPanel(application.frame, -1)
    emr_browser.refresh_tree()

    application.frame.Show(True)
    application.MainLoop()

    # clean up
    if patient is not None:
        try:
            patient.cleanup()
        except Exception:
            print("error cleaning up patient")

    _log.info("closing emr browser plugin...")
示例#4
0
    from Gnumed.exporters import gmPatientExporter
    from Gnumed.business import gmPersonSearch

    _log.info("starting emr browser plugin...")

    try:
        # obtain patient
        patient = gmPersonSearch.ask_for_patient()
        if patient is None:
            print "None patient. Exiting gracefully..."
            sys.exit(0)
        gmPatSearchWidgets.set_active_patient(patient=patient)

        # display standalone browser
        application = wx.wxPyWidgetTester(size=(800,600))
        emr_browser = gmEMRBrowser.cEMRBrowserPanel(application.frame, -1)
        emr_browser.refresh_tree()

        application.frame.Show(True)
        application.MainLoop()

        # clean up
        if patient is not None:
            try:
                patient.cleanup()
            except:
                print "error cleaning up patient"
    except Exception:
        _log.exception("unhandled exception caught !")
        # but re-raise them