Skip to content

Commit

Permalink
MRP Data collection
Browse files Browse the repository at this point in the history
  • Loading branch information
srivatsavaramkishan committed Jan 30, 2025
1 parent 2cc0a62 commit 1af9b27
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
26 changes: 26 additions & 0 deletions python.py
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions src/main/resources/modules/post_op_recovery.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/synthea.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 1af9b27

Please sign in to comment.