{"action":"created","comment":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments/150927744","pull_request_review_id":76552958,"id":150927744,"diff_hunk":"@@ -2731,6 +2754,132 @@ - (NSString *)stringForAnswer:(id)answer {\n @end\n \n \n+#pragma mark - ORKWeightAnswerFormat\n+\n+@implementation ORKWeightAnswerFormat\n+\n+- (Class)questionResultClass {\n+    return [ORKNumericQuestionResult class];\n+}\n+\n+- (NSString *)canonicalUnitString {\n+    return @\"kg\";\n+}\n+\n+- (ORKNumericQuestionResult *)resultWithIdentifier:(NSString *)identifier answer:(NSNumber *)answer {\n+    ORKNumericQuestionResult *questionResult = (ORKNumericQuestionResult *)[super resultWithIdentifier:identifier answer:answer];\n+    // Use canonical unit because we expect results to be consistent regardless of the user locale\n+    questionResult.unit = [self canonicalUnitString];\n+    return questionResult;\n+}\n+\n+- (instancetype)init {\n+    self = [self initWithMeasurementSystem:ORKMeasurementSystemLocal];\n+    return self;\n+}\n+\n+- (instancetype)initWithMeasurementSystem:(ORKMeasurementSystem)measurementSystem {\n+    self = [super init];\n+    if (self) {\n+        _additionalPrecision = NO;\n+        _measurementSystem = measurementSystem;\n+    }\n+    return self;\n+}\n+\n+- (instancetype)initWithDefaultValue:(nullable NSNumber *)defaultValue\n+                        minimumValue:(nullable NSNumber *)minimumValue\n+                        maximumValue:(nullable NSNumber *)maximumValue\n+                       valueInterval:(nullable NSNumber *)valueInterval\n+                 additionalPrecision:(BOOL)additionalPrecision\n+                   measurementSystem:(ORKMeasurementSystem)measurementSystem {\n+    self = [super init];\n+    if (self) {\n+        _defaultValue = defaultValue;\n+        _minimumValue = minimumValue;\n+        _maximumValue = maximumValue;\n+        _valueInterval = valueInterval;\n+        _additionalPrecision = additionalPrecision;\n+        _measurementSystem = measurementSystem;\n+    }\n+    return self;\n+}\n+\n+- (BOOL)isEqual:(id)object {\n+    BOOL isParentSame = [super isEqual:object];\n+    \n+    __typeof(self) castObject = object;\n+    return (isParentSame &&\n+            (self.measurementSystem == castObject.measurementSystem));","path":"ResearchKit/Common/ORKAnswerFormat.m","position":97,"original_position":97,"commit_id":"ef1c55cb8e14f409adde0b727fa543c3bdd3d875","original_commit_id":"ef1c55cb8e14f409adde0b727fa543c3bdd3d875","user":{"login":"ninoguba","id":4361804,"avatar_url":"https://avatars1.githubusercontent.com/u/4361804?v=4","gravatar_id":"","url":"https://api.github.com/users/ninoguba","html_url":"https://github.com/ninoguba","followers_url":"https://api.github.com/users/ninoguba/followers","following_url":"https://api.github.com/users/ninoguba/following{/other_user}","gists_url":"https://api.github.com/users/ninoguba/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoguba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoguba/subscriptions","organizations_url":"https://api.github.com/users/ninoguba/orgs","repos_url":"https://api.github.com/users/ninoguba/repos","events_url":"https://api.github.com/users/ninoguba/events{/privacy}","received_events_url":"https://api.github.com/users/ninoguba/received_events","type":"User","site_admin":false},"body":"Yes agreed.","created_at":"2017-11-14T18:52:21Z","updated_at":"2017-11-14T18:52:21Z","html_url":"https://github.com/ResearchKit/ResearchKit/pull/1010#discussion_r150927744","pull_request_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments/150927744"},"html":{"href":"https://github.com/ResearchKit/ResearchKit/pull/1010#discussion_r150927744"},"pull_request":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010"}},"in_reply_to_id":150746233},"pull_request":{"url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010","id":139431021,"html_url":"https://github.com/ResearchKit/ResearchKit/pull/1010","diff_url":"https://github.com/ResearchKit/ResearchKit/pull/1010.diff","patch_url":"https://github.com/ResearchKit/ResearchKit/pull/1010.patch","issue_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/1010","number":1010,"state":"open","locked":false,"title":"Added ORKWeightAnswerFormat","user":{"login":"ninoguba","id":4361804,"avatar_url":"https://avatars1.githubusercontent.com/u/4361804?v=4","gravatar_id":"","url":"https://api.github.com/users/ninoguba","html_url":"https://github.com/ninoguba","followers_url":"https://api.github.com/users/ninoguba/followers","following_url":"https://api.github.com/users/ninoguba/following{/other_user}","gists_url":"https://api.github.com/users/ninoguba/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoguba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoguba/subscriptions","organizations_url":"https://api.github.com/users/ninoguba/orgs","repos_url":"https://api.github.com/users/ninoguba/repos","events_url":"https://api.github.com/users/ninoguba/events{/privacy}","received_events_url":"https://api.github.com/users/ninoguba/received_events","type":"User","site_admin":false},"body":"This adds an answer format for collecting weight mostly based on @rsanchezsaez's ORKHeightAnswerFormat.","created_at":"2017-09-05T22:01:10Z","updated_at":"2017-11-14T18:52:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c05c41c00b98853c101dac52bcae3c7339291d0","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010/commits","review_comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010/comments","review_comment_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/1010/comments","statuses_url":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/ef1c55cb8e14f409adde0b727fa543c3bdd3d875","head":{"label":"ninoguba:weight_answer_format","ref":"weight_answer_format","sha":"ef1c55cb8e14f409adde0b727fa543c3bdd3d875","user":{"login":"ninoguba","id":4361804,"avatar_url":"https://avatars1.githubusercontent.com/u/4361804?v=4","gravatar_id":"","url":"https://api.github.com/users/ninoguba","html_url":"https://github.com/ninoguba","followers_url":"https://api.github.com/users/ninoguba/followers","following_url":"https://api.github.com/users/ninoguba/following{/other_user}","gists_url":"https://api.github.com/users/ninoguba/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoguba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoguba/subscriptions","organizations_url":"https://api.github.com/users/ninoguba/orgs","repos_url":"https://api.github.com/users/ninoguba/repos","events_url":"https://api.github.com/users/ninoguba/events{/privacy}","received_events_url":"https://api.github.com/users/ninoguba/received_events","type":"User","site_admin":false},"repo":{"id":85760705,"name":"ResearchKit","full_name":"ninoguba/ResearchKit","owner":{"login":"ninoguba","id":4361804,"avatar_url":"https://avatars1.githubusercontent.com/u/4361804?v=4","gravatar_id":"","url":"https://api.github.com/users/ninoguba","html_url":"https://github.com/ninoguba","followers_url":"https://api.github.com/users/ninoguba/followers","following_url":"https://api.github.com/users/ninoguba/following{/other_user}","gists_url":"https://api.github.com/users/ninoguba/gists{/gist_id}","starred_url":"https://api.github.com/users/ninoguba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninoguba/subscriptions","organizations_url":"https://api.github.com/users/ninoguba/orgs","repos_url":"https://api.github.com/users/ninoguba/repos","events_url":"https://api.github.com/users/ninoguba/events{/privacy}","received_events_url":"https://api.github.com/users/ninoguba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninoguba/ResearchKit","description":"ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.","fork":true,"url":"https://api.github.com/repos/ninoguba/ResearchKit","forks_url":"https://api.github.com/repos/ninoguba/ResearchKit/forks","keys_url":"https://api.github.com/repos/ninoguba/ResearchKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninoguba/ResearchKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninoguba/ResearchKit/teams","hooks_url":"https://api.github.com/repos/ninoguba/ResearchKit/hooks","issue_events_url":"https://api.github.com/repos/ninoguba/ResearchKit/issues/events{/number}","events_url":"https://api.github.com/repos/ninoguba/ResearchKit/events","assignees_url":"https://api.github.com/repos/ninoguba/ResearchKit/assignees{/user}","branches_url":"https://api.github.com/repos/ninoguba/ResearchKit/branches{/branch}","tags_url":"https://api.github.com/repos/ninoguba/ResearchKit/tags","blobs_url":"https://api.github.com/repos/ninoguba/ResearchKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninoguba/ResearchKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninoguba/ResearchKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninoguba/ResearchKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninoguba/ResearchKit/statuses/{sha}","languages_url":"https://api.github.com/repos/ninoguba/ResearchKit/languages","stargazers_url":"https://api.github.com/repos/ninoguba/ResearchKit/stargazers","contributors_url":"https://api.github.com/repos/ninoguba/ResearchKit/contributors","subscribers_url":"https://api.github.com/repos/ninoguba/ResearchKit/subscribers","subscription_url":"https://api.github.com/repos/ninoguba/ResearchKit/subscription","commits_url":"https://api.github.com/repos/ninoguba/ResearchKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninoguba/ResearchKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninoguba/ResearchKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninoguba/ResearchKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninoguba/ResearchKit/contents/{+path}","compare_url":"https://api.github.com/repos/ninoguba/ResearchKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninoguba/ResearchKit/merges","archive_url":"https://api.github.com/repos/ninoguba/ResearchKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninoguba/ResearchKit/downloads","issues_url":"https://api.github.com/repos/ninoguba/ResearchKit/issues{/number}","pulls_url":"https://api.github.com/repos/ninoguba/ResearchKit/pulls{/number}","milestones_url":"https://api.github.com/repos/ninoguba/ResearchKit/milestones{/number}","notifications_url":"https://api.github.com/repos/ninoguba/ResearchKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninoguba/ResearchKit/labels{/name}","releases_url":"https://api.github.com/repos/ninoguba/ResearchKit/releases{/id}","deployments_url":"https://api.github.com/repos/ninoguba/ResearchKit/deployments","created_at":"2017-03-21T22:39:19Z","updated_at":"2017-03-21T22:39:23Z","pushed_at":"2017-09-21T04:07:01Z","git_url":"git://github.com/ninoguba/ResearchKit.git","ssh_url":"git@github.com:ninoguba/ResearchKit.git","clone_url":"https://github.com/ninoguba/ResearchKit.git","svn_url":"https://github.com/ninoguba/ResearchKit","homepage":"","size":37499,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ResearchKit:master","ref":"master","sha":"6886f9345cdf0fd39a5491dc9845af9e606a404d","user":{"login":"ResearchKit","id":11183179,"avatar_url":"https://avatars3.githubusercontent.com/u/11183179?v=4","gravatar_id":"","url":"https://api.github.com/users/ResearchKit","html_url":"https://github.com/ResearchKit","followers_url":"https://api.github.com/users/ResearchKit/followers","following_url":"https://api.github.com/users/ResearchKit/following{/other_user}","gists_url":"https://api.github.com/users/ResearchKit/gists{/gist_id}","starred_url":"https://api.github.com/users/ResearchKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ResearchKit/subscriptions","organizations_url":"https://api.github.com/users/ResearchKit/orgs","repos_url":"https://api.github.com/users/ResearchKit/repos","events_url":"https://api.github.com/users/ResearchKit/events{/privacy}","received_events_url":"https://api.github.com/users/ResearchKit/received_events","type":"Organization","site_admin":false},"repo":{"id":31979038,"name":"ResearchKit","full_name":"ResearchKit/ResearchKit","owner":{"login":"ResearchKit","id":11183179,"avatar_url":"https://avatars3.githubusercontent.com/u/11183179?v=4","gravatar_id":"","url":"https://api.github.com/users/ResearchKit","html_url":"https://github.com/ResearchKit","followers_url":"https://api.github.com/users/ResearchKit/followers","following_url":"https://api.github.com/users/ResearchKit/following{/other_user}","gists_url":"https://api.github.com/users/ResearchKit/gists{/gist_id}","starred_url":"https://api.github.com/users/ResearchKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ResearchKit/subscriptions","organizations_url":"https://api.github.com/users/ResearchKit/orgs","repos_url":"https://api.github.com/users/ResearchKit/repos","events_url":"https://api.github.com/users/ResearchKit/events{/privacy}","received_events_url":"https://api.github.com/users/ResearchKit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ResearchKit/ResearchKit","description":"ResearchKit is an open source software framework that makes it easy to create apps for medical research or for other research projects.","fork":false,"url":"https://api.github.com/repos/ResearchKit/ResearchKit","forks_url":"https://api.github.com/repos/ResearchKit/ResearchKit/forks","keys_url":"https://api.github.com/repos/ResearchKit/ResearchKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ResearchKit/ResearchKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ResearchKit/ResearchKit/teams","hooks_url":"https://api.github.com/repos/ResearchKit/ResearchKit/hooks","issue_events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/events{/number}","events_url":"https://api.github.com/repos/ResearchKit/ResearchKit/events","assignees_url":"https://api.github.com/repos/ResearchKit/ResearchKit/assignees{/user}","branches_url":"https://api.github.com/repos/ResearchKit/ResearchKit/branches{/branch}","tags_url":"https://api.github.com/repos/ResearchKit/ResearchKit/tags","blobs_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/{sha}","languages_url":"https://api.github.com/repos/ResearchKit/ResearchKit/languages","stargazers_url":"https://api.github.com/repos/ResearchKit/ResearchKit/stargazers","contributors_url":"https://api.github.com/repos/ResearchKit/ResearchKit/contributors","subscribers_url":"https://api.github.com/repos/ResearchKit/ResearchKit/subscribers","subscription_url":"https://api.github.com/repos/ResearchKit/ResearchKit/subscription","commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ResearchKit/ResearchKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ResearchKit/ResearchKit/contents/{+path}","compare_url":"https://api.github.com/repos/ResearchKit/ResearchKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ResearchKit/ResearchKit/merges","archive_url":"https://api.github.com/repos/ResearchKit/ResearchKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ResearchKit/ResearchKit/downloads","issues_url":"https://api.github.com/repos/ResearchKit/ResearchKit/issues{/number}","pulls_url":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls{/number}","milestones_url":"https://api.github.com/repos/ResearchKit/ResearchKit/milestones{/number}","notifications_url":"https://api.github.com/repos/ResearchKit/ResearchKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ResearchKit/ResearchKit/labels{/name}","releases_url":"https://api.github.com/repos/ResearchKit/ResearchKit/releases{/id}","deployments_url":"https://api.github.com/repos/ResearchKit/ResearchKit/deployments","created_at":"2015-03-10T20:05:32Z","updated_at":"2017-11-13T19:37:17Z","pushed_at":"2017-11-14T15:32:31Z","git_url":"git://github.com/ResearchKit/ResearchKit.git","ssh_url":"git@github.com:ResearchKit/ResearchKit.git","clone_url":"https://github.com/ResearchKit/ResearchKit.git","svn_url":"https://github.com/ResearchKit/ResearchKit","homepage":"","size":37495,"stargazers_count":4922,"watchers_count":4922,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":939,"mirror_url":null,"archived":false,"open_issues_count":87,"forks":939,"open_issues":87,"watchers":4922,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010"},"html":{"href":"https://github.com/ResearchKit/ResearchKit/pull/1010"},"issue":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/1010"},"comments":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/issues/1010/comments"},"review_comments":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010/comments"},"review_comment":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/pulls/1010/commits"},"statuses":{"href":"https://api.github.com/repos/ResearchKit/ResearchKit/statuses/ef1c55cb8e14f409adde0b727fa543c3bdd3d875"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ninoguba"}}