Symptoms:
If you are trying to start a test from a patient file in Best Practice via the Utilities menu in LEMR (or other device vendor's integration), you may see the following warnings/errors:
LEMR Loading window / Bp Premier - There was an error attempting to connect to the device.
Error message: Bp Premier - There was an error attempting to connect to the device.
Warning message: Devices - Unable to connect to the device. If this issue persists, please contact General Products support
Another possible error message:
Bp Premier IDevice
An error occured connecting to the Bp Premier database. Method not found: ‘Microsoft.Win32 RegistryKey BP.Utility BPRegistryReader.OpenForRead(Microsoft.Win32 RegistryKey, System String)’. Please contact your device manufacturer for support pertaining to this error.
Another possible error message:
Bp Premier IDevice
An error occured connecting to the Bp Premier database. Login failed for user ‘BPSDevice’. Please contact your device manufacturer for support pertaining to this error.
Possible Cause 1:
This issue can be caused by missing registry keys/values. This specifically impacts Bp Oxford at the time of this article's writing.
Please contact LEMR Support for assistance in this case. We will, however, provide information on the missing key below.
Need Help?
LEMR customers can get help by contacting LEMR Support.
The following information is provided for educational purposes. Modification of the registry is at your own risk! May backups prior to any changes also be your best friend.
Here is the registry fix script we use to solve the problem. Adding these keys/values requires UAC elevation to complete.
Please be sure to check if these keys/values exist before applying the fix to confirm that this is the cause of the issue.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\BPS.BPDevice]
@="BPS.BPDevice"
[HKEY_CLASSES_ROOT\BPS.BPDevice\CLSID]
@="{DE4930FB-6F70-40D0-9353-06D903ABF99A}"
No reboots or even closing/reopening of BP is required to complete the fix and perform follow up testing.
Possible Cause 2:
If the fix from the following wiki guide had been applied before (as per this article: https://wiki.lemr.com/en/support/technical-support/lemr-server-error-bpcore-filenotfoundexception-bp-dll )
The following error could be caused by LEMR using the wrong version of the BP.Utility DLL.
Error message: An error occured connecting to the Bp Premier database. Method not found: ‘Microsoft.Win32 RegistryKey BP.Utility BPRegistryReader.OpenForRead(Microsoft.Win32 RegistryKey, System String)’. Please contact your device manufacturer for support pertaining to this error.
Error message: An error occured connecting to the Bp Premier database. Could not load file or assembly ‘BP.Core, …’ or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040). Please contact your device manufacturer for support pertaining to this error.
The following solution should be applied: delete only these specific files if they exist as an Administrator to fix this specific issue:
"C:\Program Files\LEMR\BP.Core.dll"
"C:\Program Files\LEMR\BP.Utility.Cryptography.dll"
"C:\Program Files\LEMR\BP.Utility.dll"
"C:\Program Files\LEMR\BP.Utility.tlb"
If the above solution doesn't work or you continue having file or assembly load errors, please contact LEMR Support for assistance.
Possible Cause 3:
If you are running BP Oxford SP1 or higher, the following error message can occur if either the wrong BPDevice.dll is in use or if the security information stored in the Windows Registry used by Best Practice to connect to its own database are outdated or invalid. This is what the error will look like:
Bp Premier IDevice
An error occured connecting to the Bp Premier database. Login failed for user ‘BPSDevice’. Please contact your device manufacturer for support pertaining to this error.
You can try the following to resolve the issue:
1. Close Best Practice application
2. Open the Windows Registry Editor
3. Go to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Best Practice Software\Best Practice\Database\Config
4. Rename the value SecureConfig to zSecureConfig
5. Go to the following registry key:
HKEY_CURRENT_USER\Software\Best Practice Software\Best Practice\Database
6. Rename the value SecureConfig to zSecureConfig
7. Open Best Practice from the desktop icon - when the login prompt appears the updated SecureConfig will have been added back to the registry automatically
Now try the integration again. If successful, the error will not appear now.