{"action":"created","comment":{"url":"https://api.github.com/repos/muccg/rdrf/pulls/comments/63316955","id":63316955,"diff_hunk":"@@ -0,0 +1,72 @@\n+import os\n+from rdrf import models\n+from registry.patients import models as patientmodels\n+from .catalogue import ModelExporterCatalogue\n+from .exporters import ModelExporter\n+\n+\n+# Catalogue with generic exporters\n+catalogue = ModelExporterCatalogue()\n+\n+# Registry specific exporters. Querysets filtered by registry code.\n+registry_catalogue = ModelExporterCatalogue()\n+\n+class RegistryExporter(ModelExporter):\n+    @property\n+    def queryset(self):\n+        return self.model.objects.filter(code=self.exporter_context['registry_code'])\n+\n+\n+class RegistryFormExporter(ModelExporter):\n+    @property\n+    def queryset(self):\n+        return self.model.objects.filter(registry__code=self.exporter_context['registry_code'])\n+\n+\n+class AdjudicationDefinitionExporter(ModelExporter):","path":"rdrf/rdrf/export/model_exporters.py","position":26,"original_position":26,"commit_id":"5a8783c92ef25116f4536b5d1f25e0d28d0312cf","original_commit_id":"5a8783c92ef25116f4536b5d1f25e0d28d0312cf","user":{"login":"id2359","id":1163895,"avatar_url":"https://avatars.githubusercontent.com/u/1163895?v=3","gravatar_id":"","url":"https://api.github.com/users/id2359","html_url":"https://github.com/id2359","followers_url":"https://api.github.com/users/id2359/followers","following_url":"https://api.github.com/users/id2359/following{/other_user}","gists_url":"https://api.github.com/users/id2359/gists{/gist_id}","starred_url":"https://api.github.com/users/id2359/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/id2359/subscriptions","organizations_url":"https://api.github.com/users/id2359/orgs","repos_url":"https://api.github.com/users/id2359/repos","events_url":"https://api.github.com/users/id2359/events{/privacy}","received_events_url":"https://api.github.com/users/id2359/received_events","type":"User","site_admin":false},"body":"Adjudication code is dead so no need to export these models","created_at":"2016-05-16T07:14:02Z","updated_at":"2016-05-16T07:14:02Z","html_url":"https://github.com/muccg/rdrf/pull/6#discussion_r63316955","pull_request_url":"https://api.github.com/repos/muccg/rdrf/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/muccg/rdrf/pulls/comments/63316955"},"html":{"href":"https://github.com/muccg/rdrf/pull/6#discussion_r63316955"},"pull_request":{"href":"https://api.github.com/repos/muccg/rdrf/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/muccg/rdrf/pulls/6","id":70156771,"html_url":"https://github.com/muccg/rdrf/pull/6","diff_url":"https://github.com/muccg/rdrf/pull/6.diff","patch_url":"https://github.com/muccg/rdrf/pull/6.patch","issue_url":"https://api.github.com/repos/muccg/rdrf/issues/6","number":6,"state":"open","locked":false,"title":"Exporter initial version.","user":{"login":"sztamas","id":973139,"avatar_url":"https://avatars.githubusercontent.com/u/973139?v=3","gravatar_id":"","url":"https://api.github.com/users/sztamas","html_url":"https://github.com/sztamas","followers_url":"https://api.github.com/users/sztamas/followers","following_url":"https://api.github.com/users/sztamas/following{/other_user}","gists_url":"https://api.github.com/users/sztamas/gists{/gist_id}","starred_url":"https://api.github.com/users/sztamas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sztamas/subscriptions","organizations_url":"https://api.github.com/users/sztamas/orgs","repos_url":"https://api.github.com/users/sztamas/repos","events_url":"https://api.github.com/users/sztamas/events{/privacy}","received_events_url":"https://api.github.com/users/sztamas/received_events","type":"User","site_admin":false},"body":"Initial version of the exporter for review.\r\nNot all models are exported currently but would like to get some feedback on it.\r\nIn the meantime I will work on import then complete the export.\r\n\r\nThanks","created_at":"2016-05-16T06:50:03Z","updated_at":"2016-05-16T07:14:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4140cc55eb26ae8b172374e3b08e2afaf760b0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/muccg/rdrf/pulls/6/commits","review_comments_url":"https://api.github.com/repos/muccg/rdrf/pulls/6/comments","review_comment_url":"https://api.github.com/repos/muccg/rdrf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/muccg/rdrf/issues/6/comments","statuses_url":"https://api.github.com/repos/muccg/rdrf/statuses/5a8783c92ef25116f4536b5d1f25e0d28d0312cf","head":{"label":"muccg:import_export","ref":"import_export","sha":"5a8783c92ef25116f4536b5d1f25e0d28d0312cf","user":{"login":"muccg","id":2595123,"avatar_url":"https://avatars.githubusercontent.com/u/2595123?v=3","gravatar_id":"","url":"https://api.github.com/users/muccg","html_url":"https://github.com/muccg","followers_url":"https://api.github.com/users/muccg/followers","following_url":"https://api.github.com/users/muccg/following{/other_user}","gists_url":"https://api.github.com/users/muccg/gists{/gist_id}","starred_url":"https://api.github.com/users/muccg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muccg/subscriptions","organizations_url":"https://api.github.com/users/muccg/orgs","repos_url":"https://api.github.com/users/muccg/repos","events_url":"https://api.github.com/users/muccg/events{/privacy}","received_events_url":"https://api.github.com/users/muccg/received_events","type":"Organization","site_admin":false},"repo":{"id":48199721,"name":"rdrf","full_name":"muccg/rdrf","owner":{"login":"muccg","id":2595123,"avatar_url":"https://avatars.githubusercontent.com/u/2595123?v=3","gravatar_id":"","url":"https://api.github.com/users/muccg","html_url":"https://github.com/muccg","followers_url":"https://api.github.com/users/muccg/followers","following_url":"https://api.github.com/users/muccg/following{/other_user}","gists_url":"https://api.github.com/users/muccg/gists{/gist_id}","starred_url":"https://api.github.com/users/muccg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muccg/subscriptions","organizations_url":"https://api.github.com/users/muccg/orgs","repos_url":"https://api.github.com/users/muccg/repos","events_url":"https://api.github.com/users/muccg/events{/privacy}","received_events_url":"https://api.github.com/users/muccg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/muccg/rdrf","description":"The Rare Disease Registry Framework (RDRF) is an open source tool for the creation of web-based patient registries.","fork":false,"url":"https://api.github.com/repos/muccg/rdrf","forks_url":"https://api.github.com/repos/muccg/rdrf/forks","keys_url":"https://api.github.com/repos/muccg/rdrf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/muccg/rdrf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/muccg/rdrf/teams","hooks_url":"https://api.github.com/repos/muccg/rdrf/hooks","issue_events_url":"https://api.github.com/repos/muccg/rdrf/issues/events{/number}","events_url":"https://api.github.com/repos/muccg/rdrf/events","assignees_url":"https://api.github.com/repos/muccg/rdrf/assignees{/user}","branches_url":"https://api.github.com/repos/muccg/rdrf/branches{/branch}","tags_url":"https://api.github.com/repos/muccg/rdrf/tags","blobs_url":"https://api.github.com/repos/muccg/rdrf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/muccg/rdrf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/muccg/rdrf/git/refs{/sha}","trees_url":"https://api.github.com/repos/muccg/rdrf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/muccg/rdrf/statuses/{sha}","languages_url":"https://api.github.com/repos/muccg/rdrf/languages","stargazers_url":"https://api.github.com/repos/muccg/rdrf/stargazers","contributors_url":"https://api.github.com/repos/muccg/rdrf/contributors","subscribers_url":"https://api.github.com/repos/muccg/rdrf/subscribers","subscription_url":"https://api.github.com/repos/muccg/rdrf/subscription","commits_url":"https://api.github.com/repos/muccg/rdrf/commits{/sha}","git_commits_url":"https://api.github.com/repos/muccg/rdrf/git/commits{/sha}","comments_url":"https://api.github.com/repos/muccg/rdrf/comments{/number}","issue_comment_url":"https://api.github.com/repos/muccg/rdrf/issues/comments{/number}","contents_url":"https://api.github.com/repos/muccg/rdrf/contents/{+path}","compare_url":"https://api.github.com/repos/muccg/rdrf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/muccg/rdrf/merges","archive_url":"https://api.github.com/repos/muccg/rdrf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/muccg/rdrf/downloads","issues_url":"https://api.github.com/repos/muccg/rdrf/issues{/number}","pulls_url":"https://api.github.com/repos/muccg/rdrf/pulls{/number}","milestones_url":"https://api.github.com/repos/muccg/rdrf/milestones{/number}","notifications_url":"https://api.github.com/repos/muccg/rdrf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/muccg/rdrf/labels{/name}","releases_url":"https://api.github.com/repos/muccg/rdrf/releases{/id}","deployments_url":"https://api.github.com/repos/muccg/rdrf/deployments","created_at":"2015-12-17T21:41:17Z","updated_at":"2016-03-12T11:12:52Z","pushed_at":"2016-05-16T06:53:08Z","git_url":"git://github.com/muccg/rdrf.git","ssh_url":"git@github.com:muccg/rdrf.git","clone_url":"https://github.com/muccg/rdrf.git","svn_url":"https://github.com/muccg/rdrf","homepage":null,"size":31334,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"next_release"}},"base":{"label":"muccg:next_release","ref":"next_release","sha":"7d6ce7f4c9b0838e8e6d989369ff93687a0552c5","user":{"login":"muccg","id":2595123,"avatar_url":"https://avatars.githubusercontent.com/u/2595123?v=3","gravatar_id":"","url":"https://api.github.com/users/muccg","html_url":"https://github.com/muccg","followers_url":"https://api.github.com/users/muccg/followers","following_url":"https://api.github.com/users/muccg/following{/other_user}","gists_url":"https://api.github.com/users/muccg/gists{/gist_id}","starred_url":"https://api.github.com/users/muccg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muccg/subscriptions","organizations_url":"https://api.github.com/users/muccg/orgs","repos_url":"https://api.github.com/users/muccg/repos","events_url":"https://api.github.com/users/muccg/events{/privacy}","received_events_url":"https://api.github.com/users/muccg/received_events","type":"Organization","site_admin":false},"repo":{"id":48199721,"name":"rdrf","full_name":"muccg/rdrf","owner":{"login":"muccg","id":2595123,"avatar_url":"https://avatars.githubusercontent.com/u/2595123?v=3","gravatar_id":"","url":"https://api.github.com/users/muccg","html_url":"https://github.com/muccg","followers_url":"https://api.github.com/users/muccg/followers","following_url":"https://api.github.com/users/muccg/following{/other_user}","gists_url":"https://api.github.com/users/muccg/gists{/gist_id}","starred_url":"https://api.github.com/users/muccg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muccg/subscriptions","organizations_url":"https://api.github.com/users/muccg/orgs","repos_url":"https://api.github.com/users/muccg/repos","events_url":"https://api.github.com/users/muccg/events{/privacy}","received_events_url":"https://api.github.com/users/muccg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/muccg/rdrf","description":"The Rare Disease Registry Framework (RDRF) is an open source tool for the creation of web-based patient registries.","fork":false,"url":"https://api.github.com/repos/muccg/rdrf","forks_url":"https://api.github.com/repos/muccg/rdrf/forks","keys_url":"https://api.github.com/repos/muccg/rdrf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/muccg/rdrf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/muccg/rdrf/teams","hooks_url":"https://api.github.com/repos/muccg/rdrf/hooks","issue_events_url":"https://api.github.com/repos/muccg/rdrf/issues/events{/number}","events_url":"https://api.github.com/repos/muccg/rdrf/events","assignees_url":"https://api.github.com/repos/muccg/rdrf/assignees{/user}","branches_url":"https://api.github.com/repos/muccg/rdrf/branches{/branch}","tags_url":"https://api.github.com/repos/muccg/rdrf/tags","blobs_url":"https://api.github.com/repos/muccg/rdrf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/muccg/rdrf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/muccg/rdrf/git/refs{/sha}","trees_url":"https://api.github.com/repos/muccg/rdrf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/muccg/rdrf/statuses/{sha}","languages_url":"https://api.github.com/repos/muccg/rdrf/languages","stargazers_url":"https://api.github.com/repos/muccg/rdrf/stargazers","contributors_url":"https://api.github.com/repos/muccg/rdrf/contributors","subscribers_url":"https://api.github.com/repos/muccg/rdrf/subscribers","subscription_url":"https://api.github.com/repos/muccg/rdrf/subscription","commits_url":"https://api.github.com/repos/muccg/rdrf/commits{/sha}","git_commits_url":"https://api.github.com/repos/muccg/rdrf/git/commits{/sha}","comments_url":"https://api.github.com/repos/muccg/rdrf/comments{/number}","issue_comment_url":"https://api.github.com/repos/muccg/rdrf/issues/comments{/number}","contents_url":"https://api.github.com/repos/muccg/rdrf/contents/{+path}","compare_url":"https://api.github.com/repos/muccg/rdrf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/muccg/rdrf/merges","archive_url":"https://api.github.com/repos/muccg/rdrf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/muccg/rdrf/downloads","issues_url":"https://api.github.com/repos/muccg/rdrf/issues{/number}","pulls_url":"https://api.github.com/repos/muccg/rdrf/pulls{/number}","milestones_url":"https://api.github.com/repos/muccg/rdrf/milestones{/number}","notifications_url":"https://api.github.com/repos/muccg/rdrf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/muccg/rdrf/labels{/name}","releases_url":"https://api.github.com/repos/muccg/rdrf/releases{/id}","deployments_url":"https://api.github.com/repos/muccg/rdrf/deployments","created_at":"2015-12-17T21:41:17Z","updated_at":"2016-03-12T11:12:52Z","pushed_at":"2016-05-16T06:53:08Z","git_url":"git://github.com/muccg/rdrf.git","ssh_url":"git@github.com:muccg/rdrf.git","clone_url":"https://github.com/muccg/rdrf.git","svn_url":"https://github.com/muccg/rdrf","homepage":null,"size":31334,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":2,"default_branch":"next_release"}},"_links":{"self":{"href":"https://api.github.com/repos/muccg/rdrf/pulls/6"},"html":{"href":"https://github.com/muccg/rdrf/pull/6"},"issue":{"href":"https://api.github.com/repos/muccg/rdrf/issues/6"},"comments":{"href":"https://api.github.com/repos/muccg/rdrf/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/muccg/rdrf/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/muccg/rdrf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/muccg/rdrf/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/muccg/rdrf/statuses/5a8783c92ef25116f4536b5d1f25e0d28d0312cf"}}}}