示例#1
0
 def test_generate_invoice_id():
     from Gnumed.pycommon import gmI18N
     gmI18N.activate_locale()
     gmI18N.install_domain()
     import gmPerson
     for idx in range(1, 15):
         print('')
         print('classic:', generate_invoice_id(pk_patient=idx))
         pat = gmPerson.cPerson(idx)
         template = u'%(firstname).4s%(lastname).4s%(date)s'
         print('new: template = "%s" => %s' %
               (template,
                generate_invoice_id(template=template,
                                    pk_patient=None,
                                    person=pat,
                                    date_format='%d%m%Y',
                                    time_format='%H%M%S')))
         template = u'%(firstname).4s%(lastname).4s%(date)s-#counter#'
         new_id = generate_invoice_id(template=template,
                                      pk_patient=None,
                                      person=pat,
                                      date_format='%d%m%Y',
                                      time_format='%H%M%S')
         print('locked: %s' % lock_invoice_id(new_id))
         print('new: template = "%s" => %s' % (template, new_id))
         print('unlocked: %s' % unlock_invoice_id(new_id))
示例#2
0
import sys
import logging
import os.path
import time


import wx


if __name__ == '__main__':
	sys.path.insert(0, '../../')

from Gnumed.pycommon import gmI18N

if __name__ == '__main__':
	gmI18N.activate_locale()
	gmI18N.install_domain()

from Gnumed.pycommon import gmDispatcher
from Gnumed.pycommon import gmTools
from Gnumed.pycommon import gmDateTime
from Gnumed.pycommon import gmCfg

from Gnumed.business import gmPerson
from Gnumed.business import gmStaff
from Gnumed.business import gmEMRStructItems
from Gnumed.business import gmSoapDefs
from Gnumed.business import gmPraxis
from Gnumed.business import gmPersonSearch

from Gnumed.wxpython import gmListWidgets
示例#3
0
			pk_patient = pk_patient,
			include_without_provider = include_without_provider
		)

#============================================================
if __name__ == '__main__':

	if len(sys.argv) < 2:
		sys.exit()

	if sys.argv[1] != 'test':
		sys.exit()

	from Gnumed.pycommon import gmI18N

	gmI18N.activate_locale()
	gmI18N.install_domain()

	#---------------------------------------
	def test_inbox():
		gmStaff.gmCurrentProvider(provider = gmStaff.cStaff())
		inbox = cProviderInbox()
		for msg in inbox.messages:
			print(msg)
	#---------------------------------------
	def test_msg():
		msg = cInboxMessage(aPK_obj = 1)
		print(msg)
	#---------------------------------------
	def test_create_type():
		print(create_inbox_item_type(message_type = 'test'))