Use better lab result templateId detection

Turns out `result.template('sometemplateid')` is incorrect format. It only seemed to work before because `template` scans all the XML so it's pretty much always going to return true.

That's a problem in lab results, for example, where we only want true results (and not procedures, for example, which also sometimes show up in C32 lab results organizers).