y Yihong
on

 

In P21 generated spec, I would like to give comments for assigned variables DICTNAME and DICTVER in SUPPAE, but the assigned value will appear twice in define.xml, how should I fix this situation? And is there another way to put assigned value for variable?

 

Forums: Define.xml

j Jozef
on November 11, 2022

You say that the assigned value appears twice in the define.xml, but what I learn from your screenshots is that the value appears twice in the VIEW (in the browser) of the define.xml.
That is not the same at all.
Please open your define.xml with e.g. NotePad++ or an XML editor and look up where these variables are defined. Only than can be found whether the cause of this is either in the define.xml itself or in the stylesheet.

y Yihong
on November 13, 2022

</ItemRef>
            <ItemRef ItemOID="IT.SUPPAE.QVAL.SUPPAE.QNAM.EQ.DICTNAME" OrderNumber="7" Mandatory="No">
               <def:WhereClauseRef WhereClauseOID="WC.SUPPAE.QNAM.EQ.DICTNAME"/>

</def:WhereClauseDef>
         <def:WhereClauseDef OID="WC.SUPPAE.QNAM.EQ.DICTNAME" def:CommentOID="COM.SUPPAE1">
            <RangeCheck SoftHard="Soft" def:ItemOID="IT.SUPPAE.QNAM" Comparator="EQ">
               <CheckValue>DICTNAME</CheckValue>
            </RangeCheck>
</ItemDef>
         <ItemDef OID="IT.SUPPAE.QVAL.SUPPAE.QNAM.EQ.DICTNAME"
                  Name="QVAL.SUPPAE.QNAM.EQ.DICTNAME"
                  DataType="text"
                  Length="200"
                  SASFieldName="QVAL"
                  def:CommentOID="COM.SUPPAE1">
            <Description>
               <TranslatedText>Dict Name</TranslatedText>
            </Description>
            <def:Origin Type="Assigned"/>

I used different stylesheet and the value still appears twice in the VIEW (in the browser) of the define.xml. And for comments in assigned variables sheet appear once in the VIEW.

File Upload

j Jozef
on November 14, 2022

Hard to say from this very small snippet ...
You may always send me the complete define.xml. My mail address is easy to find.

t Takayuki
on November 14, 2022

Hi Yihong and Jozef,

I have the same problem.
I believe this is a bug in the Pinnacle 21 Community.
With the most recent Pinnacle 21 Update, the ValueLevel sheet in the Excel spec has only one Comment column. (Previously, the Excel spec had a Comment column and a JoinComment column.)
The result of having only one Comment column is that the same def:CommentOID is assigned to both def:WhereClauseDef and ItemDef.(In Yihong's example, it is "COM.SUPPAE1")

>To the developers of the Pinnacle 21 community.
Please share your views on this issue. Also, if it is a bug, please let me know when P21C will resolve it.

Thanks

u Uma Devi
on March 9, 2023

Hi,

I have question on VLM.  The Expand all VLM, Collapse all VLM tabs and VLM hyperlink in define.xml are working when I open define.xml in IE from P21 Community default folder. However, after define.xml file copied to study folder and opened define.xml using IE, Expand all VLM and Collapse all VLM tabs are not working. VLM under each dataset section are already expanded and VLM (hyperlink) is also not working. Could you please suggest how to resolve this issue.

Thank you,

Uma.

    

n Nancy
on March 20, 2023

Hi,

I'm seeing the same thing that Yihong and Takayuki have reported with the P21 Define-XML template.  When specifying value-level comments, the comment text is repeated under the "Origin/Source/Method/Comment" column of the resulting define.xml file.  I have verified that there are no duplicate references to those comment IDs in the completed Excel template, but they appear when the define.xml is viewed both with the stylesheet generated by P21 and with the stylesheet provided by CDISC in the Define-XML package.  Has anyone been able to resolve this?

Thanks,
    Nancy

j Jozef
on March 20, 2023

@Nancy: define.xml does not have "columns"!!! It is XML ...
It is only the VIEW on the define.xml in the browser, provided by the XSLT stylesheet, that has columns.
So, in cases like yours, it surely is a good idea to check the XML itself. You can easily do so, e.g. using NotePad++. You can then much more easily find out what the reason is that you get repeated text in the VIEW of the define.xml.

Jozef Aerts
CDISC Define-XML instructor and member of the CDISC Define-XML Development Team

n Nancy
on March 21, 2023

@Jozef- point taken.  When viewed with the stylesheet, the comment is being duplicated in the "Origin / Source / Method / Comment" cell for that combination of variable and value.  We used the P21 Excel template with P21C to generate the Define, and have verified that the only reference to the comment ID occurs on the Value-Level tab, in the Comment column on the row for that variable and WHERE clause, and the comment ID itself is not duplicated on the Comments tab of the Excel file.

In the resulting Define-XML file, both the WhereClauseDef and ItemDef contain a reference to that comment ID.  Here are the excerpts from both sections:

         <def:WhereClauseDef OID="WC.DATASETA.STUDYID.EQ.111_2222'" def:CommentOID="COM.TITLE_2222">
            <RangeCheck SoftHard="Soft" def:ItemOID="IT.DATASETA.STUDYID" Comparator="EQ">
               <CheckValue>'111_2222'</CheckValue>
            </RangeCheck>
         </def:WhereClauseDef>

         <ItemDef OID="IT.DATASETA.TITLE.DATASETA.STUDYID.EQ.111_2222"
                  Name="TITLE.DATASETA.STUDYID.EQ.111_2222"
                  DataType="text"
                  SASFieldName="TITLE"
                  def:CommentOID="COM.TITLE_2222">
            <Description>
               <TranslatedText>Study Title</TranslatedText>
            </Description>
            <def:Origin Type="Assigned" Source="Sponsor"/>
         </ItemDef>

We think the code being used to generate the Define is creating the references in both sections.  If we manually delete the CommentOID from one of the sections, the duplicate entry disappears when viewed with the stylesheet.  It makes more sense to us, at least, to keep this information with the ItemDef, not with the WhereClauseDef, because then it's closer to the rest of the value-level info for the variable, but in either case, I think this is something that needs to be fixed within the P21 Define generation process.  We haven't been able to find a way to set up the VLM that avoids the problem, and are going to move back to Define v2.0, at least for the moment, because our only other choices are to either post-process the define.xml file and remove the WhereClauseDef entry, or avoid using VLM altogether.

Thanks,
    Nancy

n Nancy
on March 21, 2023

Did some additional testing this afternoon...  If the dataset in question has a mixture of Assigned and Derived variables, the problem seems to go away.  The WhereClauseDef is generated without the def:CommentOID attribute, and the associated comment and method are displayed once, in the appropriate cell, when viewed with the stylesheet.

However, if there are 2 Assigned variables and no Derived variables, the WhereClauseDef element is generated with the def:CommentOID attribute from the second Assigned variable- which means that comment appears for all Assigned variables, in addition to the comment actually associated with that variable, when viewed with the stylesheet.

I'm not sure how often datasets would be created containing VLM for only Assigned variables, but is is theoretically possible- and will run into problems with this version of P21C if that happens.

Thanks,
   Nancy

j Jozef
on March 21, 2023

Thanks @Nancy,
This is one of the reasons I prefer to use GUI based (mostly what-you-see-is-what-you-get) software to generate define.xml, instead of what I call "black box" software.

Also, during the Define-XML trainings I give for CDISC, I usually recommend to fix such small issues just e.g. using NotePad++ (or an XML editor) when it is not clear from the software itself what causes the issue. This also encourages people to learn to understand what Define-XML is and how it works.
During the CDISC trainings, we constantly compare what is seen in the browser and what it really is in the XML.
It may be a bit ambitious to say so, but such a course promotes the participants to Define-XML experts (at least within their company) in just one day.

P.S. I also think it makes more sense to have the comment on the ItemDef than on the WhereClause. If I remember well, the comment on the WhereClause was especially introduced for the case that values from different domains are used in the clause. Example from the spec: VSORRESU=cm where VSTESTCD=HEIGHT and DM.COUNTRY ne USA (but the example essentially is overkill ...)

j Jozef
on March 22, 2023

As in my experience, a comment on the WhereClause is pretty seldom, I looked it up in the spec:

CommentOID on def:whereClauseDef Define-XML 2-1 specification

As I thought, It is only mandatory when the WhereClause is about variables from different domains (as in the example of height in cm outside the USA).
But ... Is there also is a comment on ItemDef, my feeling is that this should be a different comment. What this has to do with Assigned and Derived variables is a mystery to me too (black box software).

l Lanjun
on March 24, 2023

Hi Jozef,

I would like to say my 'Thank you!' for giving your understanding and suggestions for VLM! 

I have met same situation: 'Origin / Source / Method / Comment' showed 2 different lines for the same variable with 'Where Condition'. For example, comment of AVALCA1N (where PARAMCD IN ("QTCB" (QTcB Interval (ms)), "QTCF" (QTcF Interval (ms)))) should be 'Assigned AVALCAT1 的数值版本', but actually showed:

'Assigned

AVALCAT1 的数值版本

CHGCAT1 的数值版本'

See? The line 'CHGCAT1 的数值版本' should not be here. So we found the reason why it happened was that, in definespec.xlsx, both AVALCA1N and CHGCAT1N had comment (ADEG.AVALCA1N.1 and ADEG.CHGCAT1N.1) with same 'Where Clause': PARAMCD NOTIN (QTCB, QTCF). 

To deal with it, I moved all these kinds of 'Comment' to 'Method', and it worked. 

 

Really, big thanks to you!

 

Lanjun Ding

Lex
on March 24, 2023

It may seem in the stylesheet presentation that this trick solves the issue because comments and methods are displayed in the same “Origin / Source / Method / Comment” column. But it is not a real solution. A comment is not a method. In the XML the comments may now be in the method elements. When they are really comments, and not methods, they don’t belong there. 

Lex Jansen

 

j Jozef
on March 27, 2023

I have never been a fan of having Origin, Source, Method and Comment in the same column in the HTML view, but understand that it may be needed as reviewers forget that there may be a horizontal scrollbar to scroll more to the right, and thus miss additional columns.
One possible solution may be to add the wording "Method: ", "Comment: " in the stylesheet before the text itself, or in brackets after the text, so that it is clear what is comment and what is method description. That would also reveal "workarounds" such as used by Lanjun.
Please remark that sponsors are always allowed to change the stylesheet to better explain the metadata to the reviewer.

Lex
on March 27, 2023

Actually, the stylesheet has parameters. You can use the displayPrefix parameter: Display Prefixes ([Comment], [Method], [Origin]) (0/1)
The default is 0.

To use this parameter you need a stylesheet processor like Saxon (see: https://swhume.github.io/blog-2022-generate-html-from-xml.html). The default parameters are used when you open the XML file in the browser. The defaults are meant to be used in a submission. Using other values than the defaults is more for testing and development.

Yes, you can change the stylesheet, but reviewers like predictability.

The current available stylesheets used by most are managed at https://github.com/lexjansen/define-xml-2.0-stylesheets and https://github.com/lexjansen/define-xml-1.0-stylesheets. You can submit issues at: https://github.com/lexjansen/define-xml-2.0-stylesheets/issues and https://github.com/lexjansen/define-xml-2.1-stylesheets/issues

Lex Jansen

 

j Jozef
on March 27, 2023

Learning from you almost every day Lex ...

Want a demo?

Let’s Talk.

We're eager to share and ready to listen.

Cookie Policy

Pinnacle 21 uses cookies to make our site easier for you to use. By continuing to use this website, you agree to our use of cookies. For more info visit our Privacy Policy.