added exporting funcionality on patients