def fileattachmentobservation_media(instance, filename):
    """Return an upload path for FileAttachment media."""
    return 'files/{0}/{1}/{2}'.format(
        instance.encounter.pk,
        instance.pk,
        filename
    )