Giter Site home page Giter Site logo

ninoguba / ionic-researchkit Goto Github PK

View Code? Open in Web Editor NEW
66.0 66.0 27.0 4.28 MB

An open source library equivalent of Apple's ResearchKit Framework built on Ionic which makes it easy to create cross-platform hybrid native apps for medical research or for other research projects.

License: MIT License

JavaScript 96.36% CSS 1.36% HTML 2.27%

ionic-researchkit's People

Contributors

dwu95415 avatar ninoguba avatar sgaist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-researchkit's Issues

bower registry

Any reason this is still marked as private in the bower registry?

Image Choice Question Step's Next button grayed out

When an Image Choice Question Step is answered previously, the Next button remains grayed out. It forces the user to answer the question again to enable the Next button. Expected behavior is the Next button should be already enabled.

voice task audio recording on android

@ninoguba - on my android phone, the first time the voice recording is requested, it asks for permission. after setting the permission, it seems that the recording doesn't playback.

launch app, do a voice recording for the first time, will ask for permission, give permission, and then record, try to play back recording.

ng-repeat with dynamic ID causing multiple errors

Trying to dynamically pull in ID's off a JSON play load. This is breaking in the directives as it will crashes when the compile encounters another pair of {{.

Sample:

Template

<irk-task ng-repeat="q in questions track by $index">
        <irk-scale-question-step id="{{q.id}}"
          title="{{q.question}}"
          text="1 being Never &amp; 5 Almost Always"
            min="1" max="5" step="1" value="3" />
</irk-task>

I found encounter this code issue here: https://github.com/ninoguba/ionic-researchKit/blob/master/www/lib/ionic-researchkit/ionic-researchkit.js#L670

Error:

ionic.bundle.js:25642 Error: [$parse:syntax] Syntax Error: Token '{' is not a valid identifier at column 18 of the expression [$parent.formData.{{q.id] starting at [{{q.id].
http://errors.angularjs.org/1.4.3/$parse/syntax?p0=%7B&p1=is%20not%20a%20valid%20identifier&p2=18&p3=%24parent.formData.%7B%7Bq.id&p4=%7B%7Bq.id
    at ionic.bundle.js:13380
    at Object.throwError (ionic.bundle.js:26193)
    at Object.identifier (ionic.bundle.js:26140)
    at Object.primary (ionic.bundle.js:26108)
    at Object.unary (ionic.bundle.js:26076)
    at Object.multiplicative (ionic.bundle.js:26063)
    at Object.additive (ionic.bundle.js:26054)
    at Object.relational (ionic.bundle.js:26045)
    at Object.equality (ionic.bundle.js:26036)
    at Object.logicalAND (ionic.bundle.js:26028)

Allow easy customization of UI buttons

By default, the style of (most) buttons are using button-positive.

If you need to customize the style of individual buttons, you can now define their styles in CSS by adding the following in you own CSS file.

.button.irk-button-step-previous, 
.button.irk-button-step-cancel,
.button.irk-button-step-next,
.button.irk-button-step-skip {
    border-color: #cccccc;
    background-color: #cccccc;
    color: #fff; 
}
.button.irk-button-step-previous:hover, 
.button.irk-button-step-cancel:hover,
.button.irk-button-step-next:hover, 
.button.irk-button-step-skip:hover {
    color: #fff;
    text-decoration: none; 
}
.button.irk-button-step-previous.active, .button.irk-button-step-previous.activated,
.button.irk-button-step-cancel.active, .button.irk-button-step-cancel.activated,
.button.irk-button-step-next.active, .button.irk-button-step-next.activated,
.button.irk-button-step-skip.active, .button.irk-button-step-skip.activated {
    border-color: #cccccc;
    background-color: #cccccc;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.1); 
}
.button.irk-button-step-previous.button-clear,
.button.irk-button-step-cancel.button-clear,
.button.irk-button-step-next.button-clear,
.button.irk-button-step-skip.button-clear {
    border-color: transparent;
    background: none;
    box-shadow: none;
    color: #cccccc; 
}
.button.irk-button-step-previous.button-icon,
.button.irk-button-step-cancel.button-icon,
.button.irk-button-step-next.button-icon,
.button.irk-button-step-skip.button-icon {
    border-color: transparent;
    background: none; 
}
.button.irk-button-step-previous.button-outline,
.button.irk-button-step-cancel.button-outline,
.button.irk-button-step-next.button-outline,
.button.irk-button-step-skip.button-outline {
    border-color: #cccccc;
    background: transparent;
    color: #cccccc; 
}
.button.irk-button-step-previous.button-outline.active, .button.irk-button-step-previous.button-outline.activated,
.button.irk-button-step-cancel.button-outline.active, .button.irk-button-step-cancel.button-outline.activated,
.button.irk-button-step-next.button-outline.active, .button.irk-button-step-next.button-outline.activated,
.button.irk-button-step-skip.button-outline.active, .button.irk-button-step-skip.button-outline.activated {
    background-color: #cccccc;
    box-shadow: none;
    color: #fff; 
} 

This will change the color of the PREVIOUS, CANCEL, NEXT, SKIP buttons to light gray for example. You can mix and match colors and style however you like.

Here's a list of button classes that you can customize for a different look:

  • irk-button-step-previous
  • irk-button-step-cancel
  • irk-button-step-next
  • irk-button-step-skip
  • irk-button-instruction
  • irk-button-learn-more
  • irk-button-learn-more-done
  • irk-button-consent-agree
  • irk-button-consent-disagree
  • irk-button-consent-popup-agree
  • irk-button-consent-popup-disagree
  • irk-button-signature-clear
  • irk-button-signature-sign

Remember to include your custom CSS after the ionic.css and ionic-researchkit.css files in your main index.html file.

How to add an array of choices (irk-text-choice) for irk-text-choice-question-step

I want to add an array of multiple questions based on dynamic data stored in JSON.
This is how I am trying to do it:
<irk-task>
<irk-text-choice-question-step ng-repeat=item in items style="multiple">
<irk-text-choice text="{{item.text}}" value="{{item.value}}"></irk-text-choice>
</irk-text-choice-question-step>
</irk-task>
It doesn't seem to work.
I tried this which worked but this doesn't allow me to select multiple choices which is crucial to me:
<irk-task>
<irk-text-choice-question-step style='multiple'>
<div ng-repeat=item in items>
<irk-text-choice text='{{item.text}}' value='{{item.value}}'></irk-text-choice>
</div>
</irk-text-choice-question-step>
</irk-task>

In js file in irkTextChoiceQuestionStep in link I am simply doing this:
scope.items = JSON.parse(window.localStorage.interventionData);
This is working fine when I am adding ng-repeat to div but not when I am adding it to irk-text-choice-question-step.

Localization

I would like to add localisation (i18n) to the library. What is the best method/framework for doing this. I was thinking of Angular-translate. What do you think.

Update to Ionic 1.2.4 (now 1.3)

I just updated to Ionic 1.2.4 and have so far only seen the following compatibility issue(s):

  • Scaled Question Step sliders don't slide on actual mobile devices as expected (thanks to Andrew for reporting)

According to Ionic's blog post on the release of version 1.2, they've made significant changes to the following components that require more analysis to fully support them with Ionic-ResearchKit.

  • ion-slides
  • ion-input
  • ion-label

Please stay tuned for updates.

Thanks,
Nino

Displaying data from Service

I was wondering is it possible to pass data retrieved from service to survey or consent form.

$scope.consentDatazzzz = [
{id: 'id041', type: 'overview', summary: 'overview 1', content:'AAAAAA'},
{id: 'id042', type: 'data-gathering', summary: 'overview 2', content:'BBBBB'},
{id: 'id043', type: 'privacy', summary: 'overview 3', content:'CCCC'},
{id: 'id044', type: 'data-use', summary: 'overview 4', content:'DDDD'},
{id: 'id045', type: 'time-commitment', summary: 'overview 4', content:'EEEE'},
];

and using something like is not working for me:

<irk-task ng-repeat="consentData in consentDatazzzz">
<irk-visual-consent-step id="{{consentData.id}}" type="{{consentData.type}}" summary="{{consentData.summary}}">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam adhuc, meo fortasse vitio, quid ego quaeram non perspicis. Plane idem, inquit, et maxima quidem, qua fieri nulla maior potest. Quonam, inquit, modo?
</irk-visual-consent-step>
</irk-task>

Cheers
Asif

Image Choice Question Step's selected label text is not set to the corresponding answer

This happens when there are multiple Image Choice Question steps in succession, and when all previously answered and the user goes back to any of them, the selected label text shows the value text of the latest answered Image Choice Question.

Expected behavior is the selected label text should show the corresponding value text of the answer to the current Image Choice Question step shown.

Countdown and progress timers aren't so smooth

They work as expected. The minor issue is the way their UI look. For every second that elapses only then will the circular/line progress bar updates so it looks jumping rather than continuous.

Audio Active Task doesn't support a live waveform when recording

The cordova-media-plugin works for recording and playback but it lacks the ability to gather audio levels while audio is recording.

An alternate plugin, cordova-media-with-compression, was used that has a getRecordLevels() method but unfortunately it is not returning the data expected and not showing any errors either.

Rename project to ionic-researchToolKit

Because Apple has a trademark on "ResearchKit", to avoid any issues this project will be renamed to ionic-researchToolKit or ionic-RTK for short.

For comments, suggestions or objections, let me know on this thread.

Issue with scaled step task on mobile devices

Hi,
I'm very new to both Ionic and Angular, so may be making a schoolboy error, but when I try to run the ResearchKit starter app on either my Android phone or iPad I find that the range widgets within irkScaleQuestionStep do not appear to work (they are OK in a web browser).

I think that this might be a similar problem to the case highlighted in the below link, i.e. the slidebox's events seem to override the range's events. On Android I can tap the range input and the button will move to the point I've tapped, however I can't drag it (the slidebox drags instead). On iOS I can't tap or drag - drag moves the slidebox.

I've tried to implement the fix suggested below, but only succeeded in preventing the slidebox from moving when dragging on the range widget. However the range widget itself still does not move. As you are obviously more experienced with both platforms do you have any ideas? I am using Ionic 1.2.4 and Angular 1.4.3.

https://forum.ionicframework.com/t/range-slider-in-slide-box-slide-how-to-prevent-event-bubbling/4075

Thanks, Andrew

Multiple Audio Active Tasks are not working as expected

When there are more than one audio active task, the countdown timer is not contained to just the "active" audio task and when the countdown expires the "next step" is triggered even for the "inactive" audio task step.

irk-numeric-question-step doesn't show number keypad on iOS

Hi there,

I found on my iOS 9.1 simulator (I don't have access to a wide range of devices, so I'm unsure exactly which versions are showing this) when clicking the irk-numeric-question-step field it shows the normal keyboard. I was able to get the number keypad to show up by modifying the directive via adding pattern="[0-9]*" to the input tag.

Edit: alternatively setting type="tel" on the input tag fixes the issue and allows for enforcing a maxlength (again, unsure of compatibilities with older devices).

Hope this helps.

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.