Module:Infobox/Épidémie/Brouillon2

Une page de Wikipédia, l'encyclopédie libre.

 Documentation[voir] [modifier] [historique] [purger]

Cette page définit un module d'infobox.


local general = require 'Module:Infobox/Fonctions'
--local localdata = require( 'Module:Infobox/Localdata' )
--local wikidata = require( 'Module:Wikidata' )
local localisation = require "Module:Infobox/Fonctions/Géolocalisation"
local displayFormat = { 'medecine', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut' }

return {
    maincolor = displayFormat[3],
    secondcolor = displayFormat[4],
    thirdcolor = displayFormat[5],
    parts = {
        general.title(displayFormat[1], displayFormat[2], 'nom', nil, false),
        {
            type = 'images',
            imageparameters = 'image1',
            captionparameter = 'légende1', 
            wikidata = { property = 'P1846' },
            numval = 1,
		},
        { type = 'images', imageparameters = 'image2', captionparameter = 'légende2' },
        { type = 'images', imageparameters = 'image3', captionparameter = 'légende3' },
        {
            type = 'table',
            rows = {
                { type = 'row', label = 'Maladie', value = 'maladie', wikidata = { property = 'P242', showonlyqualifier = 'P1545' } },
                { type = 'row', label = 'Agent infectieux', value = { 'agent infectieux', 'type' } },
                { type = 'row', label = 'Origine', value = 'origine'},
                { type = 'row', label = 'Localisation', value = 'localisation', wikidata = { property = 'P17' } },
                localisation.coordinates(),
                { type = 'row', label = 'Premier cas', value = 'premier cas' },
                { type = 'row', label = 'Date d\'arrivée', value = 'date arrivée', wikidata = { property = 'P580' } },
                { type = 'row', label = 'Date de fin', value = 'date fin', wikidata = { property = 'P582' } },
                { type = 'row', label = 'Site web', value = { 'site web', 'description' }, wikidata = { property = 'P973', displayformat = 'weblink', showlang = true } },
            }
        },
        {
            type = 'table',
            title = 'Bilan',
            rows = {
                { type = 'row', label = 'Cas suspectés', value = 'cas suspectés' },
                { type = 'row', label = 'Cas confirmés', value = 'cas confirmés', wikidata = { property = 'P1603', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
                { type = 'row', label = 'Cas sévères', value = 'cas sévères' },
                { type = 'row', label = 'Cas soignés', value = 'cas soignés', wikidata = { property = 'P8010', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
                { type = 'row', label = 'Cas total', value = 'cas total', wikidata = { type = 'row', label = 'Cas total', value = 'cas total', wikidata = { property = 'P1603', qualifier = 'P276', qualifiervalue = 'Q142', rank = 'deprecated', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } }, wikidata = { type = 'row', label = 'Cas total', value = 'cas total', wikidata = { property = 'P1603', qualifier = 'P276', qualifiervalue = 'Q212429', rank = 'deprecated', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } }},
                { type = 'row', label = '<small>Cas PCR/clinique</small>', value = 'cas PCR', wikidata = { property = 'P1603', qualifier = 'P459', qualifiervalue = 'Q6467278', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
                { type = 'row', label = '<small>Cas clinique</small>', value = 'cas clinique', wikidata = { property = 'P1603', qualifier = 'P459', qualifiervalue = 'Q177719', rank = 'deprecated', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
                { type = 'row', label = 'Morts total', value = 'morts total', wikidata = { property = 'P1120', qualifier = 'P276', qualifiervalue = 'Q89464513', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
                { type = 'row', label = '<small>Morts hôpital/ESMS</small>', value = 'morts hôpital', wikidata = { property = 'P1120', qualifier = 'P276', qualifiervalue = 'Q16917', rank = 'deprecated', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
                { type = 'row', label = '<small>Morts ESMS</small>', value = 'morts ESMS', wikidata = { property = 'P1120', qualifier = 'P276', qualifiervalue = 'Q30114662', rank = 'deprecated', numval = 1, sorttype = 'inverted', showdate = true, showsource = true } },
            }
        }
    }
}