Skip to content

Commit d48832d

Browse files
dishahpatelDisha Patel
and
Disha Patel
authored
Adding db column for satellite_lab_name and UI changes for using Satellite Name instead of Id (#143)
* Adding db column for satellite_lab_name and UI changes for using name instead of id * Adding localization for Satellite Lab Name * Fixing satelliteId and SatelliteName mapping * get_satellite_lab_name_by_satellite_lab_id * Fixing IDs --------- Co-authored-by: Disha Patel <[email protected]>
1 parent a504c2d commit d48832d

37 files changed

+278
-143
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `patient` ADD COLUMN `satellite_lab_name` varchar(45) DEFAULT NULL;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE `user` ADD COLUMN `satellite_lab_name` varchar(45) DEFAULT NULL;

htdocs/Language/default.php

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@
234234
"ERROR_MIGRATION" => "There were errors while applying migrations.",
235235
"LAB_CONFIG_ADDED" => "Lab Configuration added",
236236
"SUCCESS_EXPORT" => "Export Successful.",
237-
"PENDING_EXPORT" => "Exporting Lab Configuration. Please wait.."
237+
"PENDING_EXPORT" => "Exporting Lab Configuration. Please wait..",
238+
"SATELLITE_LAB_NAME" => "Satellite Lab Name"
238239
) ,
239240
"header" => array (
240241
"TITLE" => "",
@@ -790,25 +791,25 @@
790791
"CMD_VIEWPROFILE" => "View Profile",
791792
"CMD_DELPROFILE" => "Delete Profile",
792793
"CMD_UPDPROFILE" => "Update Profile"
793-
) ,
794-
"debug" => array (
795-
"DEBUG_UTILITIES" => "Debug Utilities",
796-
"GIT_COMMIT_SHA" => "Git commit SHA",
797-
"BROWSE_SOURCE_CODE" => "browse source code",
798-
"AVAILABLE_LOG_FILES" => "Available Log Files",
799-
"LANGUAGE_UTILITIES" => "Language Utilities",
800-
"RESET_UPDATE_LANGUAGE_FILES" => "Reset/update language files",
801-
"DATABASE_UTILITIES" => "Database Utilities",
802-
"LEGACY_LAB_DATABASE_MIGRATIONS" => "Legacy Lab Database Migrations",
803-
"WARNING" => "Warning!",
804-
"MIGRATION_WARNING" => "Running ANY of these migrations could break your lab configuration PERMANENTLY!",
805-
"MIGRATION_DESCRIPTION" => "These migrations are used to perform manual updates to an imported lab configuration from an older version of BLIS.",
806-
"LAB_DATABASE" => "Lab database",
807-
"SELECT_LAB" => "Select a lab",
808-
"SQL_MIGRATION" => "SQL migration",
809-
"SELECT_MIGRATION" => "Select a migration",
794+
) ,
795+
"debug" => array (
796+
"DEBUG_UTILITIES" => "Debug Utilities",
797+
"GIT_COMMIT_SHA" => "Git commit SHA",
798+
"BROWSE_SOURCE_CODE" => "browse source code",
799+
"AVAILABLE_LOG_FILES" => "Available Log Files",
800+
"LANGUAGE_UTILITIES" => "Language Utilities",
801+
"RESET_UPDATE_LANGUAGE_FILES" => "Reset/update language files",
802+
"DATABASE_UTILITIES" => "Database Utilities",
803+
"LEGACY_LAB_DATABASE_MIGRATIONS" => "Legacy Lab Database Migrations",
804+
"WARNING" => "Warning!",
805+
"MIGRATION_WARNING" => "Running ANY of these migrations could break your lab configuration PERMANENTLY!",
806+
"MIGRATION_DESCRIPTION" => "These migrations are used to perform manual updates to an imported lab configuration from an older version of BLIS.",
807+
"LAB_DATABASE" => "Lab database",
808+
"SELECT_LAB" => "Select a lab",
809+
"SQL_MIGRATION" => "SQL migration",
810+
"SELECT_MIGRATION" => "Select a migration",
810811
"APPLY" => "Apply"
811-
)
812+
)
812813
);
813814

814815
include_once(__DIR__."/../lang/lang_util.php");

htdocs/Language/default.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,10 @@
937937
<key>PENDING_EXPORT</key>
938938
<value>Exporting Lab Configuration. Please wait..</value>
939939
</term>
940+
<term>
941+
<key>SATELLITE_LAB_NAME</key>
942+
<value>Satellite Lab Name</value>
943+
</term>
940944
</page>
941945
<page id="header" descr="Page Header">
942946
<term>

htdocs/Language/en.php

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@
235235
"ERROR_MIGRATION" => "There were errors while applying migrations.",
236236
"LAB_CONFIG_ADDED" => "Lab Configuration added",
237237
"SUCCESS_EXPORT" => "Export Successful.",
238-
"PENDING_EXPORT" => "Exporting Lab Configuration. Please wait.."
238+
"PENDING_EXPORT" => "Exporting Lab Configuration. Please wait..",
239+
"SATELLITE_LAB_NAME" => "Satellite Lab Name"
239240
) ,
240241
"header" => array (
241242
"TITLE" => "",
@@ -791,25 +792,25 @@
791792
"CMD_VIEWPROFILE" => "View Profile",
792793
"CMD_DELPROFILE" => "Delete Profile",
793794
"CMD_UPDPROFILE" => "Update Profile"
794-
) ,
795-
"debug" => array (
796-
"DEBUG_UTILITIES" => "Debug Utilities",
797-
"GIT_COMMIT_SHA" => "Git commit SHA",
798-
"BROWSE_SOURCE_CODE" => "browse source code",
799-
"AVAILABLE_LOG_FILES" => "Available Log Files",
800-
"LANGUAGE_UTILITIES" => "Language Utilities",
801-
"RESET_UPDATE_LANGUAGE_FILES" => "Reset/update language files",
802-
"DATABASE_UTILITIES" => "Database Utilities",
803-
"LEGACY_LAB_DATABASE_MIGRATIONS" => "Legacy Lab Database Migrations",
804-
"WARNING" => "Warning!",
805-
"MIGRATION_WARNING" => "Running ANY of these migrations could break your lab configuration PERMANENTLY!",
806-
"MIGRATION_DESCRIPTION" => "These migrations are used to perform manual updates to an imported lab configuration from an older version of BLIS.",
807-
"LAB_DATABASE" => "Lab database",
808-
"SELECT_LAB" => "Select a lab",
809-
"SQL_MIGRATION" => "SQL migration",
810-
"SELECT_MIGRATION" => "Select a migration",
795+
) ,
796+
"debug" => array (
797+
"DEBUG_UTILITIES" => "Debug Utilities",
798+
"GIT_COMMIT_SHA" => "Git commit SHA",
799+
"BROWSE_SOURCE_CODE" => "browse source code",
800+
"AVAILABLE_LOG_FILES" => "Available Log Files",
801+
"LANGUAGE_UTILITIES" => "Language Utilities",
802+
"RESET_UPDATE_LANGUAGE_FILES" => "Reset/update language files",
803+
"DATABASE_UTILITIES" => "Database Utilities",
804+
"LEGACY_LAB_DATABASE_MIGRATIONS" => "Legacy Lab Database Migrations",
805+
"WARNING" => "Warning!",
806+
"MIGRATION_WARNING" => "Running ANY of these migrations could break your lab configuration PERMANENTLY!",
807+
"MIGRATION_DESCRIPTION" => "These migrations are used to perform manual updates to an imported lab configuration from an older version of BLIS.",
808+
"LAB_DATABASE" => "Lab database",
809+
"SELECT_LAB" => "Select a lab",
810+
"SQL_MIGRATION" => "SQL migration",
811+
"SELECT_MIGRATION" => "Select a migration",
811812
"APPLY" => "Apply"
812-
)
813+
)
813814
);
814815

815816
include_once(__DIR__."/../lang/lang_util.php");

htdocs/Language/en.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,10 @@
941941
<key>PENDING_EXPORT</key>
942942
<value>Exporting Lab Configuration. Please wait..</value>
943943
</term>
944+
<term>
945+
<key>SATELLITE_LAB_NAME</key>
946+
<value>Satellite Lab Name</value>
947+
</term>
944948
</page>
945949
<page id="header" descr="Page Header">
946950
<term>

htdocs/Language/fr.php

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@
219219
"ERROR_MIGRATION" => "Des erreurs se sont produites lors de l'application des migrations.",
220220
"LAB_CONFIG_ADDED" => "Configuration du labo ajoutée",
221221
"SUCCESS_EXPORT" => "Exportation réussie.",
222-
"PENDING_EXPORT" => "Exportation de la configuration du laboratoire. Veuillez patienter.."
222+
"PENDING_EXPORT" => "Exportation de la configuration du laboratoire. Veuillez patienter..",
223+
"SATELLITE_LAB_NAME" => "Satellite Lab Name"
223224
) ,
224225
"header" => array (
225226
"TITLE" => "",
@@ -735,25 +736,25 @@
735736
"SEARCH_BEGIN_WITH" => "Commence par",
736737
"SEARCH_END_WITH" => "Fin d'",
737738
"SEARCH_CONTAINS" => "Contient"
738-
) ,
739-
"debug" => array (
740-
"DEBUG_UTILITIES" => "Utilitaires de débogage",
741-
"GIT_COMMIT_SHA" => "SHA du commit Git",
742-
"BROWSE_SOURCE_CODE" => "parcourir le code source",
743-
"AVAILABLE_LOG_FILES" => "Fichiers de journal disponibles",
744-
"LANGUAGE_UTILITIES" => "Utilitaires de langue",
745-
"RESET_UPDATE_LANGUAGE_FILES" => "Réinitialiser/mettre à jour les fichiers de langue",
746-
"DATABASE_UTILITIES" => "Utilitaires de base de données",
747-
"LEGACY_LAB_DATABASE_MIGRATIONS" => "Migrations de la base de données du laboratoire hérité",
748-
"WARNING" => "Attention!",
749-
"MIGRATION_WARNING" => "Exécuter l'une de ces migrations pourrait casser votre configuration de laboratoire DE MANIÈRE PERMANENTE !",
750-
"MIGRATION_DESCRIPTION" => "Ces migrations sont utilisées pour effectuer des mises à jour manuelles d'une configuration de laboratoire importée à partir d'une ancienne version de BLIS.",
751-
"LAB_DATABASE" => "Base de données du laboratoire",
752-
"SELECT_LAB" => "Sélectionnez un laboratoire",
753-
"SQL_MIGRATION" => "Migration SQL",
754-
"SELECT_MIGRATION" => "Sélectionnez une migration",
755-
"APPLY" => "Appliquer"
756-
)
739+
) ,
740+
"debug" => array (
741+
"DEBUG_UTILITIES" => "Utilitaires de débogage",
742+
"GIT_COMMIT_SHA" => "SHA du commit Git",
743+
"BROWSE_SOURCE_CODE" => "parcourir le code source",
744+
"AVAILABLE_LOG_FILES" => "Fichiers de journal disponibles",
745+
"LANGUAGE_UTILITIES" => "Utilitaires de langue",
746+
"RESET_UPDATE_LANGUAGE_FILES" => "Réinitialiser/mettre à jour les fichiers de langue",
747+
"DATABASE_UTILITIES" => "Utilitaires de base de données",
748+
"LEGACY_LAB_DATABASE_MIGRATIONS" => "Migrations de la base de données du laboratoire hérité",
749+
"WARNING" => "Attention!",
750+
"MIGRATION_WARNING" => "Exécuter l'une de ces migrations pourrait casser votre configuration de laboratoire DE MANIÈRE PERMANENTE !",
751+
"MIGRATION_DESCRIPTION" => "Ces migrations sont utilisées pour effectuer des mises à jour manuelles d'une configuration de laboratoire importée à partir d'une ancienne version de BLIS.",
752+
"LAB_DATABASE" => "Base de données du laboratoire",
753+
"SELECT_LAB" => "Sélectionnez un laboratoire",
754+
"SQL_MIGRATION" => "Migration SQL",
755+
"SELECT_MIGRATION" => "Sélectionnez une migration",
756+
"APPLY" => "Appliquer"
757+
)
757758
);
758759

759760
include_once(__DIR__."/../lang/lang_util.php");

htdocs/Language/fr.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,10 @@
878878
<key>PENDING_EXPORT</key>
879879
<value>Exportation de la configuration du laboratoire. Veuillez patienter..</value>
880880
</term>
881+
<term>
882+
<key>SATELLITE_LAB_NAME</key>
883+
<value>Satellite Lab Name</value>
884+
</term>
881885
</page>
882886
<page id="header" descr="Page Header">
883887
<term>

htdocs/ajax/lab_user_add.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
$username=$_REQUEST['u'];
1616
$password=$_REQUEST['p'];
1717
$fullname = $_REQUEST['fn'];
18+
$satellite_lab_name = $_REQUEST['sln'];
1819
$email = $_REQUEST['em'];
1920
$phone = $_REQUEST['ph'];
2021
$user_type = $_REQUEST['ut'];
@@ -62,6 +63,7 @@
6263
$user->password = $password;
6364
$user->level = $user_type;
6465
$user->actualName = $fullname;
66+
$user->satelliteLabName = $satellite_lab_name;
6567
$user->labConfigId = $lab_config_id;
6668
$user->email = $email;
6769
$user->phone = $phone;
@@ -84,7 +86,7 @@
8486
</td>
8587
</tr>
8688
</table>
87-
<?php
89+
<?php
8890
}
8991
else
9092
echo "User already exists";

htdocs/ajax/lab_user_update.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
$user_id = $_REQUEST['id'];
1313
$username = $_REQUEST['un'];
1414
$fullname = $_REQUEST['fn'];
15+
$satellite_lab_name = $_REQUEST['sln'];
1516
$email = $_REQUEST['em'];
1617
$phone = $_REQUEST['ph'];
1718
$new_pwd = $_REQUEST['p'];
@@ -31,6 +32,7 @@
3132
$user->userId = $user_id;
3233
$user->username = $username;
3334
$user->actualName = $fullname;
35+
$user->satelliteLabName = $satellite_lab_name;
3436
$user->email = $email;
3537
$user->phone = $phone;
3638
$user->password = $new_pwd;

htdocs/ajax/patient_add.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
$patient->regDate=$date_receipt;
135135
$patient->surrogateId = $pid;
136136
$patient->satelliteLabId = $satellite_lab_id;
137+
$patient->satelliteLabName = get_satellite_lab_name_by_satellite_lab_id($satellite_lab_id);
137138
$patient->createdBy = $_SESSION['user_id'];
138139
update_daily_number_registration();
139140
$patient_added = add_patient($patient);

htdocs/ajax/patient_update.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ function get_custom_value($custom_field)
8585
$updated_profile->sex = $sex;
8686
$updated_profile->surrogateId = $surr_id;
8787
$updated_profile->satelliteLabId = $satellite_lab_id;
88+
$updated_profile->satelliteLabName = get_satellite_lab_name_by_satellite_lab_id($satellite_lab_id);
8889

8990
$flag = update_patient($updated_profile);
9091
# Handle custom fields

0 commit comments

Comments
 (0)