VM Setup for test EMRs
VM Setup
Guide to setting up a test VM for HealthDrive EMRs
SERVER database tasks
Before beginning this process, ensure that your Portable HDD has the folder for EMR installation and the DevExpress22.1.4 software folder – the current range of VMs was set up before DevExpress was added and will need to be installed in order for the EMR to function.
- Log into SQL Management Studio – HDEMRTEST database
- Ensure that you are searching on the HDEMR database in the top-left
- Open a new query window and search for a provider that is current, for example:
- select * from Providers where lname = 'providerlastnamehere' OR
- select * from providers where specialty='a' and load_date > '08/01/2022'
- Note the prov_ID number and sc_state in the output window
HDEMR | Programmability | Stored Procedures
- Find Maintenance_CreateUserAcctForProvider
- Right-click and execute
- Put in prov_ID number and sc_state. Click OK. Ensure script is run successfully.
- Find Maintenance_ScriptUserAcctForProvider
- Right-click and execute
- Put in prov_ID number and sc_state. Click OK.
- Above the output screen, click on the tab marked ‘Messages.’ Copy all text except the bottom two items (1 row affected and completion time are not copied)
- Move to your external HDD, navigate to EMR_Setup_XXXX_v2 | XXXX_EMR_SQL_Scripts_to_run | Edit createuser.sql using notepad
- Delete all data within the createuser.sql script on the external HDD. Paste in the copied text from running ScriptUserAcctForProvider and save the file
VM Setup
- Create a new Remote Desktop Connection using one of the available VMs with the credentials below and save
- General tab
- Computer: VM address
- User name: Administrator
- Log in as Administrator (HealthDrive.2020!)
- Right-click on the Start Menu and go to Computer Management
- Create a new user in Local Users and Groups section:
- Username: [Specialty][EMR][Test][Department (if needed)] – Example: AUDEMRTestRA
- Full Name: [Specialty] EMR Test VM [Department (if needed)] – Example: Audiology EMR Test VM RA
- Password: Set to B0ston16
- Check ‘Password never expires’ – make sure nothing else is checked, then click Create
- Double-click on the new user that was created and go to ‘Member of’ tab – Add Administrators to the user
- Click OK, close all screens and restart VM
- Right-click and edit the Remote Desktop Connection that was previously created – ensure the following are performed:
- General tab: Change User name from Administrator to the user that was created
- Local Resources tab: Click More… under Local devices and resources – Select your portable HDD under Drives so it’s available in the VM
- Go back to the General tab and click Save
VM tasks
- Log into the VM
- Right-click on the desktop and select Personalize
- Click on Themes on the left border
- Select ‘Desktop icon settings’ from the Related Settings section
- Ensure Computer, User’s Files, Recycle Bin, and Control Panel are checked off – save and exit settings
- Open This PC on the desktop and navigate to your external HDD – Note: there may be a slight delay when the drive shows up
- Copy the entire EMR_Setup_XXXX_v2 folder to the C:\Temp directory
- Copy the entire DevExpress22.1.4 folder to the C:\Temp directory
- Open the C:\Temp\EMR_Setup_XXXX_v2 folder
- Run SQLExpress20019_64_bit_install – wait till complete
- Run PopulateSQLDB_XXXX - wait till complete
- Click the Start Button – type CMD and wait till the Command Prompt option shows in the list of results – right-click Command Prompt and Select Run as administrator
- Perform the following tasks
- Type cd\ [enter key]
- Type cd temp\devex [tab key to autofill the rest of the location] – enure the DevExpress22.1.4 folder shows, then [enter key]
- Type register [tab key to autofill the rest of the batch file name] – ensure ‘register/DevEx.dlls.bat shows, then [enter key]
- Allow the batch file to run – successful registration of the dlls will look like a long string of text in groupings of three
- Once registration is complete, the command prompt will show C:\Temp\DevExpress22.1.4 – type exit then the enter key
- Go back to the EMR_Setup_XXXX_v2 folder in the C:\Temp directory – run the EMR app install
EMR will error on startup, need to add to the EMR_users_switch table
- Open the LOCAL SQL database and connect to the database
- Log in as SQL Server Authentication, Login must be sa
- Generate a new uniqueid using a new query window: select newid()
- Copy the new uniqueid - edit 200 rows of the EMR_user_switch table
- Input the following:
- UniqueId: The ID copied
- Login: Should mirror the login in the VM (AudTestEMRRA)
- sc_state: State of the test provider
- InitialCatalog: HDEMR
- DBLogin: username of the test provider (found in EMR_users table)
Check that the user is linked to HDEMR in SQL (Security)
- Navigate to Security | Logins – there should be a user listed that is the same as the login that was created previously
- IF the user is there, double-click on the user – move to User Mapping in the upper-left corner of the screen. Ensure HDEMR is checked at the top and Database role membership below shows db_datareader, db_datawriter, db_db_owner, and public checked
- IF the user is NOT there, right-click on logins and select New Login…
- Click Search… across from Login name
- Click Advanced at the bottom-left corner of the pop-up window
- Click Find Now to list out all logins on this VM - select the username for the VM and save
- Double-click on the user – move to User Mapping in the upper-left corner of the screen. Ensure HDEMR is checked at the top and Database role membership below shows db_datareader, db_datawriter, db_db_owner, and public checked
Remove Administrator privileges from account
- Close the VM and edit the Remote Desktop Connection to log in as Administrator again
- Right-click on the Start Menu and go to Computer Management
- Local Users and Groups, edit the user that was created – remove Administrators from Member of and add Remote Desktop Users – Save