def __register_interests(self): if self.__use_soap_fields: for field in self.__soap_fields: self.bind_expando_layout_event(field) self.bind_expando_layout_event(self._TCTRL_episode_summary) gmDispatcher.connect(signal='blobs.doc_obj_mod_db', receiver=self.refresh_visual_soap)
def install_wx_exception_handler(): global _logfile_name _logfile_name = gmLog2._logfile_name global _local_account _local_account = os.path.basename(os.path.expanduser('~')) set_helpdesk(gmPraxis.gmCurrentPraxisBranch().helpdesk) set_staff_name(_local_account) set_is_public_database(False) set_sender_email(None) set_client_version('gmExceptionHandlingWidgets.py <default>') gmDispatcher.connect(signal='application_closing', receiver=_on_application_closing) global APP_PID APP_PID = os.getpid() _log.debug('registered PID [%s] for aborting if necessary', APP_PID) global _prev_excepthook _prev_excepthook = sys.excepthook sys.excepthook = handle_uncaught_exception_wx return True
def run_monitor(): print("starting up backend notifications monitor") def monitoring_callback(*args, **kwargs): try: kwargs['originated_in_database'] print('==> got notification from database "%s":' % kwargs['signal']) except KeyError: print('==> received signal from client: "%s"' % kwargs['signal']) del kwargs['signal'] for key in kwargs.keys(): print(' [%s]: %s' % (key, kwargs[key])) gmDispatcher.connect(receiver = monitoring_callback) listener = gmBackendListener(conn = gmPG2.get_raw_connection()) print("listening for the following notifications:") print("1) unspecific:") for sig in listener.unspecific_notifications: print(' - %s' % sig) while True: pat = gmPersonSearch.ask_for_patient() if pat is None: break print("found patient", pat) gmPerson.set_active_patient(patient=pat) print("now waiting for notifications, hit <ENTER> to select another patient") raw_input() print("cleanup") listener.shutdown() print("shutting down backend notifications monitor")
def __register_events(self): # wxPython events self.Bind(wx.EVT_RIGHT_UP, self._on_RightClick_photo) # dispatcher signals gmDispatcher.connect(receiver=self._on_post_patient_selection, signal='post_patient_selection')
def __register_interests(self): wx.EVT_LIST_ITEM_ACTIVATED(self, ID_ALLERGY_LIST, self._on_allergy_activated) # client internal signals gmDispatcher.connect(signal=u'post_patient_selection', receiver=self._schedule_data_reget)
def main(): if _cfg.get(option = 'debug'): gmDispatcher.connect(receiver = _signal_debugging_monitor) _log.debug('gmDispatcher signal monitor activated') server = HTTPServer() server.serve_forever()
def __register_interests(self): """Configure enabled event signals.""" # client internal signals gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._on_pre_patient_unselection) gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = 'clin.episode_mod_db', receiver = self._on_episode_issue_mod_db) gmDispatcher.connect(signal = 'clin.health_issue_mod_db', receiver = self._on_episode_issue_mod_db) gmDispatcher.connect(signal = 'clin.episode_code_mod_db', receiver = self._on_episode_issue_mod_db)
def __register_interests(self): """ Configures enabled event signals """ # wx.wxPython events wx.EVT_TREE_SEL_CHANGED(self.__emr_tree, self.__emr_tree.GetId(), self._on_tree_item_selected) # client internal signals gmDispatcher.connect(signal=gmSignals.patient_selected(), receiver=self._on_patient_selected)
def __register_events(self): # client internal signals gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = 'dem.names_mod_db', receiver = self._on_name_identity_change) gmDispatcher.connect(signal = 'dem.identity_mod_db', receiver = self._on_name_identity_change) gmDispatcher.connect(signal = 'patient_locked', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = 'patient_unlocked', receiver = self._on_post_patient_selection)
def main(): if _cfg.get(option='debug'): gmDispatcher.connect(receiver=_signal_debugging_monitor) _log.debug('gmDispatcher signal monitor activated') server = HTTPServer() server.serve_forever()
def __register_events(self): # - notebook page is about to change self.nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self._on_notebook_page_changing) # - notebook page has been changed self.nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._on_notebook_page_changed) # - popup menu on right click in notebook wx.EVT_RIGHT_UP(self.nb, self._on_right_click) gmDispatcher.connect(self._on_post_patient_selection, u'post_patient_selection')
def __register_events(self): # wxPython events wx.EVT_RIGHT_UP(self, self._on_RightClick_photo) wx.EVT_MENU(self, ID_AcquirePhoto, self._on_AcquirePhoto) wx.EVT_MENU(self, ID_ImportPhoto, self._on_ImportPhoto) wx.EVT_MENU(self, ID_Refresh, self._on_refresh_from_backend) # dispatcher signals gmDispatcher.connect(receiver=self._on_post_patient_selection, signal = u'post_patient_selection')
def __register_events(self): # wxPython events wx.EVT_RIGHT_UP(self, self._on_RightClick_photo) wx.EVT_MENU(self, ID_AcquirePhoto, self._on_AcquirePhoto) wx.EVT_MENU(self, ID_ImportPhoto, self._on_ImportPhoto) wx.EVT_MENU(self, ID_Refresh, self._on_refresh_from_backend) # dispatcher signals gmDispatcher.connect(receiver=self._on_post_patient_selection, signal=u'post_patient_selection')
def __register_interests(self): # wxPython events wx.EVT_SIZE(self, self.OnSize) wx.EVT_LISTBOX(self, self.ID_VaccinatedIndicationsList, self._on_vaccinated_indication_selected) wx.EVT_LISTBOX_DCLICK(self, self.ID_VaccinationsPerRegimeList, self._on_given_shot_selected) wx.EVT_LISTBOX_DCLICK(self, self.ID_MissingShots, self._on_missing_shot_selected) # wx.EVT_RIGHT_UP(self.lb1, self.EvtRightButton) # client internal signals gmDispatcher.connect(signal= u'post_patient_selection', receiver=self._schedule_data_reget) gmDispatcher.connect(signal= u'vaccinations_updated', receiver=self._schedule_data_reget)
def __register_interests(self): # wxPython events wx.EVT_SIZE(self, self.OnSize) wx.EVT_LISTBOX(self, self.ID_VaccinatedIndicationsList, self._on_vaccinated_indication_selected) wx.EVT_LISTBOX_DCLICK(self, self.ID_VaccinationsPerRegimeList, self._on_given_shot_selected) wx.EVT_LISTBOX_DCLICK(self, self.ID_MissingShots, self._on_missing_shot_selected) # wx.EVT_RIGHT_UP(self.lb1, self.EvtRightButton) # client internal signals gmDispatcher.connect(signal= 'post_patient_selection', receiver=self._schedule_data_reget) gmDispatcher.connect(signal= 'vaccinations_updated', receiver=self._schedule_data_reget)
def __register_events(self): # wxPython events wx.EVT_BUTTON(self.__BTN_save, self.__BTN_save.GetId(), self._on_save_note) wx.EVT_BUTTON(self.__BTN_discard, self.__BTN_discard.GetId(), self._on_discard_note) # client internal signals gmDispatcher.connect(signal = 'application_closing', receiver = self._save_note) # really should be synchronous: gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._save_note) return True
def __register_interests(self): """Configure enabled event signals.""" # synchronous signals gmDispatcher.send(signal = 'register_pre_exit_callback', callback = self._pre_exit_callback) # client internal signals gmDispatcher.connect(signal = 'blobs.doc_med_mod_db', receiver = self._on_doc_mod_db) # visual progress notes gmDispatcher.connect(signal = 'current_encounter_modified', receiver = self._on_current_encounter_modified) gmDispatcher.connect(signal = 'current_encounter_switched', receiver = self._on_current_encounter_switched) gmDispatcher.connect(signal = 'clin.rfe_code_mod_db', receiver = self._on_encounter_code_modified) gmDispatcher.connect(signal = 'clin.aoe_code_mod_db', receiver = self._on_encounter_code_modified)
def __register_events(self): # wxPython events self.__BTN_save.Bind(wx.EVT_BUTTON, self._on_save_note) self.__BTN_discard.Bind(wx.EVT_BUTTON, self._on_discard_note) # client internal signals gmDispatcher.connect(signal = 'application_closing', receiver = self._save_note) # really should be synchronous: gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._save_note) return True
def __register_interests(self): """Configure enabled event signals """ # wxPython events # client internal signals gmDispatcher.connect(signal = u'post_patient_selection', receiver=self._on_post_patient_selection) # gmDispatcher.connect(signal = u'application_closing', receiver=self._on_application_closing) self.__pat.register_before_switching_from_patient_callback(callback = self._before_switching_from_patient_callback) gmDispatcher.send(signal = u'register_pre_exit_callback', callback = self._pre_exit_callback)
def main(): if _cfg.get(option='debug'): gmDispatcher.connect(receiver=_signal_debugging_monitor) _log.debug('gmDispatcher signal monitor activated') cherrypy.quickstart( gmApp(), "/", {'global': { 'server.socket_port': 8080, 'log.screen': True }})
def __register_interests(self): """Configure enabled event signals """ # wxPython events # client internal signals gmDispatcher.connect(signal = 'post_patient_selection', receiver=self._on_post_patient_selection) # gmDispatcher.connect(signal = u'application_closing', receiver=self._on_application_closing) self.__pat.register_before_switching_from_patient_callback(callback = self._before_switching_from_patient_callback) gmDispatcher.send(signal = 'register_pre_exit_callback', callback = self._pre_exit_callback)
def __register_events(self): # # because of # # https://www.wiki.wxpython.org/self.Bind%20vs.%20self.button.Bind # # do self.Bind() rather than self.nb.Bind() # # - notebook page is about to change # #self.nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self._on_notebook_page_changing) self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self._on_notebook_page_changing, self.nb) # # - notebook page has been changed # #self.nb.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._on_notebook_page_changed) self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._on_notebook_page_changed, self.nb) # # - popup menu on right click in notebook # #wx.EVT_RIGHT_UP(self.nb, self._on_right_click) gmDispatcher.connect(self._on_post_patient_selection, 'post_patient_selection')
def __register_events(self): self._TCTRL_encounter.Bind(wx.EVT_LEFT_DCLICK, self._on_ldclick) gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._on_pre_patient_unselection) # this would throw an exception due to concurrency issues: #gmDispatcher.connect(signal = u'post_patient_selection', receiver = self.refresh) gmDispatcher.connect(signal = 'clin.episode_mod_db', receiver = self.refresh) gmDispatcher.connect(signal = 'current_encounter_modified', receiver = self.refresh) gmDispatcher.connect(signal = 'current_encounter_switched', receiver = self.refresh)
def __register_events(self): self._TCTRL_encounter.Bind(wx.EVT_LEFT_DCLICK, self._on_ldclick) gmDispatcher.connect(signal = u'pre_patient_unselection', receiver = self._on_pre_patient_unselection) # this would throw an exception due to concurrency issues: #gmDispatcher.connect(signal = u'post_patient_selection', receiver = self.refresh) gmDispatcher.connect(signal = u'clin.episode_mod_db', receiver = self.refresh) gmDispatcher.connect(signal = u'current_encounter_modified', receiver = self.refresh) gmDispatcher.connect(signal = u'current_encounter_switched', receiver = self.refresh)
def __register_interests(self): """Configure enabled event signals.""" # client internal signals gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._on_pre_patient_unselection) gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = 'clin.episode_mod_db', receiver = self._on_episode_issue_mod_db) gmDispatcher.connect(signal = 'clin.health_issue_mod_db', receiver = self._on_episode_issue_mod_db) # synchronous signals self.__curr_pat.register_before_switching_from_patient_callback(callback = self._before_switching_from_patient_callback) gmDispatcher.send(signal = 'register_pre_exit_callback', callback = self._pre_exit_callback)
def install_wx_exception_handler(): global _logfile_name _logfile_name = gmLog2._logfile_name global _local_account _local_account = os.path.basename(os.path.expanduser('~')) set_helpdesk(gmPraxis.gmCurrentPraxisBranch().helpdesk) set_staff_name(_local_account) set_is_public_database(False) set_sender_email(None) set_client_version('gmExceptionHandlingWidgets.py <default>') gmDispatcher.connect(signal = 'application_closing', receiver = _on_application_closing) global _prev_excepthook _prev_excepthook = sys.excepthook sys.excepthook = handle_uncaught_exception_wx return True
def __register_interests(self): gmDispatcher.connect(signal='pre_patient_unselection', receiver=self._on_pre_patient_unselection) gmDispatcher.connect(signal='post_patient_selection', receiver=self._on_post_patient_selection) gmDispatcher.connect(signal='gm_table_mod', receiver=self._on_table_mod)
def __init__(self): gmDispatcher.connect(self._pre_patient_unselection, 'pre_patient_unselection') gmDispatcher.connect(self._on_current_patient_unset, 'current_patient_unset') gmDispatcher.connect(self._post_patient_selection, 'post_patient_selection')
def __register_interests(self): # client internal signals gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._on_pre_patient_unselection) gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._on_post_patient_selection) # generic database change signal gmDispatcher.connect(signal = 'gm_table_mod', receiver = self._on_database_signal) # database change signals # no signal for external IDs yet # no signal for address yet ##gmDispatcher.connect(signal = u'current_encounter_modified', receiver = self._on_current_encounter_modified) ##gmDispatcher.connect(signal = u'current_encounter_switched', receiver = self._on_current_encounter_switched) # doesn't have pk_identity: gmDispatcher.connect(signal = 'clin.reviewed_test_results_mod_db', receiver = self._on_post_patient_selection)
def __register_interests(self): # events self._TCTRL_allergies.Bind(wx.EVT_LEFT_DCLICK, self._on_allergies_dclicked) # client internal signals gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = 'focus_patient_search', receiver = self._on_focus_patient_search) gmDispatcher.connect(signal = 'gm_table_mod', receiver = self._on_database_signal)
def __register_interests(self): # events wx.EVT_LEFT_DCLICK(self._TCTRL_allergies, self._on_allergies_dclicked) # client internal signals gmDispatcher.connect(signal = u'post_patient_selection', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'focus_patient_search', receiver = self._on_focus_patient_search) gmDispatcher.connect(signal = u'gm_table_mod', receiver = self._on_database_signal)
def __register_interests(self): """Configure enabled event signals """ # wxPython events wx.EVT_LISTBOX_DCLICK(self.__LST_problems, self.__LST_problems.GetId(), self.__on_problem_activated) wx.EVT_BUTTON(self.__BTN_save, self.__BTN_save.GetId(), self.__on_save) wx.EVT_BUTTON(self.__BTN_clear, self.__BTN_clear.GetId(), self.__on_clear) wx.EVT_BUTTON(self.__BTN_discard, self.__BTN_discard.GetId(), self.__on_discard) wx.EVT_BUTTON(self.__BTN_add_unassociated, self.__BTN_add_unassociated.GetId(), self.__on_add_unassociated) # client internal signals gmDispatcher.connect(signal='post_patient_selection', receiver=self._on_post_patient_selection) gmDispatcher.connect(signal = 'clin.episode_mod_db', receiver = self._on_episode_issue_mod_db) gmDispatcher.connect(signal = 'clin.health_issue_mod_db', receiver = self._on_episode_issue_mod_db)
if hint_dlg.ShowModal() == wx.ID_APPLY: hint.suppress(rationale=hint_dlg.rationale.strip(), pk_encounter=emr.current_encounter['pk_encounter']) hint_dlg.DestroyLater() # aggregate popup if len(hints2aggregate) > 0: hints_dlg = cDynamicHintListDlg(wx.GetApp().GetTopWindow(), -1) hints_dlg.pk_encounter = emr.current_encounter['pk_encounter'] hints_dlg.hints = hints2aggregate hints_dlg.ShowModal() hints_dlg.DestroyLater() return gmDispatcher.connect(signal='post_patient_selection', receiver=_display_clinical_reminders) #================================================================ def edit_dynamic_hint(parent=None, hint=None, single_entry=True): if parent is None: parent = wx.GetApp().GetTopWindow() ea = cAutoHintEAPnl(parent, -1) ea.data = hint ea.mode = gmTools.coalesce(hint, 'new', 'edit') dlg = gmEditArea.cGenericEditAreaDlg2(parent, -1, edit_area=ea, single_entry=single_entry)
def __register_interests(self): # client internal signals gmDispatcher.connect(signal = u'pre_patient_unselection', receiver = self._on_pre_patient_unselection) gmDispatcher.connect(signal = u'post_patient_selection', receiver = self._on_post_patient_selection) # database change signals gmDispatcher.connect(signal = u'dem.identity_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'dem.names_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'dem.comm_channel_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'dem.job_mod_db', receiver = self._on_post_patient_selection) # no signal for external IDs yet # no signal for address yet #gmDispatcher.connect(signal = u'current_encounter_modified', receiver = self._on_current_encounter_modified) #gmDispatcher.connect(signal = u'current_encounter_switched', receiver = self._on_current_encounter_switched) gmDispatcher.connect(signal = u'clin.episode_mod_db', receiver = self._on_episode_issue_mod_db) gmDispatcher.connect(signal = u'clin.health_issue_mod_db', receiver = self._on_episode_issue_mod_db) gmDispatcher.connect(signal = u'clin.substance_intake_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'clin.hospital_stay_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'clin.family_history_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'clin.procedure_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'clin.vaccination_mod_db', receiver = self._on_post_patient_selection) #gmDispatcher.connect(signal = u'clin.external_care_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'dem.message_inbox_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'clin.test_result_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'clin.reviewed_test_results_mod_db', receiver = self._on_post_patient_selection) gmDispatcher.connect(signal = u'blobs.doc_med_mod_db', receiver = self._on_post_patient_selection) # generic signal gmDispatcher.connect(signal = u'gm_table_mod', receiver = self._on_post_patient_selection) # synchronous signals # self.__pat.register_before_switching_from_patient_callback(callback = self._before_switching_from_patient_callback) # gmDispatcher.send(signal = u'register_pre_exit_callback', callback = self._pre_exit_callback) self._PRW_encounter_range.add_callback_on_selection(callback = self._on_encounter_range_selected)
if __name__ == '__main__': sys.path.insert(0, '../../') from Gnumed.pycommon import gmPG2 from Gnumed.pycommon import gmBusinessDBObject from Gnumed.pycommon import gmHooks from Gnumed.pycommon import gmDispatcher _log = logging.getLogger('gm.coding') #============================================================ def _on_code_link_modified(): """Always relates to the active patient.""" gmHooks.run_hook_script(hook = 'after_code_link_modified') gmDispatcher.connect(_on_code_link_modified, 'clin.episode_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.rfe_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.aoe_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.health_issue_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.narrative_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.procedure_code_mod_db') #============================================================ # generic linked code handling #------------------------------------------------------------ _SQL_get_generic_linked_codes = "SELECT * FROM clin.v_linked_codes WHERE %s" class cGenericLinkedCode(gmBusinessDBObject.cBusinessDBObject): """Represents a generic linked code. READ ONLY
def __register_events(self): # client internal signals gmDispatcher.connect(signal=u"post_patient_selection", receiver=self._on_post_patient_selection) return 1
# dynamic hints hint_dlg = cDynamicHintDlg(wx.GetApp().GetTopWindow(), -1) for hint in pat._get_dynamic_hints(include_suppressed_needing_invalidation=True): if hint["rationale4suppression"] == u"magic_tag::please_invalidate_suppression": _log.debug("database asks for invalidation of suppression of hint [%s]", hint) hint.invalidate_suppression(pk_encounter=pat.emr.current_encounter["pk_encounter"]) continue hint_dlg.hint = hint if hint_dlg.ShowModal() == wx.ID_APPLY: hint.suppress(rationale=hint_dlg.rationale.strip(), pk_encounter=pat.emr.current_encounter["pk_encounter"]) hint_dlg.Destroy() return gmDispatcher.connect(signal=u"post_patient_selection", receiver=_display_clinical_reminders) # ================================================================ def edit_dynamic_hint(parent=None, hint=None, single_entry=True): if parent is None: parent = wx.GetApp().GetTopWindow() ea = cAutoHintEAPnl(parent=parent, id=-1) ea.data = hint ea.mode = gmTools.coalesce(hint, "new", "edit") dlg = gmEditArea.cGenericEditAreaDlg2(parent=parent, id=-1, edit_area=ea, single_entry=single_entry) dlg.SetTitle(gmTools.coalesce(hint, _("Adding automatic dynamic hint"), _("Editing automatic dynamic hint"))) if dlg.ShowModal() == wx.ID_OK: dlg.Destroy() return True
sys.path.insert(0, '../../') from Gnumed.pycommon import gmPG2 from Gnumed.pycommon import gmBusinessDBObject from Gnumed.pycommon import gmHooks from Gnumed.pycommon import gmDispatcher _log = logging.getLogger('gm.coding') #============================================================ def _on_code_link_modified(): """Always relates to the active patient.""" gmHooks.run_hook_script(hook='after_code_link_modified') gmDispatcher.connect(_on_code_link_modified, 'clin.episode_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.rfe_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.aoe_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.health_issue_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.narrative_code_mod_db') gmDispatcher.connect(_on_code_link_modified, 'clin.procedure_code_mod_db') #============================================================ # generic linked code handling #------------------------------------------------------------ _SQL_get_generic_linked_codes = "SELECT * FROM clin.v_linked_codes WHERE %s" class cGenericLinkedCode(gmBusinessDBObject.cBusinessDBObject): """Represents a generic linked code.
_log.debug('stayed with newly created encounter') #---------------------------------------------------------------- def __ask_for_encounter_continuation(**kwargs): try: del kwargs['signal'] del kwargs['sender'] except KeyError: pass wx.CallAfter(_ask_for_encounter_continuation, **kwargs) #---------------------------------------------------------------- # listen for encounter continuation inquiry requests gmDispatcher.connect(signal='ask_for_encounter_continuation', receiver=__ask_for_encounter_continuation) #---------------------------------------------------------------- def start_new_encounter(emr=None): emr.start_new_encounter() gmDispatcher.send(signal='statustext', msg=_('Started a new encounter for the active patient.'), beep=True) time.sleep(0.5) gmGuiHelpers.gm_show_info( _('\nA new encounter was started for the active patient.\n'), _('Start of new encounter')) #----------------------------------------------------------------
def __register_interests(self): if self.__use_soap_fields: for field in self.__soap_fields: self.bind_expando_layout_event(field) self.bind_expando_layout_event(self._TCTRL_episode_summary) gmDispatcher.connect(signal = 'blobs.doc_obj_mod_db', receiver = self.refresh_visual_soap)
def __init__(self, *args, **kwds): # begin wxGlade: cAU_VaccV01Panel.__init__ kwds["style"] = wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, -1, style=0) self.notebook_1_pane_2 = wx.Panel(self.notebook_1, -1) self.window_1 = wx.SplitterWindow(self.notebook_1_pane_2, -1, style=wx.SP_3D | wx.SP_BORDER) self.window_1_pane_2 = wx.Panel(self.window_1, -1) self.window_1_pane_1 = wx.Panel(self.window_1, -1) self.notebook_1_pane_1 = wx.Panel(self.notebook_1, -1) self.window_2 = wx.SplitterWindow(self.notebook_1_pane_1, -1, style=wx.SP_3D | wx.SP_BORDER | wx.CLIP_CHILDREN) self.window_3 = wx.SplitterWindow(self.window_2, -1, style=wx.CLIP_CHILDREN) self.window_3_pane_2 = wx.Panel(self.window_3, -1) self.window_3_pane_1 = wx.Panel(self.window_3, -1) self.window_2_pane_1 = wx.Panel(self.window_2, -1) self.sizer_20_staticbox = wx.StaticBox(self.window_3_pane_1, -1, "vaccs scheduled") self.sizer_18_staticbox = wx.StaticBox( self.window_1_pane_1, -1, "Vacc Regimes - X selected , O - not selected") self.sizer_19_staticbox = wx.StaticBox( self.window_1_pane_2, -1, "vaccinations in selected regimes") self.sizer_21_staticbox = wx.StaticBox(self.window_2_pane_1, -1, "Vacc Given") self.list_ctrl_1 = wx.ListCtrl(self.window_2_pane_1, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER) self.tree_ctrl_2 = wx.TreeCtrl(self.window_3_pane_1, -1, style=wx.TR_HAS_BUTTONS | wx.TR_NO_LINES | wx.TR_HIDE_ROOT | wx.TR_DEFAULT_STYLE | wx.SUNKEN_BORDER) self.label_2 = wx.StaticText(self.window_3_pane_1, -1, "vaccinations given") self.list_box_1 = wx.ListBox(self.window_3_pane_1, -1, choices=[]) self.label_3 = wx.StaticText(self.window_3_pane_2, -1, "date") self.combo_box_1 = wx.ComboBox(self.window_3_pane_2, -1, choices=[], style=wx.CB_DROPDOWN) self.checkbox_1 = wx.CheckBox(self.window_3_pane_2, -1, "mark schedule\nupto current age") self.label_9 = wx.StaticText(self.window_3_pane_2, -1, "narrative") self.text_ctrl_1 = wx.TextCtrl(self.window_3_pane_2, -1, "", style=wx.TE_MULTILINE) self.label_4 = wx.StaticText(self.window_3_pane_2, -1, "vacc") self.checkbox_dtpa = wx.CheckBox(self.window_3_pane_2, -1, "DTPa") self.checkbox_2_ipv = wx.CheckBox(self.window_3_pane_2, -1, "IPV") self.checkbox_paed_hepb = wx.CheckBox(self.window_3_pane_2, -1, "paed HepB") self.checkbox_hib = wx.CheckBox(self.window_3_pane_2, -1, "HIB") self.checkbox_7pneumo = wx.CheckBox(self.window_3_pane_2, -1, "7VPneumo") self.checkbox_varicella = wx.CheckBox(self.window_3_pane_2, -1, "varicella") self.checkbox_mmr = wx.CheckBox(self.window_3_pane_2, -1, "MMR") self.checkbox_mening_c = wx.CheckBox(self.window_3_pane_2, -1, "mening-C") self.checkbox_tick_enceph = wx.CheckBox(self.window_3_pane_2, -1, "tick-borne encephalitis") self.static_line_1 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_opv = wx.CheckBox(self.window_3_pane_2, -1, "OPV") self.label_8 = wx.StaticText(self.window_3_pane_2, -1, " not listed", style=wx.ALIGN_RIGHT) self.combo_box_3 = wx.ComboBox(self.window_3_pane_2, -1, choices=[], style=wx.CB_DROPDOWN) self.checkbox_Dtpa = wx.CheckBox(self.window_3_pane_2, -1, "Dtpa( less antigen, >3prev)") self.checkbox_ADT = wx.CheckBox(self.window_3_pane_2, -1, "ADT") self.checkbox_tettox = wx.CheckBox(self.window_3_pane_2, -1, "Tet Tox") self.static_line_2 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_23vpneum = wx.CheckBox(self.window_3_pane_2, -1, "23VPneum") self.checkbox_influenza = wx.CheckBox(self.window_3_pane_2, -1, "influenza") self.static_line_3 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_paed_hepa = wx.CheckBox(self.window_3_pane_2, -1, "paed HepA") self.checkbox_adult_hepa = wx.CheckBox(self.window_3_pane_2, -1, "adult HepA") self.checkbox_adult_hepb = wx.CheckBox(self.window_3_pane_2, -1, "adult HepB") self.checkbox_typhoid = wx.CheckBox(self.window_3_pane_2, -1, "typhoid") self.checkbox_mening_acwy = wx.CheckBox(self.window_3_pane_2, -1, "mening-ACWY") self.checkbox_yellow_fever = wx.CheckBox(self.window_3_pane_2, -1, "yellow fever") self.checkbox_cholera = wx.CheckBox(self.window_3_pane_2, -1, "cholera") self.static_line_4 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_rabies = wx.CheckBox(self.window_3_pane_2, -1, "rabies") self.checkbox_japan_enceph = wx.CheckBox(self.window_3_pane_2, -1, "Japanese Enceph") self.checkbox_qfever = wx.CheckBox(self.window_3_pane_2, -1, "Q Fever") self.label_5 = wx.StaticText(self.window_3_pane_2, -1, "batch no") self.combo_box_2 = wx.ComboBox(self.window_3_pane_2, -1, choices=[], style=wx.CB_DROPDOWN) self.checkbox_18 = wx.CheckBox(self.window_3_pane_2, -1, "save batch no") self.button_2 = wx.Button(self.window_3_pane_2, -1, "delete this no") self.label_6 = wx.StaticText(self.window_3_pane_2, -1, "site") self.radio_box_side = wx.RadioBox(self.window_3_pane_2, -1, "side", choices=["left", "right"], majorDimension=0, style=wx.RA_SPECIFY_COLS) self.radio_box_site = wx.RadioBox( self.window_3_pane_2, -1, "site", choices=["thigh", "deltoid", "gluteal"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.radio_box_route = wx.RadioBox(self.window_3_pane_2, -1, "route", choices=["im", "sc", "po"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.button_1 = wx.Button(self.window_3_pane_2, -1, "add vaccination /\nnarrative / override", style=wx.BU_RIGHT) self.tree_ctrl_1 = wx.TreeCtrl(self.window_1_pane_1, -1, style=wx.TR_HAS_BUTTONS | wx.TR_NO_LINES | wx.TR_HIDE_ROOT | wx.TR_DEFAULT_STYLE | wx.SUNKEN_BORDER) self.list_ctrl_2 = wx.ListCtrl(self.window_1_pane_2, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_LIST_DELETE_ITEM, self.delete_vacc_history_item, self.list_ctrl_1) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.vacc_history_item_activated, self.list_ctrl_1) self.Bind(wx.EVT_LISTBOX_DCLICK, self.double_clicked_vaccination_given, self.list_box_1) self.Bind(wx.EVT_TEXT, self.date_being_entered, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.select_combo_date, self.combo_box_1) self.Bind(wx.EVT_TEXT, self.narrative_text, self.text_ctrl_1) self.Bind(wx.EVT_CHECKBOX, self.combo_with_hep_b_selected, self.checkbox_hib) self.Bind(wx.EVT_TEXT, self.unlisted_text_changed, self.combo_box_3) self.Bind(wx.EVT_COMBOBOX, self.unlisted_combo_selected, self.combo_box_3) self.Bind(wx.EVT_TEXT, self.check_for_similiar_batchno, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.get_batchno_for_vacc, self.combo_box_2) self.Bind(wx.EVT_BUTTON, self.delete_this_batchno, self.button_2) self.Bind(wx.EVT_BUTTON, self.add_vaccination, self.button_1) self.Bind(wx.EVT_TREE_DELETE_ITEM, self.deleting_node, self.tree_ctrl_1) self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.activating_node, self.tree_ctrl_1) # end wxGlade # gnumed events gmDispatcher.connect(signal=u'post_patient_selection', receiver=self._on_post_patient_selection)
def __register_events(self): gmDispatcher.connect(signal = 'display_widget', receiver = self._on_raise_by_signal)
def __init__(self, *args, **kwds): # begin wxGlade: cAU_VaccV01Panel.__init__ kwds["style"] = wx.TAB_TRAVERSAL wx.Panel.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, -1, style=0) self.notebook_1_pane_2 = wx.Panel(self.notebook_1, -1) self.window_1 = wx.SplitterWindow(self.notebook_1_pane_2, -1, style=wx.SP_3D|wx.SP_BORDER) self.window_1_pane_2 = wx.Panel(self.window_1, -1) self.window_1_pane_1 = wx.Panel(self.window_1, -1) self.notebook_1_pane_1 = wx.Panel(self.notebook_1, -1) self.window_2 = wx.SplitterWindow(self.notebook_1_pane_1, -1, style=wx.SP_3D|wx.SP_BORDER|wx.CLIP_CHILDREN) self.window_3 = wx.SplitterWindow(self.window_2, -1, style=wx.CLIP_CHILDREN) self.window_3_pane_2 = wx.Panel(self.window_3, -1) self.window_3_pane_1 = wx.Panel(self.window_3, -1) self.window_2_pane_1 = wx.Panel(self.window_2, -1) self.sizer_20_staticbox = wx.StaticBox(self.window_3_pane_1, -1, "vaccs scheduled") self.sizer_18_staticbox = wx.StaticBox(self.window_1_pane_1, -1, "Vacc Regimes - X selected , O - not selected") self.sizer_19_staticbox = wx.StaticBox(self.window_1_pane_2, -1, "vaccinations in selected regimes") self.sizer_21_staticbox = wx.StaticBox(self.window_2_pane_1, -1, "Vacc Given") self.list_ctrl_1 = wx.ListCtrl(self.window_2_pane_1, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) self.tree_ctrl_2 = wx.TreeCtrl(self.window_3_pane_1, -1, style=wx.TR_HAS_BUTTONS|wx.TR_NO_LINES|wx.TR_HIDE_ROOT|wx.TR_DEFAULT_STYLE|wx.SUNKEN_BORDER) self.label_2 = wx.StaticText(self.window_3_pane_1, -1, "vaccinations given") self.list_box_1 = wx.ListBox(self.window_3_pane_1, -1, choices=[]) self.label_3 = wx.StaticText(self.window_3_pane_2, -1, "date") self.combo_box_1 = wx.ComboBox(self.window_3_pane_2, -1, choices=[], style=wx.CB_DROPDOWN) self.checkbox_1 = wx.CheckBox(self.window_3_pane_2, -1, "mark schedule\nupto current age") self.label_9 = wx.StaticText(self.window_3_pane_2, -1, "narrative") self.text_ctrl_1 = wx.TextCtrl(self.window_3_pane_2, -1, "", style=wx.TE_MULTILINE) self.label_4 = wx.StaticText(self.window_3_pane_2, -1, "vacc") self.checkbox_dtpa = wx.CheckBox(self.window_3_pane_2, -1, "DTPa") self.checkbox_2_ipv = wx.CheckBox(self.window_3_pane_2, -1, "IPV") self.checkbox_paed_hepb = wx.CheckBox(self.window_3_pane_2, -1, "paed HepB") self.checkbox_hib = wx.CheckBox(self.window_3_pane_2, -1, "HIB") self.checkbox_7pneumo = wx.CheckBox(self.window_3_pane_2, -1, "7VPneumo") self.checkbox_varicella = wx.CheckBox(self.window_3_pane_2, -1, "varicella") self.checkbox_mmr = wx.CheckBox(self.window_3_pane_2, -1, "MMR") self.checkbox_mening_c = wx.CheckBox(self.window_3_pane_2, -1, "mening-C") self.checkbox_tick_enceph = wx.CheckBox(self.window_3_pane_2, -1, "tick-borne encephalitis") self.static_line_1 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_opv = wx.CheckBox(self.window_3_pane_2, -1, "OPV") self.label_8 = wx.StaticText(self.window_3_pane_2, -1, " not listed", style=wx.ALIGN_RIGHT) self.combo_box_3 = wx.ComboBox(self.window_3_pane_2, -1, choices=[], style=wx.CB_DROPDOWN) self.checkbox_Dtpa = wx.CheckBox(self.window_3_pane_2, -1, "Dtpa( less antigen, >3prev)") self.checkbox_ADT = wx.CheckBox(self.window_3_pane_2, -1, "ADT") self.checkbox_tettox = wx.CheckBox(self.window_3_pane_2, -1, "Tet Tox") self.static_line_2 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_23vpneum = wx.CheckBox(self.window_3_pane_2, -1, "23VPneum") self.checkbox_influenza = wx.CheckBox(self.window_3_pane_2, -1, "influenza") self.static_line_3 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_paed_hepa = wx.CheckBox(self.window_3_pane_2, -1, "paed HepA") self.checkbox_adult_hepa = wx.CheckBox(self.window_3_pane_2, -1, "adult HepA") self.checkbox_adult_hepb = wx.CheckBox(self.window_3_pane_2, -1, "adult HepB") self.checkbox_typhoid = wx.CheckBox(self.window_3_pane_2, -1, "typhoid") self.checkbox_mening_acwy = wx.CheckBox(self.window_3_pane_2, -1, "mening-ACWY") self.checkbox_yellow_fever = wx.CheckBox(self.window_3_pane_2, -1, "yellow fever") self.checkbox_cholera = wx.CheckBox(self.window_3_pane_2, -1, "cholera") self.static_line_4 = wx.StaticLine(self.window_3_pane_2, -1) self.checkbox_rabies = wx.CheckBox(self.window_3_pane_2, -1, "rabies") self.checkbox_japan_enceph = wx.CheckBox(self.window_3_pane_2, -1, "Japanese Enceph") self.checkbox_qfever = wx.CheckBox(self.window_3_pane_2, -1, "Q Fever") self.label_5 = wx.StaticText(self.window_3_pane_2, -1, "batch no") self.combo_box_2 = wx.ComboBox(self.window_3_pane_2, -1, choices=[], style=wx.CB_DROPDOWN) self.checkbox_18 = wx.CheckBox(self.window_3_pane_2, -1, "save batch no") self.button_2 = wx.Button(self.window_3_pane_2, -1, "delete this no") self.label_6 = wx.StaticText(self.window_3_pane_2, -1, "site") self.radio_box_side = wx.RadioBox(self.window_3_pane_2, -1, "side", choices=["left", "right"], majorDimension=0, style=wx.RA_SPECIFY_COLS) self.radio_box_site = wx.RadioBox(self.window_3_pane_2, -1, "site", choices=["thigh", "deltoid", "gluteal"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.radio_box_route = wx.RadioBox(self.window_3_pane_2, -1, "route", choices=["im", "sc", "po"], majorDimension=0, style=wx.RA_SPECIFY_ROWS) self.button_1 = wx.Button(self.window_3_pane_2, -1, "add vaccination /\nnarrative / override", style=wx.BU_RIGHT) self.tree_ctrl_1 = wx.TreeCtrl(self.window_1_pane_1, -1, style=wx.TR_HAS_BUTTONS|wx.TR_NO_LINES|wx.TR_HIDE_ROOT|wx.TR_DEFAULT_STYLE|wx.SUNKEN_BORDER) self.list_ctrl_2 = wx.ListCtrl(self.window_1_pane_2, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_LIST_DELETE_ITEM, self.delete_vacc_history_item, self.list_ctrl_1) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.vacc_history_item_activated, self.list_ctrl_1) self.Bind(wx.EVT_LISTBOX_DCLICK, self.double_clicked_vaccination_given, self.list_box_1) self.Bind(wx.EVT_TEXT, self.date_being_entered, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.select_combo_date, self.combo_box_1) self.Bind(wx.EVT_TEXT, self.narrative_text, self.text_ctrl_1) self.Bind(wx.EVT_CHECKBOX, self.combo_with_hep_b_selected, self.checkbox_hib) self.Bind(wx.EVT_TEXT, self.unlisted_text_changed, self.combo_box_3) self.Bind(wx.EVT_COMBOBOX, self.unlisted_combo_selected, self.combo_box_3) self.Bind(wx.EVT_TEXT, self.check_for_similiar_batchno, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.get_batchno_for_vacc, self.combo_box_2) self.Bind(wx.EVT_BUTTON, self.delete_this_batchno, self.button_2) self.Bind(wx.EVT_BUTTON, self.add_vaccination, self.button_1) self.Bind(wx.EVT_TREE_DELETE_ITEM, self.deleting_node, self.tree_ctrl_1) self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.activating_node, self.tree_ctrl_1) # end wxGlade # gnumed events gmDispatcher.connect(signal = u'post_patient_selection', receiver=self._on_post_patient_selection)
def __register_events(self): gmDispatcher.connect(signal = 'clin.waiting_list_mod_db', receiver = self._on_waiting_list_modified) gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._on_post_patient_selection)
def __register_events(self): gmDispatcher.connect(signal='display_widget', receiver=self._on_raise_by_signal)
def __register_interests(self): gmDispatcher.connect(signal = u'pre_patient_unselection', receiver = self._on_pre_patient_unselection) gmDispatcher.connect(signal = u'post_patient_selection', receiver = self._schedule_data_reget)
def __register_interests(self): gmDispatcher.connect(signal = 'pre_patient_unselection', receiver = self._on_pre_patient_unselection) gmDispatcher.connect(signal = 'post_patient_selection', receiver = self._schedule_data_reget)
def __register_events(self): # wxPython events self.Bind(wx.EVT_RIGHT_UP, self._on_RightClick_photo) # dispatcher signals gmDispatcher.connect(receiver=self._on_post_patient_selection, signal = 'post_patient_selection')
def __init__(self): gmDispatcher.connect(self._pre_patient_unselection, u'pre_patient_unselection') gmDispatcher.connect(self._post_patient_selection, u'post_patient_selection')