This is related to testing for our Swedish partners.
State 1: study setup modal errors/issues:
Where a theme is not used by geography;
The No numerator/denominator pairs for geography error;
No theme specified for non automatic numerator/denominator pairs (i.e. that use the user's t_rif40_num_demon) [Postgres only - not yet supported in SQL Server];
The view rif40_num_denom is slow; repeated querying makes the study setup modal slow to iniitialise. This is also true after a study is loaded from a file;
Non standard age sex groups OK;
Need to get a study with no ICD codes to work;
Todo (create a new issue #???):
Java Rif40NumDenomService needs to be extended to CREATE/re CREATE the users rif40_num_denom VIEW; preferably by diffing the VIEW text;
The performance of the rif40_num_denom query needs improving
Proposed fix:
Fix Postgres rif40_num_denom to correctly support health themes, inline in middleware, create Rif40NumDenomService to only query rif40_num_denom substitute once:
UNION
SELECT ta.geography,
ta.numerator_table,
ta.numerator_description,
COALESCE(h.description, 'Local user theme') AS theme_description,
ta.denominator_table,
d.description AS denominator_description,
0 automatic
FROM (SELECT g.geography,
g.numerator_table,
g.denominator_table,
n.description AS numerator_description,
n.theme
FROM peter.t_rif40_num_denom g
LEFT OUTER JOIN rif40_tables n ON (n.table_name = g.numerator_table)
) AS ta
LEFT OUTER JOIN rif40_tables d ON (d.table_name = ta.denominator_table)
LEFT OUTER JOIN rif40_health_study_themes h ON (h.theme = ta.theme)
ORDER BY 1, 2, 4;
Add Rif40NumDenom service to front end. Data from rif40_num_denom would be formatted in JSON as required by the front end and initialised once on logon.
getRif40NumDenom: {
"geographies": {
"covering various types of cancers": {
"HALLAND": [{
"geographyDescription": "Halland County, Sweden",
"numeratorTableDescription": "Halland Cancer data 19??-20??",
"themeName": "cancers",
"denominatorTableDescription": "Halland Population 19??-20??.",
"geographyName": "HALLAND",
"themeDescription": "covering various types of cancers",
"automatic": "1",
"denominatorTableName": "HALLAND_POPULATION",
"numeratorTableName": "HALLAND_CANCER"
}
],
"geographyList": [
"HALLAND",
"SAHSULAND",
"STOCKHOLM",
"SWEDEN_COUNTY",
"USA_2014"
],
"SAHSULAND": [{
"geographyDescription": "SAHSU Example geography",
"numeratorTableDescription": "cancer numerator",
"themeName": "cancers",
"denominatorTableDescription": "population health file",
"geographyName": "SAHSULAND",
"themeDescription": "covering various types of cancers",
"automatic": "1",
"denominatorTableName": "POP_SAHSULAND_POP",
"numeratorTableName": "NUM_SAHSULAND_CANCER"
}
],
"STOCKHOLM": [{
"geographyDescription": "Stockholm, Sweden",
"numeratorTableDescription": "Stockholm Cancer data 19??-20??",
"themeName": "cancers",
"denominatorTableDescription": "Stockholm Population 19??-20??.",
"geographyName": "STOCKHOLM",
"themeDescription": "covering various types of cancers",
"automatic": "1",
"denominatorTableName": "STOCKHOLM_POPULATION",
"numeratorTableName": "STOCKHOLM_CANCER"
}
],
"USA_2014": [{
"geographyDescription": "US 2014 Census geography to county level",
"numeratorTableDescription": "SEER Cancer data 1973-2013. 9 States in total",
"themeName": "cancers",
"denominatorTableDescription": "SEER Population 1972-2013. Georgia starts in 1975, Washington in 1974. 9 States in total",
"geographyName": "USA_2014",
"themeDescription": "covering various types of cancers",
"automatic": "1",
"denominatorTableName": "SEER_POPULATION",
"numeratorTableName": "SEER_CANCER"
}
],
"SWEDEN_COUNTY": [{
"geographyDescription": "Sverige to county level",
"numeratorTableDescription": "Sweden Cancer data 19??-20??",
"themeName": "cancers",
"denominatorTableDescription": "Sweden Population 19??-20??.",
"geographyName": "SWEDEN_COUNTY",
"themeDescription": "covering various types of cancers",
"automatic": "1",
"denominatorTableName": "SWEDEN_POPULATION",
"numeratorTableName": "SWEDEN_CANCER"
}
],
"geographyDescriptions": {
"HALLAND": "Halland County, Sweden",
"SAHSULAND": "SAHSU Example geography",
"STOCKHOLM": "Stockholm, Sweden",
"USA_2014": "US 2014 Census geography to county level",
"SWEDEN_COUNTY": "Sverige to county level"
}
},
"South west Sweden test theme": {
"SYDVAST": [{
"geographyDescription": "South West Sweden",
"numeratorTableDescription": "Sydvast test 1 data 2008-2016",
"themeName": "SYDVAST_TEST",
"denominatorTableDescription": "Sydvast test 1 population 2008-2016.",
"geographyName": "SYDVAST",
"themeDescription": "South west Sweden test theme",
"automatic": "0",
"denominatorTableName": "SYDVAST_TEST_1_POPULATION",
"numeratorTableName": "SYDVAST_TEST_1"
}, {
"geographyDescription": "South West Sweden",
"numeratorTableDescription": "Sydvast test 2 data 2008-2016",
"themeName": "SYDVAST_TEST",
"denominatorTableDescription": "Sydvast test 2 population 2008-2016.",
"geographyName": "SYDVAST",
"themeDescription": "South west Sweden test theme",
"automatic": "0",
"denominatorTableName": "SYDVAST_TEST_2_POPULATION",
"numeratorTableName": "SYDVAST_TEST_2"
}, {
"geographyDescription": "South West Sweden",
"numeratorTableDescription": "Sydvast test 3 data 2008-2016",
"themeName": "SYDVAST_TEST",
"denominatorTableDescription": "Sydvast test 3 population 2008-2016.",
"geographyName": "SYDVAST",
"themeDescription": "South west Sweden test theme",
"automatic": "0",
"denominatorTableName": "SYDVAST_TEST_3_POPULATION",
"numeratorTableName": "SYDVAST_TEST_3"
}, {
"geographyDescription": "South West Sweden",
"numeratorTableDescription": "Sydvast test 4 data 2008-2016",
"themeName": "SYDVAST_TEST",
"denominatorTableDescription": "Sydvast test 4 population 2008-2016.",
"geographyName": "SYDVAST",
"themeDescription": "South west Sweden test theme",
"automatic": "0",
"denominatorTableName": "SYDVAST_TEST_4_POPULATION",
"numeratorTableName": "SYDVAST_TEST_4"
}
],
"geographyList": [
"SYDVAST"
],
"geographyDescriptions": {
"SYDVAST": "South West Sweden"
}
}
},
"themes": [{
"name": "cancers",
"description": "covering various types of cancers"
}, {
"name": "SYDVAST_TEST",
"description": "South west Sweden test theme"
}
]
};
This is related to testing for our Swedish partners.
State 1: study setup modal errors/issues:
Todo (create a new issue #???):
Proposed fix: