SAS extraction of DataType="partialDate"

abeauregardabeauregard Posts: 1
edited July 2016 in Forum How-Tos
Hello,

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 partial dates are not pulled from the XML file.

I have tried the 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 the basis of 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 the formatting I have tried;
run;

Thanks,
Tagged:
Sign In or Register to comment.