The way that I would approach this problem is first creating a variable of whether a patient got readmitted or not. STATA can't interpret "blanks" - they need to be coded as something ("." will suffice, although you won't be able to tell the difference between missing data and those subjects who weren't readmitted. that's why an additional variable of readmitted or not is helpful). Then, I'd look at only patients who were readmitted, and create a new variable of whether they were readmitted in less then 7 days or not. Then, if you still get that error code, you likely have string variables in your output somewhere which need to be "destrung" before recoding. I hope this answers your question.