Using document templates

I am working on introducing document templates in the offfices workflow. I am basing my work on Templates for Patient Documents - OpenEMR Project Wiki and I find the link in
"If the user wishes to expand this list of keywords, he must change the codes. " non-informative. Is there a way to find a wider sub-set of variables.
I have a field in the demografic layout containing the danish version of the social security number. What can I do to acces that field in my document?

Greetings Morten

think you have to add it in the doSubs function in this file

Thks, it seems to work perfectly.
Gretings, Morten