2,851
edits
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
-- Define biomarkers with their long form and system | -- Define biomarkers with their long form and system | ||
local biomarkers = { | local biomarkers = { | ||
SBP = { | SBP = {name = "Systolic Blood Pressure (SBP)", system = "Cardiovascular System"}, | ||
DBP = { | DBP = {name = "Diastolic Blood Pressure (DBP)", system = "Cardiovascular System"}, | ||
HDL = { | HDL = {name = "High-Density Lipoprotein (HDL)", system = "Endocrine Metabolic System"}, | ||
LDL = { | LDL = {name = "Low-Density Lipoprotein (LDL)", system = "Endocrine Metabolic System"} | ||
} | } | ||
Line 45: | Line 45: | ||
-- Column headers: Biomarker and System | -- Column headers: Biomarker and System | ||
wikitable = wikitable .. ' !! Biomarker | wikitable = wikitable .. ' System !! Biomarker' | ||
for _, study in pairs(studies) do | for _, study in pairs(studies) do | ||
wikitable = wikitable .. ' !! ' .. study.name | wikitable = wikitable .. ' !! ' .. study.name | ||
end | end | ||
-- Generate rows for each biomarker | -- Generate rows for each biomarker | ||
for abbr, details in pairs(biomarkers) do | for abbr, details in pairs(biomarkers) do | ||
wikitable = wikitable .. '\n|-\n| ' .. details. | wikitable = wikitable .. '\n|-\n| ' .. details.system .. ' || ' .. details.name | ||
for _, study in pairs(studies) do | for _, study in pairs(studies) do | ||
-- Retrieve data value for the current cell, using the nested structure | -- Retrieve data value for the current cell, using the nested structure |