Module:Sandbox/RexxS/TA98
< Module:Sandbox | RexxS
Jump to navigation
Jump to search
Revision as of 22:46, 21 September 2014 by blackwiki>RexxS (see the props table)
| 26x26px | This module is rated as alpha. It is ready for third-party input, and may be used on a few pages to see if problems arise, but should be watched. Suggestions for new features or changes in their input and output mechanisms are welcome. |
Usage
{{#invoke:Sandbox/RexxS|getTAValue}}
This is used to get the TA98 (Terminologia Anatomica first edition 1998) values (property P1323) - example: 'A01.1.00.005'
These are then linked to the corresponding urls - example: http://www.unifr.ch/ifaa/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/01.1.00.005%20Entity%20TA98%20EN.htm
This is a test module, now incorporated into Module:Wikidata
local p = {}
-- This is used to get the TA98 (Terminologia Anatomica first edition 1998) values like 'A01.1.00.005' (property P1323)
-- which are then linked to http://www.unifr.ch/ifaa/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/01.1.00.005%20Entity%20TA98%20EN.htm
p.getTAValue = function(frame)
local ent = mw.wikibase.getEntityObject()
local props = ent:formatPropertyValues('P1323')
local out = {}
for k, v in pairs(props) do
-- if k == 'value' then
out[#out + 1] = "k = " .. k .. " --- v = " .. v
-- end
end
ret = table.concat(out, "<br> ")
if #ret == 0 then
ret = "Invalid TA"
end
return ret
end
return p