# Rule SD0021 and SD0031, Validated data for MH.xpt

**URL:** <https://forum.certara.com/t/rule-sd0021-and-sd0031-validated-data-for-mh-xpt/251>\
**Category:** SDTM\
**Created:** [November 25, 2011, 9:04am UTC](https://forum.certara.com/t/rule-sd0021-and-sd0031-validated-data-for-mh-xpt/251 "2011-11-25T09:04:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdigian](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mdigian](https://forum.certara.com/u/mdigian)\
**Post date:** [November 26, 2011, 12:41am UTC](https://forum.certara.com/t/rule-sd0021-and-sd0031-validated-data-for-mh-xpt/251/1 "2011-11-26T00:41:11Z")

</div>

I think if you specify a medical history condition and don’t specifiy that it didn’t occur (MHOCCUR=N), then we assume it did occur and therefore it must have either …

a start and end date (MHSTDTC and MHENDTC)

or

start and end reference to study reference date (DM.RFSTDTC)

Basically, if some medical history condition occured, we want to ensure the timing relative to the study.

---

<div class="post-metadata">

**Author:** ![wanchicheng](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@wanchicheng](https://forum.certara.com/u/wanchicheng)\
**Post date:** [November 28, 2011, 2:29am UTC](https://forum.certara.com/t/rule-sd0021-and-sd0031-validated-data-for-mh-xpt/251/2 "2011-11-28T02:29:37Z")

</div>

Many thanks for your comments.

I think it is better if I can define the start and end reference to study reference date,

But I could not define “MHSTRF” since there is no “MHSTRF” variable in SDTM IG.

---

<div class="post-metadata">

**Author:** ![mdigian](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@mdigian](https://forum.certara.com/u/mdigian)\
**Post date:** [November 28, 2011, 3:05pm UTC](https://forum.certara.com/t/rule-sd0021-and-sd0031-validated-data-for-mh-xpt/251/3 "2011-11-28T15:05:47Z")

</div>

If a medical condition occured, then you must have one of these pairs:

a start date (MH **STDTC** ) and end date (MH **ENDTC** )

or

start relative to reference period (MH **STRF** ) and end relative to reference period (MH **ENRF** ).

The sponsor defined reference period = DM.RF **ST** DTC and DM.RF **EN** DTC

Recall that the SDTM IG only EXPLICITY lists the most commonly used or recommend variables for each domain. Below each DOMAIN section are assumptions. The assumptions list which other variables SHOULD NOT be used and other variables which MAY be used. in cases where they neither explicity include or exclude a variable, then OpenCDISC assumes that variable is valid.

The punch line here is p 113 #5b (Timing Variables) of the section 6.2.3.1 ASSUMPTIONS FOR MEDICAL HISTORY DOMAIN MODEL. It states:

“Additional timing variables (such as MHSTRF) may be used when appropriate.”

Mike DiGiantomasso

OpenCDISC

---

<div class="post-metadata">

**Author:** ![wanchicheng](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@wanchicheng](https://forum.certara.com/u/wanchicheng)\
**Post date:** [November 25, 2011, 9:04am UTC](https://forum.certara.com/t/rule-sd0021-and-sd0031-validated-data-for-mh-xpt/251/4 "2011-11-25T09:04:39Z")

</div>

Hello,

Our medical history data record is quite simple and only includes: free-text **Mddical history term** and **Past/Active status** ,

Therefore, I create the MH.xpt includes variable subject’s MHTERM record with MHSTDTC and MHENDTC are **blank**.

When I validate MH.xpt, it shows warning:

**SD0021: --ENRF expected when --ENDTC is null**

> Identifies records that violate the condition [End Relative to Reference Period is not null], limited to records where [End Date/Time of Observation is null] and [Occurrence doesn’t equal ‘N’]

| | | |
| --- | --- | --- |

I am quite confused since I did not collect MHENDTC date, in order to resolve this warnning,

I added MHENRF data as ‘BEFORE’ or ‘ONGOING’ based on Past/Active status,

However, it shows another warnning:

**SD0031: Start date expected when end date provided**

> Identifies records that violate the condition [Start Date/Time of Observation or Start Relative to Reference Period is not null], limited to records where [End Date/Time of Observation or End Relative to Reference Period is not null]

| | | |
| --- | --- | --- |

But I did not have the medical history start date data.

May I ask if any one have experience for this stituation? Thanks.

Any comment is appreciated.

Wanchi
