Documentation/EHI_Export/docs/tables/prescriptions.html
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | INT | 10 | √ | null |
| lists_medication.prescription_id | Defined in XML | R |
|
| | | uuid | BINARY | 16 | √ | | NULL |
|
| | | patient_id | BIGINT | 19 | √ | | NULL |
|
| patient_data.pid | Defined in XML | R |
|
The internal patient identifier
| | filled_by_id | INT | 10 | √ | | NULL |
|
|
UNUSED - will be removed in the future
| | pharmacy_id | INT | 10 | √ | | NULL |
|
| pharmacies.id | Defined in XML | R |
|
The internal identifier for the pharmacy that is connected to this prescription
| | date_added | DATETIME | 19 | √ | | NULL |
|
|
Datetime the prescriptions was initially created
| | date_modified | DATETIME | 19 | √ | | NULL |
|
|
Datetime the prescriptions was last modified
| | provider_id | INT | 10 | √ | | NULL |
|
| users.id | Defined in XML | R |
|
The id of the user that created this prescription
| | encounter | INT | 10 | √ | | NULL |
|
| | | start_date | DATE | 10 | √ | | NULL |
|
| | | drug | VARCHAR | 150 | √ | | NULL |
|
| | | drug_id | INT | 10 | | | 0 |
|
| drugs.drug_id | Defined in XML | R |
|
The id of the drug that was prescribed to the patient. 0 if the drug was manually entered
| | rxnorm_drugcode | VARCHAR | 25 | √ | | NULL |
|
| | | form | INT | 10 | √ | | NULL |
|
| | | dosage | VARCHAR | 100 | √ | | NULL |
|
| | | quantity | VARCHAR | 31 | √ | | NULL |
|
| | | size | VARCHAR | 25 | √ | | NULL |
|
| | | unit | INT | 10 | √ | | NULL |
|
| | | route | VARCHAR | 100 | √ | | NULL |
|
| list_options.option_id | Defined in XML | R |
|
Comes from the list_options.list_id=‘drug_route’
| | interval | INT | 10 | √ | | NULL |
|
| | | substitute | INT | 10 | √ | | NULL |
|
| | | refills | INT | 10 | √ | | NULL |
|
| | | per_refill | INT | 10 | √ | | NULL |
|
| | | filled_date | DATE | 10 | √ | | NULL |
|
| | | medication | INT | 10 | √ | | NULL |
|
| | | note | TEXT | 65535 | √ | | NULL |
|
| | | active | INT | 10 | | | 1 |
|
| | | datetime | DATETIME | 19 | √ | | NULL |
|
| | | user | VARCHAR | 50 | √ | | NULL |
|
| | | site | VARCHAR | 50 | √ | | NULL |
|
| | | prescriptionguid | VARCHAR | 50 | √ | | NULL |
|
| | | erx_source | TINYINT | 3 | | | 0 |
|
|
0-OpenEMR 1-External
| | erx_uploaded | TINYINT | 3 | | | 0 |
|
|
0-Pending Ensora upload 1-Uploaded to Ensora
| | drug_info_erx | TEXT | 65535 | √ | | NULL |
|
| | | external_id | VARCHAR | 20 | √ | | NULL |
|
| | | end_date | DATE | 10 | √ | | NULL |
|
| | | indication | TEXT | 65535 | √ | | NULL |
|
| | | prn | VARCHAR | 30 | √ | | NULL |
|
| | | ntx | INT | 10 | √ | | NULL |
|
| | | rtx | INT | 10 | √ | | NULL |
|
| | | txDate | DATE | 10 | | | null |
|
| | | usage_category | VARCHAR | 100 | √ | | NULL |
|
| list_options.option_id | Defined in XML | R |
|
Comes from the list_options.list_id=‘medication-usage-category’
| | usage_category_title | VARCHAR | 255 | | | null |
|
|
title in list_options.list_id=medication-usage-category
| | request_intent | VARCHAR | 100 | √ | | NULL |
|
| list_options.option_id | Defined in XML | R |
|
Comes from the list_options.list_id=‘medication-request-intent’
| | request_intent_title | VARCHAR | 255 | | | null |
|
|
title in list_options.list_id=medication-request-intent
| | drug_dosage_instructions | LONGTEXT | 2147483647 | √ | | NULL |
|
|
Medication dosage instructions
| | created_by | BIGINT | 19 | √ | | NULL |
|
| users.id | Defined in XML | R |
|
The id of the user that initially created this record
| | updated_by | BIGINT | 19 | √ | | NULL |
|
| users.id | Defined in XML | R |
|
The id of the user that last updated this record
| | diagnosis | TEXT | 65535 | √ | | NULL |
|
|
The reason/justification for the prescription. Format is a text string in the format of ‘system:code;system:code2;system:coden’
|
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| patient_id | Performance | Asc | patient_id |
| uuid | Must be unique | Asc | uuid |