Open pri2si17-1997 opened 7 years ago
Hello @aethelwulffe @teryhill, please give the details of following tables (it will contain almost all):
What is it meant for?
Why all fields are null leaving id as it is primary key. According to me only line2
can be left as null. Rest are the important components of address and we must not store them as null.
What is plus_four and foreign_id?
What is it meant for?
There is no primary key in the table.
amc_id
, map_category
and map_id
are referencing to other tables. So they must be foreign keys. Also date_created
and date_completed
are null. What is its purpose?
amendment_status
is null. We can create one more option as NOT PROCESSED
as default value instead of null. Or something more relevant.
pid
it must be foreign key as in comments it is mentioned that Patient ID from patient_data
. What is your opinion? In present it is mentioned as key.
Again its purpose. It may be default question for all of the tables as I don't know the purpose of each table. May be some irritating question.
No primary key. amendment_id
is again a key.
Meaning of created by
it is of integer type.
amendment_status
is null allowed.
This table must have some reference to amendments table. So we must create a foreign key. Also if amendment_id
is foreign key then also we must have a primary key in the table.
Will ask for more tables soon. Else this post will become lengthy.
addresses:
AMC: AMC, CQM, and Standard reporting is all outdated and of no current use. Related tables are report_results, report_itemized and many others. It is part of the clinical_rules engine. This particular table will not do anything useful for a user. Amendments: These are amendments to clinical forms. PID is the patient id that it is linked to. Look for an amendment menu item and you will probably get it to feed some data into your records that will show the relationships. Created by will be a user table ID. The amendment history is to track who/when a record is amended. The full use of this is not something I have to deal with often, as it is a low priority feature that many clinics don't bother with. All the same, you can find a global to toggle this feature, and I believe it is on by default. Look on the patient dashboard (well below the basic demographics) to see this feature. When adding an amendment, you get a pop-up. Locations: ---------- Find in Files ----------
Searching for the string 'amendments'... C:\AlphaFiles\bidenis\REPOS\LibreEHR\contrib\util\language_translations\currentConstants.txt(1997,8): Enable amendments feature C:\AlphaFiles\bidenis\REPOS\LibreEHR\contrib\util\language_translations\currentConstants.txt(5681,8): Select amendments to print C:\AlphaFiles\bidenis\REPOS\LibreEHR\contrib\util\language_translations\currentLanguage_utf8.sql(2107,16): (2010, 'Enable amendments feature'), C:\AlphaFiles\bidenis\REPOS\LibreEHR\contrib\util\language_translations\currentLanguage_utf8.sql(5815,16): (5718, 'Select amendments to print'), C:\AlphaFiles\bidenis\REPOS\LibreEHR\contrib\util\language_translations\current_spreadsheet.tsv(2083,13): 2010 Enable amendments feature Toestaan van aanpassingen mogelijkheid ??????? ??????????? ???????????????? Abilita modifiche presentate ???????????? ????????? ????? dummy C:\AlphaFiles\bidenis\REPOS\LibreEHR\contrib\util\language_translations\current_spreadsheet.tsv(5839,13): 5718 Select amendments to print Selecteer veranderingen om te printen ?????? ??????????? ?????? ???????????????? Seleziona le modifiche di stampa Vybrat zmeny k tisku ?????? ?????????? ????? dummy C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(42,31): $query = "INSERT INTO amendments SET C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(64,26): $query = "UPDATE amendments SET C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(84,20): // Insert into amendments_history C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(85,27): $query = "INSERT INTO amendments_history SET C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(99,31): header("Location:add_edit_amendments.php?id=$amendment_id"); C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(105,29): $query = "SELECT FROM amendments WHERE amendment_id = ? "; C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(112,29): $query = "SELECT FROM amendments_history ah INNER JOIN users u ON ah.created_by = u.id WHERE amendment_id = ? "; C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(168,18): $("#add_edit_amendments").submit(); C:\AlphaFiles\bidenis\REPOS\LibreEHR\interface\patient_file\summary\add_edit_amendments.php(176,24):
Hello @aethelwulffe @teryhill @tmccormi
This issue is regarding proper documentation of database and its tables. We can have simultaneous update in table structure if needed and add it here.