Skip to content

Commit cd64693

Browse files
committed
AMB-1739 remove unused function
1 parent 7c3675d commit cd64693

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

devtools/generate_data.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -35,40 +35,6 @@ def pick_rand(pool):
3535
return pool[idx]
3636

3737

38-
# Deprecated: Use per-resource generator instead
39-
def generate(num):
40-
with open("sample_event.json", "r") as template:
41-
imms = json.loads(template.read())
42-
43-
_events = []
44-
45-
def _pick_rand(pool):
46-
idx = random.randint(0, len(pool) - 1)
47-
return pool[idx]
48-
49-
for event in range(num):
50-
_imms = copy.deepcopy(imms)
51-
# ID
52-
_imms["identifier"][0]["system"] = _pick_rand(suppliers)
53-
_imms["identifier"][0]["value"] = str(uuid.uuid4())
54-
# Patient
55-
patient = _pick_rand(patient_pool)
56-
_imms["patient"]["identifier"][0]["value"] = patient["nhs_number"]
57-
_imms["patient"]["birthDate"] = patient["dob"]
58-
# LocalPatient
59-
local_pat = _pick_rand(local_patient_pool)
60-
_imms["contained"][0]["item"][3]["answer"][0]["valueCoding"]["code"] = local_pat["code"]
61-
_imms["contained"][0]["item"][3]["answer"][0]["valueCoding"]["system"] = local_pat["system"]
62-
# Vaccination
63-
_imms["protocolApplied"][0]["targetDisease"][0]["coding"][0]["code"] = _pick_rand(disease_type)
64-
_imms["vaccineCode"]["coding"][0]["code"] = _pick_rand(vaccine_code)
65-
_imms["extension"][0]["valueCodeableConcept"]["coding"][0]["code"] = _pick_rand(vaccine_procedure)
66-
67-
_events.append(_imms)
68-
69-
return _events
70-
71-
7238
def generate_immunisation(num):
7339
with open("sample_imms.json", "r") as template:
7440
imms = json.loads(template.read())

0 commit comments

Comments
 (0)