# Prescribed Medicine, Events, and Condition Linkage

**URL:** <https://forum.ipums.org/t/prescribed-medicine-events-and-condition-linkage/6825>\
**Category:** General\
**Created:** [November 6, 2025, 6:02pm UTC](https://forum.ipums.org/t/prescribed-medicine-events-and-condition-linkage/6825 "2025-11-06T18:02:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nurudeen\_Muraina](https://avatars.discourse-cdn.com/v4/letter/n/0ea827/32.png) [@Nurudeen\_Muraina](https://forum.ipums.org/u/Nurudeen_Muraina)\
**Post date:** [November 6, 2025, 6:02pm UTC](https://forum.ipums.org/t/prescribed-medicine-events-and-condition-linkage/6825/1 "2025-11-06T18:02:19Z")

</div>

I am trying to see if the use of 2 particular drugs for Type 2 diabetes results in fewer hospitalizations, but once I extract my data, I am using Stata, download and run the .dat file, set the age limit, set the icd10code to “E11”, I have no observations again on the drug used and numbers of nights in the hospital. I need help and guidance on it.

---

<div class="post-metadata">

**Author:** ![Isabel\_Pastoor](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.ipums.org/isabel_pastoor/32/788_2.png) [@Isabel\_Pastoor](https://forum.ipums.org/u/Isabel_Pastoor)\
**Post date:** [November 12, 2025, 7:41pm UTC](https://forum.ipums.org/t/prescribed-medicine-events-and-condition-linkage/6825/2 "2025-11-12T19:41:34Z")

</div>

I took a look at your most recent IPUMS MEPS extract, which includes data from the 2018 MEPS in a hierarchical extract format. There are only 2,680 condition records with an ICD10 code of E11. I suspect that after making additional restrictions to your analytical sample, you may not be left with any cases matching the requirements because the sample is simply too small.

I would suggest reviewing our [documentation](https://meps.ipums.org/meps/userNotes_conditioneventpmed.shtml#group3) on MEPS [record types](https://meps.ipums.org/meps-action/variables/RECTYPE#description_section). There are multiple record types in a hierarchical MEPS extract: event records (E), condition-event link records (J), event-medication-round link records (K), person records (P), and condition records (X). Age is a person-level variable, while ICD10 code is a condition-level variable. Make sure that when you are placing restrictions on the analytical sample, you do not accidentally make mis-matched requirements of variables and record types. For example, you cannot make a restriction on the age value of a condition record, or the ICD10 code of a person record. Condition records do have the associated [SERIAL](https://meps.ipums.org/meps-action/variables/SERIAL#description_section) and [PERNUM](https://meps.ipums.org/meps-action/variables/PERNUM#description_section) values attached, so you can use those and other variables to make restrictions on the values of variables on multiple record types.
