gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Improving the context for creating Episode names


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Improving the context for creating Episode names
Date: Tue, 13 Jul 2010 16:18:21 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Jul 07, 2010 at 05:14:19PM -0700, Jim Busser wrote:

> However users would separately benefit by the "save" process (even when it is 
> debugged) being made clearer.

I agree.

> I wanted to test how GNUmed "Save all" would handle:
> 1) the empty "new problem" notelet

The code is written as to silently close it.

> 2) the empty 'Hypertension" notelet

Same here.

> Ideally, "Save all" should offer to save first whatever is
> the front-most tab

Save all progresses from left to right. I have now added
code to attempt to raise the notelet in question.

Ah, just found a bug. Ugly, ugly. :-)

It will now go from right to left and should do the right
thing. I added some logging to verify that.

> Whether or not this can be managed, the dialog window
> maybe needs to default wider (it is not even re-sizeable) to
> allow to see which problem is having a working name saved /
> created. Also the text "Enter a short working name for this
> new problem" appears unreliable since it may not be a new
> problem. maybe it is an old or new problem but it is the
> *episode* here being talked about as new? So should it be
>
>       "Enter a short working name for this new episode of <Problem name>"

It previously said "episode":


 commit e4d141fa68ab97ecbbdad2beac10df9d30a9378c
 Author: Karsten Hilbert <address@hidden>
 Date:   Mon Sep 24 22:05:57 2007 +0000

    - ask user for episode name when needed

diff --git a/gnumed/gnumed/client/wxpython/gmSOAPWidgets.py 
b/gnumed/gnumed/client/wxpython/gmSOAPWidgets.py
index 779151b..a87f3ec 100644
--- a/gnumed/gnumed/client/wxpython/gmSOAPWidgets.py
+++ b/gnumed/gnumed/client/wxpython/gmSOAPWidgets.py
@@ -2,8 +2,8 @@
 """
 #============================================================
 # $Source: 
/home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/client/wxpython/gmSOAPWidgets.py,v
 $
-# $Id: gmSOAPWidgets.py,v 1.94 2007-08-12 00:12:41 ncq Exp $
-__version__ = "$Revision: 1.94 $"
+# $Id: gmSOAPWidgets.py,v 1.95 2007-09-24 22:05:57 ncq Exp $
+__version__ = "$Revision: 1.95 $"
 __author__ = "Carlos Moro <address@hidden>, K.Hilbert <address@hidden>"
 __license__ = "GPL"
 
@@ -603,12 +603,12 @@ class cResizingSoapWin 
(gmResizingWidgets.cResizingWindow):
 
                # fill progress_note for import
                progress_note = []
-               aoe = ''
-               rfe = ''
+               aoe = u''
+               rfe = u''
                has_rfe = False
                soap_lines_contents = self.GetValue()
                for line_content in soap_lines_contents.values():
-                       if line_content.text.strip() == '':
+                       if line_content.text.strip() == u'':
                                continue
                        progress_note.append ({
                                gmSOAPimporter.soap_bundle_SOAP_CAT_KEY: 
line_content.data.soap_cat,
@@ -618,7 +618,7 @@ class cResizingSoapWin (gmResizingWidgets.cResizingWindow):
                        if line_content.data.is_rfe:
                                has_rfe = True
                                rfe += line_content.text.rstrip()
-                       if line_content.data.soap_cat == 'a':
+                       if line_content.data.soap_cat == u'a':
                                aoe += line_content.text.rstrip()
 
                emr = self.__pat.get_emr()
@@ -626,11 +626,25 @@ class cResizingSoapWin 
(gmResizingWidgets.cResizingWindow):
                # - new episode, must get name from narrative (or user)
                if (self.__problem is None) or (self.__problem['type'] == 
'issue'):
                        # work out episode name
+                       epic_name = u''
                        if len(aoe) != 0:
                                epi_name = aoe
                        else:
                                epi_name = rfe
 
+                       dlg = wx.TextEntryDialog (
+                               parent = self,
+                               message = _('Enter a descriptive name for the 
new episode:'),
+                               caption = _('Adding a new episode'),
+                               defaultValue = epi_name.replace('\r', 
'//').replace('\n', '//'),
+                               style = wx.OK | wx.CENTRE
+                       )
+                       dlg.ShowModal()
+                       epi_name = dlg.GetValue().strip()
+                       if epi_name == u'':
+                               gmGuiHelpers.gm_show_error(_('Cannot save a new 
episode without a name.'), _('saving progress note'), gmLog.lErr)
+                               return False
+
                        # new unassociated episode
                        new_episode = emr.add_episode(episode_name = 
epi_name[:45], pk_health_issue = None, is_open = True)


but was later decided on-list to be misleading.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]