| Trees | Indices | Help |
|
|---|
|
|
1 #======================================================================
2 # GnuMed patient EMR Journal plugin
3 # ----------------------------------------------
4 #
5 # @copyright: author
6 #======================================================================
7 __version__ = "$Revision: 1.15 $"
8 __author__ = "Karsten Hilbert"
9 __license__ = 'GPL (details at http://www.gnu.org)'
10
11 import logging
12
13
14 from Gnumed.wxpython import gmPlugin, gmEMRBrowser
15 from Gnumed.pycommon import gmI18N
16
17 _log = logging.getLogger('gm.ui')
18 _log.info(__version__)
19
20 #======================================================================
42
43 #======================================================================
44 # main
45 #----------------------------------------------------------------------
46 if __name__ == "__main__":
47
48 import sys
49
50 import wx
51
52 from Gnumed.exporters import gmPatientExporter
53 from Gnumed.business import gmPerson
54
55 _log.info("starting emr journal plugin...")
56
57 try:
58 # obtain patient
59 patient = gmPerson.ask_for_patient()
60 if patient is None:
61 print "None patient. Exiting gracefully..."
62 sys.exit(0)
63 gmPatSearchWidgets.set_active_patient(patient=patient)
64
65 # display standalone browser
66 application = wx.wxPyWidgetTester(size=(800,600))
67 emr_journal = gmEMRBrowser.cEMRJournalPanel(application.frame, -1)
68 emr_journal.refresh_journal()
69
70 application.frame.Show(True)
71 application.MainLoop()
72
73 # clean up
74 if patient is not None:
75 try:
76 patient.cleanup()
77 except:
78 print "error cleaning up patient"
79 except StandardError:
80 _log.exception("unhandled exception caught !")
81 # but re-raise them
82 raise
83
84 _log.info("closing emr journal plugin...")
85
86 #======================================================================
87 # $Log: gmEMRJournalPlugin.py,v $
88 # Revision 1.15 2010/02/07 15:18:35 ncq
89 # - put this in EMR rather then EMR / Show as as per Jim
90 #
91 # Revision 1.14 2009/06/29 15:13:25 ncq
92 # - improved placement in menu hierarchy
93 # - add active letters
94 #
95 # Revision 1.13 2009/06/04 16:31:24 ncq
96 # - use set-active-patient from pat-search-widgets
97 #
98 # Revision 1.12 2008/03/06 18:32:30 ncq
99 # - standard lib logging only
100 #
101 # Revision 1.11 2008/01/27 21:21:59 ncq
102 # - no more gmCfg
103 #
104 # Revision 1.10 2007/10/21 20:25:43 ncq
105 # - fix syntax error
106 #
107 # Revision 1.9 2007/10/12 07:28:24 ncq
108 # - lots of import related cleanup
109 #
110 # Revision 1.8 2006/10/31 16:06:19 ncq
111 # - no more gmPG
112 #
113 # Revision 1.7 2006/10/25 07:23:30 ncq
114 # - no gmPG no more
115 #
116 # Revision 1.6 2006/05/04 09:49:20 ncq
117 # - get_clinical_record() -> get_emr()
118 # - adjust to changes in set_active_patient()
119 # - need explicit set_active_patient() after ask_for_patient() if wanted
120 #
121 # Revision 1.5 2005/12/27 19:05:36 ncq
122 # - use gmI18N
123 #
124 # Revision 1.4 2005/10/03 13:59:59 sjtan
125 # indentation errors
126 #
127 # Revision 1.3 2005/09/26 18:01:52 ncq
128 # - use proper way to import wx26 vs wx2.4
129 # - note: THIS WILL BREAK RUNNING THE CLIENT IN SOME PLACES
130 # - time for fixup
131 #
132 # Revision 1.2 2005/06/07 20:56:56 ncq
133 # - take advantage of improved EMR menu
134 #
135 # Revision 1.1 2005/04/12 16:26:33 ncq
136 # - added Journal style EMR display plugin
137 #
138
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Feb 9 04:01:53 2010 | http://epydoc.sourceforge.net |