Mercurial > hgweb > health-doc
changeset 164:c73d0fdc2eec
gnuhealth-his/source/userguide/laboratory.rst: Update lab interface doc.
| author | Feng Shu <tumashu@163.com> |
|---|---|
| date | Mon, 11 Mar 2024 14:41:16 +0800 |
| parents | 6820e52070f6 |
| children | 9732f97e570c |
| files | gnuhealth-his/source/userguide/laboratory.rst |
| diffstat | 1 files changed, 38 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/gnuhealth-his/source/userguide/laboratory.rst +++ b/gnuhealth-his/source/userguide/laboratory.rst @@ -274,23 +274,38 @@ Of course, there can be higher or lower degree of automation, but most of this steps will exist in many scenarios. -.. _userguide-laboratory:laboratory-interfaces_with_laboratories_and_lims-sample_interface: +.. _userguide-laboratory:laboratory-interfaces_with_laboratories_and_lims-interface_tool: -Sample interface -^^^^^^^^^^^^^^^^ -As part of the GNU Health documentation, there is now a sample script that will take a csv encoded batch file and upload the results to GNU Health. +Interface Tool +^^^^^^^^^^^^^^ +As part of the GNU Health installation, there is a tool named gnuhealth-data-import that will take csv or ods data files and upload the results to GNU Health. -This program reads a CSV formatted file that contains the lab test id, the analytes and its results. +This program reads CSV or ODS formatted files that contain the following fields: -Included in the directory, there is a sample TEST006.csv, that contains the results of the test "TEST006", a "Complete Blood Count - CBC" +1. test_id +2. analyte_code, this field will be searched in LIS system. +3. analyte_name, this field will be searched in LIS system too, for analyte_name in LIS system will be changed depend on user language, so we prefer use anylyte_code if possible. +4. result +5. result_text +6. _ignore, if its value is 'yes', this line will be ignore to import. +7. _type, set its value to 'labtest' if this csv or ods file is labtest data. + + +.. warning:: + Field analyte_code is introduced in gnuhealth 4.4.0, the older test result data in LIS system will not have this field or value is None, please check in gnuhealth GUI: + + Laboratory > Lab Tests Results > Code field of Lab Test Critearea. + + +In gnuhealth-data-import data direcory, there are two sample files: 4-labtests.csv and 4-labtests.ods, that contains the results of the test "TEST001" and "TEST006", "Complete Blood Count - CBC" You can customize the program (GNU Health server name, credentials, ...), as well as the lab test result file. Of course, the name of the lab test result can be change to meet your needs. -You can find the latest version of the sample program in the GNU Health mercurial server, on the development branch : +You can find the latest version of gnuhealth-data-import tool in the GNU Health mercurial server, on the development branch : -https://hg.savannah.gnu.org/hgweb/health/file/tip/tryton/doc/samples/interfaces/lab +https://hg.savannah.gnu.org/hgweb/health/file/tip/tryton/scripts/gnuhealth-data-import -.. _userguide-laboratory:laboratory-interfaces_with_laboratories_and_lims-sample_interface-requirements: +.. _userguide-laboratory:laboratory-interfaces_with_laboratories_and_lims-interface_tool-requirements: Requirements """""""""""" @@ -298,6 +313,8 @@ * GNU Health : |version| * Proteus Tryton library : |tryton_version| +* Pandas +* odfpy Installing proteus: @@ -307,7 +324,7 @@ $ pip3 install --user "proteus>=|tryton_version|,<|tryton_bigger|" -.. _userguide-laboratory:laboratory-interfaces_with_laboratories_and_lims-sample_interface-usage: +.. _userguide-laboratory:laboratory-interfaces_with_laboratories_and_lims-interface_tool-usage: Usage """"" @@ -317,11 +334,20 @@ .. code-block:: console - $ python3 gnuhealth_csv_lab_interface.py TEST006.csv + $ python3 gnuhealth-data-import.py -f data/4-labtests.csv -H <HOST> -p <PORT> -u <USER> -P <PASSWORD> -d <DB> + + +More informations can be found: + +.. code-block:: console + + + $ python3 gnuhealth-data-import.py --help + The main program steps are : * Test connection to the GNU Health server * Check that the Lab test has been created on GNU Health (eg, TEST006) -* Check that the analytes from the csv files are on the system +* Check that the analytes from the csv or ods files are on the LIS system. * Upload the results.
