File: v16-import-form-templates.py

package info (click to toggle)
gnumed-server 22.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,268 kB
  • sloc: sql: 1,217,633; python: 15,878; sh: 1,590; makefile: 20
file content (48 lines) | stat: -rw-r--r-- 1,106 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#==============================================================
# GNUmed database schema change script
#
# License: GPL v2 or later
# Author: karsten.hilbert@gmx.net
# 
#==============================================================
import os

from Gnumed.pycommon import gmPG2

#--------------------------------------------------------------

def run(conn=None):

	# medication list
	gmPG2.file2bytea (
		query = u"""
update ref.paperwork_templates
set
	data = %(data)s::bytea,
	external_version = 'v16.0'
where
	name_long = 'Current medication list (GNUmed default)'
""",
		filename = os.path.join('..', 'sql', 'v15-v16', 'data', 'v16-GNUmed-default_medication_list_template.tex'),
		conn = conn
	)


	# Formularkopf
	gmPG2.file2bytea (
		query = u"""
update ref.paperwork_templates
set
	data = %(data)s::bytea,
	external_version = 'v16.0'
where
	name_long = 'Formularkopf (GNUmed-Vorgabe)'
""",
		filename = os.path.join('..', 'sql', 'v15-v16', 'data', 'v16-GNUmed-default_GKV_Formularkopf_template.tex'),
		conn = conn
	)


	return True

#==============================================================