This is caused by a corrupt table index. To resolve:
1) If possible, backup Medisoft
2) Run File Maintenance by clicking 'File' at the top of Medisoft and select 'File Maintenance'. Select all files under the Rebuild Indexes tab, and do the same for the Pack Data tab. After File Maintenance finishes, see if the error is still present.
3) If the error is still present, a data repair service will likely need to be conducted by a professional.