The error "missing_primary_clinic" on the Scratch Desktop app means that the user that you were logged in with has been deleted. To fix, right-click on the Scratch tray icon on the lower right-hand corner of your desktop, click "Logout," then log in with an active user.
To find the Scratch tray icon if it isn't appearing on the lower right-hand corner of your screen, click the up arrow, then right-click the Scratch icon in the small window.