diff --git a/python.py b/python.py new file mode 100644 index 0000000000..45ba391006 --- /dev/null +++ b/python.py @@ -0,0 +1,26 @@ +import json +import pandas as pd +import os +from pathlib import Path + +# Load and inspect the first JSON file to determine the structure +file_path = "/workspaces/synthea/output/fhir" # Directory where files are uploaded +json_files = list(Path(file_path).glob("*.json")) + +# Check the structure of one file +if json_files: + sample_file = json_files[0] + with open(sample_file, "r") as f: + data = json.load(f) + + # Extracting general structure + resource_entries = data.get("entry", []) + + # Collecting resource types + resource_types = set(entry["resource"]["resourceType"] for entry in resource_entries if "resource" in entry) + + resource_types +else: + resource_types = "No JSON files found." + +resource_types diff --git a/src/main/resources/modules/post_op_recovery.json b/src/main/resources/modules/post_op_recovery.json new file mode 100644 index 0000000000..9c1f9c5ed1 --- /dev/null +++ b/src/main/resources/modules/post_op_recovery.json @@ -0,0 +1,16 @@ +{ + "name": "Post-Operative Recovery", + "states": { + "Initial": { + "type": "Initial", + "direct_transition": "Assess_Patient_Recovery" + }, + "Assess_Patient_Recovery": { + "type": "Simple", + "direct_transition": "End" + }, + "End": { + "type": "Terminal" + } + } +} \ No newline at end of file diff --git a/src/main/resources/synthea.properties b/src/main/resources/synthea.properties index 008b3f9382..9d2ae1fb6b 100644 --- a/src/main/resources/synthea.properties +++ b/src/main/resources/synthea.properties @@ -106,7 +106,7 @@ exporter.enable_custom_exporters = true # the number of patients to generate, by default # this can be overridden by passing a different value to the Generator constructor -generate.default_population = 1 +generate.default_population = 1000 # the number of threads to use for the generator, set the value to -1 to match the number of # available processors (as per Runtime.getRuntime().availableProcessors())