Exemple #1
0
 def test_stc():
     app = wx.PyWidgetTester(size=(600, 600))
     wx.lib.colourdb.updateColourDB()
     #print wx.lib.colourdb.getColourList()
     app.SetWidget(cSoapSTC, -1, (100, 50))
     app.MainLoop()
     return True
Exemple #2
0
 def test_hospital_stay_prw():
     app = wx.PyWidgetTester(size=(400, 40))
     app.SetWidget(cHospitalStayPhraseWheel,
                   id=-1,
                   size=(180, 20),
                   pos=(10, 20))
     app.MainLoop()
Exemple #3
0
 def test_person_comms_pnl():
     pat = gmPersonSearch.ask_for_patient()
     app = wx.PyWidgetTester(size=(600, 400))
     widget = cCommChannelsManagerPnl(app.frame, -1)
     widget.identity = pat
     app.frame.Show(True)
     app.MainLoop()
Exemple #4
0
 def test_soap_notebook_panel():
     print('testing notebooked soap panel...')
     application = wx.PyWidgetTester(size=(800, 500))
     #soap_input =
     cNotebookedProgressNoteInputPanel(application.frame, -1)
     application.frame.Show(True)
     application.MainLoop()
Exemple #5
0
	def test_grid():
		gmPersonSearch.ask_for_patient()
		app = wx.PyWidgetTester(size = (500, 300))
#		lab_grid = cMeasurementsGrid(app.frame, -1)
#		lab_grid.patient = pat
		app.frame.Show()
		app.MainLoop()
Exemple #6
0
 def test_fuzzy_picker():
     app = wx.PyWidgetTester(size=(300, 40))
     app.SetWidget(cFuzzyTimestampInput,
                   id=-1,
                   size=(180, 20),
                   pos=(10, 20))
     app.MainLoop()
Exemple #7
0
 def test_picker():
     app = wx.PyWidgetTester(size=(300, 40))
     app.SetWidget(cDateInputPhraseWheel,
                   id=-1,
                   size=(180, 20),
                   pos=(10, 20))
     app.MainLoop()
Exemple #8
0
	def test_epsiode_edit_area_pnl():
		app = wx.PyWidgetTester(size = (200, 300))
		emr = pat.emr
		epi = emr.get_episodes()[0]
		pnl = cEpisodeEditAreaPnl(app.frame, -1, episode=epi)
		app.frame.Show(True)
		app.MainLoop()
Exemple #9
0
	def test_test_ea_pnl():
		pat = gmPersonSearch.ask_for_patient()
		gmPatSearchWidgets.set_active_patient(patient=pat)
		app = wx.PyWidgetTester(size = (500, 300))
#		ea = cMeasurementEditAreaPnl(app.frame, -1)
		app.frame.Show()
		app.MainLoop()
Exemple #10
0
 def test_pat_contacts_pnl():
     app = wx.PyWidgetTester(size=(600, 400))
     #widget =
     cPersonContactsManagerPnl(app.frame, -1)
     #widget.identity = activate_patient()
     app.frame.Show(True)
     app.MainLoop()
Exemple #11
0
	def test_fillin():
		expansion = """HEMORR²HAGES: Blutungsrisiko unter OAK
--------------------------------------
Am Heart J. 2006 Mar;151(3):713-9.

$[1 oder 0 eingeben]$ H epatische oder Nierenerkrankung
$[1 oder 0 eingeben]$ E thanolabusus
$[1 oder 0 eingeben]$ M alignom
$[1 oder 0 eingeben]$ O ld patient (> 75 Jahre)
$[1 oder 0 eingeben]$ R eduzierte Thrombozytenzahl/-funktion
$[2 oder 0 eingeben]$ R²ekurrente (frühere) große Blutung
$[1 oder 0 eingeben]$ H ypertonie (unkontrolliert)
$[1 oder 0 eingeben]$ A nämie
$[1 oder 0 eingeben]$ G enetische Faktoren
$[1 oder 0 eingeben]$ E xzessives Sturzrisiko
$[1 oder 0 eingeben]$ S Schlaganfall in der Anamnese
--------------------------------------
Summe   Rate großer Blutungen
        pro 100 Patientenjahre
 0          1.9
 1          2.5
 2          5.3
 3          8.4
 4         10.4
>4         12.3

Bewertung: Summe = $[Summe ausrechnen und bewerten]$"""

		app = wx.PyWidgetTester(size = (600, 600))
		dlg = cTextExpansionFillInDlg(None, -1)
		dlg.expansion = expansion
		dlg.ShowModal()
Exemple #12
0
    def test_sql_logic_prw():
        app = wx.PyWidgetTester(size=(200, 50))
        prw = cThreeValuedLogicPhraseWheel(app.frame, -1)
        app.frame.Show(True)
        app.MainLoop()

        return True
Exemple #13
0
 def test_region_prw():
     app = wx.PyWidgetTester(size=(200, 50))
     pw = cStateSelectionPhraseWheel(app.frame, -1)
     pw.set_context(context=u'zip', val=u'04318')
     pw.set_context(context=u'country', val=u'Deutschland')
     app.frame.Show(True)
     app.MainLoop()
Exemple #14
0
 def test_generic_codes_prw():
     gmPG2.get_connection()
     app = wx.PyWidgetTester(size=(500, 40))
     #pw = cGenericCodesPhraseWheel(app.frame, -1)
     #pw.set_context(context = u'zip', val = u'04318')
     app.frame.Show(True)
     app.MainLoop()
Exemple #15
0
	def test_prw_fixed_list():
		app = wx.PyWidgetTester(size = (200, 50))

		items = [	{'data': 1, 'list_label': "Bloggs", 'field_label': "Bloggs", 'weight': 0},
					{'data': 2, 'list_label': "Baker", 'field_label': "Baker", 'weight': 0},
					{'data': 3, 'list_label': "Jones", 'field_label': "Jones", 'weight': 0},
					{'data': 4, 'list_label': "Judson", 'field_label': "Judson", 'weight': 0},
					{'data': 5, 'list_label': "Jacobs", 'field_label': "Jacobs", 'weight': 0},
					{'data': 6, 'list_label': "Judson-Jacobs", 'field_label': "Judson-Jacobs", 'weight': 0}
				]

		mp = gmMatchProvider.cMatchProvider_FixedList(items)
		# do NOT treat "-" as a word separator here as there are names like "asa-sismussen"
		mp.word_separators = '[ \t=+&:@]+'
		global prw
		prw = cPhraseWheel(parent = app.frame, id = -1)
		prw.matcher = mp
		prw.capitalisation_mode = gmTools.CAPS_NAMES
		prw.add_callback_on_set_focus(callback=display_values_set_focus)
		prw.add_callback_on_modified(callback=display_values_modified)
		prw.add_callback_on_lose_focus(callback=display_values_lose_focus)
		prw.add_callback_on_selection(callback=display_values_selected)

		app.frame.Show(True)
		app.MainLoop()

		return True
Exemple #16
0
 def test_cFormTemplateEAPnl():
     app = wx.PyWidgetTester(size=(400, 300))
     pnl = cFormTemplateEAPnl(app.frame,
                              -1,
                              template=gmForms.cFormTemplate(aPK_obj=4))
     app.frame.Show(True)
     app.MainLoop()
     return
Exemple #17
0
 def test():
     gmPG2.get_connection()
     app = wx.PyWidgetTester(size=(600, 600))
     dlg = cOrganizationManagerDlg(app.frame, -1, size=(600, 600))
     dlg.SetSize((600, 600))
     dlg.ShowModal()
     #	app.SetWidget(dlg, -1)
     app.MainLoop()
Exemple #18
0
	def test_encounter_edit_area_dialog():
		app = wx.PyWidgetTester(size = (200, 300))
		emr = pat.emr
		enc = emr.active_encounter
		#enc = gmEMRStructItems.cEncounter(1)

		dlg = cEncounterEditAreaDlg(parent=app.frame, id=-1, size = (400,400), encounter=enc)
		dlg.ShowModal()
Exemple #19
0
 def test_select_narrative_from_episodes():
     pat = gmPersonSearch.ask_for_patient()
     set_active_patient(patient=pat)
     app = wx.PyWidgetTester(size=(200, 200))
     sels = select_narrative_from_episodes_new()
     print("selected:")
     for sel in sels:
         print(sel)
Exemple #20
0
 def test_gm_textctrl():
     app = wx.PyWidgetTester(size=(200, 50))
     tc = cTextCtrl(app.frame, -1)
     #tc.enable_keyword_expansions()
     #tc.Enable(False)
     app.frame.Show(True)
     app.MainLoop()
     return True
Exemple #21
0
 def test_select_narrative():
     pat = gmPersonSearch.ask_for_patient()
     set_active_patient(patient=pat)
     app = wx.PyWidgetTester(size=(200, 200))
     sels = select_narrative(parent=None, soap_cats=None)
     print("selected:")
     for sel in sels:
         print(sel)
Exemple #22
0
 def test_allergy_edit_area_dlg():
     app = wx.PyWidgetTester(size=(600, 600))
     dlg = cAllergyEditAreaDlg(parent=app.frame, id=-1)
     dlg.ShowModal()
     #		emr = pat.emr
     #		allergy = emr.get_allergies()[0]
     #		dlg = cAllergyEditAreaDlg(parent=app.frame, id=-1, allergy=allergy)
     #		dlg.ShowModal()
     return
Exemple #23
0
 def test_encounter_edit_area_panel():
     app = wx.PyWidgetTester(size=(200, 300))
     #emr = pat.emr
     #enc = emr.active_encounter
     enc = gmEMRStructItems.cEncounter(1)
     #pnl =
     cEncounterEditAreaPnl(app.frame, -1, encounter=enc)
     app.frame.Show(True)
     app.MainLoop()
Exemple #24
0
 def test_pat_list_ctrl():
     app = wx.PyWidgetTester(size=(400, 500))
     lst = cPatientListingCtrl(app.frame, patient_key=0)
     lst.set_columns(['name', 'comment'])
     lst.set_string_items([['Kirk', 'Kirk by name'], ['#12', 'Kirk by ID'],
                           ['unknown', 'unknown patient']])
     #		app.SetWidget(cPatientListingCtrl, patient_key = 0)
     app.frame.Show()
     app.MainLoop()
Exemple #25
0
 def test_clipboard():
     app = wx.PyWidgetTester(size=(200, 50))
     result = clipboard2file()
     if result is False:
         print("problem opening clipboard")
         return
     if result is None:
         print("no data in clipboard")
         return
     print("file:", result)
Exemple #26
0
	def test_cSoapPluginPnl():
		patient = gmPersonSearch.ask_for_patient()
		if patient is None:
			print("No patient. Exiting gracefully...")
			return
		set_active_patient(patient=patient)

		application = wx.PyWidgetTester(size=(800,500))
		soap_input = cSoapPluginPnl(application.frame, -1)
		application.frame.Show(True)
		soap_input._schedule_data_reget()
		application.MainLoop()
Exemple #27
0
	def test_spell_checking_prw():
		app = wx.PyWidgetTester(size = (200, 50))

		global prw
		prw = cPhraseWheel(parent = app.frame, id = -1)

		prw.add_callback_on_set_focus(callback=display_values_set_focus)
		prw.add_callback_on_modified(callback=display_values_modified)
		prw.add_callback_on_lose_focus(callback=display_values_lose_focus)
		prw.add_callback_on_selection(callback=display_values_selected)

		prw.enable_default_spellchecker()

		app.frame.Show(True)
		app.MainLoop()

		return True
Exemple #28
0
 def test():
     app = wx.PyWidgetTester(size=(300, 400))
     #show the login panel in a main window
     #		app.SetWidget(cLoginPanel, -1)
     #and pop the login dialog up modally
     dlg = cLoginDialog(None, -1)  #, png_bitmap = 'bitmaps/gnumedlogo.png')
     dlg.ShowModal()
     #demonstration how to access the login dialog values
     lp = dlg.panel.GetLoginInfo()
     if lp is None:
         wx.MessageBox(_("Dialog was cancelled by user"))
     else:
         wx.MessageBox(
             _("You tried to log in as [%s] with password [%s].\nHost:%s, DB: %s, Port: %s"
               ) % (lp.GetUser(), lp.GetPassword(), lp.GetHost(),
                    lp.GetDatabase(), lp.GetPort()))
     dlg.DestroyLater()
Exemple #29
0
	def test_prw_sql2():
		print "Do you want to test the database connected phrase wheel ?"
		yes_no = raw_input('y/n: ')
		if yes_no != 'y':
			return True

		gmPG2.get_connection()
		query = u"""SELECT code, code || ': ' || _(name), _(name) FROM dem.country WHERE _(name) %(fragment_condition)s"""
		mp = gmMatchProvider.cMatchProvider_SQL2(queries = [query])
		app = wx.PyWidgetTester(size = (400, 50))
		global prw
		#prw = cPhraseWheel(parent = app.frame, id = -1)
		prw = cMultiPhraseWheel(parent = app.frame, id = -1)
		prw.matcher = mp

		app.frame.Show(True)
		app.MainLoop()

		return True
Exemple #30
0
	def test_prw_patients():
		gmPG2.get_connection()
		query = u"""
			select
				pk_identity,
				firstnames || ' ' || lastnames || ', ' || to_char(dob, 'YYYY-MM-DD'),
				firstnames || ' ' || lastnames
			from
				dem.v_active_persons
			where
				firstnames || lastnames %(fragment_condition)s
		"""
		mp = gmMatchProvider.cMatchProvider_SQL2(queries = [query])
		app = wx.PyWidgetTester(size = (500, 50))
		global prw
		prw = cPhraseWheel(parent = app.frame, id = -1)
		prw.matcher = mp
		prw.selection_only = True

		app.frame.Show(True)
		app.MainLoop()

		return True