Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archie validator seemingly allows a null TerminologyId.value #616

Open
MattijsK opened this issue Aug 1, 2024 · 1 comment
Open

Archie validator seemingly allows a null TerminologyId.value #616

MattijsK opened this issue Aug 1, 2024 · 1 comment
Assignees

Comments

@MattijsK
Copy link
Collaborator

MattijsK commented Aug 1, 2024

According to the specs, this should not be allowed. But the validator doesn't seem to check this correctly as we have seen validated RM_OBJECTS where a CodePhrase.terminologyId is an empty object.

@mathijshudepohl mathijshudepohl self-assigned this Jan 27, 2025
@mathijshudepohl
Copy link
Collaborator

After some testing in the RmObjectValidatorTest and our own application (created a composition, containing a CodePhrase without a value), I wasn't able to reproduce anything that could cause an empty value for TERMINOLOGY_ID.

The method used for testing:

@Test
public void test() throws IOException, ADLParseException {
    TerminologyId terminologyId = new TerminologyId();
    assertNull(terminologyId.getValue());
    List<RMObjectValidationMessage> messages = validator.validate(terminologyId);
    assertEquals(1, messages.size());

    Archetype archetype = parse("/com/nedap/archie/rules/evaluation/and.adls");
    OperationalTemplate opt = createOpt(archetype);
    List<RMObjectValidationMessage> messages2 = validator.validate(opt, terminologyId);
    assertEquals(1, messages2.size());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants