Mòdul:Infobox anatomy/items

De Viquipèdia
Salta a la navegació Salta a la cerca
local p = {}

local GIBTi	= require "Module:Global infobox tools/prova/items"
local GIBT	= require "Module:Global infobox tools/prova"
local GIBTi18n	= require "Module:Global infobox tools/prova/i18n"
local MIBIi	= require "Module:Medical infobox items/prova/items"

p.k = { --used key names for headers, labels and data
	type			= "type",
	-- DETAILS
	hd_details		= 'hd_details',
	synonym			= "synonym",
	Latin			= 'Latin',
	Greek			= 'Greek',
	-- Embryology
	CarnegieStage	= 'CarnegieStage',
	days			= 'days',
	precursor		= 'precursor',
	gives_rise_to	= 'gives_rise_to',
	-- Location and system
	part_of			= 'part_of',
	system			= 'system',
	location		= 'location',
	Decussation		= 'Decussation',
	PhysicalExam	= 'PhysicalExam',
	components		= 'components',
	morphology		= 'morphology',
	-- Origins (where from) 
	From			= 'From',
	Origins			= 'Origins',
	DrainsFrom		= 'DrainsFrom',
	Source			= 'Source',
	SourceFrom		= 'SourceFrom',
	-- Destination 
	To				= 'To',
	insertion		= 'insertion',
	MuscleInsertion = 'MuscleInsertion',
	articulation	= 'articulation',
	DrainsTo		= 'DrainsTo',
	BranchFrom		= 'BranchFrom',
	BranchTo		= 'BranchTo',
	-- Supporting structures (arteries, nerves, ...)
	artery			= 'artery',
	NourishingArtery= 'NourishingArtery',
	vein			= 'vein',
	VenousReturn	= 'VenousReturn',
	SatelliteVein	= 'SatelliteVein',
	nerve			= 'nerve',
	NerveRoot		= 'NerveRoot',
	lymph			= 'lymph',
	-- Function 
	Function		= 'Function',
	Supplies		= 'Supplies',
	Innervates		= 'Innervates',
	action			= 'action',
	Antagonist		= 'Antagonist',
	neurotransmitter= 'neurotransmitter',
	afferents		= 'afferents',
	efferents		= 'efferents',
	FiberType		= 'FiberType',
	-- IDENTIFIERS
	hd_identifiers	= 'hd_identifiers',
	acronym			= 'acronym',
	code			= 'code',
	BrainInfoType	= 'BrainInfoType',
	BrainInfoNumber	= 'BrainInfoNumber',
	NeuroLex		= 'NeuroLex',
	BamsSlug		= 'BamsSlug',
	TA98			= 'TA98',
	TH				= 'TH',
	TE				= 'TE',
	FMA				= 'FMA',
	-- EXTERNAL RESOURCES
	hd_ExtRes		= 'hd_ExtRes', 
	Gray			= 'Gray',
	EB_Online		= 'EB_Online',
	--TERMS
	a_terms			= 'a_terms',
	a_terms_bone	= 'a_terms_bone',
	a_terms_micro	= 'a_terms_micro',
	a_terms_muscle	= 'a_terms_muscle',
	a_terms_neuro	= 'a_terms_neuro',
}

p.arg_lims = { --non-string types for parameters
}

p.arg_style = { --specific tyle for parameters
	[p.k.Latin]	= "''%s''",
	[p.k.Greek]	= "''%s''",
}

local function OtherLab (color)
	return '<div style="width:100%%;background-color:'..color..'">%s</div>'
end	
p.lab_style = { --specific tyle for some labels and of any type
	[p.k.artery]	= OtherLab ('pink'),
	[p.k.vein]		= OtherLab ('lightblue'),
	[p.k.nerve]		= OtherLab ('#FFEE77'),
	[p.k.NerveRoot]	= OtherLab ('#FFEE77'),
}
p.lab_style_artery = { --specific tyle for labels when type=artery
	[p.k.Source]	= OtherLab ('pink'),
}
p.lab_style_vein = { --specific tyle for labels when type=vein
	[p.k.Source]	= OtherLab ('lightblue'),
}
p.lab_style_lymph = { --specific tyle for labels when type=lymph
	[p.k.Origins]	= OtherLab ('lightgreen'),
	[p.k.Source]	= OtherLab ('lightgreen'),
}

p.tp = {
	all 		= 'all',
	artery		= 'artery',
	bone		= 'bone', 
	brain		= 'brain',
	embryology	= 'embryology',
	lymph		= 'lymph',
	muscle		= 'muscle',
	organ		= 'organ',
	nerve		= 'nerve',
	vein		= 'vein',
}

p.tp_icons = {
	[p.tp.all] 			= GIBTi18n.licon.anatomy,
	[p.tp.artery]		= GIBTi18n.licon.blood_vessels,
	[p.tp.bone]			= GIBTi18n.licon.bone,
	[p.tp.brain]		= GIBTi18n.licon.brain,
	[p.tp.embryology]	= GIBTi18n.licon.embryology,
	[p.tp.lymph]		= GIBTi18n.licon.blood_vessels,
	[p.tp.muscle]		= GIBTi18n.licon.muscle,
	[p.tp.organ]		= GIBTi18n.licon.organ,
	[p.tp.nerve]		= GIBTi18n.licon.nerve,
	[p.tp.vein]			= GIBTi18n.licon.blood_vessels,
}

p.tp_terms = {
	[p.tp.all] 			= p.k.a_terms,
	[p.tp.artery]		= p.k.a_terms,
	[p.tp.bone]			= p.k.a_terms_bone,
	[p.tp.brain]		= p.k.a_terms_neuro,
	[p.tp.embryology]	= p.k.a_terms,
	[p.tp.lymph]		= p.k.a_terms,
	[p.tp.muscle]		= p.k.a_terms_muscle,
	[p.tp.organ]		= p.k.a_terms,
	[p.tp.nerve]		= p.k.a_terms_neuro,
	[p.tp.vein]			= p.k.a_terms,
}

p.idx = { --index for parameter and/or header/label lists
	[p.tp.all] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		-- DETAILS
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.CarnegieStage},
		{'al', p.k.days},
		{'al', p.k.precursor},
		{'al', p.k.gives_rise_to},
		-- Location and system
		{'al', p.k.part_of},
		{'al', p.k.system},
		{'al', p.k.location},
		{'al', p.k.Decussation},
		{'al', p.k.PhysicalExam},
		{'al', p.k.components},
		{'al', p.k.morphology},
		-- Origins (where from) 
		{'al', p.k.From},
		{'al', p.k.Origins},
		{'al', p.k.DrainsFrom},
		{'al', p.k.Source},
		-- Destination 
		{'al', p.k.To},
		{'al', p.k.insertion},
		{'al', p.k.articulation},
		{'al', p.k.DrainsTo},
		{'al', p.k.BranchFrom},
		{'al', p.k.BranchTo},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.artery},
		{'al', p.k.vein},
		{'al', p.k.nerve},
		{'al', p.k.NerveRoot},
		{'al', p.k.lymph},
		-- Function 
		{'al', p.k.Function},
		{'al', p.k.Supplies},
		{'al', p.k.Innervates},
		{'al', p.k.action},
		{'al', p.k.Antagonist},
		{'al', p.k.neurotransmitter},
		{'al', p.k.afferents},
		{'al', p.k.efferents},
		{'al', p.k.FiberType},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.BrainInfoType},
		{'al', p.k.BrainInfoNumber},
		{'al', p.k.NeuroLex},
		{'al', p.k.BamsSlug},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		{'al', p.k.FMA},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.artery] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		-- DETAILS
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.precursor},
		-- Destination 
		{'al', p.k.BranchFrom},
		{'al', p.k.BranchTo},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.vein},
		-- Function 
		{'al', p.k.Supplies},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		{'al', p.k.FMA},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.bone] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		--
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.precursor},
		-- Location and system
		{'al', p.k.part_of},
		{'al', p.k.system},
		-- Origins (where from) 
		{'al', p.k.Origins},
		-- Destination 
		{'al', p.k.insertion},
		{'al', p.k.articulation},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.nerve},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		{'al', p.k.FMA},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.brain] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		--
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.precursor},
		-- Location and system
		{'al', p.k.part_of},
		{'al', p.k.system},
		{'al', p.k.location},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.artery},
		{'al', p.k.vein},
		-- Function 
		{'al', p.k.Function},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.BrainInfoType},
		{'al', p.k.BrainInfoNumber},
		{'al', p.k.NeuroLex},
		{'al', p.k.BamsSlug},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.embryology] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		--
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.CarnegieStage},
		{'al', p.k.days},
		{'al', p.k.precursor},
		{'al', p.k.gives_rise_to},
		-- Location and system
		{'al', p.k.system},
		{'al', p.k.location},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.lymph] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		--
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Location and system
		{'al', p.k.system},
		-- Origins (where from) 
		{'al', p.k.DrainsFrom},
		{'al', p.k.Source},
		-- Destination 
		{'al', p.k.DrainsTo},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.muscle] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		--
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Location and system
		{'al', p.k.part_of},
		{'al', p.k.system},
		-- Origins (where from) 
		{'al', p.k.Origins},
		-- Destination 
		{'al', p.k.insertion},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.artery},
		{'al', p.k.vein},
		{'al', p.k.nerve},
		-- Function 
		{'al', p.k.action},
		{'al', p.k.Antagonist},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.nerve] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		-- DETAILS
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Location and system
		{'al', p.k.part_of},
		{'al', p.k.system},
		-- Destination 
		{'al', p.k.BranchFrom},
		{'al', p.k.BranchTo},
		-- Function 
		{'al', p.k.Function},
		{'al', p.k.Innervates},
		{'al', p.k.FiberType},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.BrainInfoType},
		{'al', p.k.BrainInfoNumber},
		{'al', p.k.NeuroLex},
		{'al', p.k.BamsSlug},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.organ] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		-- DETAILS
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.precursor},
		-- Location and system
		{'al', p.k.system},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.artery},
		{'al', p.k.vein},
		{'al', p.k.lymph},
		-- Function 
		{'al', p.k.Innervates},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
	[p.tp.vein] = {
		{'a',  GIBTi.rk.name},
		{'-',  GIBT.images},
		-- DETAILS
		{ 'L', p.k.hd_details},
		{'al', p.k.synonym},
		{'al', p.k.Latin},
		{'al', p.k.Greek},
		-- Embryology
		{'al', p.k.precursor},
		-- Location and system
		{'al', p.k.system},
		-- Origins (where from) 
		{'al', p.k.DrainsFrom},
		{'al', p.k.Source},
		-- Destination 
		{'al', p.k.DrainsTo},
		-- Supporting structures (arteries, nerves, ...)
		{'al', p.k.artery},
		-- IDENTIFIERS
		{ 'L', p.k.hd_identifiers}, 
		{'al', p.k.acronym},
		{'-',  MIBIi.k.Mesh},
		--{'al', p.k.code},
		{'al', p.k.TA98},
		{'al', p.k.TH},
		{'al', p.k.TE},
		-- EXTERNAL RESOURCES
		{ 'L', p.k.hd_ExtRes}, 
		{'al', p.k.FMA},
		{'al', p.k.Gray},
		{'al', p.k.EB_Online},
	},
}

return p