Issue #1052: Service for obtaining the pedigree image

Fixed wrongly formatted JSON returned in case of an error (patient or pedigree not found).