Skip to content

Commit

Permalink
fixed filtering in IssVsRec, added National SOH Compa page for FP, ot…
Browse files Browse the repository at this point in the history
…her config updates
  • Loading branch information
benzerbett committed May 25, 2021
1 parent e5ba194 commit 0a26b80
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 14 deletions.
28 changes: 27 additions & 1 deletion config/endpoints/fp.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ let fp = [
{
page: 'Global',
level: 'All',
name: 'Malaria Commodities',
name: 'Program Commodities',
id: 'all__commodities',
local_url: `${APP_BASE_URL}/api/common/commodities`,
url: `${DHIS_BASE_API_URL}/dataSets/g3RQRuh8ikd.json?fields=dataSetElements[dataElement[id,name]]`,
Expand Down Expand Up @@ -920,6 +920,32 @@ let fp = [
default_org_unit_level: 5,
Notes: ''
},


// {
// page: 'National Summary',
// level: 'National',
// name: 'National Summary',
// id: 'national__summary_facility_mos',
// local_url: `${APP_BASE_URL}/api/national/summary/facility-mos`,
// url: `${DHIS_BASE_API_URL}/analytics.json?dimension=dx:vBtxrMus3Qf;E5ehG5Qmk5Y;KWavo9MWGBT;z5rdAD1Z9rH;ZbLcoTanQnP;Zz6gJ3FAKjr;xvxsOVLQWqh;HP1u3rO8rM7;DWMK6mvF9LH;H7CkBPdObiC;CSjSohGxnxq;KucK2GDza8l;VInUQaQtrrt;J4Pzryd1EYO;Eut7pOhH1P6;iORtndG8LNB;jVgFM6chs6l;t5DOInBnxIC;qBORbeFTtW3;nSfd4EGB2ca`,
// default_period: 'LAST_MONTH',
// default_org_unit: 'HfVjCurKxh2',
// default_org_unit_level: '',
// Notes: ''
// },
{
page: 'National SOH Comparison',
level: 'National',
name: 'SOH Comparison',
id: 'national__soh_comparison',
local_url: `${APP_BASE_URL}/api/national/sohcomparison`,
url: `${DHIS_BASE_API_URL}/analytics.json?dimension=dx:m1U1MJZoK9Q.QvctQfKAQn3;CxoGtEwF44m.QvctQfKAQn3;nGR47qCgOfQ.QvctQfKAQn3;RXJmB0afFhv.QvctQfKAQn3;QZpWVTFZEE7.QvctQfKAQn3;WLS1R40DxXt.QvctQfKAQn3;CH3syaQ3wJ3.QvctQfKAQn3;ri9reJBhA2Y.QvctQfKAQn3;YSjqRqkkQdi.QvctQfKAQn3;uiU7PDbqn74.QvctQfKAQn3;hH9gmEmEhH4.i9dqmLZr7fd;bGGT0F7iRxt.i9dqmLZr7fd;qaBPR9wbWku.i9dqmLZr7fd;AR7RhdC90IV.i9dqmLZr7fd;tfPZ6sGgh4q.i9dqmLZr7fd;XgJfT71Unkn.i9dqmLZr7fd;MsS41X1GEFr.i9dqmLZr7fd;J6qnTev1LXw.i9dqmLZr7fd;AVDzuypqGt9.i9dqmLZr7fd;dl4JcBnxu0X.i9dqmLZr7fd;i3ZaXmQj0jL.HMTuusGLTUj;yqVMu78CyA2.HMTuusGLTUj;BIte0mKNt8v.HMTuusGLTUj;zgKc5Q0QOb6.HMTuusGLTUj;dxx7yqS7BpR.HMTuusGLTUj;DtcvkNfutb4.HMTuusGLTUj;WJFb0MNwc3u.HMTuusGLTUj;mlMAWuMkAzX.HMTuusGLTUj;r9qspMRFu7n.HMTuusGLTUj;ZbzBYUMlTJK.HMTuusGLTUj;CSjSohGxnxq;KucK2GDza8l;VInUQaQtrrt;J4Pzryd1EYO;Eut7pOhH1P6;iORtndG8LNB;jVgFM6chs6l;t5DOInBnxIC;qBORbeFTtW3;nSfd4EGB2ca;vBtxrMus3Qf;E5ehG5Qmk5Y;KWavo9MWGBT;z5rdAD1Z9rH;HP1u3rO8rM7;ZbLcoTanQnP;Zz6gJ3FAKjr;xvxsOVLQWqh;DWMK6mvF9LH;H7CkBPdObiC`,
default_period: 'LAST_MONTH',
default_org_unit: 'HfVjCurKxh2',
default_org_unit_level: '',
Notes: ''
},
{
page: 'Issues vs Receipts',
level: 'National',
Expand Down
8 changes: 4 additions & 4 deletions config/endpoints/hiv.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ let hiv_adult_preps = [
{
page: 'Global',
level: 'All',
name: 'Malaria Commodities',
name: 'Program Commodities',
id: 'all__commodities',
local_url: `${APP_BASE_URL}/api/common/commodities`,
url: `${DHIS_BASE_API_URL}/dataSets/oP3Z3LzFSru.json?fields=dataSetElements[dataElement[id,name]]`,
Expand Down Expand Up @@ -1612,7 +1612,7 @@ const hiv_tb_preps = [
{
page: 'Global',
level: 'All',
name: 'Malaria Commodities',
name: 'Program Commodities',
id: 'all__commodities',
local_url: `${APP_BASE_URL}/api/common/commodities`,
url: `${DHIS_BASE_API_URL}/dataSets/oP3Z3LzFSru.json?fields=dataSetElements[dataElement[id,name]]`,
Expand Down Expand Up @@ -2529,7 +2529,7 @@ const hiv_oi_preps = [
{
page: 'Global',
level: 'All',
name: 'Malaria Commodities',
name: 'Program Commodities',
id: 'all__commodities',
local_url: `${APP_BASE_URL}/api/common/commodities`,
url: `${DHIS_BASE_API_URL}/dataSets/oP3Z3LzFSru.json?fields=dataSetElements[dataElement[id,name]]`,
Expand Down Expand Up @@ -3086,7 +3086,7 @@ const hiv_paed_preps = [
{
page: 'Global',
level: 'All',
name: 'Malaria Commodities',
name: 'Program Commodities',
id: 'all__commodities',
local_url: `${APP_BASE_URL}/api/common/commodities`,
url: `${DHIS_BASE_API_URL}/dataSets/oP3Z3LzFSru.json?fields=dataSetElements[dataElement[id,name]]`,
Expand Down
6 changes: 3 additions & 3 deletions config/endpoints/malaria.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ let m_al = [
{
page: 'Global',
level: 'All',
name: 'Malaria Commodities',
name: 'Program Commodities',
id: 'all__commodities',
local_url: `${APP_BASE_URL}/api/common/commodities`,
url: `${DHIS_BASE_API_URL}/dataSets/RRnz4uPHXdl.json?fields=dataSetElements[dataElement[id,name]]`,
Expand Down Expand Up @@ -695,11 +695,11 @@ let m_al = [
Notes: ''
},
{
page: 'All Malaria Commodities',
page: 'National SOH Comparison',
level: 'National',
name: 'SOH Comparison',
id: 'national__soh_comparison',
local_url: `${APP_BASE_URL}/api/national/allmalariacommodities`,
local_url: `${APP_BASE_URL}/api/national/sohcomparison`,
url: `${DHIS_BASE_API_URL}/analytics.json?dimension=dx:jfUzb86mBSP.miM6uIJ2cWx;HwvUHnslwbh.miM6uIJ2cWx;OLYLVMDHEj8.miM6uIJ2cWx;UJeKVZzAnfS.miM6uIJ2cWx;naztfZrbMtd.miM6uIJ2cWx;EtG9ozt2joA.miM6uIJ2cWx;Umi8ZsiqBHw.miM6uIJ2cWx;Aui7lNDOsSF.HMTuusGLTUj;iZe9QHpC31Y.HMTuusGLTUj;Kkh8ZtRWFmX.HMTuusGLTUj;E7M967QxxFc.HMTuusGLTUj;Wupc6TOJhcK.HMTuusGLTUj;lZCba7Ijb7x.HMTuusGLTUj;ALnonKSyDct.HMTuusGLTUj;BnGDrFwyQp9.rPAsF4cpNxm;c0MB4RmVjxk.rPAsF4cpNxm;qnZmg5tNSMy.rPAsF4cpNxm;gVp1KSFI69G.rPAsF4cpNxm;iOARK31NdLp.rPAsF4cpNxm;imheYfA1Kiw.rPAsF4cpNxm;cPlWFYbBacW.rPAsF4cpNxm`,
default_period: 'LAST_MONTH',
default_org_unit: 'HfVjCurKxh2',
Expand Down
6 changes: 3 additions & 3 deletions config/programs.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ const getPages = (end_points)=>{
"Notes": ""
},
{
"page": "All Malaria Commodities",
"page": "National SOH Comparison",
"level": "National",
"name": "SOH Comparison",
"id": "national__soh_comparison",
"route": `/national/commodities`,
"endpoints": end_points.filter(pg=>pg.page=="All Malaria Commodities"),
"active": end_points.filter(pg=>pg.page=="All Malaria Commodities").length>0,
"endpoints": end_points.filter(pg=>pg.page=="National SOH Comparison"),
"active": end_points.filter(pg=>pg.page=="National SOH Comparison").length>0,
"ouFilter": true,
"Notes": ""
},
Expand Down
2 changes: 1 addition & 1 deletion public/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Since sustainability and longevity are some of the key concerns in the developme

### **Malaria Program**

- As at the time of writing this documentation, we have data of seven (7) malaria commodities visualized in HCD.
- As at the time of writing this documentation, we have commodity data of 3 programs visualized in HCD: **Malaria**, **Family Planning** & **HIV**.
- For the purpose of calculating the months of stock for the health facilities, we calculate the aAMC(adjusted average monthly consumption). To calculate this value, **consumption data** and **weight band data** for the last **6 months** is used. The figure below demonstrates the calculation workflow.

![](assets/media/malaria-amc-calc.png)
Expand Down
4 changes: 2 additions & 2 deletions src/views/National/NatCommodities.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import Table from 'components/Table/Table';
const activProgId = parseFloat(localStorage.getItem('program')) || 1;
const activProg = programs.filter(pr => pr.id == activProgId)[0];
const paige = activProg.pages.filter(
ep => ep.page == 'All Malaria Commodities'
)[0];
ep => ep.id == 'national__soh_comparison'
)[0];
const periodFilterType = paige.periodFilter;
const endpoints = paige.endpoints;

Expand Down

0 comments on commit 0a26b80

Please sign in to comment.