<?xml version="1.0" encoding="UTF-8"?><database name="openemr" schema="openemr" type="MariaDB - 11.8.8-MariaDB-ubu2404">
   <tables>
      <table catalog="openemr" name="address" numRows="0" remarks="Contains address records in the system" schema="openemr" type="TABLE"/>
      <table catalog="openemr" name="amendments" remarks="Holds requests to amend health care information typically initiated by the patient or an insurance company" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="amendment_id" nullable="false" remarks="Primary key for the amendment record. It uniquely identifies each amendment." size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="amendment_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="amendments_history"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="amendment_date" nullable="false" remarks="The date when the amendment request was made." size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="amendment_by" nullable="false" remarks="Comes from the list_options.list_id='amendment_from' and represents who is requesting the amendment" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="amendment_status" nullable="true" remarks="Comes from the list_options.list_id='amendment_status' and represents the current status of the amendment" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="amendment_desc" nullable="true" remarks="Detailed information about the amendment, including any additional notes or changes." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="created_by" nullable="false" remarks="The id of the user that initially created this amendment" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="modified_by" nullable="true" remarks="The id of the user that last modified this amendment" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="created_time" nullable="true" remarks="Timestamp indicating when the amendment record was created." size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="modified_time" nullable="true" remarks="Timestamp indicating when the amendment record was last modified." size="19" type="TIMESTAMP" typeCode="93"/>
         <primaryKey column="amendment_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="amendment_id"/>
         </index>
         <index name="amendment_pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="amendments_history" numRows="0" remarks="Contains clinicinan comments regarding an amendment request" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="amendment_id" nullable="false" remarks="The internal amendment id" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="amendment_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="amendments"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="amendment_note" nullable="false" remarks="Comments regarding the amendment as entered by the creating user.  Also contains a human readable description of the amendment status." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="amendment_status" nullable="false" remarks="Comes from the list_options.list_id='amendment_status' and represents the current status of the amendment" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="The id of the user that initially created this amendment" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_time" nullable="false" remarks="Timestamp indicating when the amendment record was created." size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="ar_activity" remarks="Accounts Receivable item entries in invoice/claim activity" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="pid" nullable="false" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="encounter" nullable="false" remarks="The identifier for the encounter for which the payment is connected to (foreign key reference to the forms_encounter.encounter)." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="sequence_no" nullable="false" remarks="A unique identifier for this payment activity, incremented in the code." size="10" type="INT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="code_type" nullable="false" remarks="The code system that is used for this billing activity" size="12" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="code" nullable="false" remarks="The code in the code system referenced in code_type that is the main billing code for this billing activity" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="fee" nullable="false" remarks="The billing fee that is being requested for payment of services rendered" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="modifier" nullable="false" remarks="Billing code modifier" size="12" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="payer_type" nullable="false" remarks="The payer type code, indicating the source of payment (0=patient, 1=primary insurance, 2=secondary insurance, etc)." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="post_time" nullable="false" remarks="Time of the posting on the date referenced in post_date" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="post_user" nullable="false" remarks="The user ID (foreign key reference to the users table) of the person who posted the payment." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="session_id" nullable="false" remarks="The session ID (foreign key reference to the ar_session table) associated with this payment activity, if applicable." size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="session_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="memo" nullable="false" remarks="Additional comments or adjustment reasons related to the payment activity." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="11" name="pay_amount" nullable="false" remarks="The actual payment amount received (in DECIMAL format), which may differ from the fee amount due to adjustments or discounts." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="12" name="adj_amount" nullable="false" remarks="The adjustment amount, if any, to account for changes in the payment (in DECIMAL format)." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="modified_time" nullable="false" remarks="The timestamp indicating when this payment activity was last modified (in DATETIME format)." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="follow_up" nullable="false" remarks="A flag (CHAR) indicating follow-up actions needed for this payment activity (e.g., 'y' for yes, 'n' for no)." size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="follow_up_note" nullable="true" remarks="Additional notes or instructions related to follow-up actions for this payment activity (in TEXT format)." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="account_code" nullable="false" remarks="The account code used to categorize or classify this payment activity (e.g., a billing code or account code)." size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="reason_code" nullable="true" remarks="An optional reason code used to explain adjustments or changes in the payment amount (e.g., primary payer adjustment reason code)." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="deleted" nullable="true" remarks="A timestamp (in DATETIME format) indicating when the payment activity was deleted (NULL if active, otherwise when voided)." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="post_date" nullable="true" remarks="The date (in DATE format) when the payment was posted, if specified at the time of payment." size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="payer_claim_number" nullable="true" remarks="The claim number or reference number provided by the payer or insurance company for this payment activity." size="30" type="VARCHAR" typeCode="12"/>
         <primaryKey column="pid" sequenceNumberInPK="1"/>
         <primaryKey column="encounter" sequenceNumberInPK="2"/>
         <primaryKey column="sequence_no" sequenceNumberInPK="3"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="encounter"/>
            <column ascending="true" name="sequence_no"/>
         </index>
         <index name="session_id" unique="false">
            <column ascending="true" name="session_id"/>
         </index>
      </table>
      <table catalog="openemr" name="ar_session" remarks="Accounts Receivable overall payment made towards a patient invoice/claim and is the main table that holds the patient payments ledger" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="session_id" nullable="false" remarks="The unique identifier for an accounting session, used as a surrogate key." size="10" type="INT UNSIGNED" typeCode="4">
            <child catalog="openemr" column="session_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_activity"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="payer_id" nullable="false" remarks="The insurance company being billed. If this is self-pay the id will be 0" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_companies"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="user_id" nullable="false" remarks="The reference to the user ID the created this billing session" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="closed" nullable="false" remarks="A flag indicating if the session is closed. 0 for open, 1 for closed." size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="reference" nullable="false" remarks="The check or EOB (Explanation of Benefits) number associated with the payment." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="check_date" nullable="true" remarks="The date when the check was received for the payment." size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="deposit_date" nullable="true" remarks="The date when the payment was deposited." size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="7" name="pay_total" nullable="false" remarks="The total payment amount for the claim or billing invoice." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="8" name="created_time" nullable="false" remarks="The timestamp when the payment record was created." size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="modified_time" nullable="false" remarks="The date and time of the last modification to the payment record." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="2" id="10" name="global_amount" nullable="false" remarks="The global amount for the payment." size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="payment_type" nullable="false" remarks="Comes from the list_options.list_id='payment_type' and represents the type of payment, such as if this is a patient or insurance payment." size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="description" nullable="true" remarks="Additional description or notes related to the payment." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="adjustment_code" nullable="false" remarks="Comes from the list_options.list_id='payment_adjustment_code' and represents the payment adjustment code to apply." size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="post_to_date" nullable="false" remarks="The date when the payment is posted to the claim or billing invoice." size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="patient_id" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="payment_method" nullable="false" remarks="Comes from the list_options.list_id='payment_method' The method of payment, e.g., ACH, Cash, CC, Check, etc." size="25" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <primaryKey column="session_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="session_id"/>
         </index>
         <index name="deposit_date" unique="false">
            <column ascending="true" name="deposit_date"/>
         </index>
         <index name="user_closed" unique="false">
            <column ascending="true" name="user_id"/>
            <column ascending="true" name="closed"/>
         </index>
      </table>
      <table catalog="openemr" name="benefit_eligibility" remarks="Holds the eligible patient benefits for a specific insurance as received from an eligibility verification" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="response_id" nullable="false" remarks="Surrogate ID of the benefit eligibility record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="verification_id" nullable="false" remarks="The eligibility verification record that these benefits are retrieved from" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="verification_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="eligibility_verification"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="type" nullable="true" remarks="Type of benefit" size="4" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="benefit_type" nullable="true" remarks="Type of the benefit, if applicable" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="start_date" nullable="true" remarks="Start date for the benefit coverage" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="end_date" nullable="true" remarks="End date for the benefit coverage" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="coverage_level" nullable="true" remarks="Coverage level, if specified" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="coverage_type" nullable="true" remarks="Type of coverage" size="512" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="plan_type" nullable="true" remarks="Type of insurance plan" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="plan_description" nullable="true" remarks="Description of the insurance plan" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="coverage_period" nullable="true" remarks="Period of coverage" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="2" id="11" name="amount" nullable="true" remarks="Benefit amount, if applicable" size="5" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="2" id="12" name="percent" nullable="true" remarks="Benefit percentage, if applicable" size="3" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="network_ind" nullable="true" remarks="Network indicator" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="message" nullable="true" remarks="Additional message or information" size="512" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'A'" digits="0" id="15" name="response_status" nullable="true" remarks="Status of the response (Active 'A' or Denied 'D')" size="1" type="enum('A', 'D')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="response_create_date" nullable="true" remarks="Date when the benefit response was created" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="response_modify_date" nullable="true" remarks="Date when the benefit response was last modified" size="10" type="DATE" typeCode="91"/>
      </table>
      <table catalog="openemr" name="billing" remarks="Patient billing records for billing codes - Used for Claims Processing" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="Date associated with the billing record" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="code_type" nullable="true" remarks="Type of billing code" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="code" nullable="true" remarks="Billing code" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="provider_id" nullable="true" remarks="The insurance company being billed. If this is self-pay the id will be 0" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_companies"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="user" nullable="true" remarks="The user that created this billing record." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="groupname" nullable="true" remarks="Group name associated with the billing record" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="authorized" nullable="true" remarks="Authorization status (1 for authorized, 0 for unauthorized)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="encounter" nullable="true" remarks="The encounter that this billing record is connected to" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="code_text" nullable="true" remarks="Text associated with the billing code" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="billed" nullable="true" remarks="Billing status (1 for billed, 0 for unbilled)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="activity" nullable="true" remarks="Activity status (1 for active, 0 for inactive)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="payer_id" nullable="true" remarks="The insurance company being billed. If this is self-pay the id will be 0" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_companies"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="bill_process" nullable="false" remarks="Bill process code -1=leave unprocessed,0=open,1=in progress,2=billed" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="bill_date" nullable="true" remarks="Date when billing moved into the billed status" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="process_date" nullable="true" remarks="Date when the bill was moved into the processing state" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="process_file" nullable="true" remarks="File associated with billing process" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="modifier" nullable="true" remarks="Modifier for billing code" size="12" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="units" nullable="true" remarks="Number of units for billing" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="2" id="20" name="fee" nullable="true" remarks="Fee associated with billing" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="justify" nullable="true" remarks="Justification for billing code" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="target" nullable="true" remarks="Target associated with billing code" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="x12_partner_id" nullable="true" remarks="The X12 partner clearinghouse id. Empty On Export" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="ndc_info" nullable="true" remarks="NDC (National Drug Code) information" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="25" name="notecodes" nullable="false" remarks="Notecodes associated with billing" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="external_id" nullable="true" remarks="External identifier associated with billing" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="27" name="pricelevel" nullable="true" remarks="Price level associated with billing" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="28" name="revenue_code" nullable="false" remarks="Item revenue code" size="6" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="29" name="chargecat" nullable="true" remarks="Comes from the list_options.list_id='chargecats' and represents the charge category for certain insursers" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="care_team" numRows="0" remarks="Contains the care team records for a patient" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="The id of the user that initially created this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="status" nullable="false" remarks="fk to list_options.option_id WHERE list_options.list_id='Care_Team_Status'" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="updated_by" nullable="false" remarks="The id of the user that last updated this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="care_team_member" numRows="0" remarks="Contains the individual team member of a care team for a patient" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="care_team_id" nullable="false" remarks="The care team this member belongs to" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="contact_id" nullable="false" remarks="fk to contact.id and is populated if the member is a related person or another patient" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="The id of the user that initially created this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="facility_id" nullable="false" remarks="fk to facility.id and is populated if the member is an organization or facility" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="role" nullable="false" remarks="fk to list_options.option_id WHERE list_options.list_id='care_team_roles'" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="status" nullable="false" remarks="fk to list_options.option_id WHERE list_options.list_id='Care_Team_Status'" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="updated_by" nullable="false" remarks="The id of the user that last updated this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user_id" nullable="false" remarks="fk to users.id and is populated if the member is a staff member" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="care_teams" remarks="" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pid" nullable="false" remarks="fk to patient_data.pid" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="'active'" digits="0" id="3" name="status" nullable="true" remarks="fk to list_options.option_id where list_id=Care_Team_Status" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="team_name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="note" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="6" name="date_created" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="7" name="date_updated" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="created_by" nullable="true" remarks="fk to users.id for user who created this record" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="updated_by" nullable="true" remarks="fk to users.id for user who last updated this record" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="categories" numRows="0" remarks="Categories that documents can be assigned to" schema="openemr" type="TABLE"/>
      <table catalog="openemr" name="categories_to_documents" numRows="0" remarks="Mapping table connecting documents to categories" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="category_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="document_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
         </column>
      </table>
      <table catalog="openemr" name="claims" remarks="Insurance Billing Claims - Used for tracking and submission of billing claims to payers" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="patient_id" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="encounter_id" nullable="false" remarks="Encounter identifier - Identifier for the patient encounter associated with the claim" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="version" nullable="false" remarks="Claim version - Incremented in code to track changes in claims" size="10" type="INT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="payer_id" nullable="false" remarks="The insurance company being billed. If this is self-pay the id will be 0" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_companies"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="status" nullable="false" remarks="Claim status - Status of the billing claim. -1=Leave Unchanged,1=Unbilled,2=Mark as billed, 7=Denied" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="payer_type" nullable="false" remarks="The payer type code, indicating the source of payment (0=patient, 1=primary insurance, 2=secondary insurance, etc)." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="bill_process" nullable="false" remarks="Billing process status. -1=Leave unchanged, 0=Claim is open,1=Processing in progress,2=Billed,3=Error" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="bill_time" nullable="true" remarks="Billing time - The datetime this bill was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="process_time" nullable="true" remarks="Processing time - Time of claim processing" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="process_file" nullable="true" remarks="Processing file - File associated with claim processing" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="target" nullable="true" remarks="Claim target - Target associated with the claim" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="x12_partner_id" nullable="false" remarks="X12 Partner identifier - Identifier for the X12 partner.  Empty in export" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="submitted_claim" nullable="true" remarks="Submitted claim - Claims form data" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="patient_id" sequenceNumberInPK="1"/>
         <primaryKey column="encounter_id" sequenceNumberInPK="2"/>
         <primaryKey column="version" sequenceNumberInPK="3"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="patient_id"/>
            <column ascending="true" name="encounter_id"/>
            <column ascending="true" name="version"/>
         </index>
      </table>
      <table catalog="openemr" name="clinical_notes_documents" remarks="Links clinical notes to patient documents" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="clinical_note_id" nullable="false" remarks="Foreign key to form_clinical_notes.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_clinical_notes"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="document_id" nullable="false" remarks="Foreign key to documents.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="3" name="created_at" nullable="false" remarks="When the link was created" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="created_by" nullable="true" remarks="Username who created the link" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_clinical_note_id" unique="false">
            <column ascending="true" name="clinical_note_id"/>
         </index>
         <index name="idx_created_at" unique="false">
            <column ascending="true" name="created_at"/>
         </index>
         <index name="idx_document_id" unique="false">
            <column ascending="true" name="document_id"/>
         </index>
         <index name="unique_note_document" unique="true">
            <column ascending="true" name="clinical_note_id"/>
            <column ascending="true" name="document_id"/>
         </index>
      </table>
      <table catalog="openemr" name="clinical_notes_procedure_results" remarks="Links clinical notes to procedure results/lab values" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="clinical_note_id" nullable="false" remarks="Foreign key to form_clinical_notes.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_clinical_notes"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="procedure_result_id" nullable="false" remarks="Foreign key to procedure_result.procedure_result_id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_result_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_result"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="3" name="created_at" nullable="false" remarks="When the link was created" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="created_by" nullable="true" remarks="Username who created the link" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_clinical_note_id" unique="false">
            <column ascending="true" name="clinical_note_id"/>
         </index>
         <index name="idx_created_at" unique="false">
            <column ascending="true" name="created_at"/>
         </index>
         <index name="idx_procedure_result_id" unique="false">
            <column ascending="true" name="procedure_result_id"/>
         </index>
         <index name="unique_note_result" unique="true">
            <column ascending="true" name="clinical_note_id"/>
            <column ascending="true" name="procedure_result_id"/>
         </index>
      </table>
      <table catalog="openemr" name="clinical_plans" numRows="9" remarks="The Clinical Quality Measures that are being applied to a specific patient to track.  This is used in the clinical reminders system" type="TABLE">
         <column autoUpdated="false" defaultValue="''" digits="0" id="0" name="id" nullable="false" remarks="Unique and maps to list_options list clinical_plans" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="normal_flag" nullable="true" remarks="Normal Activation Flag" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="cqm_flag" nullable="true" remarks="Clinical Quality Measure flag (unable to customize per patient)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="cqm_2011_flag" nullable="true" remarks="2011 Clinical Quality Measure flag (unable to customize per patient)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="cqm_2014_flag" nullable="true" remarks="2014 Clinical Quality Measure flag (unable to customize per patient)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="cqm_measure_group" nullable="false" remarks="Clinical Quality Measure Group Identifier" size="10" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="pid" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="contact" numRows="0" remarks="Contains records of contacts in the system" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="foreign_id" nullable="false" remarks="The id of the table this contact belongs to.  Can be patient_data.pid or person.id" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="foreign_table_name" nullable="false" remarks="The name of the table this contact belongs to.  Can be patient_data or person" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="contact_address" numRows="0" remarks="Contains information about a specific contact's address" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="address_id" nullable="false" remarks="The id of the address this contact address belongs to" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="contact_id" nullable="false" remarks="The id of the contact this record belongs to" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="The id of the user that initially created this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="is_primary" nullable="false" remarks="Is the primary address for the contact '1' for yes, '0' for no" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="status" nullable="false" remarks="'A' for active, 'I' for inactive" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="type" nullable="false" remarks="fk to list_options.option_id WHERE list_options.list_id='address-types'" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="updated_by" nullable="false" remarks="The id of the user that last updated this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="use" nullable="false" remarks="fk to list_options.option_id WHERE list_options.list_id='address-uses'" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
      </table>
      <table catalog="openemr" name="contact_relation" remarks="Contains information about the relationship between a contact and another table such as person for relatedpersons" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contact_id" nullable="false" remarks="The id of the contact this relationship belongs to" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="target_table" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="target_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="active" nullable="true" remarks="1 for active, 0 for inactive" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="role" nullable="true" remarks="fk to list_options.option_id WHERE list_options.list_id='related_person_role'" size="63" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="relationship" nullable="true" remarks="fk to list_options.option_id WHERE list_options.list_id='related_person_relationship'" size="63" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="contact_priority" nullable="true" remarks="1=highest priority" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="is_primary_contact" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="is_emergency_contact" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="can_make_medical_decisions" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="can_receive_medical_info" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="start_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="end_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="15" name="created_date" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="created_by" nullable="true" remarks="The id of the user that initially created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="17" name="updated_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="updated_by" nullable="true" remarks="The id of the user that last updated this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="contact_id" unique="false">
            <column ascending="true" name="contact_id"/>
         </index>
         <index name="idx_contact_target_table" unique="false">
            <column ascending="true" name="target_table"/>
            <column ascending="true" name="target_id"/>
         </index>
      </table>
      <table catalog="openemr" name="contact_telecom" remarks="Contains information about a specific contact's telecom method" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="contact_id" nullable="false" remarks="The id of the contact this record belongs to" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="rank" nullable="true" remarks="Specify preferred order of use (1 = highest)" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="system" nullable="true" remarks="fk to list_options.option_id WHERE list_options.list_id='telecom_systems'" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="use" nullable="true" remarks="fk to list_options.option_id WHERE list_options.list_id='telecom_uses'" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="value" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="status" nullable="true" remarks="'A' for active, 'I' for inactive" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="is_primary" nullable="true" remarks="Is the primary address for the contact '1' for yes, '0' for no" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="notes" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="period_start" nullable="true" remarks="Date the telecom became active" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="period_end" nullable="true" remarks="Date the telecom became deactivated" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="inactivated_reason" nullable="true" remarks="[Values: ???, etc]" size="45" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="12" name="created_date" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="created_by" nullable="true" remarks="users.id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="14" name="updated_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="updated_by" nullable="true" remarks="users.id" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="contact_id" unique="false">
            <column ascending="true" name="contact_id"/>
         </index>
      </table>
      <table catalog="openemr" name="document_templates" numRows="0" remarks="Digital document templates that are assigned to patients" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="template_content" nullable="false" remarks="Digital document template that is assigned to a patient to be filled out.  Uses Domain Specific Language (DSL) template tags to inject specific functionality into the template for patients to fill out.  Patient data template tags can be found at the following URL: https://www.open-emr.org/wiki/index.php/Patient_Portal_Document_Templates" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="documents" remarks="Stores all of the digital documents that are connected to a patient." type="TABLE">
         <column autoUpdated="false" defaultValue="0" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="document_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_notes_documents"/>
            <child catalog="openemr" column="document_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="categories_to_documents"/>
            <child catalog="openemr" column="foreign_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="notes"/>
            <child catalog="openemr" column="document_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_result"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="Binary of Unique User Identifier that is for both external reference to this entity and for future offline use." size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="type" nullable="true" remarks="Type of the document (e.g., 'file_url', 'blob', 'web_url')" size="8" type="enum('file_url', 'blob', 'web_url')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="size" nullable="true" remarks="Size of the document in bytes" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="date" nullable="true" remarks="Date when the document was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="date_expires" nullable="true" remarks="Date when the document expires and is no longer available." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="url" nullable="true" remarks="URL of the document" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="thumb_url" nullable="true" remarks="URL of the document's thumbnail" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="mimetype" nullable="true" remarks="MIME type of the document" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="pages" nullable="true" remarks="If the document is a multi-page format like tiff and has at least 1 page this will be 1 or greater,if a non-multi-page format this should be null or empty" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="owner" nullable="true" remarks="Foreign key identifier to users of who initially persisted the document" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="revision" nullable="false" remarks="Timestamp of the last time the document was changed and persisted" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="foreign_id" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="docdate" nullable="true" remarks="Date (YYYY-MM-DD) logically associated with the document, e.g. when a picture was taken." size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="hash" nullable="true" remarks="Hash value of the document from when it was uploaded" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="list_id" nullable="false" remarks="FK to lists.id associated with the document when the document is related to an issue" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="name" nullable="true" remarks="Name of the document. Populated since OpenEMR versions 6.0.0+" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="drive_uuid" nullable="true" remarks="UUID of the document's drive. Empty in export" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="couch_docid" nullable="true" remarks="CouchDB document ID" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="couch_revid" nullable="true" remarks="CouchDB revision ID" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="storagemethod" nullable="false" remarks="Storage method (0-&gt;Harddisk, 1-&gt;CouchDB)" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="21" name="path_depth" nullable="true" remarks="Depth of path to use in the URL to find the document. Not applicable for CouchDB. . Empty in export." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="imported" nullable="true" remarks="Parsing status for CCR/CCD/CCDA importing" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="encounter_id" nullable="false" remarks="Encounter ID if tagged" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="encounter_check" nullable="false" remarks="If an encounter is created while tagging (0 or 1)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="25" name="audit_master_approval_status" nullable="false" remarks="Approval status from audit_master table" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="audit_master_id" nullable="true" remarks="ID from the audit_master table" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="documentationOf" nullable="true" remarks="Used for CCDA and lab documents where the individual / contents of the documentation of a service event is recorded" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="encrypted" nullable="false" remarks="Encryption status (0-&gt;No, 1-&gt;Yes)" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="document_data" nullable="true" remarks="Additional metadata concerning the document is stored here.  CCDA/CDA documents store their validation log in this field and DICOM files store a JSON history of actions taken on the DICOM in this field" size="16777215" type="MEDIUMTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="deleted" nullable="false" remarks="Flag indicating if the document is deleted (0 or 1).  If a file has been marked as deleted the underlying file stored in the file storage system is NOT included in data exports and is no longer available for retrieval" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="foreign_reference_id" nullable="true" remarks="DB Unique identifier reference to another table record in the database.  This is not unique in the document. The table that this record points to is in the foreign_reference_table" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="foreign_reference_table" nullable="true" remarks="Table associated with the foreign reference_id will be populated if foreign_reference_id is populated" size="40" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="drive_uuid" unique="true">
            <column ascending="true" name="drive_uuid"/>
         </index>
         <index name="foreign_id" unique="false">
            <column ascending="true" name="foreign_id"/>
         </index>
         <index name="foreign_reference" unique="false">
            <column ascending="true" name="foreign_reference_id"/>
            <column ascending="true" name="foreign_reference_table"/>
         </index>
         <index name="owner" unique="false">
            <column ascending="true" name="owner"/>
         </index>
         <index name="revision" unique="false">
            <column ascending="true" name="revision"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="drug_sales" remarks="Product/Drug sales to Patients" type="TABLE">
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="0" name="uuid" nullable="true" remarks="UUID for this drug sales record, for data exchange purposes" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="true" defaultValue="null" digits="0" id="1" name="sale_id" nullable="false" remarks="The unique identifier for this record" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="drug_id" nullable="false" remarks="The id of the drug that was sold to the patient. 0 if the record is not dispensed to a patient" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="drug_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drugs"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="inventory_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="prescription_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="encounter" nullable="false" remarks="The patient encounter which resulted in this drug being sold to the patient." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="sale_date" nullable="false" remarks="The date the sale occurred on" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="quantity" nullable="false" remarks="The number of items sold of the drug" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="10" name="fee" nullable="false" remarks="The total price of the sale for the drug that was sold to the patient" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="billed" nullable="false" remarks="indicates if the sale is posted to accounting" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="xfer_inventory_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="distributor_id" nullable="false" remarks="UNUSED - will be removed in the future" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="notes" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="bill_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="16" name="pricelevel" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="17" name="selector" nullable="true" remarks="references drug_templates.selector" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="18" name="trans_type" nullable="false" remarks="1=sale, 2=purchase, 3=return, 4=transfer, 5=adjustment" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="19" name="chargecat" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="pharmacy_supply_type" nullable="true" remarks="fk to list_options.option_id WHERE list_options.list_id='act_pharmacy_supply_type'" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="21" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="22" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="updated_by" nullable="true" remarks="The id of the user that last updated this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="created_by" nullable="true" remarks="The id of the user that initially created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="sale_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="sale_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="drugs" remarks="Contains information about drugs that are dispensed/prescribed to patients.  Also holds product inventory information if providers are internally managing their own drugs/medical supplies" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="drug_id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="drug_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drug_sales"/>
            <child catalog="openemr" column="drug_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="ndc_number" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="on_order" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="reorder_point" nullable="false" remarks="" size="12" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="max_level" nullable="false" remarks="" size="12" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="last_notify" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="reactions" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="9" name="form" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="size" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="11" name="unit" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="12" name="route" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="substitute" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="related_code" nullable="false" remarks="may reference a related codes.code" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="cyp_factor" nullable="false" remarks="quantity representing a years supply" size="12" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="active" nullable="true" remarks="0 = inactive, 1 = active" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="allow_combining" nullable="false" remarks="1 = allow filling an order from multiple lots" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="18" name="allow_multiple" nullable="false" remarks="1 = allow multiple lots at one warehouse" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="drug_code" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="consumable" nullable="false" remarks="1 = will not show on the fee sheet" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="21" name="dispensable" nullable="false" remarks="0 = pharmacy elsewhere, 1 = dispensed here" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="22" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="23" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="drug_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="drug_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="eligibility_verification" remarks="Insurance Eligibility Verification Tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="verification_id" nullable="false" remarks="Unique identifier for eligibility verification" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="verification_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="benefit_eligibility"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="response_id" nullable="true" remarks="Identifier for the response related to the eligibility verification" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="insurance_id" nullable="true" remarks="The patient insurance that eligibility is being checked against" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="eligibility_check_date" nullable="true" remarks="Date and time when the eligibility check was performed" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="copay" nullable="true" remarks="Patient copayment amount" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="deductible" nullable="true" remarks="Patient deductible amount" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="'Y'" digits="0" id="6" name="deductiblemet" nullable="true" remarks="Indicates whether the deductible has been met ('Y' or 'N')" size="1" type="enum('Y', 'N')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="create_date" nullable="true" remarks="Date when the record was created" size="10" type="DATE" typeCode="91"/>
         <primaryKey column="verification_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="verification_id"/>
         </index>
         <index name="insurance_id" unique="false">
            <column ascending="true" name="insurance_id"/>
         </index>
      </table>
      <table catalog="openemr" name="employer_data" numRows="0" remarks="Contains records of employers associated with patients in the system" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="The id of the user that initially created this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="industry" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="occupation" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
      </table>
      <table catalog="openemr" name="esign_signatures" remarks="Holds the digital author signature records for encounters and individual charted forms in the system." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="tid" nullable="false" remarks="Table row ID for signature. This is either the forms.id or the form_encounter.encounter id" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="table" nullable="false" remarks="Table name for the signature. This will either be 'forms' if it represents an individual form the provider is e-signing or 'form_encounter' if it represents the entire encounter record the provider is attesting to." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="uid" nullable="false" remarks="User id for the signing user." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="datetime" nullable="false" remarks="Datetime of the signature action." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="is_lock" nullable="false" remarks="Indicates whether the record is signed, locked, or amended." size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="amendment" nullable="true" remarks="Amendment text, if any." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="hash" nullable="false" remarks="Hash of signed data. For an individual form_[formdir] this will be the hash of the string concatenation of all of the column values for the main entry table. For an overall encounter this will be the string concatenation of all individual form records that are connected to the encounter." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="signature_hash" nullable="false" remarks="Hash of the signature itself hash(tid,table,uid,is_lock,hash,amendment). sha1= less than 50 chars; greater than 50chars=sha3-512 algorithm." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="table" unique="false">
            <column ascending="true" name="table"/>
         </index>
         <index name="tid" unique="false">
            <column ascending="true" name="tid"/>
         </index>
      </table>
      <table catalog="openemr" name="extended_log" remarks="Holds the disclosures of EHI made to third parties for a given patient" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="event" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="recipient" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="description" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="patient_id" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="patient_id" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
      </table>
      <table catalog="openemr" name="external_encounters" remarks="Holds data on encounters that exist outside of this EMR that were in a patient CCDA import" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="ee_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="ee_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="ee_pid" nullable="true" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="ee_provider_id" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ee_facility_id" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ee_encounter_diagnosis" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ee_external_id" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="ee_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="ee_id"/>
         </index>
      </table>
      <table catalog="openemr" name="external_procedures" remarks="Holds data on external procedures that exist outside of this EMR that were in a patient CCDA import" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="ep_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="ep_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="ep_code_type" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="ep_code" nullable="true" remarks="" size="9" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ep_pid" nullable="true" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ep_encounter" nullable="true" remarks="The encounter for the external procedure" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ep_code_text" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ep_facility_id" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="ep_external_id" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="ep_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="ep_id"/>
         </index>
         <index name="ep_pid" unique="false">
            <column ascending="true" name="ep_pid"/>
         </index>
      </table>
      <table catalog="openemr" name="facility" numRows="1" remarks="The facility table holds all of the facilities that provide healthcare in the EMR. It contains the primary billing location and other service locations/organizations that are not insurance companies tracked inside the EMR" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="facility_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="r_facility" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="medex_recalls"/>
            <child catalog="openemr" column="facility" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_documents"/>
            <child catalog="openemr" column="facility_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="pc_billing_location" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="pc_facility" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="account_facility" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="location_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="billing_facility_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
            <child catalog="openemr" column="facility_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="name" nullable="true" remarks="The name of the facility" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="phone" nullable="true" remarks="Phone number of the facility" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="fax" nullable="true" remarks="Fax number of the facility" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="street" nullable="true" remarks="Street address of the facility" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="city" nullable="true" remarks="City where the facility is located" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="state" nullable="true" remarks="State where the facility is located" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="postal_code" nullable="true" remarks="Postal code of the facility" size="11" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="country_code" nullable="false" remarks="Country code of the facility" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="federal_ein" nullable="true" remarks="Federal Employer Identification Number of the facility" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="website" nullable="true" remarks="Website of the facility" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="email" nullable="true" remarks="Email address of the facility" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="13" name="service_location" nullable="false" remarks="Indicates if it's a service location (0-Not a service location, 1-Service location)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="14" name="billing_location" nullable="false" remarks="Indicates if it's a billing location (0-Not a billing location, 1-Billing location)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="15" name="accepts_assignment" nullable="false" remarks="Indicates if the facility accepts assignment (0-Does not accept assignment, 1-Accepts assignment)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="pos_code" nullable="true" remarks="POS (Place of Service) code of the facility" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="x12_sender_id" nullable="true" remarks="X12 Sender ID of the facility. EMPTY IN Export" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="attn" nullable="true" remarks="Attention line for the facility" size="65" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="domain_identifier" nullable="true" remarks="Domain identifier for the facility" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="facility_npi" nullable="true" remarks="NPI (National Provider Identifier) for the facility" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="facility_taxonomy" nullable="true" remarks="Taxonomy code for the facility" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="22" name="tax_id_type" nullable="false" remarks="Tax ID type for the facility" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="23" name="color" nullable="false" remarks="Color code for the facility" size="7" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="24" name="primary_business_entity" nullable="false" remarks="Primary business entity (0-Not set as the primary business entity, 1-Set as the primary business entity)" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="facility_code" nullable="true" remarks="Facility code for the facility" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="26" name="extra_validation" nullable="false" remarks="Extra validation indicator (0-No extra validation, 1-Extra validation)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="mail_street" nullable="true" remarks="Mailing street address of the facility" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="mail_street2" nullable="true" remarks="Additional mailing street address of the facility" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="mail_city" nullable="true" remarks="Mailing city of the facility" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="mail_state" nullable="true" remarks="Mailing state of the facility" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="mail_zip" nullable="true" remarks="Mailing ZIP code of the facility" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="32" name="oid" nullable="false" remarks="For HIEs, CCDA, and FHIR an OID is required/wanted for the facility" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="iban" nullable="true" remarks="International Bank Account Number (IBAN) for the facility EMPTY IN Export" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="info" nullable="true" remarks="Additional information about the facility EMPTY in Export" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="weno_id" nullable="true" remarks="WENO ID for the facility" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="inactive" nullable="false" remarks="Indicates if the facility is inactive (0-Active, 1-Inactive)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="37" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="38" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="'prov'" digits="0" id="39" name="organization_type" nullable="false" remarks="Organization type as defined by HL7 Value Set: OrganizationType" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_aftercare_plan" numRows="0" remarks="Table for chart notes on patient aftercare plans, including Acute Intoxication/Withdrawal, Emotional/Behavioral Conditions and Complications, and Relapse Potential for patients' care plans." schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="activity" nullable="false" remarks="1 if plan is active, 0 if deleted" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="admit_date" nullable="false" remarks="Date when the patient was admitted to the aftercare plan." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="authorized" nullable="false" remarks="Indicates authorization status for the aftercare plan." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="client_name" nullable="false" remarks="Human readable name of the patient for whom the aftercare plan is created." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="date" nullable="false" remarks="Date and time when the aftercare plan was created." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="discharged" nullable="false" remarks="Date when the patient was discharged from the aftercare plan." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_a_acute_intoxication" nullable="false" remarks="1st Goal for Acute Intoxication/Withdrawal." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_a_acute_intoxication_I" nullable="false" remarks="2nd Goal for Acute Intoxication/Withdrawal." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_a_acute_intoxication_II" nullable="false" remarks="3rd Goal for Acute Intoxication/Withdrawal." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_b_emotional_behavioral_conditions" nullable="false" remarks="1st Goal for Emotional/Behavioral Conditions and Complications." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_b_emotional_behavioral_conditions_I" nullable="false" remarks="2nd Goal for Emotional/Behavioral Conditions and Complications." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_c_relapse_potential" nullable="false" remarks="1st Goal related to Relapse Potential." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="goal_c_relapse_potential_I" nullable="false" remarks="2nd Goal related to Relapse Potential." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="Unique identifier for each aftercare plan entry. Primary key." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="provider" nullable="false" remarks="Provider assigned to the patient for aftercare planning.UNUSED" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="User responsible for creating the aftercare plan." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_ankleinjury" numRows="0" remarks="Represents a provider's evaluation of an ankle injury including x-ray information, diagnosis, and recommended treatments" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="activity" nullable="false" remarks="Activity status, 1=form is active, 0=inactive" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_able_to_bear_weight_steps" nullable="false" remarks="Ability to bear weight and steps information" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_additional_diagnosis" nullable="false" remarks="Additional diagnosis for the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_additional_x_ray_notes" nullable="false" remarks="Additional notes related to X-ray" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_date_of_injury" nullable="false" remarks="Date of the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_diagnosis1" nullable="false" remarks="Diagnosis 1 for the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_diagnosis2" nullable="false" remarks="Diagnosis 2 for the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_diagnosis3" nullable="false" remarks="Diagnosis 3 for the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_diagnosis4" nullable="false" remarks="Diagnosis 4 for the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_foot" nullable="false" remarks="Foot information related to the injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_how_did_injury_occur" nullable="false" remarks="Description of how the injury occurred" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_onset_of_swelling" nullable="false" remarks="Onset of swelling" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_ottawa_bone_tenderness" nullable="false" remarks="Information about Ottawa bone tenderness" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_plan" nullable="false" remarks="Recommended treatment plan for the ankle injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_severity_of_pain" nullable="false" remarks="Severity of pain associated with the injury 1-3" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_significant_swelling" nullable="false" remarks="Indication of significant swelling" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_work_related" nullable="false" remarks="Work-related information for the injury" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="ankle_x_ray_interpretation" nullable="false" remarks="Interpretation of X-ray results" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="authorized" nullable="false" remarks="Authorization status" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="date" nullable="false" remarks="Date of the evaluation" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="User responsible for creating the record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_bronchitis" numRows="0" remarks="Records symptoms, diagnosis, and recommended treatments for bronchitis in a patient" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="activity" nullable="false" remarks="Activity status, 1=form is active, 0=inactive" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="authorized" nullable="false" remarks="Authorization flag" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_additional_diagnosis" nullable="false" remarks="Additional diagnoses for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_date_of_illness" nullable="false" remarks="Date of illness for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_diagnostic_tests" nullable="false" remarks="Diagnostic tests for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_click" nullable="false" remarks="Heart - Click Sound" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_grade" nullable="false" remarks="Heart - Grade" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_location" nullable="false" remarks="Heart - Location" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_murmur" nullable="false" remarks="Heart - Murmur" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_normal" nullable="false" remarks="Heart - Normal Exam" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_not_examined" nullable="false" remarks="Heart - Not Examined" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_pmi" nullable="false" remarks="Heart - PMI (Point of Maximal Impulse)" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_rub" nullable="false" remarks="Heart - Rub Sound" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_s3" nullable="false" remarks="Heart - S3 Sound" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_heart_s4" nullable="false" remarks="Heart - S4 Sound" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_hpi" nullable="false" remarks="History of Present Illness for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_bs_increased" nullable="false" remarks="Lungs - Breath Sounds Increased" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_bs_normal" nullable="false" remarks="Lungs - Breath Sounds Normal" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_bs_reduced" nullable="false" remarks="Lungs - Breath Sounds Reduced" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_crackles_bll" nullable="false" remarks="Lungs - Crackles - Both Lower Lobes" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_crackles_lll" nullable="false" remarks="Lungs - Crackles - Left Lower Lobe" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_crackles_rll" nullable="false" remarks="Lungs - Crackles - Right Lower Lobe" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_normal_exam" nullable="false" remarks="Lungs - Normal Exam" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_not_examined" nullable="false" remarks="Lungs - Not Examined" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_rubs_bll" nullable="false" remarks="Lungs - Rubs - Both Lower Lobes" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_rubs_lll" nullable="false" remarks="Lungs - Rubs - Left Lower Lobe" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_rubs_rll" nullable="false" remarks="Lungs - Rubs - Right Lower Lobe" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_wheezes_bll" nullable="false" remarks="Lungs - Wheezes - Both Lower Lobes" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_wheezes_dll" nullable="false" remarks="Lungs - Wheezes - Diffuse" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_wheezes_lll" nullable="false" remarks="Lungs - Wheezes - Left Lower Lobe" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_lungs_wheezes_rll" nullable="false" remarks="Lungs - Wheezes - Right Lower Lobe" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_nares_discharge_left" nullable="false" remarks="Nares - Discharge Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_nares_discharge_right" nullable="false" remarks="Nares - Discharge Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_nares_normal_left" nullable="false" remarks="Nares - Normal Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_nares_normal_right" nullable="false" remarks="Nares - Normal Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_nares_swelling_left" nullable="false" remarks="Nares - Swelling Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_nares_swelling_right" nullable="false" remarks="Nares - Swelling Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_no_sinus_tenderness" nullable="false" remarks="No sinus tenderness" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_all_reviewed" nullable="false" remarks="Operations related to all reviewed" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_appearance" nullable="false" remarks="Operations related to appearance" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_chest_pain" nullable="false" remarks="Operations related to chest pain" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_cough" nullable="false" remarks="Operations related to cough" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_dizziness" nullable="false" remarks="Operations related to dizziness" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_dyspnea" nullable="false" remarks="Operations related to dyspnea" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_fever" nullable="false" remarks="Operations related to fever" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_malaise" nullable="false" remarks="Operations related to malaise" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_sputum" nullable="false" remarks="Operations related to sputum" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_sweating" nullable="false" remarks="Operations related to sweating" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_ops_wheezing" nullable="false" remarks="Operations related to wheezing" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_abcess" nullable="false" remarks="Oropharynx - Abscess" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_appearance" nullable="false" remarks="Oropharynx - Appearance" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_erythema" nullable="false" remarks="Oropharynx - Erythema" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_exudate" nullable="false" remarks="Oropharynx - Exudate" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_normal" nullable="false" remarks="Oropharynx - Normal" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_not_examined" nullable="false" remarks="Oropharynx - Not Examined" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_oropharynx_ulcers" nullable="false" remarks="Oropharynx - Ulcers" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_review_of_allergies" nullable="false" remarks="Review of allergies for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_review_of_fh" nullable="false" remarks="Review of family history for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_review_of_medications" nullable="false" remarks="Review of medications for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_review_of_pmh" nullable="false" remarks="Review of Past Medical History for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_review_of_sh" nullable="false" remarks="Review of social history for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_sinus_tenderness_frontal_left" nullable="false" remarks="Sinus Tenderness - Frontal Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_sinus_tenderness_frontal_right" nullable="false" remarks="Sinus Tenderness - Frontal Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_sinus_tenderness_maxillary_left" nullable="false" remarks="Sinus Tenderness - Maxillary Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_sinus_tenderness_maxillary_right" nullable="false" remarks="Sinus Tenderness - Maxillary Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_sinus_tenderness_not_examined" nullable="false" remarks="Sinus Tenderness - Not Examined" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_af_level_left" nullable="false" remarks="Tympanic Membrane and Sinus - AF Level Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_af_level_right" nullable="false" remarks="Tympanic Membrane and Sinus - AF Level Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_bulging_left" nullable="false" remarks="Tympanic Membrane and Sinus - Bulging Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_bulging_right" nullable="false" remarks="Tympanic Membrane and Sinus - Bulging Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_nares_not_examined" nullable="false" remarks="Tympanic Membrane and Sinus - Nares Not Examined" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_normal_left" nullable="false" remarks="Tympanic Membrane and Sinus - Normal Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_normal_right" nullable="false" remarks="Tympanic Membrane and Sinus - Normal Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_perforated_left" nullable="false" remarks="Tympanic Membrane and Sinus - Perforated Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_perforated_right" nullable="false" remarks="Tympanic Membrane and Sinus - Perforated Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_retracted_left" nullable="false" remarks="Tympanic Membrane and Sinus - Retracted Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_retracted_right" nullable="false" remarks="Tympanic Membrane and Sinus - Retracted Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_thickened_left" nullable="false" remarks="Tympanic Membrane and Sinus - Thickened Left" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_tms_thickened_right" nullable="false" remarks="Tympanic Membrane and Sinus - Thickened Right" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="bronchitis_treatment" nullable="false" remarks="Treatment information for bronchitis" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="date" nullable="false" remarks="Date when the record was created" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="diagnosis1_bronchitis_form" nullable="false" remarks="Diagnosis 1 for bronchitis form" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="diagnosis2_bronchitis_form" nullable="false" remarks="Diagnosis 2 for bronchitis form" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="diagnosis3_bronchitis_form" nullable="false" remarks="Diagnosis 3 for bronchitis form" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="diagnosis4_bronchitis_form" nullable="false" remarks="Diagnosis 4 for bronchitis form" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="User responsible for creating the record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_CAMOS" numRows="0" remarks="Computer Aided Medical Ordering System notes that are part of a patient's chart" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="category" nullable="false" remarks="The category that this note is based upon" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="content" nullable="false" remarks="The actual chart note text that was entered in for the patient" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="item" nullable="false" remarks="The CAMOS item template that this note is based on" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="subcategory" nullable="false" remarks="The CAMOS subcategory template that this note is based on" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="form_CAMOS_category" numRows="0" remarks="Note categories used in the CAMOS note generator" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="User responsible for creating this category." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_CAMOS_item" numRows="0" remarks="CAMOS patient chart templates for a single item inside a CAMOS subcategory" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="subcategory_id" nullable="false" remarks="The CAMOS subcategory this item is part of." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="User responsible for creating this category." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_CAMOS_subcategory" numRows="0" remarks="CAMOS patient chart sub categories inside a single category" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="category_id" nullable="false" remarks="The CAMOS category this subcategory is part of." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
      </table>
      <table catalog="openemr" name="form_care_plan" remarks="Patient Clinical Care Plans" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="encounter" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="codetext" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="external_id" nullable="true" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="care_plan_type" nullable="true" remarks="Comes from the list_options.list_id='Plan_of_Care_Type'" size="30" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="note_related_to" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="date_end" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="reason_code" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="reason_description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="reason_date_low" nullable="true" remarks="The date the reason was recorded" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="reason_date_high" nullable="true" remarks="The date the explanation reason for the care plan entry value ends" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="reason_status" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="plan_status" nullable="true" remarks="Comes from the list_options.list_id='care_plan_status'" size="32" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="proposed_date" nullable="true" remarks="Target or Achieve-by date for the goal" size="19" type="DATETIME" typeCode="93"/>
         <index name="idx_status_date" unique="false">
            <column ascending="true" name="plan_status"/>
            <column ascending="true" name="date"/>
            <column ascending="true" name="date_end"/>
         </index>
      </table>
      <table catalog="openemr" name="form_clinic_note" numRows="0" remarks="Holds patient history, provider examination conducted, patient treatment plan, and follow up status" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
      </table>
      <table catalog="openemr" name="form_clinical_instructions" remarks="Patient clinical instructions chart note" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="encounter" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="instruction" nullable="true" remarks="The actual instructions to be given to the patient" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="5" name="date" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_clinical_notes" remarks="Patient clinical notes with support for USCDI V1 standardized note types" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="clinical_note_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_notes_documents"/>
            <child catalog="openemr" column="clinical_note_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_notes_procedure_results"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="form_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="encounter" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="codetext" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="external_id" nullable="true" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="clinical_notes_type" nullable="true" remarks="Comes from the list_options.list_id='Clinical_Note_Type' and represents the standardized note type for this note" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="clinical_notes_category" nullable="true" remarks="Comes from the list_options.list_id='Clinical_Note_Category' and represents the main category for this kind of clinical note" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="note_related_to" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="17" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_dictation" remarks="Patient chart note that holds notes created from a provider's speech dictation software" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="dictation" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="additional_notes" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_encounter" remarks="Represents the information related to a patient's visit to a healthcare provider.  This is different than an appointment as this table tracks the actual service of care" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="reason" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="facility" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="facility_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="encounter" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_activity"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="encounter_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="claims"/>
            <child catalog="openemr" column="encounter_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drug_sales"/>
            <child catalog="openemr" column="ep_encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="external_procedures"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_misc_billing_options"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation"/>
            <child catalog="openemr" column="encounter_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_documents"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_signatures"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="issue_encounter"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker"/>
            <child catalog="openemr" column="encounter_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_response"/>
            <child catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="shared_attributes"/>
            <child catalog="openemr" column="encounter_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="voids"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="onset_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="sensitivity" nullable="true" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="billing_note" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="5" digits="0" id="11" name="pc_catid" nullable="false" remarks="event category from openemr_postcalendar_categories" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="last_level_billed" nullable="false" remarks="The party for whom payment was last billed. -1=Nobody, 0=Patient, 1=Ins1, 2=Ins2, 3=Ins3" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="last_level_closed" nullable="false" remarks="The party for whom payment was last received. -1=Nobody, 0=Patient, 1=Ins1, 2=Ins2, 3=Ins3" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="last_stmt_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="stmt_count" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="provider_id" nullable="true" remarks="default and main provider for this visit" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="supervisor_id" nullable="true" remarks="supervising provider, if any, for this visit" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="18" name="invoice_refno" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="19" name="referral_source" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="20" name="billing_facility" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="external_id" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="pos_code" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="parent_encounter_id" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="'AMB'" digits="0" id="24" name="class_code" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="25" name="shift" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="26" name="voucher_number" nullable="false" remarks="also called referral number" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="discharge_disposition" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="encounter_type_code" nullable="true" remarks="not all types are categories" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="encounter_type_description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="30" name="referring_provider_id" nullable="true" remarks="referring provider, if any, for this visit" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="date_end" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="in_collection" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="33" name="last_update" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="34" name="ordering_provider_id" nullable="true" remarks="referring provider, if any, for this visit" size="10" type="INT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="encounter" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="encounter_date" unique="false">
            <column ascending="true" name="date"/>
         </index>
         <index name="pid_encounter" unique="false">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="encounter"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_acuity" remarks="This table is related to recording visual acuity measurements for different eye conditions." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="SCODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="SCOSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="PHODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="PHOSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="CTLODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="CTLOSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="MRODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="MROSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="SCNEARODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="SCNEAROSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="MRNEARODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="MRNEAROSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="GLAREODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="GLAREOSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="GLARECOMMENTS" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="ARODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="AROSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="CRODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="CROSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="CTLODVA1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="CTLOSVA1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="PAMODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="PAMOSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="25" name="LIODVA" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="26" name="LIOSVA" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="WODVANEAR" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="OSVANEARCC" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="BINOCVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_antseg" remarks="This table is used to store data related to anterior segment eye examinations, which typically include details about the front portion of the eye, such as the cornea, lens, iris, and pupil." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="ODSCHIRMER1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="OSSCHIRMER1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ODSCHIRMER2" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="OSSCHIRMER2" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ODTBUT" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="OSTBUT" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="OSCONJ" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="ODCONJ" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="ODCORNEA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="OSCORNEA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ODAC" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="OSAC" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="ODLENS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="OSLENS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="ODIRIS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="OSIRIS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="'1'" digits="0" id="18" name="PUPIL_NORMAL" nullable="true" remarks="" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="ODPUPILSIZE1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="ODPUPILSIZE2" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="ODPUPILREACTIVITY" nullable="true" remarks="" size="25" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="ODAPD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="OSPUPILSIZE1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="OSPUPILSIZE2" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="OSPUPILREACTIVITY" nullable="true" remarks="" size="25" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="OSAPD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="DIMODPUPILSIZE1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="DIMODPUPILSIZE2" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="DIMODPUPILREACTIVITY" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="DIMOSPUPILSIZE1" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="DIMOSPUPILSIZE2" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="DIMOSPUPILREACTIVITY" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="PUPIL_COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="ODKTHICKNESS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="OSKTHICKNESS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="ODGONIO" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="OSGONIO" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="ANTSEG_COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_base" remarks="Eye form base container record that all other eye forms are connected to" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_biometrics" remarks="This table stores biometric data related to the eye, including axial length, pupil diameter, and other measurements." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="ODK1" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="ODK2" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ODK2AXIS" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="OSK1" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="OSK2" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="OSK2AXIS" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="ODAXIALLENGTH" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="OSAXIALLENGTH" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="ODPDMeasured" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="OSPDMeasured" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ODACD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="OSACD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="ODW2W" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="OSW2W" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="ODLT" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="OSLT" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_external" remarks="This table is used for recording external eye examination findings." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="RUL" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="LUL" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="RLL" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="LLL" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="RBROW" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="LBROW" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="RMCT" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="LMCT" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="RADNEXA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="LADNEXA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="RMRD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="LMRD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="RLF" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="LLF" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="RVFISSURE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="LVFISSURE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="ODHERTEL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="OSHERTEL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="HERTELBASE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="RCAROTID" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="LCAROTID" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="RTEMPART" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="LTEMPART" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="RCNV" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="LCNV" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="RCNVII" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="LCNVII" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="EXT_COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_hpi" remarks="This table stores the history of present illness (HPI) information related to eye conditions." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="CC1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="HPI1" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="QUALITY1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="TIMING1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="DURATION1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="CONTEXT1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="SEVERITY1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="MODIFY1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="ASSOCIATED1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="LOCATION1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="CHRONIC1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="CHRONIC2" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="CHRONIC3" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="CC2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="HPI2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="QUALITY2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="TIMING2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="DURATION2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="CONTEXT2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="SEVERITY2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="MODIFY2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="ASSOCIATED2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="LOCATION2" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="CC3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="HPI3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="QUALITY3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="TIMING3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="DURATION3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="CONTEXT3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="SEVERITY3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="MODIFY3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="ASSOCIATED3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="LOCATION3" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_locking" remarks="Used for tracking the editing status of a form and whether it is currently being edited by a user" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="IMP" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="PLAN" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="Resource" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="Technician" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="LOCKED" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="7" name="LOCKEDDATE" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="LOCKEDBY" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_mag_dispense" remarks="Stores information related to eye prescriptions and dispensing for both the left (OS) and right (OD) eyes" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="1" name="date" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="encounter" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="REFDATE" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="REFTYPE" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="RXTYPE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="ODSPH" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ODCYL" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="ODAXIS" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="OSSPH" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="OSCYL" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="OSAXIS" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="ODMIDADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="OSMIDADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="ODADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="OSADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="ODHPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="ODHBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="ODVPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="ODVBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="ODSLABOFF" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="ODVERTEXDIST" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="OSHPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="OSHBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="OSVPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="OSVBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="OSSLABOFF" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="OSVERTEXDIST" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="ODMPDD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="ODMPDN" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="OSMPDD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="OSMPDN" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="BPDD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="BPDN" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="LENS_MATERIAL" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="LENS_TREATMENTS" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="CTLMANUFACTUREROD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="CTLMANUFACTUREROS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="CTLSUPPLIEROD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="CTLSUPPLIEROS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="CTLBRANDOD" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="CTLBRANDOS" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="CTLODQUANTITY" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="CTLOSQUANTITY" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="49" name="ODDIAM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="50" name="ODBC" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="51" name="OSDIAM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="52" name="OSBC" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="53" name="RXCOMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="54" name="COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="true">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="encounter"/>
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_mag_impplan" remarks="Stores implementation plans for eye-related activities." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="form_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="title" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="code" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="codetype" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="codedesc" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="codetext" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="plan" nullable="true" remarks="" size="3000" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="PMSFH_link" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="IMPPLAN_order" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="second_index" unique="true">
            <column ascending="true" name="form_id"/>
            <column ascending="true" name="pid"/>
            <column ascending="true" name="title"/>
            <column ascending="true" name="plan"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_mag_orders" remarks="This table is used to track eye-related orders, such as eyeglass or contact lens orders." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="form_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="ORDER_DETAILS" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ORDER_STATUS" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ORDER_PRIORITY" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="ORDER_DATE_PLACED" nullable="false" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ORDER_PLACED_BYWHOM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="ORDER_DATE_COMPLETED" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="ORDER_COMPLETED_BYWHOM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="VISIT_ID" unique="true">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="ORDER_DETAILS"/>
            <column ascending="true" name="ORDER_DATE_PLACED"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_mag_wearing" remarks="This table is used to record information related to wearing eyeglasses or contact lenses." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="ENCOUNTER" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="FORM_ID" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="PID" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="RX_NUMBER" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ODSPH" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ODCYL" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ODAXIS" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="OSSPH" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="OSCYL" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="OSAXIS" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="ODMIDADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="OSMIDADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="ODADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="OSADD" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="ODVA" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="OSVA" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="ODNEARVA" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="OSNEARVA" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="ODHPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="ODHBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="ODVPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="ODVBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="ODSLABOFF" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="ODVERTEXDIST" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="OSHPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="OSHBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="OSVPD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="OSVBASE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="OSSLABOFF" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="OSVERTEXDIST" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="ODMPDD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="ODMPDN" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="OSMPDD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="OSMPDN" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="BPDD" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="BPDN" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="LENS_MATERIAL" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="LENS_TREATMENTS" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="RX_TYPE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <index name="FORM_ID" unique="true">
            <column ascending="true" name="FORM_ID"/>
            <column ascending="true" name="ENCOUNTER"/>
            <column ascending="true" name="PID"/>
            <column ascending="true" name="RX_NUMBER"/>
         </index>
         <index name="id" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_neuro" remarks="This table includes numerous fields for recording the results of neurological tests and assessments, such as near and distant vision, motility measurements, comments, and various neurological parameters." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="'on'" digits="0" id="2" name="ACT" nullable="false" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="ACT5CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ACT1CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ACT2CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ACT3CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ACT4CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="ACT6CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="ACT7CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="ACT8CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="ACT9CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ACT10CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="ACT11CCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="ACT1SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="ACT2SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="ACT3SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="ACT4SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="ACT5SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="ACT6SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="ACT7SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="ACT8SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="ACT9SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="ACT10SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="ACT11SCDIST" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="ACT1SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="ACT2SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="ACT3SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="ACT4SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="ACT5CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="ACT6CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="ACT7CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="ACT8CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="ACT9CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="ACT10CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="ACT11CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="ACT5SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="ACT6SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="ACT7SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="ACT8SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="ACT9SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="ACT10SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="ACT11SCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="ACT1CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="ACT2CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="ACT3CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="ACT4CCNEAR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="'on'" digits="0" id="47" name="MOTILITYNORMAL" nullable="false" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="48" name="MOTILITY_RS" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="49" name="MOTILITY_RI" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="50" name="MOTILITY_RR" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="51" name="MOTILITY_RL" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="52" name="MOTILITY_LS" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="53" name="MOTILITY_LI" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="54" name="MOTILITY_LR" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="55" name="MOTILITY_LL" nullable="true" remarks="" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="56" name="MOTILITY_RRSO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="57" name="MOTILITY_RLSO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="58" name="MOTILITY_RRIO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="59" name="MOTILITY_RLIO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="60" name="MOTILITY_LRSO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="61" name="MOTILITY_LLSO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="62" name="MOTILITY_LRIO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="63" name="MOTILITY_LLIO" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="64" name="NEURO_COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="65" name="STEREOPSIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="66" name="ODNPA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="67" name="OSNPA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="68" name="VERTFUSAMPS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="69" name="DIVERGENCEAMPS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="70" name="NPC" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="71" name="DACCDIST" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="72" name="DACCNEAR" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="73" name="CACCDIST" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="74" name="CACCNEAR" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="75" name="ODCOLOR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="76" name="OSCOLOR" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="77" name="ODCOINS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="78" name="OSCOINS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="79" name="ODREDDESAT" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="80" name="OSREDDESAT" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_postseg" remarks="This table is used for storing data related to posterior segment eye examinations, which typically involve the back of the eye, including the retina, optic disc, macula, and blood vessels." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="ODDISC" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="OSDISC" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ODCUP" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="OSCUP" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ODMACULA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="OSMACULA" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="ODVESSELS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="OSVESSELS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="ODVITREOUS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="OSVITREOUS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ODPERIPH" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="OSPERIPH" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="ODCMT" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="OSCMT" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="RETINA_COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="'on'" digits="0" id="17" name="DIL_RISKS" nullable="false" remarks="" size="2" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="DIL_MEDS" nullable="true" remarks="" size="16777215" type="MEDIUMTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="WETTYPE" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="ATROPINE" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="CYCLOMYDRIL" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="TROPICAMIDE" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="CYCLOGYL" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="24" name="NEO25" nullable="false" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_refraction" remarks="This table is used for recording eye refraction details, including sphere, cylinder, axis, prism, and base measurements." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="MRODSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="MRODCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="MRODAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="MRODPRISM" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="MRODBASE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="MRODADD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="MROSSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="MROSCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="MROSAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="MROSPRISM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="MROSBASE" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="MROSADD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="MRODNEARSPHERE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="MRODNEARCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="MRODNEARAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="MRODPRISMNEAR" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="MRODBASENEAR" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="MROSNEARSHPERE" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="MROSNEARCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="MROSNEARAXIS" nullable="true" remarks="" size="125" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="MROSPRISMNEAR" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="MROSBASENEAR" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="CRODSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="CRODCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="CRODAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="CROSSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="CROSCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="CROSAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="CRCOMMENTS" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="31" name="BALANCED" nullable="false" remarks="" size="2" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="ARODSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="ARODCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="ARODAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="AROSSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="AROSCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="AROSAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="ARODADD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="AROSADD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="ARNEARODVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="ARNEAROSVA" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="ARODPRISM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="AROSPRISM" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="CTLODSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="CTLODCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="CTLODAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="CTLODBC" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="CTLODDIAM" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="49" name="CTLOSSPH" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="50" name="CTLOSCYL" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="51" name="CTLOSAXIS" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="52" name="CTLOSBC" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="53" name="CTLOSDIAM" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="54" name="CTL_COMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="55" name="CTLMANUFACTUREROD" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="56" name="CTLSUPPLIEROD" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="57" name="CTLBRANDOD" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="58" name="CTLMANUFACTUREROS" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="59" name="CTLSUPPLIEROS" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="60" name="CTLBRANDOS" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="61" name="CTLODADD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="62" name="CTLOSADD" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="63" name="NVOCHECKED" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="64" name="ADDCHECKED" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_ros" remarks="This table stores review of systems (ROS) information related to various aspects of the eye and its associated systems." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="ROSGENERAL" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="ROSHEENT" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ROSCV" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ROSPULM" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="ROSGI" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ROSGU" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="ROSDERM" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="ROSNEURO" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="ROSPSYCH" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="ROSMUSCULO" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ROSIMMUNO" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="ROSENDOCRINE" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="ROSCOMMENTS" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_eye_vitals" remarks="This table is used for recording vital signs and measurements related to the eye." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Links to forms.form_id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="'yes'" digits="0" id="2" name="alert" nullable="true" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'TPP'" digits="0" id="3" name="oriented" nullable="true" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'nml'" digits="0" id="4" name="confused" nullable="true" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ODIOPAP" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="OSIOPAP" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ODIOPTPN" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="OSIOPTPN" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="ODIOPFTN" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="OSIOPFTN" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="IOPTIME" nullable="false" remarks="" size="10" type="TIME" typeCode="92"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="ODIOPPOST" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="OSIOPPOST" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="IOPPOSTTIME" nullable="true" remarks="" size="10" type="TIME" typeCode="92"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="ODIOPTARGET" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="16" name="OSIOPTARGET" nullable="false" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="AMSLEROD" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="AMSLEROS" nullable="true" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="ODVF1" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="ODVF2" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="ODVF3" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="ODVF4" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="OSVF1" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="OSVF2" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="OSVF3" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="OSVF4" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="id_pid" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_functional_cognitive_status" remarks="Holds information about assessments, evaluations, or observations of a patient's functional and cognitive abilities." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="encounter" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="codetext" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="external_id" nullable="true" remarks="" size="30" type="VARCHAR" typeCode="12"/>
      </table>
      <table catalog="openemr" name="form_gad7" numRows="0" remarks="Encounter form that holds patient results for the GAD7 assessment" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="The user that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_group_attendance" remarks="Group encounter form for tracking the attendance of therapy participants to a group session encounter" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_participant_attendance"/>
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="group_id" nullable="true" remarks="FK to the therapy group that this attendance form is tracking" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="The username of the user that created this record." size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="User Group that the user was part of that created this record (This is not the therapy group)" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="authorized" nullable="true" remarks="Authorization status (1 for authorized, 0 for unauthorized)" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="encounter_id" nullable="true" remarks="The group encounter that this group attendance form is part of" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="activity" nullable="true" remarks="Activity status (1 for active, 0 for inactive)" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_groups_encounter" remarks="Represents the information related to a group of patient's visit to a healthcare provider.  This is different than an appointment as this table tracks the actual service of care for a therapy group" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="Date and time of the encounter" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="reason" nullable="true" remarks="The reason for the encounter" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="facility" nullable="true" remarks="The facility or location of the encounter" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="facility_id" nullable="false" remarks="Unique identifier for the billing facility that will be used for this encounter." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="group_id" nullable="true" remarks="FK to the therapy group that is attending for the encounter service" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="encounter" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="encounter_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_group_attendance"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="onset_date" nullable="true" remarks="The date when the condition or issue for the group started" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="sensitivity" nullable="true" remarks="Sensitivity information related to the encounter as to who should be able to access / view this encounter" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="billing_note" nullable="true" remarks="Notes related to billing for the encounter" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="5" digits="0" id="10" name="pc_catid" nullable="false" remarks="The encounter service category taken from 'openemr_postcalendar_categories'" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pc_catid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="last_level_billed" nullable="false" remarks="The party for whom payment was last billed. 0=None, 1=Ins1, 2=Ins2, 3=Ins3" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="last_level_closed" nullable="false" remarks="The party for whom payment was last received. 0=None, 1=Ins1, 2=Ins2, 3=Ins3" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="last_stmt_date" nullable="true" remarks="The date of the last statement" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="stmt_count" nullable="false" remarks="The statement count" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="provider_id" nullable="true" remarks="Default and main provider for this visit" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="supervisor_id" nullable="true" remarks="Supervising provider, if any, for this visit" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="17" name="invoice_refno" nullable="false" remarks="Reference number for the invoice" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="18" name="referral_source" nullable="false" remarks="Source of the referral" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="19" name="billing_facility" nullable="false" remarks="ID of the billing facility" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="external_id" nullable="true" remarks="External ID associated with the encounter" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="pos_code" nullable="true" remarks="Place of service code" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="counselors" nullable="true" remarks="Information about counselors related to the encounter" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="appt_id" nullable="true" remarks="The calendar appointment id that this encounter is associated with or that this encounter was created from" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pc_eid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="encounter" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="encounter_date" unique="false">
            <column ascending="true" name="date"/>
         </index>
         <index name="pid_encounter" unique="false">
            <column ascending="true" name="group_id"/>
            <column ascending="true" name="encounter"/>
         </index>
      </table>
      <table catalog="openemr" name="form_history_sdoh" remarks="" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="20" type="BIGINT UNSIGNED" typeCode="-5">
            <child catalog="openemr" column="sdoh_history_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh_health_concerns"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pid" nullable="false" remarks="" size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="encounter" nullable="true" remarks="" size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="4" name="created_at" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="5" name="updated_at" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="created_by" nullable="true" remarks="fk to users.id user that created this record" size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="updated_by" nullable="true" remarks="fk to users.id user that last modified this record" size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="assessment_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="screening_tool" nullable="true" remarks="Comes from the list_options.list_id='sdoh_instruments'" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="assessor" nullable="true" remarks="fk to users.username the user that administered the assessment" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="food_insecurity" nullable="true" remarks="Comes from the list_options.list_id='sdoh_food_insecurity_risk' and represents the food insecurity status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="food_insecurity_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="housing_instability" nullable="true" remarks="Comes from the list_options.list_id='sdoh_housing_worry' and represents the housing stability status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="housing_instability_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="transportation_insecurity" nullable="true" remarks="Comes from the list_options.list_id='sdoh_transportation_barrier' and represents the transportation insecurity status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="transportation_insecurity_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="utilities_insecurity" nullable="true" remarks="Comes from the list_options.list_id='sdoh_utilities_shutoff' and represents the utilities insecurity status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="utilities_insecurity_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="interpersonal_safety" nullable="true" remarks="Comes from the list_options.list_id='sdoh_ipv_yesno' and represents the interpersonal safety status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="interpersonal_safety_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="financial_strain" nullable="true" remarks="Comes from the list_options.list_id='sdoh_financial_strain' and represents the financial strain status of the patient at the time of assessment" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="financial_strain_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="social_isolation" nullable="true" remarks="Comes from the list_options.list_id='sdoh_social_isolation_freq' and represents the social isolation status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="social_isolation_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="childcare_needs" nullable="true" remarks="Comes from the list_options.list_id='sdoh_childcare_needs' and represents the childcare needs of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="childcare_needs_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="digital_access" nullable="true" remarks="Comes from the list_options.list_id='sdoh_digital_access' and represents the digital access status of the patient" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="digital_access_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="employment_status" nullable="true" remarks="fk to list_options.option_id WHERE list_id=sdoh_food_insecurity_risk" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="education_level" nullable="true" remarks="fk to list_options.option_id WHERE list_id=sdoh_education_level" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="caregiver_status" nullable="true" remarks="fk to list_options.option_id WHERE list_id=sdoh_food_insecurity_risk" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="veteran_status" nullable="true" remarks="fk to list_options.option_id WHERE list_id=sdoh_food_insecurity_risk" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="pregnancy_status" nullable="true" remarks="Comes from the list_options.list_id='pregnancy_status'" size="20" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="pregnancy_edd" nullable="true" remarks="Estimated due date for pregnancy" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="pregnancy_intent" nullable="true" remarks="Comes from the list_options.list_id='pregnancy_intent'" size="32" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="postpartum_status" nullable="true" remarks="Comes from the list_options.list_id='postpartum_status'" size="20" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="postpartum_end" nullable="true" remarks="PostPartum end date" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="goals" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="interventions" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="instrument_score" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="positive_domain_count" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="declined_flag" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="disability_status" nullable="true" remarks="Comes from the list_options.list_id='disability_status'" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="disability_status_notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="disability_scale" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="hunger_q1" nullable="true" remarks="Comes from the list_options.list_id='vital_signs_answers'" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="hunger_q2" nullable="true" remarks="Comes from the list_options.list_id='vital_signs_answers'" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="hunger_score" nullable="true" remarks="Calculated HVS score" size="10" type="INT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="assessment_idx" unique="false">
            <column ascending="true" name="assessment_date"/>
         </index>
         <index name="encounter_idx" unique="false">
            <column ascending="true" name="encounter"/>
         </index>
         <index name="pid_idx" unique="false">
            <column ascending="true" name="pid"/>
         </index>
         <index name="uuid_idx" unique="false">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_history_sdoh_health_concerns" remarks="Links SDOH assessments to health concern conditions" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="sdoh_history_id" nullable="false" remarks="FK to form_history_sdoh.id" size="20" type="BIGINT UNSIGNED" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="health_concern_id" nullable="false" remarks="FK to lists.id where type=health_concern or medical_problem" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="3" name="created_at" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="created_by" nullable="true" remarks="FK to users.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_health_concern" unique="false">
            <column ascending="true" name="health_concern_id"/>
         </index>
         <index name="idx_sdoh_history" unique="false">
            <column ascending="true" name="sdoh_history_id"/>
         </index>
         <index name="unique_sdoh_concern" unique="true">
            <column ascending="true" name="sdoh_history_id"/>
            <column ascending="true" name="health_concern_id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_misc_billing_options" remarks="Contains encounter claims billing options that modifies the claims submitted for this encounter" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="employment_related" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="auto_accident" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="accident_state" nullable="true" remarks="" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="other_accident" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="medicaid_referral_code" nullable="true" remarks="" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="epsdt_flag" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="provider_qualifier_code" nullable="true" remarks="" size="2" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="provider_id" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="outside_lab" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="2" id="16" name="lab_amount" nullable="true" remarks="" size="5" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="is_unable_to_work" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="onset_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="date_initial_treatment" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="off_work_from" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="off_work_to" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="is_hospitalized" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="hospitalization_date_from" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="hospitalization_date_to" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="medicaid_resubmission_code" nullable="true" remarks="" size="10" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="medicaid_original_reference" nullable="true" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="prior_auth_number" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="comments" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="replacement_claim" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="icn_resubmission_number" nullable="true" remarks="" size="35" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="box_14_date_qual" nullable="true" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="box_15_date_qual" nullable="true" remarks="" size="3" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="encounter" nullable="true" remarks="References form_encounter.encounter, representing the encounter for this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="encounter" unique="true">
            <column ascending="true" name="encounter"/>
         </index>
      </table>
      <table catalog="openemr" name="form_note" numRows="0" remarks="Work/School note written by a provider for a patient to provide documentation of their medical condition to their work or school" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
      </table>
      <table catalog="openemr" name="form_observation" remarks="Used for recording observations related to patients during medical encounters" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID for the observation, used as unique logical identifier" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="form_id" nullable="false" remarks="fk to forms.id represents the overall form for this observation" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="encounter" nullable="true" remarks="References form_encounter.encounter, representing the encounter for this record" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="user" nullable="true" remarks="fk to users.username who created this observation" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="observation" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ob_value" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="ob_unit" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="description" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="code_type" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="table_code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="ob_code" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="ob_type" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="ob_status" nullable="true" remarks="Comes from the list_options.list_id='observation-status'" size="32" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="result_status" nullable="true" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="ob_reason_status" nullable="true" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="ob_reason_code" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="ob_reason_text" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="ob_documentationof_table" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="ob_documentationof_table_id" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="date_end" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="parent_observation_id" nullable="true" remarks="fk to form_observation.id and is used to create hierarchical relationships between observations" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="category" nullable="true" remarks="Comes from the list_options.list_id='Observation_Types' and represents the category/type of observation being recorded" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="questionnaire_response_id" nullable="true" remarks="fk to questionnaire_repository.questionnaire_response_id and is used link a questionnaire response to this observation" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_repository"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="ob_value_code_description" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_category" unique="false">
            <column ascending="true" name="category"/>
         </index>
         <index name="idx_date" unique="false">
            <column ascending="true" name="date"/>
         </index>
         <index name="idx_form_id" unique="false">
            <column ascending="true" name="form_id"/>
         </index>
         <index name="idx_parent_observation" unique="false">
            <column ascending="true" name="parent_observation_id"/>
         </index>
         <index name="idx_pid_encounter" unique="false">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="encounter"/>
         </index>
         <index name="idx_questionnaire_response" unique="false">
            <column ascending="true" name="questionnaire_response_id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_painmap" numRows="0" remarks="Patient pain map form. Pain map image for mapping this form is stored in the EHI zip export at images/painmap.png" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="data" nullable="false" remarks="Data of the patient pain map to overlay ontop of the pain image.  Each mapped data element is in the following format x1CoordinatePixels^y1CoordinatePixels^pain1Description}...}." size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="The user that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_phq9" numRows="0" remarks="Encounter form that holds patient results for the PHQ9 assessment" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="The user that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_physical_exam" numRows="0" remarks="Physical Examination clinical note" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="diagnosis" nullable="false" remarks="" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="forms_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="line_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="form_physical_exam_diagnoses" numRows="0" remarks="Physical Exam Diagnosis for a physical exam that was conducted" schema="openemr" type="TABLE"/>
      <table catalog="openemr" name="form_prior_auth" numRows="0" remarks="Patient Prior Authorization records" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
      </table>
      <table catalog="openemr" name="form_questionnaire_assessments" remarks="Holds questionnaires results for a patient entered in by a provider as a patient charted form" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="response_id" nullable="true" remarks="The foreign uuid key to the questionnaire_response.response_id" size="65535" type="TEXT" typeCode="-1">
            <parent catalog="openemr" column="response_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_response"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="groupname" nullable="true" remarks="The groupname that created this record." size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="authorized" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="activity" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="copyright" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="form_name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="response_meta" nullable="true" remarks="json meta data for the response resource" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="questionnaire_id" nullable="true" remarks="The foreign uuid key to the questionnaire.questionnaire_id" size="65535" type="TEXT" typeCode="-1">
            <parent catalog="openemr" column="questionnaire_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_repository"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="questionnaire" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="questionnaire_response" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="lform" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="lform_response" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="category" nullable="true" remarks="Comes from the list_options.list_id='Observation_Types' and represents the grouping category for this questionnaire" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_reviewofs" remarks="Review of Systems observations of the patient. Providers can use this form or the form_ros." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="fever" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="chills" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="night_sweats" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="weight_loss" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="poor_appetite" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="insomnia" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="fatigued" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="depressed" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="hyperactive" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="exposure_to_foreign_countries" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="cataracts" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="cataract_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="glaucoma" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="double_vision" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="blurred_vision" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="poor_hearing" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="headaches" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="ringing_in_ears" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="bloody_nose" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="sinusitis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="sinus_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="dry_mouth" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="strep_throat" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="tonsillectomy" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="swollen_lymph_nodes" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="throat_cancer" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="throat_cancer_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="heart_attack" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="irregular_heart_beat" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="chest_pains" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="shortness_of_breath" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="high_blood_pressure" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="heart_failure" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="poor_circulation" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="vascular_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="cardiac_catheterization" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="coronary_artery_bypass" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="heart_transplant" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="stress_test" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="emphysema" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="chronic_bronchitis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="interstitial_lung_disease" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="49" name="shortness_of_breath_2" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="50" name="lung_cancer" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="51" name="lung_cancer_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="52" name="pheumothorax" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="53" name="stomach_pains" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="54" name="peptic_ulcer_disease" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="55" name="gastritis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="56" name="endoscopy" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="57" name="polyps" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="58" name="colonoscopy" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="59" name="colon_cancer" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="60" name="colon_cancer_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="61" name="ulcerative_colitis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="62" name="crohns_disease" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="63" name="appendectomy" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="64" name="divirticulitis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="65" name="divirticulitis_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="66" name="gall_stones" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="67" name="cholecystectomy" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="68" name="hepatitis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="69" name="cirrhosis_of_the_liver" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="70" name="splenectomy" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="71" name="kidney_failure" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="72" name="kidney_stones" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="73" name="kidney_cancer" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="74" name="kidney_infections" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="75" name="bladder_infections" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="76" name="bladder_cancer" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="77" name="prostate_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="78" name="prostate_cancer" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="79" name="kidney_transplant" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="80" name="sexually_transmitted_disease" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="81" name="burning_with_urination" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="82" name="discharge_from_urethra" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="83" name="rashes" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="84" name="infections" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="85" name="ulcerations" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="86" name="pemphigus" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="87" name="herpes" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="88" name="osetoarthritis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="89" name="rheumotoid_arthritis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="90" name="lupus" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="91" name="ankylosing_sondlilitis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="92" name="swollen_joints" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="93" name="stiff_joints" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="94" name="broken_bones" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="95" name="neck_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="96" name="back_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="97" name="back_surgery" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="98" name="scoliosis" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="99" name="herniated_disc" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="100" name="shoulder_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="101" name="elbow_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="102" name="wrist_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="103" name="hand_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="104" name="hip_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="105" name="knee_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="106" name="ankle_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="107" name="foot_problems" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="108" name="insulin_dependent_diabetes" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="109" name="noninsulin_dependent_diabetes" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="110" name="hypothyroidism" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="111" name="hyperthyroidism" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="112" name="cushing_syndrom" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="113" name="addison_syndrom" nullable="true" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="114" name="additional_notes" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_ros" remarks="Review of Systems observations of the patient. Providers can use this form or the form_reviewofs" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="activity" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="weight_change" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="weakness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="fatigue" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="anorexia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="fever" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="chills" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="night_sweats" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="insomnia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="irritability" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="heat_or_cold" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="intolerance" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="change_in_vision" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="glaucoma_history" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="eye_pain" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="irritation" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="redness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="excessive_tearing" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="double_vision" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="blind_spots" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="photophobia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="hearing_loss" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="discharge" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="pain" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="vertigo" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="tinnitus" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="frequent_colds" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="sore_throat" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="sinus_problems" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="post_nasal_drip" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="nosebleed" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="snoring" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="apnea" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="breast_mass" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="breast_discharge" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="biopsy" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="abnormal_mammogram" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="cough" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="sputum" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="shortness_of_breath" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="wheezing" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="hemoptsyis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="asthma" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="copd" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="chest_pain" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="palpitation" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="49" name="syncope" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="50" name="pnd" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="51" name="doe" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="52" name="orthopnea" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="53" name="peripheal" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="54" name="edema" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="55" name="legpain_cramping" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="56" name="history_murmur" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="57" name="arrythmia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="58" name="heart_problem" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="59" name="dysphagia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="60" name="heartburn" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="61" name="bloating" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="62" name="belching" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="63" name="flatulence" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="64" name="nausea" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="65" name="vomiting" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="66" name="hematemesis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="67" name="gastro_pain" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="68" name="food_intolerance" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="69" name="hepatitis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="70" name="jaundice" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="71" name="hematochezia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="72" name="changed_bowel" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="73" name="diarrhea" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="74" name="constipation" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="75" name="polyuria" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="76" name="polydypsia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="77" name="dysuria" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="78" name="hematuria" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="79" name="frequency" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="80" name="urgency" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="81" name="incontinence" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="82" name="renal_stones" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="83" name="utis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="84" name="hesitancy" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="85" name="dribbling" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="86" name="stream" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="87" name="nocturia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="88" name="erections" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="89" name="ejaculations" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="90" name="g" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="91" name="p" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="92" name="ap" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="93" name="lc" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="94" name="mearche" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="95" name="menopause" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="96" name="lmp" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="97" name="f_frequency" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="98" name="f_flow" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="99" name="f_symptoms" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="100" name="abnormal_hair_growth" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="101" name="f_hirsutism" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="102" name="joint_pain" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="103" name="swelling" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="104" name="m_redness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="105" name="m_warm" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="106" name="m_stiffness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="107" name="muscle" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="108" name="m_aches" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="109" name="fms" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="110" name="arthritis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="111" name="loc" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="112" name="seizures" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="113" name="stroke" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="114" name="tia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="115" name="n_numbness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="116" name="n_weakness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="117" name="paralysis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="118" name="intellectual_decline" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="119" name="memory_problems" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="120" name="dementia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="121" name="n_headache" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="122" name="s_cancer" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="123" name="psoriasis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="124" name="s_acne" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="125" name="s_other" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="126" name="s_disease" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="127" name="p_diagnosis" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="128" name="p_medication" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="129" name="depression" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="130" name="anxiety" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="131" name="social_difficulties" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="132" name="thyroid_problems" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="133" name="diabetes" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="134" name="abnormal_blood" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="135" name="anemia" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="136" name="fh_blood_problems" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="137" name="bleeding_problems" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="138" name="allergies" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="139" name="frequent_illness" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="140" name="hiv" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="141" name="hai_status" nullable="true" remarks="" size="3" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_sdoh" numRows="0" remarks="Encounter form that holds results for the Social Determinants of Health Screening Tool" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="The user that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_soap" remarks="Holds Subjective, Objective, Assessment, and Plan (SOAP) notes" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="subjective" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="objective" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="assessment" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="plan" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="form_taskman" remarks="This table holds eye related tasks for providing care to the patient." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="ID" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="REQ_DATE" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="FROM_ID" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="TO_ID" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="PATIENT_ID" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="DOC_TYPE" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="DOC_ID" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="ENC_ID" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="METHOD" nullable="false" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="COMPLETED" nullable="true" remarks="1 = completed" size="1" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="COMPLETED_DATE" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="COMMENT" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="USERFIELD_1" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <primaryKey column="ID" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="ID"/>
         </index>
      </table>
      <table catalog="openemr" name="form_track_anything" numRows="0" remarks="Clinical note form that allows clinicians to provide point in time and longitudinal tracking of any data element they configure" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <child catalog="openemr" column="track_anything_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_track_anything_results"/>
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="name" nullable="false" remarks="The name of the type of the data element being tracked" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="procedure_type_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
      </table>
      <table catalog="openemr" name="form_track_anything_results" numRows="0" remarks="" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="comment" nullable="false" remarks="UNUSED" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="Surrogate ID of the result record used as the primary incrementing key" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="itemid" nullable="false" remarks="The data element that is being tracked for this result that is found in the form_track_anything_type table" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="notes" nullable="false" remarks="UNUSED" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="result" nullable="false" remarks="The user entered response for this data element being tracked" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="track_anything_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_track_anything"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="track_timestamp" nullable="false" remarks="The time this result was recorded" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="form_track_anything_type" numRows="0" remarks="Represents the category grouping / track of the data element being tracked via the track_anything form" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="active" nullable="false" remarks="1=The element is active and allows for data entry, 0=data entry is disabled and the element is not displayed to the user" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="description" nullable="false" remarks="Description of the data element type being tracked" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="name" nullable="false" remarks="The name of the type of the data element being tracked" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="parent" nullable="false" remarks="This is a reference to a parent form_track_anything_type element. 0=There is no parent, if !0 then it is the track_anything_type_id for the parent element" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="position" nullable="false" remarks="The order this element should be filled out in the track anything population mechanism" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="form_transfer_summary" numRows="0" remarks="Records transfer summary of care and is an alternative to recording referrals in the transactions table" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
      </table>
      <table catalog="openemr" name="form_treatment_plan" numRows="0" remarks="Patient treatment plan form" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="groupname" nullable="false" remarks="The groupname that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="The primary key which is the same as the forms.form_id column" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="The user that created this record." size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="form_vital_details" numRows="0" remarks="Record of a specific vital sign measurement, including its interpretation, and reason of the measurement" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="form_id" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="interpretation_list_id " nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="list_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="interpretation_option_id " nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="reason_status" nullable="false" remarks="Valid values are 'completed','negated','pending' or '' for none" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="form_vitals" remarks="Records of patient vital sign assessment" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="vitals_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation_form_vitals"/>
            <child catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_vital_details"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="bps" nullable="true" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="bpd" nullable="true" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="10" name="weight" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="11" name="height" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="12" name="temperature" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="temp_method" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="14" name="pulse" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="15" name="respiration" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="note" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="17" name="BMI" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="BMI_status" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="19" name="waist_circ" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="20" name="head_circ" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="21" name="oxygen_saturation" nullable="true" remarks="" size="6" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.000000" digits="6" id="22" name="oxygen_flow_rate" nullable="true" remarks="" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="external_id" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="24" name="ped_weight_height" nullable="true" remarks="" size="6" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="25" name="ped_bmi" nullable="true" remarks="" size="6" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="26" name="ped_head_circ" nullable="true" remarks="" size="6" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="27" name="inhaled_oxygen_concentration" nullable="true" remarks="" size="6" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="28" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_vitals_calculation" remarks="Main calculation records - one per logical calculation (e.g., average BP)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2">
            <child catalog="openemr" column="fvc_uuid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation_components"/>
            <child catalog="openemr" column="fvc_uuid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation_form_vitals"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="encounter" nullable="true" remarks="fk to form_encounter.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="pid" nullable="false" remarks="fk to patient_data.pid" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="date_start" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="date_end" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="created_at" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="updated_at" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="created_by" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="updated_by" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="calculation_id" nullable="true" remarks="application identifier representing calculation e.g., bp-MeanLast5, bp-Mean3Day, bp-MeanEncounter" size="64" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="uuid" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_calculation_id" unique="false">
            <column ascending="true" name="calculation_id"/>
         </index>
         <index name="idx_encounter" unique="false">
            <column ascending="true" name="encounter"/>
         </index>
         <index name="idx_pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
         <index name="unq_uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="form_vitals_calculation_components" remarks="Component values for calculations (e.g., systolic=120, diastolic=80)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="fvc_uuid" nullable="false" remarks="fk to form_vitals_calculation.uuid" size="16" type="BINARY" typeCode="-2">
            <parent catalog="openemr" column="uuid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="vitals_column" nullable="false" remarks="Component type: bps, bpd, pulse, etc." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="6" id="3" name="value" nullable="true" remarks="Calculated numeric component value" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="value_string" nullable="true" remarks="Calculated non-numeric component value" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="value_unit" nullable="true" remarks="Unit for this component value" size="16" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="component_order" nullable="false" remarks="Display order for components" size="10" type="INT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_component_order" unique="false">
            <column ascending="true" name="fvc_uuid"/>
            <column ascending="true" name="component_order"/>
         </index>
         <index name="idx_vitals_column" unique="false">
            <column ascending="true" name="vitals_column"/>
         </index>
         <index name="unq_fvc_component" unique="true">
            <column ascending="true" name="fvc_uuid"/>
            <column ascending="true" name="vitals_column"/>
         </index>
      </table>
      <table catalog="openemr" name="form_vitals_calculation_form_vitals" remarks="Join table between form_vitals_calculation and form_vitals table representing the derivative observation relationship between the calculation and the source records" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="fvc_uuid" nullable="false" remarks="fk to form_vitals_calculation.uuid" size="16" type="BINARY" typeCode="-2">
            <parent catalog="openemr" column="uuid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="vitals_id" nullable="false" remarks="fk to form_vitals.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals"/>
         </column>
         <primaryKey column="fvc_uuid" sequenceNumberInPK="1"/>
         <primaryKey column="vitals_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="fvc_uuid"/>
            <column ascending="true" name="vitals_id"/>
         </index>
      </table>
      <table catalog="openemr" name="forms" remarks="Patient chart forms that are connected to a patient's encounter visit. Serves as the base record containing all of the common form encounter properties where each sub-type form has data records contained in a table that is named CONCAT('form_',formdir)" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="forms_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_physical_exam"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="Date of the form" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="encounter" nullable="true" remarks="ID of the associated encounter" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="form_name" nullable="true" remarks="Name of the form" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="form_id" nullable="true" remarks="ID of the specific form instance" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_group_attendance"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_clinic_note"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_gad7"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_note"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_painmap"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_phq9"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_prior_auth"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_sdoh"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_track_anything"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_transfer_summary"/>
            <child catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_treatment_plan"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="user" nullable="true" remarks="User responsible for creating this form." size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="groupname" nullable="true" remarks="The groupname that created this record." size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="authorized" nullable="true" remarks="Authorization status" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="deleted" nullable="false" remarks="Flag indicating if the form has been deleted" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="formdir" nullable="true" remarks="Directory name of where the form exists in the filesystem.  Also is the suffix name of the sub-type form that holds the individual form data for this form.  The full table name is CONCAT('form_',formdir)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="therapy_group_id" nullable="true" remarks="ID of the therapy group that this form's encounter session is connected to" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="issue_id" nullable="false" remarks="References lists.id to identify the medical issue this form is connected to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="provider_id" nullable="false" remarks="References users.id to identify the provider who is responsible for or involved in the healthcare this form relates to.  This field is only populated in some types of procedure order forms and when a form is a dynamic Layout Based Form (LBF)" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="form_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="form_id" unique="false">
            <column ascending="true" name="form_id"/>
         </index>
         <index name="pid_encounter" unique="false">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="encounter"/>
         </index>
      </table>
      <table catalog="openemr" name="groups" remarks="Represent groups of users in the system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key." size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="name" nullable="true" remarks="The name of the group." size="2147483647" type="LONGTEXT" typeCode="-1">
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_group_attendance"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_questionnaire_assessments"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_aftercare_plan"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_ankleinjury"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_bronchitis"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_category"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_item"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_gad7"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_painmap"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_phq9"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_sdoh"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_treatment_plan"/>
            <child catalog="openemr" column="groupname" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pnotes"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="user" nullable="true" remarks="The username of the user that belongs to this group." size="2147483647" type="LONGTEXT" typeCode="-1">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="name" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="history_data" remarks="Contains patient eating,sleeping,drinking,drug habits as well as other patient health history information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="coffee" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="tobacco" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="alcohol" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="sleep_patterns" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="exercise_patterns" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="seatbelt_use" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="counseling" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="hazardous_activities" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="recreational_drugs" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="last_breast_exam" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="last_mammogram" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="last_gynocological_exam" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="last_rectal_exam" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="last_prostate_exam" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="last_physical_exam" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="last_sigmoidoscopy_colonoscopy" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="last_ecg" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="last_cardiac_echo" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="last_retinal" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="last_fluvax" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="last_pneuvax" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="last_ldl" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="last_hemoglobin" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="last_psa" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="last_exam_results" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="history_mother" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="dc_mother" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="history_father" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="dc_father" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="history_siblings" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="dc_siblings" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="history_offspring" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="dc_offspring" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="history_spouse" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="dc_spouse" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="relatives_cancer" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="relatives_tuberculosis" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="relatives_diabetes" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="relatives_high_blood_pressure" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="relatives_heart_problems" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="relatives_stroke" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="relatives_epilepsy" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="relatives_mental_illness" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="relatives_suicide" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="cataract_surgery" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="tonsillectomy" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="cholecystestomy" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="49" name="heart_surgery" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="50" name="hysterectomy" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="51" name="hernia_repair" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="52" name="hip_replacement" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="53" name="knee_replacement" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="54" name="appendectomy" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="55" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="56" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="57" name="name_1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="58" name="value_1" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="59" name="name_2" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="60" name="value_2" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="61" name="additional_history" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="62" name="exams" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="63" name="usertext11" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="64" name="usertext12" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="65" name="usertext13" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="66" name="usertext14" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="67" name="usertext15" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="68" name="usertext16" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="69" name="usertext17" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="70" name="usertext18" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="71" name="usertext19" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="72" name="usertext20" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="73" name="usertext21" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="74" name="usertext22" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="75" name="usertext23" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="76" name="usertext24" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="77" name="usertext25" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="78" name="usertext26" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="79" name="usertext27" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="80" name="usertext28" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="81" name="usertext29" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="82" name="usertext30" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="83" name="userdate11" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="84" name="userdate12" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="85" name="userdate13" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="86" name="userdate14" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="87" name="userdate15" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="88" name="userarea11" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="89" name="userarea12" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="90" name="created_by" nullable="true" remarks="The user that created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="immunization_observation" remarks="Individual observations for a specific immunization" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="imo_id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="imo_im_id" nullable="false" remarks="The immunization record this observation is part of" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="imo_pid" nullable="true" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="imo_criteria" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="imo_criteria_value" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="imo_user" nullable="true" remarks="The user that is recording the observation for this immunization" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="imo_code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="imo_codetext" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="imo_codetype" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="imo_vis_date_published" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="imo_vis_date_presented" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="11" name="imo_date_observation" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <primaryKey column="imo_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="imo_id"/>
         </index>
      </table>
      <table catalog="openemr" name="immunizations" remarks="Patient Immunizations" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="imo_im_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunization_observation"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="patient_id" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="administered_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="immunization_id" nullable="true" remarks="Comes from the list_options.list_id='immunizations' and represents common list of immunizations the EMR works with" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="cvx_code" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="manufacturer" nullable="true" remarks="Comes from the list_options.list_id='Immunization_Manufacturer' and represents a list of immunization manufacturers" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="lot_number" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="administered_by_id" nullable="true" remarks="The person that administered the immunization" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="administered_by" nullable="true" remarks="Alternative to administered_by_id" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="education_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="vis_date" nullable="true" remarks="Date of VIS Statement" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="note" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="create_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="update_date" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="created_by" nullable="true" remarks="The user that created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="updated_by" nullable="true" remarks="The user that last updated this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="amount_administered" nullable="true" remarks="" size="12" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="amount_administered_unit" nullable="true" remarks="Comes from the list_options.list_id='drug_units' and represents the units of drug administered" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="expiration_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="route" nullable="true" remarks="Comes from the list_options.list_id='drug_route' and represents a list of immunization manufacturers" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="administration_site" nullable="true" remarks="Comes from the list_options.list_id='immunization_administered_site' and represents the body sites where the immunization can be administered" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="22" name="added_erroneously" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="external_id" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="completion_status" nullable="true" remarks="Comes from the list_options.list_id='Immunization_Completion_Status' and represents the status of the immunization" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="information_source" nullable="true" remarks="Comes from the list_options.list_id='immunization_informationsource' and represents where the source of information the immmunization is coming from originates" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="refusal_reason" nullable="true" remarks="Comes from the list_options.list_id='immunization_refusal_reason' and represents the reasons the individual refused immunization" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="ordering_provider" nullable="true" remarks="The provider that issued the order to administer this immunization" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="reason_code" nullable="true" remarks="Medical code explaining reason of the vital observation value in form codesystem:codetype;...;" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="reason_description" nullable="true" remarks="Human readable text description of the reason_code column" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="encounter_id" nullable="true" remarks="The encounter where this immunization was administered" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="patient_id" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="insurance_companies" remarks="Insurance company" type="TABLE">
         <column autoUpdated="false" defaultValue="0" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="payer_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
            <child catalog="openemr" column="payer_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="provider_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="payer_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="claims"/>
            <child catalog="openemr" column="provider" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="attn" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="cms_id" nullable="true" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="ins_type_code" nullable="true" remarks="The type of insurance company this record is" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_type_codes"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="x12_receiver_id" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="x12_default_partner_id" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="alt_cms_id" nullable="true" remarks="" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="inactive" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="eligibility_id" nullable="true" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="x12_default_eligibility_id" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="cqm_sop" nullable="true" remarks="HL7 Source of Payment for eCQMs" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="13" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="14" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="insurance_data" remarks="Patient Insurance information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="insurance_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="eligibility_verification"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="type" nullable="true" remarks="" size="9" type="enum('primary', 'secondary', 'tertiary')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="provider" nullable="true" remarks="The insurance company that insures the patient" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_companies"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="plan_name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="policy_number" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="group_number" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="subscriber_lname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="subscriber_mname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="subscriber_fname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="subscriber_relationship" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="subscriber_ss" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="subscriber_DOB" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="subscriber_street" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="subscriber_postal_code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="subscriber_city" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="subscriber_state" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="subscriber_country" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="subscriber_phone" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="subscriber_employer" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="subscriber_employer_street" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="subscriber_employer_postal_code" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="subscriber_employer_state" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="subscriber_employer_country" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="subscriber_employer_city" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="copay" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="27" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="subscriber_sex" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'TRUE'" digits="0" id="29" name="accept_assignment" nullable="false" remarks="" size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="30" name="policy_type" nullable="false" remarks="Whether this is the 'primary', 'secondary', or 'tertiary' insurance" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="subscriber_street_line_2" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="subscriber_employer_street_line_2" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="date_end" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid_type_date" unique="true">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="type"/>
            <column ascending="true" name="date"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="insurance_type_codes" numRows="26" remarks="Contains a list of different insurance types or categories that an insurance company is related to.  This type includes both public and private payer types" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="ins_type_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_companies"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="type" nullable="false" remarks="" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="claim_type" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="issue_encounter" numRows="0" remarks="Links patient medical issues in the lists table with patient service encounters" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="encounter" nullable="false" remarks="References form_encounter.encounter, representing the encounter that is connected to the issue" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="list_id" nullable="false" remarks="Represents the specific medical issue (allergy,surgery,etc) this encounter is linked to" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="pid" nullable="false" remarks="The internal patient identifier" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="resolved" nullable="false" remarks="0=Issue not resolved,1=Issue is resolved" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="updated_by" nullable="false" remarks="" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
      </table>
      <table catalog="openemr" name="issue_types" numRows="13" remarks="Contains the list of issue types that medical health issue can be." type="TABLE">
         <column autoUpdated="false" defaultValue="1" digits="0" id="0" name="active" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="1" name="category" nullable="false" remarks="" size="75" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="type" nullable="false" remarks="" size="75" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="plural" nullable="false" remarks="" size="75" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="singular" nullable="false" remarks="" size="75" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="abbreviation" nullable="false" remarks="" size="75" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="style" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="force_show" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="ordering" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="'patients|med'" digits="0" id="9" name="aco_spec" nullable="false" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <primaryKey column="category" sequenceNumberInPK="1"/>
         <primaryKey column="type" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="category"/>
            <column ascending="true" name="type"/>
         </index>
      </table>
      <table catalog="openemr" name="layout_group_properties" numRows="27" remarks="Record of the grouped fields used in dynamic layout based forms (LBF)" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="grp_form_id" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="1" name="grp_group_id" nullable="false" remarks="empty when representing the whole form" size="31" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="grp_title" nullable="false" remarks="descriptive name of the form or group" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="grp_subtitle" nullable="false" remarks="for display under the title" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="grp_mapping" nullable="false" remarks="the form category" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="grp_seq" nullable="false" remarks="optional order within mapping" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="grp_activity" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="grp_repeats" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="grp_columns" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="grp_size" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="grp_issue_type" nullable="false" remarks="" size="75" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="grp_aco_spec" nullable="false" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="grp_save_close" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="grp_init_open" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="grp_referrals" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="grp_unchecked" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="16" name="grp_services" nullable="false" remarks="" size="4095" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="17" name="grp_products" nullable="false" remarks="" size="4095" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="18" name="grp_diags" nullable="false" remarks="" size="4095" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="grp_last_update" nullable="true" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <primaryKey column="grp_form_id" sequenceNumberInPK="1"/>
         <primaryKey column="grp_group_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="grp_form_id"/>
            <column ascending="true" name="grp_group_id"/>
         </index>
      </table>
      <table catalog="openemr" name="layout_options" numRows="190" remarks="Holds the layout settings for a specific dynamic field in the system" type="TABLE">
         <column autoUpdated="false" defaultValue="''" digits="0" id="0" name="form_id" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="grp_form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_group_properties"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="1" name="field_id" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="field_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lbf_data"/>
            <child catalog="openemr" column="field_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lbt_data"/>
            <child catalog="openemr" column="field_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="shared_attributes"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="group_id" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="grp_group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_group_properties"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="title" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="seq" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="data_type" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="6" name="uor" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="15" digits="0" id="7" name="fld_length" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="max_length" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="list_id" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="titlecols" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="datacols" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="12" name="default_value" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="13" name="edit_options" nullable="false" remarks="" size="36" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="fld_rows" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="16" name="list_backup_id" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'F'" digits="0" id="17" name="source" nullable="false" remarks="F=Form, D=Demographics, H=History, E=Encounter" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="conditions" nullable="true" remarks="serialized array of skip conditions" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="validation" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="20" name="codes" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="form_id" sequenceNumberInPK="1"/>
         <primaryKey column="field_id" sequenceNumberInPK="2"/>
         <primaryKey column="seq" sequenceNumberInPK="3"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="form_id"/>
            <column ascending="true" name="field_id"/>
            <column ascending="true" name="seq"/>
         </index>
      </table>
      <table catalog="openemr" name="lbf_data" remarks="Dynamic Field values that are part of the following forms: Demographics, Facility Specific User Information, History Form, and custom dynamically generated encounter forms" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="form_id" nullable="false" remarks="references forms.form_id" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="transactions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="field_id" nullable="false" remarks="references layout_options.field_id" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="field_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="field_value" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="form_id" sequenceNumberInPK="1"/>
         <primaryKey column="field_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="form_id"/>
            <column ascending="true" name="field_id"/>
         </index>
      </table>
      <table catalog="openemr" name="lbt_data" remarks="Dynamic Field values that an installation can use to extend the data stored in the transactions table" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="form_id" nullable="false" remarks="references transactions.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="transactions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="field_id" nullable="false" remarks="references layout_options.field_id" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="field_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="field_value" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="form_id" sequenceNumberInPK="1"/>
         <primaryKey column="field_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="form_id"/>
            <column ascending="true" name="field_id"/>
         </index>
      </table>
      <table catalog="openemr" name="list_options" numRows="5605" remarks="Contains lists of unique value sets that a record's property can be.  Individual values/options in the list may be linked to a specific codesystem" type="TABLE">
         <column autoUpdated="false" defaultValue="''" digits="0" id="0" name="list_id" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="interpretation_list_id " foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_vital_details"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="1" name="option_id" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="amendment_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="amendments"/>
            <child catalog="openemr" column="amendment_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="amendments"/>
            <child catalog="openemr" column="adjustment_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
            <child catalog="openemr" column="payment_method" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
            <child catalog="openemr" column="payment_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
            <child catalog="openemr" column="chargecat" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="relationship" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="contact_relation"/>
            <child catalog="openemr" column="role" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="contact_relation"/>
            <child catalog="openemr" column="system" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="contact_telecom"/>
            <child catalog="openemr" column="use" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="contact_telecom"/>
            <child catalog="openemr" column="pharmacy_supply_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drug_sales"/>
            <child catalog="openemr" column="care_plan_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_care_plan"/>
            <child catalog="openemr" column="plan_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_care_plan"/>
            <child catalog="openemr" column="clinical_notes_category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_clinical_notes"/>
            <child catalog="openemr" column="clinical_notes_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_clinical_notes"/>
            <child catalog="openemr" column="childcare_needs" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="digital_access" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="disability_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="financial_strain" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="food_insecurity" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="housing_instability" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="hunger_q1" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="hunger_q2" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="interpersonal_safety" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="postpartum_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="pregnancy_intent" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="pregnancy_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="screening_tool" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="social_isolation" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="transportation_insecurity" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="utilities_insecurity" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="ob_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_questionnaire_assessments"/>
            <child catalog="openemr" column="administration_site" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="amount_administered_unit" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="completion_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="immunization_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="information_source" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="manufacturer" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="refusal_reason" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="route" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="list_option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="occurrence" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="outcome" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="reaction" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="severity_al" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="subtype" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="verification" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="medication_adherence" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="medication_adherence_information_source" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="request_intent" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="usage_category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="amendment_note" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="amendments_history"/>
            <child catalog="openemr" column="amendment_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="amendments_history"/>
            <child catalog="openemr" column="status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team"/>
            <child catalog="openemr" column="role" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="contact_address"/>
            <child catalog="openemr" column="use" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="contact_address"/>
            <child catalog="openemr" column="industry" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="employer_data"/>
            <child catalog="openemr" column="occupation" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="employer_data"/>
            <child catalog="openemr" column="interpretation_option_id " foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_vital_details"/>
            <child catalog="openemr" column="pc_apptstatus" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="pc_room" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="observation_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_care_experience_preferences"/>
            <child catalog="openemr" column="interpreter_needed" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="sex_identified" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="tribal_affiliations" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="due_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_reminders"/>
            <child catalog="openemr" column="reason_inactivated" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_reminders"/>
            <child catalog="openemr" column="room" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker_element"/>
            <child catalog="openemr" column="status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker_element"/>
            <child catalog="openemr" column="observation_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_treatment_intervention_preferences"/>
            <child catalog="openemr" column="message_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pnotes"/>
            <child catalog="openemr" column="request_intent" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="route" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="usage_category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="billing_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="order_intent" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="order_priority" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="order_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="performer_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="procedure_order_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="procedure_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="specimen_location" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="specimen_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="report_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_report"/>
            <child catalog="openemr" column="collection_method_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
            <child catalog="openemr" column="condition_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
            <child catalog="openemr" column="specimen_location_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
            <child catalog="openemr" column="specimen_type_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
            <child catalog="openemr" column="procedure_type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_type"/>
            <child catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_repository"/>
            <child catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_action_item"/>
            <child catalog="openemr" column="item" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_action_item"/>
            <child catalog="openemr" column="meeting_patient_status" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_participant_attendance"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="title" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="seq" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="is_default" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="option_value" nullable="false" remarks="" size="12" type="FLOAT" typeCode="7"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="mapping" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="8" name="codes" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="toggle_setting_1" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="toggle_setting_2" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="activity" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="12" name="subtype" nullable="false" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="13" name="edit_options" nullable="false" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="14" name="timestamp" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="15" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="list_id" sequenceNumberInPK="1"/>
         <primaryKey column="option_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="list_id"/>
            <column ascending="true" name="option_id"/>
         </index>
      </table>
      <table catalog="openemr" name="lists" remarks="Patient issues list including allergies, medical problems, medications, medical devices, surgeries, and dental issues. Type of issue is in the type column." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Primary identifier of the record" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="list_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
            <child catalog="openemr" column="health_concern_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh_health_concerns"/>
            <child catalog="openemr" column="issue_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
            <child catalog="openemr" column="list_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="list_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="issue_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="date" nullable="true" remarks="Date the issue was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="type" nullable="true" remarks="The type of the issue (allergy, medication, etc) where the issue_types.category='default'" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="type" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="issue_types"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="subtype" nullable="false" remarks="The sub type of the issue where the list_options.list_id='issue_subtypes'" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="title" nullable="true" remarks="The human readable description of the issue" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="udi" nullable="true" remarks="The unique device identifier.  Populated if the issue is of type medical_device" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="udi_data" nullable="true" remarks="The JSON serialized medical device as returned from the https://accessgudid.nlm.nih.gov/api/v2/devices/lookup.json api.  Populated if the issue is of type medical_device" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="begdate" nullable="true" remarks="The beginning date for when this issue occurred as reported by the patient or the provider" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="enddate" nullable="true" remarks="The end date for when this issue occurred as reported by the patient or the provider" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="returndate" nullable="true" remarks="UNUSED - will be removed in the future" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="occurrence" nullable="true" remarks="Comes from the list_options.list_id='occurrence' and is the frequency that this issue occurs for the patient" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="classification" nullable="true" remarks="UNUSED - will be removed in the future" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="referredby" nullable="true" remarks="The human readable name of Referring physician and practice" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="extrainfo" nullable="true" remarks="UNUSED - will be removed in the future" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="diagnosis" nullable="true" remarks="The diagnosis of the issue.  Format is a text string in the format of 'system:code[;system:code2;system:coden]'" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="activity" nullable="true" remarks="Value of 0 means the record has been deleted, 1 means the record is active in the system" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="comments" nullable="true" remarks="Human readable additional notes/comments of the issue" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="user" nullable="true" remarks="The user that created or last updated this issue" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="groupname" nullable="true" remarks="The user group that created or last updated this issue" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="outcome" nullable="false" remarks="Comes from the list_options.list_id='outcome' and represents the outcome of the issue" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="destination" nullable="true" remarks="Human readable name of GP, Secondary care specialist, etc." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="23" name="reinjury_id" nullable="false" remarks="UNUSED - will be removed in the future" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="24" name="injury_part" nullable="false" remarks="UNUSED - will be removed in the future" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="25" name="injury_type" nullable="false" remarks="UNUSED - will be removed in the future" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="26" name="injury_grade" nullable="false" remarks="UNUSED - will be removed in the future" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="27" name="reaction" nullable="false" remarks="Comes from the list_options.list_id='reaction' and represents the reaction of the patient to the allergy" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="28" name="verification" nullable="false" remarks="Comes from the list_options.list_id='allergyintolerance-verification' and represents the confirmation status of the allergy" size="36" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="external_allergyid" nullable="true" remarks="An identifier for an allergy from an external eRx system" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="30" name="erx_source" nullable="false" remarks="O if the allergy issue originated in OpenEMR, 1 if the allergy issue originated in an external system" size="1" type="enum('0', '1')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="31" name="erx_uploaded" nullable="false" remarks="O if allergy is still waiting to be uploaded to an external system (such as eRX), 1 if the allergy issue has been successfully received by the eRX system" size="1" type="enum('0', '1')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="32" name="modifydate" nullable="false" remarks="The date the issue record was last modified" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="severity_al" nullable="true" remarks="Comes from the list_options.list_id='severity_ccda' and represents the severity of the allergic reaction of the patient to the allergy" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="external_id" nullable="true" remarks="UNUSED - will be removed in the future" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="list_option_id" nullable="true" remarks="Comes from the list_options.list_id=CONCAT(lists.type,'_issue_list') and represents the prefilled list option id that was chosen as a template to create this issue" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
         <index name="type" unique="false">
            <column ascending="true" name="type"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="lists_medication" remarks="Holds additional data about patient medications." type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="created_by" nullable="false" remarks="The user that created this record" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="list_id" nullable="true" remarks="The internal lists identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="drug_dosage_instructions" nullable="true" remarks="Free text dosage instructions for taking the drug" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="usage_category" nullable="true" remarks="Comes from the list_options.list_id='medication-usage-category'" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="usage_category_title" nullable="false" remarks="title in list_options.list_id=medication-usage-category" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="request_intent" nullable="true" remarks="Comes from the list_options.list_id='medication-request-intent'" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="request_intent_title" nullable="false" remarks="title in list_options.list_id=medication-request-intent" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="medication_adherence_information_source" nullable="true" remarks="fk to list_options.option_id where list_id=medication_adherence_information_source to indicate who provided the medication adherence information" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="medication_adherence" nullable="true" remarks="fk to list_options.option_id where list_id=medication_adherence to indicate if patient is complying with medication regimen" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="medication_adherence_date_asserted" nullable="true" remarks="Date when the medication adherence information was asserted" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="prescription_id" nullable="true" remarks="The internal prescription identifier that originated this medication issue" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="is_primary_record" nullable="true" remarks="Indicates if this medication is a primary record(1) or a reported record(0)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="reporting_source_record_id" nullable="true" remarks="If this is a reported record, this is the fk to the users.id column for the address book user that the medication was reported by" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="lists_med_request_intent_idx" unique="false">
            <column ascending="true" name="request_intent"/>
         </index>
         <index name="lists_med_usage_category_idx" unique="false">
            <column ascending="true" name="usage_category"/>
         </index>
         <index name="lists_medication_list_idx" unique="false">
            <column ascending="true" name="list_id"/>
         </index>
      </table>
      <table catalog="openemr" name="medex_recalls" remarks="Tracks Patient Recalls.  Recalls are when a patient should be reached out to or contacted for a healthcare followup." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="r_ID" nullable="false" remarks="Unique ID for the recall record" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="r_PRACTID" nullable="false" remarks="UNUSED - Practice ID associated with the recall" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="r_pid" nullable="false" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="r_eventDate" nullable="false" remarks="Date of Appointment or Recall" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="r_facility" nullable="false" remarks="FK facility.id associated with the recall" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="r_provider" nullable="false" remarks="Provider ID associated with the recall FK to users.id" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="r_reason" nullable="true" remarks="Reason for the recall" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="7" name="r_created" nullable="false" remarks="Timestamp when the recall was created" size="19" type="TIMESTAMP" typeCode="93"/>
         <primaryKey column="r_ID" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="r_ID"/>
         </index>
         <index name="r_PRACTID" unique="true">
            <column ascending="true" name="r_PRACTID"/>
            <column ascending="true" name="r_pid"/>
         </index>
      </table>
      <table catalog="openemr" name="notes" numRows="0" remarks="Clinical notes and comments for individual patient documents" schema="openemr" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="date" nullable="false" remarks="Date and time the note was created" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="foreign_id" nullable="false" remarks="The documents.id key for the document this note is connected to" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="note" nullable="false" remarks="The notes or comments for the document referenced in foreign_id" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="owner" nullable="false" remarks="Foreign key identifier to users of who initially created this note" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="revision" nullable="false" remarks="UNUSED" size="0" type="Unknown" typeCode="12"/>
      </table>
      <table catalog="openemr" name="onsite_documents" remarks="Digital documents that have been assigned to a patient from a document_template that the patient has saved or submitted for review by clinical staff" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="20" type="BIGINT UNSIGNED" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="facility" nullable="true" remarks="" size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="provider" nullable="true" remarks="" size="10" type="INT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="encounter" nullable="true" remarks="" size="10" type="INT UNSIGNED" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="5" name="create_date" nullable="false" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="doc_type" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="patient_signed_status" nullable="false" remarks="" size="5" type="SMALLINT UNSIGNED" typeCode="5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="patient_signed_time" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="authorize_signed_time" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="accept_signed_status" nullable="false" remarks="" size="5" type="SMALLINT" typeCode="5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="authorizing_signator" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="review_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="denial_reason" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="authorized_signature" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="patient_signature" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="full_document" nullable="true" remarks="" size="16777215" type="MEDIUMBLOB" typeCode="-4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="file_name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="file_path" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="template_data" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="user" nullable="false" remarks="User who created the esignature" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="onsite_mail" remarks="Patient asynchronous messages to and from clinical staff" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="Date and time of the message" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="owner" nullable="true" remarks="Owner of the message. If this is a message intended for a patient this will be the patient_data.pid if it is for a user this will be the users.id" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="user" nullable="true" remarks="User associated with the message" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="groupname" nullable="true" remarks="Name of the group associated with the message" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="activity" nullable="true" remarks="Activity associated with the message. 0=deleted, 1=message is active" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="authorized" nullable="true" remarks="Authorization status of the message" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="header" nullable="true" remarks="Header of the message" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="title" nullable="true" remarks="Title of the message" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="body" nullable="true" remarks="Body of the message" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="recipient_id" nullable="true" remarks="ID of the message recipient. If a patient is sending this message to a user this will be the users.id, otherwise it is i the patient_data.pid" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="recipient_name" nullable="true" remarks="Name of the message recipient. This will be the first and last name of the recipient." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="sender_id" nullable="true" remarks="ID of the message sender.  If a patient is sending this message to a user this will be the patient_data.pid, otherwise it is the users.id" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="sender_name" nullable="true" remarks="Name of the message sender" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="assigned_to" nullable="true" remarks="Assignment information for the message" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="deleted" nullable="true" remarks="Flag indicating whether the mail is deleted" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="delete_date" nullable="true" remarks="Date and time when the message was deleted" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="mtype" nullable="true" remarks="Message type ('Notification', 'Message')" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'New'" digits="0" id="18" name="message_status" nullable="false" remarks="Status of the message ('Done','New')" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="mail_chain" nullable="true" remarks="Mail chain ID" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="reply_mail_chain" nullable="true" remarks="Reply mail chain ID" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="is_msg_encrypted" nullable="true" remarks="Whether the message is encrypted (0-Not encrypted, 1-Encrypted)" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="owner"/>
         </index>
      </table>
      <table catalog="openemr" name="onsite_messages" remarks="Patient secure chat messages to and from clinical staff for real time communication" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate ID of the message record" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="username" nullable="false" remarks="Username associated with the message sender  This will be the patient's portal username if a patient sent the message.  Otherwise it is the user's username if a user sent the message." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="message" nullable="true" remarks="The content of the chat message" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="ip" nullable="false" remarks="IP address of the sender.  Empty on export" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="date" nullable="false" remarks="Timestamp of when the message was sent" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="sender_id" nullable="true" remarks="ID of the message sender.  This will be the patient_data.pid if a patient sent the message.  Otherwise it is the users.id if a user sent the message." size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="recip_id" nullable="false" remarks="JSON array of message recipients.  If the message is being sent to one or more clinical staff it will be a JSON array of the usernames from the users table.  If a user sends the message it will be a JSON array of one or more patient_data.pid ids.  On EHI export this array is filtered to only include patient_data.pids that are in the the specific export task.  These messages will be duplicated if patients are in different export tasks but received the same message." size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="onsite_portal_activity" remarks="Patient portal activity (document submission, and other activities) that requires review before they are accepted into the patient chart" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="patient_id" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="activity" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="require_audit" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="pending_action" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="action_taken" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="status" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="narrative" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="table_action" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="table_args" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="action_user" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="action_taken_time" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="checksum" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="date" unique="false">
            <column ascending="true" name="date"/>
         </index>
      </table>
      <table catalog="openemr" name="onsite_signatures" remarks="Patient portal digital signatures used for patient documents and anywhere else a signature is required in the portal" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="'waiting'" digits="0" id="1" name="status" nullable="false" remarks="" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="type" nullable="false" remarks="witness-signature" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="created" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="lastmod" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="encounter" nullable="true" remarks="" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="user" nullable="true" remarks="User who created the esignature.  If the signature is a staff member (administrator/witness) it will come from the users.username.  If it is a patient signature the value will be '-patient-'" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="activity" nullable="false" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="signator" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="sig_image" nullable="true" remarks="The image of the signature as a Data URI created from a browser Canvas object representing an image/png image of the signature" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="signature" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="sig_hash" nullable="false" remarks="sha3-512 hash of the sig_image" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="ip" nullable="false" remarks="" size="46" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="signer" nullable="false" remarks="If type=witness-signature signer will be 'Witness Signature' if type='admin-signature' then signer will be the Username of the clinical staff member that signed, if type='patient-signature' then the value will be the patient's name" size="0" type="Unknown" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="encounter" unique="false">
            <column ascending="true" name="encounter"/>
         </index>
         <index name="pid" unique="true">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="user"/>
         </index>
      </table>
      <table catalog="openemr" name="openemr_postcalendar_categories" numRows="15" remarks="Contains the types / categories a patient scheduled appointment can be" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="pc_catid" nullable="false" remarks="Auto-incremented identifier for the appointment category" size="10" type="INT UNSIGNED" typeCode="4">
            <child catalog="openemr" column="pc_catid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="pc_catid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="pc_prefcatid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pc_constant_id" nullable="true" remarks="Identifier for the appointment category which is referenced in the codebase for appointment specific functionality" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="pc_catname" nullable="true" remarks="Name of the appointment category" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="pc_catcolor" nullable="true" remarks="Visual display color associated with the appointment category" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="pc_catdesc" nullable="true" remarks="Description of the appointment category" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="pc_recurrtype" nullable="false" remarks="Type of recurring appointment 0=Not recurring,1=Recurring appointment" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="pc_enddate" nullable="true" remarks="End date of the appointment" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="pc_recurrspec" nullable="true" remarks="Specification for recurring appointments in php array serialized format. Includes information on the repeating frequency, the type of repeat (daily, weekday,week,monthly, etc)" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="pc_recurrfreq" nullable="false" remarks="Frequency of recurring appointments" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="pc_duration" nullable="false" remarks="Duration of the appointment in seconds" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="pc_end_date_flag" nullable="false" remarks="Flag indicating the use of an end date for the appointment" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="pc_end_date_type" nullable="true" remarks="Type of end date for the appointment" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="pc_end_date_freq" nullable="false" remarks="Frequency of the end date" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="pc_end_all_day" nullable="false" remarks="Flag indicating if the end date is all-day" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="14" name="pc_dailylimit" nullable="false" remarks="Limit on daily appointments for the category" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="pc_cattype" nullable="false" remarks="Type of category used in grouping categories" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="pc_active" nullable="false" remarks="Flag indicating the category is active" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="pc_seq" nullable="false" remarks="Sequence number for the category" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="'encounters|notes'" digits="0" id="18" name="aco_spec" nullable="false" remarks="Access control for the category.  Empty on export" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="19" name="pc_last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="pc_catid" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="pc_catid"/>
         </index>
         <index name="basic_cat" unique="false">
            <column ascending="true" name="pc_catname"/>
            <column ascending="true" name="pc_catcolor"/>
         </index>
         <index name="pc_constant_id" unique="true">
            <column ascending="true" name="pc_constant_id"/>
         </index>
      </table>
      <table catalog="openemr" name="openemr_postcalendar_events" remarks="Holds records for Patient Appointment/Calendar information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="pc_eid" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="10" type="INT UNSIGNED" typeCode="4">
            <child catalog="openemr" column="appt_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="eid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="pc_catid" nullable="false" remarks="The appointment category" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pc_catid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pc_multiple" nullable="false" remarks="Multiple occurrences of the event. Used if this is a recurring appointment." size="10" type="INT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="pc_aid" nullable="true" remarks="The provider this appointment is connected to" size="30" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="pc_pid" nullable="true" remarks="The internal patient identifier" size="11" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="pc_gid" nullable="true" remarks="The therapy group id this appointment is for" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="pc_title" nullable="true" remarks="Title of the event" size="150" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="pc_time" nullable="true" remarks="Time of the event" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="pc_hometext" nullable="true" remarks="Description of the event" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="9" name="pc_comments" nullable="true" remarks="Comments associated with the event" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="pc_counter" nullable="true" remarks="Event counter" size="8" type="MEDIUMINT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="11" name="pc_topic" nullable="false" remarks="Topic id of the event" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="pc_informant" nullable="true" remarks="User creating the event" size="20" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="pc_eventDate" nullable="false" remarks="Date of the event" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="pc_endDate" nullable="true" remarks="End date of the event" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="pc_duration" nullable="false" remarks="Duration of the event" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="16" name="pc_recurrtype" nullable="false" remarks="Recurrence type of the event" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="pc_recurrspec" nullable="true" remarks="Recurrence specification of the event" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="18" name="pc_recurrfreq" nullable="false" remarks="Recurrence frequency of the event" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="pc_startTime" nullable="true" remarks="Start time of the event" size="10" type="TIME" typeCode="92"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="pc_endTime" nullable="true" remarks="End time of the event" size="10" type="TIME" typeCode="92"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="pc_alldayevent" nullable="false" remarks="Indicates if the event is an all-day event" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="pc_location" nullable="true" remarks="Location of the event" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="pc_conttel" nullable="true" remarks="Contact telephone number" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="pc_contname" nullable="true" remarks="Contact name" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="pc_contemail" nullable="true" remarks="Contact email address" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="pc_website" nullable="true" remarks="Website associated with the event" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="pc_fee" nullable="true" remarks="Event fee" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="28" name="pc_eventstatus" nullable="false" remarks="Event status -1=hidden,0=queued,1=approved" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="29" name="pc_sharing" nullable="false" remarks="Sharing status of the event" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="pc_language" nullable="true" remarks="Language of the event" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'-'" digits="0" id="31" name="pc_apptstatus" nullable="false" remarks="Comes from the list_options.list_id='apptstat' if it is a single patient appointment OR list_options.list_id='groupstat' if this is a group appointment. It represents the current appointment status checked in, checked out, waiting, etc" size="15" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="32" name="pc_prefcatid" nullable="false" remarks="Preferred category id for a provider available slot" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pc_catid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_categories"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="33" name="pc_facility" nullable="false" remarks="The facility for where the service for this appointment will be rendered" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="'NO'" digits="0" id="34" name="pc_sendalertsms" nullable="false" remarks="Send SMS alerts for the event" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'NO'" digits="0" id="35" name="pc_sendalertemail" nullable="false" remarks="Send email alerts for the event" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="36" name="pc_billing_location" nullable="false" remarks="Billing facility location of the event" size="5" type="SMALLINT" typeCode="5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="37" name="pc_room" nullable="false" remarks="Comes from the list_options.list_id='patient_flow_board_rooms' and represents the facility room that the patient has been assigned to for this appointment if one has been assigned" size="20" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <primaryKey column="pc_eid" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="pc_eid"/>
         </index>
         <index name="basic_event" unique="false">
            <column ascending="true" name="pc_catid"/>
            <column ascending="true" name="pc_aid"/>
            <column ascending="true" name="pc_eventDate"/>
            <column ascending="true" name="pc_endDate"/>
            <column ascending="true" name="pc_eventstatus"/>
            <column ascending="true" name="pc_sharing"/>
            <column ascending="true" name="pc_topic"/>
         </index>
         <index name="pc_eventDate" unique="false">
            <column ascending="true" name="pc_eventDate"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_access_onsite" remarks="Holds patient portal onsite credentials, username information and login meta information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="portal_username" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="portal_pwd" nullable="true" remarks="Hash of the patient password.  Empty for export." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="portal_pwd_status" nullable="true" remarks="0=&gt;Password Created Through Demographics by The provider or staff. Patient Should Change it at first time it.1=&gt;Pwd updated or created by patient itself" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="portal_login_username" nullable="true" remarks="User entered username" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="portal_onetime" nullable="true" remarks="One time login key.  Empty for export." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="7" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="true">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_care_experience_preferences" remarks="" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="patient_id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="observation_code" nullable="false" remarks="LOINC code" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="observation_code_text" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'coded'" digits="0" id="5" name="value_type" nullable="true" remarks="" size="7" type="enum('coded', 'text', 'boolean')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="value_code" nullable="true" remarks="fk to preference_value_sets.answer_code" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="answer_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="preference_value_sets"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="value_code_system" nullable="true" remarks="fk to preference_value_sets.answer_system" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="answer_system" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="preference_value_sets"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="value_display" nullable="true" remarks="fk to preference_value_sets.answer_display" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="answer_display" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="preference_value_sets"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="value_text" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="value_boolean" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="11" name="effective_datetime" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="'final'" digits="0" id="12" name="status" nullable="true" remarks="valid options are final,amended,preliminary" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="note" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_code" unique="false">
            <column ascending="true" name="observation_code"/>
         </index>
         <index name="patient_id" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="status" unique="false">
            <column ascending="true" name="status"/>
         </index>
         <index name="unq_uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_data" remarks="Main patient record that contains patient demographic information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="person_patient_link"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="title" nullable="false" remarks="Title of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="language" nullable="false" remarks="Language preference of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="financial" nullable="false" remarks="Financial information of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="fname" nullable="false" remarks="First name of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="lname" nullable="false" remarks="Last name of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="mname" nullable="false" remarks="Middle name of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="DOB" nullable="true" remarks="Date of Birth of the patient" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="street" nullable="false" remarks="Street address of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="postal_code" nullable="false" remarks="Postal code of the patient's address" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="city" nullable="false" remarks="City of the patient's address" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="12" name="state" nullable="false" remarks="State of the patient's address" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="13" name="country_code" nullable="false" remarks="Country code of the patient's address" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="drivers_license" nullable="false" remarks="Driver's license of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="15" name="ss" nullable="false" remarks="Social Security Number of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="occupation" nullable="true" remarks="Occupation of the patient. UNEMPLOYED, STUDENT, PT STUDENT, or anything else to indicate employed." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="17" name="phone_home" nullable="false" remarks="Home phone number of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="18" name="phone_biz" nullable="false" remarks="Business phone number of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="19" name="phone_contact" nullable="false" remarks="Contact phone number of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="20" name="phone_cell" nullable="false" remarks="Cell phone number of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="21" name="pharmacy_id" nullable="false" remarks="The patient's default pharmacy to send prescriptions to" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pharmacies"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="22" name="status" nullable="false" remarks="Marital Status: M = Married, S = Single, or something else" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="23" name="contact_relationship" nullable="false" remarks="Relationship of the contact person" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="date" nullable="true" remarks="Date related to the patient" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="25" name="sex" nullable="false" remarks="Gender of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="26" name="referrer" nullable="false" remarks="Referrer of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="27" name="referrerID" nullable="false" remarks="ID of the referring user" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="providerID" nullable="true" remarks="The id of the assigned provider to this user" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="ref_providerID" nullable="true" remarks="The id of the user that referred this patient" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="30" name="email" nullable="false" remarks="Email address of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="31" name="email_direct" nullable="false" remarks="Trusted Direct email address of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="32" name="ethnoracial" nullable="false" remarks="Ethnicity/Race information of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="33" name="race" nullable="false" remarks="Race of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="34" name="ethnicity" nullable="false" remarks="Ethnicity of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="35" name="religion" nullable="false" remarks="Religion of the patient" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="36" name="interpreter" nullable="false" remarks="Interpreter information for the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="interpreter_needed" nullable="true" remarks="Comes from the list_options.list_id='yes_no_unknown' and represents whether an interpreter is needed for this patient" size="65535" type="TEXT" typeCode="-1">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="38" name="migrantseasonal" nullable="false" remarks="Migrant/Seasonal worker information" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="39" name="family_size" nullable="false" remarks="Family size information of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="40" name="monthly_income" nullable="false" remarks="Monthly income information of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="billing_note" nullable="true" remarks="Billing notes for the patient" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="42" name="homeless" nullable="false" remarks="Homeless status of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="financial_review" nullable="true" remarks="Financial review date" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="44" name="pubpid" nullable="false" remarks="The public facing Medical Record Number (MRN) of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="45" name="pid" nullable="false" remarks="The internal patient identifier used throughout the export to represent this unique patient record" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="amendments"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_activity"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="claims"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_plans"/>
            <child catalog="openemr" column="foreign_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drug_sales"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="extended_log"/>
            <child catalog="openemr" column="ee_pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="external_encounters"/>
            <child catalog="openemr" column="ep_pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="external_procedures"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_care_plan"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_clinical_instructions"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_clinical_notes"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_dictation"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_acuity"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_antseg"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_base"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_biometrics"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_external"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_hpi"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_locking"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_mag_dispense"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_mag_impplan"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_mag_orders"/>
            <child catalog="openemr" column="PID" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_mag_wearing"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_neuro"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_postseg"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_refraction"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_ros"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_eye_vitals"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_functional_cognitive_status"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_misc_billing_options"/>
            <child catalog="openemr" column="parent_observation_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_questionnaire_assessments"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_reviewofs"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_ros"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_soap"/>
            <child catalog="openemr" column="PATIENT_ID" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_taskman"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals_calculation"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="history_data"/>
            <child catalog="openemr" column="imo_pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunization_observation"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="insurance_data"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="r_pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="medex_recalls"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_documents"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_portal_activity"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_signatures"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team"/>
            <child catalog="openemr" column="care_team_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="document_templates"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="employer_data"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_aftercare_plan"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_ankleinjury"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_bronchitis"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_category"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_item"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_subcategory"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_gad7"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_note"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_painmap"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_phq9"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_prior_auth"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_sdoh"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_track_anything"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_transfer_summary"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_treatment_plan"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="issue_encounter"/>
            <child catalog="openemr" column="pc_pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_access_onsite"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_care_experience_preferences"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_history"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_reminders"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_treatment_intervention_preferences"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pnotes"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pro_assessments"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_response"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_patient_data"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="shared_attributes"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_participant_attendance"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_participants"/>
            <child catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="transactions"/>
            <child catalog="openemr" column="patient_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="voids"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="46" name="genericname1" nullable="false" remarks="Generic name field 1" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="47" name="genericval1" nullable="false" remarks="Generic value field 1" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="48" name="genericname2" nullable="false" remarks="Generic name field 2" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="49" name="genericval2" nullable="false" remarks="Generic value field 2" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="50" name="hipaa_mail" nullable="false" remarks="HIPAA Mail setting" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="51" name="hipaa_voice" nullable="false" remarks="HIPAA Voice setting" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="52" name="hipaa_notice" nullable="false" remarks="HIPAA Notice setting" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="53" name="hipaa_message" nullable="false" remarks="HIPAA Message setting" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'NO'" digits="0" id="54" name="hipaa_allowsms" nullable="false" remarks="HIPAA Allow SMS setting" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'NO'" digits="0" id="55" name="hipaa_allowemail" nullable="false" remarks="HIPAA Allow Email setting" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="56" name="squad" nullable="false" remarks="The Athletic Squad this patient is a member of" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="57" name="fitness" nullable="false" remarks="The sport team Fitness level assigned to this patient" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="58" name="referral_source" nullable="false" remarks="Source of referral for the patient" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="59" name="usertext1" nullable="false" remarks="User text field 1" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="60" name="usertext2" nullable="false" remarks="User text field 2" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="61" name="usertext3" nullable="false" remarks="User text field 3" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="62" name="usertext4" nullable="false" remarks="User text field 4" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="63" name="usertext5" nullable="false" remarks="User text field 5" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="64" name="usertext6" nullable="false" remarks="User text field 6" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="65" name="usertext7" nullable="false" remarks="User text field 7" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="66" name="usertext8" nullable="false" remarks="User text field 8" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="67" name="userlist1" nullable="false" remarks="User list field 1" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="68" name="userlist2" nullable="false" remarks="User list field 2" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="69" name="userlist3" nullable="false" remarks="User list field 3" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="70" name="userlist4" nullable="false" remarks="User list field 4" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="71" name="userlist5" nullable="false" remarks="User list field 5" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="72" name="userlist6" nullable="false" remarks="User list field 6" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="73" name="userlist7" nullable="false" remarks="User list field 7" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'standard'" digits="0" id="74" name="pricelevel" nullable="false" remarks="Price level information of the patient" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="75" name="regdate" nullable="true" remarks="Registration Date" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="76" name="contrastart" nullable="true" remarks="Date contraceptives initially used" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="'NO'" digits="0" id="77" name="completed_ad" nullable="false" remarks="Completed Ad information" size="3" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="78" name="ad_reviewed" nullable="true" remarks="Date Ad reviewed" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="79" name="advance_directive_user_authenticator" nullable="true" remarks="fk to users.id of the user who authenticates that the advance care directive is valid." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="80" name="vfc" nullable="false" remarks="VFC information" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="81" name="mothersname" nullable="false" remarks="Mother's name" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="82" name="guardiansname" nullable="true" remarks="Guardian's name" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="83" name="allow_imm_reg_use" nullable="false" remarks="Allow Immunization Registry Use" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="84" name="allow_imm_info_share" nullable="false" remarks="Allow Immunization Information Sharing" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="85" name="allow_health_info_ex" nullable="false" remarks="Allow Health Information Exchange" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="86" name="allow_patient_portal" nullable="false" remarks="Allow Patient Portal" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="87" name="deceased_date" nullable="true" remarks="Date of Decease" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="88" name="deceased_reason" nullable="false" remarks="Reason of Decease" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="89" name="soap_import_status" nullable="true" remarks="SOAP Import Status (1-Prescription Press 2-Prescription Import 3-Allergy Press 4-Allergy Import)" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="90" name="cmsportal_login" nullable="false" remarks="" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="91" name="care_team_provider" nullable="true" remarks="List of care team providers where each id is the provider id contained in the users.id. Entries are separated by a the pipe | symbol." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="92" name="care_team_facility" nullable="true" remarks="List of care team facilities where each id is the facility/organization id contained in the facilities.id. Entries are separated by a the pipe | symbol" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="93" name="care_team_status" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="94" name="county" nullable="false" remarks="" size="40" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="95" name="industry" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="96" name="imm_reg_status" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="97" name="imm_reg_stat_effdate" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="98" name="publicity_code" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="99" name="publ_code_eff_date" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="100" name="protect_indicator" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="101" name="prot_indi_effdate" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="102" name="guardianrelationship" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="103" name="guardiansex" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="104" name="guardianaddress" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="105" name="guardiancity" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="106" name="guardianstate" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="107" name="guardianpostalcode" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="108" name="guardiancountry" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="109" name="guardianphone" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="110" name="guardianworkphone" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="111" name="guardianemail" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="112" name="sexual_orientation" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="113" name="gender_identity" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="114" name="birth_fname" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="115" name="birth_lname" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="116" name="birth_mname" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="-9" digits="0" id="117" name="dupscore" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="118" name="name_history" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="119" name="suffix" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="120" name="street_line_2" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="121" name="patient_groups" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="122" name="prevent_portal_apps" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="123" name="provider_since_date" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="124" name="created_by" nullable="true" remarks="The id of the user that initially created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="125" name="updated_by" nullable="true" remarks="The id of the user that last updated this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="126" name="preferred_name" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="127" name="nationality_country" nullable="true" remarks="" size="255" type="TINYTEXT" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="128" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="129" name="tribal_affiliations" nullable="true" remarks="Comes from the list_options.list_id='tribal_affiliations'" size="65535" type="TEXT" typeCode="-1">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="130" name="sex_identified" nullable="true" remarks="Comes from the list_options.list_id='administrative_sex'" size="65535" type="TEXT" typeCode="-1">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="131" name="pronoun" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="pid" sequenceNumberInPK="1"/>
         <primaryKey column="id" sequenceNumberInPK="2"/>
         <index name="id" unique="false">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_patient_dob" unique="false">
            <column ascending="true" name="DOB"/>
         </index>
         <index name="idx_patient_name" unique="false">
            <column ascending="true" name="lname"/>
            <column ascending="true" name="fname"/>
         </index>
         <index name="pid" unique="true">
            <column ascending="true" name="pid"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_history" remarks="Contains previous historical entries of the patient's care team (providers and facilities) as well as patient previous name information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="2" name="date" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="care_team_provider" nullable="true" remarks="List of care team providers where each id is the provider id contained in the users.id. Entries are separated by a the pipe | symbol." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="care_team_facility" nullable="true" remarks="List of care team facilities where each id is the facility/organization id contained in the facilities.id. Entries are separated by a the pipe | symbol" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="history_type_key" nullable="true" remarks="" size="36" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="previous_name_prefix" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="previous_name_first" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="previous_name_middle" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="previous_name_last" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="previous_name_suffix" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="previous_name_enddate" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="created_by" nullable="true" remarks="The user that created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid_idx" unique="false">
            <column ascending="true" name="pid"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_reminders" remarks="Patient Reminders generated from the clinical decision support engine that are sent via a communication medium to the patient" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="1" name="active" nullable="false" remarks="1 if active and 0 if not active" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="date_inactivated" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="reason_inactivated" nullable="false" remarks="Maps to list_options list rule_reminder_inactive_opt" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="due_status" nullable="false" remarks="Maps to list_options list rule_reminder_due_opt" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="category" nullable="false" remarks="Maps to the category item in the rule_action_item table" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_action_item"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="item" nullable="false" remarks="Maps to the item column in the rule_action_item table" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="item" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_action_item"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="date_created" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="date_sent" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="voice_status" nullable="false" remarks="0 if not sent and 1 if sent" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="sms_status" nullable="false" remarks="0 if not sent and 1 if sent" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="email_status" nullable="false" remarks="0 if not sent and 1 if sent" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="mail_status" nullable="false" remarks="0 if not sent and 1 if sent" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="category" unique="false">
            <column ascending="true" name="category"/>
            <column ascending="true" name="item"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_tracker" remarks="Patient appointment events that occur in the system. Used in the patient flowboard and for patient data reporting" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Surrogate ID of the patient tracker record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="pt_tracker_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker_element"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="The datetime this tracker event was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="apptdate" nullable="true" remarks="The appointment date this patient tracker record applies to" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="appttime" nullable="true" remarks="The appointment time this patient tracker record applies to" size="10" type="TIME" typeCode="92"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="eid" nullable="false" remarks="The calendar appointment id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pc_eid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="original_user" nullable="false" remarks="This is the user that created the original record" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="encounter" nullable="false" remarks="The encounter the patient appointment is connected to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="8" name="lastseq" nullable="false" remarks="The element file should contain this number of elements" size="4" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="random_drug_test" nullable="true" remarks="Tracks if the patient should be given a randomized drug test. NULL if not randomized. If randomized, 0 is no, 1 is yes" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="drug_screen_completed" nullable="false" remarks="Tracks if the patient has completed a drug screening. 0 if no, 1, if they have completed a drug screening" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="eid" unique="false">
            <column ascending="true" name="eid"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_tracker_element" remarks="Used for tracking individual state changes in the appointment/encounter of a patient" type="TABLE">
         <column autoUpdated="false" defaultValue="0" digits="0" id="0" name="pt_tracker_id" nullable="false" remarks="maps to id column in patient_tracker table" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="start_datetime" nullable="true" remarks="The datetime this tracker element event was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="room" nullable="false" remarks="Comes from the list_options.list_id='patient_flow_board_rooms' and represents the facility room that the patient has been assigned to and this tracker element is connected to" size="20" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="status" nullable="false" remarks="Comes from the list_options.list_id='apptstat' if it is a single patient appointment OR list_options.list_id='groupstat' if this is a group appointment. It represents the current appointment status at the time this tracker element was created" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="seq" nullable="false" remarks="This is a numerical sequence for this pt_tracker_id events and in combination with the pt_tracker_id uniquely identifies this record" size="4" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="user" nullable="false" remarks="This is the user that created this element" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="username" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <index name="pt_tracker_id" unique="false">
            <column ascending="true" name="pt_tracker_id"/>
            <column ascending="true" name="seq"/>
         </index>
      </table>
      <table catalog="openemr" name="patient_treatment_intervention_preferences" remarks="Treatment Intervention Preferences for a patient" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="patient_id" nullable="false" remarks="fk to patient_data.pid" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="observation_code" nullable="false" remarks="LOINC code" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="observation_code_text" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'coded'" digits="0" id="5" name="value_type" nullable="true" remarks="" size="7" type="enum('coded', 'text', 'boolean')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="value_code" nullable="true" remarks="fk to preference_value_sets.answer_code" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="answer_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="preference_value_sets"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="value_code_system" nullable="true" remarks="fk to preference_value_sets.answer_system" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="answer_system" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="preference_value_sets"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="value_display" nullable="true" remarks="fk to preference_value_sets.answer_display" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="answer_display" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="preference_value_sets"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="value_text" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="value_boolean" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="11" name="effective_datetime" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="'final'" digits="0" id="12" name="status" nullable="true" remarks="valid options are final,amended,preliminary" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="note" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_code" unique="false">
            <column ascending="true" name="observation_code"/>
         </index>
         <index name="patient_id" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="status" unique="false">
            <column ascending="true" name="status"/>
         </index>
         <index name="unq_uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="person" remarks="Contains records of individuals in the system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="title" nullable="true" remarks="Mr., Mrs., Dr., etc." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="first_name" nullable="true" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="middle_name" nullable="true" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="last_name" nullable="true" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="preferred_name" nullable="true" remarks="Name person prefers to be called" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="gender" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="birth_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="death_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="marital_status" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="race" nullable="true" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="ethnicity" nullable="true" remarks="" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="preferred_language" nullable="true" remarks="ISO 639-1 code" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="communication" nullable="true" remarks="Communication preferences/needs" size="254" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="ssn" nullable="true" remarks="Should be encrypted in application" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="active" nullable="true" remarks="1=active, 0=inactive" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="inactive_reason" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="inactive_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="notes" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="20" name="created_date" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="created_by" nullable="true" remarks="The id of the user that initially created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="22" name="updated_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="updated_by" nullable="true" remarks="The id of the user that last updated this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_person_active" unique="false">
            <column ascending="true" name="active"/>
         </index>
         <index name="idx_person_dob" unique="false">
            <column ascending="true" name="birth_date"/>
         </index>
         <index name="idx_person_name" unique="false">
            <column ascending="true" name="last_name"/>
            <column ascending="true" name="first_name"/>
         </index>
         <index name="idx_person_search" unique="false">
            <column ascending="true" name="last_name"/>
            <column ascending="true" name="first_name"/>
            <column ascending="true" name="birth_date"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="person_patient_link" remarks="Contains the tracking of person records who are also patients in the system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="person_id" nullable="false" remarks="The id of the person record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="patient_id" nullable="false" remarks="The id of the patient record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="3" name="linked_date" nullable="false" remarks="When the link was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="linked_by" nullable="true" remarks="The id of the user that created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="'manual'" digits="0" id="5" name="link_method" nullable="true" remarks="How link was created: manual, auto_detected, migrated, import" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="notes" nullable="true" remarks="Optional notes about why/how they were linked" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="active" nullable="false" remarks="Whether link is active (allows soft delete)" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_ppl_active" unique="false">
            <column ascending="true" name="active"/>
         </index>
         <index name="idx_ppl_linked_date" unique="false">
            <column ascending="true" name="linked_date"/>
         </index>
         <index name="idx_ppl_method" unique="false">
            <column ascending="true" name="link_method"/>
         </index>
         <index name="idx_ppl_patient" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="idx_ppl_person" unique="false">
            <column ascending="true" name="person_id"/>
         </index>
         <index name="unique_active_link" unique="true">
            <column ascending="true" name="person_id"/>
            <column ascending="true" name="patient_id"/>
            <column ascending="true" name="active"/>
         </index>
      </table>
      <table catalog="openemr" name="pharmacies" remarks="Contains records of pharmacies that a patient uses, or that providers interact with" type="TABLE">
         <column autoUpdated="false" defaultValue="0" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="pharmacy_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="pharmacy_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="2" name="transmit_method" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="email" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="ncpdp" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="npi" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="pnotes" remarks="Patient Messages about the healthcare treatment of the patient" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="body" nullable="true" remarks="" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="user" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="groupname" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="name" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="activity" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="title" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="assigned_to" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="10" name="deleted" nullable="true" remarks="flag indicates note is deleted" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="'New'" digits="0" id="11" name="message_status" nullable="false" remarks="Comes from the list_options.list_id='message_status' and represents the status of the message" size="20" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="portal_relation" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="is_msg_encrypted" nullable="true" remarks="Whether messsage encrypted 0-Not encrypted, 1-Encrypted" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="update_by" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="update_date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="preference_value_sets" numRows="83" remarks="Answer lists for preference codes" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="loinc_code" nullable="false" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="answer_code" nullable="false" remarks="" size="100" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="value_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_care_experience_preferences"/>
            <child catalog="openemr" column="value_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_treatment_intervention_preferences"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="answer_system" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="value_code_system" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_care_experience_preferences"/>
            <child catalog="openemr" column="value_code_system" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_treatment_intervention_preferences"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="answer_display" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="value_display" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_care_experience_preferences"/>
            <child catalog="openemr" column="value_display" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_treatment_intervention_preferences"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="answer_definition" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="sort_order" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="7" name="active" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="answer_code" sequenceNumberInPK="2"/>
         <primaryKey column="answer_system" sequenceNumberInPK="3"/>
         <primaryKey column="answer_display" sequenceNumberInPK="4"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="loinc_code" unique="false">
            <column ascending="true" name="loinc_code"/>
         </index>
      </table>
      <table catalog="openemr" name="prescriptions" remarks="Internal and External prescription information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="prescription_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="patient_id" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="filled_by_id" nullable="true" remarks="UNUSED - will be removed in the future" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="pharmacy_id" nullable="true" remarks="The internal identifier for the pharmacy that is connected to this prescription" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pharmacies"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="date_added" nullable="true" remarks="Datetime the prescriptions was initially created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="date_modified" nullable="true" remarks="Datetime the prescriptions was last modified" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="provider_id" nullable="true" remarks="The id of the user that created this prescription" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="encounter" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="start_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="drug" nullable="true" remarks="" size="150" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="11" name="drug_id" nullable="false" remarks="The id of the drug that was prescribed to the patient. 0 if the drug was manually entered" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="drug_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drugs"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="rxnorm_drugcode" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="form" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="dosage" nullable="true" remarks="" size="100" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="quantity" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="size" nullable="true" remarks="" size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="unit" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="route" nullable="true" remarks="Comes from the list_options.list_id='drug_route'" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="interval" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="substitute" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="refills" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="per_refill" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="filled_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="medication" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="note" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="26" name="active" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="datetime" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="user" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="site" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="prescriptionguid" nullable="true" remarks="" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="31" name="erx_source" nullable="false" remarks="0-OpenEMR 1-External" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="32" name="erx_uploaded" nullable="false" remarks="0-Pending NewCrop upload 1-Uploaded to NewCrop" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="drug_info_erx" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="external_id" nullable="true" remarks="" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="end_date" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="indication" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="prn" nullable="true" remarks="" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="ntx" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="rtx" nullable="true" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="40" name="txDate" nullable="false" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="usage_category" nullable="true" remarks="Comes from the list_options.list_id='medication-usage-category'" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="42" name="usage_category_title" nullable="false" remarks="title in list_options.list_id=medication-usage-category" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="request_intent" nullable="true" remarks="Comes from the list_options.list_id='medication-request-intent'" size="100" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="44" name="request_intent_title" nullable="false" remarks="title in list_options.list_id=medication-request-intent" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="drug_dosage_instructions" nullable="true" remarks="Medication dosage instructions" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="diagnosis" nullable="true" remarks="The reason/justification for the prescription.  Format is a text string in the format of 'system:code[;system:code2;system:coden]'" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="47" name="created_by" nullable="true" remarks="The id of the user that initially created this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="48" name="updated_by" nullable="true" remarks="The id of the user that last updated this record" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="patient_id" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="pro_assessments" remarks="Contains Patient Reported Outcome assessment results as delivered via the PROMIS assessment delivery system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="form_oid" nullable="false" remarks="unique id for specific instrument, pulled from assessment center API" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="form_name" nullable="false" remarks="pulled from assessment center API" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="user_id" nullable="false" remarks="ID for user that orders the form" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="deadline" nullable="false" remarks="deadline to complete the form, will be used when sending notification and reminders" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="patient_id" nullable="false" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="assessment_oid" nullable="false" remarks="unique id for this specific assessment, pulled from assessment center API" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="status" nullable="false" remarks="ordered or completed" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="score" nullable="false" remarks="T-Score for the assessment" size="22" type="DOUBLE" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="error" nullable="false" remarks="Standard error for the score" size="22" type="DOUBLE" typeCode="8"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="created_at" nullable="false" remarks="timestamp recording the creation time of this assessment" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="updated_at" nullable="false" remarks="this field indicates the completion time when the status is completed" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_answers" remarks="Answers to questions that are requested to be answered for a given procedure by a procedure provider (lab, or other provider)" type="TABLE">
         <column autoUpdated="false" defaultValue="0" digits="0" id="0" name="procedure_order_id" nullable="false" remarks="references procedure_order.procedure_order_id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="procedure_order_seq" nullable="false" remarks="references procedure_order_code.procedure_order_seq" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="question_code" nullable="false" remarks="references procedure_questions.question_code" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="question_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_questions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="answer_seq" nullable="false" remarks="supports multiple-choice questions. answer_seq, incremented in code" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="answer" nullable="false" remarks="answer data" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="procedure_code" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <primaryKey column="procedure_order_id" sequenceNumberInPK="1"/>
         <primaryKey column="procedure_order_seq" sequenceNumberInPK="2"/>
         <primaryKey column="question_code" sequenceNumberInPK="3"/>
         <primaryKey column="answer_seq" sequenceNumberInPK="4"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_order_id"/>
            <column ascending="true" name="procedure_order_seq"/>
            <column ascending="true" name="question_code"/>
            <column ascending="true" name="answer_seq"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_order" remarks="A procedure order is an encounter form within a patient visit representing an order for one or more procedures and its associated report/results for the procedure.  Orders can be for either internal or external procedure providers" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="procedure_order_id" nullable="false" remarks="Surrogate id of the procedure order record" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_answers"/>
            <child catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order_code"/>
            <child catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order_relationships"/>
            <child catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_report"/>
            <child catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="provider_id" nullable="false" remarks="References users.id, representing the ordering provider" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="patient_id" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="encounter_id" nullable="false" remarks="References form_encounter.encounter, representing the encounter for the order" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="date_collected" nullable="true" remarks="Time the specimen was collected" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="date_ordered" nullable="true" remarks="Date and time the order was placed" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="order_priority" nullable="false" remarks="Comes from the list_options.list_id='ord_priority' and represents the priority of the order" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="8" name="order_status" nullable="false" remarks="Comes from the list_options.list_id='ord_status' and represents the status of the order (pending, routed, complete, canceled)" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="patient_instructions" nullable="true" remarks="Instructions to be given to the patient for the procedure" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="activity" nullable="false" remarks="0 if the record is deleted, 1 if the record is active" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="control_id" nullable="false" remarks="Control ID sent back from the lab" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="12" name="lab_id" nullable="false" remarks="References procedure_providers.ppid and is the lab or provider of the procedure that will process the order and the order is being sent to" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="ppid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_providers"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="13" name="specimen_type" nullable="false" remarks="Comes from the list_options.list_id='Specimen_Type' and represents the specimen type collected for the procedure" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="specimen_location" nullable="false" remarks="Comes from the list_options.list_id='Specimen_Location' and represents the location the specimen was collected at" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="15" name="specimen_volume" nullable="false" remarks="Volume of the specimen" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="date_transmitted" nullable="true" remarks="Time of order transmission (null if unsent)" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="17" name="clinical_hx" nullable="false" remarks="Clinical history text relevant to the order" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="external_id" nullable="true" remarks="External identifier" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'0'" digits="0" id="19" name="history_order" nullable="true" remarks="Indicates if the order is added for history purposes only. 0=No, 1=Yes" size="1" type="enum('0', '1')" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="20" name="order_diagnosis" nullable="true" remarks="Primary order diagnosis" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="billing_type" nullable="true" remarks="Comes from the list_options.list_id='procedure_billing' and represents the kind billing being used for this procedure order (insurance, self-pay, etc)" size="4" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="procedure_type" nullable="false" remarks="Comes from the list_options.list_id='proc_type' and represents the kind of procedure_type this is ('group', 'order', 'discrete_result', etc')" size="0" type="Unknown" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="specimen_fasting" nullable="true" remarks="Fasting status of the patient at the time the specimen was collected. 0=Patient not fasting, 1=Patient was fasting at time of collection" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="order_psc" nullable="true" remarks="Should the order for the Patient  Service Center (PSC) be put on hold. 0=No, 1=Yes" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="'not_required'" digits="0" id="24" name="order_abn" nullable="false" remarks="The status of the US CMS Advanced Beneficiary Notice and whether the patient has already been given the ABN. Possible values are 'not_required'=Patient doesn't need an ABN, 'required'=Patient needs to be given an ABN before procedure can occur, or 'signed'=Patient has already been given an ABN and signed it." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="25" name="collector_id" nullable="false" remarks="References users.id, representing the individual that collected the specimen" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="account" nullable="true" remarks="The specific name of the facility location associated with the order where the lab work will be sent from.  This is typically used for LabCorp orders." size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="account_facility" nullable="true" remarks="Facility Location associated with the order where the lab work is being sent from.  This is typically used for LabCorp orders." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="provider_number" nullable="true" remarks="Provider number" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'laboratory_test'" digits="0" id="29" name="procedure_order_type" nullable="false" remarks="Comes from the list_options.list_id='order_type' and represents the type of procedure order this is (order, lab test, imaging, physical exams, etc" size="32" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="scheduled_date" nullable="true" remarks="Scheduled date for service (FHIR occurrence[x])" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="scheduled_start" nullable="true" remarks="Scheduled start time (FHIR occurrencePeriod.start)" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="scheduled_end" nullable="true" remarks="Scheduled end time (FHIR occurrencePeriod.end)" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="performer_type" nullable="true" remarks="Comes from the list_options.list_id='performer_type'" size="50" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="'order'" digits="0" id="34" name="order_intent" nullable="false" remarks="Comes from the list_options.list_id='order_intent'" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="location_id" nullable="true" remarks="The facility location where the procedure is to be performed" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <primaryKey column="procedure_order_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_order_id"/>
         </index>
         <index name="datepid" unique="false">
            <column ascending="true" name="date_ordered"/>
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="idx_location_id" unique="false">
            <column ascending="true" name="location_id"/>
         </index>
         <index name="idx_order_intent" unique="false">
            <column ascending="true" name="order_intent"/>
         </index>
         <index name="idx_scheduled_date" unique="false">
            <column ascending="true" name="scheduled_date"/>
         </index>
         <index name="idx_specimen_type" unique="false">
            <column ascending="true" name="specimen_type"/>
         </index>
         <index name="patient_id" unique="false">
            <column ascending="true" name="patient_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_order_code" remarks="Holds individual procedure / labs ordered from the procedure_type table for a given procedure order.  It contains also the individual diagnosis code that is related to the ordered procedure" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="procedure_order_id" nullable="false" remarks="references procedure_order.procedure_order_id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="procedure_order_seq" nullable="false" remarks="Supports multiple tests per order. Procedure_order_seq, incremented in code" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="procedure_order_seq" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="procedure_code" nullable="false" remarks="like procedure_type.procedure_code" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="procedure_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_type"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="procedure_name" nullable="false" remarks="descriptive name of the procedure code" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'1'" digits="0" id="4" name="procedure_source" nullable="false" remarks="1=original order, 2=added after order sent" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="diagnoses" nullable="true" remarks="diagnoses and maybe other coding (e.g. ICD9:111.11)" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="do_not_send" nullable="false" remarks="0 = normal, 1 = do not transmit to lab" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="procedure_order_title" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="procedure_type" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="transport" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="date_end" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="reason_code" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="reason_description" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="reason_date_low" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="reason_date_high" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="reason_status" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <primaryKey column="procedure_order_id" sequenceNumberInPK="1"/>
         <primaryKey column="procedure_order_seq" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_order_id"/>
            <column ascending="true" name="procedure_order_seq"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_order_relationships" remarks="Links ServiceRequests to supporting clinical information" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="procedure_order_id" nullable="false" remarks="Links to procedure_order.procedure_order_id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="resource_type" nullable="false" remarks="FHIR resource type (Observation, Condition, etc.)" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="resource_uuid" nullable="false" remarks="UUID of the related resource" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="relationship" nullable="true" remarks="Type of relationship" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="5" name="created_at" nullable="true" remarks="" size="19" type="TIMESTAMP" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="created_by" nullable="true" remarks="User who created this link" size="19" type="BIGINT" typeCode="-5"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="idx_created_at" unique="false">
            <column ascending="true" name="created_at"/>
         </index>
         <index name="idx_order_id" unique="false">
            <column ascending="true" name="procedure_order_id"/>
         </index>
         <index name="idx_resource" unique="false">
            <column ascending="true" name="resource_type"/>
            <column ascending="true" name="resource_uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_providers" remarks="This table holds both internal and external laboratories as well as other organizations that provide lab testing, results, and other procedures that can be ordered by a provider" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="ppid" nullable="false" remarks="Surrogate ID of the record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="lab_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="lab_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_questions"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="name" nullable="false" remarks="Name of the laboratory or organization" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="npi" nullable="false" remarks="National Provider Identifier (NPI)" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="send_app_id" nullable="false" remarks="Sending application ID (MSH-3.1). Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="send_fac_id" nullable="false" remarks="Sending facility ID (MSH-4.1). Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="recv_app_id" nullable="false" remarks="Receiving application ID (MSH-5.1). Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="recv_fac_id" nullable="false" remarks="Receiving facility ID (MSH-6.1). Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'D'" digits="0" id="8" name="DorP" nullable="false" remarks="Debugging or Production (MSH-11). Empty on Export" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="'B'" digits="0" id="9" name="direction" nullable="false" remarks="Bidirectional or Results-only. Empty on Export" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="lab_id" nullable="false" remarks="Laboratory ID" size="0" type="Unknown" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'DL'" digits="0" id="10" name="protocol" nullable="false" remarks="Protocol for communication. Empty on Export" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="remote_host" nullable="false" remarks="Remote host for communication. Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="12" name="login" nullable="false" remarks="Login information for communication. Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="13" name="password" nullable="false" remarks="Password for communication. Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="orders_path" nullable="false" remarks="Path for orders. Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="15" name="results_path" nullable="false" remarks="Path for results. Empty on Export" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="notes" nullable="true" remarks="Additional notes or information. Empty on Export" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="17" name="lab_director" nullable="false" remarks="ID of the laboratory director" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="18" name="active" nullable="false" remarks="Indicates whether the provider is active" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="type" nullable="true" remarks="Type of provider or organization" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="20" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="21" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="ppid" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="ppid"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_questions" remarks="Information/questions that should be answered for a given procedure as requested by the procedure service provider. Created as part of the procedure compendium import/creation process." type="TABLE">
         <column autoUpdated="false" defaultValue="0" digits="0" id="0" name="lab_id" nullable="false" remarks="references procedure_providers.ppid to identify the lab" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="ppid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_providers"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="1" name="procedure_code" nullable="false" remarks="references procedure_type.procedure_code to identify this order type" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="procedure_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_type"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="question_code" nullable="false" remarks="code identifying this question" size="31" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="question_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_answers"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="seq" nullable="false" remarks="sequence number for ordering" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="question_text" nullable="false" remarks="descriptive text for question_code" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="required" nullable="false" remarks="1 = required, 0 = not" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="maxsize" nullable="false" remarks="maximum length if text input field" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="'T'" digits="0" id="7" name="fldtype" nullable="false" remarks="Text, Number, Select, Multiselect, Date, Gestational-age" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="options" nullable="true" remarks="choices for fldtype S and T" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="tips" nullable="false" remarks="Additional instructions for answering the question" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="activity" nullable="false" remarks="1 = active, 0 = inactive" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="lab_id" sequenceNumberInPK="1"/>
         <primaryKey column="procedure_code" sequenceNumberInPK="2"/>
         <primaryKey column="question_code" sequenceNumberInPK="3"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="lab_id"/>
            <column ascending="true" name="procedure_code"/>
            <column ascending="true" name="question_code"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_report" remarks="Procedure order overall report container for an ordered procedure result in procedure_order_codes which represents findings, conclusions, and recommendations for the procedure order" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="procedure_report_id" nullable="false" remarks="Unique identifier for the procedure report. This is the primary key." size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="procedure_report_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_result"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="Universally unique identifier for the procedure report." size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="procedure_order_id" nullable="true" remarks="References the procedure order for which this report is associated." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="3" name="procedure_order_seq" nullable="false" remarks="References procedure_order_code.procedure_order_seq." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="date_collected" nullable="true" remarks="Date and time when the report was collected." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="date_collected_tz" nullable="true" remarks="Timezone offset from UTC for the date collected." size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="date_report" nullable="true" remarks="Date and time when the report was generated." size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="date_report_tz" nullable="true" remarks="Timezone offset from UTC for the date reported." size="5" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="source" nullable="false" remarks="References the user who entered this report data." size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="specimen_num" nullable="false" remarks="A unique identifier for the specimen associated with the report." size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="report_status" nullable="false" remarks="Comes from the list_options.list_id='proc_rep_status' and represents the current state/status of the report (e.g. received, complete, error)" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="'received'" digits="0" id="11" name="review_status" nullable="false" remarks="The status of the report review (e.g., pending review, received, reviewed)." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="report_notes" nullable="true" remarks="Notes from the lab related to the report." size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="procedure_report_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_report_id"/>
         </index>
         <index name="procedure_order_id" unique="false">
            <column ascending="true" name="procedure_order_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_result" remarks="The table stores the actual results and findings from medical procedures and tests, such as laboratory tests, radiology reports, diagnostic imaging, and other clinical tests." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="procedure_result_id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="procedure_result_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_notes_procedure_results"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="UUID of the record" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="procedure_report_id" nullable="false" remarks="references procedure_report.procedure_report_id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_report_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_report"/>
         </column>
         <column autoUpdated="false" defaultValue="'S'" digits="0" id="3" name="result_data_type" nullable="false" remarks="N=Numeric, S=String, F=Formatted, E=External, L=Long text as the first line of comments" size="1" type="CHAR" typeCode="1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="result_code" nullable="false" remarks="LOINC code, might match a procedure_type.procedure_code" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="result_text" nullable="false" remarks="Description of result_code" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="date" nullable="true" remarks="Lab-provided date specific to this result" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="facility" nullable="false" remarks="Lab-provided testing facility ID" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="8" name="units" nullable="false" remarks="Units for the result" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="result" nullable="false" remarks="Result data" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="range" nullable="false" remarks="Result range" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="abnormal" nullable="false" remarks="Abnormal values (no, yes, high, low)" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="comments" nullable="true" remarks="Comments from the lab" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="13" name="document_id" nullable="false" remarks="References documents.id if this result is a document" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="result_status" nullable="false" remarks="Result status (preliminary, cannot be done, final, corrected, incomplete, etc.)" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="date_end" nullable="true" remarks="Lab-provided end date specific to this result" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="procedure_result_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_result_id"/>
         </index>
         <index name="procedure_report_id" unique="false">
            <column ascending="true" name="procedure_report_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_specimen" remarks="" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="procedure_specimen_id" nullable="false" remarks="record id" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="FHIR Specimen id" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="procedure_order_id" nullable="false" remarks="links to procedure_order.procedure_order_id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="procedure_order_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="procedure_order_seq" nullable="false" remarks="links to procedure_order_code.procedure_order_seq (per test line)" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="procedure_order_seq" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order_code"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="specimen_identifier" nullable="true" remarks="tube/barcode/internal id" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="accession_identifier" nullable="true" remarks="lab accession number" size="128" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="specimen_type_code" nullable="true" remarks="Comes from the list_options.list_id='specimen_type' and represents the type of specimen being collected for the procedure" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="specimen_type" nullable="true" remarks="display/text" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="collection_method_code" nullable="true" remarks="Comes from the list_options.list_id='specimen_collection_method' and represents the type of specimen being collected for the procedure" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="collection_method" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="specimen_location_code" nullable="true" remarks="Comes from the list_options.list_id='specimen_location' and represents the body location the specimen is collected from for the procedure" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="specimen_location" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="collected_date" nullable="true" remarks="single instant" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="collection_date_low" nullable="true" remarks="period start" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="collection_date_high" nullable="true" remarks="period end" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="3" id="15" name="volume_value" nullable="true" remarks="" size="10" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="'mL'" digits="0" id="16" name="volume_unit" nullable="true" remarks="" size="32" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="condition_code" nullable="true" remarks="Comes from the list_options.list_id='specimen_condition' and represents the condition / quality of the specimen being collected for the procedure" size="32" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="specimen_condition" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="comments" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="20" name="created_at" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="21" name="updated_at" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="created_by" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="23" name="updated_by" nullable="true" remarks="" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="24" name="deleted" nullable="true" remarks="" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="procedure_specimen_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_specimen_id"/>
         </index>
         <index name="idx_accession" unique="false">
            <column ascending="true" name="accession_identifier"/>
         </index>
         <index name="idx_identifier" unique="false">
            <column ascending="true" name="specimen_identifier"/>
         </index>
         <index name="idx_order_line" unique="false">
            <column ascending="true" name="procedure_order_id"/>
            <column ascending="true" name="procedure_order_seq"/>
         </index>
         <index name="uuid_unique" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="procedure_type" remarks="This table holds a compendium of possible procedures and labs that can be ordered by the procedure ordering system within OpenEMR" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="procedure_type_id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="1" name="parent" nullable="false" remarks="References procedure_type.procedure_type_id for heirarchies of procedure types" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="name" nullable="false" remarks="Name for this category, procedure or result type" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="3" name="lab_id" nullable="false" remarks="References procedure_providers.ppid, 0 means default to parent" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="procedure_code" nullable="false" remarks="Code and code system identifying this procedure in the format of [codesystem:code]" size="64" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="procedure_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order_code"/>
            <child catalog="openemr" column="procedure_code" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_questions"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="procedure_type" nullable="false" remarks="Comes from the list_options.list_id='proc_type' and represents the kind of procedure_type this is ('group', 'order', 'discrete_result', etc')" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="body_site" nullable="false" remarks="Where to do injection, e.g. arm, buttock" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="7" name="specimen" nullable="false" remarks="Blood, urine, saliva, etc." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="8" name="route_admin" nullable="false" remarks="Oral, injection" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="9" name="laterality" nullable="false" remarks="Left, right, ..." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="description" nullable="false" remarks="Descriptive text for procedure_code" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="standard_code" nullable="false" remarks="Industry standard code type and code (e.g. CPT4:12345)" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="12" name="related_code" nullable="false" remarks="Suggested code(s) for follow-up services if result is abnormal" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="13" name="units" nullable="false" remarks="Default for procedure_result.units" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="14" name="range" nullable="false" remarks="Default for procedure_result.range" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="seq" nullable="false" remarks="Sequence number for ordering" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="activity" nullable="false" remarks="1=active, 0=inactive" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="17" name="notes" nullable="false" remarks="Additional notes to enhance description" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="transport" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="procedure_type_name" nullable="true" remarks="" size="64" type="VARCHAR" typeCode="12"/>
         <primaryKey column="procedure_type_id" sequenceNumberInPK="1"/>
         <primaryKey column="procedure_code" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="procedure_type_id"/>
         </index>
         <index name="parent" unique="false">
            <column ascending="true" name="parent"/>
         </index>
         <index name="ptype_procedure_code" unique="false">
            <column ascending="true" name="procedure_code"/>
         </index>
      </table>
      <table catalog="openemr" name="questionnaire_repository" remarks="Holds questionnaires that providers or patients fill out for healthcare information collection and/or assessment." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Unique identifier for the questionnaire record" size="20" type="BIGINT UNSIGNED" typeCode="-5">
            <child catalog="openemr" column="questionnaire_response_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_observation"/>
            <child catalog="openemr" column="questionnaire_foreign_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_response"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="Universally unique identifier for the questionnaire in the EMR system" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="questionnaire_id" nullable="true" remarks="Unique public identifier" size="255" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="questionnaire_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_questionnaire_assessments"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="provider" nullable="true" remarks="Identifier for the provider associated with the inputting/creation of this questionnaire" size="10" type="INT UNSIGNED" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="4" name="version" nullable="false" remarks="Version number of the questionnaire" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="5" name="created_date" nullable="true" remarks="Date and time when the questionnaire was created" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="6" name="modified_date" nullable="true" remarks="Date and time when the questionnaire was last modified" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="name" nullable="true" remarks="Name or title of the questionnaire" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'Questionnaire'" digits="0" id="8" name="type" nullable="false" remarks="Type of questionnaire (e.g., FHIR 'Questionnaire')" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="profile" nullable="true" remarks="Profile information for the questionnaire" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="10" name="active" nullable="false" remarks="Indicates if the questionnaire is active (1 for active, 0 for inactive)" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="status" nullable="true" remarks="Status information for the questionnaire" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="source_url" nullable="true" remarks="URL associated with the questionnaire for where the questionnaire originated or where more information about the questionnaire can be obtained" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="code" nullable="true" remarks="Code associated with the questionnaire" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="code_display" nullable="true" remarks="Display information for the code associated with the questionnaire" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="questionnaire" nullable="true" remarks="JSON serialized version of the questionnaire.  If the type of this record is Questionnaire than the JSON will be a serialized definition of a FHIR Questionnaire resource" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="lform" nullable="true" remarks="National Institutes of Health (NIH) Lforms version of text content for the questionnaire (e.g., for long forms)" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="category" nullable="true" remarks="Comes from the list_options.list_id='Observation_Types' and represents the grouping category for this questionnaire response" size="64" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="questionnaire_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="search" unique="false">
            <column ascending="true" name="name"/>
            <column ascending="true" name="questionnaire_id"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="questionnaire_response" remarks="Holds questionnaire results for a patient" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="" size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="response_id" nullable="true" remarks="A globally unique id for answer set. String version of UUID" size="255" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="response_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_questionnaire_assessments"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="questionnaire_foreign_id" nullable="true" remarks="questionnaire_repository id for subject questionnaire" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_repository"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="questionnaire_id" nullable="true" remarks="Id for questionnaire content. String version of UUID" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="questionnaire_name" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="patient_id" nullable="true" remarks="The internal patient identifier" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="encounter" nullable="true" remarks="May or may not be associated with an encounter" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="audit_user_id" nullable="true" remarks="" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="creator_user_id" nullable="true" remarks="user id if answers are provider" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="10" name="create_time" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="last_updated" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="12" name="version" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="status" nullable="true" remarks="form current status. completed,active,incomplete" size="63" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="questionnaire" nullable="true" remarks="the subject questionnaire json" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="15" name="questionnaire_response" nullable="true" remarks="questionnaire response json" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="16" name="form_response" nullable="true" remarks="lform answers array json" size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="17" name="form_score" nullable="true" remarks="Arithmetic scoring of questionnaires" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="tscore" nullable="true" remarks="T-Score" size="22" type="DOUBLE" typeCode="8"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="error" nullable="true" remarks="Standard error for the T-Score" size="22" type="DOUBLE" typeCode="8"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="response_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="response_index" unique="false">
            <column ascending="true" name="response_id"/>
            <column ascending="true" name="patient_id"/>
            <column ascending="true" name="questionnaire_id"/>
            <column ascending="true" name="questionnaire_name"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="rule_action_item" numRows="21" remarks="Patient Reminders configuration for Clinical Decision Support individual rule settings" type="TABLE">
         <column autoUpdated="false" defaultValue="''" digits="0" id="0" name="category" nullable="false" remarks="Maps to list_options list rule_action_category" size="31" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_reminders"/>
            <child catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_patient_data"/>
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="1" name="item" nullable="false" remarks="Maps to list_options list rule_action" size="31" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="item" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_reminders"/>
            <child catalog="openemr" column="item" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_patient_data"/>
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="clin_rem_link" nullable="false" remarks="Custom html link in clinical reminder widget" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="reminder_message" nullable="true" remarks="Custom message in patient reminder" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="4" name="custom_flag" nullable="false" remarks="1 indexed to rule_patient_data, 0 indexed within main schema" size="3" type="BOOLEAN" typeCode="16"/>
         <primaryKey column="category" sequenceNumberInPK="1"/>
         <primaryKey column="item" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="category"/>
            <column ascending="true" name="item"/>
         </index>
      </table>
      <table catalog="openemr" name="rule_patient_data" remarks="Patient Reminders that the Clinical Decision Support system is configured to run for this specific patient." type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="3" name="category" nullable="false" remarks="Maps to the category item in the rule_action_item table" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="category" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_action_item"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="item" nullable="false" remarks="Maps to the item column in the rule_action_item table" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="item" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="rule_action_item"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="complete" nullable="false" remarks="Maps to list_options list yesno" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="6" name="result" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="category" unique="false">
            <column ascending="true" name="category"/>
            <column ascending="true" name="item"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="shared_attributes" remarks="Dynamic patient, encounter, and transaction table properties created via LBF/LBT mechanism" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="encounter" nullable="false" remarks="0 if patient attribute, else this is an encounter attribute and references the form_encounter.encounter property" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="field_id" nullable="false" remarks="references layout_options.field_id and is the unique property name of this shared attribute" size="31" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="field_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="layout_options"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="last_update" nullable="false" remarks="time of last update" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="user_id" nullable="false" remarks="User who last updated this shared attribute" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="field_value" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="pid" sequenceNumberInPK="1"/>
         <primaryKey column="encounter" sequenceNumberInPK="2"/>
         <primaryKey column="field_id" sequenceNumberInPK="3"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="pid"/>
            <column ascending="true" name="encounter"/>
            <column ascending="true" name="field_id"/>
         </index>
      </table>
      <table catalog="openemr" name="therapy_groups" remarks="Contains all of the therapy groups that exist in the system" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="group_id" nullable="false" remarks="Surrogate id of the record used as the primary incrementing key" size="10" type="INT" typeCode="4">
            <child catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_group_attendance"/>
            <child catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="therapy_group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
            <child catalog="openemr" column="pc_gid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_counselors"/>
            <child catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_participants"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="group_name" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="group_start_date" nullable="false" remarks="Represents the date the group should start" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="group_end_date" nullable="true" remarks="Represents the date the group should end" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="group_type" nullable="false" remarks="Represents the type of therapy group. 1=Closed, 2=Open, 3=Training" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="group_participation" nullable="false" remarks="Represents the participant requirements for the group. 1=Mandatory, 2=Optional" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="group_status" nullable="false" remarks="Represents the current status of the therapy group. 10=Active, 20=Finished, 30=Canceled" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="group_notes" nullable="true" remarks="Notes about the overall therapy group" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="group_guest_counselors" nullable="true" remarks="Names of guest counselors participating in the group that do not exist in the users table" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="null" name="name" nullable="false" remarks="The name of the therapy group" size="0" type="Unknown" typeCode="12"/>
         <primaryKey column="group_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="group_id"/>
         </index>
      </table>
      <table catalog="openemr" name="therapy_groups_counselors" remarks="Contains the relationships between the counselors in a therapy group and the group" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="group_id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="user_id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <primaryKey column="group_id" sequenceNumberInPK="1"/>
         <primaryKey column="user_id" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="group_id"/>
            <column ascending="true" name="user_id"/>
         </index>
      </table>
      <table catalog="openemr" name="therapy_groups_participant_attendance" remarks="Track patient attendance to a therapy group session as contained in the Used by the form_group_attendance table" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="form_id" nullable="false" remarks="The group attendance encounter form that is the container entity used to track this patient's attendance" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_group_attendance"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="meeting_patient_comment" nullable="true" remarks="Comments about the participant's attendance in the meeting" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="meeting_patient_status" nullable="true" remarks="The patient status in the meeting from the list_options.list_id='groupstat'" size="15" type="VARCHAR" typeCode="12">
            <parent catalog="openemr" column="option_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="list_options"/>
         </column>
         <primaryKey column="form_id" sequenceNumberInPK="1"/>
         <primaryKey column="pid" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="form_id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="therapy_groups_participants" remarks="Connects the patient participants to a therapy group" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="group_id" nullable="false" remarks="" size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="group_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="pid" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="group_patient_status" nullable="false" remarks="" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="group_patient_start" nullable="false" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="group_patient_end" nullable="true" remarks="" size="10" type="DATE" typeCode="91"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="group_patient_comment" nullable="true" remarks="" size="65535" type="TEXT" typeCode="-1"/>
         <primaryKey column="group_id" sequenceNumberInPK="1"/>
         <primaryKey column="pid" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="group_id"/>
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="transactions" remarks="Represents patient referrals, and transactional records for billing, legal, and requests from the patient or their physician" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lbf_data"/>
            <child catalog="openemr" column="form_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lbt_data"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="date" nullable="true" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="2" name="title" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="pid" nullable="true" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="''" digits="0" id="4" name="user" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="5" name="groupname" nullable="false" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="authorized" nullable="true" remarks="" size="3" type="TINYINT" typeCode="-6"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="pid" unique="false">
            <column ascending="true" name="pid"/>
         </index>
      </table>
      <table catalog="openemr" name="users" remarks="Contains actors in the system that are not patients.  This includes providers, employees, and external organizations/contacts records as well as system processes.  This does not include API actors" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="Unique identifier for each user in the system." size="19" type="BIGINT" typeCode="-5">
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="amendments"/>
            <child catalog="openemr" column="modified_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="amendments"/>
            <child catalog="openemr" column="post_user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_activity"/>
            <child catalog="openemr" column="user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="ar_session"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="billing"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="contact_relation"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="contact_relation"/>
            <child catalog="openemr" column="owner" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="documents"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drug_sales"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="drug_sales"/>
            <child catalog="openemr" column="uid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="esign_signatures"/>
            <child catalog="openemr" column="provider_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="supervisor_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_groups_encounter"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh_health_concerns"/>
            <child catalog="openemr" column="provider_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="history_data"/>
            <child catalog="openemr" column="imo_user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunization_observation"/>
            <child catalog="openemr" column="administered_by_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="ordering_provider" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="immunizations"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="reporting_source_record_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists_medication"/>
            <child catalog="openemr" column="r_provider" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="medex_recalls"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="onsite_documents"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="amendments_history"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team"/>
            <child catalog="openemr" column="contact_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="care_team_member"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="contact_address"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="contact_address"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="employer_data"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_gad7"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_painmap"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_phq9"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_sdoh"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_treatment_plan"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="issue_encounter"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="issue_encounter"/>
            <child catalog="openemr" column="owner" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="notes"/>
            <child catalog="openemr" column="pc_aid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="pc_informant" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="openemr_postcalendar_events"/>
            <child catalog="openemr" column="advance_directive_user_authenticator" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="providerID" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="ref_providerID" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_history"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="person"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="person"/>
            <child catalog="openemr" column="linked_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="person_patient_link"/>
            <child catalog="openemr" column="person_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="person_patient_link"/>
            <child catalog="openemr" column="assigned_to" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pnotes"/>
            <child catalog="openemr" column="update_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pnotes"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pnotes"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="provider_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="prescriptions"/>
            <child catalog="openemr" column="user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="pro_assessments"/>
            <child catalog="openemr" column="collector_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="provider_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_order"/>
            <child catalog="openemr" column="source" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_report"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
            <child catalog="openemr" column="updated_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="procedure_specimen"/>
            <child catalog="openemr" column="audit_user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_response"/>
            <child catalog="openemr" column="creator_user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="questionnaire_response"/>
            <child catalog="openemr" column="user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="shared_attributes"/>
            <child catalog="openemr" column="user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="therapy_groups_counselors"/>
            <child catalog="openemr" column="user_id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="voids"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="1" name="uuid" nullable="true" remarks="Universally unique identifier for the user." size="16" type="BINARY" typeCode="-2"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="2" name="username" nullable="true" remarks="The username associated with the user's account." size="255" type="VARCHAR" typeCode="12">
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_notes_documents"/>
            <child catalog="openemr" column="created_by" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="clinical_notes_procedure_results"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_group_attendance"/>
            <child catalog="openemr" column="assessor" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_history_sdoh"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_questionnaire_assessments"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_vitals"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="forms"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="groups"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="lists"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_aftercare_plan"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_ankleinjury"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_bronchitis"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_category"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" schema="openemr" table="form_CAMOS_item"/>
            <child catalog="openemr" column="original_user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker"/>
            <child catalog="openemr" column="user" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_tracker_element"/>
         </column>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="3" name="password" nullable="true" remarks="The password for the user's account." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="authorized" nullable="true" remarks="Indicates whether the user is authorized (1 for authorized, 0 for unauthorized)." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="5" name="info" nullable="true" remarks="Additional information or notes about the user." size="2147483647" type="LONGTEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="6" name="source" nullable="true" remarks="An indicator of the source of the user (e.g., internal or external)." size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="7" name="fname" nullable="true" remarks="First name of the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="8" name="mname" nullable="true" remarks="Middle name of the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="lname" nullable="true" remarks="Last name of the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="10" name="suffix" nullable="true" remarks="Suffix for the user's name (e.g., Jr., Sr.)." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="11" name="federaltaxid" nullable="true" remarks="Federal Tax ID associated with the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="12" name="federaldrugid" nullable="true" remarks="Federal Drug ID associated with the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="13" name="upin" nullable="true" remarks="Universal Physician Identification Number for the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="14" name="facility" nullable="true" remarks="The facility where the user is associated." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="15" name="facility_id" nullable="false" remarks="Unique identifier for the user's associated facility." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="16" name="see_auth" nullable="false" remarks="Indicates if the user has the ability to see authorizations." size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="17" name="active" nullable="false" remarks="Indicates the user's activity status (1 for active, 0 for inactive)." size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="18" name="npi" nullable="true" remarks="National Provider Identifier for the user." size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="19" name="title" nullable="true" remarks="Title or designation of the user (e.g., MD, RN)." size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="20" name="specialty" nullable="true" remarks="The specialty of the user (e.g., cardiology, pediatrics)." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="21" name="billname" nullable="true" remarks="Billing name for the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="22" name="email" nullable="true" remarks="Email address associated with the user's account. EMPTY for exports" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="23" name="email_direct" nullable="false" remarks="Trusted Direct email address for the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="24" name="google_signin_email" nullable="true" remarks="Email address for Google Sign-In (if applicable). EMPTY for exports" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="25" name="url" nullable="true" remarks="URL associated with the user's profile." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="26" name="assistant" nullable="true" remarks="Name of the user's assistant or support staff." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="27" name="organization" nullable="true" remarks="Name of the user's organization or practice." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="28" name="valedictory" nullable="true" remarks="Valedictory or honorary title of the user." size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="29" name="street" nullable="true" remarks="Street address for the user. EMPTY for exports" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="30" name="streetb" nullable="true" remarks="Secondary street address for the user. EMPTY for exports" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="31" name="city" nullable="true" remarks="City of residence or practice for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="32" name="state" nullable="true" remarks="State or province of residence or practice for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="33" name="zip" nullable="true" remarks="ZIP code or postal code for the user. EMPTY for exports" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="34" name="country_code" nullable="true" remarks="ISO 3166-1 alpha-2 country code for address but can take entire country name for now" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="35" name="street2" nullable="true" remarks="Alternative street address for the user. EMPTY for exports" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="36" name="streetb2" nullable="true" remarks="Alternative street address for the user. EMPTY for exports" size="60" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="37" name="city2" nullable="true" remarks="Alternative City of residence or practice for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="38" name="state2" nullable="true" remarks="Alternative State or province of residence or practice for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="39" name="zip2" nullable="true" remarks="Alternative ZIP code or postal code for the user. EMPTY for exports" size="20" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="40" name="country_code2" nullable="true" remarks="ISO 3166-1 alpha-2 country code for address but can take entire country name for now" size="255" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="41" name="phone" nullable="true" remarks="Phone number for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="42" name="fax" nullable="true" remarks="Fax number for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="43" name="phonew1" nullable="true" remarks="Work phone number for the user." size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="44" name="phonew2" nullable="true" remarks="Alternative Work phone number for the user." size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="45" name="phonecell" nullable="true" remarks="Cell phone number for the user. EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="46" name="notes" nullable="true" remarks="Additional notes or comments about the user. EMPTY for exports" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="1" digits="0" id="47" name="cal_ui" nullable="false" remarks="UNUSED" size="3" type="TINYINT" typeCode="-6"/>
         <column autoUpdated="false" defaultValue="'207Q00000X'" digits="0" id="48" name="taxonomy" nullable="false" remarks="Taxonomy code associated with the user." size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="49" name="calendar" nullable="false" remarks="Indicates whether the user appears in the calendar (1 for appears, 0 for doesn't appear)." size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="50" name="abook_type" nullable="false" remarks="Address book type for the user." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="51" name="default_warehouse" nullable="false" remarks="Default warehouse for the user." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="52" name="irnpool" nullable="false" remarks="IRN (Insurance Referral Network) pool for the user." size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="53" name="state_license_number" nullable="true" remarks="State license number for the user." size="25" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="54" name="weno_prov_id" nullable="true" remarks="WENO Provider ID for the user. EMPTY for exports" size="15" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="55" name="newcrop_user_role" nullable="true" remarks="Ensora user role for the user.EMPTY for exports" size="30" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="56" name="cpoe" nullable="true" remarks="Indicates whether the user has CPOE (Computerized Physician Order Entry) capabilities." size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="57" name="physician_type" nullable="true" remarks="Type or designation of the physician (e.g., standard, specialist)." size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'standard'" digits="0" id="58" name="main_menu_role" nullable="false" remarks="Main menu role for the user. EMPTY for exports" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="'standard'" digits="0" id="59" name="patient_menu_role" nullable="false" remarks="Patient menu role for the user. EMPTY for exports" size="50" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="60" name="portal_user" nullable="false" remarks="Indicates if the user is a portal user (1 for portal user, 0 for non-portal user). EMPTY for exports" size="3" type="BOOLEAN" typeCode="16"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="61" name="supervisor_id" nullable="false" remarks="Unique identifier of the user's supervisor. EMPTY for exports" size="10" type="INT" typeCode="4"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="62" name="billing_facility" nullable="true" remarks="Billing facility information for the user." size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="63" name="billing_facility_id" nullable="false" remarks="Unique identifier for the user's billing facility." size="10" type="INT" typeCode="4">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="facility"/>
         </column>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="64" name="date_created" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="current_timestamp()" digits="0" id="65" name="last_updated" nullable="false" remarks="" size="19" type="DATETIME" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <primaryKey column="username" sequenceNumberInPK="2"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="abook_type" unique="false">
            <column ascending="true" name="abook_type"/>
         </index>
         <index name="google_signin_email" unique="true">
            <column ascending="true" name="google_signin_email"/>
         </index>
         <index name="uuid" unique="true">
            <column ascending="true" name="uuid"/>
         </index>
      </table>
      <table catalog="openemr" name="voids" remarks="Tracks a voided receipt or checkout for a patient" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="void_id" nullable="false" remarks="" size="19" type="BIGINT" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="patient_id" nullable="false" remarks="The internal patient identifier" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="pid" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="patient_data"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="2" name="encounter_id" nullable="false" remarks="references form_encounter.encounter" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="encounter" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="form_encounter"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="what_voided" nullable="false" remarks="checkout,receipt and maybe other options later" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="4" name="date_original" nullable="true" remarks="time of original action that is now voided" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="date_voided" nullable="false" remarks="time of void action" size="19" type="DATETIME" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="user_id" nullable="false" remarks="references users.id" size="19" type="BIGINT" typeCode="-5">
            <parent catalog="openemr" column="id" foreignKey="Defined in XML" implied="false" onDeleteCascade="false" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="7" name="amount1" nullable="false" remarks="for checkout,receipt total voided adjustments" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="0.00" digits="2" id="8" name="amount2" nullable="false" remarks="for checkout,receipt total voided payments" size="12" type="DECIMAL" typeCode="3"/>
         <column autoUpdated="false" defaultValue="NULL" digits="0" id="9" name="other_info" nullable="true" remarks="for checkout,receipt the old invoice refno" size="65535" type="TEXT" typeCode="-1"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="10" name="reason" nullable="true" remarks="" size="31" type="VARCHAR" typeCode="12"/>
         <column autoUpdated="false" defaultValue="''" digits="0" id="11" name="notes" nullable="true" remarks="" size="255" type="VARCHAR" typeCode="12"/>
         <primaryKey column="void_id" sequenceNumberInPK="1"/>
         <index name="PRIMARY" unique="true">
            <column ascending="true" name="void_id"/>
         </index>
         <index name="datevoided" unique="false">
            <column ascending="true" name="date_voided"/>
         </index>
         <index name="pidenc" unique="false">
            <column ascending="true" name="patient_id"/>
            <column ascending="true" name="encounter_id"/>
         </index>
      </table>
   </tables>
</database>
