Database structure

Hie everyone. Im new to OpenEMR, i am trying to understand the DB structure. There is a row (encounter) in form_encounter table, my question is: This column refers to which table and if its not related to any table, how its values are being created?

Sorry about my English
Thanks in advance to all who will help.

Hi Daniel! I have been doing some customizing of OpenEMR and have had to do a bit of looking through the code to understand the DB Schema.

A form_encounter row is created for each new patient visit on a specific day, when you create a new encounter. The encounter column in that table is created 2 different ways through out the code base of v 5_0_1_6. The preferable way is using the AdoDB GenID method like in library/encounter_events.inc.php. The method I have seen more frequently in contributed forms is using the php date method like in interface/forms/eye_mag/save.php

This is not the most recent version of OpenEMR though.