Hi Staffan,
You are correct, rule SD1011 does not currently support intervals. I have updated the regular expression to support the following scenarios:
- PnYnMnDTnHnMnS or PnW
- YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss
- YYYY-MM-DDThh:mm:ss/PnYnMnDTnHnMnS
- PnYnMnDTnHnMnS/YYYY-MM-DDThh:mm:ss
I’m just not sure whether intervals could be used in all --DUR, --ELTM, and --EVLINT variables, or just --EVLINT. I’ll try to clarify this with someone from the SDTM team next week at the CDISC Interchange.
Here is the revised rule:
<val:Regex ID=“SD1011” Variable=“%Variables[*DUR,*ELTM,*EVLINT]%” Test=“(-?P((([0-9]+(.[0-9]+)?Y)?([0-9]+(.[0-9]+)?M)?([0-9]+(.[0-9]+)?D)?(T([0-9]+(.[0-9]+)?H)?([0-9]+(.[0-9]+)?M)?([0-9]+S)?)?)|[0-9]+(.[0-9]+)?W))|((((([0-9][0-9][0-9][0-9])((-(([0][1-9])|([1][0-2])))((-(([0][1-9])|([1-2][0-9])|([3][0-1])))(T((([0-1][0-9])|([2][0-3]))((:([0-5][0-9]))(((:([0-5][0-9]))((.[0-9]+)?))?)?)?((((+|-)(([0-1][0-9])|([2][0-3])):[0-5][0-9])|(Z)))?))?)?)?))/((([0-9][0-9][0-9][0-9])((-(([0][1-9])|([1][0-2])))((-(([0][1-9])|([1-2][0-9])|([3][0-1])))(T((([0-1][0-9])|([2][0-3]))((:([0-5][0-9]))(((:([0-5][0-9]))((.[0-9]+)?))?)?)?((((+|-)(([0-1][0-9])|([2][0-3])):[0-5][0-9])|(Z)))?))?)?)?)))|(((([0-9][0-9][0-9][0-9])((-(([0][1-9])|([1][0-2])))((-(([0][1-9])|([1-2][0-9])|([3][0-1])))(T((([0-1][0-9])|([2][0-3]))((:([0-5][0-9]))(((:([0-5][0-9]))((.[0-9]+)?))?)?)?((((+|-)(([0-1][0-9])|([2][0-3])):[0-5][0-9])|(Z)))?))?)?)?))/(((+|-)?P((((0-9?)Y)?((0-9?)M)?((0-9?)D)?)(T(((0-9?)H)?((0-9?)M)?((0-9?)((.[0-9]+)?)S)?)?)?|(((0-9?)W))))))|((((+|-)?P((((0-9?)Y)?((0-9?)M)?((0-9?)D)?)(T(((0-9?)H)?((0-9?)M)?((0-9?)((.[0-9]+)?)S)?)?)?|(((0-9?)W)))))/((([0-9][0-9][0-9][0-9])((-(([0][1-9])|([1][0-2])))((-(([0][1-9])|([1-2][0-9])|([3][0-1])))(T((([0-1][0-9])|([2][0-3]))((:([0-5][0-9]))(((:([0-5][0-9]))((.[0-9]+)?))?)?)?((((+|-)(([0-1][0-9])|([2][0-3])):[0-5][0-9])|(Z)))?))?)?)?))))” Message=“Invalid ISO 8601 value” Description=“Duration, Elapsed Time, and Interval values must conform to the ISO 8601 international standard.” Category=“Format” Type=“Error” Severity=“High”/>
Let me know how this works out.
Thanks,
Max