Reuse of Titles and footnotes
vikasgaddu1 opened this issue · 3 comments
Hi,
In our organization, a singular table may encompass various display formats such as default, conditional, and optional, from which a biostatistician can choose for their particular study. It's understood that ARS pertains to content rather than the visual aspect. I'm pondering whether it would be advantageous to separate titles and footnotes from a specific display, enabling their application across all display types and reducing potential typographical errors. To provide a concrete example, consider the FDA STF.xlsx $Displays worksheet. Is it feasible to transition the column 'displaySection_subSection_text' into an independent class or sheet - let's label it 'tnf' - where we can catalogue both the ID and text? Any output sharing identical titles or footnotes can then simply reference the appropriate ID value.
Occasionally, constraints are placed on the length or number of titles and footnotes to ensure that the core content of the output isn't overshadowed by these elements taking up a significant portion of the space. Thus, it could be advantageous to incorporate metadata values that regulate the size and number of titles and footnotes, which individual companies could modify in accordance with their unique standards.
There are sections of a footnote that might require alteration depending on specific conditions. For instance, "Denominators are based on participants in [All Enrolled]|[All Randomized] Analysis sets." The choice in this context depends on the AnalysisSets used for the output. Would it be possible to design footnotes as f-strings in Python, incorporating placeholder variables that dynamically obtain their values in accordance with particular conditions?
The model already accommodates referring to previously defined title/footnote text (DisplaySubSection.text) by id. Usually, subsection text referenced in this way will have been defined as a "global display section" (i.e. as one of the subSections for a GlobalDisplaySection) which is specifically designed for static pieces of text that's expected to be used in multiple displays in the reporting event. There are examples of this in the Common Safety Display example:
Definition:
name: Common Safety Displays
id: CSD
...
globalDisplaySections:
- sectionType: Title
subSections:
- id: GlobalDisp_Title_1
text: Safety Population
- sectionType: Footnote
subSections:
- id: GlobalDisp_Footnote_1
text: 'Program: <pid>.sas, Output: <pid><oid>.rtf, Generated on: DDMONYYYY:HH:MM'
(See the GlobalDisplaySections sheet of the Common Safety Displays.xlsx Excel file).
Use (see third title where there's a referenced subSectionId instead of a defined subSection):
name: Common Safety Displays
id: CSD
...
outputs:
- name: Summary of Demographics
id: Out14-1-1
version: 1
...
displays:
- order: 1
display:
name: Demog
id: Disp14-1-1
version: 1
displayTitle: Summary of Demographics
displaySections:
- sectionType: Title
orderedSubSections:
- order: 1
subSection:
id: Disp14-1-1_Title_1
text: Table 14.1.1
- order: 2
subSection:
id: Disp14-1-1_Title_2
text: Summary of Demographics
- order: 3
subSectionId: GlobalDisp_Title_1
References like this are shown in the Displays sheet in the corresponding Common Safety Displays.xlsx Excel file as rows where the displaySection_subSection_text
column is blank (just because that's how I chose to represent the references in this somewhat arbitrary tabular format - I could have added a separate column for referenced subSectionId).
The model does also support referencing by id a subsection previously defined in another display, but it would seem more sensible (and makes it easier for an lookup-text-by-id function) if global display sections are used for reusable text.
The idea of specifying a max number of subsections is interesting. We may consider this for a future version of the model, but would need to decide how this fits into the model.
I like the idea of "f-string" titles/footnotes, etc (this is something that I've wondered about while developing that part of the model - especially given that one of the example global footnotes looks like it should allow for substitution of the actual date/time; see above). At the moment, there is no restriction on the format of the text, so this could just be an implementation decision - e.g. for your implementation, you could just decide to treat the defined text as f-strings. However, we don't yet have a defined syntax for referring to metadata elements that are part of the model (e.g. for your example, how to say "get the label from the analysis set that is used for all the analyses whose results are included in the display that has this footnote"). There is a rudimentary attempt at something like this for programming code parameters in the Common Safety Displays example, but nothing has been formalized yet.
It's also worth mentioning that every id/text combination is represented as an instance of the DisplaySubSection class - regardless of whether the id/text was defined within a global display section or a specific display section. If it's useful for an implementation, it would be valid to represent all DisplaySubSection instances as rows in a separate DisplaySubSection table as shown in the DisplaySubSection sheet of the autogenerated Excel representation of the model or lines 89-93 of the autogenerated SQL DDL representation of the model.
Thank you, Richard! Upon examining the model more closely, your explanation is making sense now.