Code Monkey home page Code Monkey logo

fitbit-to-openmhealth's Introduction

Hi there ๐Ÿ‘‹

I'm a physician & software developer passionate about building digital health applications that support clinical research, help make healthcare more accessible, and improve health outcomes.

At @StanfordBDHG, I work on @StanfordSpezi, an open-source framework for building modern, interoperable digital health applications, and teach @CS342, a course in building real-world solutions for clinical care and research.

fitbit-to-openmhealth's People

Contributors

lila avatar rasalt avatar vishnuravi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lila

fitbit-to-openmhealth's Issues

invalid character error (only when run in codespaces)

When running in codespaces, i get the following:

vscode โžœ /workspaces/fitbit-to-openmhealth (main) $ ./gradlew bootRun

> Task :bootRun

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.5.2)

2021-08-19 15:28:26.830  INFO 3288 --- [           main] c.v.fitbitOMH.FitbitOmhApplication       : Starting FitbitOmhApplication using Java 11.0.12 on codespaces_262bd5 with PID 3288 (/workspaces/fitbit-to-openmhealth/build/classes/java/main started by vscode in /workspaces/fitbit-to-openmhealth)
2021-08-19 15:28:26.831  INFO 3288 --- [           main] c.v.fitbitOMH.FitbitOmhApplication       : No active profile set, falling back to default profiles: default
2021-08-19 15:28:27.477  INFO 3288 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-08-19 15:28:27.484  INFO 3288 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-08-19 15:28:27.484  INFO 3288 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.48]
2021-08-19 15:28:27.526  INFO 3288 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-08-19 15:28:27.526  INFO 3288 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 650 ms
2021-08-19 15:28:27.745  INFO 3288 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-08-19 15:28:27.753  INFO 3288 --- [           main] c.v.fitbitOMH.FitbitOmhApplication       : Started FitbitOmhApplication in 1.288 seconds (JVM running for 1.563)
2021-08-19 15:28:29.520  INFO 3288 --- [nio-8080-exec-1] o.apache.coyote.http11.Http11Processor   : Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x0120x010x000x01.0x030x030x81f0xad0xc90x0fG0x080x0dvS0xcd0xc30xa10xe9[10x0c0xd00xc30x8c0xcbt30x080x830xe80xeaa0xa40xff0xa98 ]. HTTP method names must be tokens
        at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.48.jar:9.0.48]
        at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

2021-08-19 15:28:45.978  INFO 3288 --- [nio-8080-exec-3] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2021-08-19 15:28:45.978  INFO 3288 --- [nio-8080-exec-3] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2021-08-19 15:28:45.979  INFO 3288 --- [nio-8080-exec-3] o.s.web.servlet.DispatcherServlet        : Completed initialization in 0 ms

it still runs, and this only shows up in codespaces. When i run locally on a dev container, i don't get the error. I also don't see the error when i run it in cloudrun...

question on steps ( /step-count/summary endpoint)

When i get my steps from fitbit using the timeseries intraday api:

steps = fitbit.time_series(
            "activities/steps", base_date=today, period=arguments["--range"]
        )

that looks something like this:

{
    "activities-steps": [
        {
            "dateTime": "2021-08-23",
            "value": "4511"
        }
    ],
    "activities-steps-intraday": {
        "dataset": [
            {
                "time": "00:00:00",
                "value": 0
            },
...

this is basicaly giving me a minute by minute step count.

When i convert that using the /step-count/intraday, i got a lot of records. it does look like you are filtering out the zero step count minutes. but min-by-min is probably not that useful. but switching to /step-count/summary, this generates an "internal server error".

$ curl -X POST -H "Content-Type: application/json" -d @./mysteps.json https://fitbit2openmhealth-4srwo7mzta-uc.a.run.app/step-count/summary
{"timestamp":"2021-08-23T15:00:06.935+00:00","status":500,"error":"Internal Server Error","path":"/step-count/summary"}

According to the readme, it says that the input to the /step-count/intraday and /step-count/summary are the same. is that correct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.