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

Interventions [API] #445

Open BSnoeijerCD opened 1 month ago

BSnoeijerCD commented 1 month ago

Formulation missing from intervention and alignment with IDMP. See feature ticket #316

See JIRA 520

ASL-rmarshall commented 1 week ago

@dih-cdisc I think having referenceSubstance as a self-referencing, definitional relationship might cause problems with infinite looping. AFAIK, all other self-referencing relationships in the model are references by id.

We are defining a rule to say referenced substances shouldn't have a reference, but an application that parses the API spec directly won't know where to stop.

Off the top of my head, I can think of two alternatives:

  1. Define substances in an API-only collection - probably at the StudyVersion level - and reference them (all) by id.
  2. Tweak the model to:

    • Remove the referenceSubstance relationship from Substance
    • Make Ingredient a type of Substance that can have reference substance(s) in additional to a role (and remove its id attribute and substance relationship)
    • Add a ReferenceSubstance class that is also a type of Substance, but one that can only be referenced by an ingredient
    • (Substance then becomes an abstract class)

    image

I have a slight preference for the second option.

FYI @BSnoeijerCD (and a question: based on your comment, I was expecting referenceSubstance to be changed to 0..* referenceSubstances - was keeping it singular intentional?)

BSnoeijerCD commented 1 week ago

@ASL-rmarshall - Repeatable reference strengths were indeed mentioned as such in the IDMP IG. However, there was no example of that in the IG and as it is intended to present the active moiety in the body, I am not seeing a use case where this would be applicable for an clinical trial.

ASL-rmarshall commented 5 days ago

@dih-cdisc Did you have any thoughts about the infinite looping issue and the two suggested alternatives for preventing it (substance collection vs adding a ReferenceSubstance class)? Is this something that needs to be considered for the 3.6 release?

Here's an updated pic showing referenceSubstance as a 0..1 relationship based on Berber's reply above. image

ASL-rmarshall commented 4 days ago

This was discussed on 2024-09-11 and the inheritance option was not popular because the IDMP differentiates between ingredients and substances. We'll go with the current model and create a review comment for release 3.6 if it still appears to be an issue.

A simpler alternative might be to move the referenceSubstance relationship to be between Ingredient and Substance (instead of between Substance and Substance) so that, for each ingredient, you must specify the substance and you may also specify a reference substance: image