Code vs Code Item
Dan made the point at the previous meeting that Code is a designation. Therefore the definition of a Code (as per the UML for the Specification layer) might be “F (Female)” where the definition of the Code might be read as “F designates the category ‘Female’”. The code in this definition is not just “The letter F”, the definition includes what is designated by “F”.
In Section II of the Specification Layer (the plain English documentation) para 83 says.
A Code List is also a type of Concept System. It is used for creating a group of Codes and their associated Categories. It can consist of one or more Code Items. A Code designates a Category providing representation to the meaning from the Category. For example in "F - female", the Code is F and the Category is Female.
This reads to me that the Code is “F” and not “F (Female)”.
I interpret Dan as saying the UML is correct and Para 83, technically, is not. So, let’s assume the UML is correct. I still want to be clear from a business perspective whether I would want to manage Code separately from Code Item.
I can’t think of a particularly “official statistics” example off the top of my head, so let’s take “F (Ford)” as a Code. (F is the New York Stock Exchange for Ford).
I could have a number of different Code Lists with “F (Ford)” as a Code Item, eg
- Code List: US Fortune 500 companies
- Code List: Manufacturers of Pick-Up Trucks (worldwide)
- Code List: Companies that sell automobiles in the USA
While “F (Ford)” might be a Code Item in all three Code Lists. Each instance would be a different Code Item but would be the same Code. (In the case of the Motor Vehicle Census in Australia it is both a different Code, 1999999 (Ford) and a different Code Item.)
Other Codes might be used as Code Item in only one, or two, of the three Code Lists
I care about Ford as a Category, and I care about “F (Ford)” as a Code Item when I need to include it in a Code List but I am still not sure why I want to manage the Code “F (Ford)” as a separate business object.
If I particularly wanted to have recommended designations for categories then that could be an attribute of the Category itself, eg
- if you want to designate “Ford” by a code then “F” is recommended based on the NYSE designation
In general, I see managing attributes as “cheaper” than managing additional objects.
(I am not convinced there is even a business reason for this to be captured as an attribute - but if there is a business reason to capture it then attribute would be my preference at the moment.)