I uploaded the discharge date as part of my ontology to be able to set a constraint for the discharge (drop term discharge_date into one of the Groups, then set date constraint).
I think if you apply the date constraint to a certain feature this will only select those, where the encounter (start+end) fell into the specified period.
I hope I understood your question correctly and this is helpful for you.
This example is based on the admission date = Fall/aufnahmedatum (Its all in german, sorry)
Right click aufnahmedatum and set the date constraint. You should be able to do the same for the discharge date.