Police launched a probe after more than 150 NHS workers had their medical records accessed by a colleague.
A staff member who accessed the records, potentially obtaining information about medical conditions, appointments and waiting lists, was interviewed by NHS Lothian, which referred the matter to police.
The breach was detected when a routine monitoring system picked up unusual activity showing a staff member viewed the medical records of other staff members outside of normal duties.
More than 150 people were sent letters saying records have been accessed, between January and February to protect the identity of the person involved.
Dr Tracey Gillies, medical director for NHS Lothian wrote: “I am very sorry to inform you that, during a routine monthly audit of staff access to computerised records we identified a member of staff viewed your patient record when it was potentially not part of their normal duties.
“We have a duty to inform you of this and assure you that we regard this very seriously.
“The member of staff was being dealt with through the appropriate disciplinary procedure in NHS Lothian.
“Due to the seriousness with which we view any breach of patient confidentiality, this matter has also been reported to the police, the Information Commissioner’s Office and the staff members regulatory body.”
Staff members have not been told the identity of the colleague who accessed their records, as the matter has been handed to Police Scotland.
Dr Gillies said: “NHS Lothian has become aware that a member of staff may have inappropriately accessed staff records.
“We swiftly started an enquiry into this matter and as part of this investigation we are contacting anyone whose records have been accessed.
“NHS Lothian takes incidents like this extremely seriously and we have written to offer our sincere apologies to those affected.
“The breach was picked up by our Fair Warning system, which is an e-health monitoring system.
“Our robust monitoring identified this activity and it was reported to Police Scotland as soon as we became aware of the breach.
“We will continue to work closely with Police Scotland and the Scottish Information Commissioner to resolve this matter.
“As this is now a police matter, we are unable to offer any further comment.”