Merge lp:~noskcaj/ubuntu/utopic/gnuhealth/2.6 into lp:ubuntu/utopic-proposed/gnuhealth

Proposed by Jackson Doak
Status: Needs review
Proposed branch: lp:~noskcaj/ubuntu/utopic/gnuhealth/2.6
Merge into: lp:ubuntu/utopic-proposed/gnuhealth
Diff against target: 295167 lines (+281509/-3526)
336 files modified
Changelog (+1253/-3)
backend/plugins/crypto/__init__.py (+179/-0)
backend/plugins/crypto/doc/index.rst (+33/-0)
debian/changelog (+7/-0)
debian/control (+27/-26)
gnuhealth_install.sh (+231/-192)
gnuhealthrc (+14/-4)
health/__init__.py (+16/-12)
health/data/ethnic_groups.xml (+8/-8)
health/data/health_specialties.xml (+133/-63)
health/health.py (+1088/-659)
health/health_view.xml (+204/-53)
health/locale/el_GR.po (+10155/-0)
health/locale/es_ES.po (+563/-126)
health/locale/fr_FR.po (+589/-152)
health/locale/it_IT.po (+606/-168)
health/locale/pt_BR.po (+10178/-0)
health/locale/zh_CN.po (+10157/-0)
health/setup.py (+2/-3)
health/tryton.cfg (+1/-1)
health/view/gnuhealth_healthprofessional.xml (+15/-10)
health/view/gnuhealth_healthprofessional_tree.xml (+1/-0)
health/view/gnuhealth_hospital_bed.xml (+2/-0)
health/view/gnuhealth_hospital_bed_tree.xml (+1/-0)
health/view/gnuhealth_institution_form.xml (+45/-0)
health/view/gnuhealth_institution_operationalsector_form.xml (+8/-0)
health/view/gnuhealth_institution_operationalsector_tree.xml (+5/-0)
health/view/gnuhealth_institution_specialties_form.xml (+8/-0)
health/view/gnuhealth_institution_specialties_tree.xml (+5/-0)
health/view/gnuhealth_institution_tree.xml (+8/-0)
health/view/gnuhealth_patient_evaluation.xml (+10/-3)
health/view/gnuhealth_patient_evaluation_tree.xml (+1/-0)
health/view/gnuhealth_patient_form.xml (+17/-4)
health/view/gnuhealth_patient_medication_form.xml (+13/-2)
health/view/gnuhealth_patient_tree.xml (+1/-2)
health/view/gnuhealth_vaccination_form.xml (+21/-15)
health/view/gnuhealth_vaccination_tree.xml (+3/-0)
health/view/party_form.xml (+25/-13)
health/view/party_tree.xml (+18/-4)
health_archives/COPYING (+674/-0)
health_archives/MANIFEST.in (+1/-0)
health_archives/README (+23/-0)
health_archives/__init__.py (+31/-0)
health_archives/doc/index.rst (+6/-0)
health_archives/health_archives.py (+88/-0)
health_archives/health_archives_view.xml (+53/-0)
health_archives/icons/README (+2/-0)
health_archives/icons/archives.svg (+99/-0)
health_archives/locale/el_GR.po (+137/-0)
health_archives/locale/es_ES.po (+137/-0)
health_archives/locale/fr_FR.po (+137/-0)
health_archives/locale/it_IT.po (+137/-0)
health_archives/locale/pt_BR.po (+137/-0)
health_archives/locale/zh_CN.po (+137/-0)
health_archives/setup.py (+89/-0)
health_archives/tryton.cfg (+6/-0)
health_archives/view/gnuhealth_paper_archive_form.xml (+25/-0)
health_archives/view/gnuhealth_paper_archive_tree.xml (+10/-0)
health_calendar/locale/el_GR.po (+138/-0)
health_calendar/locale/es_ES.po (+2/-2)
health_calendar/locale/fr_FR.po (+10/-8)
health_calendar/locale/it_IT.po (+8/-7)
health_calendar/locale/pt_BR.po (+138/-0)
health_calendar/locale/zh_CN.po (+139/-0)
health_calendar/setup.py (+2/-3)
health_calendar/tryton.cfg (+1/-1)
health_calendar/wizard/wizard_health_calendar.py (+4/-3)
health_crypto/COPYING (+674/-0)
health_crypto/MANIFEST.in (+1/-0)
health_crypto/README (+22/-0)
health_crypto/__init__.py (+31/-0)
health_crypto/doc/index.rst (+23/-0)
health_crypto/health_crypto.py (+185/-0)
health_crypto/health_crypto_view.xml (+13/-0)
health_crypto/locale/el_GR.po (+77/-0)
health_crypto/locale/es_ES.po (+78/-0)
health_crypto/locale/fr_FR.po (+77/-0)
health_crypto/locale/it_IT.po (+77/-0)
health_crypto/locale/pt_BR.po (+77/-0)
health_crypto/locale/zh_CN.po (+77/-0)
health_crypto/setup.py (+89/-0)
health_crypto/tests/__init__.py (+1/-0)
health_crypto/tests/test_health_crypto.py (+41/-0)
health_crypto/tryton.cfg (+6/-0)
health_crypto/view/prescription_form.xml (+32/-0)
health_genetics/health_genetics.py (+24/-3)
health_genetics/locale/el_GR.po (+283/-0)
health_genetics/locale/es_ES.po (+2/-2)
health_genetics/locale/fr_FR.po (+2/-2)
health_genetics/locale/it_IT.po (+2/-2)
health_genetics/locale/pt_BR.po (+284/-0)
health_genetics/locale/zh_CN.po (+284/-0)
health_genetics/setup.py (+2/-3)
health_genetics/tryton.cfg (+1/-1)
health_genetics/view/gnuhealth_disease_gene_tree.xml (+4/-4)
health_genetics/view/gnuhealth_family_diseases.xml (+2/-2)
health_genetics/view/gnuhealth_family_diseases_tree.xml (+3/-3)
health_genetics/view/gnuhealth_genetic_risk_tree.xml (+2/-0)
health_gyneco/health_gyneco.py (+290/-21)
health_gyneco/health_gyneco_view.xml (+14/-0)
health_gyneco/locale/el_GR.po (+1533/-0)
health_gyneco/locale/es_ES.po (+172/-29)
health_gyneco/locale/fr_FR.po (+174/-31)
health_gyneco/locale/it_IT.po (+172/-29)
health_gyneco/locale/pt_BR.po (+1536/-0)
health_gyneco/locale/zh_CN.po (+1532/-0)
health_gyneco/setup.py (+2/-3)
health_gyneco/tryton.cfg (+1/-1)
health_gyneco/view/gnuhealth_colposcopy_history.xml (+8/-3)
health_gyneco/view/gnuhealth_colposcopy_history_tree.xml (+3/-1)
health_gyneco/view/gnuhealth_mammography_history.xml (+8/-3)
health_gyneco/view/gnuhealth_mammography_history_tree.xml (+3/-1)
health_gyneco/view/gnuhealth_menstrual_history.xml (+9/-2)
health_gyneco/view/gnuhealth_menstrual_history_tree.xml (+2/-0)
health_gyneco/view/gnuhealth_pap_history.xml (+8/-3)
health_gyneco/view/gnuhealth_pap_history_tree.xml (+3/-1)
health_gyneco/view/gnuhealth_patient.xml (+20/-20)
health_gyneco/view/gnuhealth_patient_pregnancy.xml (+16/-1)
health_gyneco/view/gnuhealth_patient_pregnancy_tree.xml (+2/-0)
health_gyneco/view/gnuhealth_perinatal.xml (+8/-0)
health_gyneco/view/gnuhealth_perinatal_tree.xml (+2/-0)
health_gyneco/view/gnuhealth_prenatal_evaluation.xml (+6/-1)
health_gyneco/view/gnuhealth_prenatal_evaluation_tree.xml (+2/-0)
health_gyneco/view/gnuhealth_puerperium_monitor.xml (+8/-0)
health_gyneco/view/gnuhealth_puerperium_monitor_tree.xml (+2/-0)
health_history/locale/el_GR.po (+541/-0)
health_history/locale/es_ES.po (+19/-11)
health_history/locale/fr_FR.po (+22/-13)
health_history/locale/it_IT.po (+19/-11)
health_history/locale/pt_BR.po (+542/-0)
health_history/locale/zh_CN.po (+541/-0)
health_history/setup.py (+2/-3)
health_history/tryton.cfg (+1/-1)
health_icd10/locale/el_GR.po (+59424/-0)
health_icd10/locale/es_ES.po (+4/-4)
health_icd10/locale/fr_FR.po (+4/-4)
health_icd10/locale/it_IT.po (+5/-5)
health_icd10/locale/pt_BR.po (+59429/-0)
health_icd10/locale/zh_CN.po (+59424/-0)
health_icd10/setup.py (+2/-3)
health_icd10/tryton.cfg (+1/-1)
health_icd10pcs/setup.py (+2/-3)
health_icd10pcs/tryton.cfg (+1/-1)
health_icpm/locale/el_GR.po (+3327/-0)
health_icpm/locale/es_ES.po (+203/-200)
health_icpm/locale/fr_FR.po (+1/-1)
health_icpm/locale/it_IT.po (+187/-186)
health_icpm/locale/pt_BR.po (+3327/-0)
health_icpm/locale/zh_CN.po (+3327/-0)
health_icpm/setup.py (+2/-3)
health_icpm/tryton.cfg (+1/-1)
health_icu/health_icu.py (+12/-11)
health_icu/locale/el_GR.po (+1203/-0)
health_icu/locale/es_ES.po (+2/-2)
health_icu/locale/fr_FR.po (+3/-3)
health_icu/locale/it_IT.po (+2/-2)
health_icu/locale/pt_BR.po (+1206/-0)
health_icu/locale/zh_CN.po (+1203/-0)
health_icu/setup.py (+2/-3)
health_icu/tryton.cfg (+1/-1)
health_imaging/locale/el_GR.po (+452/-0)
health_imaging/locale/es_ES.po (+4/-4)
health_imaging/locale/fr_FR.po (+2/-2)
health_imaging/locale/it_IT.po (+2/-2)
health_imaging/locale/pt_BR.po (+454/-0)
health_imaging/locale/zh_CN.po (+452/-0)
health_imaging/setup.py (+2/-3)
health_imaging/tryton.cfg (+1/-1)
health_inpatient/health_inpatient.py (+13/-5)
health_inpatient/health_inpatient_view.xml (+4/-7)
health_inpatient/locale/el_GR.po (+1328/-0)
health_inpatient/locale/es_ES.po (+9/-9)
health_inpatient/locale/fr_FR.po (+12/-11)
health_inpatient/locale/it_IT.po (+7/-7)
health_inpatient/locale/pt_BR.po (+1332/-0)
health_inpatient/locale/zh_CN.po (+1327/-0)
health_inpatient/setup.py (+2/-3)
health_inpatient/tryton.cfg (+1/-1)
health_inpatient/view/gnuhealth_inpatient_registration_tree.xml (+1/-0)
health_inpatient/view/gnuhealth_patient_extd_tree.xml (+1/-1)
health_inpatient_calendar/locale/el_GR.po (+28/-0)
health_inpatient_calendar/locale/es_ES.po (+1/-1)
health_inpatient_calendar/locale/fr_FR.po (+1/-1)
health_inpatient_calendar/locale/it_IT.po (+1/-1)
health_inpatient_calendar/locale/pt_BR.po (+28/-0)
health_inpatient_calendar/locale/zh_CN.po (+29/-0)
health_inpatient_calendar/setup.py (+2/-3)
health_inpatient_calendar/tryton.cfg (+1/-1)
health_lab/health_lab.py (+2/-2)
health_lab/locale/el_GR.po (+749/-0)
health_lab/locale/es_ES.po (+3/-3)
health_lab/locale/fr_FR.po (+3/-3)
health_lab/locale/it_IT.po (+4/-4)
health_lab/locale/pt_BR.po (+753/-0)
health_lab/locale/zh_CN.po (+748/-0)
health_lab/setup.py (+2/-3)
health_lab/tryton.cfg (+1/-1)
health_lifestyle/data/recreational_drugs.xml (+28/-1)
health_lifestyle/health_lifestyle.py (+17/-3)
health_lifestyle/locale/el_GR.po (+1041/-0)
health_lifestyle/locale/es_ES.po (+3/-3)
health_lifestyle/locale/fr_FR.po (+2/-2)
health_lifestyle/locale/it_IT.po (+2/-2)
health_lifestyle/locale/pt_BR.po (+1044/-0)
health_lifestyle/locale/zh_CN.po (+1043/-0)
health_lifestyle/setup.py (+2/-3)
health_lifestyle/tryton.cfg (+1/-1)
health_lifestyle/view/gnuhealth_drugs_recreational.xml (+5/-2)
health_lifestyle/view/gnuhealth_drugs_recreational_tree.xml (+2/-1)
health_mdg6/locale/el_GR.po (+55/-0)
health_mdg6/locale/es_ES.po (+1/-1)
health_mdg6/locale/fr_FR.po (+1/-1)
health_mdg6/locale/it_IT.po (+3/-3)
health_mdg6/locale/pt_BR.po (+54/-0)
health_mdg6/locale/zh_CN.po (+54/-0)
health_mdg6/setup.py (+2/-3)
health_mdg6/tryton.cfg (+1/-1)
health_ntd/setup.py (+2/-3)
health_ntd/tryton.cfg (+1/-1)
health_ntd_chagas/locale/el_GR.po (+294/-0)
health_ntd_chagas/locale/es_ES.po (+2/-2)
health_ntd_chagas/locale/fr_FR.po (+4/-4)
health_ntd_chagas/locale/it_IT.po (+4/-4)
health_ntd_chagas/locale/pt_BR.po (+296/-0)
health_ntd_chagas/locale/zh_CN.po (+294/-0)
health_ntd_chagas/setup.py (+2/-3)
health_ntd_chagas/tryton.cfg (+1/-1)
health_ntd_dengue/locale/el_GR.po (+248/-0)
health_ntd_dengue/locale/es_ES.po (+2/-2)
health_ntd_dengue/locale/fr_FR.po (+3/-3)
health_ntd_dengue/locale/it_IT.po (+3/-3)
health_ntd_dengue/locale/pt_BR.po (+250/-0)
health_ntd_dengue/locale/zh_CN.po (+249/-0)
health_ntd_dengue/setup.py (+2/-3)
health_ntd_dengue/tryton.cfg (+1/-1)
health_nursing/locale/el_GR.po (+616/-0)
health_nursing/locale/es_ES.po (+4/-4)
health_nursing/locale/fr_FR.po (+3/-3)
health_nursing/locale/it_IT.po (+4/-4)
health_nursing/locale/pt_BR.po (+618/-0)
health_nursing/locale/zh_CN.po (+616/-0)
health_nursing/setup.py (+2/-3)
health_nursing/tryton.cfg (+1/-1)
health_pediatrics/health_pediatrics.py (+88/-27)
health_pediatrics/health_pediatrics_view.xml (+3/-3)
health_pediatrics/locale/el_GR.po (+1209/-0)
health_pediatrics/locale/es_ES.po (+36/-32)
health_pediatrics/locale/fr_FR.po (+34/-29)
health_pediatrics/locale/it_IT.po (+33/-29)
health_pediatrics/locale/pt_BR.po (+1211/-0)
health_pediatrics/locale/zh_CN.po (+1209/-0)
health_pediatrics/setup.py (+2/-3)
health_pediatrics/tryton.cfg (+1/-1)
health_pediatrics/view/gnuhealth_newborn.xml (+29/-42)
health_pediatrics/view/gnuhealth_newborn_tree.xml (+2/-3)
health_pediatrics_growth_charts/locale/el_GR.po (+20/-0)
health_pediatrics_growth_charts/locale/es_ES.po (+1/-1)
health_pediatrics_growth_charts/locale/fr_FR.po (+5/-4)
health_pediatrics_growth_charts/locale/it_IT.po (+1/-1)
health_pediatrics_growth_charts/locale/pt_BR.po (+20/-0)
health_pediatrics_growth_charts/locale/zh_CN.po (+20/-0)
health_pediatrics_growth_charts/setup.py (+2/-3)
health_pediatrics_growth_charts/tryton.cfg (+1/-1)
health_pediatrics_growth_charts_who/locale/el_GR.po (+989/-0)
health_pediatrics_growth_charts_who/locale/es_ES.po (+2/-2)
health_pediatrics_growth_charts_who/locale/fr_FR.po (+810/-808)
health_pediatrics_growth_charts_who/locale/it_IT.po (+2/-2)
health_pediatrics_growth_charts_who/locale/pt_BR.po (+989/-0)
health_pediatrics_growth_charts_who/locale/zh_CN.po (+989/-0)
health_pediatrics_growth_charts_who/setup.py (+2/-3)
health_pediatrics_growth_charts_who/tryton.cfg (+1/-1)
health_profile/setup.py (+2/-3)
health_profile/tryton.cfg (+1/-1)
health_qrcodes/health_qrcodes.py (+6/-6)
health_qrcodes/locale/el_GR.po (+104/-0)
health_qrcodes/locale/es_ES.po (+2/-6)
health_qrcodes/locale/fr_FR.po (+2/-6)
health_qrcodes/locale/it_IT.po (+2/-6)
health_qrcodes/locale/pt_BR.po (+104/-0)
health_qrcodes/locale/zh_CN.po (+105/-0)
health_qrcodes/setup.py (+2/-3)
health_qrcodes/tryton.cfg (+1/-1)
health_reporting/locale/el_GR.po (+304/-0)
health_reporting/locale/es_ES.po (+2/-2)
health_reporting/locale/fr_FR.po (+3/-3)
health_reporting/locale/it_IT.po (+2/-2)
health_reporting/locale/pt_BR.po (+305/-0)
health_reporting/locale/zh_CN.po (+304/-0)
health_reporting/setup.py (+2/-3)
health_reporting/tryton.cfg (+1/-1)
health_services/locale/el_GR.po (+242/-0)
health_services/locale/es_ES.po (+2/-2)
health_services/locale/fr_FR.po (+3/-3)
health_services/locale/it_IT.po (+3/-3)
health_services/locale/pt_BR.po (+244/-0)
health_services/locale/zh_CN.po (+242/-0)
health_services/setup.py (+2/-3)
health_services/tryton.cfg (+1/-1)
health_socioeconomics/health_socioeconomics.py (+3/-3)
health_socioeconomics/locale/el_GR.po (+379/-0)
health_socioeconomics/locale/es_ES.po (+1/-1)
health_socioeconomics/locale/fr_FR.po (+6/-5)
health_socioeconomics/locale/it_IT.po (+1/-1)
health_socioeconomics/locale/pt_BR.po (+380/-0)
health_socioeconomics/locale/zh_CN.po (+379/-0)
health_socioeconomics/setup.py (+2/-3)
health_socioeconomics/tryton.cfg (+1/-1)
health_stock/health_stock.py (+6/-4)
health_stock/locale/el_GR.po (+566/-0)
health_stock/locale/es_ES.po (+3/-7)
health_stock/locale/fr_FR.po (+3/-7)
health_stock/locale/it_IT.po (+4/-8)
health_stock/locale/pt_BR.po (+566/-0)
health_stock/locale/zh_CN.po (+566/-0)
health_stock/setup.py (+2/-3)
health_stock/tryton.cfg (+1/-1)
health_surgery/health_surgery.py (+15/-9)
health_surgery/health_surgery_view.xml (+4/-6)
health_surgery/locale/el_GR.po (+807/-0)
health_surgery/locale/es_ES.po (+13/-21)
health_surgery/locale/fr_FR.po (+11/-19)
health_surgery/locale/it_IT.po (+12/-20)
health_surgery/locale/pt_BR.po (+810/-0)
health_surgery/locale/zh_CN.po (+809/-0)
health_surgery/setup.py (+2/-3)
health_surgery/tryton.cfg (+1/-1)
health_surgery/view/gnuhealth_surgery_tree.xml (+1/-0)
health_who_essential_medicines/locale/el_GR.po (+3924/-0)
health_who_essential_medicines/locale/es_ES.po (+1/-1)
health_who_essential_medicines/locale/fr_FR.po (+1/-1)
health_who_essential_medicines/locale/it_IT.po (+3/-3)
health_who_essential_medicines/locale/pt_BR.po (+3923/-0)
health_who_essential_medicines/locale/zh_CN.po (+3924/-0)
health_who_essential_medicines/setup.py (+2/-3)
health_who_essential_medicines/tryton.cfg (+1/-1)
version (+1/-1)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/utopic/gnuhealth/2.6
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+227263@code.launchpad.net

Description of the change

New upstream release. Fixes FTBFS

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks. uploaded.

review: Approve

Unmerged revisions

9. By Jackson Doak

* New upstream release.
* Use tryton 3.2.x

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Changelog'
2--- Changelog 2014-02-19 20:15:51 +0000
3+++ Changelog 2014-07-17 21:57:19 +0000
4@@ -1,6 +1,1257 @@
5+changeset: 1430:253d95fa46a8
6+tag: tip
7+user: Luis Falcon <falcon@gnu.org>
8+date: Sun Jul 06 18:57:02 2014 +0100
9+summary: GNU Health installer : Remove python-ldap installation via pip from all operating systems
10+
11+changeset: 1429:e12335c5e908
12+user: Luis Falcon <falcon@gnu.org>
13+date: Sun Jul 06 18:31:46 2014 +0100
14+summary: Changelog : Update
15+
16+changeset: 1428:f64475f41c48
17+user: Luis Falcon <falcon@gnu.org>
18+date: Sun Jul 06 18:30:19 2014 +0100
19+summary: Changelog : Update
20+
21+changeset: 1427:358d08893ace
22+user: Luis Falcon <falcon@gnu.org>
23+date: Sun Jul 06 18:27:36 2014 +0100
24+summary: health_archives : Fix version
25+
26+changeset: 1426:8cc7cec2fde0
27+user: Luis Falcon <falcon@gnu.org>
28+date: Sun Jul 06 18:18:20 2014 +0100
29+summary: Changelog : Update to latest version
30+
31+
32+changeset: 1425:44ae2ec79478
33+user: Luis Falcon <falcon@gnu.org>
34+date: Sun Jul 06 18:13:10 2014 +0100
35+summary: all : update version
36+
37+changeset: 1424:b8873f6ebf9e
38+user: Luis Falcon <falcon@gnu.org>
39+date: Sun Jul 06 16:49:04 2014 +0100
40+summary: health : prioritize constraints in health professional and specialties
41+
42+changeset: 1423:dba135d3b154
43+user: Luis Falcon <falcon@gnu.org>
44+date: Sun Jul 06 16:10:32 2014 +0100
45+summary: health : Include default institution in health professional
46+
47+changeset: 1422:04269fd8865a
48+user: Luis Falcon <falcon@gnu.org>
49+date: Sun Jul 06 15:38:12 2014 +0100
50+summary: health: fix invalid attribute in XML view
51+
52+changeset: 1421:44718bfde9d7
53+user: Luis Falcon <falcon@gnu.org>
54+date: Sun Jul 06 15:26:13 2014 +0100
55+summary: health: include id as temporary code in migration to the new health institution model
56+
57+changeset: 1420:248262b50c8f
58+user: Luis Falcon <falcon@gnu.org>
59+date: Sun Jul 06 13:30:22 2014 +0100
60+summary: health : Make required and unique the institution code
61+
62+changeset: 1419:17ff6c459309
63+user: Luis Falcon <falcon@gnu.org>
64+date: Sun Jul 06 13:18:45 2014 +0100
65+summary: health_genetics : Include sibblings in the family history / genetic information
66+
67+changeset: 1418:101218cf0ada
68+user: Luis Falcon <falcon@gnu.org>
69+date: Sun Jul 06 13:00:37 2014 +0100
70+summary: health_genetics : Improve view for genetic family history
71+
72+changeset: 1417:a1794ad7875d
73+user: Luis Falcon <falcon@gnu.org>
74+date: Sun Jul 06 12:47:35 2014 +0100
75+summary: health_genetics : Include notes, comments on genetic risks
76+
77+changeset: 1416:551834c4b9b8
78+user: Luis Falcon <falcon@gnu.org>
79+date: Sun Jul 06 12:32:29 2014 +0100
80+summary: health_genetics : Official Symbol of the Disease Gene is now required. Improved tree view
81+
82+changeset: 1415:f6946a2abeb5
83+user: Luis Falcon <falcon@gnu.org>
84+date: Sun Jul 06 12:15:02 2014 +0100
85+summary: health_lifestyle : Add code to the recreational drugs database . Update datafile
86+
87+changeset: 1414:34686ddf25d6
88+user: Luis Falcon <falcon@gnu.org>
89+date: Sun Jul 06 10:52:35 2014 +0100
90+summary: health : add unique constraint for health professional license ID
91+
92+changeset: 1413:7301382d6eea
93+user: Luis Falcon <falcon@gnu.org>
94+date: Sun Jul 06 10:22:16 2014 +0100
95+summary: health : fix required the drug route form
96+
97+changeset: 1412:627504d0174c
98+user: Luis Falcon <falcon@gnu.org>
99+date: Sun Jul 06 10:21:03 2014 +0100
100+summary: health : make unique and required the drug route form. Update tooltips
101+
102+changeset: 1411:4f8337954617
103+user: Luis Falcon <falcon@gnu.org>
104+date: Sun Jul 06 10:16:33 2014 +0100
105+summary: health : make unique and required the drug form and medication frequency codes
106+
107+changeset: 1410:e1f32f38e4fc
108+user: Luis Falcon <falcon@gnu.org>
109+date: Sun Jul 06 10:01:03 2014 +0100
110+summary: health : make unique and required the occupation code
111+
112+changeset: 1409:08b9aba7688b
113+user: Luis Falcon <falcon@gnu.org>
114+date: Sun Jul 06 09:51:25 2014 +0100
115+summary: health : make unique and required the ethnic group code
116+
117+changeset: 1408:5ecb6f042de1
118+user: Luis Falcon <falcon@gnu.org>
119+date: Sun Jul 06 09:33:55 2014 +0100
120+summary: health : update ethnic groups codes in datafiles
121+
122+changeset: 1407:b9482087d279
123+user: Luis Falcon <falcon@gnu.org>
124+date: Sun Jul 06 09:26:09 2014 +0100
125+summary: health : make required and unique the specialty code
126+
127+changeset: 1406:36271776d4e7
128+user: Luis Falcon <falcon@gnu.org>
129+date: Sun Jul 06 08:51:19 2014 +0100
130+summary: health: Update medical specialties and their codes
131+
132+changeset: 1405:cdc2aba9a1c1
133+user: Luis Falcon <falcon@gnu.org>
134+date: Sat Jul 05 20:57:50 2014 +0100
135+summary: health : make the institution field required on the ward model
136+
137+changeset: 1404:912ee97bdfe2
138+user: Luis Falcon <falcon@gnu.org>
139+date: Sat Jul 05 20:45:21 2014 +0100
140+summary: health : Add default institution in buildings, units, wards, beds and OR
141+
142+changeset: 1403:663e32bd589b
143+user: Luis Falcon <falcon@gnu.org>
144+date: Sat Jul 05 20:35:15 2014 +0100
145+summary: health: add unique constraint on bed per institution
146+
147+changeset: 1402:9b9e337b226c
148+user: Luis Falcon <falcon@gnu.org>
149+date: Sat Jul 05 20:27:03 2014 +0100
150+summary: health : Make institution field on bed model required
151+
152+changeset: 1401:d2bafefd705d
153+user: Luis Falcon <falcon@gnu.org>
154+date: Sat Jul 05 20:07:21 2014 +0100
155+summary: health: add unique constraints on ward per institution
156+
157+changeset: 1400:f29b9089d96f
158+user: Luis Falcon <falcon@gnu.org>
159+date: Sat Jul 05 19:58:18 2014 +0100
160+summary: health: make the OR and Unit required
161+
162+changeset: 1399:6957763ca714
163+user: Luis Falcon <falcon@gnu.org>
164+date: Sat Jul 05 19:49:49 2014 +0100
165+summary: health: add unique constraints on name , code in institutions for Institutions buildings and units
166+
167+changeset: 1398:ec23d135cd64
168+user: Luis Falcon <falcon@gnu.org>
169+date: Sat Jul 05 19:10:10 2014 +0100
170+summary: health: Add unique constraint to disease categories
171+
172+changeset: 1397:e23a8a9835e7
173+user: Chris Zimmerman <siv@riseup.net>
174+date: Sat Jul 05 10:07:58 2014 -0700
175+summary: FHIR: a small start on flask
176+
177+changeset: 1396:92adeeb6bc66
178+user: Chris Zimmerman <siv@riseup.net>
179+date: Sat Jul 05 09:58:17 2014 -0700
180+summary: FHIR: renamed main to __init__; fixed some imports
181+
182+changeset: 1395:88b55952a191
183+user: Chris Zimmerman <siv@riseup.net>
184+date: Sat Jul 05 09:53:23 2014 -0700
185+summary: FHIR: import as xml code as module; fixed some imports
186+
187+changeset: 1394:2b05b52e9b41
188+user: Luis Falcon <falcon@gnu.org>
189+date: Sat Jul 05 17:13:57 2014 +0100
190+summary: health : unique constraint for pathology groups
191+
192+changeset: 1393:c38aced12dca
193+user: Luis Falcon <falcon@gnu.org>
194+date: Sat Jul 05 15:39:36 2014 +0100
195+summary: health_crypt : remove unused directories in setup.py
196+
197+changeset: 1392:1944ace336e5
198+user: Luis Falcon <falcon@gnu.org>
199+date: Sat Jul 05 15:22:51 2014 +0100
200+summary: health_archives : remove unused directories in setup.py
201+
202+changeset: 1391:0558acf75e87
203+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
204+date: Sat Jul 05 07:29:48 2014 -0300
205+summary: installer : Same fixes on selection of python packages to Debian distro.
206+
207+changeset: 1390:70b581d83d00
208+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
209+date: Sat Jul 05 07:17:56 2014 -0300
210+summary: installer : Refactoring to use only functions from main() controller skeleton.
211+
212+changeset: 1389:25989c1caeb2
213+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
214+date: Sat Jul 05 03:57:52 2014 -0300
215+summary: installer : Update versions of packages python dependencies
216+
217+changeset: 1388:4e244bf2de70
218+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
219+date: Fri Jul 04 19:41:34 2014 -0300
220+summary: health : Fix prescription printing error when no DoB was assigned to the patient.
221+
222+changeset: 1387:3026b117dbe9
223+user: Sebastian Marro <smarro@thymbra.com>
224+date: Fri Jul 04 16:03:29 2014 -0300
225+summary: health_stock : Fix vaccine default expiration_date
226+
227+changeset: 1386:318a10142c73
228+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
229+date: Wed Jul 02 14:40:01 2014 -0300
230+summary: all : Add Chinese as an official language
231+
232+changeset: 1385:266c47b447fb
233+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
234+date: Wed Jul 02 14:22:25 2014 -0300
235+summary: all : Add Portuguese (Brazil) as an official language
236+
237+changeset: 1384:3b2fc9d60b02
238+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
239+date: Wed Jul 02 14:13:58 2014 -0300
240+summary: all : Add Greek as an official language
241+
242+changeset: 1383:05b117dbf85e
243+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
244+date: Wed Jul 02 14:07:36 2014 -0300
245+summary: all : Update official languages from transifex
246+
247+changeset: 1382:3ddd9655b8b6
248+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
249+date: Wed Jul 02 12:35:37 2014 -0300
250+summary: health : Fix typo
251+
252+changeset: 1381:fe8911f100dc
253+user: Luis Falcon <falcon@gnu.org>
254+date: Mon Jun 30 16:35:16 2014 +0100
255+summary: GNU HEALTH installer : fix typo
256+
257+changeset: 1380:f379b8c1b7a4
258+user: Luis Falcon <falcon@gnu.org>
259+date: Mon Jun 30 16:22:53 2014 +0100
260+summary: GNU HEALTH installer : select python packages to install locally depending on the operating system
261+
262+changeset: 1379:774741fdf946
263+user: Luis Falcon <falcon@gnu.org>
264+date: Mon Jun 30 16:02:17 2014 +0100
265+summary: GNU HEALTH installer : check operating system and distros
266+
267+changeset: 1378:5bf96abd5cf1
268+user: Luis Falcon <falcon@gnu.org>
269+date: Mon Jun 30 12:19:22 2014 +0100
270+summary: BASH profile : Include GNUHEALTH_VERSION environment variable
271+
272+changeset: 1377:c74761cc45bd
273+user: Luis Falcon <falcon@gnu.org>
274+date: Mon Jun 30 12:08:50 2014 +0100
275+summary: BASH profile : source .gnuhealthrc from .bashrc
276+
277+changeset: 1376:1fb4de85d4ad
278+user: Luis Falcon <falcon@gnu.org>
279+date: Mon Jun 30 11:41:17 2014 +0100
280+summary: BASH profile : add PYTHONPATH
281+
282+changeset: 1375:ec38b1962812
283+user: Luis Falcon <falcon@gnu.org>
284+date: Mon Jun 30 11:20:43 2014 +0100
285+summary: BASH profile : Check for the latest trytond installed to use in the aliases
286+
287+changeset: 1374:7e07410aa616
288+user: Luis Falcon <falcon@gnu.org>
289+date: Sat Jun 28 15:44:01 2014 +0100
290+summary: health: update description on gnuealth.institution.operationalsector
291+
292+changeset: 1373:c5d349c99029
293+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
294+date: Fri Jun 27 17:59:44 2014 -0300
295+summary: Update setup.py to Tryton version 3.2
296+
297+changeset: 1372:f2134e26d6f3
298+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
299+date: Fri Jun 27 17:51:17 2014 -0300
300+summary: Remove support of Python2.6​
301+
302+changeset: 1371:1f9f9f704660
303+user: Luis Falcon <falcon@gnu.org>
304+date: Fri Jun 27 21:22:17 2014 +0100
305+summary: health : Make read only the health professional on patient medication and add institution
306+
307+changeset: 1370:d86a7e0f8f7f
308+user: Luis Falcon <falcon@gnu.org>
309+date: Fri Jun 27 21:00:27 2014 +0100
310+summary: health : Add relate action to patient vaccination history
311+
312+changeset: 1369:3aa1d0dec4af
313+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
314+date: Fri Jun 27 16:51:56 2014 -0300
315+summary: Remove unused reference to previous workflow engine​​
316+
317+changeset: 1368:a4994472e498
318+user: Sebastian Marro <smarro@thymbra.com>
319+date: Fri Jun 27 16:12:13 2014 -0300
320+summary: health_surgery : Replace identification_code with puid in surgery report
321+
322+changeset: 1367:c882c4beed21
323+user: Sebastian Marro <smarro@thymbra.com>
324+date: Fri Jun 27 16:11:31 2014 -0300
325+summary: health_history : Replace identification_code with puid in evaluation report
326+
327+changeset: 1366:949edba5d4b5
328+user: Luis Falcon <falcon@gnu.org>
329+date: Fri Jun 27 20:09:09 2014 +0100
330+summary: health: Add vaccination institution and health professional info
331+
332+changeset: 1365:d88620ed8275
333+user: Luis Falcon <falcon@gnu.org>
334+date: Fri Jun 27 19:22:02 2014 +0100
335+summary: health_gyneco : Add the health professional and institution info to the tree view on menstrual history
336+
337+changeset: 1364:23740f4e55b7
338+user: Luis Falcon <falcon@gnu.org>
339+date: Fri Jun 27 19:02:19 2014 +0100
340+summary: health_gyneco : Add health institution and professional to prenatal and puerperium evaluation
341+
342+changeset: 1363:247bea10b16f
343+user: Luis Falcon <falcon@gnu.org>
344+date: Fri Jun 27 18:32:44 2014 +0100
345+summary: health_surgery : Remove page from the main patient view, and use a relate action
346+
347+changeset: 1362:b825d3d76776
348+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
349+date: Thu Jun 26 01:48:34 2014 -0300
350+summary: health : Use fields.depends decorator
351+
352+changeset: 1361:98519ef8a85c
353+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
354+date: Thu Jun 26 01:07:12 2014 -0300
355+summary: health_calendar : Use fields.depends decorator
356+
357+changeset: 1360:4861399472d6
358+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
359+date: Thu Jun 26 00:55:34 2014 -0300
360+summary: health_stock : Use fields.depends decorator
361+
362+changeset: 1359:3de7fd0ea1af
363+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
364+date: Thu Jun 26 00:20:49 2014 -0300
365+summary: health_icu : Use fields.depends decorator
366+
367+changeset: 1358:17526c6c545e
368+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
369+date: Wed Jun 25 23:40:36 2014 -0300
370+summary: health_inpatient : Use fields.depends decorator
371+
372+changeset: 1357:63c90870fcb9
373+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
374+date: Wed Jun 25 23:16:09 2014 -0300
375+summary: health_surgery : Use fields.depends decorator
376+
377+changeset: 1356:084bd74d0d85
378+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
379+date: Wed Jun 25 22:35:28 2014 -0300
380+summary: health_pediatrics : Use fields.depends decorator
381+
382+changeset: 1355:ae65b7006ba5
383+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
384+date: Wed Jun 25 22:33:58 2014 -0300
385+summary: health_socioeconomics : Use fields.depends decorator
386+
387+changeset: 1354:b0ee88d68279
388+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
389+date: Wed Jun 25 22:30:35 2014 -0300
390+summary: health_lifestyle : Use fields.depends decorator
391+
392+changeset: 1353:d3efa7c04ceb
393+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
394+date: Wed Jun 25 22:26:40 2014 -0300
395+summary: health_lab : Use fields.depends decorator
396+
397+changeset: 1352:bd0ec9515e88
398+user: Bruno M. Villasanti <bvillasanti@thymbra.com>
399+date: Wed Jun 25 22:20:41 2014 -0300
400+summary: health_gyneco : Use fields.depends decorator
401+
402+changeset: 1351:915d82461da4
403+user: Luis Falcon <falcon@gnu.org>
404+date: Wed Jun 25 11:53:01 2014 +0100
405+summary: health_gyneco : Use alternative reverse method to input weeks of gestational age and end of pregnancy when referred by the patient
406+
407+changeset: 1350:f2c7905caf8b
408+user: Luis Falcon <falcon@gnu.org>
409+date: Wed Jun 25 10:00:28 2014 +0100
410+summary: health_gyneco : Automatic computation of patient gravida, preterms, abortions and stillbirths
411+
412+changeset: 1349:aef9cb96e5fe
413+user: Luis Falcon <falcon@gnu.org>
414+date: Tue Jun 24 22:18:26 2014 +0100
415+summary: health_gyneco: Automatic calculation of patient gravida
416+
417+changeset: 1348:3b7cc14d65ad
418+user: Luis Falcon <falcon@gnu.org>
419+date: Tue Jun 24 21:02:21 2014 +0100
420+summary: health_gyneco : remove debugging info
421+
422+changeset: 1347:722bfcbd51bc
423+user: Luis Falcon <falcon@gnu.org>
424+date: Tue Jun 24 21:01:10 2014 +0100
425+summary: health_gyneco : Add institution and health prof. to the new patient obstetric record. Fix current pregnancy validation method
426+
427+changeset: 1346:797283dc1cdd
428+user: Luis Falcon <falcon@gnu.org>
429+date: Tue Jun 24 13:58:07 2014 +0100
430+summary: health_gyneco : Fix validation method for current pregnancy
431+
432+changeset: 1345:f19fe6f276e7
433+user: Luis Falcon <falcon@gnu.org>
434+date: Tue Jun 24 13:21:04 2014 +0100
435+summary: health_gyneco : Fix required field date from previous to current in PAP, Mammography and Colposcopy
436+
437+changeset: 1344:1aa6ccd2cbe6
438+user: Luis Falcon <falcon@gnu.org>
439+date: Tue Jun 24 13:02:49 2014 +0100
440+summary: health_gyneco : Show the mammography, PAP and colposcopy if there is a history
441+
442+changeset: 1343:88cdc73e8a1e
443+user: Luis Falcon <falcon@gnu.org>
444+date: Tue Jun 24 12:46:51 2014 +0100
445+summary: health_gyneco: Group PAP and Colposcopy in the Screening page
446+
447+changeset: 1342:b706d1fb9915
448+user: Luis Falcon <falcon@gnu.org>
449+date: Tue Jun 24 12:03:27 2014 +0100
450+summary: health_gyneco : Move the OB history to main tab on GYN
451+
452+changeset: 1341:9721cd346845
453+user: Luis Falcon <falcon@gnu.org>
454+date: Mon Jun 23 22:56:06 2014 +0100
455+summary: health_gyneco : Update view for patient obstetric history and use Python SQL
456+
457+changeset: 1340:c2cedb40216e
458+user: Luis Falcon <falcon@gnu.org>
459+date: Mon Jun 23 20:51:32 2014 +0100
460+summary: health : remove debugging information
461+
462+changeset: 1339:a8d36273b5eb
463+user: Luis Falcon <falcon@gnu.org>
464+date: Mon Jun 23 20:12:17 2014 +0100
465+summary: health_gyneco : Use a relate action for patient obstetric information
466+
467+changeset: 1338:aa41b3d24f9d
468+user: Luis Falcon <falcon@gnu.org>
469+date: Mon Jun 23 17:56:51 2014 +0100
470+summary: health_gyneco : remove required state from BBA and home birth fields
471+
472+changeset: 1337:a0e802dfaea2
473+user: Luis Falcon <falcon@gnu.org>
474+date: Mon Jun 23 17:47:31 2014 +0100
475+summary: health_gyneco : Add BBA and Home-birth to the obstetric history
476+
477+changeset: 1336:a4bdfd58964a
478+user: Luis Falcon <falcon@gnu.org>
479+date: Mon Jun 23 16:36:37 2014 +0100
480+summary: health_gyneco : Add Institution and health professional to the perinatal model
481+
482+changeset: 1335:ba703a6e7d60
483+user: Luis Falcon <falcon@gnu.org>
484+date: Sun Jun 22 09:48:30 2014 +0100
485+summary: health: improve and reorder view with the Institution and signing health professional
486+
487+changeset: 1334:488c8e64ef81
488+user: Luis Falcon <falcon@gnu.org>
489+date: Sat Jun 21 23:25:54 2014 +0100
490+summary: health_gyneco : Add health professional and institution to patient menstrual period review
491+
492+changeset: 1333:3471d9a1b8c7
493+user: Luis Falcon <falcon@gnu.org>
494+date: Sat Jun 21 23:18:35 2014 +0100
495+summary: health_gyneco : Improve form view in mammography, colposcopy and and PAP
496+
497+changeset: 1332:522428a38db2
498+user: Luis Falcon <falcon@gnu.org>
499+date: Sat Jun 21 22:34:44 2014 +0100
500+summary: health_gyneco : Add health professional and institution to the colposcopy model
501+
502+changeset: 1331:fbf8f3fe2273
503+user: Luis Falcon <falcon@gnu.org>
504+date: Fri Jun 20 20:01:46 2014 +0100
505+summary: health_gyneco : Add health professional and institution to patient PAP smear history
506+
507+changeset: 1330:2365711c4dfd
508+user: Luis Falcon <falcon@gnu.org>
509+date: Fri Jun 20 19:49:25 2014 +0100
510+summary: health_gyneco : Add health professional and institution to patient mammography history
511+
512+changeset: 1329:401f46295e71
513+user: Luis Falcon <falcon@gnu.org>
514+date: Fri Jun 20 15:02:31 2014 +0100
515+summary: health_pediatrics : Document fields to be removed in 2.8
516+
517+changeset: 1328:0135213637b6
518+user: Luis Falcon <falcon@gnu.org>
519+date: Fri Jun 20 14:56:09 2014 +0100
520+summary: health_pediatrics : Remove page on neonatal death from view
521+
522+changeset: 1327:49d4263460c6
523+user: Luis Falcon <falcon@gnu.org>
524+date: Fri Jun 20 13:39:52 2014 +0100
525+summary: health_pediatrics : Limit to one the neonatal information on the patient
526+
527+changeset: 1326:a5d1eb51790f
528+user: Luis Falcon <falcon@gnu.org>
529+date: Fri Jun 20 12:20:59 2014 +0100
530+summary: health_pediatrics : Update party birth date with the newly created newborn record
531+
532+changeset: 1325:b5ec0d9cd832
533+user: Luis Falcon <falcon@gnu.org>
534+date: Fri Jun 20 01:38:19 2014 +0100
535+summary: health_pediatrics : Update person (party) date of birth upon writing newborn info
536+
537+changeset: 1324:808ba9a59891
538+user: Luis Falcon <falcon@gnu.org>
539+date: Thu Jun 19 18:53:41 2014 +0100
540+summary: GNU Health installer : rename custom modules dir variable
541+
542+changeset: 1323:c033b953fc1b
543+user: Luis Falcon <falcon@gnu.org>
544+date: Thu Jun 19 17:03:28 2014 +0100
545+summary: GNU Health RC file : unalias ls to be FreeBSD compatible
546+
547+changeset: 1322:9336dec90213
548+user: Luis Falcon <falcon@gnu.org>
549+date: Thu Jun 19 16:53:40 2014 +0100
550+summary: GNU Health installer : Add custom modules directory
551+
552+changeset: 1321:5563c4f48091
553+user: Sebastian Marro <smarro@thymbra.com>
554+date: Thu Jun 12 11:36:26 2014 -0500
555+summary: health_qrcodes : Replace ssn with puid in patient_card report
556+
557+changeset: 1320:f1bbb358c49d
558+user: Chris Zimmerman <siv@riseup.net>
559+date: Wed Jun 11 21:48:44 2014 -0700
560+summary: FHIR: initial server xml handling code
561+
562+changeset: 1319:8d1cae531bac
563+user: Luis Falcon <falcon@gnu.org>
564+date: Mon Jun 09 13:25:01 2014 -0500
565+summary: health : reorder Classes to fit the new institution model
566+
567+changeset: 1318:14826e86d240
568+user: Luis Falcon <falcon@gnu.org>
569+date: Mon Jun 09 08:31:07 2014 -0500
570+summary: health installer : add upgrade param to the pip installation
571+
572+changeset: 1317:5cea2cdc69fb
573+user: Luis Falcon <falcon@gnu.org>
574+date: Mon Jun 09 00:33:10 2014 -0500
575+summary: health_archives : update identification_code to PUID
576+
577+changeset: 1316:fd2ee4a30c39
578+user: Luis Falcon <falcon@gnu.org>
579+date: Mon Jun 09 00:04:46 2014 -0500
580+summary: health_qrcodes : Update Identification to PUID
581+
582+changeset: 1315:995bce4ceefa
583+user: Luis Falcon <falcon@gnu.org>
584+date: Sun Jun 08 23:55:56 2014 -0500
585+summary: health : Update patient reports to new PUID
586+
587+changeset: 1314:a96f15370761
588+user: Luis Falcon <falcon@gnu.org>
589+date: Sun Jun 08 23:30:50 2014 -0500
590+summary: health_qrcodes : update ssn to puid
591+
592+changeset: 1313:b1e5393e76d2
593+user: Luis Falcon <falcon@gnu.org>
594+date: Sun Jun 08 23:15:08 2014 -0500
595+summary: health : move up the health institution classes
596+
597+changeset: 1312:23e60ca5b631
598+user: Luis Falcon <falcon@gnu.org>
599+date: Sun Jun 08 19:59:21 2014 -0500
600+summary: health : Add institution to the hospitalization registration and surgery models
601+
602+changeset: 1311:086205bc5e6d
603+user: Luis Falcon <falcon@gnu.org>
604+date: Sun Jun 08 19:40:00 2014 -0500
605+summary: health : Add institution to the evaluation model and tree
606+
607+changeset: 1310:3b6bff8b8f89
608+user: Luis Falcon <falcon@gnu.org>
609+date: Sun Jun 08 19:12:41 2014 -0500
610+summary: health : Add method to retrieve the GNU Health instance institution
611+
612+changeset: 1309:d4b1c1070649
613+user: Luis Falcon <falcon@gnu.org>
614+date: Sun Jun 08 17:21:56 2014 -0500
615+summary: health : Add infusion and infusion rates to the view
616+
617+changeset: 1308:dc0dfdaa3817
618+user: Luis Falcon <falcon@gnu.org>
619+date: Sun Jun 08 15:20:29 2014 -0500
620+summary: health_inpatient : Rename ssn by puid on tree view
621+
622+changeset: 1307:73ee54eb7095
623+user: Luis Falcon <falcon@gnu.org>
624+date: Sun Jun 08 13:26:55 2014 -0500
625+summary: health : update medical specialties
626+
627+changeset: 1306:9c0926705c80
628+user: Luis Falcon <falcon@gnu.org>
629+date: Sun Jun 08 12:45:59 2014 -0500
630+summary: health : enforce domains in wards, operating rooms and units
631+
632+changeset: 1305:a91aa481e97a
633+user: Luis Falcon <falcon@gnu.org>
634+date: Sun Jun 08 12:27:51 2014 -0500
635+summary: health : link OR to the new institution model
636+
637+changeset: 1304:4892ac742a84
638+user: Luis Falcon <falcon@gnu.org>
639+date: Sun Jun 08 11:48:05 2014 -0500
640+summary: health : link wards to the new institution model
641+
642+changeset: 1303:64a532c57d72
643+user: Luis Falcon <falcon@gnu.org>
644+date: Sun Jun 08 11:08:57 2014 -0500
645+summary: health : link the health center units to the new institution model
646+
647+changeset: 1302:4173e338ba63
648+user: Luis Falcon <falcon@gnu.org>
649+date: Sun Jun 08 10:58:06 2014 -0500
650+summary: health : PEP8
651+
652+changeset: 1301:8cff0f1717ef
653+user: Luis Falcon <falcon@gnu.org>
654+date: Sun Jun 08 10:26:54 2014 -0500
655+summary: health : link the buildings to the new health institution model
656+
657+changeset: 1300:0700f99e82f5
658+user: Luis Falcon <falcon@gnu.org>
659+date: Sun Jun 08 09:26:12 2014 -0500
660+summary: health : include operating room on institution tree view
661+
662+changeset: 1299:b07a55310086
663+user: Luis Falcon <falcon@gnu.org>
664+date: Sun Jun 08 09:16:36 2014 -0500
665+summary: health : upgrade to 2.6 . Populate the health institution model from the party
666+
667+changeset: 1298:dfefcfa64d4c
668+user: Luis Falcon <falcon@gnu.org>
669+date: Sat Jun 07 17:06:33 2014 -0500
670+summary: health : add Instution code and Operating Room facilities
671+
672+changeset: 1297:f72301a0d24b
673+user: Luis Falcon <falcon@gnu.org>
674+date: Fri Jun 06 16:30:44 2014 -0500
675+summary: health : change the patient form PUID field
676+
677+changeset: 1296:611a377ed9c2
678+user: Luis Falcon <falcon@gnu.org>
679+date: Fri Jun 06 13:25:38 2014 -0500
680+summary: health: Rename SSN to Person Unique ID (PUID)
681+
682+changeset: 1295:e740105f99d5
683+user: Luis Falcon <falcon@gnu.org>
684+date: Fri Jun 06 12:19:21 2014 -0500
685+summary: health : move the patient local institution identification code to the party alternative id as medical record, to use the unique person identification
686+
687+changeset: 1294:3b6c066f99f8
688+user: Luis Falcon <falcon@gnu.org>
689+date: Fri Jun 06 10:43:50 2014 -0500
690+summary: health, inpatient : remove the extra, local patient identifier to favor the unique person ID
691+
692+changeset: 1293:089f3b4f18e0
693+user: Luis Falcon <falcon@gnu.org>
694+date: Thu Jun 05 17:41:47 2014 -0500
695+summary: Calendar : Link the health center to the institution model
696+
697+changeset: 1292:8970b8d546be
698+user: Luis Falcon <falcon@gnu.org>
699+date: Thu Jun 05 17:26:32 2014 -0500
700+summary: health: link vaccinations to institution
701+
702+changeset: 1291:d97a4f1dedc2
703+user: Luis Falcon <falcon@gnu.org>
704+date: Thu Jun 05 17:17:06 2014 -0500
705+summary: health: link health professional to institution
706+
707+changeset: 1290:ec19dfb62736
708+user: Luis Falcon <falcon@gnu.org>
709+date: Thu Jun 05 17:12:27 2014 -0500
710+summary: health: improve health institution form view
711+
712+changeset: 1289:892506be5ff7
713+user: Luis Falcon <falcon@gnu.org>
714+date: Thu Jun 05 16:18:33 2014 -0500
715+summary: Archives : remove archives submenu and use the main menu
716+
717+changeset: 1288:e67991d95864
718+user: Luis Falcon <falcon@gnu.org>
719+date: Thu Jun 05 16:08:09 2014 -0500
720+summary: Inpatient : remove hospitalization submenu and use the main menu
721+
722+changeset: 1287:238759a0d1ab
723+user: Luis Falcon <falcon@gnu.org>
724+date: Thu Jun 05 15:49:30 2014 -0500
725+summary: Surgery : remove submenu
726+
727+changeset: 1286:02ee969e962a
728+user: Luis Falcon <falcon@gnu.org>
729+date: Thu Jun 05 15:39:34 2014 -0500
730+summary: health : remove submenu on prescriptions
731+
732+changeset: 1285:d0789f6aef54
733+user: Luis Falcon <falcon@gnu.org>
734+date: Thu Jun 05 15:22:03 2014 -0500
735+summary: health : Remove submenu prescriptions, use the main menu
736+
737+changeset: 1284:7fb6bd9c8733
738+user: Luis Falcon <falcon@gnu.org>
739+date: Thu Jun 05 12:36:31 2014 -0500
740+summary: health : include alternative IDs in the party search
741+
742+changeset: 1283:21297a6c3bfb
743+user: Luis Falcon <falcon@gnu.org>
744+date: Thu Jun 05 10:21:28 2014 -0500
745+summary: health_crypto : fix separator id on prescription view
746+
747+changeset: 1282:ec926a88f391
748+user: Luis Falcon <falcon@gnu.org>
749+date: Thu Jun 05 10:18:19 2014 -0500
750+summary: health_crypto : check for the GNUPG python library upon start
751+
752+changeset: 1281:a83ef1bc42ff
753+user: Luis Falcon <falcon@gnu.org>
754+date: Wed Jun 04 00:35:37 2014 +0100
755+summary: health: Update appointment model from party to health institution
756+
757+changeset: 1280:880b4cb25b8b
758+user: Luis Falcon <falcon@gnu.org>
759+date: Tue Jun 03 14:22:36 2014 +0100
760+summary: health : Add shorcut to the bed from the institution, and institution attribute to the bed model
761+
762+changeset: 1279:f87bc2a5805c
763+user: Luis Falcon <falcon@gnu.org>
764+date: Tue Jun 03 14:07:36 2014 +0100
765+summary: health : Shortcut to the Institution Wards from the center
766+
767+changeset: 1278:079561e5034a
768+user: Luis Falcon <falcon@gnu.org>
769+date: Tue Jun 03 14:05:30 2014 +0100
770+summary: health : Shortcut to the Institution Units from the center
771+
772+changeset: 1277:60a354259152
773+user: Luis Falcon <falcon@gnu.org>
774+date: Tue Jun 03 13:54:04 2014 +0100
775+summary: health : Remove old domains from health institutions
776+
777+changeset: 1276:ef42df1ea725
778+user: Luis Falcon <falcon@gnu.org>
779+date: Tue Jun 03 13:49:35 2014 +0100
780+summary: health : Now link Wards, Operating Rooms, Units and Buildings to the institution model
781+
782+changeset: 1275:29f10ed88941
783+user: Luis Falcon <falcon@gnu.org>
784+date: Tue Jun 03 13:44:20 2014 +0100
785+summary: health : Shortcut from Institution to health center buildings
786+
787+changeset: 1274:97a507dfa709
788+user: Luis Falcon <falcon@gnu.org>
789+date: Tue Jun 03 13:32:25 2014 +0100
790+summary: health : fix infusion field in medication model
791+
792+changeset: 1273:acec599933f7
793+user: Luis Falcon <falcon@gnu.org>
794+date: Sat May 31 11:21:06 2014 +0100
795+summary: health : add fields related to infusion in medication
796+
797+changeset: 1272:2cf43335554b
798+user: Luis Falcon <falcon@gnu.org>
799+date: Tue May 27 11:32:31 2014 +0100
800+summary: crytpo plugin : Initial documentation process
801+
802+changeset: 1271:d2ab7ef9836a
803+user: Luis Falcon <falcon@gnu.org>
804+date: Mon May 26 19:41:16 2014 +0100
805+summary: crypto plugin : Verify document for a valid digital signature
806+
807+changeset: 1270:ab338004d260
808+user: Luis Falcon <falcon@gnu.org>
809+date: Mon May 26 17:17:03 2014 +0100
810+summary: crypto plugin : PEP8
811+
812+changeset: 1269:3d879fb67268
813+user: Luis Falcon <falcon@gnu.org>
814+date: Fri May 23 16:19:33 2014 +0100
815+summary: crypto plugin : Fix exception handling in signature generation
816+
817+changeset: 1268:62c6e71db513
818+user: Luis Falcon <falcon@gnu.org>
819+date: Fri May 23 15:32:47 2014 +0100
820+summary: crypto plugin : Clearsign document validation
821+
822+changeset: 1267:548c62d00c50
823+user: Luis Falcon <falcon@gnu.org>
824+date: Fri May 23 12:15:30 2014 +0100
825+summary: crypto plugin : Prioritize single record selection check
826+
827+changeset: 1266:712c260c22df
828+user: Luis Falcon <falcon@gnu.org>
829+date: Fri May 23 12:13:39 2014 +0100
830+summary: crypto plugin : Check for document signature
831+
832+changeset: 1265:82a7cfe6ea5e
833+user: Luis Falcon <falcon@gnu.org>
834+date: Fri May 23 10:47:42 2014 +0100
835+summary: crypto plugin : Check current model document to handle digital signatures
836+
837+changeset: 1264:db78468f2c49
838+user: Luis Falcon <falcon@gnu.org>
839+date: Thu May 22 13:34:53 2014 +0100
840+summary: crypto plugin, health_crypto : Include and save the generated digital signature on the document
841+
842+changeset: 1263:fe3398811873
843+user: Luis Falcon <falcon@gnu.org>
844+date: Wed May 21 11:23:31 2014 +0100
845+summary: crypto_plugin : Initial plugin commit for Tryton / GNU Health client
846+
847+changeset: 1262:faab8964318f
848+user: Luis Falcon <falcon@gnu.org>
849+date: Wed May 21 00:54:31 2014 +0100
850+summary: health_crypto : Fix prescription line and add notes to the serial doc
851+
852+changeset: 1261:23f37874ecb9
853+user: Luis Falcon <falcon@gnu.org>
854+date: Mon May 19 11:11:06 2014 +0100
855+summary: health_crypto : Verification and side-by-side comparison on Prescription Order
856+
857+changeset: 1260:be7cbff28959
858+user: Luis Falcon <falcon@gnu.org>
859+date: Wed May 14 13:24:17 2014 +0100
860+summary: health_crypto : Initial function for document digest verification
861+
862+changeset: 1259:27f134a91d7f
863+user: Luis Falcon <falcon@gnu.org>
864+date: Thu May 08 17:29:45 2014 +0100
865+summary: health_crypto : improve prescription generation view layout
866+
867+changeset: 1258:b10e9665891c
868+user: Luis Falcon <falcon@gnu.org>
869+date: Thu May 08 16:57:21 2014 +0100
870+summary: health_crypto : change button to generate prescription
871+
872+changeset: 1257:4c5b6def7661
873+user: Luis Falcon <falcon@gnu.org>
874+date: Wed May 07 21:10:40 2014 +0100
875+summary: health_crypto : generate document serialization and digest for prescription document in read-only field
876+
877+changeset: 1256:9c9033c9804d
878+user: Luis Falcon <falcon@gnu.org>
879+date: Mon May 05 20:47:59 2014 +0100
880+summary: health_crypto : JSON data seralization
881+
882+changeset: 1255:57e66630d3c3
883+user: Luis Falcon <falcon@gnu.org>
884+date: Sat May 03 13:58:33 2014 +0100
885+summary: health_crypto : Create main HealthCrypto class and add serialization and hash functions
886+
887+changeset: 1254:79b574313e35
888+user: Luis Falcon <falcon@gnu.org>
889+date: Fri May 02 16:48:22 2014 +0100
890+summary: health_crypto: Init module structure
891+
892+changeset: 1253:ab08e290f8fb
893+user: Luis Falcon <falcon@gnu.org>
894+date: Sat Apr 19 12:26:06 2014 +0200
895+summary: health : Add Operational Sectors to Health institutions
896+
897+changeset: 1252:76cc8dd79985
898+user: Luis Falcon <falcon@gnu.org>
899+date: Sat Apr 19 11:46:23 2014 +0200
900+summary: health : Unify menus Health Centers -> Institutions
901+
902+changeset: 1251:a3bf2ea71ce1
903+parent: 1249:a2a9d32b8dac
904+user: Luis Falcon <falcon@gnu.org>
905+date: Sat Apr 19 11:36:03 2014 +0200
906+summary: health: apply fix 1187 to development version
907+
908+changeset: 1250:c4a83c58a22b
909+branch: stable
910+parent: 1187:b161a0485e7a
911+user: Luis Falcon <falcon@gnu.org>
912+date: Sat Apr 19 11:09:16 2014 +0200
913+summary: health : Fix medicament category domain False -> None
914+
915+changeset: 1249:a2a9d32b8dac
916+user: Luis Falcon <falcon@gnu.org>
917+date: Sat Apr 19 11:06:08 2014 +0200
918+summary: FHIR backend: update version and Development Status
919+
920+changeset: 1248:f8ebc4b4901f
921+user: Luis Falcon <falcon@gnu.org>
922+date: Thu Apr 17 23:32:45 2014 +0200
923+summary: FHIR backend : add version file and update credits
924+
925+changeset: 1247:7858144c6d31
926+user: Luis Falcon <falcon@gnu.org>
927+date: Wed Apr 16 11:49:34 2014 +0200
928+summary: FHIR backend : Add version file
929+
930+changeset: 1246:ea895f38133a
931+user: Luis Falcon <falcon@gnu.org>
932+date: Sat Apr 12 11:01:46 2014 +0200
933+summary: FHIR backend : Chris Zimmerman . update README to show params is dictionary
934+
935+changeset: 1245:4b5a0a615d6e
936+user: Luis Falcon <falcon@gnu.org>
937+date: Sat Apr 12 10:59:50 2014 +0200
938+summary: FHIR backend : Chris Zimmerman . params is dictionary now --> use requests params argument
939+
940+changeset: 1244:637e9ddb860c
941+user: Luis Falcon <falcon@gnu.org>
942+date: Sat Apr 12 10:58:48 2014 +0200
943+summary: FHIR backend : Chris Zimmerman . Add basic validation to XML and JSON body arguments
944+
945+changeset: 1243:f34b82303d6f
946+user: Luis Falcon <falcon@gnu.org>
947+date: Sun Apr 06 16:26:42 2014 +0100
948+summary: health: Add constraint for uniqness in Health Institutions
949+
950+changeset: 1242:4c6b44a875cf
951+user: Luis Falcon <falcon@gnu.org>
952+date: Fri Apr 04 22:36:08 2014 +0100
953+summary: FHIR commit : Update README file and commit patches from Chris Zimmerman
954+
955+changeset: 1241:3af14b724861
956+user: Luis Falcon <falcon@gnu.org>
957+date: Sun Mar 30 22:42:04 2014 -0300
958+summary: health : add trauma center attribute to the Health Institution model
959+
960+changeset: 1240:42dc857e76fa
961+user: Luis Falcon <falcon@gnu.org>
962+date: Sun Mar 30 21:38:40 2014 -0300
963+summary: health : add institution type to Health Insitution tree view
964+
965+changeset: 1239:27b72e69478c
966+user: Luis Falcon <falcon@gnu.org>
967+date: Sun Mar 30 21:34:03 2014 -0300
968+summary: health : Add heliport to health institution
969+
970+changeset: 1238:a137ac0223ab
971+user: Luis Falcon <falcon@gnu.org>
972+date: Sun Mar 30 01:15:52 2014 -0300
973+summary: FHIR backend : Add CREDITS file to MANIFEST.in
974+
975+changeset: 1237:87df3811df4c
976+user: Luis Falcon <falcon@gnu.org>
977+date: Sun Mar 30 01:12:36 2014 -0300
978+summary: FHIR backend : Fix typo in description
979+
980+changeset: 1236:b4a843ea427a
981+user: Luis Falcon <falcon@gnu.org>
982+date: Sun Mar 30 01:11:16 2014 -0300
983+summary: FHIR backend : Update version to 0.0.3
984+
985+changeset: 1235:205e382df5f0
986+user: Luis Falcon <falcon@gnu.org>
987+date: Sun Mar 30 01:05:19 2014 -0300
988+summary: FHIR backend : Update README file with same demo data as in GNU Health for Ana Betz
989+
990+changeset: 1234:4a061be56aeb
991+user: Luis Falcon <falcon@gnu.org>
992+date: Sat Mar 29 22:50:03 2014 -0300
993+summary: FHIR backend : assign default value to body argument
994+
995+changeset: 1233:03b306c54214
996+user: Luis Falcon <falcon@gnu.org>
997+date: Sat Mar 29 20:03:37 2014 -0300
998+summary: FHIR backend : Chris Zimmerman adds validate, vread and history resources
999+
1000+changeset: 1232:5bd3e2814cad
1001+user: Luis Falcon <falcon@gnu.org>
1002+date: Sat Mar 29 19:51:51 2014 -0300
1003+summary: FHIR backend : add headers in create method for XML or JSON formats
1004+
1005+changeset: 1231:7e6753be6da3
1006+user: Luis Falcon <falcon@gnu.org>
1007+date: Sat Mar 29 17:23:09 2014 -0300
1008+summary: FHIR backend : fix url by fhir_request on create method
1009+
1010+changeset: 1230:5d0a5d904c93
1011+user: Luis Falcon <falcon@gnu.org>
1012+date: Sat Mar 29 16:47:43 2014 -0300
1013+summary: FHIR backend : Add CREDITS file
1014+
1015+changeset: 1229:02f8069ac4b7
1016+user: Luis Falcon <falcon@gnu.org>
1017+date: Sat Mar 29 10:22:05 2014 -0300
1018+summary: FHIR backend : Added create / update / delete conformance and transaction interactions. Thank you Chris at riseup !
1019+
1020+changeset: 1228:9e45e68c8afa
1021+user: Luis Falcon <falcon@gnu.org>
1022+date: Fri Mar 28 20:58:56 2014 -0300
1023+summary: health : add Health Institution specialties - name, specialty - in a separate Class
1024+
1025+changeset: 1227:00e6ee14303c
1026+user: Luis Falcon <falcon@gnu.org>
1027+date: Sun Mar 23 22:43:36 2014 -0300
1028+summary: health : Include rules for main specialty and make read only the institution field once this is saved
1029+
1030+changeset: 1226:f7656fd1eaaf
1031+user: Luis Falcon <falcon@gnu.org>
1032+date: Sun Mar 23 21:16:08 2014 -0300
1033+summary: health : General hospital and Specialized institutions
1034+
1035+changeset: 1225:0ff9e9d1caaa
1036+user: Luis Falcon <falcon@gnu.org>
1037+date: Sun Mar 23 21:13:21 2014 -0300
1038+summary: health : Add teaching attribute to health institutions
1039+
1040+changeset: 1224:f7243bd018b9
1041+user: Luis Falcon <falcon@gnu.org>
1042+date: Sun Mar 23 20:10:44 2014 -0300
1043+summary: health: make tree editable on Institution Specialties. Improve view
1044+
1045+changeset: 1223:e7cb6e900556
1046+user: Luis Falcon <falcon@gnu.org>
1047+date: Sun Mar 23 11:35:09 2014 -0300
1048+summary: health : Make readonly the specialties associated to the view on the health facility
1049+
1050+changeset: 1222:4ee299e0bd9f
1051+user: Luis Falcon <falcon@gnu.org>
1052+date: Sat Mar 22 18:41:38 2014 -0300
1053+summary: health : Place Health instituions in main menu
1054+
1055+changeset: 1221:a605bb914caa
1056+user: Luis Falcon <falcon@gnu.org>
1057+date: Sat Mar 22 17:26:00 2014 -0300
1058+summary: health : Add Health departments / specialties by institution
1059+
1060+changeset: 1220:415366ae4c9a
1061+user: Luis Falcon <falcon@gnu.org>
1062+date: Fri Mar 21 22:20:54 2014 -0300
1063+summary: health : add health institution type and picture to the model
1064+
1065+changeset: 1219:548f77688d0f
1066+user: Luis Falcon <falcon@gnu.org>
1067+date: Fri Mar 21 21:11:43 2014 -0300
1068+summary: health : health institution model to permit specs / details of the health center
1069+
1070+changeset: 1218:b8cd08f9594f
1071+user: Luis Falcon <falcon@gnu.org>
1072+date: Thu Mar 20 17:29:35 2014 -0300
1073+summary: healt_archives: Initial module upload. Functionality for paper health record archives management
1074+
1075+changeset: 1217:c79d9ca9c338
1076+user: Luis Falcon <falcon@gnu.org>
1077+date: Mon Mar 17 18:51:43 2014 -0300
1078+summary: health : Make default activation date for the party creation
1079+
1080+changeset: 1216:90033c4d52f1
1081+user: Luis Falcon <falcon@gnu.org>
1082+date: Mon Mar 17 18:14:28 2014 -0300
1083+summary: health : Add submenu People in the party section
1084+
1085+changeset: 1215:a99dde792b37
1086+user: Luis Falcon <falcon@gnu.org>
1087+date: Sun Mar 16 18:17:03 2014 -0300
1088+summary: health : add SSN to the general search in the party model
1089+
1090+changeset: 1214:d60b8db4102b
1091+user: Luis Falcon <falcon@gnu.org>
1092+date: Sun Mar 16 17:50:56 2014 -0300
1093+summary: health: Optimize tree view for party
1094+
1095+changeset: 1213:3a602a4d58d9
1096+user: Luis Falcon <falcon@gnu.org>
1097+date: Sun Mar 16 17:36:29 2014 -0300
1098+summary: health : use the SSN as the main code to search in the party. Code is still available in the filter
1099+
1100+changeset: 1212:acbdd7740b3e
1101+user: Luis Falcon <falcon@gnu.org>
1102+date: Sun Mar 16 17:15:29 2014 -0300
1103+summary: health : resize picture group in the party form
1104+
1105+changeset: 1211:74efdd552265
1106+user: Luis Falcon <falcon@gnu.org>
1107+date: Sun Mar 16 16:12:50 2014 -0300
1108+summary: health : Place internal user associated to the health professional at the party form footer
1109+
1110+changeset: 1210:2e2f8960359c
1111+user: Luis Falcon <falcon@gnu.org>
1112+date: Sun Mar 16 16:05:05 2014 -0300
1113+summary: health : place the alternative identification codes inside the demographics group
1114+
1115+changeset: 1209:c88dd05f5ab4
1116+user: Luis Falcon <falcon@gnu.org>
1117+date: Sun Mar 16 15:49:20 2014 -0300
1118+summary: health : use the SSN field in the place of the party code when the party is a person
1119+
1120+changeset: 1208:fbf27880bc83
1121+user: Luis Falcon <falcon@gnu.org>
1122+date: Sun Mar 16 12:27:24 2014 -0300
1123+summary: health : improve party view
1124+
1125+changeset: 1207:008b7f790bec
1126+user: Luis Falcon <falcon@gnu.org>
1127+date: Wed Mar 12 12:50:00 2014 +0000
1128+summary: FHIR backend : Include basic REST read interaction functionality
1129+
1130+changeset: 1206:acf7ff26b045
1131+user: Luis Falcon <falcon@gnu.org>
1132+date: Wed Mar 12 12:11:45 2014 +0000
1133+summary: FHIR backend : PEP8
1134+
1135+changeset: 1205:4e006c6ab4e7
1136+user: Luis Falcon <falcon@gnu.org>
1137+date: Wed Mar 12 10:40:14 2014 +0000
1138+summary: pediatrics : Newborn improvement in form and tree
1139+
1140+changeset: 1204:ba0e5c65aaa1
1141+user: Luis Falcon <falcon@gnu.org>
1142+date: Wed Mar 12 10:14:11 2014 +0000
1143+summary: pediatrics : improve field descriptions
1144+
1145+changeset: 1203:83c339a1fd72
1146+user: Luis Falcon <falcon@gnu.org>
1147+date: Mon Mar 10 20:41:05 2014 +0000
1148+summary: pediatrics : Improve newborn view
1149+
1150+changeset: 1202:072ed3c73ffc
1151+user: Luis Falcon <falcon@gnu.org>
1152+date: Mon Mar 10 19:46:26 2014 +0000
1153+summary: pediatrics : Newborn view. Show only newborn sex - gender at birth - current sex is a patient property
1154+
1155+changeset: 1201:11a3990bc71c
1156+user: Luis Falcon <falcon@gnu.org>
1157+date: Mon Mar 10 19:24:08 2014 +0000
1158+summary: pediatrics : Fix tooltip on the newborn length
1159+
1160+changeset: 1200:d09aaf0b27ae
1161+user: Luis Falcon <falcon@gnu.org>
1162+date: Mon Mar 10 19:22:30 2014 +0000
1163+summary: pediatrics : improve main view layout
1164+
1165+changeset: 1199:6b3f6a58eff2
1166+user: Luis Falcon <falcon@gnu.org>
1167+date: Sun Mar 09 18:15:03 2014 +0000
1168+summary: FHIR modules . Correct setup.py
1169+
1170+changeset: 1198:085847c057fd
1171+user: Luis Falcon <falcon@gnu.org>
1172+date: Sun Mar 09 00:58:05 2014 +0000
1173+summary: FHIR backend : remove extra pot file
1174+
1175+changeset: 1197:5abcd1c80947
1176+user: Luis Falcon <falcon@gnu.org>
1177+date: Sun Mar 09 00:57:07 2014 +0000
1178+summary: fhir : initial POC of HL7 FHIR reference implementation for python and GNU Health backend
1179+
1180+changeset: 1196:cf6d9fcb100d
1181+user: Luis Falcon <falcon@gnu.org>
1182+date: Sat Mar 08 13:48:59 2014 +0000
1183+summary: FHIR : Initial structure for FHIR and the FHIR patient resource
1184+
1185+changeset: 1195:6149f66e2c90
1186+user: Luis Falcon <falcon@gnu.org>
1187+date: Fri Mar 07 12:41:47 2014 +0000
1188+summary: pediatrics : update menuitem sequence on newborn
1189+
1190+changeset: 1194:13a66db9d905
1191+user: Luis Falcon <falcon@gnu.org>
1192+date: Fri Mar 07 12:00:46 2014 +0000
1193+summary: pediatrics : rename shortcut from Newborn to Neonatal Info
1194+
1195+changeset: 1193:626212d43da6
1196+user: Luis Falcon <falcon@gnu.org>
1197+date: Wed Mar 05 17:19:32 2014 +0000
1198+summary: installer : fix space in script for custom / local modules
1199+
1200+changeset: 1192:2ed937ac77d5
1201+user: Luis Falcon <falcon@gnu.org>
1202+date: Wed Mar 05 17:16:39 2014 +0000
1203+summary: installer : add directory for custom modules
1204+
1205+changeset: 1191:c3e478ccf4a9
1206+user: Luis Falcon <falcon@gnu.org>
1207+date: Fri Feb 14 10:21:29 2014 +0000
1208+summary: health_inpatient : fix health professional display on the patient discharge
1209+
1210+changeset: 1190:d0ff73a85e3c
1211+user: Luis Falcon <falcon@gnu.org>
1212+date: Wed Feb 19 11:55:06 2014 +0000
1213+summary: Fix bug #41639: Traceback when opening the Disease Categories
1214+
1215+changeset: 1189:67811a8fca1c
1216+user: Luis Falcon <falcon@gnu.org>
1217+date: Wed Mar 05 16:59:20 2014 +0000
1218+summary: health : apply patch 1187:b161a0485e7a into dev
1219+
1220+changeset: 1188:1e2d49d5bfd7
1221+parent: 1178:83f26d207cb0
1222+user: Luis Falcon <falcon@gnu.org>
1223+date: Wed Mar 05 16:38:48 2014 +0000
1224+summary: health: update development version number to 2.5
1225+
1226+changeset: 1187:b161a0485e7a
1227+branch: stable
1228+user: Luis Falcon <falcon@gnu.org>
1229+date: Mon Feb 24 13:52:29 2014 +0000
1230+summary: health : include the patient code in the search criteria
1231+
1232+changeset: 1186:f198d935ae95
1233+branch: stable
1234+user: Luis Falcon <falcon@gnu.org>
1235+date: Wed Feb 19 11:55:06 2014 +0000
1236+summary: Fix bug #41639: Traceback when opening the Disease Categories
1237+
1238+changeset: 1185:05b61a6043da
1239+branch: stable
1240+user: Luis Falcon <falcon@gnu.org>
1241+date: Wed Feb 19 10:06:57 2014 +0000
1242+summary: Added tag 2.4.1 for changeset 762258ba657e
1243+
1244+changeset: 1184:762258ba657e
1245+branch: stable
1246+tag: 2.4.1
1247+user: Luis Falcon <falcon@gnu.org>
1248+date: Sun Feb 16 07:59:43 2014 +0000
1249+summary: Update Changelog file
1250+
1251+changeset: 1183:095c3709dc8a
1252+branch: stable
1253+user: Luis Falcon <falcon@gnu.org>
1254+date: Sun Feb 16 07:59:07 2014 +0000
1255+summary: Removed tag 2.4.1
1256+
1257 changeset: 1182:6b452268a2a5
1258 branch: stable
1259-tag: tip
1260 user: Luis Falcon <falcon@gnu.org>
1261 date: Fri Feb 14 10:21:29 2014 +0000
1262 summary: health_inpatient : fix health professional display on the patient discharge
1263@@ -13,7 +1264,6 @@
1264
1265 changeset: 1180:bcaa9fe707d2
1266 branch: stable
1267-tag: 2.4.1
1268 user: Luis Falcon <falcon@gnu.org>
1269 date: Mon Feb 10 04:01:07 2014 +0000
1270 summary: create 2.4.1 version
1271@@ -62,8 +1312,8 @@
1272 date: Sun Jan 26 22:54:38 2014 +0000
1273 summary: health, health_history : Update report and fix bug on date
1274
1275-
1276 changeset: 1171:c53a5d589516
1277+tag: tip
1278 user: Luis Falcon <falcon@gnu.org>
1279 date: Sun Jan 26 21:28:04 2014 +0000
1280 summary: installer : update header
1281
1282=== added directory 'backend'
1283=== added directory 'backend/plugins'
1284=== added directory 'backend/plugins/crypto'
1285=== added file 'backend/plugins/crypto/__init__.py'
1286--- backend/plugins/crypto/__init__.py 1970-01-01 00:00:00 +0000
1287+++ backend/plugins/crypto/__init__.py 2014-07-17 21:57:19 +0000
1288@@ -0,0 +1,179 @@
1289+# -*- coding: utf-8 -*-
1290+##############################################################################
1291+#
1292+# GNU Health: The Free Health and Hospital Information System
1293+# Copyright (C) 2008-2014 Luis Falcon <lfalcon@gnusolidario.org>
1294+# Copyright (C) 2011-2014 GNU Solidario <health@gnusolidario.org>
1295+#
1296+#
1297+# This program is free software: you can redistribute it and/or modify
1298+# it under the terms of the GNU General Public License as published by
1299+# the Free Software Foundation, either version 3 of the License, or
1300+# (at your option) any later version.
1301+#
1302+# This program is distributed in the hope that it will be useful,
1303+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1304+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1305+# GNU General Public License for more details.
1306+#
1307+# You should have received a copy of the GNU General Public License
1308+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1309+#
1310+##############################################################################
1311+
1312+import tryton.rpc as rpc
1313+from tryton.common import RPCExecute, warning, message
1314+from tryton.gui.window.form import Form
1315+import gettext
1316+
1317+try:
1318+ import gnupg
1319+except:
1320+ warning(
1321+ ('Document Encryption / Signing disabled'
1322+ '\nPlease install the gnupg library '),
1323+ ('No GNU Privacy Guard library found !'),
1324+ )
1325+
1326+
1327+_ = gettext.gettext
1328+
1329+def sign_document(data):
1330+ """ Retrieve the hash value of the serialized document and
1331+ generates a clearsign signature using the user's private key
1332+ on the client side via GNU Privacy Guard - GPG -"""
1333+
1334+ gpg = gnupg.GPG()
1335+
1336+ document_model = data['model']
1337+
1338+ """ Don't allow signing more than one document at a time
1339+ To avoid signing unwanted / unread documents
1340+ """
1341+
1342+ if (len(data['ids']) > 1):
1343+ warning(
1344+ _('For security reasons, Please sign one document at a time'),
1345+ _('Multiple records selected !'),
1346+ )
1347+ return
1348+
1349+ """ Verify that the document handles digital signatures """
1350+
1351+ try:
1352+ record_vals = rpc.execute(
1353+ 'model', document_model, 'read',
1354+ data['ids'],
1355+ ['document_digest', 'digital_signature'], rpc.CONTEXT)
1356+
1357+ except:
1358+ warning(
1359+ _('Please enable the model for digital signature'),
1360+ _('No Digest or Digital Signature fields found !'),
1361+ )
1362+ return
1363+
1364+ digest = record_vals[0]['document_digest']
1365+
1366+ """ Check that the document hasn't been signed already """
1367+
1368+ if record_vals[0]['digital_signature']:
1369+ warning(
1370+ _('Document already signed'),
1371+ _('This record has been already signed'),
1372+ )
1373+ return
1374+
1375+ try:
1376+ gpg_signature = gpg.sign(digest, clearsign=True)
1377+
1378+ except:
1379+ warning(
1380+ _('Error when signing the document'),
1381+ _('Please check your encryption settings'),
1382+ )
1383+
1384+ """
1385+ Set the clearsigned digest
1386+ """
1387+ try:
1388+ RPCExecute(
1389+ 'model', document_model, 'set_signature',
1390+ data, str(gpg_signature))
1391+
1392+ except:
1393+ warning(
1394+ _('Error when saving the digital signature'),
1395+ _('The signature was generated but NOT saved !'),
1396+ )
1397+
1398+ else:
1399+ message(_('Document digitally signed'))
1400+
1401+ # TODO
1402+ # Reload the record view after storing the digital signature
1403+ # sig_reload or other method to check.
1404+ # a = Form(document_model, data['ids'])
1405+ # a.sig_reload()
1406+ # a.message_info(_('Document digitally signed'), color='blue')
1407+
1408+
1409+def verify_document(data):
1410+ """ Verify the digital signature of the document """
1411+
1412+ gpg = gnupg.GPG()
1413+
1414+ document_model = data['model']
1415+
1416+ """ Verify that the document handles digital signatures """
1417+
1418+ try:
1419+ record_vals = rpc.execute(
1420+ 'model', document_model, 'read',
1421+ data['ids'],
1422+ ['document_digest', 'digital_signature'], rpc.CONTEXT)
1423+
1424+ except:
1425+ warning(
1426+ _('Please enable the model for digital signature'),
1427+ _('No Digest or Digital Signature fields found !'),
1428+ )
1429+ return
1430+
1431+
1432+ """ Verify signature """
1433+ digital_signature = record_vals[0]['digital_signature']
1434+
1435+ """ Check that the document has been signed """
1436+ if not digital_signature:
1437+ warning(
1438+ _('Unsigned document'),
1439+ _('This document has not been signed yet'),
1440+ )
1441+ return
1442+
1443+ try:
1444+ verify_signature = gpg.verify(digital_signature)
1445+
1446+ except:
1447+ warning(
1448+ _('Error when verifying Digital Signature'),
1449+ _('Please check your GNU Privacy Guard Settings'),
1450+ )
1451+
1452+ else:
1453+ """ Show message of warning boxes depending on the verification """
1454+ if (verify_signature.valid):
1455+ message(_("Valid Signature !\n\n" + verify_signature.stderr))
1456+ else:
1457+ warning(
1458+ _(str(verify_signature.stderr)),
1459+ _(str("Error !")),
1460+ )
1461+
1462+
1463+def get_plugins(model):
1464+ return [
1465+ (_('Digitally Sign Document'), sign_document),
1466+ (_('Verify Digital Signature'), verify_document),
1467+ ]
1468
1469=== added directory 'backend/plugins/crypto/doc'
1470=== added file 'backend/plugins/crypto/doc/index.rst'
1471--- backend/plugins/crypto/doc/index.rst 1970-01-01 00:00:00 +0000
1472+++ backend/plugins/crypto/doc/index.rst 2014-07-17 21:57:19 +0000
1473@@ -0,0 +1,33 @@
1474+Tryton Crytpo Plugin
1475+####################
1476+
1477+This plugin has been developed as part of GNU Health [1], but you should
1478+be able to use it with any model in Tryton[2]
1479+
1480+Functionality :
1481+The Tryton crypto plugin interacts with GNU Privacy Guard [3] to digitally
1482+sign and encrypt documents.
1483+
1484+OS Requirements:
1485+
1486+Model attributes :
1487+The plugin requires - as a minimum - the following attributes on the model
1488+in order to be able to sign the document.
1489+
1490+ "document_digest" of type fields.Char
1491+ "digital_signature" of type fields.Text
1492+
1493+
1494+In real life, you will need others to make it meaningful. Please take a look
1495+at the Prescription model on the health_crypto module for an example and
1496+other fields used.
1497+
1498+
1499+
1500+Usage:
1501+
1502+References:
1503+
1504+1.- GNU Health : http://health.gnu.org
1505+2.- Tryton : http://www.tryton.org
1506+3.- GNU Privacy Guard : http://www.gnupg.org
1507
1508=== modified file 'debian/changelog'
1509--- debian/changelog 2014-03-01 22:45:36 +0000
1510+++ debian/changelog 2014-07-17 21:57:19 +0000
1511@@ -1,3 +1,10 @@
1512+gnuhealth (2.6.0-0ubuntu1) utopic; urgency=medium
1513+
1514+ * New upstream release.
1515+ * Use tryton 3.2.x
1516+
1517+ -- Jackson Doak <noskcaj@ubuntu.com> Fri, 18 Jul 2014 07:37:19 +1000
1518+
1519 gnuhealth (2.4.1-2) unstable; urgency=low
1520
1521 * Use su instead of sudo to run commands as gnuhealth user (Closes: #739657)
1522
1523=== modified file 'debian/control'
1524--- debian/control 2014-01-27 08:27:26 +0000
1525+++ debian/control 2014-07-17 21:57:19 +0000
1526@@ -1,5 +1,6 @@
1527 Source: gnuhealth
1528-Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
1529+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
1530+XSBC-Original-Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
1531 Uploaders: Andreas Tille <tille@debian.org>,
1532 Emilien Klein <emilien+debian@klein.st>
1533 Section: science
1534@@ -8,8 +9,8 @@
1535 autotools-dev,
1536 python | python-all | python-dev | python-all-dev,
1537 python (<< 3.0) | python-all (<< 3.0) | python-dev (<< 3.0) | python-all-dev (<< 3.0),
1538- tryton-server (>= 3.0~),
1539- tryton-server (<< 3.1~)
1540+ tryton-server (>= 3.2~),
1541+ tryton-server (<< 3.3~)
1542 Standards-Version: 3.9.5
1543 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/gnuhealth/trunk/
1544 Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/gnuhealth/trunk/
1545@@ -33,28 +34,28 @@
1546 python-psycopg2,
1547 python-webdav,
1548 postgresql,
1549- tryton-server (>= 3.0~),
1550- tryton-server (<< 3.1~),
1551- tryton-modules-account (>= 3.0~),
1552- tryton-modules-account (<< 3.1~),
1553- tryton-modules-account-invoice (>= 3.0~),
1554- tryton-modules-account-invoice (<< 3.1~),
1555- tryton-modules-account-product (>= 3.0~),
1556- tryton-modules-account-product (<< 3.1~),
1557- tryton-modules-calendar (>= 3.0~),
1558- tryton-modules-calendar (<< 3.1~),
1559- tryton-modules-product (>= 3.0~),
1560- tryton-modules-product (<< 3.1~),
1561- tryton-modules-country (>= 3.0~),
1562- tryton-modules-country (<< 3.1~),
1563- tryton-modules-currency (>= 3.0~),
1564- tryton-modules-currency (<< 3.1~),
1565- tryton-modules-party (>= 3.0~),
1566- tryton-modules-party (<< 3.1~),
1567- tryton-modules-company (>= 3.0~),
1568- tryton-modules-company (<< 3.1~),
1569+ tryton-server (>= 3.2~),
1570+ tryton-server (<< 3.3~),
1571+ tryton-modules-account (>= 3.2~),
1572+ tryton-modules-account (<< 3.3~),
1573+ tryton-modules-account-invoice (>= 3.2~),
1574+ tryton-modules-account-invoice (<< 3.3~),
1575+ tryton-modules-account-product (>= 3.2~),
1576+ tryton-modules-account-product (<< 3.3~),
1577+ tryton-modules-calendar (>= 3.2~),
1578+ tryton-modules-calendar (<< 3.3~),
1579+ tryton-modules-product (>= 3.2~),
1580+ tryton-modules-product (<< 3.3~),
1581+ tryton-modules-country (>= 3.2~),
1582+ tryton-modules-country (<< 3.3~),
1583+ tryton-modules-currency (>= 3.2~),
1584+ tryton-modules-currency (<< 3.3~),
1585+ tryton-modules-party (>= 3.2~),
1586+ tryton-modules-party (<< 3.3~),
1587+ tryton-modules-company (>= 3.2~),
1588+ tryton-modules-company (<< 3.3~),
1589 tryton-modules-stock-lot,
1590- tryton-modules-stock-lot (<< 3.1~)
1591+ tryton-modules-stock-lot (<< 3.3~)
1592 Recommends: postgresql-client
1593 Description: Electronic Medical Record and Hospital Information System - Server
1594 GNU Health is a multi-user, highly scalable, centralized Electronic
1595@@ -91,8 +92,8 @@
1596 Architecture: all
1597 Depends: ${python:Depends},
1598 ${misc:Depends},
1599- tryton-client (>= 3.0~),
1600- tryton-client (<< 3.1~)
1601+ tryton-client (>= 3.2~),
1602+ tryton-client (<< 3.3~)
1603 Description: Electronic Medical Record and Hospital Information System - Client
1604 GNU Health is a multi-user, highly scalable, centralized Electronic
1605 Medical Record (EMR) and Hospital Information System (HIS) for Tryton,
1606
1607=== modified file 'gnuhealth_install.sh'
1608--- gnuhealth_install.sh 2014-01-27 08:27:26 +0000
1609+++ gnuhealth_install.sh 2014-07-17 21:57:19 +0000
1610@@ -1,7 +1,7 @@
1611 #!/bin/bash
1612
1613 # GNU Health installer
1614-# Version for 2.4 series
1615+# Version for 2.6 series
1616
1617 ##############################################################################
1618 #
1619@@ -24,9 +24,9 @@
1620 #
1621 ##############################################################################
1622
1623-#
1624-# Main functions/variables declaration
1625-#
1626+#-----------------------------------------------------------------------------
1627+# Variables declaration
1628+#-----------------------------------------------------------------------------
1629
1630 # Colors constants
1631 NONE="$(tput sgr0)"
1632@@ -35,7 +35,17 @@
1633 YELLOW="\n$(tput setaf 3)"
1634 BLUE="\n$(tput setaf 4)"
1635
1636+# Params
1637 INSTDIR="$PWD"
1638+GNUHEALTH_INST_DIR="$PWD"
1639+GNUHEALTH_VERSION=$(cat version)
1640+TRYTON_VERSION="3.2"
1641+TRYTON_BASE_URL="http://downloads.tryton.org"
1642+
1643+
1644+#-----------------------------------------------------------------------------
1645+# Functions
1646+#-----------------------------------------------------------------------------
1647
1648 message () {
1649 # $1 : Message
1650@@ -49,23 +59,23 @@
1651
1652 check_requirements() {
1653 # WGET command
1654- message "[INFO] CHECKING REQUIREMENTS" ${BLUE}
1655- message "Looking for wget...." ${BLUE}
1656+ message "[INFO] Checking requirements" ${BLUE}
1657+ echo -n " -> Looking for wget... "
1658
1659 if ! type wget 2>/dev/null ; then
1660 message "[ERROR] wget command not found. Please install it or check your PATH variable" ${RED}
1661 exit 1
1662 fi
1663
1664- # PYTHON version [2.6.x < 3.x]
1665- message "Looking for the Python Interpreter command..." ${BLUE}
1666+ # PYTHON version [2.7.x < 3.x]
1667+ echo -n " -> Looking for the Python Interpreter command... "
1668
1669 if ! type python 2>/dev/null ; then
1670 message "[ERROR] Python interpreter not found. Please install it or check your PATH variable." ${RED}
1671 exit 1
1672 fi
1673
1674- local PVERSION=`python -V 2>&1 | grep 2.[6-9].[0-9]`
1675+ local PVERSION=$(python -V 2>&1 | grep 2.[7-9].[0-9])
1676
1677 if test "${PVERSION}" ; then
1678 message "[INFO] Found ${PVERSION}" ${BLUE}
1679@@ -75,14 +85,14 @@
1680 exit 1
1681 fi
1682
1683- # PIP COMMAND
1684- message "-> Looking for PIP command..." ${BLUE}
1685+ # PIP command
1686+ echo " -> Looking for PIP command..."
1687
1688 # Alternative pip names on Debian/ArchLinux/RedHat based distros:
1689 local PIP_NAMES="pip pip2 pip-python"
1690 PIP_NAME=""
1691 for NAME in ${PIP_NAMES}; do
1692- if [[ `which ${NAME} 2>/dev/null` ]]; then
1693+ if [[ $(which ${NAME} 2>/dev/null) ]]; then
1694 PIP_NAME=${NAME}
1695 break
1696 fi
1697@@ -92,55 +102,39 @@
1698 message "[ERROR] PIP command not found. Please install it or check your PATH variable." ${RED}
1699 exit 1
1700 fi
1701+
1702+ # Check main operating system
1703+ case "$OSTYPE" in
1704+ freebsd*)
1705+ message "[INFO] Running on FreeBSD" ${GREEN}
1706+ OS="FREEBSD"
1707+ ;;
1708+ linux*)
1709+ message "[INFO] Running on GNU/LINUX" ${GREEN}
1710+ OS="GNULINUX"
1711+ # Check for GNU/Linux Distros
1712+ GNU_LINUX_DISTRO=$(lsb_release -i -s)
1713+ message "[INFO] GNU / Linux distro: $GNU_LINUX_DISTRO" ${GREEN}
1714+ ;;
1715+ *)
1716+ message "[INFO] Running on Other OS: $OSTYPE" ${YELLOW}
1717+ ;;
1718+ esac
1719+
1720 message "[INFO] OK." ${GREEN}
1721 }
1722
1723
1724-install_python_dependencies() {
1725- local PIP_CMD=$(which $PIP_NAME)
1726- local PIP_VERSION="$(${PIP_CMD} --version | awk '{print $2}')"
1727-
1728- # TODO: Change for virtualenv support.
1729- local PIP_ARGS="install --user"
1730-
1731- # Python packages
1732- local PIP_LXML="lxml==3.2.3"
1733- local PIP_RELATORIO="relatorio==0.6.0"
1734- local PIP_DATEUTIL="python-dateutil==2.1"
1735- local PIP_PSYCOPG2="psycopg2==2.5.1"
1736- local PIP_PYTZ="pytz==2013.7"
1737- local PIP_LDAP="python-ldap==2.4.13"
1738- local PIP_VOBJECT="vobject==0.6.6"
1739- local PIP_PYWEBDAV="pywebdav==0.9.8"
1740- local PIP_QRCODE="qrcode==4.0.4"
1741- local PIP_SIX="six==1.4.1"
1742- local PIP_PILLOW="PILLOW==2.3.0"
1743- local PIP_CALDAV="caldav==0.1.12"
1744- local PIP_POLIB="polib==1.0.3"
1745- local PIP_SQL="python-sql==0.2"
1746-
1747- local PIP_PKGS="$PIP_PYTZ $PIP_LXML $PIP_RELATORIO $PIP_DATEUTIL $PIP_PSYCOPG2 $PIP_LDAP $PIP_VOBJECT $PIP_PYWEBDAV $PIP_QRCODE $PIP_SIX $PIP_PILLOW $PIP_CALDAV $PIP_POLIB $PIP_SQL"
1748-
1749- message "[INFO] Installing python dependencies with pip-${PIP_VERSION} ..." ${YELLOW}
1750-
1751-
1752- for PKG in ${PIP_PKGS}; do
1753- message " >> ${PKG}" ${BLUE}
1754- ${PIP_CMD} ${PIP_ARGS} ${PKG} || exit 1
1755- message " >> OK" ${GREEN}
1756- done
1757-}
1758-
1759-
1760 install_directories() {
1761 #
1762 # Temporary/staging area.
1763 #
1764 message "[INFO] Creating temporary directory..." ${YELLOW}
1765
1766+ # global variable
1767 TMP_DIR="/tmp/gnuhealth_installer"
1768
1769- if [ -e ${TMP_DIR} ] ; then
1770+ if [[ -e ${TMP_DIR} ]]; then
1771 message "[ERROR] Directory ${TMP_DIR} exists. You need to delete it." ${RED}
1772 exit 1
1773 else
1774@@ -153,32 +147,164 @@
1775 #
1776 message "[INFO] Creating destination directories..." ${YELLOW}
1777
1778+ # global variables
1779 BASEDIR="$HOME/gnuhealth"
1780 TRYTON_BASEDIR="${BASEDIR}/tryton"
1781 TRYTOND_DIR="${TRYTON_BASEDIR}/server"
1782 MODULES_DIR="${TRYTOND_DIR}/modules"
1783 LOG_DIR="${BASEDIR}/logs"
1784 ATTACH_DIR="${HOME}/attach"
1785-
1786- if [ -e ${BASEDIR} ] ; then
1787+ CUSTOM_MODS_DIR="${MODULES_DIR}/custom"
1788+
1789+ # Create GNU Health directories
1790+ if [[ -e ${BASEDIR} ]]; then
1791 message "[ERROR] Directory ${BASEDIR} exists. You need to delete it." ${RED}
1792 exit 1
1793 else
1794- mkdir -p ${MODULES_DIR} ${LOG_DIR} ${ATTACH_DIR} || exit 1
1795+ mkdir -p ${MODULES_DIR} ${LOG_DIR} ${ATTACH_DIR} ${CUSTOM_MODS_DIR} || exit 1
1796 fi
1797 message "[INFO] OK." ${GREEN}
1798 }
1799
1800
1801+install_python_dependencies() {
1802+ local PIP_CMD=$(which $PIP_NAME)
1803+ local PIP_VERSION="$(${PIP_CMD} --version | awk '{print $2}')"
1804+
1805+ local PIP_ARGS="install --upgrade --user"
1806+
1807+ # Python packages
1808+ local PIP_LXML="lxml==3.3.5"
1809+ local PIP_RELATORIO="relatorio==0.6.0"
1810+ local PIP_DATEUTIL="python-dateutil==2.2"
1811+ local PIP_PSYCOPG2="psycopg2==2.5.3"
1812+ local PIP_PYTZ="pytz==2014.4"
1813+ local PIP_LDAP="python-ldap==2.4.15"
1814+ local PIP_VOBJECT="vobject==0.6.6"
1815+ local PIP_PYWEBDAV="PyWebDAV==0.9.8"
1816+ local PIP_QRCODE="qrcode==5.0.1"
1817+ local PIP_SIX="six==1.7.3"
1818+ local PIP_PILLOW="Pillow==2.4.0"
1819+ local PIP_CALDAV="caldav==0.1.12"
1820+ local PIP_POLIB="polib==1.0.4"
1821+ local PIP_SQL="python-sql==0.3"
1822+
1823+ # Operating System specific package selection
1824+ # Skip PYTHON-LDAP installation since it tries to install / compile it system-wide
1825+
1826+ message "[WARNING] Skipping local PYTHON-LDAP installation. Please refer to the Wikibook to install it" ${YELLOW}
1827+
1828+ local PIP_PKGS="$PIP_PYTZ $PIP_SIX $PIP_LXML $PIP_RELATORIO $PIP_DATEUTIL $PIP_PSYCOPG2 $PIP_VOBJECT $PIP_PYWEBDAV $PIP_QRCODE $PIP_PILLOW $PIP_CALDAV $PIP_POLIB $PIP_SQL"
1829+
1830+ message "[INFO] Installing python dependencies with pip-${PIP_VERSION} ..." ${YELLOW}
1831+
1832+ for PKG in ${PIP_PKGS}; do
1833+ message " >> ${PKG}" ${BLUE}
1834+ ${PIP_CMD} ${PIP_ARGS} ${PKG} || exit 1
1835+ message " >> OK" ${GREEN}
1836+ done
1837+}
1838+
1839+
1840+get_url() {
1841+ # $1 : Module name
1842+ # return : URL to download
1843+ echo ${TRYTON_BASE_URL}/${TRYTON_VERSION}/$(wget --quiet -O- ${TRYTON_BASE_URL}/${TRYTON_VERSION} | egrep -o "${1}-${TRYTON_VERSION}.[0-9\.]+.tar.gz" | sort -V | tail -1)
1844+}
1845+
1846+
1847+install_tryton_modules() {
1848+ #
1849+ # Get the lastest revision number for each Tryton module.
1850+ #
1851+ message "[INFO] Getting list of lastest Tryton packages..." ${YELLOW}
1852+
1853+ local TRYTOND_URL=$(get_url trytond)
1854+ local TRYTOND_FILE=$(basename ${TRYTOND_URL})
1855+
1856+ local TRYTON_MODULES="account account_invoice account_product calendar company country currency party product stock stock_lot"
1857+
1858+ local TRYTON_MODULES_FILE=""
1859+ local TRYTON_MODULES_URL=""
1860+ local AUX="" MODULE=""
1861+ for MODULE in ${TRYTON_MODULES}
1862+ do
1863+ AUX=$(get_url trytond_${MODULE})
1864+ TRYTON_MODULES_URL="${TRYTON_MODULES_URL} ${AUX}"
1865+ TRYTON_MODULES_FILE="${TRYTON_MODULES_FILE} $(basename ${AUX})"
1866+ done
1867+
1868+ message "[INFO] OK." ${GREEN}
1869+
1870+ #
1871+ # Download Tryton packages.
1872+ #
1873+ message "[INFO] Changing to temporary directory." ${BLUE}
1874+ cd ${TMP_DIR} || exit 1
1875+
1876+ message "[INFO] Downloading the Tryton server..." ${YELLOW}
1877+ wget ${TRYTOND_URL} || exit 1
1878+ message "[INFO] OK." ${GREEN}
1879+
1880+ message "[INFO] Downloading Tryton modules..." ${YELLOW}
1881+ local URL=""
1882+ for URL in ${TRYTON_MODULES_URL}; do
1883+ wget ${URL} || exit 1
1884+ done
1885+ message "[INFO] OK." ${GREEN}
1886+
1887+ #
1888+ # Uncompress the Tryton packages.
1889+ #
1890+ message "[INFO] Uncompressing the Tryton server..." ${YELLOW}
1891+ cd ${TRYTOND_DIR}
1892+ tar -xzf ${TMP_DIR}/${TRYTOND_FILE} || exit 1
1893+ message "[INFO] OK." ${GREEN}
1894+
1895+ message "[INFO] Uncompressing the Tryton modules..." ${YELLOW}
1896+ cd ${MODULES_DIR} || exit 1
1897+ for MODULE in $(ls ${TMP_DIR}/trytond_*); do
1898+ tar -xzf ${MODULE} || exit 1
1899+ done
1900+ message "[INFO] OK." ${GREEN}
1901+
1902+ #
1903+ # Links to modules.
1904+ #
1905+ message "[INFO] Changing directory to <../trytond/modules>." ${BLUE}
1906+ local TRYTOND_FOLDER=$(basename ${TRYTOND_FILE} .tar.gz)
1907+ cd "${TRYTOND_DIR}/${TRYTOND_FOLDER}/trytond/modules" || exit 1
1908+
1909+ message "[INFO] Linking the Tryton modules..." ${YELLOW}
1910+ local LNMOD=""
1911+ for LNMOD in ${TRYTON_MODULES}; do
1912+ ln -si ${MODULES_DIR}/trytond_${LNMOD}-* ${LNMOD} || exit 1
1913+ done
1914+ message "[INFO] OK." ${GREEN}
1915+
1916+ message "[INFO] Copying GNU Health modules to the Tryton modules directory..." ${YELLOW}
1917+ cp -a ${GNUHEALTH_INST_DIR}/health* ${MODULES_DIR} || exit 1
1918+
1919+ local EXTRA_FILES="COPYING README version"
1920+ for FILE in ${EXTRA_FILES}; do
1921+ cp -a ${GNUHEALTH_INST_DIR}/${FILE} ${BASEDIR} || exit 1
1922+ done
1923+
1924+ ln -si ${MODULES_DIR}/health* .
1925+ message "[INFO] OK." ${GREEN}
1926+
1927+}
1928+
1929+
1930 bash_profile () {
1931
1932 message "[INFO] Creating or Updating the BASH profile for GNU Health" ${BLUE}
1933
1934 cd $INSTDIR
1935-
1936+
1937 PROFILE="$HOME/.gnuhealthrc"
1938
1939- if [ -e ${PROFILE} ] ; then
1940+ if [[ -e ${PROFILE} ]]; then
1941 # Make a backup copy of the GNU Health BASH profile if it exists
1942 message "[INFO] GNU Health BASH Profile exists. Making backup to ${PROFILE}.bak ." ${YELLOW}
1943 cp ${PROFILE} ${PROFILE}.bak || exit 1
1944@@ -187,145 +313,58 @@
1945 cp gnuhealthrc ${PROFILE} || exit 1
1946
1947 # Load .gnuhealthrc from .bash_profile . If .bash_profile does not exist, create it.
1948- if [ -e $HOME/.bash_profile ] ; then
1949+ if [[ -e $HOME/.bash_profile ]]; then
1950 grep --silent "source ${PROFILE}" $HOME/.bash_profile || echo "[[ -f ${PROFILE} ]] && source ${PROFILE}" >> $HOME/.bash_profile
1951 else
1952 echo "[[ -f ${PROFILE} ]] && source ${PROFILE}" >> $HOME/.bash_profile
1953 fi
1954-
1955-}
1956-
1957-#
1958-# (0) Start.
1959-#
1960-GNUHEALTH_INST_DIR=$PWD
1961-GNUHEALTH_VERSION=`cat version`
1962-
1963-message "[INFO] Starting GNU Health ${GNUHEALTH_VERSION} installation..." ${BLUE}
1964-
1965-#
1966-# (1) Check requirements.
1967-#
1968-check_requirements
1969-
1970-#
1971-# (2) Install directories.
1972-#
1973-install_directories
1974-
1975-
1976-#
1977-# (3) Download settings.
1978-#
1979-TRYTON_VERSION="3.0"
1980-TRYTON_BASE_URL="http://downloads.tryton.org"
1981-
1982-get_url() {
1983- # $1 : Module name
1984- # return : URL to download
1985-
1986- echo ${TRYTON_BASE_URL}/${TRYTON_VERSION}/$(wget --quiet -O- ${TRYTON_BASE_URL}/${TRYTON_VERSION} | egrep -o "${1}-${TRYTON_VERSION}.[0-9\.]+.tar.gz" | sort -V | tail -1)
1987-}
1988-
1989-#
1990-# Get the lastest revision number for each Tryton module.
1991-#
1992-message "[INFO] Getting list of lastest Tryton packages..." ${YELLOW}
1993-
1994-TRYTOND_URL=$(get_url trytond)
1995-TRYTOND_FILE=$(basename ${TRYTOND_URL})
1996-
1997-TRYTON_MODULES="account account_invoice account_product calendar company country currency party product stock stock_lot"
1998-
1999-TRYTON_MODULES_FILE=""
2000-TRYTON_MODULES_URL=""
2001-for MODULE in ${TRYTON_MODULES}
2002-do
2003- AUX=$(get_url trytond_${MODULE})
2004- TRYTON_MODULES_URL="${TRYTON_MODULES_URL} ${AUX}"
2005- TRYTON_MODULES_FILE="${TRYTON_MODULES_FILE} $(basename ${AUX})"
2006-done
2007-
2008-message "[INFO] OK." ${GREEN}
2009-
2010-
2011-#
2012-# (4) Install Python dependencies.
2013-#
2014-install_python_dependencies
2015-
2016-
2017-#
2018-# (5) Download Tryton packages.
2019-#
2020-message "[INFO] Changing to temporary directory." ${BLUE}
2021-cd ${TMP_DIR} || exit 1
2022-
2023-message "[INFO] Downloading the Tryton server..." ${YELLOW}
2024-wget ${TRYTOND_URL} || exit 1
2025-message "[INFO] OK." ${GREEN}
2026-
2027-message "[INFO] Downloading Tryton modules..." ${YELLOW}
2028-for URL in ${TRYTON_MODULES_URL}; do
2029- wget ${URL} || exit 1
2030-done
2031-message "[INFO] OK." ${GREEN}
2032-
2033-
2034-#
2035-# (6) Uncompress the Tryton packages.
2036-#
2037-message "[INFO] Uncompressing the Tryton server..." ${YELLOW}
2038-cd ${TRYTOND_DIR}
2039-tar -xzf ${TMP_DIR}/${TRYTOND_FILE} || exit 1
2040-message "[INFO] OK." ${GREEN}
2041-
2042-message "[INFO] Uncompressing the Tryton modules..." ${YELLOW}
2043-cd ${MODULES_DIR} || exit 1
2044-for MODULE in `ls ${TMP_DIR}/trytond_*`; do
2045- tar -xzf ${MODULE} || exit 1
2046-done
2047-message "[INFO] OK." ${GREEN}
2048-
2049-
2050-#
2051-# (7) Links to modules.
2052-#
2053-message "[INFO] Changing directory to <../trytond/modules>." ${BLUE}
2054-TRYTOND_FOLDER=$(basename ${TRYTOND_FILE} .tar.gz)
2055-cd "${TRYTOND_DIR}/${TRYTOND_FOLDER}/trytond/modules" || exit 1
2056-
2057-message "[INFO] Linking the Tryton modules..." ${YELLOW}
2058-for LNMOD in ${TRYTON_MODULES}; do
2059- ln -si ${MODULES_DIR}/trytond_${LNMOD}-* ${LNMOD} || exit 1
2060-done
2061-message "[INFO] OK." ${GREEN}
2062-
2063-message "[INFO] Copying GNU Health modules to the Tryton modules directory..." ${YELLOW}
2064-cp -a ${GNUHEALTH_INST_DIR}/health* ${MODULES_DIR} || exit 1
2065-
2066-EXTRA_FILES="COPYING README version"
2067-for FILE in ${EXTRA_FILES}; do
2068- cp -a ${GNUHEALTH_INST_DIR}/${FILE} ${BASEDIR} || exit 1
2069-done
2070-
2071-ln -si ${MODULES_DIR}/health* .
2072-message "[INFO] OK." ${GREEN}
2073-
2074-
2075-#
2076-# (8) BASH Profile
2077-#
2078-bash_profile
2079-
2080-
2081-#
2082-# Clean.
2083-#
2084-message "[INFO] Cleaning Up..." ${YELLOW}
2085-rm -rf ${TMP_DIR} || exit 1
2086-
2087-message "[INFO] OK." ${GREEN}
2088-
2089-
2090-message "[INFO] Installed successfully in ${BASEDIR}." ${BLUE}
2091+
2092+ # Include .gnuhealthrc in .bashrc for non-login shells
2093+ if [[ -e $HOME/.bashrc ]]; then
2094+ grep --silent "source ${PROFILE}" $HOME/.bashrc || echo "[[ -f ${PROFILE} ]] && source ${PROFILE}" >> $HOME/.bashrc
2095+ else
2096+ echo "[[ -f ${PROFILE} ]] && source ${PROFILE}" >> $HOME/.bashrc
2097+ fi
2098+
2099+}
2100+
2101+
2102+cleanup() {
2103+ message "[INFO] Cleaning Up..." ${YELLOW}
2104+ rm -rf ${TMP_DIR} || exit 1
2105+
2106+ message "[INFO] OK." ${GREEN}
2107+}
2108+
2109+
2110+#-----------------------------------------------------------------------------
2111+# Main
2112+#-----------------------------------------------------------------------------
2113+
2114+main() {
2115+ message "[INFO] Starting GNU Health ${GNUHEALTH_VERSION} installation..." ${BLUE}
2116+
2117+ # (1) Check requirements.
2118+ check_requirements
2119+
2120+ # (2) Install directories.
2121+ install_directories
2122+
2123+ # (3) Install Python dependencies.
2124+ install_python_dependencies
2125+
2126+ # (4) Download Tryton modules.
2127+ install_tryton_modules
2128+
2129+ # (5) BASH Profile
2130+ bash_profile
2131+
2132+ # (6) Clean
2133+ cleanup
2134+
2135+ message "[INFO] Installed successfully in ${BASEDIR}." ${BLUE}
2136+}
2137+
2138+
2139+main "$@"
2140+
2141
2142=== modified file 'gnuhealthrc'
2143--- gnuhealthrc 2014-01-27 08:27:26 +0000
2144+++ gnuhealthrc 2014-07-17 21:57:19 +0000
2145@@ -9,19 +9,29 @@
2146 echo "$EDITOR not found"
2147 fi
2148
2149+# Get the most current Tryton server version
2150+# It should only be one trytond, but just in case..
2151+TRYTOND=`ls -1d $HOME/gnuhealth/tryton/server/trytond-* | egrep -o "trytond-[0-9\.]+.[0-9\.]+.[0-9\.]+" | sort -V | tail -1`
2152+
2153+# Add PYTHONPATH environment variable
2154+export PYTHONPATH=${HOME}/gnuhealth/tryton/server/${TRYTOND}
2155
2156 # Aliases
2157 alias cdlogs='cd $HOME/gnuhealth/logs'
2158-alias cdexe='cd $HOME/gnuhealth/tryton/server/trytond-*/bin'
2159-alias cdconf='cd $HOME/gnuhealth/tryton/server/trytond-*/etc'
2160+alias cdexe='cd $HOME/gnuhealth/tryton/server/${TRYTOND}/bin'
2161+alias cdconf='cd $HOME/gnuhealth/tryton/server/${TRYTOND}/etc'
2162 alias cdmods='cd $HOME/gnuhealth/tryton/server/modules'
2163-alias editconf='${EDITOR} $HOME/gnuhealth/tryton/server/trytond-*/etc/trytond.conf'
2164+alias editconf='${EDITOR} $HOME/gnuhealth/tryton/server/${TRYTOND}/etc/trytond.conf'
2165
2166 alias rm='rm -i'
2167 alias mv='mv -i'
2168 alias cp='cp -i'
2169
2170-alias ls='ls --color=auto'
2171+#GNU HEALTH version
2172+export GNUHEALTH_VERSION=`cat $HOME/gnuhealth/version`
2173+
2174+# Commented to be compatible with FreeBSD
2175+# alias ls='ls --color=auto'
2176
2177 #Prompt
2178
2179
2180=== modified file 'health/__init__.py'
2181--- health/__init__.py 2014-01-27 08:27:26 +0000
2182+++ health/__init__.py 2014-07-17 21:57:19 +0000
2183@@ -27,21 +27,32 @@
2184
2185 def register():
2186 Pool.register(
2187+ OperationalArea,
2188+ OperationalSector,
2189+ DomiciliaryUnit,
2190+ Occupation,
2191+ Ethnicity,
2192+ PartyPatient,
2193+ PartyAddress,
2194 DrugDoseUnits,
2195 MedicationFrequency,
2196 DrugForm,
2197 DrugRoute,
2198- Occupation,
2199- Ethnicity,
2200 MedicalSpecialty,
2201+ HealthInstitution,
2202+ HealthInstitutionSpecialties,
2203+ HealthInstitutionOperationalSector,
2204+ HealthInstitutionO2M,
2205+ HospitalBuilding,
2206+ HospitalUnit,
2207+ HospitalOR,
2208+ HospitalWard,
2209+ HospitalBed,
2210 HealthProfessional,
2211 HealthProfessionalSpecialties,
2212 PhysicianSP,
2213- OperationalArea,
2214- OperationalSector,
2215 Family,
2216 FamilyMember,
2217- DomiciliaryUnit,
2218 MedicamentCategory,
2219 Medicament,
2220 PathologyCategory,
2221@@ -52,8 +63,6 @@
2222 InsurancePlan,
2223 Insurance,
2224 AlternativePersonID,
2225- PartyPatient,
2226- PartyAddress,
2227 ProductCategory,
2228 ProductTemplate,
2229 Product,
2230@@ -72,11 +81,6 @@
2231 SecondaryCondition,
2232 DiagnosticHypothesis,
2233 SignsAndSymptoms,
2234- HospitalBuilding,
2235- HospitalUnit,
2236- HospitalOR,
2237- HospitalWard,
2238- HospitalBed,
2239 module='health', type_='model')
2240 Pool.register(
2241 OpenAppointmentReport,
2242
2243=== modified file 'health/data/ethnic_groups.xml'
2244--- health/data/ethnic_groups.xml 2013-03-06 21:29:52 +0000
2245+++ health/data/ethnic_groups.xml 2014-07-17 21:57:19 +0000
2246@@ -1,34 +1,34 @@
2247 <?xml version="1.0" encoding="utf-8"?>
2248 <tryton>
2249- <data skiptest="1" noupdate="1">
2250+ <data skiptest="1" noupdate="0">
2251
2252 <record model="gnuhealth.ethnicity" id="eth1">
2253 <field name="name">Black</field>
2254- <field name="code">1</field>
2255+ <field name="code">BLACK</field>
2256 </record>
2257 <record model="gnuhealth.ethnicity" id="eth2">
2258 <field name="name">Asian</field>
2259- <field name="code">2</field>
2260+ <field name="code">ASIAN</field>
2261 </record>
2262 <record model="gnuhealth.ethnicity" id="eth3">
2263 <field name="name">White</field>
2264- <field name="code">3</field>
2265+ <field name="code">WHITE</field>
2266 </record>
2267 <record model="gnuhealth.ethnicity" id="eth4">
2268 <field name="name">Middle-East</field>
2269- <field name="code">4</field>
2270+ <field name="code">MIDEAST</field>
2271 </record>
2272 <record model="gnuhealth.ethnicity" id="eth5">
2273 <field name="name">Hispanic</field>
2274- <field name="code">5</field>
2275+ <field name="code">HISPANIC</field>
2276 </record>
2277 <record model="gnuhealth.ethnicity" id="eth6">
2278 <field name="name">African American</field>
2279- <field name="code">6</field>
2280+ <field name="code">AFRICANAMERICAN</field>
2281 </record>
2282 <record model="gnuhealth.ethnicity" id="eth7">
2283 <field name="name">Indian American</field>
2284- <field name="code">7</field>
2285+ <field name="code">INDIANAMERICAN</field>
2286 </record>
2287
2288 </data>
2289
2290=== modified file 'health/data/health_specialties.xml'
2291--- health/data/health_specialties.xml 2013-03-06 21:29:52 +0000
2292+++ health/data/health_specialties.xml 2014-07-17 21:57:19 +0000
2293@@ -1,238 +1,238 @@
2294 <?xml version="1.0" encoding="utf-8"?>
2295 <tryton>
2296- <data skiptest="1" noupdate="1">
2297+ <data noupdate="0">
2298
2299 <record model="gnuhealth.specialty" id="2">
2300 <field name="name">Anatomy</field>
2301- <field name="code"></field>
2302+ <field name="code">ANATOMY</field>
2303 </record>
2304 <record model="gnuhealth.specialty" id="3">
2305 <field name="name">Andrology</field>
2306- <field name="code"></field>
2307+ <field name="code">ANDROLOGY</field>
2308 </record>
2309 <record model="gnuhealth.specialty" id="4">
2310 <field name="name">Alternative Medicine</field>
2311- <field name="code"></field>
2312+ <field name="code">ALTERNATIVE</field>
2313 </record>
2314 <record model="gnuhealth.specialty" id="5">
2315 <field name="name">Anesthesiology</field>
2316- <field name="code">AN, PAN</field>
2317+ <field name="code">ANESTHESIO</field>
2318 </record>
2319 <record model="gnuhealth.specialty" id="6">
2320 <field name="name">Biochemistry</field>
2321- <field name="code"></field>
2322+ <field name="code">BIOCHEM</field>
2323 </record>
2324 <record model="gnuhealth.specialty" id="7">
2325 <field name="name">Cardiology</field>
2326- <field name="code"></field>
2327+ <field name="code">CARDIO</field>
2328 </record>
2329 <record model="gnuhealth.specialty" id="8">
2330 <field name="name">Cardiovascular surgery</field>
2331- <field name="code"></field>
2332+ <field name="code">CARDIOSURG</field>
2333 </record>
2334 <record model="gnuhealth.specialty" id="9">
2335 <field name="name">Clinical laboratory sciences</field>
2336- <field name="code"></field>
2337+ <field name="code">LAB</field>
2338 </record>
2339 <record model="gnuhealth.specialty" id="10">
2340 <field name="name">Clinical Neurophysiology</field>
2341- <field name="code"></field>
2342+ <field name="code">NEUROPHYSIO</field>
2343 </record>
2344 <record model="gnuhealth.specialty" id="11">
2345 <field name="name">Dermatology</field>
2346- <field name="code">D, DS</field>
2347+ <field name="code">DS</field>
2348 </record>
2349 <record model="gnuhealth.specialty" id="12">
2350- <field name="name">Dietetics</field>
2351- <field name="code"></field>
2352+ <field name="name">Nutrition</field>
2353+ <field name="code">NUTRITION</field>
2354 </record>
2355 <record model="gnuhealth.specialty" id="13">
2356 <field name="name">Embryology</field>
2357- <field name="code"></field>
2358+ <field name="code">EMBRYO</field>
2359 </record>
2360 <record model="gnuhealth.specialty" id="14">
2361 <field name="name">Emergency medicine</field>
2362- <field name="code">EM</field>
2363+ <field name="code">EMERGENCY</field>
2364 </record>
2365 <record model="gnuhealth.specialty" id="15">
2366 <field name="name">Endocrinology</field>
2367- <field name="code"></field>
2368+ <field name="code">ENDOCRINO</field>
2369 </record>
2370 <record model="gnuhealth.specialty" id="16">
2371 <field name="name">Family Medicine</field>
2372- <field name="code">FM</field>
2373+ <field name="code">FAMILY</field>
2374 </record>
2375 <record model="gnuhealth.specialty" id="17">
2376 <field name="name">Forensic Medicine</field>
2377- <field name="code"></field>
2378+ <field name="code">FORENSIC</field>
2379 </record>
2380 <record model="gnuhealth.specialty" id="18">
2381 <field name="name">Gastroenterology</field>
2382- <field name="code">GI</field>
2383+ <field name="code">GASTRO</field>
2384 </record>
2385 <record model="gnuhealth.specialty" id="19">
2386 <field name="name">General surgery</field>
2387- <field name="code">GS</field>
2388+ <field name="code">GENERALSURG</field>
2389 </record>
2390 <record model="gnuhealth.specialty" id="20">
2391 <field name="name">Genetics</field>
2392- <field name="code"></field>
2393+ <field name="code">GENETICS</field>
2394 </record>
2395 <record model="gnuhealth.specialty" id="21">
2396 <field name="name">Geriatrics</field>
2397- <field name="code">IMG</field>
2398+ <field name="code">GERIATRICS</field>
2399 </record>
2400 <record model="gnuhealth.specialty" id="22">
2401- <field name="name">Gynaecology</field>
2402- <field name="code"></field>
2403+ <field name="name">Gynecology</field>
2404+ <field name="code">GYN</field>
2405 </record>
2406 <record model="gnuhealth.specialty" id="23">
2407 <field name="name">Hematology</field>
2408- <field name="code"></field>
2409+ <field name="code">HEMATO</field>
2410 </record>
2411 <record model="gnuhealth.specialty" id="24">
2412 <field name="name">Hepatology</field>
2413- <field name="code"></field>
2414+ <field name="code">HEPATO</field>
2415 </record>
2416 <record model="gnuhealth.specialty" id="25">
2417 <field name="name">Histology</field>
2418- <field name="code"></field>
2419+ <field name="code">HISTOLOGY</field>
2420 </record>
2421 <record model="gnuhealth.specialty" id="26">
2422 <field name="name">Immunology</field>
2423- <field name="code"></field>
2424+ <field name="code">IMMUNO</field>
2425 </record>
2426 <record model="gnuhealth.specialty" id="27">
2427 <field name="name">Infectious disease</field>
2428- <field name="code">ID</field>
2429+ <field name="code">INFECTIOUS</field>
2430 </record>
2431 <record model="gnuhealth.specialty" id="28">
2432 <field name="name">Intensive care medicine</field>
2433- <field name="code"></field>
2434+ <field name="code">INTENSIVECARE</field>
2435 </record>
2436 <record model="gnuhealth.specialty" id="29">
2437 <field name="name">Maxillofacial surgery</field>
2438- <field name="code">Maxfacs, OMFS</field>
2439+ <field name="code">MAXILLOFACIALSURG</field>
2440 </record>
2441 <record model="gnuhealth.specialty" id="30">
2442 <field name="name">Nephrology</field>
2443- <field name="code"></field>
2444+ <field name="code">NEPHRO</field>
2445 </record>
2446 <record model="gnuhealth.specialty" id="31">
2447 <field name="name">Neurology</field>
2448- <field name="code">N</field>
2449+ <field name="code">NEURO</field>
2450 </record>
2451 <record model="gnuhealth.specialty" id="32">
2452 <field name="name">Neurosurgery</field>
2453- <field name="code">NS</field>
2454+ <field name="code">NEUROSURG</field>
2455 </record>
2456 <record model="gnuhealth.specialty" id="33">
2457 <field name="name">Nursing</field>
2458- <field name="code"></field>
2459+ <field name="code">NURSING</field>
2460 </record>
2461 <record model="gnuhealth.specialty" id="34">
2462 <field name="name">Obstetrics and gynecology</field>
2463- <field name="code">OB/GYN</field>
2464+ <field name="code">OBGYN</field>
2465 </record>
2466 <record model="gnuhealth.specialty" id="35">
2467 <field name="name">Oncology</field>
2468- <field name="code">ON</field>
2469+ <field name="code">ONCO</field>
2470 </record>
2471 <record model="gnuhealth.specialty" id="36">
2472 <field name="name">Ophthalmology</field>
2473- <field name="code">OPH</field>
2474+ <field name="code">OPHTALMO</field>
2475 </record>
2476 <record model="gnuhealth.specialty" id="37">
2477 <field name="name">Orthopedic surgery</field>
2478- <field name="code">ORS</field>
2479+ <field name="code">ORTHOSURG</field>
2480 </record>
2481 <record model="gnuhealth.specialty" id="38">
2482- <field name="name">Otolaryngology, or ENT</field>
2483- <field name="code">ORL, ENT</field>
2484+ <field name="name">Otolaryngology - ENT</field>
2485+ <field name="code">ENT</field>
2486 </record>
2487 <record model="gnuhealth.specialty" id="39">
2488 <field name="name">Palliative care</field>
2489- <field name="code">PLM</field>
2490+ <field name="code">PALLIATIVE</field>
2491 </record>
2492 <record model="gnuhealth.specialty" id="40">
2493 <field name="name">Pathology</field>
2494- <field name="code">PTH</field>
2495+ <field name="code">PATHOLOGY</field>
2496 </record>
2497 <record model="gnuhealth.specialty" id="41">
2498 <field name="name">Pediatrics</field>
2499- <field name="code">PD</field>
2500+ <field name="code">PEDIATRICS</field>
2501 </record>
2502 <record model="gnuhealth.specialty" id="42">
2503 <field name="name">Pediatric surgery</field>
2504- <field name="code"></field>
2505+ <field name="code">PEDIATRICSURG</field>
2506 </record>
2507 <record model="gnuhealth.specialty" id="43">
2508 <field name="name">Pharmacology</field>
2509- <field name="code"></field>
2510+ <field name="code">PHARMA</field>
2511 </record>
2512 <record model="gnuhealth.specialty" id="44">
2513 <field name="name">Physical medicine and rehabilitation</field>
2514- <field name="code">PM&amp;R</field>
2515+ <field name="code">PHYSICALREHAB</field>
2516 </record>
2517 <record model="gnuhealth.specialty" id="45">
2518 <field name="name">Plastic surgery</field>
2519- <field name="code">PS</field>
2520+ <field name="code">PLASTICSURG</field>
2521 </record>
2522 <record model="gnuhealth.specialty" id="46">
2523 <field name="name">Proctology</field>
2524- <field name="code">PRO</field>
2525+ <field name="code">PROCTO</field>
2526 </record>
2527 <record model="gnuhealth.specialty" id="47">
2528 <field name="name">Psychiatry</field>
2529- <field name="code">P</field>
2530+ <field name="code">PSYCHIATRY</field>
2531 </record>
2532 <record model="gnuhealth.specialty" id="48">
2533 <field name="name">Pulmonology</field>
2534- <field name="code"></field>
2535+ <field name="code">PULMO</field>
2536 </record>
2537 <record model="gnuhealth.specialty" id="49">
2538 <field name="name">Radiology</field>
2539- <field name="code">R, DR</field>
2540+ <field name="code">RADIO</field>
2541 </record>
2542 <record model="gnuhealth.specialty" id="50">
2543 <field name="name">Rheumatology</field>
2544- <field name="code">RHU</field>
2545+ <field name="code">RHEUMATO</field>
2546 </record>
2547 <record model="gnuhealth.specialty" id="51">
2548 <field name="name">Stomatology</field>
2549- <field name="code"></field>
2550+ <field name="code">STOMATO</field>
2551 </record>
2552 <record model="gnuhealth.specialty" id="52">
2553 <field name="name">Surgical oncology</field>
2554- <field name="code">SO</field>
2555+ <field name="code">SURGICALONCO</field>
2556 </record>
2557 <record model="gnuhealth.specialty" id="53">
2558 <field name="name">Thoracic surgery</field>
2559- <field name="code">TS</field>
2560+ <field name="code">THORACICSURG</field>
2561 </record>
2562 <record model="gnuhealth.specialty" id="54">
2563 <field name="name">Toxicology</field>
2564- <field name="code"></field>
2565+ <field name="code">TOXICO</field>
2566 </record>
2567 <record model="gnuhealth.specialty" id="55">
2568 <field name="name">Transplant surgery</field>
2569- <field name="code">TTS</field>
2570+ <field name="code">TRANSPLANTSURG</field>
2571 </record>
2572 <record model="gnuhealth.specialty" id="56">
2573 <field name="name">Trauma surgery</field>
2574- <field name="code">TRS</field>
2575- </record>
2576+ <field name="code">TRAUMASURG</field>
2577+ </record>
2578 <record model="gnuhealth.specialty" id="57">
2579 <field name="name">Urgent Care Medicine</field>
2580- <field name="code">UCM</field>
2581+ <field name="code">URGENTCARE</field>
2582 </record>
2583 <record model="gnuhealth.specialty" id="58">
2584 <field name="name">Urology</field>
2585- <field name="code">U</field>
2586+ <field name="code">UROLOGY</field>
2587 </record>
2588 <record model="gnuhealth.specialty" id="59">
2589 <field name="name">Vascular surgery</field>
2590- <field name="code">VS</field>
2591+ <field name="code">VASCULARSURG</field>
2592 </record>
2593
2594 <record model="gnuhealth.specialty" id="60">
2595@@ -240,5 +240,75 @@
2596 <field name="code">GP</field>
2597 </record>
2598
2599+ <record model="gnuhealth.specialty" id="61">
2600+ <field name="name">Internal Medicine</field>
2601+ <field name="code">INTERNAL</field>
2602+ </record>
2603+
2604+ <record model="gnuhealth.specialty" id="62">
2605+ <field name="name">Speech Therapy / Phonoaudiology</field>
2606+ <field name="code">PHONO</field>
2607+ </record>
2608+
2609+ <record model="gnuhealth.specialty" id="63">
2610+ <field name="name">Psychology</field>
2611+ <field name="code">PSYCHO</field>
2612+ </record>
2613+
2614+ <record model="gnuhealth.specialty" id="64">
2615+ <field name="name">Pain Medicine</field>
2616+ <field name="code">PAIN</field>
2617+ </record>
2618+
2619+ <record model="gnuhealth.specialty" id="65">
2620+ <field name="name">Integrative Medicine</field>
2621+ <field name="code">INTEGRATIVE</field>
2622+ </record>
2623+
2624+ <record model="gnuhealth.specialty" id="66">
2625+ <field name="name">Neonatology</field>
2626+ <field name="code">NEONATO</field>
2627+ </record>
2628+
2629+ <record model="gnuhealth.specialty" id="67">
2630+ <field name="name">Cardiothoracic Surgery</field>
2631+ <field name="code">CARDIOTHORAXSURG</field>
2632+ </record>
2633+
2634+ <record model="gnuhealth.specialty" id="68">
2635+ <field name="name">Obstetrics</field>
2636+ <field name="code">OBS</field>
2637+ </record>
2638+
2639+ <record model="gnuhealth.specialty" id="70">
2640+ <field name="name">Primary Care</field>
2641+ <field name="code">PRIMARYCARE</field>
2642+ </record>
2643+
2644+ <record model="gnuhealth.specialty" id="71">
2645+ <field name="name">Family Planning (Primary Care)</field>
2646+ <field name="code">PRIMARY-FAMILYPLANNING</field>
2647+ </record>
2648+
2649+ <record model="gnuhealth.specialty" id="72">
2650+ <field name="name">Social Services</field>
2651+ <field name="code">SOCIALSERVICE</field>
2652+ </record>
2653+
2654+ <record model="gnuhealth.specialty" id="73">
2655+ <field name="name">Oral Medicine (Primary Care)</field>
2656+ <field name="code">PRIMARY-ORAL</field>
2657+ </record>
2658+
2659+ <record model="gnuhealth.specialty" id="74">
2660+ <field name="name">Child Health (Primary Care)</field>
2661+ <field name="code">PRIMARY-CHILD</field>
2662+ </record>
2663+
2664+ <record model="gnuhealth.specialty" id="75">
2665+ <field name="name">Woman Health (Primary Care)</field>
2666+ <field name="code">PRIMARY-WOMAN</field>
2667+ </record>
2668+
2669 </data>
2670 </tryton>
2671
2672=== modified file 'health/health.py'
2673--- health/health.py 2014-01-27 08:27:26 +0000
2674+++ health/health.py 2014-07-17 21:57:19 +0000
2675@@ -27,29 +27,380 @@
2676 from trytond.wizard import Wizard, StateAction, StateView, Button
2677 from trytond.transaction import Transaction
2678 from trytond import backend
2679-from trytond.pyson import Eval, Not, Bool, PYSONEncoder, Equal
2680+from trytond.pyson import Eval, Not, Bool, PYSONEncoder, Equal, And
2681 from trytond.pool import Pool
2682 from trytond.tools import datetime_strftime
2683
2684
2685 __all__ = [
2686- 'DrugDoseUnits', 'MedicationFrequency', 'DrugForm', 'DrugRoute',
2687- 'Occupation', 'Ethnicity', 'MedicalSpecialty', 'HealthProfessional',
2688- 'HealthProfessionalSpecialties', 'PhysicianSP', 'OperationalArea',
2689- 'OperationalSector', 'Family', 'FamilyMember', 'DomiciliaryUnit',
2690- 'MedicamentCategory', 'Medicament', 'PathologyCategory',
2691- 'PathologyGroup', 'Pathology', 'DiseaseMembers', 'ProcedureCode',
2692+ 'OperationalArea', 'OperationalSector', 'Occupation', 'Ethnicity',
2693+ 'DomiciliaryUnit','PartyPatient', 'PartyAddress','DrugDoseUnits',
2694+ 'MedicationFrequency', 'DrugForm', 'DrugRoute', 'MedicalSpecialty',
2695+ 'HealthInstitution', 'HealthInstitutionSpecialties',
2696+ 'HealthInstitutionOperationalSector','HealthInstitutionO2M',
2697+ 'HospitalBuilding', 'HospitalUnit', 'HospitalOR', 'HospitalWard',
2698+ 'HospitalBed', 'HealthProfessional',
2699+ 'HealthProfessionalSpecialties', 'PhysicianSP', 'Family',
2700+ 'FamilyMember', 'MedicamentCategory',
2701+ 'Medicament', 'PathologyCategory', 'PathologyGroup',
2702+ 'Pathology', 'DiseaseMembers', 'ProcedureCode',
2703 'InsurancePlan', 'Insurance', 'AlternativePersonID',
2704- 'PartyPatient', 'PartyAddress', 'ProductCategory',
2705- 'ProductTemplate', 'Product', 'GnuHealthSequences', 'PatientData',
2706- 'PatientDiseaseInfo', 'Appointment', 'AppointmentReport',
2707+ 'ProductCategory', 'ProductTemplate', 'Product',
2708+ 'GnuHealthSequences', 'PatientData', 'PatientDiseaseInfo',
2709+ 'Appointment', 'AppointmentReport',
2710 'OpenAppointmentReportStart', 'OpenAppointmentReport',
2711 'PatientMedication', 'PatientVaccination',
2712 'PatientPrescriptionOrder', 'PrescriptionLine', 'PatientEvaluation',
2713 'Directions', 'SecondaryCondition', 'DiagnosticHypothesis',
2714- 'SignsAndSymptoms', 'HospitalBuilding', 'HospitalUnit',
2715- 'HospitalOR', 'HospitalWard', 'HospitalBed']
2716-
2717+ 'SignsAndSymptoms']
2718+
2719+
2720+class DomiciliaryUnit(ModelSQL, ModelView):
2721+ 'Domiciliary Unit'
2722+ __name__ = 'gnuhealth.du'
2723+
2724+ name = fields.Char('Code', required=True)
2725+ desc = fields.Char('Desc')
2726+ address_street = fields.Char('Street')
2727+ address_street_number = fields.Integer('Number')
2728+ address_street_bis = fields.Char('Apartment')
2729+
2730+ address_district = fields.Char(
2731+ 'District', help="Neighborhood, Village, Barrio....")
2732+
2733+ address_municipality = fields.Char(
2734+ 'Municipality', help="Municipality, Township, county ..")
2735+ address_city = fields.Char('City')
2736+ address_zip = fields.Char('Zip Code')
2737+ address_country = fields.Many2One(
2738+ 'country.country', 'Country', help='Country')
2739+
2740+ address_subdivision = fields.Many2One(
2741+ 'country.subdivision', 'Province',
2742+ domain=[('country', '=', Eval('address_country'))],
2743+ depends=['address_country'])
2744+
2745+ operational_sector = fields.Many2One(
2746+ 'gnuhealth.operational_sector', 'Operational Sector')
2747+
2748+ picture = fields.Binary('Picture')
2749+
2750+ latitude = fields.Numeric('Latidude', digits=(3, 14))
2751+ longitude = fields.Numeric('Longitude', digits=(4, 14))
2752+
2753+ urladdr = fields.Char(
2754+ 'OSM Map',
2755+ help="Locates the DU on the Open Street Map by default")
2756+
2757+ # Infrastructure
2758+
2759+ dwelling = fields.Selection([
2760+ (None, ''),
2761+ ('single_house', 'Single / Detached House'),
2762+ ('apartment', 'Apartment'),
2763+ ('townhouse', 'Townhouse'),
2764+ ('factory', 'Factory'),
2765+ ('building', 'Building'),
2766+ ('mobilehome', 'Mobile House'),
2767+ ], 'Type', sort=False)
2768+
2769+ materials = fields.Selection([
2770+ (None, ''),
2771+ ('concrete', 'Concrete'),
2772+ ('adobe', 'Adobe'),
2773+ ('wood', 'Wood'),
2774+ ('mud', 'Mud / Straw'),
2775+ ('stone', 'Stone'),
2776+ ], 'Material', sort=False)
2777+
2778+ roof_type = fields.Selection([
2779+ (None, ''),
2780+ ('concrete', 'Concrete'),
2781+ ('adobe', 'Adobe'),
2782+ ('wood', 'Wood'),
2783+ ('mud', 'Mud'),
2784+ ('thatch', 'Thatched'),
2785+ ('stone', 'Stone'),
2786+ ], 'Roof', sort=False)
2787+
2788+ total_surface = fields.Integer('Surface', help="Surface in sq. meters")
2789+ bedrooms = fields.Integer('Bedrooms')
2790+ bathrooms = fields.Integer('Bathrooms')
2791+
2792+ housing = fields.Selection([
2793+ (None, ''),
2794+ ('0', 'Shanty, deficient sanitary conditions'),
2795+ ('1', 'Small, crowded but with good sanitary conditions'),
2796+ ('2', 'Comfortable and good sanitary conditions'),
2797+ ('3', 'Roomy and excellent sanitary conditions'),
2798+ ('4', 'Luxury and excellent sanitary conditions'),
2799+ ], 'Conditions',
2800+ help="Housing and sanitary living conditions", sort=False)
2801+
2802+ sewers = fields.Boolean('Sanitary Sewers')
2803+ water = fields.Boolean('Running Water')
2804+ trash = fields.Boolean('Trash recollection')
2805+ electricity = fields.Boolean('Electrical supply')
2806+ gas = fields.Boolean('Gas supply')
2807+ telephone = fields.Boolean('Telephone')
2808+ television = fields.Boolean('Television')
2809+ internet = fields.Boolean('Internet')
2810+
2811+ members = fields.One2Many('party.party', 'du', 'Members', readonly=True)
2812+
2813+ @fields.depends('latitude', 'longitude', 'address_street',
2814+ 'address_street_number', 'address_district', 'address_municipality',
2815+ 'address_city', 'address_zip', 'address_subdivision',
2816+ 'address_country')
2817+ def on_change_with_urladdr(self):
2818+ # Generates the URL to be used in OpenStreetMap
2819+ # The address will be mapped to the URL in the following way
2820+ # If the latitud and longitude of the DU are given, then those
2821+ # parameters will be used.
2822+ # Otherwise, it will try to find the address by the
2823+ # Street, municipality, city, postalcode, state and country.
2824+
2825+ if (self.latitude and self.longitude):
2826+ ret_url = 'http://openstreetmap.org/?mlat=' + \
2827+ str(self.latitude) + '&mlon=' + str(self.longitude)
2828+
2829+ else:
2830+ state = ''
2831+ country = ''
2832+ street_number = str(self.address_street_number).encode('utf-8') \
2833+ or ''
2834+ street = (self.address_street).encode('utf-8') or ''
2835+ municipality = (self.address_municipality).encode('utf-8') or ''
2836+ city = (self.address_city).encode('utf-8') or ''
2837+ if (self.address_subdivision):
2838+ state = (self.address_subdivision.name).encode('utf-8') or ''
2839+ postalcode = (self.address_zip).encode('utf-8') or ''
2840+
2841+ if (self.address_country):
2842+ country = (self.address_country.code).encode('utf-8') or ''
2843+
2844+ ret_url = 'http://nominatim.openstreetmap.org/search?' + \
2845+ 'street=' + street_number + ' ' + \
2846+ street + '&county=' + municipality \
2847+ + '&city=' + city + '&state=' + state \
2848+ + '&postalcode=' + postalcode + '&country=' + country
2849+
2850+ return ret_url
2851+
2852+ @classmethod
2853+ def __setup__(cls):
2854+ super(DomiciliaryUnit, cls).__setup__()
2855+ cls._sql_constraints = [
2856+ ('name_uniq', 'UNIQUE(name)',
2857+ 'The Domiciliary Unit must be unique !'),
2858+ ]
2859+
2860+class PartyPatient (ModelSQL, ModelView):
2861+ 'Party'
2862+ __name__ = 'party.party'
2863+
2864+ activation_date = fields.Date(
2865+ 'Activation date', help='Date of activation of the party')
2866+
2867+ alias = fields.Char('Alias', help='Common name that the Party is reffered')
2868+ ref = fields.Char(
2869+ 'PUID',
2870+ help='Person Unique Identifier',
2871+ states={'invisible': Not(Bool(Eval('is_person')))})
2872+
2873+ unidentified = fields.Boolean(
2874+ 'Unidentified',
2875+ help='Patient is currently unidentified',
2876+ states={'invisible': Not(Bool(Eval('is_person')))})
2877+
2878+ is_person = fields.Boolean(
2879+ 'Person',
2880+ help='Check if the party is a person.')
2881+
2882+ is_patient = fields.Boolean(
2883+ 'Patient',
2884+ states={'invisible': Not(Bool(Eval('is_person')))},
2885+ help='Check if the party is a patient')
2886+
2887+ is_healthprof = fields.Boolean(
2888+ 'Health Prof',
2889+ states={'invisible': Not(Bool(Eval('is_person')))},
2890+ help='Check if the party is a health professional')
2891+
2892+ is_institution = fields.Boolean(
2893+ 'Institution', help='Check if the party is a Health Care Institution')
2894+ is_insurance_company = fields.Boolean(
2895+ 'Insurance Company', help='Check if the party is an Insurance Company')
2896+ is_pharmacy = fields.Boolean(
2897+ 'Pharmacy', help='Check if the party is a Pharmacy')
2898+
2899+ lastname = fields.Char('Last Name', help='Last Name',
2900+ states={'invisible': Not(Bool(Eval('is_person')))})
2901+ dob = fields.Date('DoB', help='Date of Birth')
2902+
2903+ sex = fields.Selection([
2904+ (None, ''),
2905+ ('m', 'Male'),
2906+ ('f', 'Female'),
2907+ ], 'Sex', states={'required': Bool(Eval('is_person'))})
2908+
2909+ photo = fields.Binary('Picture')
2910+ ethnic_group = fields.Many2One('gnuhealth.ethnicity', 'Ethnic group')
2911+
2912+ marital_status = fields.Selection([
2913+ (None, ''),
2914+ ('s', 'Single'),
2915+ ('m', 'Married'),
2916+ ('c', 'Concubinage'),
2917+ ('w', 'Widowed'),
2918+ ('d', 'Divorced'),
2919+ ('x', 'Separated'),
2920+ ], 'Marital Status', sort=False)
2921+
2922+ citizenship = fields.Many2One(
2923+ 'country.country', 'Citizenship', help='Country of Citizenship')
2924+ residence = fields.Many2One(
2925+ 'country.country', 'Country of Residence', help='Country of Residence')
2926+ alternative_identification = fields.Boolean(
2927+ 'Alternative IDs', help='Other types of '
2928+ 'identification, not the official PUID . '
2929+ 'Examples : Passport, foreign ID,..')
2930+
2931+ alternative_ids = fields.One2Many(
2932+ 'gnuhealth.person_alternative_identification',
2933+ 'name', 'Alternative IDs',
2934+ states={'invisible': Not(Bool(Eval('alternative_identification')))})
2935+
2936+ insurance = fields.One2Many('gnuhealth.insurance', 'name', 'Insurances',
2937+ help="Insurance Plans associated to this party")
2938+
2939+ internal_user = fields.Many2One(
2940+ 'res.user', 'Internal User',
2941+ help='In GNU Health is the user (doctor, nurse, ...) that logins.When the'
2942+ ' party is a health professional, it will be the user'
2943+ ' that maps the health professional party. It must be present.',
2944+ states={
2945+ 'invisible': Not(Bool(Eval('is_healthprof'))),
2946+ 'required': Bool(Eval('is_healthprof')),
2947+ })
2948+
2949+ insurance_company_type = fields.Selection([
2950+ (None, ''),
2951+ ('state', 'State'),
2952+ ('labour_union', 'Labour Union / Syndical'),
2953+ ('private', 'Private'),
2954+ ], 'Insurance Type', select=True)
2955+ insurance_plan_ids = fields.One2Many(
2956+ 'gnuhealth.insurance.plan', 'company', 'Insurance Plans')
2957+
2958+ du = fields.Many2One('gnuhealth.du', 'Domiciliary Unit')
2959+
2960+ @staticmethod
2961+ def default_activation_date():
2962+ return datetime.today()
2963+
2964+ @classmethod
2965+ def write(cls, parties, vals):
2966+ # We use this method overwrite to make the fields that have a unique
2967+ # constraint get the NULL value at PostgreSQL level, and not the value
2968+ # '' coming from the client
2969+
2970+ if vals.get('ref') == '':
2971+ vals['ref'] = None
2972+ return super(PartyPatient, cls).write(parties, vals)
2973+
2974+ @classmethod
2975+ def create(cls, vlist):
2976+ # We use this method overwrite to make the fields that have a unique
2977+ # constraint get the NULL value at PostgreSQL level, and not the value
2978+ # '' coming from the client
2979+
2980+ vlist = [x.copy() for x in vlist]
2981+ for values in vlist:
2982+ if 'ref' in values and not values['ref']:
2983+ values['ref'] = None
2984+
2985+ return super(PartyPatient, cls).create(vlist)
2986+
2987+ @classmethod
2988+ def __setup__(cls):
2989+ super(PartyPatient, cls).__setup__()
2990+ cls._sql_constraints += [
2991+ ('ref_uniq', 'UNIQUE(ref)', 'The PUID must be unique'),
2992+ ('internal_user_uniq', 'UNIQUE(internal_user)',
2993+ 'This health professional is already assigned to a party')]
2994+
2995+ def get_rec_name(self, name):
2996+ if self.lastname:
2997+ return self.lastname + ', ' + self.name
2998+ else:
2999+ return self.name
3000+
3001+
3002+ @classmethod
3003+ def search_rec_name(cls, name, clause):
3004+ """ Search for the name, lastname, PUID and any alternative IDs"""
3005+ field = None
3006+ for field in ('name', 'lastname', 'ref', 'alternative_ids.code'):
3007+ parties = cls.search([(field,) + tuple(clause[1:])], limit=1)
3008+ if parties:
3009+ break
3010+ if parties:
3011+ return [(field,) + tuple(clause[1:])]
3012+ return [(cls._rec_name,) + tuple(clause[1:])]
3013+
3014+ @fields.depends('is_person', 'is_patient', 'is_healthprof')
3015+ def on_change_with_is_person(self):
3016+ # Set is_person if the party is a health professional or a patient
3017+ if (self.is_healthprof or self.is_patient or self.is_person):
3018+ return True
3019+
3020+ @classmethod
3021+ def validate(cls, parties):
3022+ super(PartyPatient, cls).validate(parties)
3023+ for party in parties:
3024+ party.check_person()
3025+
3026+ def check_person(self):
3027+ # Verify that health professional and patient
3028+ # are unchecked when is_person is False
3029+
3030+ if not self.is_person and (self.is_patient or self.is_healthprof):
3031+ self.raise_user_error(
3032+ "The Person field must be set if the party is a health"
3033+ " professional or a patient")
3034+
3035+ @classmethod
3036+ # Update to version 2.4
3037+
3038+ def __register__(cls, module_name):
3039+
3040+ cursor = Transaction().cursor
3041+ TableHandler = backend.get('TableHandler')
3042+ table = TableHandler(cursor, cls, module_name)
3043+ # Rename is_doctor to a more general term is_healthprof
3044+
3045+ if table.column_exist('is_doctor'):
3046+ table.column_rename('is_doctor', 'is_healthprof')
3047+
3048+ super(PartyPatient, cls).__register__(module_name)
3049+
3050+class PartyAddress(ModelSQL, ModelView):
3051+ 'Party Address'
3052+ __name__ = 'party.address'
3053+
3054+ relationship = fields.Char(
3055+ 'Relationship',
3056+ help='Include the relationship with the person - friend, co-worker,'
3057+ ' brother,...')
3058+ relative_id = fields.Many2One(
3059+ 'party.party', 'Contact', domain=[('is_person', '=', True)],
3060+ help='Include link to the relative')
3061+
3062+ is_school = fields.Boolean(
3063+ "School", help="Check this box to mark the school address")
3064+ is_work = fields.Boolean(
3065+ "Work", help="Check this box to mark the work address")
3066
3067 class DrugDoseUnits(ModelSQL, ModelView):
3068 'Drug Dose Unit'
3069@@ -74,8 +425,9 @@
3070 'Frequency', required=True, select=True, translate=True,
3071 help='Common frequency name')
3072 code = fields.Char(
3073- 'Code',
3074- help='Dosage Code,for example: SNOMED 229798009 = 3 times per day')
3075+ 'Code', required=True,
3076+ help='Dosage Code,for example: SNOMED 229798009 = 3 times per day.'
3077+ 'Please use CAPITAL LETTERS and no spaces')
3078 abbreviation = fields.Char(
3079 'Abbreviation',
3080 help='Dosage abbreviation, such as tid in the US or tds in the UK')
3081@@ -85,6 +437,7 @@
3082 super(MedicationFrequency, cls).__setup__()
3083 cls._sql_constraints = [
3084 ('name_uniq', 'UNIQUE(name)', 'The Unit must be unique !'),
3085+ ('code_uniq', 'UNIQUE(code)', 'The CODE must be unique !'),
3086 ]
3087
3088
3089@@ -93,13 +446,15 @@
3090 __name__ = 'gnuhealth.drug.form'
3091
3092 name = fields.Char('Form', required=True, select=True, translate=True)
3093- code = fields.Char('Code')
3094+ code = fields.Char('Code', required=True,
3095+ help="Please use CAPITAL LETTERS and no spaces")
3096
3097 @classmethod
3098 def __setup__(cls):
3099 super(DrugForm, cls).__setup__()
3100 cls._sql_constraints = [
3101 ('name_uniq', 'UNIQUE(name)', 'The Unit must be unique !'),
3102+ ('code_uniq', 'UNIQUE(code)', 'The CODE must be unique !'),
3103 ]
3104
3105
3106@@ -108,13 +463,15 @@
3107 __name__ = 'gnuhealth.drug.route'
3108
3109 name = fields.Char('Unit', required=True, select=True, translate=True)
3110- code = fields.Char('Code')
3111+ code = fields.Char('Code', required=True,
3112+ help="Please use CAPITAL LETTERS and no spaces")
3113
3114 @classmethod
3115 def __setup__(cls):
3116 super(DrugRoute, cls).__setup__()
3117 cls._sql_constraints = [
3118 ('name_uniq', 'UNIQUE(name)', 'The Name must be unique !'),
3119+ ('code_uniq', 'UNIQUE(code)', 'The CODE must be unique !'),
3120 ]
3121
3122
3123@@ -123,13 +480,15 @@
3124 __name__ = 'gnuhealth.occupation'
3125
3126 name = fields.Char('Name', required=True, translate=True)
3127- code = fields.Char('Code')
3128+ code = fields.Char('Code', required=True,
3129+ help="Please use CAPITAL LETTERS and no spaces")
3130
3131 @classmethod
3132 def __setup__(cls):
3133 super(Occupation, cls).__setup__()
3134 cls._sql_constraints = [
3135 ('name_uniq', 'UNIQUE(name)', 'The Name must be unique !'),
3136+ ('code_uniq', 'UNIQUE(code)', 'The CODE must be unique !'),
3137 ]
3138
3139
3140@@ -138,7 +497,8 @@
3141 __name__ = 'gnuhealth.ethnicity'
3142
3143 name = fields.Char('Name', required=True, translate=True)
3144- code = fields.Char('Code')
3145+ code = fields.Char('Code', required=True,
3146+ help="Please use CAPITAL LETTERS and no spaces")
3147 notes = fields.Char('Notes')
3148
3149 @classmethod
3150@@ -146,6 +506,530 @@
3151 super(Ethnicity, cls).__setup__()
3152 cls._sql_constraints = [
3153 ('name_uniq', 'UNIQUE(name)', 'The Name must be unique !'),
3154+ ('code_uniq', 'UNIQUE(code)', 'The CODE must be unique !'),
3155+
3156+ ]
3157+
3158+class OperationalArea(ModelSQL, ModelView):
3159+ 'Operational Area'
3160+ __name__ = 'gnuhealth.operational_area'
3161+
3162+ name = fields.Char(
3163+ 'Name', required=True, help='Operational Area of the city or region')
3164+
3165+ operational_sector = fields.One2Many(
3166+ 'gnuhealth.operational_sector', 'operational_area',
3167+ 'Operational Sector', readonly=True)
3168+
3169+ info = fields.Text('Extra Information')
3170+
3171+ @classmethod
3172+ def __setup__(cls):
3173+ super(OperationalArea, cls).__setup__()
3174+ cls._sql_constraints += [
3175+ ('name_uniq', 'UNIQUE(name)',
3176+ 'The operational area must be unique !'),
3177+ ]
3178+
3179+
3180+class OperationalSector(ModelSQL, ModelView):
3181+ 'Operational Sector'
3182+ __name__ = 'gnuhealth.operational_sector'
3183+
3184+ name = fields.Char(
3185+ 'Op. Sector', required=True,
3186+ help='Region included in an operational area')
3187+
3188+ operational_area = fields.Many2One(
3189+ 'gnuhealth.operational_area', 'Operational Area')
3190+
3191+ info = fields.Text('Extra Information')
3192+
3193+ @classmethod
3194+ def __setup__(cls):
3195+ super(OperationalSector, cls).__setup__()
3196+ cls._sql_constraints += [
3197+ ('name_uniq', 'UNIQUE(name, operational_area)',
3198+ 'The operational sector must be unique in each'
3199+ ' operational area!'),
3200+ ]
3201+
3202+
3203+
3204+# HEALTH INSTITUTION
3205+class HealthInstitution(ModelSQL, ModelView):
3206+ 'Health Institution'
3207+ __name__ = 'gnuhealth.institution'
3208+
3209+ @classmethod
3210+ def get_institution(cls):
3211+ # Retrieve the institution associated to this GNU Health instance
3212+ # That is associated to the Company.
3213+
3214+ company = Transaction().context.get('company')
3215+
3216+ cursor = Transaction().cursor
3217+ cursor.execute('SELECT party FROM company_company WHERE id=%s \
3218+ LIMIT 1', (company,))
3219+ party_id = cursor.fetchone()
3220+ if party_id:
3221+ cursor = Transaction().cursor
3222+ cursor.execute('SELECT id FROM gnuhealth_institution WHERE \
3223+ name = %s LIMIT 1', (party_id[0],))
3224+ institution_id = cursor.fetchone()
3225+ if (institution_id):
3226+ return int(institution_id[0])
3227+
3228+
3229+ name = fields.Many2One(
3230+ 'party.party', 'Institution',
3231+ domain=[('is_institution', '=', True)],
3232+ help='Party Associated to this Health Institution',
3233+ required=True,
3234+ states={'readonly': Bool(Eval('name'))})
3235+
3236+ code = fields.Char('Code', required=True,
3237+ help="Institution code")
3238+
3239+ picture = fields.Binary('Picture')
3240+
3241+ institution_type = fields.Selection((
3242+ ('doctor_office', 'Doctor office'),
3243+ ('primary_care', 'Primary Care Center'),
3244+ ('clinic', 'Clinic'),
3245+ ('hospital', 'General Hospital'),
3246+ ('specialized', 'Specialized Hospital'),
3247+ ('nursing_home', 'Nursing Home'),
3248+ ('hospice', 'Hospice'),
3249+ ('rural', 'Rural facility'),
3250+ ), 'Type', required=True, sort=False)
3251+
3252+ beds = fields.Integer("Beds")
3253+
3254+ operating_room = fields.Boolean("Operating Room",
3255+ help="Check this box if the institution" \
3256+ " has operating rooms",
3257+ )
3258+ or_number = fields.Integer("ORs",
3259+ states={'invisible': Not(Bool(Eval('operating_room')))})
3260+
3261+ public_level = fields.Selection((
3262+ ('private', 'Private'),
3263+ ('public', 'Public'),
3264+ ('mixed', 'Private - State'),
3265+ ), 'Public Level', required=True, sort=False)
3266+
3267+ teaching = fields.Boolean("Teaching", help="Mark if this is a" \
3268+ " teaching institution")
3269+ heliport = fields.Boolean("Heliport")
3270+ trauma_center = fields.Boolean("Trauma Center")
3271+ trauma_level = fields.Selection((
3272+ (None, ''),
3273+ ('one', 'Level I'),
3274+ ('two', 'Level II'),
3275+ ('three', 'Level III'),
3276+ ('four', 'Level IV'),
3277+ ('five', 'Level V'),
3278+ ), 'Trauma Level', sort=False,
3279+ states={'invisible': Not(Bool(Eval('trauma_center')))})
3280+
3281+ extra_info = fields.Text("Extra Info")
3282+
3283+ def get_rec_name(self, name):
3284+ if self.name:
3285+ return self.name.name
3286+
3287+ @classmethod
3288+ def __setup__(cls):
3289+ super(HealthInstitution, cls).__setup__()
3290+ cls._sql_constraints = [
3291+ ('name_uniq', 'UNIQUE(name)', 'This Institution already exists !'),
3292+ ('code_uniq', 'UNIQUE(code)', 'This CODE already exists !'),
3293+ ]
3294+
3295+ @classmethod
3296+ def __register__(cls, module_name):
3297+
3298+ super(HealthInstitution, cls).__register__(module_name)
3299+
3300+ # Upgrade to GNU Health 2.6
3301+ # Insert to the gnuhealth.institution model the existing
3302+ # institutions in party
3303+
3304+ # Users need to specify the new type and plublic level attributes of
3305+ # the institution after the upgrade.
3306+
3307+ cursor = Transaction().cursor
3308+ cursor.execute("select name from gnuhealth_institution limit 1;")
3309+ records = cursor.fetchone()
3310+ if not records:
3311+ cursor.execute(
3312+ "INSERT INTO gnuhealth_institution \
3313+ (name, code, institution_type, public_level) \
3314+ SELECT id, id,\'set_me\',\'set_me\' \
3315+ from party_party where is_institution='true';")
3316+
3317+ # Drop old foreign key from institution building
3318+
3319+ TableHandler = backend.get('TableHandler')
3320+
3321+ if TableHandler.table_exist(cursor,'gnuhealth_hospital_building'):
3322+ cursor.execute("ALTER TABLE gnuhealth_hospital_building DROP \
3323+ CONSTRAINT gnuhealth_hospital_building_institution_fkey;")
3324+
3325+ # Link building with new institution model
3326+
3327+ cursor.execute(
3328+ 'UPDATE GNUHEALTH_HOSPITAL_BUILDING '
3329+ 'SET INSTITUTION = GNUHEALTH_INSTITUTION.ID '
3330+ 'FROM GNUHEALTH_INSTITUTION '
3331+ 'WHERE GNUHEALTH_HOSPITAL_BUILDING.INSTITUTION = \
3332+ GNUHEALTH_INSTITUTION.NAME')
3333+
3334+
3335+ # Drop old foreign key from institution UNIT
3336+
3337+ cursor = Transaction().cursor
3338+
3339+ if TableHandler.table_exist(cursor,'gnuhealth_hospital_unit'):
3340+ cursor.execute("ALTER TABLE gnuhealth_hospital_unit DROP \
3341+ CONSTRAINT gnuhealth_hospital_unit_institution_fkey;")
3342+
3343+ # Link unit with new institution model
3344+
3345+ cursor.execute(
3346+ 'UPDATE GNUHEALTH_HOSPITAL_UNIT '
3347+ 'SET INSTITUTION = GNUHEALTH_INSTITUTION.ID '
3348+ 'FROM GNUHEALTH_INSTITUTION '
3349+ 'WHERE GNUHEALTH_HOSPITAL_UNIT.INSTITUTION = \
3350+ GNUHEALTH_INSTITUTION.NAME')
3351+
3352+ # Drop old foreign key from institution WARD
3353+
3354+ if TableHandler.table_exist(cursor,'gnuhealth_hospital_ward'):
3355+ cursor.execute("ALTER TABLE gnuhealth_hospital_ward DROP \
3356+ CONSTRAINT gnuhealth_hospital_ward_institution_fkey;")
3357+
3358+ # Link ward with new institution model
3359+
3360+ cursor.execute(
3361+ 'UPDATE GNUHEALTH_HOSPITAL_WARD '
3362+ 'SET INSTITUTION = GNUHEALTH_INSTITUTION.ID '
3363+ 'FROM GNUHEALTH_INSTITUTION '
3364+ 'WHERE GNUHEALTH_HOSPITAL_WARD.INSTITUTION = \
3365+ GNUHEALTH_INSTITUTION.NAME')
3366+
3367+ # Drop old foreign key from institution OR
3368+
3369+ if TableHandler.table_exist(cursor,'gnuhealth_hospital_or'):
3370+ cursor.execute("ALTER TABLE gnuhealth_hospital_or DROP \
3371+ CONSTRAINT gnuhealth_hospital_or_institution_fkey;")
3372+
3373+ # Link Operating Room with new institution model
3374+
3375+ cursor.execute(
3376+ 'UPDATE GNUHEALTH_HOSPITAL_OR '
3377+ 'SET INSTITUTION = GNUHEALTH_INSTITUTION.ID '
3378+ 'FROM GNUHEALTH_INSTITUTION '
3379+ 'WHERE GNUHEALTH_HOSPITAL_OR.INSTITUTION = \
3380+ GNUHEALTH_INSTITUTION.NAME')
3381+
3382+ # Drop old foreign key from Appointment
3383+
3384+ if TableHandler.table_exist(cursor,'gnuhealth_hospital_appointment'):
3385+ cursor.execute("ALTER TABLE gnuhealth_appointment DROP \
3386+ CONSTRAINT gnuhealth_appointment_institution_fkey;")
3387+
3388+ # Link Appointment with new institution model
3389+
3390+ cursor.execute(
3391+ 'UPDATE GNUHEALTH_APPOINTMENT '
3392+ 'SET INSTITUTION = GNUHEALTH_INSTITUTION.ID '
3393+ 'FROM GNUHEALTH_INSTITUTION '
3394+ 'WHERE GNUHEALTH_APPOINTMENT.INSTITUTION = \
3395+ GNUHEALTH_INSTITUTION.NAME')
3396+
3397+
3398+class HealthInstitutionSpecialties(ModelSQL, ModelView):
3399+ 'Health Institution Specialties'
3400+ __name__ = 'gnuhealth.institution.specialties'
3401+
3402+ name = fields.Many2One('gnuhealth.institution', 'Institution')
3403+ specialty = fields.Many2One('gnuhealth.specialty', 'Specialty')
3404+
3405+
3406+ def get_rec_name(self, name):
3407+ if self.name:
3408+ return self.specialty.name
3409+
3410+
3411+class HealthInstitutionOperationalSector(ModelSQL, ModelView):
3412+ 'Operational Sectors covered by Institution'
3413+ __name__ = 'gnuhealth.institution.operationalsector'
3414+
3415+ name = fields.Many2One('gnuhealth.institution', 'Institution')
3416+ operational_sector = fields.Many2One('gnuhealth.operational_sector', 'Operational Sector')
3417+
3418+class HealthInstitutionO2M(ModelSQL, ModelView):
3419+ 'Health Institution'
3420+ __name__ = 'gnuhealth.institution'
3421+
3422+ # Add Specialties to the Health Institution
3423+ specialties = fields.One2Many('gnuhealth.institution.specialties',
3424+ 'name','Specialties',
3425+ help="Specialties Provided in this Health Institution")
3426+
3427+ main_specialty = fields.Many2One('gnuhealth.institution.specialties',
3428+ 'Specialty',
3429+ domain=[('name', '=', Eval('active_id'))], depends=['specialties'],
3430+ help="Choose the speciality in the case of Specialized Hospitals" \
3431+ " or where this center excels",
3432+ states={'required': And(Eval('institution_type') == 'specialized', Bool(Eval('specialties'))),
3433+ 'readonly': Not(Bool(Eval('name')))})
3434+
3435+ # Add Specialties to the Health Institution
3436+ operational_sectors = fields.One2Many('gnuhealth.institution.operationalsector',
3437+ 'name','Operational Sector',
3438+ help="Operational Sectors covered by this institution")
3439+
3440+
3441+# HEALTH CENTER / HOSPITAL INFRASTRUCTURE
3442+class HospitalBuilding(ModelSQL, ModelView):
3443+ 'Hospital Building'
3444+ __name__ = 'gnuhealth.hospital.building'
3445+
3446+ name = fields.Char(
3447+ 'Name', required=True,
3448+ help='Name of the building within the institution')
3449+
3450+ institution = fields.Many2One(
3451+ 'gnuhealth.institution', 'Institution', required=True,
3452+ help='Health Instituion of this building')
3453+
3454+ code = fields.Char('Code', required=True)
3455+ extra_info = fields.Text('Extra Info')
3456+
3457+ @staticmethod
3458+ def default_institution():
3459+ return HealthInstitution().get_institution()
3460+
3461+ @classmethod
3462+ def __setup__(cls):
3463+ super(HospitalBuilding, cls).__setup__()
3464+ cls._sql_constraints = [
3465+ ('name_uniq', 'UNIQUE(name, institution)',
3466+ 'The Building name must be unique per Health'
3467+ ' Center'),
3468+ ('code_uniq', 'UNIQUE(code, institution)',
3469+ 'The Building name must be unique per Health'
3470+ ' Center'),
3471+ ]
3472+
3473+
3474+class HospitalUnit(ModelSQL, ModelView):
3475+ 'Hospital Unit'
3476+ __name__ = 'gnuhealth.hospital.unit'
3477+
3478+ name = fields.Char(
3479+ 'Name', required=True,
3480+ help='Name of the unit, eg Neonatal, Intensive Care, ...')
3481+
3482+ institution = fields.Many2One(
3483+ 'gnuhealth.institution', 'Institution',required=True,
3484+ help='Health Institution')
3485+
3486+ code = fields.Char('Code', required=True)
3487+ extra_info = fields.Text('Extra Info')
3488+
3489+ @staticmethod
3490+ def default_institution():
3491+ return HealthInstitution().get_institution()
3492+
3493+ @classmethod
3494+ def __setup__(cls):
3495+ super(HospitalUnit, cls).__setup__()
3496+ cls._sql_constraints = [
3497+ ('name_uniq', 'UNIQUE(name, institution)',
3498+ 'The Unit NAME must be unique per Health'
3499+ ' Center'),
3500+ ('code_uniq', 'UNIQUE(code, institution)',
3501+ 'The Unit CODE must be unique per Health'
3502+ ' Center'),
3503+ ]
3504+
3505+
3506+class HospitalOR(ModelSQL, ModelView):
3507+ 'Operating Room'
3508+ __name__ = 'gnuhealth.hospital.or'
3509+
3510+ name = fields.Char(
3511+ 'Name', required=True, help='Name of the Operating Room')
3512+
3513+ institution = fields.Many2One(
3514+ 'gnuhealth.institution', 'Institution', required=True,
3515+ help='Health Institution')
3516+
3517+ building = fields.Many2One(
3518+ 'gnuhealth.hospital.building', 'Building',
3519+ domain=[('institution', '=', Eval('institution'))],
3520+ select=True)
3521+
3522+ unit = fields.Many2One('gnuhealth.hospital.unit', 'Unit',
3523+ domain=[('institution', '=', Eval('institution'))])
3524+ extra_info = fields.Text('Extra Info')
3525+
3526+ @staticmethod
3527+ def default_institution():
3528+ return HealthInstitution().get_institution()
3529+
3530+ @classmethod
3531+ def __setup__(cls):
3532+ super(HospitalOR, cls).__setup__()
3533+ cls._sql_constraints = [
3534+ ('name_uniq', 'UNIQUE(name, institution)',
3535+ 'The Operating Room Name must be unique per Health'
3536+ ' Center'),
3537+ ]
3538+
3539+
3540+class HospitalWard(ModelSQL, ModelView):
3541+ 'Hospital Ward'
3542+ __name__ = 'gnuhealth.hospital.ward'
3543+
3544+ name = fields.Char('Name', required=True, help='Ward / Room code')
3545+
3546+ institution = fields.Many2One(
3547+ 'gnuhealth.institution', 'Institution',required=True,
3548+ help='Health Institution')
3549+
3550+ building = fields.Many2One('gnuhealth.hospital.building', 'Building',
3551+ domain=[('institution', '=', Eval('institution'))])
3552+ floor = fields.Integer('Floor Number')
3553+ unit = fields.Many2One('gnuhealth.hospital.unit', 'Unit',
3554+ domain=[('institution', '=', Eval('institution'))])
3555+
3556+ private = fields.Boolean(
3557+ 'Private', help='Check this option for private room')
3558+
3559+ bio_hazard = fields.Boolean(
3560+ 'Bio Hazard', help='Check this option if there is biological hazard')
3561+
3562+ number_of_beds = fields.Integer(
3563+ 'Number of beds', help='Number of patients per ward')
3564+
3565+ telephone = fields.Boolean('Telephone access')
3566+ ac = fields.Boolean('Air Conditioning')
3567+ private_bathroom = fields.Boolean('Private Bathroom')
3568+ guest_sofa = fields.Boolean('Guest sofa-bed')
3569+ tv = fields.Boolean('Television')
3570+ internet = fields.Boolean('Internet Access')
3571+ refrigerator = fields.Boolean('Refrigerator')
3572+ microwave = fields.Boolean('Microwave')
3573+
3574+ gender = fields.Selection((
3575+ ('men', 'Men Ward'),
3576+ ('women', 'Women Ward'),
3577+ ('unisex', 'Unisex'),
3578+ ), 'Gender', required=True, sort=False)
3579+
3580+ state = fields.Selection((
3581+ (None, ''),
3582+ ('beds_available', 'Beds available'),
3583+ ('full', 'Full'),
3584+ ('na', 'Not available'),
3585+ ), 'Status', sort=False)
3586+
3587+ extra_info = fields.Text('Extra Info')
3588+
3589+ @staticmethod
3590+ def default_gender():
3591+ return 'unisex'
3592+
3593+ @staticmethod
3594+ def default_number_of_beds():
3595+ return 1
3596+
3597+ @staticmethod
3598+ def default_institution():
3599+ return HealthInstitution().get_institution()
3600+
3601+ @classmethod
3602+ def __setup__(cls):
3603+ super(HospitalWard, cls).__setup__()
3604+ cls._sql_constraints = [
3605+ ('name_uniq', 'UNIQUE(name, institution)',
3606+ 'The Ward / Room Name must be unique per Health'
3607+ ' Center'),
3608+ ]
3609+
3610+
3611+class HospitalBed(ModelSQL, ModelView):
3612+ 'Hospital Bed'
3613+ __name__ = 'gnuhealth.hospital.bed'
3614+ _rec_name = 'telephone_number'
3615+
3616+ name = fields.Many2One(
3617+ 'product.product', 'Bed', required=True,
3618+ domain=[('is_bed', '=', True)],
3619+ help='Bed Number')
3620+
3621+ institution = fields.Many2One(
3622+ 'gnuhealth.institution', 'Institution', required=True,
3623+ help='Health Institution')
3624+
3625+ ward = fields.Many2One(
3626+ 'gnuhealth.hospital.ward', 'Ward',
3627+ domain=[('institution', '=', Eval('institution'))],
3628+ help='Ward or room')
3629+
3630+ bed_type = fields.Selection((
3631+ ('gatch', 'Gatch Bed'),
3632+ ('electric', 'Electric'),
3633+ ('stretcher', 'Stretcher'),
3634+ ('low', 'Low Bed'),
3635+ ('low_air_loss', 'Low Air Loss'),
3636+ ('circo_electric', 'Circo Electric'),
3637+ ('clinitron', 'Clinitron'),
3638+ ), 'Bed Type', required=True, sort=False)
3639+
3640+ telephone_number = fields.Char(
3641+ 'Telephone Number', help='Telephone number / Extension')
3642+
3643+ extra_info = fields.Text('Extra Info')
3644+
3645+ state = fields.Selection((
3646+ ('free', 'Free'),
3647+ ('reserved', 'Reserved'),
3648+ ('occupied', 'Occupied'),
3649+ ('na', 'Not available'),
3650+ ), 'Status', readonly=True, sort=False)
3651+
3652+ @staticmethod
3653+ def default_bed_type():
3654+ return 'gatch'
3655+
3656+ @staticmethod
3657+ def default_state():
3658+ return 'free'
3659+
3660+ @staticmethod
3661+ def default_institution():
3662+ return HealthInstitution().get_institution()
3663+
3664+ def get_rec_name(self, name):
3665+ if self.name:
3666+ return self.name.name
3667+
3668+ @classmethod
3669+ def search_rec_name(cls, name, clause):
3670+ return [('name',) + tuple(clause[1:])]
3671+
3672+ @classmethod
3673+ def __setup__(cls):
3674+ super(HospitalBed, cls).__setup__()
3675+ cls._sql_constraints = [
3676+ ('name_uniq', 'UNIQUE(name, institution)',
3677+ 'The Bed must be unique per Health Center'),
3678 ]
3679
3680
3681@@ -156,15 +1040,16 @@
3682 name = fields.Char(
3683 'Specialty', required=True, translate=True,
3684 help='ie, Addiction Psychiatry')
3685- code = fields.Char('Code', help='ie, ADP')
3686+ code = fields.Char('Code', required=True,
3687+ help='ie, ADP. Please use CAPITAL LETTERS and no spaces')
3688
3689 @classmethod
3690 def __setup__(cls):
3691+ cls._sql_constraints = [
3692+ ('name_uniq', 'UNIQUE(name)', 'The Specialty must be unique !'),
3693+ ('code_uniq', 'UNIQUE(code)', 'The CODE must be unique !'),
3694+ ]
3695 super(MedicalSpecialty, cls).__setup__()
3696- cls._sql_constraints = [
3697- ('name_uniq', 'UNIQUE(name)', 'The Specialty must be unique !'),
3698- ]
3699-
3700
3701 class HealthProfessional(ModelSQL, ModelView):
3702 'Health Professional'
3703@@ -198,24 +1083,44 @@
3704 help='Health Professional\'s Name, from the partner list')
3705
3706 institution = fields.Many2One(
3707- 'party.party', 'Institution',
3708- domain=[('is_institution', '=', True)],
3709- help='Instituion where she/he works')
3710+ 'gnuhealth.institution', 'Institution',
3711+ help='Main instituion where she/he works')
3712
3713- code = fields.Char('ID', help='License ID')
3714+ code = fields.Char('LICENSE ID', help='License ID')
3715
3716 specialties = fields.One2Many(
3717 'gnuhealth.hp_specialty', 'name', 'Specialties')
3718
3719 info = fields.Text('Extra info')
3720
3721+ puid = fields.Function(
3722+ fields.Char('PUID', help="Person Unique Identifier"),
3723+ 'get_hp_puid', searcher='search_hp_puid')
3724+
3725+
3726+ def get_hp_puid(self, name):
3727+ return self.name.ref
3728+
3729+ @staticmethod
3730+ def default_institution():
3731+ return HealthInstitution().get_institution()
3732+
3733+ @classmethod
3734+ def search_hp_puid(cls, name, clause):
3735+ res = []
3736+ value = clause[2]
3737+ res.append(('name.ref', clause[1], value))
3738+ return res
3739+
3740 @classmethod
3741 def __setup__(cls):
3742- super(HealthProfessional, cls).__setup__()
3743 cls._sql_constraints = [
3744 ('hp_uniq', 'UNIQUE(name)',
3745 'The health professional must be unique'),
3746+ ('code_uniq', 'UNIQUE(code)',
3747+ 'The LICENSE ID must be unique'),
3748 ]
3749+ super(HealthProfessional, cls).__setup__()
3750
3751 def get_rec_name(self, name):
3752 if self.name:
3753@@ -282,49 +1187,6 @@
3754 table.drop_column('specialty')
3755
3756
3757-class OperationalArea(ModelSQL, ModelView):
3758- 'Operational Area'
3759- __name__ = 'gnuhealth.operational_area'
3760-
3761- name = fields.Char(
3762- 'Name', required=True, help='Operational Area of the city or region')
3763-
3764- operational_sector = fields.One2Many(
3765- 'gnuhealth.operational_sector', 'operational_area',
3766- 'Operational Sector', readonly=True)
3767-
3768- info = fields.Text('Extra Information')
3769-
3770- @classmethod
3771- def __setup__(cls):
3772- super(OperationalArea, cls).__setup__()
3773- cls._sql_constraints += [
3774- ('name_uniq', 'UNIQUE(name)',
3775- 'The operational area must be unique !'),
3776- ]
3777-
3778-
3779-class OperationalSector(ModelSQL, ModelView):
3780- 'Operational Sector'
3781- __name__ = 'gnuhealth.operational_sector'
3782-
3783- name = fields.Char(
3784- 'Op. Sector', required=True,
3785- help='Region included in an operational area')
3786-
3787- operational_area = fields.Many2One(
3788- 'gnuhealth.operational_area', 'Operational Area')
3789-
3790- info = fields.Text('Extra Information')
3791-
3792- @classmethod
3793- def __setup__(cls):
3794- super(OperationalSector, cls).__setup__()
3795- cls._sql_constraints += [
3796- ('name_uniq', 'UNIQUE(name, operational_area)',
3797- 'The operational sector must be unique in each'
3798- ' operational area!'),
3799- ]
3800
3801
3802 class Family(ModelSQL, ModelView):
3803@@ -378,144 +1240,6 @@
3804 role = fields.Char('Role', help='Father, Mother, sibbling...')
3805
3806
3807-class DomiciliaryUnit(ModelSQL, ModelView):
3808- 'Domiciliary Unit'
3809- __name__ = 'gnuhealth.du'
3810-
3811- name = fields.Char('Code', required=True)
3812- desc = fields.Char('Desc')
3813- address_street = fields.Char('Street')
3814- address_street_number = fields.Integer('Number')
3815- address_street_bis = fields.Char('Apartment')
3816-
3817- address_district = fields.Char(
3818- 'District', help="Neighborhood, Village, Barrio....")
3819-
3820- address_municipality = fields.Char(
3821- 'Municipality', help="Municipality, Township, county ..")
3822- address_city = fields.Char('City')
3823- address_zip = fields.Char('Zip Code')
3824- address_country = fields.Many2One(
3825- 'country.country', 'Country', help='Country')
3826-
3827- address_subdivision = fields.Many2One(
3828- 'country.subdivision', 'Province',
3829- domain=[('country', '=', Eval('address_country'))],
3830- depends=['address_country'])
3831-
3832- operational_sector = fields.Many2One(
3833- 'gnuhealth.operational_sector', 'Operational Sector')
3834-
3835- picture = fields.Binary('Picture')
3836-
3837- latitude = fields.Numeric('Latidude', digits=(3, 14))
3838- longitude = fields.Numeric('Longitude', digits=(4, 14))
3839-
3840- urladdr = fields.Char(
3841- 'OSM Map', on_change_with=[
3842- 'latitude', 'longitude', 'address_street', 'address_street_number',
3843- 'address_district', 'address_municipality', 'address_city',
3844- 'address_zip', 'address_subdivision', 'address_country'],
3845- help="Locates the DU on the Open Street Map by default")
3846-
3847- # Infrastructure
3848-
3849- dwelling = fields.Selection([
3850- (None, ''),
3851- ('single_house', 'Single / Detached House'),
3852- ('apartment', 'Apartment'),
3853- ('townhouse', 'Townhouse'),
3854- ('factory', 'Factory'),
3855- ('building', 'Building'),
3856- ('mobilehome', 'Mobile House'),
3857- ], 'Type', sort=False)
3858-
3859- materials = fields.Selection([
3860- (None, ''),
3861- ('concrete', 'Concrete'),
3862- ('adobe', 'Adobe'),
3863- ('wood', 'Wood'),
3864- ('mud', 'Mud / Straw'),
3865- ('stone', 'Stone'),
3866- ], 'Material', sort=False)
3867-
3868- roof_type = fields.Selection([
3869- (None, ''),
3870- ('concrete', 'Concrete'),
3871- ('adobe', 'Adobe'),
3872- ('wood', 'Wood'),
3873- ('mud', 'Mud'),
3874- ('thatch', 'Thatched'),
3875- ('stone', 'Stone'),
3876- ], 'Roof', sort=False)
3877-
3878- total_surface = fields.Integer('Surface', help="Surface in sq. meters")
3879- bedrooms = fields.Integer('Bedrooms')
3880- bathrooms = fields.Integer('Bathrooms')
3881-
3882- housing = fields.Selection([
3883- (None, ''),
3884- ('0', 'Shanty, deficient sanitary conditions'),
3885- ('1', 'Small, crowded but with good sanitary conditions'),
3886- ('2', 'Comfortable and good sanitary conditions'),
3887- ('3', 'Roomy and excellent sanitary conditions'),
3888- ('4', 'Luxury and excellent sanitary conditions'),
3889- ], 'Conditions',
3890- help="Housing and sanitary living conditions", sort=False)
3891-
3892- sewers = fields.Boolean('Sanitary Sewers')
3893- water = fields.Boolean('Running Water')
3894- trash = fields.Boolean('Trash recollection')
3895- electricity = fields.Boolean('Electrical supply')
3896- gas = fields.Boolean('Gas supply')
3897- telephone = fields.Boolean('Telephone')
3898- television = fields.Boolean('Television')
3899- internet = fields.Boolean('Internet')
3900-
3901- members = fields.One2Many('party.party', 'du', 'Members', readonly=True)
3902-
3903- def on_change_with_urladdr(self):
3904- # Generates the URL to be used in OpenStreetMap
3905- # The address will be mapped to the URL in the following way
3906- # If the latitud and longitude of the DU are given, then those
3907- # parameters will be used.
3908- # Otherwise, it will try to find the address by the
3909- # Street, municipality, city, postalcode, state and country.
3910-
3911- if (self.latitude and self.longitude):
3912- ret_url = 'http://openstreetmap.org/?mlat=' + \
3913- str(self.latitude) + '&mlon=' + str(self.longitude)
3914-
3915- else:
3916- state = ''
3917- country = ''
3918- street_number = str(self.address_street_number).encode('utf-8') \
3919- or ''
3920- street = (self.address_street).encode('utf-8') or ''
3921- municipality = (self.address_municipality).encode('utf-8') or ''
3922- city = (self.address_city).encode('utf-8') or ''
3923- if (self.address_subdivision):
3924- state = (self.address_subdivision.name).encode('utf-8') or ''
3925- postalcode = (self.address_zip).encode('utf-8') or ''
3926-
3927- if (self.address_country):
3928- country = (self.address_country.code).encode('utf-8') or ''
3929-
3930- ret_url = 'http://nominatim.openstreetmap.org/search?' + \
3931- 'street=' + street_number + ' ' + \
3932- street + '&county=' + municipality \
3933- + '&city=' + city + '&state=' + state \
3934- + '&postalcode=' + postalcode + '&country=' + country
3935-
3936- return ret_url
3937-
3938- @classmethod
3939- def __setup__(cls):
3940- super(DomiciliaryUnit, cls).__setup__()
3941- cls._sql_constraints = [
3942- ('name_uniq', 'UNIQUE(name)',
3943- 'The Domiciliary Unit must be unique !'),
3944- ]
3945
3946
3947 # Use the template as in Product category.
3948@@ -679,6 +1403,14 @@
3949 else:
3950 return self.name
3951
3952+ @classmethod
3953+ def __setup__(cls):
3954+ super(PathologyCategory, cls).__setup__()
3955+ cls._sql_constraints += [
3956+ ('name_uniq', 'UNIQUE(name)',
3957+ 'The category name must be unique'),
3958+ ]
3959+
3960
3961 class PathologyGroup(ModelSQL, ModelView):
3962 'Pathology Groups'
3963@@ -699,6 +1431,14 @@
3964 'disease_group','Members', readonly=True)
3965
3966 @classmethod
3967+ def __setup__(cls):
3968+ super(PathologyGroup, cls).__setup__()
3969+ cls._sql_constraints += [
3970+ ('code_uniq', 'UNIQUE(code)',
3971+ 'The Pathology Group code must be unique'),
3972+ ]
3973+
3974+ @classmethod
3975 def __register__(cls, module_name):
3976 # Upgrade from GNU Health 1.4.5
3977 super(PathologyGroup, cls).__register__(module_name)
3978@@ -858,212 +1598,15 @@
3979 code = fields.Char('Code', required=True)
3980 alternative_id_type = fields.Selection(
3981 [
3982- ('country_id', 'Country of origin SSN'),
3983+ ('country_id', 'Country of origin ID'),
3984 ('passport', 'Passport'),
3985+ ('medical_record', 'Medical Record'),
3986 ('other', 'Other'),
3987 ], 'ID type', required=True, sort=False,)
3988
3989 comments = fields.Char('Comments')
3990
3991
3992-class PartyPatient (ModelSQL, ModelView):
3993- 'Party'
3994- __name__ = 'party.party'
3995-
3996- activation_date = fields.Date(
3997- 'Activation date', help='Date of activation of the party')
3998-
3999- alias = fields.Char('Alias', help='Common name that the Party is reffered')
4000- ref = fields.Char(
4001- 'SSN',
4002- help='Patient Social Security Number or equivalent',
4003- states={'invisible': Not(Bool(Eval('is_person')))})
4004-
4005- unidentified = fields.Boolean(
4006- 'Unidentified',
4007- help='Patient is currently unidentified',
4008- states={'invisible': Not(Bool(Eval('is_person')))})
4009-
4010- is_person = fields.Boolean(
4011- 'Person',
4012- on_change_with=['is_person', 'is_patient', 'is_healthprof'],
4013- help='Check if the party is a person.')
4014-
4015- is_patient = fields.Boolean(
4016- 'Patient',
4017- states={'invisible': Not(Bool(Eval('is_person')))},
4018- help='Check if the party is a patient')
4019-
4020- is_healthprof = fields.Boolean(
4021- 'Health Prof',
4022- states={'invisible': Not(Bool(Eval('is_person')))},
4023- help='Check if the party is a health professional')
4024-
4025- is_institution = fields.Boolean(
4026- 'Institution', help='Check if the party is a Medical Center')
4027- is_insurance_company = fields.Boolean(
4028- 'Insurance Company', help='Check if the party is an Insurance Company')
4029- is_pharmacy = fields.Boolean(
4030- 'Pharmacy', help='Check if the party is a Pharmacy')
4031-
4032- lastname = fields.Char('Last Name', help='Last Name')
4033- dob = fields.Date('DoB', help='Date of Birth')
4034-
4035- sex = fields.Selection([
4036- (None, ''),
4037- ('m', 'Male'),
4038- ('f', 'Female'),
4039- ], 'Sex', states={'required': Bool(Eval('is_person'))})
4040-
4041- photo = fields.Binary('Picture')
4042- ethnic_group = fields.Many2One('gnuhealth.ethnicity', 'Ethnic group')
4043-
4044- marital_status = fields.Selection([
4045- (None, ''),
4046- ('s', 'Single'),
4047- ('m', 'Married'),
4048- ('c', 'Concubinage'),
4049- ('w', 'Widowed'),
4050- ('d', 'Divorced'),
4051- ('x', 'Separated'),
4052- ], 'Marital Status', sort=False)
4053-
4054- citizenship = fields.Many2One(
4055- 'country.country', 'Citizenship', help='Country of Citizenship')
4056- residence = fields.Many2One(
4057- 'country.country', 'Country of Residence', help='Country of Residence')
4058- alternative_identification = fields.Boolean(
4059- 'Alternative ID', help='Other type of '
4060- 'identification, not the official SSN from this country health'
4061- ' center. Examples : Passport, foreign ID,..')
4062-
4063- alternative_ids = fields.One2Many(
4064- 'gnuhealth.person_alternative_identification',
4065- 'name', 'Alternative IDs',
4066- states={'invisible': Not(Bool(Eval('alternative_identification')))})
4067-
4068- insurance = fields.One2Many('gnuhealth.insurance', 'name', 'Insurance')
4069-
4070- internal_user = fields.Many2One(
4071- 'res.user', 'Internal User',
4072- help='In GNU Health is the user (doctor, nurse, ...) that logins.When the'
4073- ' party is a health professional, it will be the user'
4074- ' that maps the health professional party. It must be present.',
4075- states={
4076- 'invisible': Not(Bool(Eval('is_healthprof'))),
4077- 'required': Bool(Eval('is_healthprof')),
4078- })
4079-
4080- insurance_company_type = fields.Selection([
4081- (None, ''),
4082- ('state', 'State'),
4083- ('labour_union', 'Labour Union / Syndical'),
4084- ('private', 'Private'),
4085- ], 'Insurance Type', select=True)
4086- insurance_plan_ids = fields.One2Many(
4087- 'gnuhealth.insurance.plan', 'company', 'Insurance Plans')
4088-
4089- du = fields.Many2One('gnuhealth.du', 'Domiciliary Unit')
4090-
4091- @classmethod
4092- def write(cls, parties, vals):
4093- # We use this method overwrite to make the fields that have a unique
4094- # constraint get the NULL value at PostgreSQL level, and not the value
4095- # '' coming from the client
4096-
4097- if vals.get('ref') == '':
4098- vals['ref'] = None
4099- return super(PartyPatient, cls).write(parties, vals)
4100-
4101- @classmethod
4102- def create(cls, vlist):
4103- # We use this method overwrite to make the fields that have a unique
4104- # constraint get the NULL value at PostgreSQL level, and not the value
4105- # '' coming from the client
4106-
4107- vlist = [x.copy() for x in vlist]
4108- for values in vlist:
4109- if 'ref' in values and not values['ref']:
4110- values['ref'] = None
4111-
4112- return super(PartyPatient, cls).create(vlist)
4113-
4114- @classmethod
4115- def __setup__(cls):
4116- super(PartyPatient, cls).__setup__()
4117- cls._sql_constraints += [
4118- ('ref_uniq', 'UNIQUE(ref)', 'The SSN must be unique'),
4119- ('internal_user_uniq', 'UNIQUE(internal_user)',
4120- 'This health professional is already assigned to a party')]
4121-
4122- def get_rec_name(self, name):
4123- if self.lastname:
4124- return self.lastname + ', ' + self.name
4125- else:
4126- return self.name
4127-
4128- @classmethod
4129- def search_rec_name(cls, name, clause):
4130- field = None
4131- for field in ('name', 'lastname'):
4132- parties = cls.search([(field,) + tuple(clause[1:])], limit=1)
4133- if parties:
4134- break
4135- if parties:
4136- return [(field,) + tuple(clause[1:])]
4137- return [(cls._rec_name,) + tuple(clause[1:])]
4138-
4139- def on_change_with_is_person(self):
4140- # Set is_person if the party is a health professional or a patient
4141- if (self.is_healthprof or self.is_patient or self.is_person):
4142- return True
4143-
4144- @classmethod
4145- def validate(cls, parties):
4146- super(PartyPatient, cls).validate(parties)
4147- for party in parties:
4148- party.check_person()
4149-
4150- def check_person(self):
4151- # Verify that health professional and patient
4152- # are unchecked when is_person is False
4153-
4154- if not self.is_person and (self.is_patient or self.is_healthprof):
4155- self.raise_user_error(
4156- "The Person field must be set if the party is a health"
4157- " professional or a patient")
4158-
4159- @classmethod
4160- # Update to version 2.4
4161-
4162- def __register__(cls, module_name):
4163-
4164- cursor = Transaction().cursor
4165- TableHandler = backend.get('TableHandler')
4166- table = TableHandler(cursor, cls, module_name)
4167- # Rename is_doctor to a more general term is_healthprof
4168-
4169- if table.column_exist('is_doctor'):
4170- table.column_rename('is_doctor', 'is_healthprof')
4171-
4172- super(PartyPatient, cls).__register__(module_name)
4173-
4174-class PartyAddress(ModelSQL, ModelView):
4175- 'Party Address'
4176- __name__ = 'party.address'
4177-
4178- relationship = fields.Char(
4179- 'Relationship',
4180- help='Include the relationship with the person - friend, co-worker,'
4181- ' brother,...')
4182- relative_id = fields.Many2One(
4183- 'party.party', 'Contact', domain=[('is_person', '=', True)],
4184- help='Include link to the relative')
4185-
4186- is_school = fields.Boolean(
4187- "School", help="Check this box to mark the school address")
4188- is_work = fields.Boolean(
4189- "Work", help="Check this box to mark the work address")
4190
4191
4192 class ProductCategory(ModelSQL, ModelView):
4193@@ -1161,30 +1704,30 @@
4194 __name__ = 'gnuhealth.patient'
4195
4196 def patient_critical_summary(self, name):
4197- # Patient Critical Information Summary
4198- # The information will be shown in the front page
4199-
4200- critical_info = ""
4201- allergies=""
4202- other_conditions=""
4203- conditions=[]
4204- for disease in self.diseases:
4205- for member in disease.pathology.groups:
4206- '''Retrieve patient allergies'''
4207- if (member.disease_group.name == "ALLERGIC"):
4208- if disease.pathology.name not in conditions:
4209- allergies=allergies + str(disease.pathology.name) + "\n"
4210- conditions.append (disease.pathology.name)
4211-
4212- '''Retrieve patient other relevant conditions '''
4213- '''Chronic and active'''
4214- if (disease.status == "c" or disease.is_active):
4215- if disease.pathology.name not in conditions:
4216- other_conditions=other_conditions + \
4217- disease.pathology.name + "\n"
4218-
4219- return allergies + other_conditions
4220-
4221+ # Patient Critical Information Summary
4222+ # The information will be shown in the front page
4223+
4224+ critical_info = ""
4225+ allergies=""
4226+ other_conditions=""
4227+ conditions=[]
4228+ for disease in self.diseases:
4229+ for member in disease.pathology.groups:
4230+ '''Retrieve patient allergies'''
4231+ if (member.disease_group.name == "ALLERGIC"):
4232+ if disease.pathology.name not in conditions:
4233+ allergies=allergies + str(disease.pathology.name) + "\n"
4234+ conditions.append (disease.pathology.name)
4235+
4236+ '''Retrieve patient other relevant conditions '''
4237+ '''Chronic and active'''
4238+ if (disease.status == "c" or disease.is_active):
4239+ if disease.pathology.name not in conditions:
4240+ other_conditions=other_conditions + \
4241+ disease.pathology.name + "\n"
4242+
4243+ return allergies + other_conditions
4244+
4245 # Get the patient age in the following format : 'YEARS MONTHS DAYS'
4246 # It will calculate the age of the patient while the patient is alive.
4247 # When the patient dies, it will show the age at time of death.
4248@@ -1243,14 +1786,16 @@
4249 fields.Char('Lastname'), 'get_patient_lastname',
4250 searcher='search_patient_lastname')
4251
4252- ssn = fields.Function(
4253- fields.Char('SSN'),
4254- 'get_patient_ssn', searcher='search_patient_ssn')
4255+ puid = fields.Function(
4256+ fields.Char('PUID', help="Person Unique Identifier"),
4257+ 'get_patient_puid', searcher='search_patient_puid')
4258
4259- identification_code = fields.Char(
4260- 'ID', readonly=True,
4261- help='Patient Identifier provided by the Health Center.Is not the'
4262- ' Social Security Number')
4263+ # 2.6 Removed from the patient model and code moved to
4264+ # the patient alternative id as "medical_record"
4265+ # identification_code = fields.Char(
4266+ # 'Code', readonly=True,
4267+ # help='Patient Identifier provided by the Health Center.Is not the'
4268+ # ' Social Security Number')
4269
4270 family = fields.Many2One(
4271 'gnuhealth.family', 'Family', help='Family Code')
4272@@ -1332,7 +1877,7 @@
4273
4274 # ethnic_group = fields.Many2One('gnuhealth.ethnicity', 'Ethnic group')
4275 vaccinations = fields.One2Many(
4276- 'gnuhealth.vaccination', 'name', 'Vaccinations')
4277+ 'gnuhealth.vaccination', 'name', 'Vaccinations', readonly=True)
4278 medications = fields.One2Many(
4279 'gnuhealth.patient.medication', 'name', 'Medications')
4280
4281@@ -1344,7 +1889,7 @@
4282 critical_summary = fields.Function(fields.Text(
4283 'Important disease about patient allergies or procedures',
4284 help='Automated summary of patient allergies and '
4285- 'other critical information'),
4286+ 'other critical information'),
4287 'patient_critical_summary')
4288
4289 critical_info = fields.Text(
4290@@ -1404,14 +1949,14 @@
4291 def get_patient_photo(self, name):
4292 return self.name.photo
4293
4294- def get_patient_ssn(self, name):
4295+ def get_patient_puid(self, name):
4296 return self.name.ref
4297
4298 def get_patient_marital_status(self, name):
4299 return self.name.marital_status
4300
4301 @classmethod
4302- def search_patient_ssn(cls, name, clause):
4303+ def search_patient_puid(cls, name, clause):
4304 res = []
4305 value = clause[2]
4306 res.append(('name.ref', clause[1], value))
4307@@ -1427,12 +1972,12 @@
4308 res.append(('name.lastname', clause[1], value))
4309 return res
4310
4311- # Search by the patient name, lastname or SSN
4312+ # Search by the patient name, lastname or PUID
4313
4314 @classmethod
4315 def search_rec_name(cls, name, clause):
4316 field = None
4317- for field in ('name', 'lastname', 'ssn'):
4318+ for field in ('name', 'lastname', 'puid'):
4319 patients = cls.search([(field,) + tuple(clause[1:])], limit=1)
4320 if patients:
4321 break
4322@@ -1440,20 +1985,6 @@
4323 return [(field,) + tuple(clause[1:])]
4324 return [(cls._rec_name,) + tuple(clause[1:])]
4325
4326- @classmethod
4327- def create(cls, vlist):
4328- Sequence = Pool().get('ir.sequence')
4329- Config = Pool().get('gnuhealth.sequences')
4330-
4331- vlist = [x.copy() for x in vlist]
4332- for values in vlist:
4333- if not values.get('identification_code'):
4334- config = Config(1)
4335- values['identification_code'] = Sequence.get_id(
4336- config.patient_sequence.id)
4337-
4338- return super(PatientData, cls).create(vlist)
4339-
4340 def get_rec_name(self, name):
4341 if self.name.lastname:
4342 return self.name.lastname + ', ' + self.name.name
4343@@ -1523,6 +2054,18 @@
4344
4345 table.drop_column('marital_status')
4346
4347+ # 2.6 Move Identification Code from patient to party
4348+
4349+
4350+ if table.column_exist('identification_code'):
4351+ cursor.execute(
4352+ "INSERT INTO GNUHEALTH_PERSON_ALTERNATIVE_IDENTIFICATION \
4353+ (NAME, ALTERNATIVE_ID_TYPE, CODE) \
4354+ SELECT name, 'medical_record', IDENTIFICATION_CODE \
4355+ FROM GNUHEALTH_PATIENT;")
4356+
4357+ table.drop_column('identification_code')
4358+
4359
4360 # PATIENT DISESASES INFORMATION
4361 class PatientDiseaseInfo(ModelSQL, ModelView):
4362@@ -1674,19 +2217,18 @@
4363
4364 patient = fields.Many2One(
4365 'gnuhealth.patient', 'Patient',
4366- select=True, help='Patient Name', on_change=['patient'],
4367+ select=True, help='Patient Name',
4368 states={'required': (Eval('state') != 'free')})
4369
4370 appointment_date = fields.DateTime('Date and Time')
4371
4372 institution = fields.Many2One(
4373- 'party.party', 'Health Center',
4374- domain=[('is_institution', '=', True)],
4375- help='Medical Center')
4376+ 'gnuhealth.institution', 'Institution',
4377+ help='Health Care Institution')
4378
4379 speciality = fields.Many2One(
4380 'gnuhealth.specialty', 'Specialty',
4381- on_change_with=['healthprof'], help='Medical Specialty / Sector')
4382+ help='Medical Specialty / Sector')
4383
4384 state = fields.Selection([
4385 (None, ''),
4386@@ -1793,14 +2335,16 @@
4387
4388 @staticmethod
4389 def default_institution():
4390- return Transaction().context.get('company')
4391+ return HealthInstitution().get_institution()
4392
4393+ @fields.depends('patient')
4394 def on_change_patient(self):
4395 res = {'state': 'free'}
4396 if self.patient:
4397 res = {'state': 'confirmed'}
4398 return res
4399
4400+ @fields.depends('healthprof')
4401 def on_change_with_speciality(self):
4402 # Return the Current / Main speciality of the Health Professional
4403 # if this speciality has been specified in the HP record.
4404@@ -1853,8 +2397,10 @@
4405 'Appointment Report'
4406 __name__ = 'gnuhealth.appointment.report'
4407
4408- identification_code = fields.Char('Identification Code')
4409- ref = fields.Char('SSN')
4410+ # 2.6 Remove the legacy internal identification code for the institution
4411+ # It's now as part of the party alternative ID (medical_record)
4412+ # identification_code = fields.Char('Identification Code')
4413+ ref = fields.Char('PUID')
4414 patient = fields.Many2One('gnuhealth.patient', 'Patient')
4415 healthprof = fields.Many2One('gnuhealth.healthprofessional', 'Health Prof')
4416 age = fields.Function(fields.Char('Age'), 'get_patient_age')
4417@@ -1900,7 +2446,6 @@
4418 appointment.create_date,
4419 appointment.write_uid,
4420 appointment.write_date,
4421- join1.right.identification_code,
4422 join2.right.ref,
4423 join1.right.id.as_('patient'),
4424 join2.right.sex,
4425@@ -2008,21 +2553,21 @@
4426 'gnuhealth.patient', 'Patient', readonly=True)
4427
4428 healthprof = fields.Many2One(
4429- 'gnuhealth.healthprofessional', 'Prescribed by',
4430- help='Health Professional who prescribed the medicament')
4431+ 'gnuhealth.healthprofessional', 'Health Prof', readonly=True,
4432+ help='Health Professional who prescribed or reviewed the medicament')
4433+
4434+ institution = fields.Many2One(
4435+ 'gnuhealth.institution', 'Institution')
4436
4437 is_active = fields.Boolean(
4438 'Active',
4439- on_change_with=['discontinued', 'course_completed'],
4440 help='Check if the patient is currently taking the medication')
4441
4442 discontinued = fields.Boolean(
4443- 'Discontinued',
4444- on_change_with=['is_active', 'course_completed'])
4445+ 'Discontinued')
4446
4447 course_completed = fields.Boolean(
4448- 'Course Completed',
4449- on_change_with=['is_active', 'discontinued'])
4450+ 'Course Completed')
4451
4452 discontinued_reason = fields.Char(
4453 'Reason for discontinuation',
4454@@ -2109,6 +2654,22 @@
4455 frequency_prn = fields.Boolean(
4456 'PRN', help='Use it as needed, pro re nata')
4457
4458+ infusion = fields.Boolean(
4459+ 'Infusion',
4460+ help='Mark if the medication is in the form of infusion' \
4461+ ' Intravenous, Gastrostomy tube, nasogastric, etc...' )
4462+ infusion_rate = fields.Float('Rate',
4463+ states={'invisible': Not(Bool(Eval('infusion')))})
4464+
4465+ infusion_rate_units = fields.Selection([
4466+ (None, ''),
4467+ ('mlhr', 'mL/hour'),
4468+ ], 'Unit Rate',
4469+ states={'invisible': Not(Bool(Eval('infusion')))},
4470+ select=True, sort=False)
4471+
4472+
4473+
4474 @classmethod
4475 def __setup__(cls):
4476 super(PatientMedication, cls).__setup__()
4477@@ -2163,12 +2724,15 @@
4478
4479 table.drop_column('template')
4480
4481+ @fields.depends('discontinued', 'course_completed')
4482 def on_change_with_is_active(self):
4483 return not (self.discontinued or self.course_completed)
4484
4485+ @fields.depends('is_active', 'course_completed')
4486 def on_change_with_discontinued(self):
4487 return not (self.is_active or self.course_completed)
4488
4489+ @fields.depends('is_active', 'discontinued')
4490 def on_change_with_course_completed(self):
4491 return not (self.is_active or self.discontinued)
4492
4493@@ -2188,6 +2752,18 @@
4494 def default_qty():
4495 return 1
4496
4497+ @staticmethod
4498+ def default_institution():
4499+ HealthInst = Pool().get('gnuhealth.institution')
4500+ institution = HealthInst.get_institution()
4501+ return institution
4502+
4503+ @staticmethod
4504+ def default_healthprof():
4505+ pool = Pool()
4506+ HealthProf= pool.get('gnuhealth.healthprofessional')
4507+ return HealthProf.get_health_professional()
4508+
4509 @classmethod
4510 def validate(cls, medications):
4511 super(PatientMedication, cls).validate(medications)
4512@@ -2214,10 +2790,10 @@
4513 'Patient Vaccination information'
4514 __name__ = 'gnuhealth.vaccination'
4515
4516- name = fields.Many2One('gnuhealth.patient', 'Patient', readonly=True)
4517+ name = fields.Many2One('gnuhealth.patient', 'Patient', required=True)
4518
4519 vaccine = fields.Many2One(
4520- 'product.product', 'Name', required=True,
4521+ 'product.product', 'Vaccine', required=True,
4522 domain=[('is_vaccine', '=', True)],
4523 help='Vaccine Name. Make sure that the vaccine (product) has all the'
4524 ' proper information at product level. Information such as provider,'
4525@@ -2242,8 +2818,7 @@
4526 ' tracking number when available !')
4527
4528 institution = fields.Many2One(
4529- 'party.party', 'Institution',
4530- domain=[('is_institution', '=', True)],
4531+ 'gnuhealth.institution', 'Institution',
4532 help='Medical Center where the patient is being or was vaccinated')
4533
4534 date = fields.DateTime('Date')
4535@@ -2251,6 +2826,25 @@
4536 next_dose_date = fields.DateTime('Next Dose')
4537 observations = fields.Char('Observations')
4538
4539+ institution = fields.Many2One('gnuhealth.institution', 'Institution')
4540+
4541+ healthprof = fields.Many2One(
4542+ 'gnuhealth.healthprofessional', 'Health Prof', readonly=True,
4543+ help="Health Professional who administered or reviewed the vaccine \
4544+ information")
4545+
4546+ @staticmethod
4547+ def default_institution():
4548+ HealthInst = Pool().get('gnuhealth.institution')
4549+ institution = HealthInst.get_institution()
4550+ return institution
4551+
4552+ @staticmethod
4553+ def default_healthprof():
4554+ pool = Pool()
4555+ HealthProf= pool.get('gnuhealth.healthprofessional')
4556+ return HealthProf.get_health_professional()
4557+
4558 @classmethod
4559 def __setup__(cls):
4560 super(PatientVaccination, cls).__setup__()
4561@@ -2297,7 +2891,7 @@
4562 _rec_name = 'prescription_id'
4563
4564 patient = fields.Many2One(
4565- 'gnuhealth.patient', 'Patient', required=True, on_change=['patient'])
4566+ 'gnuhealth.patient', 'Patient', required=True)
4567
4568 prescription_id = fields.Char(
4569 'Prescription ID',
4570@@ -2358,6 +2952,7 @@
4571 # Method that makes the doctor to acknowledge if there is any
4572 # warning in the prescription
4573
4574+ @fields.depends('patient')
4575 def on_change_patient(self):
4576 preg_warning = False
4577 presc_warning_ack = True
4578@@ -2749,8 +3344,7 @@
4579 height = fields.Float('Height', help='Height in centimeters, eg 175')
4580
4581 bmi = fields.Float(
4582- 'Body Mass Index',
4583- on_change_with=['weight', 'height', 'bmi'])
4584+ 'Body Mass Index')
4585
4586 head_circumference = fields.Float(
4587 'Head Circumference',
4588@@ -2760,15 +3354,13 @@
4589 hip = fields.Float('Hip', help='Hip circumference in centimeters, eg 100')
4590
4591 whr = fields.Float(
4592- 'WHR', help='Waist to hip ratio',
4593- on_change_with=['abdominal_circ', 'hip', 'whr'])
4594+ 'WHR', help='Waist to hip ratio')
4595
4596 # DEPRECATION NOTE : SIGNS AND SYMPTOMS FIELDS TO BE REMOVED IN 1.6 .
4597 # NOW WE USE A O2M OBJECT TO MAKE IT MORE SCALABLE, CLEARER AND FUNCTIONAL
4598 # TO WORK WITH THE CLINICAL FINDINGS OF THE PATIENT
4599 loc = fields.Integer(
4600 'Glasgow',
4601- on_change_with=['loc_verbal', 'loc_motor', 'loc_eyes'],
4602 help='Level of Consciousness - on Glasgow Coma Scale : < 9 severe -'
4603 ' 9-12 Moderate, > 13 minor')
4604 loc_eyes = fields.Selection([
4605@@ -2888,6 +3480,13 @@
4606 help='Procedures / Actions to take')
4607
4608 notes = fields.Text('Notes')
4609+
4610+ institution = fields.Many2One('gnuhealth.institution', 'Institution')
4611+
4612+ @staticmethod
4613+ def default_institution():
4614+ return HealthInstitution().get_institution()
4615+
4616
4617 @classmethod
4618 def __setup__(cls):
4619@@ -2987,12 +3586,14 @@
4620 def default_state():
4621 return 'in_progress'
4622
4623+ @fields.depends('weight', 'height', 'bmi')
4624 def on_change_with_bmi(self):
4625 if self.height and self.weight:
4626 if (self.height > 0):
4627 return self.weight / ((self.height / 100) ** 2)
4628 return 0
4629
4630+ @fields.depends('loc_verbal', 'loc_motor', 'loc_eyes')
4631 def on_change_with_loc(self):
4632 return int(self.loc_motor) + int(self.loc_eyes) + int(self.loc_verbal)
4633
4634@@ -3009,6 +3610,7 @@
4635 return datetime.now()
4636
4637 # Calculate the WH ratio
4638+ @fields.depends('abdominal_circ', 'hip', 'whr')
4639 def on_change_with_whr(self):
4640 waist = self.abdominal_circ
4641 hip = self.hip
4642@@ -3098,176 +3700,3 @@
4643 domain=[('code', 'like', 'R%')], required=True)
4644
4645 comments = fields.Char('Comments')
4646-
4647-
4648-# HEALTH CENTER / HOSPITAL INFRASTRUCTURE
4649-class HospitalBuilding(ModelSQL, ModelView):
4650- 'Hospital Building'
4651- __name__ = 'gnuhealth.hospital.building'
4652-
4653- name = fields.Char(
4654- 'Name', required=True,
4655- help='Name of the building within the institution')
4656-
4657- institution = fields.Many2One(
4658- 'party.party', 'Institution',
4659- domain=[('is_institution', '=', True)],
4660- help='Medical Center')
4661-
4662- code = fields.Char('Code')
4663- extra_info = fields.Text('Extra Info')
4664-
4665-
4666-class HospitalUnit(ModelSQL, ModelView):
4667- 'Hospital Unit'
4668- __name__ = 'gnuhealth.hospital.unit'
4669-
4670- name = fields.Char(
4671- 'Name', required=True,
4672- help='Name of the unit, eg Neonatal, Intensive Care, ...')
4673-
4674- institution = fields.Many2One(
4675- 'party.party', 'Institution',
4676- domain=[('is_institution', '=', True)],
4677- help='Medical Center')
4678-
4679- code = fields.Char('Code')
4680- extra_info = fields.Text('Extra Info')
4681-
4682-
4683-class HospitalOR(ModelSQL, ModelView):
4684- 'Operating Room'
4685- __name__ = 'gnuhealth.hospital.or'
4686-
4687- name = fields.Char(
4688- 'Name', required=True, help='Name of the Operating Room')
4689-
4690- institution = fields.Many2One(
4691- 'party.party', 'Institution',
4692- domain=[('is_institution', '=', True)],
4693- help='Medical Center')
4694-
4695- building = fields.Many2One(
4696- 'gnuhealth.hospital.building', 'Building', select=True)
4697-
4698- unit = fields.Many2One('gnuhealth.hospital.unit', 'Unit')
4699- extra_info = fields.Text('Extra Info')
4700-
4701- @classmethod
4702- def __setup__(cls):
4703- super(HospitalOR, cls).__setup__()
4704- cls._sql_constraints = [
4705- ('name_uniq', 'UNIQUE(name, institution)',
4706- 'The Operating Room code must be unique per Health'
4707- ' Center'),
4708- ]
4709-
4710-
4711-class HospitalWard(ModelSQL, ModelView):
4712- 'Hospital Ward'
4713- __name__ = 'gnuhealth.hospital.ward'
4714-
4715- name = fields.Char('Name', required=True, help='Ward / Room code')
4716-
4717- institution = fields.Many2One(
4718- 'party.party', 'Institution',
4719- domain=[('is_institution', '=', True)],
4720- help='Medical Center')
4721-
4722- building = fields.Many2One('gnuhealth.hospital.building', 'Building')
4723- floor = fields.Integer('Floor Number')
4724- unit = fields.Many2One('gnuhealth.hospital.unit', 'Unit')
4725-
4726- private = fields.Boolean(
4727- 'Private', help='Check this option for private room')
4728-
4729- bio_hazard = fields.Boolean(
4730- 'Bio Hazard', help='Check this option if there is biological hazard')
4731-
4732- number_of_beds = fields.Integer(
4733- 'Number of beds', help='Number of patients per ward')
4734-
4735- telephone = fields.Boolean('Telephone access')
4736- ac = fields.Boolean('Air Conditioning')
4737- private_bathroom = fields.Boolean('Private Bathroom')
4738- guest_sofa = fields.Boolean('Guest sofa-bed')
4739- tv = fields.Boolean('Television')
4740- internet = fields.Boolean('Internet Access')
4741- refrigerator = fields.Boolean('Refrigerator')
4742- microwave = fields.Boolean('Microwave')
4743-
4744- gender = fields.Selection((
4745- ('men', 'Men Ward'),
4746- ('women', 'Women Ward'),
4747- ('unisex', 'Unisex'),
4748- ), 'Gender', required=True, sort=False)
4749-
4750- state = fields.Selection((
4751- (None, ''),
4752- ('beds_available', 'Beds available'),
4753- ('full', 'Full'),
4754- ('na', 'Not available'),
4755- ), 'Status', sort=False)
4756-
4757- extra_info = fields.Text('Extra Info')
4758-
4759- @staticmethod
4760- def default_gender():
4761- return 'unisex'
4762-
4763- @staticmethod
4764- def default_number_of_beds():
4765- return 1
4766-
4767-
4768-class HospitalBed(ModelSQL, ModelView):
4769- 'Hospital Bed'
4770- __name__ = 'gnuhealth.hospital.bed'
4771- _rec_name = 'telephone_number'
4772-
4773- name = fields.Many2One(
4774- 'product.product', 'Bed', required=True,
4775- domain=[('is_bed', '=', True)],
4776- help='Bed Number')
4777-
4778- ward = fields.Many2One(
4779- 'gnuhealth.hospital.ward', 'Ward',
4780- help='Ward or room')
4781-
4782- bed_type = fields.Selection((
4783- ('gatch', 'Gatch Bed'),
4784- ('electric', 'Electric'),
4785- ('stretcher', 'Stretcher'),
4786- ('low', 'Low Bed'),
4787- ('low_air_loss', 'Low Air Loss'),
4788- ('circo_electric', 'Circo Electric'),
4789- ('clinitron', 'Clinitron'),
4790- ), 'Bed Type', required=True, sort=False)
4791-
4792- telephone_number = fields.Char(
4793- 'Telephone Number', help='Telephone number / Extension')
4794-
4795- extra_info = fields.Text('Extra Info')
4796-
4797- state = fields.Selection((
4798- ('free', 'Free'),
4799- ('reserved', 'Reserved'),
4800- ('occupied', 'Occupied'),
4801- ('na', 'Not available'),
4802- ), 'Status', readonly=True, sort=False)
4803-
4804- @staticmethod
4805- def default_bed_type():
4806- return 'gatch'
4807-
4808- @staticmethod
4809- def default_state():
4810- return 'free'
4811-
4812- def get_rec_name(self, name):
4813- if self.name:
4814- return self.name.name
4815-
4816- @classmethod
4817- def search_rec_name(cls, name, clause):
4818- return [('name',) + tuple(clause[1:])]
4819
4820=== modified file 'health/health_view.xml'
4821--- health/health_view.xml 2014-01-27 08:27:26 +0000
4822+++ health/health_view.xml 2014-07-17 21:57:19 +0000
4823@@ -65,12 +65,6 @@
4824
4825 <!-- Initial Menu -->
4826 <menuitem name="Health" id="gnuhealth_menu" icon="gnuhealth"/>
4827- <menuitem name="Patients" id="gnuhealth_patients_menu"
4828- parent="gnuhealth_menu" sequence="10" icon="gnuhealth-patient"/>
4829- <menuitem name="Appointments" id="gnuhealth_appointment_menu"
4830- parent="gnuhealth_menu" sequence="20" icon="gnuhealth-appointment"/>
4831- <menuitem name="Prescriptions" id="gnuhealth_prescription_menu"
4832- parent="gnuhealth_menu" sequence="30" icon="gnuhealth-prescription"/>
4833 <menuitem name="Demographics" id="gnuhealth_demographics_menu"
4834 parent="gnuhealth_menu" sequence="40" icon="gnuhealth-demography"/>
4835 <menuitem name="Reporting" id="gnuhealth_reporting_menu"
4836@@ -84,7 +78,7 @@
4837 parent="gnuhealth_conf_menu" sequence="10" icon="gnuhealth-disease"/>
4838 <menuitem name="Procedures" id="gnuhealth_conf_procedure"
4839 parent="gnuhealth_conf_menu" sequence="20" icon="gnuhealth-procedure"/>
4840- <menuitem name="Health Centers" id="gnuhealth_conf_hospital"
4841+ <menuitem name="Institutions" id="gnuhealth_conf_institution"
4842 parent="gnuhealth_conf_menu" sequence="30" icon="gnuhealth-health-center"/>
4843 <menuitem name="Health Professionals" id="gnuhealth_conf_healthprofessionals"
4844 parent="gnuhealth_conf_menu" sequence="40" icon="gnuhealth-healthprofessional"/>
4845@@ -662,7 +656,7 @@
4846 <record model="ir.action.act_window" id="action_gnuhealth_medicament_category_tree">
4847 <field name="name">Medicament categories</field>
4848 <field name="res_model">gnuhealth.medicament.category</field>
4849- <field name="domain">[('parent', '=', False)]</field>
4850+ <field name="domain">[('parent', '=', None)]</field>
4851 </record>
4852
4853 <record model="ir.action.act_window.view" id="act_medicament_category_tree_view1">
4854@@ -794,7 +788,7 @@
4855 <record model="ir.action.act_window" id="action_gnuhealth_pathology_category_tree">
4856 <field name="name">Disease categories</field>
4857 <field name="res_model">gnuhealth.pathology.category</field>
4858- <field name="domain">[('parent', '=', False)]</field>
4859+ <field name="domain">[('parent', '=', None)]</field>
4860 </record>
4861
4862 <record model="ir.action.act_window.view" id="act_pathology_category_tree_view1">
4863@@ -915,6 +909,18 @@
4864 <field name="type">form</field>
4865 <field name="name">party_form</field>
4866 </record>
4867+
4868+ <!-- Add "People" menu at party level -->
4869+
4870+ <record model="ir.action.act_window" id="act_people_form">
4871+ <field name="name">People</field>
4872+ <field name="res_model">party.party</field>
4873+ <field name="domain">[('is_person', '=', True)]</field>
4874+ </record>
4875+
4876+ <menuitem parent="party.menu_party_form" sequence="1"
4877+ icon="gnuhealth-demography"
4878+ action="act_people_form" id="menu_people"/>
4879
4880
4881 <!-- Add the Lastname and SSN (ref) field to the tree view of the party -->
4882@@ -1056,9 +1062,9 @@
4883 <field name="act_window" ref="action_gnuhealth_appointment_view"/>
4884 </record>
4885
4886- <menuitem action="action_gnuhealth_appointment_view"
4887- id="menu_gnuhealth_appointment_list"
4888- icon="gnuhealth-list" parent="gnuhealth_appointment_menu"/>
4889+ <menuitem name="Appointments" action="action_gnuhealth_appointment_view"
4890+ id="gnuhealth_appointment_menu"
4891+ parent="gnuhealth_menu" sequence="20" icon="gnuhealth-appointment"/>
4892
4893 <!-- Shortcut to the Appointments from the Patient -->
4894
4895@@ -1179,6 +1185,19 @@
4896 </record>
4897
4898
4899+<!-- Shortcut to the Patient vaccinations from the patient view -->
4900+ <record model="ir.action.act_window" id="act_vaccination_form1">
4901+ <field name="name">Vaccinations</field>
4902+ <field name="res_model">gnuhealth.vaccination</field>
4903+ <field name="domain">[('name', '=', Eval('active_id'))]</field>
4904+ </record>
4905+ <record model="ir.action.keyword"
4906+ id="act_open_vaccination_keyword1">
4907+ <field name="keyword">form_relate</field>
4908+ <field name="model">gnuhealth.patient,-1</field>
4909+ <field name="action" ref="act_vaccination_form1"/>
4910+ </record>
4911+
4912 <!-- PATIENT DIRECTIONS - PROCEDURES / ACTIONS TO TAKE -->
4913
4914 <record model="ir.ui.view" id="gnuhealth_directions_form">
4915@@ -1285,9 +1304,9 @@
4916 <field name="act_window" ref="action_gnuhealth_patient_view"/>
4917 </record>
4918
4919- <menuitem action="action_gnuhealth_patient_view"
4920- id="menu_gnuhealth_patient_list" parent="gnuhealth_patients_menu"
4921- icon="gnuhealth-list" sequence="10"/>
4922+ <menuitem name="Patients" id="gnuhealth_patients_menu"
4923+ action="action_gnuhealth_patient_view"
4924+ parent="gnuhealth_menu" sequence="10" icon="gnuhealth-patient"/>
4925
4926
4927 <!-- PATIENT EVALUATION -->
4928@@ -1367,34 +1386,166 @@
4929 <field name="act_window" ref="action_gnuhealth_prescription_view"/>
4930 </record>
4931
4932- <menuitem action="action_gnuhealth_prescription_view"
4933- id="menu_gnuhealth_prescription_list" icon="gnuhealth-list"
4934- parent="gnuhealth_prescription_menu" sequence="10"/>
4935-
4936-
4937-<!-- HEALTH CENTERS -->
4938-
4939- <record model="ir.action.act_window" id="action_gnuhealth_hospital">
4940- <field name="name">Centers</field>
4941- <field name="res_model">party.party</field>
4942- <field name="domain">[('is_institution', '=', True)]</field>
4943- </record>
4944-
4945- <record model="ir.action.act_window.view" id="act_gnuhealth_hospital_view_list">
4946- <field name="sequence" eval="10"/>
4947- <field name="view" ref="party.party_view_tree"/>
4948- <field name="act_window" ref="action_gnuhealth_hospital"/>
4949- </record>
4950- <record model="ir.action.act_window.view" id="act_gnuhealth_hospital_form">
4951- <field name="sequence" eval="20"/>
4952- <field name="view" ref="party.party_view_form"/>
4953- <field name="act_window" ref="action_gnuhealth_hospital"/>
4954- </record>
4955-
4956- <menuitem action="action_gnuhealth_hospital"
4957- id="gnuhealth_conf_hospital_center" icon="gnuhealth-list"
4958- parent="gnuhealth_conf_hospital" sequence="1"/>
4959-
4960+
4961+ <menuitem name="Prescriptions" id="gnuhealth_prescription_menu"
4962+ parent="gnuhealth_menu" sequence="30"
4963+ action="action_gnuhealth_prescription_view"
4964+ icon="gnuhealth-prescription"/>
4965+
4966+<!-- Health Institutions -->
4967+
4968+ <record model="ir.ui.view" id="gnuhealth_institution_form">
4969+ <field name="model">gnuhealth.institution</field>
4970+ <field name="type">form</field>
4971+ <field name="name">gnuhealth_institution_form</field>
4972+ </record>
4973+
4974+ <record model="ir.ui.view" id="gnuhealth_institution_tree">
4975+ <field name="model">gnuhealth.institution</field>
4976+ <field name="type">tree</field>
4977+ <field name="name">gnuhealth_institution_tree</field>
4978+ </record>
4979+
4980+ <record model="ir.action.act_window" id="action_gnuhealth_institution">
4981+ <field name="name">Institutions</field>
4982+ <field name="res_model">gnuhealth.institution</field>
4983+ </record>
4984+
4985+ <record model="ir.action.act_window.view" id="act_gnuhealth_institution_tree">
4986+ <field name="sequence" eval="10"/>
4987+ <field name="view" ref="gnuhealth_institution_tree"/>
4988+ <field name="act_window" ref="action_gnuhealth_institution"/>
4989+ </record>
4990+ <record model="ir.action.act_window.view" id="act_gnuhealth_institution_form">
4991+ <field name="sequence" eval="20"/>
4992+ <field name="view" ref="gnuhealth_institution_form"/>
4993+ <field name="act_window" ref="action_gnuhealth_institution"/>
4994+ </record>
4995+
4996+ <menuitem action="action_gnuhealth_institution"
4997+ id="gnuhealth_menu_institution" icon="gnuhealth-health-center"
4998+ parent="gnuhealth_menu" sequence="15"/>
4999+
5000+<!-- Shortcut to the Health center Buildings from the Institution -->
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: