Skip to main content

Database

Creating database tables and setting up the first user

Create Database tables

  1. Go to localhost/phpmyadmin, login if required
  2. When logged in, select your database.
tip

It should look like the image below. Server: 127.0.0.1 >> Database: [your db]

database_select

  1. To find the SQL files, go into the SQL folder
  1. Here you select the ESX.sql file, drag it into the database. It should look like the image below!

database_drop

Create the first user

To be able to log in to the tablet, the first user must be created.

caution

This only applies the first time, new profiles MUST be created ingame on the tablet to avoid problems

  1. Go to localhost/phpmyadmin in your browser, select your database and click on omik_emstablet_ansatte

Your screen should now look like this:

database_ansatte

  1. Then click on Insert, the image below has a red circle around the button

database_ansatte_insert

  1. Then fill in each field with what is written below:
  • doctor_id Should be left empty, it will be filled in automatically
  • badgeNumber the users badge number e.g 10-01
  • password the users password e.g 1234
caution

It is important that you choose PASSWORD in the red marked box in the picture below, otherwise the password will not be encrypted and the user will not be able to log in

database_ansatte_password

  • rank the users rank e.g Paramedic
  • responsibility the users area of responsibility e.g Document Patient Information (Can be left empty)
  • onDuty should be 0
  • fleetStatus should not be changed
  • avatar should not be changed
  • certificates should not be changed
  • educations should not be changed
  • permissions should not be changed
  • employment_date should not be changed
  1. When you have filled in the above fields, click Done just below permissions
  2. A profile has now been created, the last thing to do is to take the doctor_id that is written when you go out in omik_emstablet_ansatte, you will need it later
  1. Now go to the users table and find the person to be employed
caution

phone_number must not be NULL in the database, if you are using a phone that does not store it in the phone_number column. Contact me and I will help you.

  1. When you have found the person, go all the way to the right until you find a column called doctor_id, in that column you write the doctor_id you got in Step 5
  2. The person is now created and if everything is done correctly, the person can log in ingame, if there are problems, Contact OMikkel