Prefix - Discriminated Union

From Fusion Registry Wiki
Revision as of 05:55, 4 September 2023 by Vmurrell (talk | contribs) (Example)
Jump to navigation Jump to search

Overview

This feature can be used when standards used, for example ISIC (International Standard Industrial Classification of All Economic Activities) are revised periodically but the revisions do not occur worldwide at the same time.

If a component is enumerated, for example CL_ACTIVITY, it needs to include all variants although this could potentially result in a very large codelist and potentially many different dataflows all requiring different constraints to ensure that the Data Provider is only able too use the codes appropriate to their situation.

The Discriminated Union feature used with the Inheritance Feature and the Prefix facility, enables the codelist itself to effectively be empty. Instead is uses other codelists (Inherited) and caters for the possibility of duplicate codes by using the Prefix to distinguish one from the other.

Example

Discriminated-Union-Example-Step1.png

Discriminated-Union-Example.png

Prefix Code IDs

When extending a Codelists, the reference to an extension Codelist may contain a prefix. If a prefix is provided, this prefix will be applied to all the codes in the Codelist before they are imported into the extended Codelist. In this case, the reference to CL_ISIC4 includes a prefix of “ISIC4_” and the reference to ISIC3 includes “ISIC3_”, so the resulting Codelist will have no conflict for the “A” items which will become “ISIC3_A” and “ISIC4_A”.

Including / Excluding Specific Codes

independent Dataflows or Provision Agreements are still required with specific Content Constraint attached, in order to keep the proper items according to the variant in use by each data provider.