Back to Openemr

documents

Documentation/EHI_Export/docs/tables/documents.html

latest5.6 KB
Original Source

Columns

ColumnTypeSizeNullsAutoDefaultChildrenParentsComments
idINT100

| categories_to_documents.document_id | Defined in XML | R | | clinical_notes_documents.document_id | Defined in XML | R | | ehi_export_job_tasks.export_document_id | FK_task_ehi_export_document_id | R | | notes.foreign_id | Defined in XML | R | | procedure_result.document_id | Defined in XML | R |

|

|

Surrogate id of the record used as the primary incrementing key

| | uuid | BINARY | 16 | √ | | NULL |

|

|

Binary of Unique User Identifier that is for both external reference to this entity and for future offline use.

| | type | enum('file_url', 'blob', 'web_url') | 8 | √ | | NULL |

|

|

Type of the document (e.g., ‘file_url’, ‘blob’, ‘web_url’)

| | size | INT | 10 | √ | | NULL |

|

|

Size of the document in bytes

| | date | DATETIME | 19 | √ | | NULL |

|

|

Date when the document was created

| | date_expires | DATETIME | 19 | √ | | NULL |

|

|

Date when the document expires and is no longer available.

| | url | VARCHAR | 255 | √ | | NULL |

|

|

URL of the document

| | thumb_url | VARCHAR | 255 | √ | | NULL |

|

|

URL of the document’s thumbnail

| | mimetype | VARCHAR | 255 | √ | | NULL |

|

|

MIME type of the document

| | pages | INT | 10 | √ | | NULL |

|

|

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

| | owner | INT | 10 | √ | | NULL |

|

| users.id | Defined in XML | R |

|

Foreign key identifier to users of who initially persisted the document

| | revision | TIMESTAMP | 19 | | | current_timestamp() |

|

|

Timestamp of the last time the document was changed and persisted

| | foreign_id | BIGINT | 19 | √ | | NULL |

|

| patient_data.pid | Defined in XML | R |

|

The internal patient identifier

| | docdate | DATE | 10 | √ | | NULL |

|

|

Date (YYYY-MM-DD) logically associated with the document, e.g. when a picture was taken.

| | hash | VARCHAR | 255 | √ | | NULL |

|

|

Hash value of the document from when it was uploaded

| | list_id | BIGINT | 19 | | | 0 |

|

| lists.id | Defined in XML | R |

|

FK to lists.id associated with the document when the document is related to an issue

| | name | VARCHAR | 255 | √ | | NULL |

|

|

Name of the document. Populated since OpenEMR versions 6.0.0+

| | drive_uuid | BINARY | 16 | √ | | NULL |

|

|

UUID of the document’s drive. Empty in export

| | couch_docid | VARCHAR | 100 | √ | | NULL |

|

|

CouchDB document ID

| | couch_revid | VARCHAR | 100 | √ | | NULL |

|

|

CouchDB revision ID

| | storagemethod | TINYINT | 3 | | | 0 |

|

|

Storage method (0->Harddisk, 1->CouchDB)

| | path_depth | TINYINT | 3 | √ | | 1 |

|

|

Depth of path to use in the URL to find the document. Not applicable for CouchDB. . Empty in export.

| | imported | TINYINT | 3 | √ | | 0 |

|

|

Parsing status for CCR/CCD/CCDA importing

| | encounter_id | BIGINT | 19 | | | 0 |

|

| form_encounter.encounter | Defined in XML | R |

|

Encounter ID if tagged

| | encounter_check | BOOLEAN | 3 | | | 0 |

|

|

If an encounter is created while tagging (0 or 1)

| | audit_master_approval_status | TINYINT | 3 | | | 1 |

|

|

Approval status from audit_master table

| | audit_master_id | INT | 10 | √ | | NULL |

|

|

ID from the audit_master table

| | documentationOf | VARCHAR | 255 | √ | | NULL |

|

|

Used for CCDA and lab documents where the individual / contents of the documentation of a service event is recorded

| | encrypted | TINYINT | 3 | | | 0 |

|

|

Encryption status (0->No, 1->Yes)

| | document_data | MEDIUMTEXT | 16777215 | √ | | NULL |

|

|

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

| | deleted | BOOLEAN | 3 | | | 0 |

|

|

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

| | foreign_reference_id | BIGINT | 19 | √ | | NULL |

|

|

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

| | foreign_reference_table | VARCHAR | 40 | √ | | NULL |

|

|

Table associated with the foreign reference_id will be populated if foreign_reference_id is populated

|

Indexes

Constraint NameTypeSortColumn(s)
PRIMARYPrimary keyAscid
drive_uuidMust be uniqueAscdrive_uuid
foreign_idPerformanceAscforeign_id
foreign_referencePerformanceAsc/Ascforeign_reference_id + foreign_reference_table
ownerPerformanceAscowner
revisionPerformanceAscrevision
uuidMust be uniqueAscuuid

Relationships

Close relationships within degrees of separation