openpharma/crmPack

Refactor `DesignOrdinal`

Opened this issue · 0 comments

Currently, DesignOrdinal and RuleDesignOrdinal require slot values that are subclasses of the ordinal variant of the corresponding binary rule. For example, the cohort_size slot must contain an object of class CohortSizeOrdinal. This forbids the use of rules based on different toxicity grades. For example,

The size of the next cohort will be the larger of the sizes defined by the following rules

  • If no grade 1 toxicities have been reported then the cohort size is 1, otherwise it is 3.
  • If no grade 2 toxicities have been reported, then the cohort size is one, otherwise it is 5.

This change can be supported by first implementing issue #855 and then overriding the slot classes in RuleDesignOrdinal and modifying the validation of RuleDesignOrdinal objects to ensure that slots relating to Rules ensure that the slot contains either

  • an object of an ordinal-based Rule or
  • an object which is a list-based Rule, each of whose elements is an object of an ordinal-based Rule.