# Configuration

In order to use the fingerprint functionality you need to have a [Digital Personal](https://www.neurotechnology.com/fingerprint-scanner-digitalpersona-u-are-u-4500.html) 4500 device and its drivers installed.

## General Setup

### Configure Fingerprint app

In order to configure the fingerprint app there are two things that should be done. 1. Setting the username and password for the it to access the openmrs database. 2. UgandaEMR Settings

```
   a) [Login](../login.md) In UgandaEMR. This will navigate you to the _"Home"_ page

   b) Click on the "System Administrator icon ![System Admin icon](../images/system_admin_icon.png). This will navigate you to the _" System Administration"_ page. 

   c) Click on the Fingerprint Settings icon. ![Fingerprint Settings icon](../images/fingerprint_settings_icon.png). This will navigate you to the fingerprint settings
   ![Fingerprint Settings Page](../images/fingerprint_setting_page.png)

   d) In order to enable or disable a finger type _"true"_ to enable and _"false"_ to disable. 

   e) The Socket IP Address is very important. It should be set to _"http://localhost:8084"_ if its not set, or different, change it to _"http://localhost:8084"_.

   f) In order to save the changes, _"click the save"_ button. 
```

## Client Server Setup

### Client Machine

1. Ensure UgandaEMR has been installed successfully: The you can ably login using your session like ART, SMC, OPD and the many more.
2. Server and client computers must be on the same network: [Ping](https://www.howtogeek.com/355664/how-to-use-ping-to-test-your-network/) the server address from your computer. Ping replies should be successful.
3. [Download fingerprint connector](https://sourceforge.net/projects/ugandaemr/files/Others/fingerprint%20connector.zip/download) on your computer.
4. Unzip the download to a directory of your choice
5. In the fingerprint directory. Open the file *"fingerprintrun.bat"* in any text editor of your choice. [Note pad ++ is preferred](https://notepad-plus-plus.org/).
6. Replace *"localhost"* with the IP address of the server.
7. Right click on the *"fingerprintrun.bat"* and Create shortcut to Desktop ![Right Click on fingerprintrun.bat](/files/SlJYutu9HwPAxK9vwG8S)
8. Go to Desktop and rename the Short to "Start Fingerprint". ![Rename icon sent to desktop](/files/qRG8w93jCdaVIeylXtPQ)
9. May Change the icon of the shortcut. There is one provided in the fingerprint directory. ![Rename icon sent to desktop](/files/1OMzg9FUlY6rpjI99wzc)

   **Server Machine**
10. Launch mysql client

    <img src="/files/4ZObLJmzNX2IkodqxYSl" alt="Launch mysql client" data-size="original">
11. Login in mysql
12. Run the following commands below

    ```
     Create user ‘openmrs’@’%’ identified by ‘openmrs’;
     GRANT ALL PRIVILEGES on openmrs.* to ‘openmrs’@’%’
    ```
13. Go to Windows Firewall, add inbound rules. In there, add ports 3306

    <img src="/files/7TDnlYaADWLiCtvr1aC0" alt="Inbound Rules" data-size="original">
14. Do the same for Outbound rules

    <img src="/files/jEZxFmL7L8orH8JmmvHX" alt="Inbound Rules" data-size="original">


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mets-programme.gitbook.io/ugandaemr-documentation/fingerprint/setup_configurations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
