コード例 #1
0
 def DoLayout (self):
     Planlist = [{'label':'pencillin V', 'data':1, 'weight':1}, {'label':'penicillin X', 'data':2, 'weight':1},
         {'label':'penicillinamine', 'data':3, 'weight':1}, {'label':'penthrane', 'data':4, 'weight':1},
         {'label':'penthidine', 'data':5, 'weight':1},
         {'label':'recall', 'data':RecallWindow, 'weight':1}]
     AOElist = [{'label':'otitis media', 'data':1, 'weight':1}, {'label':'otitis externa', 'data':2, 'weight':1},
         {'label':'cellulitis', 'data':3, 'weight':1}, {'label':'gingvitis', 'data':4, 'weight':1},
         {'label':'ganglion', 'data':5, 'weight':1}]
     Subjlist = [{'label':'earache', 'data':1, 'weight':1}, {'label':'earache', 'data':1, 'weight':1},
        {'label':'ear discharge', 'data':2, 'weight':1}, {'label':'eardrum bulging', 'data':3, 'weight':1},
        {'label':'sore arm', 'data':4, 'weight':1}, {'label':'sore tooth', 'data':5, 'weight':1}]
     self.S = ResizingSTC (self, -1)
     self.S.AttachMatcher (cMatchProvider_FixedList (Subjlist))
     self.O = ResizingSTC (self, -1)
     self.A = ResizingSTC (self, -1)
     self.A.AttachMatcher (cMatchProvider_FixedList (AOElist))
     self.P = ResizingSTC (self, -1)
     self.P.AttachMatcher (cMatchProvider_FixedList (Planlist))
     self.S.prev = None
     self.S.next = self.O
     self.O.prev = self.S
     self.O.next = self.A
     self.A.prev = self.O
     self.A.next = self.P
     self.P.prev = self.A
     self.P.next = None
     self.AddWidget (self.S, "Subjective")
     self.Newline ()
     self.AddWidget (self.O, "Objective")
     self.Newline ()
     self.AddWidget (self.A, "Assessment")
     self.Newline ()
     self.AddWidget (self.P, "Plan")
     self.SetValues ({"Subjective":"sore ear", "Plan":"Amoxycillin"})
コード例 #2
0
ファイル: SOAP2.py プロジェクト: sk/gnumed
 def DoLayout (self):
     Planlist = [{'label':'pencillin V', 'data':1, 'weight':1}, {'label':'penicillin X', 'data':2, 'weight':1},
         {'label':'penicillinamine', 'data':3, 'weight':1}, {'label':'penthrane', 'data':4, 'weight':1},
         {'label':'penthidine', 'data':5, 'weight':1},
         {'label':'recall', 'data':RecallWindow, 'weight':1}]
     AOElist = [{'label':'otitis media', 'data':1, 'weight':1}, {'label':'otitis externa', 'data':2, 'weight':1},
         {'label':'cellulitis', 'data':3, 'weight':1}, {'label':'gingvitis', 'data':4, 'weight':1},
         {'label':'ganglion', 'data':5, 'weight':1}]
     Subjlist = [{'label':'earache', 'data':1, 'weight':1}, {'label':'earache', 'data':1, 'weight':1},
        {'label':'ear discharge', 'data':2, 'weight':1}, {'label':'eardrum bulging', 'data':3, 'weight':1},
        {'label':'sore arm', 'data':4, 'weight':1}, {'label':'sore tooth', 'data':5, 'weight':1}]
     self.S = ResizingSTC (self, -1)
     self.S.AttachMatcher (cMatchProvider_FixedList (Subjlist))
     self.O = ResizingSTC (self, -1)
     self.A = ResizingSTC (self, -1)
     self.A.AttachMatcher (cMatchProvider_FixedList (AOElist))
     self.P = ResizingSTC (self, -1)
     self.P.AttachMatcher (cMatchProvider_FixedList (Planlist))
     self.S.prev = None
     self.S.next = self.O
     self.O.prev = self.S
     self.O.next = self.A
     self.A.prev = self.O
     self.A.next = self.P
     self.P.prev = self.A
     self.P.next = None
     self.AddWidget (self.S, "Subjective")
     self.Newline ()
     self.AddWidget (self.O, "Objective")
     self.Newline ()
     self.AddWidget (self.A, "Assessment")
     self.Newline ()
     self.AddWidget (self.P, "Plan")
     self.SetValues ({"Subjective":"sore ear", "Plan":"Amoxycillin"})
コード例 #3
0
ファイル: SOAPTextCtrl.py プロジェクト: ncqgm/gnumed
 def GetHeaders (self):
     return [
         (_('Subjective'), TEXT, cMatchProvider_FixedList (Subjlist), {}),
         (_('Objective'), TEXT, None, {}),
         (_('Assessment'), SELECTION, cMatchProvider_FixedList (AOElist), {}),
         (_('Plan'), TEXT, cMatchProvider_FixedList (Planlist), {'recall':RecallCtrl})
         ]
コード例 #4
0
ファイル: SOAPTextCtrl.py プロジェクト: ncqgm/gnumed
 def GetHeaders(self):
     return [(_('Subjective'), TEXT, cMatchProvider_FixedList(Subjlist),
              {}), (_('Objective'), TEXT, None, {}),
             (_('Assessment'), SELECTION, cMatchProvider_FixedList(AOElist),
              {}),
             (_('Plan'), TEXT, cMatchProvider_FixedList(Planlist), {
                 'recall': RecallCtrl
             })]
コード例 #5
0
ファイル: gmGuiHelpers.py プロジェクト: weeksjm/gnumed
    def __init__(self, *args, **kwargs):

        gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

        items = [
            {
                'list_label': _('Yes: + / ! / 1'),
                'field_label': _('yes'),
                'data': True,
                'weight': 0
            },
            {
                'list_label': _('No: - / 0'),
                'field_label': _('no'),
                'data': False,
                'weight': 1
            },
            {
                'list_label': _('Unknown: ?'),
                'field_label': _('unknown'),
                'data': None,
                'weight': 2
            },
        ]
        mp = gmMatchProvider.cMatchProvider_FixedList(items)
        mp.setThresholds(1, 1, 2)
        mp.word_separators = '[ :/]+'
        mp.word_separators = None
        mp.ignored_chars = r"[.'\\(){}\[\]<>~#*$%^_=&@\t23456]+" + r'"'

        self.matcher = mp
コード例 #6
0
ファイル: gmStaffWidgets.py プロジェクト: weeksjm/gnumed
    def __init__(self, *args, **kwargs):

        gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

        items = [{
            'list_label': _('Public (no clinical or demographic access)'),
            'field_label': _('public'),
            'data': 'public access',
            'weight': 1
        }, {
            'list_label': _('Staff (demographic access only)'),
            'field_label': _('staff (clerical)'),
            'data': 'non-clinical access',
            'weight': 1
        }, {
            'list_label': _('full clinical access'),
            'field_label': _('full clinical access'),
            'data': 'full clinical access',
            'weight': 1
        }]
        mp = gmMatchProvider.cMatchProvider_FixedList(items)
        mp.setThresholds(1, 2, 3)
        mp.word_separators = None
        #mp.ignored_chars = r"[.'\\(){}\[\]<>~#*$%^_=&@\t0123456789]+" + r'"'
        #self.SetToolTip(_('The preparation (form) of the substance or drug.'))
        self.matcher = mp
        self.selection_only = True
コード例 #7
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
コード例 #8
0
ファイル: gmStaffWidgets.py プロジェクト: sk/gnumed
    def __init__(self, *args, **kwargs):

        gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

        items = [
            {
                "list_label": _("Public (no clinical or demographic access)"),
                "field_label": _("public"),
                "data": "public access",
                "weight": 1,
            },
            {
                "list_label": _("Staff (demographic access only)"),
                "field_label": _("staff (clerical)"),
                "data": "non-clinical access",
                "weight": 1,
            },
            {
                "list_label": _("full clinical access"),
                "field_label": _("full clinical access"),
                "data": "full clinical access",
                "weight": 1,
            },
        ]
        mp = gmMatchProvider.cMatchProvider_FixedList(items)
        mp.setThresholds(1, 2, 3)
        mp.word_separators = None
        # mp.ignored_chars = r"[.'\\(){}\[\]<>~#*$%^_=&@\t0123456789]+" + r'"'
        # self.SetToolTipString(_('The preparation (form) of the substance or brand.'))
        self.matcher = mp
        self.selection_only = True
コード例 #9
0
ファイル: gmWaitingListWidgets.py プロジェクト: ncqgm/gnumed
	def __init__(self, *args, **kwargs):

		gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

		mp = gmMatchProvider.cMatchProvider_FixedList(aSeq = [])
		mp.setThresholds(1, 2, 2)
		self.matcher = mp
		self.selection_only = False
コード例 #10
0
	def __init__(self, *args, **kwargs):

		gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

		mp = gmMatchProvider.cMatchProvider_FixedList(aSeq = [])
		mp.setThresholds(1, 2, 2)
		self.matcher = mp
		self.selection_only = False
コード例 #11
0
ファイル: gmGuiHelpers.py プロジェクト: ncqgm/gnumed
	def __init__(self, *args, **kwargs):

		gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

		items = [
			{'list_label': _('Yes: + / ! / 1'), 'field_label': _('yes'), 'data': True, 'weight': 0},
			{'list_label': _('No: - / 0'), 'field_label': _('no'), 'data': False, 'weight': 1},
			{'list_label': _('Unknown: ?'), 'field_label': _('unknown'), 'data': None, 'weight': 2},
		]
		mp = gmMatchProvider.cMatchProvider_FixedList(items)
		mp.setThresholds(1, 1, 2)
		mp.word_separators = '[ :/]+'
		mp.word_separators = None
		mp.ignored_chars = r"[.'\\(){}\[\]<>~#*$%^_=&@\t23456]+" + r'"'

		self.matcher = mp
コード例 #12
0
ファイル: gmStaffWidgets.py プロジェクト: ncqgm/gnumed
	def __init__(self, *args, **kwargs):

		gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

		items = [
			{'list_label': _('Public (no clinical or demographic access)'), 'field_label': _('public'), 'data': 'public access', 'weight': 1},
			{'list_label': _('Staff (demographic access only)'), 'field_label': _('staff (clerical)'), 'data': 'non-clinical access', 'weight': 1},
			{'list_label': _('full clinical access'), 'field_label': _('full clinical access'), 'data': 'full clinical access', 'weight': 1}
		]
		mp = gmMatchProvider.cMatchProvider_FixedList(items)
		mp.setThresholds(1, 2, 3)
		mp.word_separators = None
		#mp.ignored_chars = r"[.'\\(){}\[\]<>~#*$%^_=&@\t0123456789]+" + r'"'
		#self.SetToolTip(_('The preparation (form) of the substance or drug.'))
		self.matcher = mp
		self.selection_only = True
コード例 #13
0
	def __init__(self, *args, **kwargs):

		gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

		self.selection_only = False			# can be NULL, too

		mp = gmMatchProvider.cMatchProvider_FixedList (
			aSeq = [
				{'data': 'A', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('A'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('A'), 'weight': 1},
				{'data': 'B', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('B'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('B'), 'weight': 1},
				{'data': 'C', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('C'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('C'), 'weight': 1},
				{'data': 'D', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('D'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('D'), 'weight': 1}
			]
		)
		mp.setThresholds(1, 2, 4)
		self.matcher = mp

		self.SetToolTip(_(
			"The diagnostic classification or grading of this assessment.\n"
			"\n"
			"This documents how certain one is about this being a true diagnosis."
		))
コード例 #14
0
ファイル: gmEMRStructWidgets.py プロジェクト: ncqgm/gnumed
	def __init__(self, *args, **kwargs):

		gmPhraseWheel.cPhraseWheel.__init__(self, *args, **kwargs)

		self.selection_only = False			# can be NULL, too

		mp = gmMatchProvider.cMatchProvider_FixedList (
			aSeq = [
				{'data': 'A', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('A'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('A'), 'weight': 1},
				{'data': 'B', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('B'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('B'), 'weight': 1},
				{'data': 'C', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('C'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('C'), 'weight': 1},
				{'data': 'D', 'list_label': gmEMRStructItems.diagnostic_certainty_classification2str('D'), 'field_label': gmEMRStructItems.diagnostic_certainty_classification2str('D'), 'weight': 1}
			]
		)
		mp.setThresholds(1, 2, 4)
		self.matcher = mp

		self.SetToolTip(_(
			"The diagnostic classification or grading of this assessment.\n"
			"\n"
			"This documents how certain one is about this being a true diagnosis."
		))