When uploading an attachment it is currently only possible to either
- link it to a visit ;
- make it encounterless (visit param is left null).
The purpose of this ticket is to ensure that it would be possible to specify an encounter parameter to choose which encounter to hook the attachment to.
If both the visit and encounter parameter are provided together then an IllegalRequestException should be thrown if the encounter does not belong to the visit.