DDF00035 (CORE-000427) flags valid CDISC CT when two codelists share a submission value

Aperta
#1,893 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
json, python, yaml
Ambito
data

Direzione di ricerca

Start with the CORE-000427 rule YAML in the issue, which groups by codeSystem, codeSystemVersion, code and decode and counts records in each group. Reproduce with the attached issue11_data shaun_h_usdm.json using the CLI command in the issue, and confirm that C49656 and C101526 are flagged for sharing the decode "TREATMENT". Done means the rule no longer flags these valid codes while still catching a real code-to-decode mismatch. The fix may also need the matching rule text in USDM_CORE_Rules.xlsx, which lives in DDF-RA.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Standard

CDISC USDM

Reference Rule ID(s)

DDF00035

Conformance Rule ID(s) (if published in CORE)

CORE-000427

JIRA Ticket

https://jira.cdisc.org/projects/CORERULES/issues/CORERULES-

CLI Command Used (if applicable)

python core.py validate -s usdm -v 4-0 -dp issue11_data/shaun_h_usdm.json -r CORE-000427 -of JSON

Rule YAML
core_id: CORE-000427
description: Within a code system and corresponding version, a one-to-one relationship between code and decode is expected.
rule_type: Record Data
sensitivity: Record
entities:
  Include:
  - Code
operations:
- group:
  - codeSystem
  - codeSystemVersion
  - code
  id: $num_records_in_codesystemversion_with_code
  operator: record_count
- group:
  - codeSystem
  - codeSystemVersion
  - decode
  id: $num_records_in_codesystemversion_with_decode
  operator: record_count
- group:
  - codeSystem
  - codeSystemVersion
  - code
  - decode
  id: $num_records_in_codesystemversion_with_code_decode
  operator: record_count
conditions:
  all:
  - name: get_dataset
    operator: equal_to
    value:
      comparator: Code
      target: instanceType
  - any:
    - name: get_dataset
      operator: not_equal_to
      value:
        comparator: $num_records_in_codesystemversion_with_code_decode
        target: $num_records_in_codesystemversion_with_code
    - name: get_dataset
      operator: not_equal_to
      value:
        comparator: $num_records_in_codesystemversion_with_code_decode
        target: $num_records_in_codesystemversion_with_decode
actions:
- name: generate_dataset_error_objects
  params:
    message: There is not a one-to-one relationship between code and decode within a codeSytem and corresponding codeSystemVersion
Attach any sample test data file(s)

issue11_data.zip: one USDM 4.0 JSON file for a fictional study. It passes the USDM 4.0 schema, and CORE-000427 is the only CORE USDM rule it fails.

issue11_data.zip

Attach any output report and/or log file(s)

CORE-000427 reports two issues: Code C49656 "TREATMENT" (intentTypes) and Code C101526 "TREATMENT" (StudyEpoch type).

issue11_output.txt

Expected output

No issues. Both codes carry their correct CDISC CT 2026-03-27 submission values; they only share a decode because they come from different codelists.

Any Additional Information

DDF00035 expects a one-to-one relationship between code and decode within a code system and version, and CORE-000427 checks both directions. CDISC CT keeps submission values unique within a codelist, not across the whole http://www.cdisc.org code system. C49656 (Trial Intent Type, C66736) and C101526 (Epoch, C99079) both have the submission value "TREATMENT", so any interventional study with a treatment intent and a treatment epoch gets this warning. The CDISC Pilot example in DDF-RA (Documents/Examples/CDISC_Pilot) also triggers it.

Suggested fix: check code to decode only (each code always has the same decode), or check decode uniqueness within a codelist rather than across the code system. The rule text in USDM_CORE_Rules.xlsx may need the same change, so this may also belong in DDF-RA.

Environment: CORE 0.17.1 (GitHub main, commit 22ce7a7, 29 October 2026), Python 3.12, Linux.

Lingua principale
Python
Stelle
125
Fork
50
Merge medio
7h 40m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cdisc-org/cdisc-rules-engine

Tutte le issue di cdisc-org/cdisc-rules-engine

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.