index case for looking for readmits is specific i.e. a certain doctor and certain procedures (prostatectomy).
Are you referring to the index case here or the readmits that are specific? I'm not clear...
At any rate, usually you change your by groupings when you need something like this. I'd need more details to make sure this works in your scenario.
Right now you have the following, and although you don't use admit date and separation date they ensure the data is sorted appropriately.
by chartno admdate sepdate
You can expand this by sorting by doctor/procedure:
by chartno doctor procedure admtdate sepdate
and then using by.procedure instead of by.chartno to change your specifications.