...
Validate patient exists in MongoDB
In case of error return 404 not found
Validate encounter
Validate encounter exists in MongoDB
In case of error return 404 not found
Check encounter belongs to patient
In case of error return 404 not found
Processing
Get encounter by ID
Ensure that requested encounter relates to requested Patient
Filter using Forbidden Groups
Render a response according to specification
...