| pi_id | int(11) | NO | | PRI | auto_increment | |
| pi_cus_id | int(11) | NO | | MUL | | |
| pi_cli_id | int(11) | NO | | MUL | | |
| pi_pat_id | int(11) | NO | | MUL | | |
| pi_pic_id | int(11) | NO | | MUL | | |
| pi_lbl_id | int(11) | NO | | MUL | | |
| pi_pre_id | int(11) | NO | | MUL | | |
| pi_ins_id | int(11) | NO | | MUL | | |
| pi_enc_id | int(11) | NO | | MUL | | |
| pi_fmt_id | int(11) | NO | 0 | | | Indicates a special file type for patient documents |
| pi_usr_id_attached | int(11) | NO | | MUL | | |
| pi_usr_attached | timestamp | YES | CURRENT_TIMESTAMP | | | |
| pi_ins_link | text | NO | | | | |
| pi_ins_irep_id | int(11) | NO | | MUL | | |
| pi_path | text | NO | | | | |
| pi_bucket | varchar(40) | NO | ahi_cloudfiles_encrypt | | | Which bucket in S3 does the path belong to. If empty string, path is on local hard disk. |
| pi_size | varchar(120) | NO | 0 | | | |
| pi_result_code | varchar(128) | NO | | | | Result code |
| pi_cs_id | int(11) | YES | | | | Coding system id |
| pi_result_desc | text | YES | | | | Result description |
| pi_pat_pid | varchar(20) | NO | | | | |
| pi_verified | char(1) | NO | | MUL | | |
| pi_incorporated | tinyint(1) | YES | 0 | | | Indicates whether this document has been incorporated into the patient record (applies to CCDA files only). |
| pi_disabled | char(1) | NO | 0 | MUL | | |
| pi_name | text | NO | | | | |
| pi_desc | text | NO | | | | |
| pi_date | date | YES | | | | Used for client dating of patient document |
| pi_id_ext | int(11) | NO | | MUL | | |
| pi_modified | timestamp | YES | CURRENT_TIMESTAMP | | on update CURRENT_TIMESTAMP | |
| pi_created | timestamp | YES | CURRENT_TIMESTAMP | | | |
| pi_viewed_portal | tinyint(1) | YES | 0 | | | Indicates whether the document was viewed in the patient portal |