Can anyone explain how the history_data table “knows” which encounter to stick to - it has no encounter id and it doesn’t get registered in the ‘forms’ table. Can you please go through the process (tables touched, keys, etc.) when I input data which winds up in the history_data table, such as smoking?
history_data is not encounter-specific, it’s just associated with the patient. It’s layout-driven, meaning much of the UI logic is in library/options.inc.php. Note that its rows are never deleted, so it’s important to get the one with the most recent date. Hope this helps.
Chosen for what? The encounter-level “default” provider is referenced by form_encounter.provider_id. The “supervising provider”, if any, is in form_encounter.supervisor_id. If a provider is specified at the service level (overriding the default for that line), that’s in billing.provider_id. There’s also a provider and referring provider in the patient_data table.
A provider can be chosen in the Demographics section, under the Choices tab. I can’t find it in the db.
Btw, how can I paste an image in here? Thanks much!