FreeHealth / freehealth

Free and open source Electronic Health Record
https://freehealth.io
Other
44 stars 16 forks source link

patient creation wizard: add phone number #57

Closed jeromecc closed 7 years ago

jeromecc commented 7 years ago

Allow entry of patient's phone number during patient creation.

jeromecc commented 7 years ago

I added landline phone number entry with patient creator wizard: 3d8d3885ec56d16c59a21aee824aa3476a31dbec

Phone number string is added to the database (patient identity table) but it is not displayed in the identity form. We should implement something like FrenchSocialNumberFormData::populateWithPatientData() for baseformwidgets so that patient data from the database is used by form items.

jbroquefere commented 7 years ago

Pourquoi ne pas l'afficher? Le médecin s'attend naturellement à voir afficher ce qu'il aura saisi dans la création du patient...

-- Jean-Baptiste Roquefere

Le 29 mars 2017 à 04:38, jeromecc notifications@github.com a écrit :

I added landline phone number entry with patient creator wizard: 3d8d388

Phone number string is added to the database (patient identity table) but it is not displayed in the identity form. We should implement something like FrenchSocialNumberFormData::populateWithPatientData() for baseformwidgets so that patient data from the database is used by form items.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jeromecc commented 7 years ago

Hi Jean-Baptiste!

That's what I am trying to do... :-) It is more complicated than it seems. Part of the identity form (i am working with subforms/generic/fullidentity_version_2/central.xml) is hard coded with identitywidgetfactory.cpp, for some reasons, phone numbers were not included. So phone numbers are managed with the xml form (data is stored inside a unique episode, inside the episode datbase), but they are linked to the patient database with Tels So if you enter a home/landline phone number, it will be stored in two different places: patient identity table inside patients database and episode blob inside episodes database. We could hack this to work but it doesn't really make sense. If we want to record basic contact information during patient creation (the identity form is not even created yet) we need to transfer contact data inside the users database.

It is easy.

What is less easy is to retrieve all the data entered by users of current an past versions inside forms and copy it in patient database. I will try to do this.

The whole idea of [ xml / html / JavaScript / Qt Designer ui file] user defined forms not hard coded in C++/Qt is fine and great, but I think we should define (or use OpenEHR or standard definitions) a basic core of universal data that is useful in all healthcare settings and hard code it in Qt/C++. Contact information obviously belong to this basic universal core and shouldn't be managed by user defined forms...

More generally, when I work on this identity stuff, I realize that the separation of patients & users is a product of old fashioned healthcare: there should be only users, with different profiles, including patient profile, caretaker profile, etc. We woul simplify the code greatly and allow for active patient monitoring of their data (see https://www.opennotes.org/ that's what i want for FreeHealth in the near future).

jeromecc commented 7 years ago

I would add this: xml element allow for data entered in forms to be included in the patient database (it works with email for instance) but the opposite is note true: if you enter an email directly in the database inside patient identity table, it will not be displayed in the form. It is one way only. form -> database So a quick hack would be to write the other direction: database -> form, but then we have the data in two different parts of the database... So a better fix would be to put all contact info in the identity plugin widget stuff and write a tool to feed the database with contact data already there as form data.

jeromecc commented 7 years ago

Last commit: 4eecec1e224438221797ec977432680fa40245de

Comments about new (experimental) database versioning and update strategy appreciated. :-)

jeromecc commented 7 years ago

I pushed a new update: 30156b140c7642daa67b632f2bc410187b4d0e91

The idea is to fix this annoying phone problem and release version 0.9.10 quickly: users are impatient +++ to see all bug fixes of the past 7 months materialize. Also: FHIO 0.9.9 doesn't build on recent version of Ubuntu/Debian because it is not compatible with MySQL >= 5.6 (or MariaDB equivalent). So we need to release in order to support Ubuntu & Debian again.

jeromecc commented 7 years ago

eb3a9a140e75670a427a4da7b2722422091ba22c patients db update: done TODO:

jeromecc commented 7 years ago

last commit: dc592824cf5ba1ece8fda806941d97d7cf2ad091

In the future contact data should be managed separately from identity, in a dedicated widget. But for now this will do the job.

TODO: see commit message

jeromecc commented 7 years ago

mostly done with 3dc83f5a14dc416c83b4961c484a104b17d3cbb2

jeromecc commented 7 years ago

latest commit 7591ad9c5d03e775f62924cdf0879b91d3c9cc08

i guess it's done until next release see commit msg

jeromecc commented 7 years ago

commit a26ff542789eada100ef0bca90152bd652fc5f40 all ok with MySQL TODO: test with SQLite

jeromecc commented 7 years ago

merged with master with commit ac0cf291adee6664657ca5215f423daa28b3aed3