Polybench® Reference
Code to specify how a file path should be named.

Path name format codes


Applications and the data manager can specify how files on disk are named, using a number of variables. The Path Name Formatter uses a code script that tells the software how to make a file path name.


A file path name may consist of fixed text and a number of variables that are included as a whole, or only a number of characters of the variable, as well as any other variables.

The variables are any variables that can be addressed in the current context. For example, a standard set of global variables are always available, but in the context of a patient data management, also patient data can be used as variables, or any other variables in an application.

The variables can be written inside square brackets [$variable$,*], where the variable itself is enclosed by $ signs. After the variable, a comma is written and then an asterisk '*' to indicate that the whole variable should be used, or a number that tells how many characters of the variable should be used.

Alternatively, you may also just write a variable (always enclosed in $ signs).

Examples of complete paths (whenever this is allowed in your context):
C:\[$year$,*][$month$,*][$day$,*]T[$hour$,*][$minute$,*][$second$,*]\MyFile.txt will output a path like "C:\20100610T174824\MyFile.txt".
By the way;
C:\$year$$month$$day$T$hour$$minute$$second$\MyFile.txt will result in the same file name. It is just less readible.

$doc$\patient [$Patient Information.LastName$,5]-[$Patient Information.FirstName$,2]\MyFile[$Count.Value$,*].txt will output a path like "C:\Documents and Settings\..etc..\patient Einst-Al\MyFile10.txt".

Path name format in the Data Manager

In the Data Manager (link) variables can be used from the current Patient Record Template (link). This record template is user defined. Variables from the record are equal to the 'technical name' of any item, enclosed in $ signs.

For example, if the Patient Record Template contains the items LastName and FirstName (note: those are the technical names), then the following path name format is correct:

patient [$LastName$,5]-[$FirstName$,2]

If a variable is unknown, or does not contain a value, or if the value has less characters than specified in the format string, then any missing characters are substituted by underscores '_'.