ores.refdata.party_id_scheme

Table of Contents

Reference data table defining valid party identifier scheme types. Examples: 'LEI', 'BIC', 'MIC', 'DUNS'.

Party ID schemes are managed by the system tenant. The optional coding_scheme_code field cross-references the DQ coding scheme table.

1. Flags

2. Columns

2.1. code

Unique scheme code.

Examples: 'LEI', 'BIC', 'MIC'.

2.2. name

Human-readable name for the identifier scheme.

std::string(faker::word::adjective()) + " Scheme"

2.3. description

Detailed description of the identifier scheme.

std::string(faker::lorem::sentence())

2.4. coding_scheme_code

Cross-reference to DQ coding scheme table.

Optional link to ores_dq_coding_schemes_tbl for validation.

// Rotate through the codes ores_dq_coding_schemes_tbl is guaranteed to
// have seeded (see refdata_party_id_schemes_populate.sql) -- a random
// faker word never matches a real coding scheme and fails the soft-FK
// validation trigger.
[idx]{
    static constexpr const char* schemes[] = {
        "LEI", "BIC", "MIC", "NATIONAL_ID", "CEDB",
        "NATURAL_PERSON", "ACER", "DTCC_PARTICIPANT_ID", "MPID", "INTERNAL"};
    return std::string(schemes[idx % 10]);
}()

2.5. display_order

Order for UI display purposes.

faker::number::integer(1, 100)

2.6. max_cardinality

Optional maximum cardinality constraint for the identifier scheme.

faker::number::integer(1, 100)

3. SQL

3.1. Flags

3.2. Extra drops

drop function if exists ores_refdata_validate_party_id_scheme_fn;
drop function if exists ores_refdata_validate_party_id_scheme_coding_scheme_fn;

4. Validation function

5. Insert trigger

5.1. Validations

column validation_function
change_reason_code ores_dq_validate_change_reason_fn
coding_scheme_code ores_refdata_validate_party_id_scheme_coding_scheme_fn

6. Check constraints

6.1. check_1

7. C++

7.1. Flags

7.2. Repository

7.3. Domain includes

#include <chrono>
#include <string>

7.4. Entity includes

#include <string>
#include "sqlgen/Timestamp.hpp"

7.5. Conventions

7.6. Table display

column header
code Code
name Name
description Description
coding_scheme_code Coding Scheme
display_order Order
modified_by Modified By
version Version

7.7. Presentation

7.7.1. Detail fields

field label widget type is_key is_required placeholder
code Code codeEdit line_edit true true Enter scheme code
name Name nameEdit line_edit   true Enter scheme name
description Description descriptionEdit text_edit   true Enter a description
coding_scheme_code Coding Scheme codingSchemeCodeEdit line_edit     Enter coding scheme code
display_order Display Order displayOrderEdit spin_box      
max_cardinality Max Cardinality maxCardinalityEdit spin_box      

7.7.2. Columns

enum_name field header type width
Code code Code string 150
Name name Name string 200
Description description Description string 300
CodingSchemeCode coding_scheme_code Coding Scheme string 150
DisplayOrder display_order Order int 80
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

7.8. Custom repository methods

8. See also

Emacs 29.3 (Org mode 9.6.15)