cdisc-org / DDF-RA

This is the repository for all code and documentation for the DDF-RA project.
MIT License
17 stars 1 forks source link

Pediatric investigational plan number needs to be addressed. [Rules] #438

Open BSnoeijerCD opened 1 month ago

BSnoeijerCD commented 1 month ago

Pediatric investigational plan number needs to be addressed. It is more a reference than an identifier. See EMA template https://www.ema.europa.eu/en/documents/template-form/paediatric-investigation-plan-pip-key-elements-guidance_en.pdf See feature ticket #420

ASL-rmarshall commented 1 month ago

@BSnoeijerCD I can only think of the following three rules:

  1. Study identifiers must be unique - there must be no more than one study identifier for each combination of text, identifierScope.identifierScheme, and identifierScope.identifier. I am assuming that there can only be one legal address for any organization (that assigns study identifiers).
  2. Only one identifier is expected within each identifier scope - no more than one reference identifier is expected for each combination of identifierScope.identifierScheme, and identifierScope.identifier. Note if this is changed from a warning to an error, then the previous rule is unnecessary.
  3. Reference identifiers are expected to be unique - no more than one reference identifier is expected for each combination of text, type.code, (type.codeSystem, type.codeSystemVersion, type.decode?), identifierScope.identifierScheme, and identifierScope.identifier. (However, I'm guessing it would be OK for a study to be included in more than one clinical development plan defined by a sponsor, so there's no reference identifier rule corresponding with the second study identifier rule above). Should this be an error instead of a warning?
BSnoeijerCD commented 1 month ago

@BSnoeijerCD I can only think of the following three rules:

  1. Study identifiers must be unique - there must be no more than one study identifier for each combination of text, identifierScope.identifierScheme, and identifierScope.identifier. I am assuming that there can only be one legal address for any organization (that assigns study identifiers).
  2. Only one identifier is expected within each identifier scope - no more than one reference identifier is expected for each combination of identifierScope.identifierScheme, and identifierScope.identifier. Note if this is changed from a warning to an error, then the previous rule is unnecessary.
  3. Reference identifiers are expected to be unique - no more than one reference identifier is expected for each combination of text, type.code, (type.codeSystem, type.codeSystemVersion, type.decode?), identifierScope.identifierScheme, and identifierScope.identifier. (However, I'm guessing it would be OK for a study to be included in more than one clinical development plan defined by a sponsor, so there's no reference identifier rule corresponding with the second study identifier rule above). Should this be an error instead of a warning?
  1. This implies that you cannot have more than 1 identifier for 1 organization. I think there could be situations where you can have more (re-numbering within an organization/different purposes of the identifier) We can make this a warning instead? Maybe we also should add the notes attribute to the StudyIdentifier class to allow for additional custom groupings.
  2. I would say that you could have different reference identifiers (with different types) for 1 organization. We do not want to restrict this.
  3. We can give a warning if we do have multiple identifiers per type. Although possible, I would expect a study to be part of only 1 development plan or pediatric investigational plan.
ASL-rmarshall commented 1 month ago

@BSnoeijerCD in reply to your comments:

  1. This rule is checking for exact duplicates (the same identifier text for the same scope/organization). If you had a different identifier (text) for the same organization, it would not fail this rule. I think this should be an error - I can't think of any situation in which you'd want to record exactly the same identifier multiple times.
  2. There was a typo in my original definition - I'd intended this to be:

    Only one study identifier is expected within each identifier scope - no more than one reference identifier is expected for each combination of identifierScope.identifierScheme, and identifierScope.identifier.

    So this would correspond with your comments for 1 - "you cannot have more than 1 identifier for 1 organization" - and I agree it should only be a warning. I wouldn't object to adding the notes attribute to StudyIdentifier. If we think it might be useful for ReferenceIdentifier too, then it should be added to Identifier to be inherited by both StudyIdentifier and ReferenceIdentifer. However, even if we add the notes attribute, I don't think it should be referenced by this rule.

  3. So are you saying there should be 2 rules for reference identifiers, both of which report warnings:
    1. The same identifier text is used more than once with the same type for the same scope/organization.
    2. There is more than one identifier with the same type for the same scope/organization?
BSnoeijerCD commented 1 month ago

@ASL-rmarshall

  1. Ok. Sounds good. I assume could be applied to referenceIdentifier as well (see 3.i) as we would not expect duplicating the same identifier for the same organization regardless of whether they are of different types.
  2. Agree. We should not include the notes in the rule. For referenceIdentifier it should be the same rule but then by type. (see 3.ii )
  3. See above.
BSnoeijerCD commented 1 month ago

@ASL-rmarshall : Could you review the following? Apart from the above, because we changed the naming of variable studyIdentifierScope to scope, we need to update CHK0012 and CHK0102 to make them only applicable to V3.0 and create corresponding ones with different variable names for v4.0. For these checks I set v4.0 to N and I created corresponding checks CHK0193 and CHK0193 for version 4.

ASL-rmarshall commented 1 month ago

@BSnoeijerCD

Newly-defined Checks

Based on comments above, it looks like we need 3 new checks:

  1. Study and reference identifiers must be unique - there must be no more than one study or reference identifier for each combination of text, identifierScope.identifierScheme, and identifierScope.identifier. This needs to be implemented separately for V3 and V4 due to renaming of attributes.
  2. No more than one study identifier is expected for each organization - no more than one study identifier is expected for each combination of identifierScope.identifierScheme, and identifierScope.identifier.
  3. No more than one of each type of reference identifier is expected for each organization - no more than one reference identifier is expected for each combination of type, identifierScope.identifierScheme, and identifierScope.identifier.

Are these OK? If so, I have a couple of additional questions:

  1. Do we care if the same identifier text (for the same organization) is used as both a study identifier and a reference identifier? I suppose it's possible that you might happen to have the same string of characters used as a study identifier and (for example) a clinical development plan identifier. If we think it's worth checking for this, then the rule should probably only generate warnings.
  2. (Similar question for other CT uniqueness rules), which attributes of type should we use to identify duplicates (code, decode, codeSystem, codeSystemVersion)?

Existing Checks

If we're reviewing/updating CHK0012 and CHK0102 then I think we should implement the change agreed in "Q12" on the Questions sheet - i.e., recombine these checks into a single check that says "Every study version must have one, and only one, sponsor identifier" (or "Of the study identifiers defined for a study version, exactly one must have an identifier scope that references a clinical study sponsor organization."). Because of the renaming of the scope attribute, I agree that this single check specification would then need to be implemented as one rule for V3 and one for V4.

If you agree, should we delete CHK0012 and CHK0102 and create a completely new (recombined) check for V3, or should we reuse and modify either CHK0012 or CHK0102 and delete the other? (We'd need a new check for V4 regardless - either CHK0193 or CHK0194 ... or reuse either CHK0012 or CHK0102 for this?).

New Check?

Also, the cardinality for studyIdentifiers was 0.. in V3 but has been changed to 1.. for V4. Does this mean that we need a V3 rule for "Every study version must have at least one study identifier"?

dih-cdisc commented 1 month ago

Consider a check for there should only be one sponsor identifier. It is useful to be able to pick out "THE" sponsor identifier. This should probably be an error.

The three checks above should probably be warnings rather than errors

BSnoeijerCD commented 1 month ago

@dih-cdisc :

@ASL-rmarshall: I would suggest not to change any V3 checks unless there is a strong reason to do so. We want to remain as stable as possible. But making it more simple and thus combining CHK0012 and CHK0102 if that is possible with the CORE engine is better indeed. I think we are almost there. Let's go through it together in the spreadsheet to make it complete.

ASL-rmarshall commented 1 month ago

@BSnoeijerCD As discussed on 2024-0813:

Newly-defined Checks

We agreed that only the first 2 checks are needed (we won't check for more than one reference identifier per type - a study referenced by more than one clinical development plan or PIP will not be reported as a warning). There will be separate V3/V4 rules for each of these checks.

We agreed not to check for the same identifier used as both study identifier and reference identifier.

The question about how to identify duplicate type is now redundant as we're not checking by type any more.

Existing Checks

We agreed to recombine the checks. CHK0012 and CHK0193 have been updated to specify that there must be exactly one sponsor identifier. CHK0102 and CHK0194 have been removed.

New Check?

CHK0012 and CHK0193 will be changed to check for "Every study design must have exactly one sponsor identifier" instead of "Of the study identifiers defined for a study design, exactly one must be a sponsor identifier".

BSnoeijerCD commented 4 weeks ago

@ASL-rmarshall :