SAS Life Science Analytics Framework and the clinical data products from SAS

ODM XML partialDate variable

Accepted Solution Solved
Reply
Contributor
Posts: 26
Accepted Solution

ODM XML partialDate variable

I am working on creating datasets in SDTM format from an XML ODM v1.2 file and I am unable to extract partial dates; columns containing partial dates come out completely empty.

 

I have tried editing the format of the partial date variables in different ways without success. This makes me think the partialDate variables are not pulled from the XML file.

 

I have tried a PowerShell script to convert the partial dates to text format in the XML file without success. (script available here: https://en.wikibooks.org/wiki/OpenClinica_User_Manual/SAS). My XML file becomes unreadable by my SAS program after running the script.

 

Any suggestion would be greatly appreciated.

 

Here is the information relevant to one partial date variable (HYSTERDT) contained in the XML file which I am trying to extract:

 

<ItemGroupDef OID="IG_MEDIC_UNGROUPED" Name="IG_MEDIC_UNGROUPED" Repeating="No" SASDatasetName="UNGRO00c">

               <ItemRef ItemOID="I_MEDIC_HYSTER" OrderNumber="6" Mandatory="No"/>

                <ItemRef ItemOID="I_MEDIC_HYSTERDT" OrderNumber="7" Mandatory="No"/>

</ItemGroupDef>

<ItemDef OID="I_MEDIC_HYSTERDT" Name="HysterDt" DataType="partialDate" SASFieldName="HysterDt" Comment="Date of hysterectomy :">

               <Question>

                   <TranslatedText>

                   Date of Intervention - (dd-mmm-yyyy)

                   </TranslatedText>

               </Question>

           </ItemDef>

<ItemGroupData ItemGroupOID="IG_MEDIC_UNGROUPED" TransactionType="Insert">

                       <ItemData ItemOID="I_MEDIC_HYSTER" Value="1"/>

                       <ItemData ItemOID="I_MEDIC_HYSTERDT" Value="2008"/>

</ItemGroupData>

 

Here is my code for extracting datasets which works fine with any variable other than partial dates:

 

*SAS Options;

options compress=yes nofmterr mprint symbolgen;

 

*Reading the ODM XML file;

 

LIBNAME ODM xml xmltype=CDISCODM

FORMATACTIVE=YES

FORMATNOREPLACE=NO

FORMATLIBRARY=Indata;

run;

 

data SAS.UNGRO00c;

set ODM.UNGRO00c;

format HYSTERDT $10.; *example of formatting I have tried;

run;

 

Thanks,


Accepted Solutions
Solution
‎08-30-2016 05:08 PM
Contributor
Posts: 26

Re: ODM XML partialDate variable

Changing DataType="partialDate" to DataType="text" in the XML file using find/replace is the only solution I found.  

 

View solution in original post


All Replies
Solution
‎08-30-2016 05:08 PM
Contributor
Posts: 26

Re: ODM XML partialDate variable

Changing DataType="partialDate" to DataType="text" in the XML file using find/replace is the only solution I found.  

 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 452 views
  • 0 likes
  • 1 in conversation