# GNUmed database system bootstrapping config file
#-------------------------------------------------
# license: GPL v2 or later
# author: Karsten Hilbert@gmx.net

#----------------------------------
[revision control]
file = $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/server/bootstrap/update_db-v9_v10.conf,v $
version = $Revision: 1.21 $

#----------------------------------
[installation]
interactive = yes

keep temp files = no

description = $description$
This will update an existing GNUmed version 9
database to the version 10 schema. It does not do
any harm to the data contained within.

The existing database is cloned first. The copy is
then modified. The original database remains unchanged.
$description$

bundles = $bundles$
v9-v10-static
v9-v10-dynamic
v10-fixups
$bundles$

#----------------------------------
[bundle v9-v10-static]
database alias = gnumed_v10
minimum postgresql version = 8.1
schema base directory = ../sql/v9-v10/static/
schema = $schema$
v10-gm-access_log-static.sql
v10-i18n-curr_lang-static.sql
v10-dem-identity-static.sql
v10-blobs-doc_med-static.sql
v10-clin-health_issue-static.sql
v10-clin-episode-static.sql
v10-clin-allergy_state-static.sql
v10-clin-waiting_list-static.sql
$schema$

#----------------------------------
[bundle v9-v10-dynamic]
database alias = gnumed_v10
minimum postgresql version = 8.1
schema base directory = ../sql/v9-v10/dynamic/
schema = $schema$
v10-gm-access_log-dynamic.sql
v10-gm-notifying_tables-dynamic.sql
v10-i18n-dynamic.sql
v10-cfg-cfg_str_array.sql
v10-gm-role_management-dynamic.sql
v10-dem-identity-dynamic.sql
v10-dem-v_basic_person.sql
v10-dem-v_staff.sql
v10-dem-v_person_jobs.sql
v10-dem-v_pat_addresses.sql
v10-clin-episode-dynamic.sql
v10-clin-allergy_state-dynamic.sql
v10-clin-allergy-dynamic.sql
v10-clin-health_issue-dynamic.sql
v10-clin-v_pat_narrative_journal.sql
v10-clin-v_pat_episodes.sql
v10-clin-v_pat_episodes_journal.sql
v10-clin-v_hx_family.sql
v10-clin-v_hx_family_journal.sql
v10-clin-v_pat_allergies.sql
v10-clin-v_pat_allergies_journal.sql
v10-clin-v_test_results.sql
v10-clin-v_test_results_journal.sql
v10-clin-v_pat_items.sql
v10-blobs-delete_document.sql
v10-blobs-v_doc_med.sql
v10-blobs-v_doc_desc.sql
v10-blobs-v_obj4doc_no_data.sql
v10-blobs-v_reviewed_doc_objects.sql
v10-blobs-v_latest_mugshot.sql
v10-blobs-v_doc_med_journal.sql
v10-clin-v_emr_journal.sql
v10-clin-v_lab_requests.sql
v10-clin-v_narrative4search.sql
v10-clin-v_coded_item_narrative.sql
v10-clin-v_problem_list.sql
v10-clin-v_pat_narrative.sql
v10-clin-v_pat_diag.sql
v10-clin-v_codes4diag.sql
v10-clin-v_reviewed_items.sql
v10-clin-waiting_list-dynamic.sql
v10-dem-v_provider_inbox.sql
v10-clin-encounter-dynamic.sql
v10-i18n-translations.sql
v10-clin-keyword_expansion-data.sql
$schema$

#----------------------------------
[bundle v10-fixups]
database alias = gnumed_v10
minimum postgresql version = 8.1
schema base directory = ../sql/v9-v10/fixups/
schema = $schema$
v10-blobs-delete_document-fixup.sql
v10-dem-identity-dob_trigger-fixup.sql
v10-clin-allergy-fixup.sql
v10-clin-v_pat_allergy_state_journal-fixup.sql
v10-clin-v_emr_journal-fixup.sql
v10-clin-trf_invalidate_review_on_result_change-fixup.sql
v10-gm-notifying_tables-fixup.sql
$schema$

#----------------------------------
[database gnumed_v10]
name = gnumed_v10
override name by = GM_CORE_DB
drop target database = 1
target version = v10
transfer users = 1
template database = gnumed_v9
template version = v9
server alias = local host
audit disable = 1
audit trail parent table = audit.audit_trail
audit trail table prefix = log_
audit fields table = audit.audit_fields
schema base directory = ../sql/v9-v10/
schema = $schema$
$schema$

superuser schema = $superuser schema$
superuser/v10-adjust-gm_dbo.sql
$superuser schema$

upgrade plausibility checks = $upgrade plausibility checks$
identities::::select count(1) from dem.identity
select count(1) from dem.identity
names::::select count(1) from dem.names
select count(1) from dem.names
addresses::::select count(1) from dem.address
select count(1) from dem.address
episodes::::select count(1) from clin.episode
select count(1) from clin.episode
encounters::::select count(1) from clin.encounter
select count(1) from clin.v_pat_encounters
issues::::select count(1) from clin.health_issue
select count(1) from clin.health_issue
documents::::select count(1) from blobs.doc_med
select count(1) from blobs.doc_med
pages::::select count(1) from blobs.doc_obj
select count(1) from blobs.doc_obj
allergies::::select count(1) from clin.allergy
select count(1) from clin.allergy
clinical items::::select count(1) from clin.clin_root_item
select count(1) from clin.clin_root_item
communication channels::::select count(1) from dem.lnk_identity2comm
select count(1) from dem.lnk_identity2comm
test results::::select count(1) from clin.test_result
select count(1) from clin.test_result
unmatched test results::::select count(1) from clin.incoming_data_unmatched
select count(1) from clin.incoming_data_unmatched
unmatchable test results::::select count(1) from clin.incoming_data_unmatchable
select count(1) from clin.incoming_data_unmatchable
allergy states::::select count(1) from clin.allergy_state where fk_patient in (select distinct fk_patient from clin.encounter)
select count(1) from clin.allergy_state
waiting list entries::::select count(1) from clin.waiting_list
select count(1) -1 from clin.waiting_list
$upgrade plausibility checks$

script base directory = ../sql/v9-v10/python/
data import scripts = $data import scripts$
$data import scripts$

#----------------------------------
[server local host]
name = 
port = 5432
template database = template1
super user alias = postgres
schema base directory = ../sql/v9-v10/
schema = $schema$
$schema$

#----------------------------------
[user GNUmed owner]
name = gm-dbo
password = 

[user postgres]
name = postgres
#password =

#----------------------------------
# these really shouldn't be changed
#----------------------------------
[GnuMed defaults]

database owner alias = GNUmed owner

groups = $groups$
$groups$

#----------------------------------
# $Log: update_db-v9_v10.conf,v $
# Revision 1.21  2009-10-27 11:01:37  ncq
# - disable audit/notify schema generation
#
# Revision 1.20  2009/09/15 15:21:42  ncq
# - run fixups after v10 creation
#
# Revision 1.19  2009/05/04 11:47:32  ncq
# - add commented out password option as a hint for Windows
#
# Revision 1.18  2009/04/21 17:03:20  ncq
# - fix delete_docs
#
# Revision 1.17  2009/04/13 11:03:32  ncq
# - bump target version for v10
#
# Revision 1.16  2009/02/17 11:50:10  ncq
# - include scores
#
# Revision 1.15  2009/02/10 18:41:17  ncq
# - include missing script
#
# Revision 1.14  2009/01/27 16:02:15  ncq
# - adjusted plausibility check
#
# Revision 1.13  2009/01/17 23:14:28  ncq
# - add more scripts
#
# Revision 1.12  2008/12/22 19:00:18  ncq
# - commit all the new bootstrapping scripts
#
# Revision 1.11  2008/12/12 16:37:24  ncq
# - include access logging DDL
#
# Revision 1.10  2008/12/09 23:17:32  ncq
# - include scripts
#
# Revision 1.9  2008/12/01 21:47:40  ncq
# - yet more scripts
#
# Revision 1.8  2008/12/01 12:17:35  ncq
# - include more scripts
#
# Revision 1.7  2008/11/24 11:10:51  ncq
# - include episode dynamic
#
# Revision 1.6  2008/11/11 21:10:28  ncq
# - add scripts
#
# Revision 1.5  2008/10/26 01:23:33  ncq
# - include i18n static change
#
# Revision 1.4  2008/10/25 20:41:31  ncq
# - include clin.v_narrative4search
#
# Revision 1.3  2008/10/12 15:01:01  ncq
# - add test for allergy state
# - add scripts for allergy/allergy state and i18n
#
# Revision 1.2  2008/09/02 19:01:36  ncq
# - include more scripts
#
# Revision 1.1  2008/09/02 15:43:07  ncq
# - start gnumed_v10
#
# Revision 1.21  2008/08/21 10:22:08  ncq
# - include unmatched changes and two more sanity checks
#
# Revision 1.20  2008/08/17 12:07:38  ncq
# - include translations
#
# Revision 1.19  2008/08/17 10:32:03  ncq
# - add one more plausibility check
#
# Revision 1.18  2008/08/15 16:00:00  ncq
# - include script to fix allergy delete trigger function
#
# Revision 1.17  2008/08/01 10:42:58  ncq
# - add logon banner change
#
# Revision 1.16  2008/07/24 18:23:14  ncq
# - set proper target db version
#
# Revision 1.15  2008/07/15 15:26:32  ncq
# - include keyword data
#
# Revision 1.14  2008/07/10 21:10:00  ncq
# - include keyword expansion tables
#
# Revision 1.13  2008/06/22 17:33:11  ncq
# - include new emr journal script
#
# Revision 1.12  2008/05/29 15:33:04  ncq
# - add script
#
# Revision 1.11  2008/04/11 23:16:12  ncq
# - include encounters script
#
# Revision 1.10  2008/03/29 16:23:59  ncq
# - new scripts
#
# Revision 1.9  2008/03/20 15:32:14  ncq
# - add script
#
# Revision 1.8  2008/03/05 22:36:39  ncq
# - added scripts
#
# Revision 1.7  2008/03/02 11:27:41  ncq
# - include more files
#
# Revision 1.6  2008/02/26 16:28:33  ncq
# - include a bunch of scripts
#
# Revision 1.5  2008/01/27 21:24:14  ncq
# - include more scripts
#
# Revision 1.4  2008/01/11 16:16:40  ncq
# - add more scripts
#
# Revision 1.3  2008/01/07 20:30:02  ncq
# - add static
#
# Revision 1.2  2008/01/07 14:16:29  ncq
# - set target db version to devel
#
# Revision 1.1  2008/01/05 16:31:43  ncq
# - new
#
#
