nextcloud / health

Nextcloud health app
GNU Affero General Public License v3.0
95 stars 19 forks source link

Feature proposal: blood pressure #23

Open jacob418 opened 4 years ago

jacob418 commented 4 years ago

For various reasons it would be good to be able to record blood pressure (bp) since its an important health indicator.

Things to consider:

15 is proposing fluid intake, this is also related as well as food intake would be. But i think these will be different new features. Anyway in case all get implemented, connecting the data somehow to the bp plot would be also good.

datenangebot commented 4 years ago

Thanks for that proposal. I added it to the first big milestone.

ghost commented 3 years ago

Are there any IOT-devices that could automatically forward the results?

cyroxx commented 3 years ago

I have a blood pressure monitor at hand which gives

These values can be exported as CSV from the app. I would like to be able to import these into Nextcloud for further analysis/monitoring. Is there anything where I could help to make it happen? What would be a good start to setup a development environment and to implement this?

datenangebot commented 3 years ago

I have a blood pressure monitor at hand which gives

  • timestamp
  • timezone
  • systole (mmHg)
  • diastole (mmHg)
  • pulse (bpm)
  • arhythmic heartbeats detected?
  • cuff placement control ("Manschettensitzkontrolle")
  • name of device (e.g. "RS3 Intelli IT")

These values can be exported as CSV from the app. I would like to be able to import these into Nextcloud for further analysis/monitoring. Is there anything where I could help to make it happen? What would be a good start to setup a development environment and to implement this?

Hi,

a very basic solution could be to import the values direct into the database. Depending on your environment that could be an easy job -> phpMyAdmin etc. If there are fields missing, you can put it into the comment or dive into development to add the field. If you are familiar with that topic you could make an import section for data, but that is a bit tricky!

You ask for a good start for a setup. Like for every app, you should install all dependencies, see https://docs.nextcloud.com/server/21/developer_manual/getting_started/devenv.html. Here you need specially nodejs and npm. The frontend is preprocessed with vuejs. Clone the repo and try to install all npm dependencies with "npm install". After that you should be able to precompile the packenges with "npm run watch".

For me it was a hard beginning until this nodejs thing is running. So feel free to ask, I will try to help you...

cyroxx commented 3 years ago

I have Nextcloud running and checked out version 21d18f097f8b698a939347c29f977f49b8c0d596 of the health app into the apps folder. npm install gave a couple of warnings, but no errors and npm run watch looked also good.

However, when I tried to enable the Health app from the settings, this is what I got:

"Return value of OCA\\Health\\Migration\\Version0123Date20201028200000::extendPersons() must be of the type bool, none returned"

full error:


{"reqId":"eQ4Cic2XS5GAqPzBEGAz","level":3,"time":"2021-04-13T23:23:04+00:00","remoteAddr":"127.0.0.1","user":"admin","app":"index","method":"POST","url":"/nextcloud/settings/apps/enable","message":{"Exception":"Exception","Message":"Return value of OCA\\Health\\Migration\\Version0123Date20201028200000::extendPersons() must be of the type bool, none returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"TypeError","Message":"Return value of OCA\\Health\\Migration\\Version0123Date20201028200000::extendPersons() must be of the type bool, none returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/health/lib/Migration/Version0123Date20201028200000.php","line":44,"function":"extendPersons","class":"OCA\\Health\\Migration\\Version0123Date20201028200000","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/MigrationService.php","line":455,"function":"changeSchema","class":"OCA\\Health\\Migration\\Version0123Date20201028200000","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/MigrationService.php","line":418,"function":"migrateSchemaOnly","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/nextcloud/lib/private/Installer.php","line":163,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->"},{"file":"/var/www/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/health/lib/Migration/Version0123Date20201028200000.php","Line":96},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0","version":"21.0.1.1"}
datenangebot commented 3 years ago

well okay, the node stuff is running. Very good. The version you cloned is still ongoing (from the last evening:)), but install should be possible. The error is in a former migration step, I have to check that. Can you tell me your php and db product and version please?