We're updating the issue view to help you get more done. 

C_TERMINOLOGY_CODE.c_conforms_to in spec is not same as ADL Workbench

Description

This makes a difference in validity if the other valueset is not defined in the value sets or is empty, such as in openEHR-EHR-OBSERVATION.VPOV_redef_ac_code_node_to_local_codes.v1.0.0 in the ADL2-reference module.

Assuming that it is valid that ac2 is not defined in the value set in the parent but is in a constraint - in that case the parent should invalidate, and it does not in my validation implementation. Haven't checked it in the workbench yet.

So, which one should it be?

In workbench:

c_conforms_to (other: like Current; rm_type_conformance_checker: FUNCTION [ANY, TUPLE [STRING, STRING], BOOLEAN]): BOOLEAN
– True if this node is a strict subset of `other'
local
this_vset, other_vset: like value_set_expanded
do
if precursor (other, rm_type_conformance_checker) then
if is_valid_value_set_code (constraint) and is_valid_value_set_code (other.constraint) then
– firstly, check if the other value-set is empty, which means there is no value-set, i.e. no constraint
– which means that this object's value set automatically conforms.
other_vset := other.value_set_expanded
if not other_vset.is_empty then
this_vset := value_set_expanded
Result := codes_conformant (constraint, other.constraint) and then
across this_vset as vset_csr all other_vset.has (vset_csr.item) end
else
Result := True
end
else
Result := codes_conformant (constraint, other.constraint)
end
end
end

In spec:

c_conforms_to (other: like Current; agent rm_types_conformant (a_type, other_type: String)): Boolean
– True if this node on its own (ignoring any subparts) expresses the same or narrower constraints
– as `other'. Returns True only when the following is True:
– * C_PRIMITIVE_OBJECT conditions are met and
– * the value set represented by `constraint' is subsumed under that of `other.constraint'
– `rm_types_conformant' is an agent (lambda) that can test an RM type's conformance to another RM type
require
other /= Void
rm_types_conformant /= Void
do
if precursor (other, rm_type_conformance_checker) then – precursor is from C_PRIMITIVE_OBJECT
if is_valid_value_set_code (constraint) and is_valid_value_set_code (other.constraint) then
this_vset := value_set_expanded
other_vset := other.value_set_expanded
Result := codes_conformant (constraint, other.constraint) and then
across this_vset as vset_csr all other_vset.has (vset_csr.item) end
else
Result := codes_conformant (constraint, other.constraint)
end
end
end

Environment

None

Change Description

None

Impact Analysis

None

Status

Assignee

Thomas Beale

Reporter

Pieter Bos

Components

Affects versions

AM version 2.0.6

Priority

Major