Capability (C093):— assigning_codes Date: 2007/06/22 12:22:09
Revision: 1.12

Business overview

This section provides a business level overview of this capability.

Codes are often used to simplify the classification or characterization of a specific type of object. Each code is shorthand for a specific term defined within a classification system. This type of codes are often used in legacy applications where the code has a fixed character length and the different fields in the code have meaning.

Each individual code value used by existing applications could be defined in a reference data library prior to any data exchange. However, the number of codes in use is likely to make this prohibitive. Consequently the coded value will be exchanged and reference data used to define the type of the code.

EXAMPLE    Consequence codification of failure modes in Def Stan 02-45 is done using codes as described in the table below:

Code Def Stan 02-45 Definition
I Catastrophic
II Critical
III Marginal
VI Negligible

Table 1 — Def Stan 02-45 failure modes

Additional usage guidance

Clarification of the difference between codes used as for classification, and codes used for identification.

Codes are strings that are structured according to some convention. Often different sets of characters within the string carry a particular meaning. For example, part numbers are sometimes made up of a set of strings, with each set carrying some meaning. For example, product function, manufacturing plant etc. Structured codes are traditionally used for two purposes:

Where the code is being used for identification, the capability C001: assigning_identifiers should be used.

This capability, assigning_codes, should only be used when a code is provided for classification or characterization, and when the code is not available as a class within an existing reference data library (RDL) (see C010: assigning_reference_data).

Information model overview

This section provides an overview of the information model that supports this capability.

Codes are applied using Class and Classification_assignment. The Class entity represents the code (encoding). Type of code, and encoding system are determined by classification through the usage of reference data, as described in the capability C010: assigning_reference_data.

Figure 1 below shows the main entities and key capabilities used.



Figure 1 —  ExpressG diagram, Main entities and capabilities used to assign a code

Figure 1 —  ExpressG diagram, Main entities and capabilities used to assign a code

The code (encoding) shall be represented in the Class. name attribute.

Type of code and its encoding system is best represented as a single External_class, where the class definition in the RDL contains a description of both the type of code and its encoding system (source).

NOTE    The type of code and its encoding system may also be represented as separate External_class's, where the membership relationship between them is established using Classification_assignment. However, this level of complexity is not recommended since the usage of this capability will be replaced by the usage of the capability C010: assigning_reference_data as codes are being entered into different reference data libraries.



Figure 2 —  Assigning a code to a State definition

Figure 2 —  Assigning a code to a State definition

NOTE    As codes gets registered as reference data in different reference data libraries, they will be exchanged by the usage of reference data. However, the only thing that will be affected is the shift from representing a code as a Class to External_class.

Characterization

Open issue Issue: RBN-4 by Rob Bodington (05-11-23) [minor_technical, open] - {Type = contents}
There should be a reference parameter, class_assgn, in template assigning_code assigned to the entity classification_assignment. Figures 3 and 4 should be updated to show the reference parameters

This capability does not require any further characterization of the entities introduced by this capability.

Capability templates

The following sections define a set of templates for the capability, where a template is a specification of a set of entities that need to be instantiated to represent a given set of information.

Template: assigning_code (Short name: asg_code)

This section specifies the template assigning_code.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes the assignment of codes for classification to entity instances within a data set, where the class being used is not defined in a Reference Data Library, i.e. the class can not be referenced using the External_class_library entity. This is e.g. often the case for codes being used in legacy applications.

NOTE    The templates assigning_code and assigning_reference_data can be used interchangeably, i.e. wherever the template assigning_reference_data is being used the assigning_code template can be used instead, and vice versa. The usage of the respective template is dependent upon whether the class being used is defined as Reference Data or not.

NOTE    For DEXlib edition 1, the identification of the class (i.e. the identification of the code) is done using the Class.name attribute. The Class entity instance is then classified as being a member of a classification system using the assigning_reference_data template. This will be superseded in DEXlib edition 2, where the Class.name will be set to '/IGNORE' and the identification instead will be provided using the assigning_identification_with_no_organization template. The assigning_identification_with_no_organization template includes both the identification of the class (i.e. the code) and its classification.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "assigning_code". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for assigning_code.

Figure 1 —  An EXPRESS-G representation of the Information model for assigning_code.

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  The graphical representation of the assigning_code template

Figure 2 —  The graphical representation of the assigning_code template

Input parameters
The following input parameters are defined for this template:
class_name (Type='STRING')
The text representing the code.
code_class_name (Type='CLASS')
The name of the class in the reference data library (External_class) being used to determine type of code.
The following classes and their sub-classes can be used:
classifications: "PLCS-ARM-LF-THING" (urn:plcs:rdl:std:PLCS-ARM-LF-THING)
code_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The id of the External_class_library that stores the External_class given in @code_class_name.
items (Type= 'SELECT (classification_item)' )
The items to which the Class is assigned.
Reference parameters
The following reference parameters are defined for this template:
class(Type='ENTITY (Class)')
Allow the Class entity instantiated in this path to be referenced when this template is used.
Note: The Class entity can be referenced in a template path by:
%^target = $assigning_code.class%
where target is the parameter to which the Class is bound.
class_asg(Type='ENTITY (Classification_assignment)')
Allow the Classification_assignment entity instantiated in this path to be referenced when this template is used.
Note: The Classification_assignment entity can be referenced in a template path by:
%^target = $assigning_code.class_asg%
where target is the parameter to which the Classification_assignment is bound.
ext_class(Type='ENTITY (External_class)')
Allow the External_class entity instantiated in this path to be referenced when this template is used.
Note: The External_class entity can be referenced in a template path by:
%^target = $assigning_code.ext_class%
where target is the parameter to which the External_class is bound.
ext_class_lib(Type='ENTITY (External_class_library)')
Allow the External_class_library entity instantiated in this path to be referenced when this template is used.
Note: The External_class_library entity can be referenced in a template path by:
%^target = $assigning_code.ext_class_lib%
where target is the parameter to which the External_class_library is bound.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Create the class entity.
Class.id = '/IGNORE'
Class.description = '/IGNORE'
Class.name = @class_name

-- Mark the Class entity as referable when this template is used.
-- In other words, bind the Class instance to the reference
-- parameter class
%^class = Class%

-- Assign the External_class in the reference data library
-- being used to determine type of code
/assigning_reference_data(
    items=^class,
    class_name=@code_class_name,
    ecl_id=@code_ecl_id)/

-- Mark the External_class entity instantiated by the template
-- assigning_reference_data as referable when this template is used.
-- In other words, bind the External_class instance to the reference
-- parameter ext_class
%^ext_class = $assigning_reference_data.ext_class%

-- Mark the External_class_library entity instantiated by the template
-- assigning_reference_data as referable when this template is used.
-- In other words, bind the External_class_library instance to the reference
-- parameter ext_class_lib
%^ext_class_lib = $assigning_reference_data.ext_class_lib%

-- Create the Classification_assignment entity
Classification_assignment
Classification_assignment.role = '/IGNORE'
Classification_assignment.items -> @items
Classification_assignment.assigned_class -> Class

-- Mark the Classification_assignment entity as referable when this template is used.
-- In other words, bind the Classification_assignment instance to the reference
-- parameter class_asg
%^class_asg = Classification_assignment%
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Class.id '/IGNORE'
Class.description '/IGNORE'
Class.name @class_name
Classification_assignment.role '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/assigning_code(items='#1', class_name='A', code_class_name='Mission_criticallity_code', code_ecl_id='urn:plcs:rdl:sample')/
(an illustration of the consolidated assigning_code template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by assigning_code template

Figure 3 —  Entities instantiated by assigning_code template

The instance model in STEP ASCII exchange file format (ISO 10303 Part 21 syntax) is:
#1 = ACTIVITY('/IGNORE','/IGNORE','/IGNORE',$); #2 = CLASS('/IGNORE','A','/IGNORE'); #3 = CLASSIFICATION_ASSIGNMENT(#2,(#1),'/IGNORE'); #5 = CLASSIFICATION_ASSIGNMENT(#7,(#2),'/IGNORE'); #7 = EXTERNAL_CLASS('/NULL','Mission_criticallity_code','/IGNORE',#8); #8 = EXTERNAL_CLASS_LIBRARY('urn:plcs:rdl:sample',$);
The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/assigning_code(items='#1', class_name='A', code_class_name='Mission_criticallity_code', code_ecl_id='urn:plcs:rdl:sample')/


Figure 4 —  Invocation of assigning_code template example - graphical presentations

Figure 4 —  Invocation of assigning_code template example - graphical presentations

Characterizations
The following section details how the assigning_code template can be optionally characterized by assigning other constructs to it. These are characterizations commonly applied to the template. The ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
The following characterizations may apply:
Characterization Assigning description

NOTE   this characterization is optional.

Descriptions can be assigned to the Class using the assigning_descriptor template, e.g. in order to provide a description for the exchanged code.

AP239 Issue (GYL-3)
The ISO-10303-239 1st edition does not support the assignment of a Document to a Class.

This has been raised as issue, GYL-3, against ISO 10303-239. The EXPRESS schema has been modified in DEXlib (Long form: dexlib/data/schemas/ap239_arm_lf.exp, short form: dexlib/data/schemas/ap239_arm_sf.exp). These changes will be made to ISO 10303-239 as a Technical Corrigendum at some stage.

Characterization Assigning document reference

NOTE   this characterization is optional.

Document references can be assigned to the Class using the assigning_document_reference template, e.g. in order to provide a reference to a document containing the description for the exchanged code, or a description of the entire encoding system.

AP239 Issue (GYL-3)
The ISO-10303-239 1st edition does not support the assignment of a Document to a Class.

This has been raised as issue, GYL-3, against ISO 10303-239. The EXPRESS schema has been modified in DEXlib (Long form: dexlib/data/schemas/ap239_arm_lf.exp, short form: dexlib/data/schemas/ap239_arm_sf.exp). These changes will be made to ISO 10303-239 as a Technical Corrigendum at some stage.

Characterization Assigning identification

NOTE   this characterization is optional.

Identifications can be assigned to the Class using the assigning_identification template, e.g. in order to provide a name for the exchanged code.

AP239 Issue (GYL-4)
The ISO-10303-239 1st edition does not support the assignment of a Identification_assignment to a Class.

This has been raised as issue, GYL-4, against ISO 10303-239. The EXPRESS schema has been modified in DEXlib (Long form: dexlib/data/schemas/ap239_arm_lf.exp, short form: dexlib/data/schemas/ap239_arm_sf.exp). These changes will be made to ISO 10303-239 as a Technical Corrigendum at some stage.



Figure 5 —  Example of optional characterizations of entities within the assigning_code template.

Figure 5 —  Example of optional characterizations of entities within the assigning_code template.

Related capabilities

This capability "Assigning codes in accordance with an encoding system" is related to the following capabilities:

Dependent capabilities

This capability "Assigning codes in accordance with an encoding system" is dependent on the following capabilities:

© OASIS 2010 — All rights reserved