Skip to content

Commit 268a0bf

Browse files
add bundle.json data and remove patient.json
comment several lines in create_test_data.py
1 parent 7ba80c3 commit 268a0bf

3 files changed

Lines changed: 232 additions & 30 deletions

File tree

create_test_data.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,17 @@
163163
}
164164
})
165165

166-
# Save the patient files to the input directory
167-
with open(os.path.join(input_dir, "patient1.json"), "w") as f:
168-
json.dump(patient_example, f, indent=2)
169-
170-
with open(os.path.join(input_dir, "patient2.json"), "w") as f:
171-
json.dump(patient_example2, f, indent=2)
172-
173-
# Save each medication to a separate file
174-
for i, med in enumerate(medication_examples):
175-
with open(os.path.join(input_dir, f"medication{i+1}.json"), "w") as f:
176-
json.dump(med, f, indent=2)
166+
# # Save the patient files to the input directory
167+
# with open(os.path.join(input_dir, "patient1.json"), "w") as f:
168+
# json.dump(patient_example, f, indent=2)
169+
#
170+
# with open(os.path.join(input_dir, "patient2.json"), "w") as f:
171+
# json.dump(patient_example2, f, indent=2)
172+
#
173+
# # Save each medication to a separate file
174+
# for i, med in enumerate(medication_examples):
175+
# with open(os.path.join(input_dir, f"medication{i+1}.json"), "w") as f:
176+
# json.dump(med, f, indent=2)
177177

178178
# Create a bundle with all resources for testing bulk processing
179179
bundle = {

input/bundle.json

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
{
2+
"resourceType": "Bundle",
3+
"type": "collection",
4+
"entry": [
5+
{
6+
"resource": {
7+
"resourceType": "Patient",
8+
"id": "example-patient-1",
9+
"name": [
10+
{
11+
"use": "official",
12+
"family": "Smith",
13+
"given": [
14+
"John"
15+
]
16+
}
17+
],
18+
"telecom": [
19+
{
20+
"system": "phone",
21+
"value": "555-1234"
22+
},
23+
{
24+
"system": "email",
25+
"value": "[email protected]"
26+
}
27+
],
28+
"gender": "male",
29+
"birthDate": "1970-01-01",
30+
"address": [
31+
{
32+
"use": "home",
33+
"line": [
34+
"123 Main St"
35+
],
36+
"city": "Anytown",
37+
"state": "CA",
38+
"postalCode": "12345",
39+
"country": "USA"
40+
}
41+
]
42+
}
43+
},
44+
{
45+
"resource": {
46+
"resourceType": "Patient",
47+
"id": "example-patient-2",
48+
"name": [
49+
{
50+
"use": "official",
51+
"family": "Johnson",
52+
"given": [
53+
"Sarah"
54+
]
55+
}
56+
],
57+
"telecom": [
58+
{
59+
"system": "phone",
60+
"value": "555-5678"
61+
},
62+
{
63+
"system": "email",
64+
"value": "[email protected]"
65+
}
66+
],
67+
"gender": "female",
68+
"birthDate": "1985-05-15"
69+
}
70+
},
71+
{
72+
"resource": {
73+
"resourceType": "MedicationStatement",
74+
"id": "med-1",
75+
"subject": {
76+
"reference": "Patient/example-patient-1"
77+
},
78+
"status": "active",
79+
"medicationCodeableConcept": {
80+
"coding": [
81+
{
82+
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
83+
"code": "310965",
84+
"display": "Lisinopril 10 MG Oral Tablet"
85+
}
86+
],
87+
"text": "Lisinopril 10 MG Oral Tablet"
88+
},
89+
"effectiveDateTime": "2025-06-10T21:38:43Z",
90+
"dateAsserted": "2025-07-06T21:38:43Z",
91+
"dosage": [
92+
{
93+
"text": "Take 1 tablet by mouth as needed",
94+
"timing": {
95+
"repeat": {
96+
"frequency": 1,
97+
"period": 1,
98+
"periodUnit": "d"
99+
}
100+
},
101+
"route": {
102+
"coding": [
103+
{
104+
"system": "http://snomed.info/sct",
105+
"code": "26643006",
106+
"display": "Oral route"
107+
}
108+
]
109+
}
110+
}
111+
]
112+
}
113+
},
114+
{
115+
"resource": {
116+
"resourceType": "MedicationStatement",
117+
"id": "med-2",
118+
"subject": {
119+
"reference": "Patient/example-patient-1"
120+
},
121+
"status": "active",
122+
"medicationCodeableConcept": {
123+
"coding": [
124+
{
125+
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
126+
"code": "197318",
127+
"display": "Ibuprofen 200 MG Oral Tablet"
128+
}
129+
],
130+
"text": "Ibuprofen 200 MG Oral Tablet"
131+
},
132+
"effectiveDateTime": "2025-06-14T21:38:43Z",
133+
"dateAsserted": "2025-07-06T21:38:43Z",
134+
"dosage": [
135+
{
136+
"text": "Take 1 tablet by mouth as needed",
137+
"timing": {
138+
"repeat": {
139+
"frequency": 2,
140+
"period": 1,
141+
"periodUnit": "d"
142+
}
143+
},
144+
"route": {
145+
"coding": [
146+
{
147+
"system": "http://snomed.info/sct",
148+
"code": "26643006",
149+
"display": "Oral route"
150+
}
151+
]
152+
}
153+
}
154+
]
155+
}
156+
},
157+
{
158+
"resource": {
159+
"resourceType": "MedicationStatement",
160+
"id": "med-3",
161+
"subject": {
162+
"reference": "Patient/example-patient-1"
163+
},
164+
"status": "active",
165+
"medicationCodeableConcept": {
166+
"coding": [
167+
{
168+
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
169+
"code": "314076",
170+
"display": "Simvastatin 20 MG Oral Tablet"
171+
}
172+
],
173+
"text": "Simvastatin 20 MG Oral Tablet"
174+
},
175+
"effectiveDateTime": "2025-06-12T21:38:43Z",
176+
"dateAsserted": "2025-07-06T21:38:43Z",
177+
"dosage": [
178+
{
179+
"text": "Take 1 tablet by mouth twice daily",
180+
"timing": {
181+
"repeat": {
182+
"frequency": 2,
183+
"period": 1,
184+
"periodUnit": "d"
185+
}
186+
},
187+
"route": {
188+
"coding": [
189+
{
190+
"system": "http://snomed.info/sct",
191+
"code": "26643006",
192+
"display": "Oral route"
193+
}
194+
]
195+
}
196+
}
197+
]
198+
}
199+
},
200+
{
201+
"resource": {
202+
"resourceType": "MedicationStatement",
203+
"id": "med-4",
204+
"subject": {
205+
"reference": "Patient/example-patient-2"
206+
},
207+
"status": "active",
208+
"medicationCodeableConcept": {
209+
"coding": [
210+
{
211+
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
212+
"code": "197318",
213+
"display": "Ibuprofen 200 MG Oral Tablet"
214+
}
215+
],
216+
"text": "Ibuprofen 200 MG Oral Tablet"
217+
}
218+
}
219+
}
220+
]
221+
}

input/patient.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)