Table of Contents |
---|
Introduction
This document describes the steps to add customised tokens used for various label types in OpenSpecimen. For example specimen print tokens, specimen label tokens, visit label tokens, PPID label tokens, etc. This guide is intended for developers or technical IT staff.
Prerequisites
- Know how to create plugins in OpenSpecimen - how to write a plugin for OpenSpecimen?
- Know Java programming language
Steps
Below is the detailed example of specimen print label token to add collection container name. At the bottom of each step, specified the changes required to implement other type of tokens.
- Write a Java class that extends AbstractLabelTmplToken and implements LabelTmplToken. The following example describes how to implement LabelTmplToken:
...
Label Type | Registrar Bean |
---|---|
PPID Label Token | ppidTokensRegistrar |
Specimen Label Token | specimenTokenRegistrar |
Visit Label Token | visitTokenRegistrar |
Example
You can download the complete working example from here: os-plugin-token.zip