-
Notifications
You must be signed in to change notification settings - Fork 686
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cc0a62
commit 1af9b27
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters