From MAILER-DAEMON Thu Jan 08 11:01:44 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Y9FWq-0005LJ-5t for mharc-gnumed-announce@gnu.org; Thu, 08 Jan 2015 11:01:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9FWk-0005Ky-Sy for gnumed-announce@gnu.org; Thu, 08 Jan 2015 11:01:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9FWf-0003kX-IO for gnumed-announce@gnu.org; Thu, 08 Jan 2015 11:01:38 -0500 Received: from mout.gmx.net ([212.227.15.19]:49851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9FWf-0003kR-9U; Thu, 08 Jan 2015 11:01:33 -0500 Received: from hermes ([84.133.69.48]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MdKkd-1YQduy3WOB-00ITFt; Thu, 08 Jan 2015 17:01:32 +0100 Received: from ncq by hermes with local (Exim 4.84) (envelope-from ) id 1Y9FWd-0000Va-03; Thu, 08 Jan 2015 17:01:31 +0100 Date: Thu, 8 Jan 2015 17:01:30 +0100 From: Karsten Hilbert To: GNUmed list Message-ID: <20150108160130.GF2985@hermes.hilbert.loc> Mail-Followup-To: GNUmed list , gm-announce MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.5.23 (2014-03-12) Sender: karsten.hilbert@gmx.net X-Provags-ID: V03:K0:0DKIvl60Ld28cFxgYNCEYOqZgxUKX5GALEfZAYQ34j59TJTF4Qw 4JhsZKEmGwwvURUD3D9gLYXPGdmTOBx2SQNKbVXU9F2C9dsf8UtHqGsFMAH7z4hKHskUptH Fr38lTtwPkdHWhVNfq6hJerA72ln1ad2NsqEYqYFWaizfH5g+wFKGqQ0HRFhSOtk/rmPJtv zxHDn7mPMNNsTjyZbvxGg== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.19 Cc: gm-announce Subject: [Gnumed-announce] GNUmed 1.5.0 Feature Release X-BeenThere: gnumed-announce@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Important announcements about the gnumed project List-Id: Important announcements about the gnumed project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 16:01:42 -0000 Hello all, I am glad to be able to announce the immediate availability of the GNUmed 1.5.0 Feature Release. It provides the following bug fixes and improvements: Changelog: 1.5.0 client NEW: by-day display mode for test results including multi-line ones NEW: patient documents export area plugin NEW: manage automatic dynamic hints NEW: letter receiver placeholders $$ NEW: EDC storage/calculator NEW: external care documentation NEW: print manager NEW: external IDs on organizational units NEW: better logging of SEGFAULT et alii NEW: fully placeholdered general letter template NEW: HL7 lab results import NEW: Wells Score for pulmonary embolism NEW: algorithm for choosing an NSAR NEW: bill related reports NEW: $$ placeholder NEW: read German eGK/KVK/PKVK on Windows NEW: per-patient suppression of dynamic hints NEW: clipboard-based XML-formatted demographics exchange (I.Valdes, LinuxMedNews) NEW: enable TLS on sending bug reports NEW: sort substance intake by start date [thanks Jim] NEW: save report generator results as CSV file NEW: vCard import/export (I.Valdes, LinuxMedNews) NEW: LQTS clinical probability score IMPROVED: filter inbox to active patient if called from waiting list [thanks Jim] IMPROVED: robustness of patient change event sequence ordering IMPROVED: import upstream TimeLine 1.2.3 release IMPROVED: encounter editing before patient switch/creation IMPROVED: manage episodes from measurements EA [thanks Jim] IMPROVED: workflow when entering test result with new type IMPROVED: updated to TimeLine 1.3.0 version IMPROVED: on list updates scroll to last selected row if possible IMPROVED: updated DVT Wells Score IMPROVED: enhance dynamic keyword text expansions IMPROVED: support test results status / source data IMPROVED: link to WHO ATC list from drug/substance EA [thanks Jim] IMPROVED: wxPython 3 compatibility IMPROVED: "Relevant" messages mode in provider inbox IMPROVED: GFR calculations IMPROVED: prevent deletion of messages not belonging to current provider IMRPOVED: display of medication related lab monitoring IMPROVED: exception logging enhancements IMPROVED: workflow creating bill w/ respect to VAT [thanks Marc] IMRPOVED: workflow finding unreviewed test results [thanks Jim] IMPROVED: new-documents virtual inbox message 20.0 IMPROVED: set clin.encounter.fk_location NOT NULL IMPROVED: set clin.test_type.fk_test_org NOT NULL IMPROVED: get rid of old-style schema notification IMPROVED: database docs now per schema IMRPOVED: auto-generation of episode/encounter FK sanity check triggers IMPROVED: clin.test_type.conversion_unit -> *.reference_unit NEW: clin.external_care NEW: clin.patient NEW: bootstrapper now REINDEXes after upgrade Downloads available from: http://www.gnumed.de/downloads/client/1.5/ http://www.gnumed.de/downloads/server/v20/ Client installation: Easily installable packages for your platform of choice will be available shortly. Note that due to the current freeze of Debian Testing there won't be any 1.5 packages in Testing before it becomes Stable. Packages may appear in Experimental, however. Meanwhile you can run the client from a downloaded tarball or use the net based client installer: http://www.gnumed.de/downloads/client/gm-install_client_locally.sh which you need to download, make executable, and run. More information available here: http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort Database installation / upgrade: Note that this release, as usual, DOES require a database upgrade which you need to install with either $> gm-upgrade_server 19 20 or $> cd .../server/bootstrap/ $> ./upgrade-db.sh 19 20 Related information is found here: http://wiki.gnumed.de/bin/view/Gnumed/GmManualServerUpgrade Please download, install, and report problems ! Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 From MAILER-DAEMON Mon Jan 12 08:37:08 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YAfB6-0005aq-3u for mharc-gnumed-announce@gnu.org; Mon, 12 Jan 2015 08:37:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAfB1-0005a3-V1 for gnumed-announce@gnu.org; Mon, 12 Jan 2015 08:37:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YAfAz-0001wf-1V for gnumed-announce@gnu.org; Mon, 12 Jan 2015 08:37:03 -0500 Received: from mout.gmx.net ([212.227.15.18]:61970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YAfAr-0001ue-WB; Mon, 12 Jan 2015 08:36:54 -0500 Received: from hermes ([217.84.217.108]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LmbZb-1XaVH63Dcp-00aHVx; Mon, 12 Jan 2015 14:36:52 +0100 Received: from ncq by hermes with local (Exim 4.84) (envelope-from ) id 1YAfAo-0003qd-TJ; Mon, 12 Jan 2015 14:36:50 +0100 Date: Mon, 12 Jan 2015 14:36:50 +0100 From: Karsten Hilbert To: GNUmed list Message-ID: <20150112133650.GD3206@hermes.hilbert.loc> Mail-Followup-To: GNUmed list , gm-announce MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="TiqCXmo5T1hvSQQg" Content-Disposition: inline Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.5.23 (2014-03-12) Sender: karsten.hilbert@gmx.net X-Provags-ID: V03:K0:zj19LLOGNLlqkMqF9lSYxJZ0JKek8Xz+A/hhMEbEdPCBoVy2Sxk NjRhbZFhWutvjhSc5d3DpImCzpiF9kfTpZ7LbdyzuKS3eaoHgbq9APioIVqKSgRAlqrWaDd jj9mQ/6tO/rIpU0BdchvL9oHSZI6JPbKCSog39X/WP6IVBLlW69QGSBKoMfyWVCO+ckeS0a 9XKUw0hSz2LGFkxm3JUmQ== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.18 Cc: gm-announce Subject: [Gnumed-announce] Release 1.5.0 problem X-BeenThere: gnumed-announce@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Important announcements about the gnumed project List-Id: Important announcements about the gnumed project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 13:37:07 -0000 --TiqCXmo5T1hvSQQg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all, the 1.5.0 tarball release misses a file (which will be included with 1.5.1). If you need to run version 1.5.0 then copy the attached file to client/wxpython/ Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 --TiqCXmo5T1hvSQQg Content-Type: text/x-python; charset=us-ascii Content-Disposition: attachment; filename="gmPregWidgets.py" """GNUmed pregnancy related dates widgets. """ #==================================================================== __author__ = "M. Bonert, R. Terry, I. Haywood, K.Hilbert" __licence__ = "GPL v2 or later" import sys import datetime as pydt import wx from Gnumed.pycommon import gmDateTime from Gnumed.pycommon import gmTools from Gnumed.business import gmClinicalCalculator #==================================================================== def calculate_edc(parent=None, patient=None): if parent is None: parent = wx.GetApp().GetTopWindow() dlg = cEdcCalculatorDlg(parent, -1) if patient.connected: dlg.patient = patient dlg.EDC = patient.emr.EDC action = dlg.ShowModal() edc = dlg.EDC dlg.Destroy() if not patient.connected: return if edc is None: return if action != wx.ID_SAVE: return patient.emr.EDC = edc #==================================================================== from wxGladeWidgets import wxgEdcCalculatorDlg class cEdcCalculatorDlg(wxgEdcCalculatorDlg.wxgEdcCalculatorDlg): def __init__(self, *args, **kwds): wxgEdcCalculatorDlg.wxgEdcCalculatorDlg.__init__(self, *args, **kwds) self.__calc = gmClinicalCalculator.cClinicalCalculator() self.__init_ui() #---------------------------------------------------------------- def __init_ui(self): edc = self.__calc.get_EDC(lmp = None, nullipara = self._CHBOX_first_pregnancy.GetValue()) txt = _( u'Algorithm: %s\n' u'\n' u'Source: %s' ) % ( edc.formula_name, edc.formula_source ) self._TCTRL_algo.SetValue(txt) self._PRW_lmp.add_callback_on_selection(self._on_lmp_selected) self._PRW_edc.add_callback_on_modified(self._on_edc_modified) self._PRW_lmp.SetFocus() #---------------------------------------------------------------- def _on_lmp_selected(self, data): self.__recalculate() #---------------------------------------------------------------- def _on_edc_modified(self): self._PRW_lmp.SetData(None) self._TCTRL_details.SetValue(u'') #---------------------------------------------------------------- def _on_first_pregnancy_toggled(self, event): event.Skip() self.__recalculate() #---------------------------------------------------------------- def _on_lmp_picked_in_calendar(self, event): event.Skip() self._PRW_lmp.SetData(gmDateTime.wxDate2py_dt(wxDate = self._CALCTRL.Date)) self.__recalculate() #---------------------------------------------------------------- def _on_save_button_pressed(self, event): event.Skip() if self.__calc.patient is None: return False if self._PRW_edc.is_valid_timestamp(allow_empty = False): self.EndModal(wx.ID_SAVE) return True return False #---------------------------------------------------------------- def __recalculate(self): lmp = self._PRW_lmp.date if lmp is None: self._PRW_edc.SetData(None) self._TCTRL_details.SetValue(u'') return edc = self.__calc.get_EDC(lmp = lmp, nullipara = self._CHBOX_first_pregnancy.GetValue()) self._PRW_edc.SetData(edc.numeric_value) details = u'' now = gmDateTime.pydt_now_here() # Beulah Hunter, 375 days (http://www.reference.com/motif/health/longest-human-pregnancy-on-record) if (lmp < now) and (edc.numeric_value > (now + pydt.timedelta(days = 380))): age = now - lmp weeks, days = divmod(age.days, 7) week = weeks if days > 0: week = weeks + 1 month, tmp = divmod(age.days, 28) if days > 0: month += 1 details += _( u'Current age of pregnancy (%s):\n' u' day %s = %s weeks %s days = week %s = month %s\n\n' ) % ( gmDateTime.pydt_strftime(now, '%Y %b %d'), age.days, int(weeks), int(days), week, month ) details += edc.format ( left_margin = 1, width = 50, with_formula = False, with_warnings = True, with_variables = True, with_sub_results = True, return_list = False ) self._TCTRL_details.SetValue(details) #---------------------------------------------------------------- # properties #---------------------------------------------------------------- def _get_EDC(self): return self._PRW_edc.date def _set_EDC(self, edc): self._PRW_edc.SetData(edc) self._PRW_lmp.SetData(None) self._TCTRL_details.SetValue(u'') EDC = property(_get_EDC, _set_EDC) #---------------------------------------------------------------- def _set_patient(self, patient): self.__calc.patient = patient patient = property(lambda x:x, _set_patient) #==================================================================== #==================================================================== # old code #==================================================================== #==================================================================== #==================================================================== import math, zlib, cPickle, random, string, os.path import wx.lib.rcsizer import wx.calendar """ Calculates from LMP: - EDC - 18th week ultrasound scan Naegele's rule is easy for manual calculation, but a pain to code Enter Haywood's rule ;-), human gestation is defined as 24192000 seconds. (Ian, can you please explain a bit more ?) TODO: ideally, tool should query backend for parity, race, etc. for exact measurement """ LMP_FIELD = 0 US_FIELD = 1 ID_LMP = wx.NewId() ID_DUE = wx.NewId() ID_DAY = wx.NewId() ID_WEEK = wx.NewId() ID_MENU = wx.NewId() GESTATION = 24192000 WEEK = 604800 DAY = 86400 US18_52 = 10886400 # 18 weeks in seconds (for 18/52 Ultrasound) #==================================================================== class cPregCalcFrame (wx.Frame): """ The new pregnancy calculator. """ #TODO # IMPROVE removal of time from txt_lmp, txtedc, txtdue (?) # see: def PurgeTime(self, date): # # explore idea of 'status bar' across bottom -- something to make # clear how to use the calculator # # change the set-up of the RowColSizer(), shrink the size of the 'Weeks' & 'Days' fields # make column on right side of preg. calc. more compact # # clean-up the names of the variables (some could be named more descriptively) # # add ability to type in LMP and Scan Date with keyboard (as opposed to only clicking on calendar) # make movement between fields possible with 'tab' & 'enter' def __init__ (self, parent): myStyle = wx.MINIMIZE_BOX | wx.CAPTION | wx.ALIGN_CENTER | \ wx.ALIGN_CENTER_VERTICAL | wx.TAB_TRAVERSAL | wx.STAY_ON_TOP wx.Frame.__init__(self, parent, -1, _("Pregnancy Calculator"), style=myStyle) # initialization of variables used in the control & calculation self.xfer_cal_date_to=LMP_FIELD # controls which variable (LMP or Ultrasound) a calendar event changes # (if == 0): {calendar selection modifies LMP} # (if == 1): {calendar selection modifies Ultrasound Date} self.ustxt=wx.DateTime_Today() # avoids problem - one would have if the user clicked on # ultrasound date # BONUS: makes the preg. calculator useful for EDC calcs given # a date and the gestation time # get icon if __name__ == '__main__': png_fname = os.path.join('..', 'bitmaps', 'preg_calculator.png') else: from Gnumed.pycommon import gmGuiBroker gb = gmGuiBroker.GuiBroker() png_fname = os.path.join(gb['gnumed_dir'], 'bitmaps', 'preg_calculator.png') icon = wx.EmptyIcon() icon.LoadFile(png_fname, wx.BITMAP_TYPE_PNG) self.SetIcon(icon) szr_rc = wx.lib.rcsizer.RowColSizer() #------------------------------ # sizer holding the 'LMP' stuff #------------------------------ label = wx.StaticText(self,-1,_("LMP"),size = (50,20)) #label Lmp label.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label.SetForegroundColour(wx.Colour(0,0,0)) self.txt_lmp = wx.TextCtrl(self,-1,"",size=(100,20)) # text for lmp self.txt_lmp.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.txt_lmp.SetToolTip(wx.ToolTip(_("Click on calendar to enter the last menstrual period date"))) tiplmp=self.txt_lmp.GetToolTip() szr_row1 = wx.BoxSizer(wx.HORIZONTAL) szr_row1.Add(self.txt_lmp,1,wx.EXPAND|wx.ALL,2) wx.EVT_SET_FOCUS(self.txt_lmp, self.OnSetFocus_lmp) szr_lmp = wx.BoxSizer(wx.HORIZONTAL) szr_lmp.Add(label, 1, 0, 0) szr_lmp.Add((10,1),0,0) szr_rc.Add(szr_lmp, flag=wx.EXPAND, row=0, col=1) szr_rc.Add(szr_row1, flag=wx.EXPAND, row=0, col=2, colspan=5) #------------------------------ # sizer holding the 'Gest.' stuff #------------------------------ label = wx.StaticText(self,-1,_("Gest."),size = (50,20)) label.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label.SetForegroundColour(wx.Colour(0,0,0)) self.txtgest = wx.TextCtrl(self,-1,"",size=(100,20)) self.txtgest.Enable(False) self.txtgest.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.txtgest_szr = wx.BoxSizer(wx.HORIZONTAL) self.txtgest_szr.Add(self.txtgest,1,wx.EXPAND|wx.ALL,2) szr_gest = wx.BoxSizer(wx.HORIZONTAL) szr_gest.Add(label, 1, 0, 0) szr_gest.Add((10,1),0,0) szr_rc.Add(szr_gest, flag=wx.EXPAND, row=1, col=1) szr_rc.Add(self.txtgest_szr, flag=wx.EXPAND, row=1, col=2, colspan=5) #------------------------------ # sizer holding the 'EDC' stuff #------------------------------ label = wx.StaticText(self,-1,_("EDC"),size = (50,20)) label.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label.SetForegroundColour(wx.Colour(0,0,0)) self.txtedc = wx.TextCtrl(self,-1,"",size=(100,20)) self.txtedc.Enable(False) self.txtedc.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) szr_txtedc = wx.BoxSizer(wx.HORIZONTAL) szr_txtedc.Add(self.txtedc,1,wx.EXPAND|wx.ALL,2) szr_edc = wx.BoxSizer(wx.HORIZONTAL) szr_edc.Add(label,1,0,0) szr_edc.Add((10,1),0,0) szr_rc.Add(szr_edc, flag=wx.EXPAND, row=2, col=1) szr_rc.Add(szr_txtedc, flag=wx.EXPAND, row=2, col=2, colspan=5) #------------------------------ # "Ultrasound Scan" label #------------------------------ us_label = wx.StaticText(self,-1,_("18 Week Ultrasound Scan"),size = (200,20)) us_label.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.BOLD,False,'')) us_label.SetForegroundColour(wx.Colour(50,50,204)) szr_backgrnd_18WkScanDue = wx.BoxSizer(wx.VERTICAL) szr_backgrnd_18WkScanDue.Add((1,3), 0) szr_backgrnd_18WkScanDue.Add(us_label,1,wx.EXPAND,1) szr_rc.Add(szr_backgrnd_18WkScanDue, flag=wx.ALIGN_CENTRE_HORIZONTAL, row=3, col=2, colspan=5) #------------------------------ # sizer holding the 'Due' stuff #------------------------------ label = wx.StaticText(self,-1,_("Due"),size = (100,20)) label.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label.SetForegroundColour(wx.Colour(0,0,0)) self.txtdue = wx.TextCtrl(self,-1,"",size=(100,20)) self.txtdue.Enable(False) self.txtdue.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.szr_txtdue = wx.BoxSizer(wx.HORIZONTAL) self.szr_txtdue.Add(self.txtdue,1,wx.EXPAND|wx.ALL,2) szr_due = wx.BoxSizer(wx.HORIZONTAL) szr_due.Add(label,1,0,0) szr_due.Add((10,1),0,0) szr_rc.Add(szr_due, flag=wx.EXPAND, row=4, col=1) szr_rc.Add(self.szr_txtdue, flag=wx.EXPAND, row=4, col=2, colspan=5) #------------------------------ # "Ultrasound Scan - Revised EDC" label #------------------------------ rev_edc_label = wx.StaticText(self,-1,_("Ultrasound Scan - Revised EDC"),size = (300,20)) rev_edc_label.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.BOLD,False,'')) rev_edc_label.SetForegroundColour(wx.Colour(50,50,204)) szr_backgrnd_RevEDCLabel = wx.BoxSizer(wx.VERTICAL) szr_backgrnd_RevEDCLabel.Add((1,3), 0) szr_backgrnd_RevEDCLabel.Add(rev_edc_label,1,wx.EXPAND,1) szr_rc.Add(szr_backgrnd_RevEDCLabel, flag=wx.ALIGN_CENTRE_HORIZONTAL, row=5, col=2, colspan=5) #------------------------------ # sizer holding the 'newedc' stuff #------------------------------ label1 = wx.StaticText(self,-1,_("Scan Date"),size = (25,20)) label1.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label1.SetForegroundColour(wx.Colour(0,0,0)) self.txtdate = wx.TextCtrl(self,-1,"",size=(25,20)) self.txtdate.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.txtdate.SetToolTip(wx.ToolTip(_("Click on this field and then the ultrasound scan date on the calendar"))) tipdue=self.txtdate.GetToolTip() wx.ToolTip_Enable(1) self.szr_txtdate = wx.BoxSizer(wx.HORIZONTAL) self.szr_txtdate.Add(self.txtdate,1,wx.EXPAND|wx.ALL,2) wx.EVT_SET_FOCUS(self.txtdate, self.OnSetFocus_USDate) szr_label1 = wx.BoxSizer(wx.HORIZONTAL) szr_label1.Add(label1,1,0,0) szr_label1.Add((10,1),0,0) szr_rc.Add(szr_label1, flag=wx.EXPAND, row=6, col=1) szr_rc.Add(self.szr_txtdate, flag=wx.EXPAND, row=6, col=2, colspan=5) #------------------------------ label2 = wx.StaticText(self,-1,_("Weeks"),size = (25,20)) label2.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label2.SetForegroundColour(wx.Colour(0,0,0)) self.txtweeks = wx.SpinCtrl (self, -1, value = "0", min = 0, max = 42) wx.EVT_SPINCTRL (self.txtweeks ,self.txtweeks.GetId(), self.EvtText_calcnewedc) self.txtweeks.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.szr_txtweeks = wx.BoxSizer(wx.HORIZONTAL) self.szr_txtweeks.Add(self.txtweeks,1,wx.EXPAND|wx.ALL,2) label3 = wx.StaticText(self,-1,_("Days"),size = (25,20)) label3.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label3.SetForegroundColour(wx.Colour(0,0,0)) self.txtdays = wx.SpinCtrl (self, -1, value = "0", min = 0, max = 6) wx.EVT_SPINCTRL (self.txtdays ,self.txtdays.GetId(), self.EvtText_calcnewedc) self.txtdays.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.szr_txtdays = wx.BoxSizer(wx.HORIZONTAL) self.szr_txtdays.Add(self.txtdays,1,wx.EXPAND|wx.ALL,2) szr_label2 = wx.BoxSizer(wx.HORIZONTAL) szr_label2.Add(label2,1,wx.ALIGN_CENTRE_VERTICAL,0) szr_label2.Add((10,1),0,0) szr_label3 = wx.BoxSizer(wx.HORIZONTAL) szr_label3.Add((10,1),0,0) szr_label3.Add(label3,1,wx.ALIGN_CENTRE_VERTICAL,0) szr_label3.Add((10,1),0,0) szr_rc.Add(szr_label2, flag=wx.EXPAND, row=7, col=1) szr_rc.Add(self.szr_txtweeks, flag=wx.EXPAND, row=7, col=2, colspan=2) szr_rc.Add(szr_label3, flag=wx.EXPAND, row=7, col=4) szr_rc.Add(self.szr_txtdays, flag=wx.EXPAND, row=7, col=5, colspan=2) #------------------------------ # sizer holding the new (or revised) 'EDC' stuff #------------------------------ label = wx.StaticText(self,-1,_("Rev EDC"),size = (100,20)) label.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) label.SetForegroundColour(wx.Colour(0,0,0)) self.txtnewedc = wx.TextCtrl(self,-1,"",size=(100,20)) self.txtnewedc.Enable(False) self.txtnewedc.SetFont(wx.Font(12,wx.SWISS,wx.NORMAL,wx.NORMAL,False,'')) self.szr_txtnewedc = wx.BoxSizer(wx.HORIZONTAL) self.szr_txtnewedc.Add(self.txtnewedc,1,wx.EXPAND|wx.ALL,2) szr_label=wx.BoxSizer(wx.HORIZONTAL) szr_label.Add(label,1,0,0) szr_label.Add((10,1),0,0) szr_rc.Add(szr_label, flag=wx.EXPAND, row=8, col=1) szr_rc.Add(self.szr_txtnewedc, flag=wx.EXPAND, row=8, col=2, colspan=5) self.btnPrint = wx.Button(self,1011,_('&Print')) self.btnSave = wx.Button(self,1011,_('&Save')) szr_buttons = wx.BoxSizer(wx.HORIZONTAL) szr_buttons.Add(self.btnPrint,0,wx.EXPAND) szr_buttons.Add(self.btnSave,0,wx.EXPAND) szr_rc.Add(szr_buttons, flag=wx.EXPAND,row=9, col=3, colspan=4) #------------------------------ # Sizer holding stuff on the right #------------------------------ szr_main_rt = wx.BoxSizer(wx.VERTICAL) szr_main_rt.Add(szr_rc) wx.EVT_BUTTON(self,1010,self.EvtReset) wx.EVT_BUTTON(self,1011,self.EvtPrint) wx.EVT_BUTTON(self,1012,self.EvtSave) #------------------------------ # Add calendar (stuff on the left) #------------------------------ self.lmp_cal = wx.calendar.CalendarCtrl (self, ID_LMP,style = wx.RAISED_BORDER) wx.calendar.EVT_CALENDAR_SEL_CHANGED(self.lmp_cal, ID_LMP, self.OnCalcByLMP) szr_main_lf = wx.BoxSizer(wx.VERTICAL) szr_main_lf.Add(self.lmp_cal,0,wx.ALIGN_CENTRE_HORIZONTAL) btn_reset = wx.Button(self, 1010, _('&Reset')) #szr_main_lf.Add(5,0,5) szr_main_lf.Add(btn_reset,0,wx.EXPAND) #-------------------------------------- # Super-sizer holds all the stuff above #-------------------------------------- szr_main_top= wx.BoxSizer(wx.HORIZONTAL) szr_main_top.Add(szr_main_lf,0,0) szr_main_top.Add((15,0),0,0) szr_main_top.Add(szr_main_rt,0,0) #szr_main_top.Add(15,1,0,0) #------------------------------ # Put everything together in one big sizer #------------------------------ szr_main= wx.BoxSizer(wx.HORIZONTAL) szr_main.Add(szr_main_top,1,wx.EXPAND|wx.ALL,10) self.SetSizer (szr_main) self.SetAutoLayout (1) szr_main.Fit (self) wx.EVT_CLOSE (self, self.OnClose ) #----------------------------------------- def OnCalcByLMP (self, event): if(self.xfer_cal_date_to==LMP_FIELD): # we do this the "UNIX Way" -- all dates are converted into seconds # since midnight 1 Jan, 1970. # .GetDate().GetTicks() returns time at 5AM. The -18000 second # correction adjusts LMP to 12AM ??? NOT NEEDED # is it possible there is a BUG in the wxPython # Day Light Savings/Standard Time Calc? #LMP = self.lmp_cal.GetDate ().GetTicks () - 18000 # Standard Time Fix (?) self.lmp = self.lmp_cal.GetDate ().GetTicks () # Correct for Day Light Saving Time today = wx.DateTime_Today().GetTicks() due = self.lmp + GESTATION gest = today - self.lmp self.ultrasound18_52 = self.lmp + US18_52 # ----------------- # FIXME: use gmDateInput in gmDateTimeInput.py lmp_txt = wx.DateTime() # FIXME? - change format of date (?) lmp_txt.SetTimeT(self.lmp) self.txt_lmp.SetValue(self.PurgeTime(lmp_txt)) # ----------------- gest_week = gest / WEEK gest_day = (gest % WEEK) / DAY if(gest_day==1): days_label=_('day') else: days_label=_('days') if(gest_week==1): weeks_label=_('week') else: weeks_label=_('weeks') # txtgest_str = "%s %s, %s %s" % (gest_week, weeks_label, gest_day, days_label) txtgest_str=str(gest_week)+" "+weeks_label+", "+str(gest_day)+" "+days_label self.txtgest.SetValue(txtgest_str) # ----------------- edctxt = wx.DateTime() edctxt.SetTimeT(due) self.txtedc.SetValue(self.PurgeTime(edctxt)) # ----------------- self.ustxt = wx.DateTime() self.ustxt.SetTimeT(self.ultrasound18_52) self.txtdue.SetValue(self.PurgeTime(self.ustxt)) else: # set Ultrasound Date self.usdate = self.lmp_cal.GetDate ().GetTicks () usdatetxt = wx.DateTime() # FIXME? - change format of date usdatetxt.SetTimeT(self.usdate) self.txtdate.SetValue(self.PurgeTime(usdatetxt)) # recalculate 'Rev EDC' if Ultrasound Scan Date is changed if( self.txtnewedc.GetValue() !=""): self.EvtText_calcnewedc(self) #----------------------------------------- def EvtText_calcnewedc (self, event): try: weeks=self.txtweeks.GetValue() days=self.txtdays.GetValue() # get date of ultrasound newedc=self.usdate+GESTATION-WEEK*weeks-DAY*days wx.D=wx.DateTime() wx.D.SetTimeT(newedc) self.txtnewedc.SetValue(self.PurgeTime(wx.D)) except: pass # error handling - FIXME is 'try' statement necessary (?) #----------------------------------------- def EvtReset(self, event): # reset variables self.txt_lmp.SetValue("") self.txtgest.SetValue("") self.txtedc.SetValue("") self.txtdue.SetValue("") self.txtdate.SetValue("") self.ustxt=wx.DateTime_Today() self.txtweeks.SetValue(0) # FIXME - MAKE IT RESET TO BLANK? self.txtdays.SetValue(0) self.txtnewedc.SetValue("") self.xfer_cal_date_to=LMP_FIELD self.lmp_cal.SetDate(wx.DateTime_Today()) # reset Calendar to current date #----------------------------------------- def EvtPrint(self, event): pass # TODO #----------------------------------------- def EvtSave(self, event): pass # TODO #----------------------------------------- #def EvtHandout(self, event): # pass # TODO #------------------------------------------- def OnClose (self, event): self.Destroy () #------------------------------------------- def PurgeTime(self, date): # a not so elegant way of removing the time time_loc=string.find(str(date),":00:00") date_str=str(date) return date_str[:(time_loc-3)] #------------------------------------------- def OnSetFocus_lmp (self, event): self.xfer_cal_date_to=LMP_FIELD event.Skip() # required so wxTextCtrl box is selected #------------------------------------------- def OnSetFocus_USDate (self, event): self.lmp_cal.SetDate(self.ustxt) # flip calendar to 18/52 date self.xfer_cal_date_to=US_FIELD event.Skip() #==================================================================== # Main #==================================================================== if __name__ == '__main__': # set up dummy app class TestApp (wx.App): def OnInit (self): frame = cPregCalcFrame(None) frame.Show(1) return 1 #--------------------- import gettext _ = gettext.gettext gettext.textdomain ('gnumed') app = TestApp() app.MainLoop() #===================================================================== --TiqCXmo5T1hvSQQg-- From MAILER-DAEMON Thu Jan 15 10:05:11 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YBlyx-0006pg-KL for mharc-gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:05:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBlyn-0006lD-Fj for gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:05:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBlyj-00077f-8d for gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:05:01 -0500 Received: from mout.gmx.net ([212.227.17.20]:65522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBlyi-00077K-VU for gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:04:57 -0500 Received: from hermes ([84.133.86.30]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lwarz-1Xh3wt17vT-018K9S for ; Thu, 15 Jan 2015 16:04:56 +0100 Received: from ncq by hermes with local (Exim 4.84) (envelope-from ) id 1YBlyc-0008AN-Dp; Thu, 15 Jan 2015 16:04:50 +0100 Date: Thu, 15 Jan 2015 16:04:50 +0100 From: Karsten Hilbert To: GNUmed list Message-ID: <20150115150450.GO2905@hermes.hilbert.loc> Mail-Followup-To: GNUmed list , gm-announce MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.5.23 (2014-03-12) Sender: karsten.hilbert@gmx.net X-Provags-ID: V03:K0:ji1OMdTmqCgtT9wYtQQNg/iwnYBS7LZLtWAhXs6yXB2s+NqyaZl 7KTFD6TrHXy8TtzpytsJ+CEg1MepwoqxyiOewTsu/p9n4ZQv7h9YEgIGs5TFjW/CkOvosFB RP8AC+lei+Y2uGSg9hUxicw7UVeHOGd1zOBZ4BOc9fhz3ELzs0bc8/zTiqnAPonxVQmrkAO J6OIWeK/Jxy+FpStIMB3A== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.20 Cc: gm-announce Subject: [Gnumed-announce] GNUmed feature list X-BeenThere: gnumed-announce@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Important announcements about the gnumed project List-Id: Important announcements about the gnumed project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:05:09 -0000 I wonder whether someone might update the feature list http://wiki.gnumed.de/bin/view/Gnumed/WhatCanIActuallyDOWithGNUmedToday ? Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 From MAILER-DAEMON Thu Jan 15 10:08:25 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YBm25-0008Lq-C2 for mharc-gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:08:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBm23-0008Lk-L6 for gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:08:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBm20-0000eg-E5 for gnumed-announce@gnu.org; Thu, 15 Jan 2015 10:08:23 -0500 Received: from mout.gmx.net ([212.227.15.18]:55412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBm20-0000eX-4s; Thu, 15 Jan 2015 10:08:20 -0500 Received: from hermes ([84.133.86.30]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MSutp-1YJ9rb1Nrx-00RnMQ; Thu, 15 Jan 2015 16:08:18 +0100 Received: from ncq by hermes with local (Exim 4.84) (envelope-from ) id 1YBm1x-0008DX-GV; Thu, 15 Jan 2015 16:08:17 +0100 Date: Thu, 15 Jan 2015 16:08:17 +0100 From: Karsten Hilbert To: GNUmed list Message-ID: <20150115150817.GP2905@hermes.hilbert.loc> Mail-Followup-To: GNUmed list , gm-announce MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.5.23 (2014-03-12) Sender: karsten.hilbert@gmx.net X-Provags-ID: V03:K0:9YIo/qvft1NKiLhCpiRkKY+pga7dogBr5GGIr9KkDhCNFPOTyCZ g62aKynqmkpCWQ8C1nRLeYSu0FTiqLgPlnlW089tnq5GVm5i9CtFFe+ON7X5es5Sr5cGW7W s0gr40PxU/jdUxM4JM3fsqyJxmwbfPjXYz07CwZgP8XDe5rri7W34j4a7wl8qF2srS1+EsF Eq/1aQWTyXdpdQtecYCoA== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.15.18 Cc: gm-announce Subject: [Gnumed-announce] GNUmed 1.5.1 Maintenance Release X-BeenThere: gnumed-announce@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Important announcements about the gnumed project List-Id: Important announcements about the gnumed project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:08:24 -0000 Hello all, I am glad to be able to announce the immediate availability of the GNUmed 1.5.1 Maintenance Release. It features the following bug fixes and minor improvements: Changelog: 1.5.1 FIX: include pregnancy widgets with tarball FIX: do not require JSON in psycopg2 [thanks Jim] 20.1 IMPROVED: database restore script [thanks Jim] Downloads available from: http://www.gnumed.de/downloads/client/1.5/ http://www.gnumed.de/downloads/server/v20/ Client installation: Easily installable packages for your platform of choice will be available shortly. Meanwhile you can run the client from a downloaded tarball or use the net based client installer: http://www.gnumed.de/downloads/client/gm-install_client_locally.sh which you need to download, make executable, and run. More information available here: http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort Database installation / upgrade: Note that this release, as usual, does NOT require a database upgrade. Related information is found here: http://wiki.gnumed.de/bin/view/Gnumed/GmManualServerUpgrade Please download, install, and report problems ! Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 From MAILER-DAEMON Fri Jan 16 09:27:29 2015 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YC7s1-0000K4-SH for mharc-gnumed-announce@gnu.org; Fri, 16 Jan 2015 09:27:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC7rv-0000JB-RO for gnumed-announce@gnu.org; Fri, 16 Jan 2015 09:27:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YC7rs-0006rv-IG for gnumed-announce@gnu.org; Fri, 16 Jan 2015 09:27:23 -0500 Received: from mout.gmx.net ([212.227.17.20]:63477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YC7rs-0006rj-7s; Fri, 16 Jan 2015 09:27:20 -0500 Received: from hermes ([84.133.75.5]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MWPOI-1YEx131Sji-00Xe8V; Fri, 16 Jan 2015 15:27:19 +0100 Received: from ncq by hermes with local (Exim 4.84) (envelope-from ) id 1YC7rq-0004jH-Gp; Fri, 16 Jan 2015 15:27:18 +0100 Date: Fri, 16 Jan 2015 15:27:18 +0100 From: Karsten Hilbert To: GNUmed list Message-ID: <20150116142718.GD8982@hermes.hilbert.loc> Mail-Followup-To: GNUmed list , gm-announce MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) User-Agent: Mutt/1.5.23 (2014-03-12) Sender: karsten.hilbert@gmx.net X-Provags-ID: V03:K0:FfrdaESDrI3pFgBKmoLdZmeg+m6W3IM8mqNB8h0+YTmN66YWbca 7NuBuAoGUwekiPY3gWjJTEVCK1ZoT+OT6ZbUiA+EwvSjBzCDIMnzGeSe3FPNCpelOa1YdTH PuKADjdVTRP8KHBCPz+Gcr43COHv29K0c3Wicq6jUU1WXCNPBIJjX932V3bxUWgkPq5loOs 3JzzNZvtIKBbG8lI+DKQw== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.20 Cc: gm-announce Subject: [Gnumed-announce] GNUmed 1.5.2 Maintenance Release X-BeenThere: gnumed-announce@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Important announcements about the gnumed project List-Id: Important announcements about the gnumed project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 14:27:28 -0000 Hello all, I am glad to be able to announce the immediate availability of the GNUmed 1.5.2 Maintenance Release. It features the following bug fixes and minor improvements: Changelog: Database 20.2 FIX: setting of FK to clin.test_org on dangling test types Downloads available from: http://www.gnumed.de/downloads/client/1.5/ http://www.gnumed.de/downloads/server/v20/ Client installation: Easily installable packages for your platform of choice will be available shortly. Meanwhile you can run the client from a downloaded tarball or use the net based client installer: http://www.gnumed.de/downloads/client/gm-install_client_locally.sh which you need to download, make executable, and run. More information available here: http://wiki.gnumed.de/bin/view/Gnumed/InstallerGuideHomeShort Database installation / upgrade: Note that this release, as usual, does NOT require a database upgrade. However, fixes to the database may have been provided which you can (and should) install with either $> gm-fixup_server 20 or $> cd .../server/bootstrap/ $> ./fixup-db.sh 20 Related information is found here: http://wiki.gnumed.de/bin/view/Gnumed/GmManualServerUpgrade Please download, install, and report problems ! Thanks, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346