ProtoGen has a naming scheme that tries to keep names descriptive, readable and short.
Classes for data types and segments are given the name of their two or three characters id in upper case, with the small qualifier `typ' and `seg' directly attached to it. Thus `NMtyp' is the class of numerics and `MSHseg' is the class of message header segments. Message classes are named a similar way by attaching `msg' to the uppercase letters which are taken either from the list of message type ids or from the list of event type codes(1). Note that we try to avoid using the underscore character `_', which tends to merely lengthen the name, readability can be acheived by altering uppercase and lowercase letters as well.
Instantiations of classes, i.e. variables as well as symbolic names of coded values are given a name which is derived from their description description. There is a simple function which produces valid C names from arbitrary text strings. The function is given three arguments. the text string, the threshold length and the truncate length. All words in the string are concatenated with each first letter in upper case and all other letters in lower case. The words are truncated to the truncate length if they are longer than the threshold length. Typically the threshold length is greater than the truncate length, thus allowing short words to be completed while longer words to be truncated to a short length. For example for the standard values threshold 5 and the truncate length 3, a description like "Patient Visit - Additional Info." becomes to `PatVisitAddInfo'.
This produces names which are sufficiently unique in most cases. However there are ambiguities in table values, which require a refinement of the name assembling algorithm. These ambiguities occur, when there are single words which begin with a common prefix like the latin preposition "intra" or the greek quantifier "milli". Thus "intravenous" and "intradermal" both become `Int'. This can be overcome by splitting such composita into two seperate words ("intra venous" giving `IntraVen').