Diagnosis in the error log
A developer improves error reporting in an appointment service.
} catch (err) {
logger.error("booking failed", { patient, err });
}The patient object includes name, date of birth and diagnosis codes, which would be written to your log provider. Log patient.id and the error only.
Result: PHI stays out of systems that aren't covered for it.