{"action":"created","comment":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/comments/209183139","pull_request_review_id":145132163,"id":209183139,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTE4MzEzOQ==","diff_hunk":"@@ -0,0 +1,299 @@\n+/**\n+ * Ohada Balance sheet Controller\n+ *\n+ * This controller is responsible for processing\n+ * the ohada balance sheet (bilan) report.\n+ *\n+ * @module reports/ohada_balance_sheet\n+ *\n+ * @requires lodash\n+ * @requires lib/db\n+ * @requires lib/ReportManager\n+ * @requires lib/errors/BadRequest\n+ */\n+\n+const Q = require('q');\n+const _ = require('lodash');\n+const db = require('../../../../lib/db');\n+const AccountReference = require('../../accounts/references');\n+const ReportManager = require('../../../../lib/ReportManager');\n+\n+// report template\n+const TEMPLATE = './server/controllers/finance/reports/ohada_balance_sheet/report.handlebars';\n+\n+// default report parameters\n+const DEFAULT_PARAMS = {\n+  csvKey : 'accounts',\n+  filename : 'TREE.BALANCE',\n+  orientation : 'landscape',\n+  footerRight : '[page] / [toPage]',\n+};\n+\n+const balanceSheetAssetTable = [\n+  { ref : 'AD', is_title : 1 },\n+  { ref : 'AE', is_title : 0 },\n+  { ref : 'AF', is_title : 0 },\n+  { ref : 'AG', is_title : 0 },\n+  { ref : 'AH', is_title : 0 },\n+  { ref : 'AI', is_title : 1 },\n+  { ref : 'AJ', is_title : 0 },\n+  { ref : 'AK', is_title : 0 },\n+  { ref : 'AL', is_title : 0 },\n+  { ref : 'AM', is_title : 0 },\n+  { ref : 'AN', is_title : 0 },\n+  { ref : 'AP', is_title : 0 },\n+  { ref : 'AQ', is_title : 1 },\n+  { ref : 'AR', is_title : 0 },\n+  { ref : 'AS', is_title : 0 },\n+  { ref : 'AZ', is_title : 1 },\n+  { ref : 'BA', is_title : 0 },\n+  { ref : 'BB', is_title : 0 },\n+  { ref : 'BG', is_title : 0 },\n+  { ref : 'BH', is_title : 0 },\n+  { ref : 'BI', is_title : 0 },\n+  { ref : 'BJ', is_title : 0 },\n+  { ref : 'BK', is_title : 1 },\n+  { ref : 'BQ', is_title : 0 },\n+  { ref : 'BR', is_title : 0 },\n+  { ref : 'BS', is_title : 0 },\n+  { ref : 'BT', is_title : 1 },\n+  { ref : 'BU', is_title : 0 },\n+  { ref : 'BZ', is_title : 1 },\n+];\n+\n+const balanceSheetLiabilityTable = [\n+  { ref : 'CA', is_title : 1 },\n+  { ref : 'CB', is_title : 0 },\n+  { ref : 'CC', is_title : 0 },\n+  { ref : 'CD', is_title : 0 },\n+  { ref : 'CE', is_title : 0 },\n+  { ref : 'CF', is_title : 0 },\n+  { ref : 'CG', is_title : 0 },\n+  { ref : 'CH', is_title : 0 },\n+  { ref : 'CI', is_title : 1 },\n+  { ref : 'CK', is_title : 1 },\n+  { ref : 'CL', is_title : 0 },\n+  { ref : 'CM', is_title : 0 },\n+  { ref : 'CP', is_title : 1 },\n+  { ref : 'DA', is_title : 0 },\n+  { ref : 'DB', is_title : 0 },\n+  { ref : 'DC', is_title : 0 },\n+  { ref : 'DD', is_title : 0 },\n+  { ref : 'DF', is_title : 1 },\n+  { ref : 'DG', is_title : 1 },\n+  { ref : 'DH', is_title : 0 },\n+  { ref : 'DI', is_title : 0 },\n+  { ref : 'DJ', is_title : 0 },\n+  { ref : 'DK', is_title : 0 },\n+  { ref : 'DM', is_title : 0 },\n+  { ref : 'DN', is_title : 0 },\n+  { ref : 'DP', is_title : 0 },\n+  { ref : 'DQ', is_title : 0 },\n+  { ref : 'DR', is_title : 0 },\n+  { ref : 'DS', is_title : 0 },\n+  { ref : 'DT', is_title : 1 },\n+  { ref : 'DV', is_title : 1 },\n+  { ref : 'DZ', is_title : 1 },\n+];\n+\n+// expose to the API\n+exports.document = document;\n+\n+/**\n+ * @function document\n+ * @description process and render the balance report document\n+ */\n+function document(req, res, next) {\n+  const params = req.query;\n+  const context = {};\n+  let report;\n+\n+  _.defaults(params, DEFAULT_PARAMS);\n+\n+  try {\n+    report = new ReportManager(TEMPLATE, req.session, params);\n+  } catch (e) {\n+    next(e);\n+    return;\n+  }\n+\n+  getFiscalYearDetails(params.fiscal_id)\n+    .then(fiscalYear => {\n+      _.merge(context, { fiscalYear });\n+\n+      const dbPromises = [];\n+      const usePrevious = fiscalYear.previous.period_id ?\n+        AccountReference.computeAllAccountReference(fiscalYear.previous.period_id) : [];\n+\n+      dbPromises.push(AccountReference.computeAllAccountReference(fiscalYear.current.period_id));\n+      dbPromises.push(usePrevious);\n+      return Q.all(dbPromises);\n+    })\n+    .spread((current, previous) => {\n+      let list = [];\n+      const currentReferences = formatReferences(_.groupBy(current, 'abbr'));\n+      const previousReferences = formatReferences(_.groupBy(previous, 'abbr'));\n+\n+      const assetTable = balanceSheetAssetTable.map(item => {\n+        item.label = 'REPORT.OHADA.REF_DESCRIPTION.'.concat(item.ref);\n+        if (currentReferences[item.ref]) {\n+          item.currentBrut = currentReferences[item.ref].brut.balance;\n+          item.currentAmo = currentReferences[item.ref].amortissement.balance;\n+          item.currentNet = currentReferences[item.ref].net.balance;\n+          item.previousNet = previousReferences[item.ref] ? previousReferences[item.ref].net.balance : 0;\n+        }\n+\n+        // process manually totals\n+        if (item.ref === 'AD') {\n+          list = ['AE', 'AF', 'AG', 'AH'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'AI') {\n+          list = ['AJ', 'AK', 'AL', 'AM', 'AN', 'AP'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'AQ') {\n+          list = ['AR', 'AS'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'AZ') {\n+          list = ['AE', 'AF', 'AG', 'AH', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AP', 'AR', 'AS'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'BK') {\n+          list = ['BA', 'BB', 'BG', 'BH', 'BI', 'BJ'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'BT') {\n+          list = ['BQ', 'BR', 'BS'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'BZ') {\n+          list = ['AE', 'AF', 'AG', 'AH', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AP', 'AR', 'AS']\n+            .concat(['BA', 'BB', 'BG', 'BH', 'BI', 'BJ', 'BQ', 'BR', 'BS', 'BU']);\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+        return item;\n+      });\n+\n+      const liabilityTable = balanceSheetLiabilityTable.map(item => {\n+        item.label = 'REPORT.OHADA.REF_DESCRIPTION.'.concat(item.ref);\n+        if (currentReferences[item.ref]) {\n+          item.currentBrut = currentReferences[item.ref].brut.balance;\n+          item.currentAmo = currentReferences[item.ref].amortissement.balance;\n+          item.currentNet = currentReferences[item.ref].net.balance;\n+          item.previousNet = previousReferences[item.ref] ? previousReferences[item.ref].net.balance : 0;\n+        }\n+\n+        // process manually totals\n+        if (item.ref === 'CP') {\n+          list = ['CL', 'CM'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'DF') {\n+          list = ['DA', 'DB', 'DC', 'DD'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'DG') {\n+          list = ['CL', 'CM', 'DA', 'DB', 'DC', 'DD'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'DP') {\n+          list = ['DH', 'DI', 'DJ', 'DK', 'DL', 'DM', 'DN'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'DT') {\n+          list = ['DQ', 'DR', 'DS'];\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+\n+        if (item.ref === 'DZ') {\n+          list = ['CL', 'CM', 'DA', 'DB', 'DC', 'DD']\n+            .concat(['DH', 'DI', 'DJ', 'DK', 'DL', 'DM', 'DN'])\n+            .concat(['DQ', 'DR', 'DS'])\n+            .concat(['DV']);\n+          _.extend(item, aggregateReferences(list, currentReferences, previousReferences));\n+        }\n+        return item;\n+      });\n+\n+      _.merge(context, { assetTable, liabilityTable });\n+      return report.render(context);\n+    })\n+    .then(result => {\n+      res.set(result.header).send(result.report);\n+    })\n+    .catch(next);\n+}\n+\n+function aggregateReferences(references, currentDb, previousDb) {\n+  const item = {\n+    currentBrut : 0, currentAmo : 0, currentNet : 0, previousNet : 0,\n+  };\n+\n+  references.forEach(ref => {\n+    item.currentBrut += currentDb[ref] ? currentDb[ref].brut.balance : 0;\n+    item.currentAmo += currentDb[ref] ? currentDb[ref].amortissement.balance : 0;\n+    item.currentNet += currentDb[ref] ? currentDb[ref].net.balance : 0;\n+    item.previousNet += previousDb[ref] ? previousDb[ref].net.balance : 0;\n+  });\n+\n+  return item;\n+}\n+\n+function formatReferences(references) {\n+  const values = {};\n+  Object.keys(references).forEach(key => {\n+    const [brut] = references[key].filter(elt => elt.is_amo_dep === 0);\n+    let [amortissement] = references[key].filter(elt => elt.is_amo_dep === 1);\n+\n+    if (!amortissement) {\n+      amortissement = { balance : 0 };\n+    }\n+\n+    const net = {\n+      abbr : brut.abbr,\n+      description : brut.description,\n+      balance : brut.balance - amortissement.balance,\n+    };\n+\n+    values[key] = { brut, amortissement, net };\n+  });\n+  return values;\n+}\n+\n+function getFiscalYearDetails(fiscalYearId) {\n+  const bundle = {};\n+  // get fiscal year details and the last period id of the fiscal year\n+  const query = `\n+    SELECT \n+      p.id AS period_id, p.end_date,\n+      fy.id, fy.label, fy.previous_fiscal_year_id \n+    FROM fiscal_year fy \n+    JOIN period p ON p.fiscal_year_id = fy.id \n+      AND p.number = (SELECT MAX(period.number) FROM period WHERE period.fiscal_year_id = ?)\n+    WHERE fy.id = ?;\n+  `;\n+  return db.one(query, [fiscalYearId, fiscalYearId])","path":"server/controllers/finance/reports/ohada_balance_sheet/index.js","position":287,"original_position":287,"commit_id":"e84b5f7450de2abc4a79b7b3bc820129702644eb","original_commit_id":"e84b5f7450de2abc4a79b7b3bc820129702644eb","user":{"login":"jniles","id":896472,"node_id":"MDQ6VXNlcjg5NjQ3Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/896472?v=4","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"body":"I think this would be easier to understand if you just did two calls to `getFiscalYearDetails()`.  That way, the function does what we expect - just gets the fiscal year info for one fiscal year identified by the `fiscalYearId`.  It also will make it easier to change in the future if we need to factor in multiple years or something.\r\n\r\nThe pseudocode would look like this:\r\n\r\n```js\r\nlet bundle = {};\r\ngetFiscalYearDetails(params.fiscal_id)\r\n  .then(fiscalYear => {\r\n    bundle.current = fiscalYear;\r\n    \r\n    return fiscalYear.previous_fiscal_year_id ? getFiscalYearDetails(fiscalYear.previous_fiscal_year_id) : {};\r\n  })\r\n  .then(previousFiscalYear => {\r\n   // etc...\r\n  });\r\n```\r\n\r\nWhat do you think?","created_at":"2018-08-10T08:24:22Z","updated_at":"2018-08-10T08:39:12Z","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/3014#discussion_r209183139","pull_request_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/comments/209183139"},"html":{"href":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/3014#discussion_r209183139"},"pull_request":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014"}}},"pull_request":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014","id":207357860,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MzU3ODYw","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/3014","diff_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/3014.diff","patch_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/3014.patch","issue_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/3014","number":3014,"state":"open","locked":false,"title":"report(ohada): bilan report","user":{"login":"mbayopanda","id":5445251,"node_id":"MDQ6VXNlcjU0NDUyNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/5445251?v=4","gravatar_id":"","url":"https://api.github.com/users/mbayopanda","html_url":"https://github.com/mbayopanda","followers_url":"https://api.github.com/users/mbayopanda/followers","following_url":"https://api.github.com/users/mbayopanda/following{/other_user}","gists_url":"https://api.github.com/users/mbayopanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbayopanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbayopanda/subscriptions","organizations_url":"https://api.github.com/users/mbayopanda/orgs","repos_url":"https://api.github.com/users/mbayopanda/repos","events_url":"https://api.github.com/users/mbayopanda/events{/privacy}","received_events_url":"https://api.github.com/users/mbayopanda/received_events","type":"User","site_admin":false},"body":"This PR add the ohada balance sheet (bilan) report.\r\n\r\nBefore use the report, it is necessary to configure correclty accounts references which are used in the ohada balance sheet.\r\n\r\nThe report use these references : \r\n\r\n![actif](https://user-images.githubusercontent.com/5445251/43909263-d1a0eb70-9bf1-11e8-8afd-46e448d6dfde.jpg)\r\n![passif](https://user-images.githubusercontent.com/5445251/43909266-d2c9f514-9bf1-11e8-80b1-af5141b6b6b4.jpg)\r\n\r\nTo produce : \r\n\r\n![image](https://user-images.githubusercontent.com/5445251/43909294-e95756dc-9bf1-11e8-8f1e-f7ba1de840a9.png)\r\n\r\n![image](https://user-images.githubusercontent.com/5445251/43909327-f9668232-9bf1-11e8-924a-85e2f065e41f.png)\r\n","created_at":"2018-08-09T15:33:52Z","updated_at":"2018-08-10T08:39:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c63683e15c7d9f6f9f2de49aa4c73cae64d155af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014/commits","review_comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014/comments","review_comment_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/3014/comments","statuses_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/statuses/e84b5f7450de2abc4a79b7b3bc820129702644eb","head":{"label":"mbayopanda:report-bilan-ohada","ref":"report-bilan-ohada","sha":"e84b5f7450de2abc4a79b7b3bc820129702644eb","user":{"login":"mbayopanda","id":5445251,"node_id":"MDQ6VXNlcjU0NDUyNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/5445251?v=4","gravatar_id":"","url":"https://api.github.com/users/mbayopanda","html_url":"https://github.com/mbayopanda","followers_url":"https://api.github.com/users/mbayopanda/followers","following_url":"https://api.github.com/users/mbayopanda/following{/other_user}","gists_url":"https://api.github.com/users/mbayopanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbayopanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbayopanda/subscriptions","organizations_url":"https://api.github.com/users/mbayopanda/orgs","repos_url":"https://api.github.com/users/mbayopanda/repos","events_url":"https://api.github.com/users/mbayopanda/events{/privacy}","received_events_url":"https://api.github.com/users/mbayopanda/received_events","type":"User","site_admin":false},"repo":{"id":49122869,"node_id":"MDEwOlJlcG9zaXRvcnk0OTEyMjg2OQ==","name":"bhima-2.X","full_name":"mbayopanda/bhima-2.X","owner":{"login":"mbayopanda","id":5445251,"node_id":"MDQ6VXNlcjU0NDUyNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/5445251?v=4","gravatar_id":"","url":"https://api.github.com/users/mbayopanda","html_url":"https://github.com/mbayopanda","followers_url":"https://api.github.com/users/mbayopanda/followers","following_url":"https://api.github.com/users/mbayopanda/following{/other_user}","gists_url":"https://api.github.com/users/mbayopanda/gists{/gist_id}","starred_url":"https://api.github.com/users/mbayopanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbayopanda/subscriptions","organizations_url":"https://api.github.com/users/mbayopanda/orgs","repos_url":"https://api.github.com/users/mbayopanda/repos","events_url":"https://api.github.com/users/mbayopanda/events{/privacy}","received_events_url":"https://api.github.com/users/mbayopanda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbayopanda/bhima-2.X","description":"A fresh start for bhima to remove large commits","fork":true,"url":"https://api.github.com/repos/mbayopanda/bhima-2.X","forks_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/forks","keys_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/teams","hooks_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/hooks","issue_events_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/issues/events{/number}","events_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/events","assignees_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/assignees{/user}","branches_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/branches{/branch}","tags_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/tags","blobs_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/statuses/{sha}","languages_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/languages","stargazers_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/stargazers","contributors_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/contributors","subscribers_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/subscribers","subscription_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/subscription","commits_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/contents/{+path}","compare_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/merges","archive_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/downloads","issues_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/issues{/number}","pulls_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/pulls{/number}","milestones_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/milestones{/number}","notifications_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/labels{/name}","releases_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/releases{/id}","deployments_url":"https://api.github.com/repos/mbayopanda/bhima-2.X/deployments","created_at":"2016-01-06T08:26:46Z","updated_at":"2017-05-22T12:02:28Z","pushed_at":"2018-08-09T15:20:15Z","git_url":"git://github.com/mbayopanda/bhima-2.X.git","ssh_url":"git@github.com:mbayopanda/bhima-2.X.git","clone_url":"https://github.com/mbayopanda/bhima-2.X.git","svn_url":"https://github.com/mbayopanda/bhima-2.X","homepage":null,"size":14963,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"IMA-WorldHealth:master","ref":"master","sha":"2ffe6b52d0aff1de750bb509ef2a2f2eff38af17","user":{"login":"IMA-WorldHealth","id":5330583,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA1ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/5330583?v=4","gravatar_id":"","url":"https://api.github.com/users/IMA-WorldHealth","html_url":"https://github.com/IMA-WorldHealth","followers_url":"https://api.github.com/users/IMA-WorldHealth/followers","following_url":"https://api.github.com/users/IMA-WorldHealth/following{/other_user}","gists_url":"https://api.github.com/users/IMA-WorldHealth/gists{/gist_id}","starred_url":"https://api.github.com/users/IMA-WorldHealth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IMA-WorldHealth/subscriptions","organizations_url":"https://api.github.com/users/IMA-WorldHealth/orgs","repos_url":"https://api.github.com/users/IMA-WorldHealth/repos","events_url":"https://api.github.com/users/IMA-WorldHealth/events{/privacy}","received_events_url":"https://api.github.com/users/IMA-WorldHealth/received_events","type":"Organization","site_admin":false},"repo":{"id":49052669,"node_id":"MDEwOlJlcG9zaXRvcnk0OTA1MjY2OQ==","name":"bhima-2.X","full_name":"IMA-WorldHealth/bhima-2.X","owner":{"login":"IMA-WorldHealth","id":5330583,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzMzA1ODM=","avatar_url":"https://avatars1.githubusercontent.com/u/5330583?v=4","gravatar_id":"","url":"https://api.github.com/users/IMA-WorldHealth","html_url":"https://github.com/IMA-WorldHealth","followers_url":"https://api.github.com/users/IMA-WorldHealth/followers","following_url":"https://api.github.com/users/IMA-WorldHealth/following{/other_user}","gists_url":"https://api.github.com/users/IMA-WorldHealth/gists{/gist_id}","starred_url":"https://api.github.com/users/IMA-WorldHealth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IMA-WorldHealth/subscriptions","organizations_url":"https://api.github.com/users/IMA-WorldHealth/orgs","repos_url":"https://api.github.com/users/IMA-WorldHealth/repos","events_url":"https://api.github.com/users/IMA-WorldHealth/events{/privacy}","received_events_url":"https://api.github.com/users/IMA-WorldHealth/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IMA-WorldHealth/bhima-2.X","description":"A hospital information management application for rural Congolese hospitals","fork":false,"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X","forks_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/forks","keys_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/teams","hooks_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/hooks","issue_events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/events{/number}","events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/events","assignees_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/assignees{/user}","branches_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/branches{/branch}","tags_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/tags","blobs_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/git/refs{/sha}","trees_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/statuses/{sha}","languages_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/languages","stargazers_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/stargazers","contributors_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/contributors","subscribers_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/subscribers","subscription_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/subscription","commits_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/commits{/sha}","git_commits_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/git/commits{/sha}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/comments{/number}","issue_comment_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/comments{/number}","contents_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/contents/{+path}","compare_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/merges","archive_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/downloads","issues_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues{/number}","pulls_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls{/number}","milestones_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/milestones{/number}","notifications_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/labels{/name}","releases_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/releases{/id}","deployments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/deployments","created_at":"2016-01-05T08:30:30Z","updated_at":"2018-08-10T07:39:31Z","pushed_at":"2018-08-10T07:59:25Z","git_url":"git://github.com/IMA-WorldHealth/bhima-2.X.git","ssh_url":"git@github.com:IMA-WorldHealth/bhima-2.X.git","clone_url":"https://github.com/IMA-WorldHealth/bhima-2.X.git","svn_url":"https://github.com/IMA-WorldHealth/bhima-2.X","homepage":"","size":15101,"stargazers_count":80,"watchers_count":80,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":262,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":47,"open_issues":262,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014"},"html":{"href":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/3014"},"issue":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/3014"},"comments":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/3014/comments"},"review_comments":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014/comments"},"review_comment":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/3014/commits"},"statuses":{"href":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/statuses/e84b5f7450de2abc4a79b7b3bc820129702644eb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jniles"}}