Data update with batch file

Last modified by Mr on 2025/08/13 11:46

The ClinLab software allows data updates in the database using batch import. Rules for records update are almost same as for import and it must meet the following conditions:

  • File extension is txt or csv.
  • File encoding is UTF-8 without BOM.
  • Columns are separated by commas.
  • Text does not need to be enclosed in quotation marks unless it contains a comma.
  • Decimal numbers are separated by a dot.
  • Dates are in the format DD/MM/YYYY.
  • Checkbox values are "on" (checked) or "off" (unchecked).
  • The first row contains a header with the identification of imported parameters.
  • The first column contains the patient identification (idPatient), followed by the form definition (form) where the parameter we want to update is located, and then the parameter definition (param) separated by an underscore.
  • For categorical parameters, the imported text value must exactly match the displayed text on the form.

Identification of patient parameters:

You can use the following items for identifying patient parameters:

Identification

Description

Format

 idPatient

 ID patient (mandatory)

number

 firstName

name

text

lastName

surname

text

sex

sex

M - male

F - female

address

adress

text

personalID

personal identification number

700101/1111

email

email

telephone

telephone number

(+420)731111111

healthInsurance

heath insurance

name of health insurance

birthDate

date of birth

01/01/1970

Identification of other form parameters:

Identification of other parameters on the form can be found in the data export to xlsx format. The number of imported parameters is not limited.

The format for identifying an imported parameter is form{idForm}_param{idParam}.

Each form in the study has its own ID, and to retrieve it, you need to contact the administrator.

Each parameter in the form has its own ID. These IDs can be obtained from the data export to Excel.

https://confluence.imtm.cz/download/attachments/38895655/image2020-5-8_15-34-3.png?version=1&modificationDate=1592302789000&api=v2

Example of update batch files

Numbers with decimal comma are separated by quotes, and checkbox selections are set using the values on/off.

https://confluence.imtm.cz/download/attachments/74055746/image2022-5-17_13-5-6.png?version=1&modificationDate=1652792706000&api=v2

image2020-6-16_10-54-16.png

Description of the last example:

  • Updating data for patient with ID 28620
  • Updating data on forms 775 and 774
  • Updating parameters 5119, 5120, 5122, 5123, and 6796

Update batch file example of record not specified by idPatient

Update of record not identified with idPatient, but by user unique paramter specified in column "key". Please beware if more matches for key parameter are find, only value of first finding is updated. 

1755067395862-464.png

Update batch file example of repeated parameter

Update of record with idPatient 100000 within specific repeating. Name of repeating parameter is defined in column "key" and specific value needs to be defined in separate column. In this case "form19_param20264".

1755067117984-199.png