Skip to content

Commit

Permalink
[IDWA-OCR-95] ocr to phdc conversion logic for patient (#107)
Browse files Browse the repository at this point in the history
* added ocr to phdc conversion logic for patient

* edited function calls

* edited lock file

* remove ocr as name

* Regenerated poetry.lock after resolving merge conflicts

---------

Co-authored-by: Arindam Kulshi <[email protected]>
  • Loading branch information
arinkulshi-skylight and arinkulshi authored Jun 28, 2024
1 parent f09b511 commit 60288d7
Show file tree
Hide file tree
Showing 9 changed files with 1,176 additions and 1 deletion.
22 changes: 22 additions & 0 deletions OCR/ocr/phdc_conversion_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from services.phdc_converter.phdc_converter import PHDCConverter
import os
import json


path = os.path.dirname(__file__)


def main():
json_file = os.path.join(path, "../tests/assets/ocr_values.json")
with open(json_file, "r") as f:
json_data = json.load(f)

generator = PHDCConverter()
phdc_xml = generator.generate_phdc_document(json_data)

with open("phdc_document.xml", "w") as file:
file.write(phdc_xml)


if __name__ == "__main__":
main()
Empty file.
Loading

0 comments on commit 60288d7

Please sign in to comment.