Skip to content

Commit

Permalink
Code correction
Browse files Browse the repository at this point in the history
  • Loading branch information
anjus1313 committed Jul 11, 2024
1 parent 82c0e2d commit c340380
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/msfocr/docTR/ocr_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,14 @@ def generate_key_value_pairs(table):
data_element_id = data_upload_DHIS2.getAllUIDs('dataElements', [data_element])[0][1]
id_found[data_element] = data_element_id
print(data_element, data_element_id)
else:
data_element_id = id_found[data_element]
if category not in id_found:
category_id = data_upload_DHIS2.getAllUIDs('categoryOptions', [category])[0][1]
id_found[category] = category_id
else:
category_id = id_found[category]

# Append to the list of data elements to be push to DHIS2
data_element_pairs.append(
{'dataElement': data_element_id,
Expand Down

0 comments on commit c340380

Please sign in to comment.