{"size": 221, "ext": "js", "max_stars_repo_path": "resources/js/utilities/fetchPatient.js", "max_stars_repo_name": "jake-milo/janda", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/js/utilities/fetchPatient.js", "max_issues_repo_name": "jake-milo/janda", "max_issues_repo_issues_event_min_datetime": "2019-03-06T09:15:58.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T09:59:45.000Z", "max_forks_repo_path": "resources/js/utilities/fetchPatient.js", "max_forks_repo_name": "jake-milo/janda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 91, "max_forks_count": null, "avg_line_length": 31.5714285714, "max_line_length": 62, "alphanum_fraction": 0.6425339367}
import { patientMapper } from "../mappers/patients";

export const fetchPatient = id => fetch(`/api/patients/${id}`)
    .then(res => res.json())
    .then(data => data.data)
    .then(patient => patientMapper(patient));
