Skip to content

Conversation

@alexfurmenkov
Copy link
Collaborator

@alexfurmenkov alexfurmenkov commented Nov 12, 2025

This PR adds support for #890.

Suggested rule:

Check:
  all:
    - name: $spec_codelist
      operator: not_contains_all
      value: $ppspec_value
Core:
  Id: CDISC.SENDIG.SEND282
  Status: Draft
  Version: "1"
Operations:
  - codelists:
      - SPEC
    level: term
    id: $spec_codelist
    operator: codelist_terms
    returntype: value
  - name: PPSPEC
    delimiter: ;
    id: $ppspec_value
    operator: split_by
Description: If multiple specimen types are used for a calculation (e.g., serum
  and urine for creatinine clearance), then this field should be populated with
  values from the (SPEC) Controlled Terminology codelist delimited by a
  semicolon.
Executability: Fully Executable
Outcome:
  Message: The multiple specimens are not correctly separated by a semicolon
  Output Variables:
    - $ppspec_value
    - $spec_codelist

core.py command:

validate
-s
send
-v
1-0
-l
info
-dp
unit-test-coreid-SENDIG282.json
-lr
Rule.yml
-ct
sendct-2025-09-26

The idea is:

  1. Pull SPEC codelist values from the provided CT package (codelist_terms operation)
  2. Split the target column (PPSPEC in this case) by the desired delimiter (split_by operation)
  3. For every row, check that the result of step 1 contains all items from step 2. The Check section should be interpreted as "Find all rows where $spec_codelist doesn't contain all of $ppspec_value"

@gerrycampion gerrycampion merged commit 63ea34e into main Nov 13, 2025
11 checks passed
@gerrycampion gerrycampion deleted the 890-column-should-consist-of-delimited-codelists branch November 13, 2025 18:09
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

Successfully merging this pull request may close these issues.

Rule blocked: CORERULES-716 (SEND-282)

3 participants