Please join your peers on either March 26 (8pm GMT) or March 28 (8am GMT) to watch as user extraordinaire and forum legend @"lindsay.stevens" demonstrates OpenClinica Insight.

See preview and register at

Insight makes it easy to ask questions of ALL of your clinical and operational data and visualize answers via interactive reports and dashboards. The idea is simple, but the results are powerful: ask your questions, choose your visualizations, then return often for updated, interactive results that link you to all of the underlying data.

SAS extraction of DataType="partialDate"

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

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: 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"

ItemDef OID="I_MEDIC_HYSTERDT" Name="HysterDt" DataType="partialDate" SASFieldName="HysterDt" Comment="Date of hysterectomy :"
Date of Intervention - (dd-mmm-yyyy)

ItemGroupData ItemGroupOID="IG_MEDIC_UNGROUPED" TransactionType="Insert"
ItemData ItemOID="I_MEDIC_HYSTER" Value="1"
ItemData ItemOID="I_MEDIC_HYSTERDT" Value="2008"

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;

data SAS.UNGRO00c;
set ODM.UNGRO00c;
format HYSTERDT $10.; *Example of the formatting I have tried;

Sign In or Register to comment.