def _on_history_item_activated(self, event): data = self._LCTRL_history.get_selected_item_data(only_one = True) if data is None: return if isinstance(data, basestring): gmPregWidgets.calculate_edc(parent = self, patient = gmPerson.gmCurrentPatient()) return # <ctrl> down ? if wx.GetKeyState(wx.WXK_CONTROL): if isinstance(data, gmEMRStructItems.cHealthIssue): gmEMRStructWidgets.edit_health_issue(parent = self, issue = data) return if isinstance(data, gmFamilyHistory.cFamilyHistory): FamilyHistoryWidgets.edit_family_history(parent = self, family_history = data) return if isinstance(data, gmEMRStructItems.cHospitalStay): gmEMRStructWidgets.edit_hospital_stay(parent = self, hospital_stay = data) return if isinstance(data, gmEMRStructItems.cPerformedProcedure): gmEMRStructWidgets.edit_procedure(parent = self, procedure = data) return if isinstance(data, gmVaccination.cVaccination): gmVaccWidgets.edit_vaccination(parent = self, vaccination = data, single_entry = True) return return if isinstance(data, gmEMRStructItems.cHealthIssue): gmDispatcher.send(signal = 'display_widget', name = 'gmEMRBrowserPlugin') return if isinstance(data, gmFamilyHistory.cFamilyHistory): FamilyHistoryWidgets.manage_family_history(parent = self) return if isinstance(data, gmEMRStructItems.cHospitalStay): gmEMRStructWidgets.manage_hospital_stays(parent = self) return if isinstance(data, gmEMRStructItems.cPerformedProcedure): gmEMRStructWidgets.manage_performed_procedures(parent = self) return if isinstance(data, gmVaccination.cVaccination): gmVaccWidgets.manage_vaccinations(parent = self) return return
def _on_contacts_item_activated(self, event): data = self._LCTRL_contacts.get_selected_item_data(only_one = True) if data is not None: # <ctrl> down ? if wx.GetKeyState(wx.WXK_CONTROL): if isinstance(data, gmEMRStructItems.cHospitalStay): gmEMRStructWidgets.edit_hospital_stay(parent = self, hospital_stay = data) return if isinstance(data, gmDemographicRecord.cPatientAddress): pass if isinstance(data, gmDemographicRecord.cCommChannel): gmContactWidgets.edit_comm_channel(parent = self, comm_channel = data, channel_owner = gmPerson.gmCurrentPatient()) return if isinstance(data, gmPerson.cPerson): pass if isinstance(data, gmStaff.cStaff): pass gmDispatcher.send(signal = 'display_widget', name = 'gmNotebookedPatientEditionPlugin')