Skip to content

Commit

Permalink
Merge pull request #1758 from coronasafe/sainak/fix/dummy-data
Browse files Browse the repository at this point in the history
cleanup dummy data
  • Loading branch information
gigincg authored Dec 11, 2023
2 parents 0869c46 + 560b3bd commit 09edf05
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 397 deletions.
8 changes: 3 additions & 5 deletions care/facility/management/commands/load_dummy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ def handle(self, *args, **options):
)

try:
management.call_command("loaddata", self.BASE_URL + "users.json")
management.call_command("load_data", "kerala")
management.call_command("loaddata", self.BASE_URL + "states.json")
management.call_command("load_skill_data")
management.call_command("load_medicines_data")
management.call_command("seed_data")
management.call_command("load_skill_data")
management.call_command("loaddata", self.BASE_URL + "users.json")
management.call_command("loaddata", self.BASE_URL + "facility.json")
management.call_command("loaddata", self.BASE_URL + "cypress_users.json")
management.call_command("loaddata", self.BASE_URL + "facility_users.json")
except Exception as e:
raise CommandError(e)
78 changes: 0 additions & 78 deletions data/dummy/cypress_users.json

This file was deleted.

158 changes: 2 additions & 156 deletions data/dummy/facility.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"latitude": null,
"pincode": 670112,
"address": "89.66.33.55",
"ward": 218,
"local_body": 12,
"ward": 15162,
"local_body": 6,
"district": 7,
"state": 1,
"oxygen_capacity": 0,
Expand Down Expand Up @@ -6739,159 +6739,5 @@
"created_by": 2,
"last_edited_by": 2
}
},
{
"model": "facility.facilityrelatedsummary",
"pk": "99627ad6-53e7-4585-821a-21ac6e765f7b",
"fields": {
"created_date": "2022-09-27T07:00:00.163Z",
"modified_date": "2022-09-27T07:25:00.165Z",
"facility": 1,
"s_type": "FacilityCapacity",
"data": {
"id": "81092ced-8720-44cb-b4c5-3f0ad0540153",
"name": "Dummy Facility 1",
"ward": 1,
"state": 1,
"address": "127.0.0.1",
"pincode": 670000,
"district": 7,
"features": [
1,
2,
3,
4,
5,
6
],
"latitude": null,
"inventory": {},
"longitude": null,
"local_body": 920,
"ward_object": {
"id": 1,
"name": "NEERICODE WEST",
"number": 1,
"local_body": 920
},
"availability": [
{
"id": "bfb7a4d8-6bf0-46d6-bf20-d5020850ea55",
"room_type": 150,
"modified_date": "2022-09-27T12:30:19.399000+05:30",
"room_type_text": "Oxygen beds",
"total_capacity": 1000,
"current_capacity": 20
}
],
"created_date": "2022-09-27T12:29:15.929000+05:30",
"phone_number": "+919999999888",
"state_object": {
"id": 1,
"name": "Kerala"
},
"facility_type": "Private Hospital",
"modified_date": "2022-09-27T12:29:15.929000+05:30",
"district_object": {
"id": 7,
"name": "Ernakulam",
"state": 1
},
"kasp_empanelled": false,
"oxygen_capacity": 0,
"type_b_cylinders": 0,
"type_c_cylinders": 0,
"type_d_cylinders": 0,
"local_body_object": {
"id": 920,
"name": "Alangad  Grama Panchayat, Ernakulam District",
"district": 7,
"body_type": 1,
"localbody_code": "G070203"
},
"actual_live_patients": 1,
"read_cover_image_url": null,
"expected_type_b_cylinders": 0,
"expected_type_c_cylinders": 0,
"expected_type_d_cylinders": 0,
"actual_discharged_patients": 0,
"expected_oxygen_requirement": 0
}
}
},
{
"model": "facility.facilityrelatedsummary",
"pk": "e294a2c2-3b05-469f-b975-e7766201df13",
"fields": {
"created_date": "2022-09-27T07:20:00.162Z",
"modified_date": "2022-09-27T07:25:00.171Z",
"facility": 2,
"s_type": "FacilityCapacity",
"data": {
"id": "fa33079d-727d-4295-b0fd-19153b36b2db",
"name": "Dummy Shifting Center",
"ward": 218,
"state": 1,
"address": "89.66.33.55",
"pincode": 670112,
"district": 7,
"features": [
1,
6
],
"latitude": null,
"inventory": {},
"longitude": null,
"local_body": 12,
"ward_object": {
"id": 218,
"name": "VALAMBOOR",
"number": 2,
"local_body": 12
},
"availability": [
{
"id": "52bd4e97-9064-4697-8fea-37e0a2b8c87c",
"room_type": 150,
"modified_date": "2022-09-27T12:46:52.525280+05:30",
"room_type_text": "Oxygen beds",
"total_capacity": 20,
"current_capacity": 1
}
],
"created_date": "2022-09-27T12:45:51.075776+05:30",
"phone_number": "+919876665987",
"state_object": {
"id": 1,
"name": "Kerala"
},
"facility_type": "Shifting Centre",
"modified_date": "2022-09-27T12:45:51.075811+05:30",
"district_object": {
"id": 7,
"name": "Ernakulam",
"state": 1
},
"kasp_empanelled": false,
"oxygen_capacity": 0,
"type_b_cylinders": 0,
"type_c_cylinders": 0,
"type_d_cylinders": 0,
"local_body_object": {
"id": 12,
"name": "Aikaranad  Grama Panchayat, Ernakulam District",
"district": 7,
"body_type": 1,
"localbody_code": "G071005"
},
"actual_live_patients": 0,
"read_cover_image_url": null,
"expected_type_b_cylinders": 0,
"expected_type_c_cylinders": 0,
"expected_type_d_cylinders": 0,
"actual_discharged_patients": 0,
"expected_oxygen_requirement": 0
}
}
}
]
38 changes: 0 additions & 38 deletions data/dummy/facility_users.json

This file was deleted.

92 changes: 92 additions & 0 deletions data/dummy/states.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[
{
"model": "users.state",
"pk": 1,
"fields": {
"name": "Kerala"
}
},
{
"model": "users.district",
"pk": 5,
"fields": {
"state": 1,
"name": "Kottayam"
}
},
{
"model": "users.district",
"pk": 7,
"fields": {
"state": 1,
"name": "Ernakulam"
}
},
{
"model": "users.localbody",
"pk": 6,
"fields": {
"district": 7,
"name": "Aikaranad Grama Panchayat, Ernakulam District",
"body_type": 1,
"localbody_code": "G071005"
}
},
{
"model": "users.localbody",
"pk": 12,
"fields": {
"district": 7,
"name": "Alangad Block Panchayat, Ernakulam District",
"body_type": 2,
"localbody_code": "B070200"
}
},
{
"model": "users.localbody",
"pk": 20,
"fields": {
"district": 7,
"name": "Aluva Municipality, Ernakulam District",
"body_type": 10,
"localbody_code": "M070800"
}
},
{
"model": "users.localbody",
"pk": 95,
"fields": {
"district": 5,
"name": "Changanassery Municipality, Kottayam District",
"body_type": 10,
"localbody_code": "M050300"
}
},
{
"model": "users.ward",
"pk": 5896,
"fields": {
"local_body": 95,
"name": "ANNAPOORNESWARI TEMPLE",
"number": 2
}
},
{
"model": "users.ward",
"pk": 6276,
"fields": {
"local_body": 20,
"name": "MANA",
"number": 4
}
},
{
"model": "users.ward",
"pk": 15162,
"fields": {
"local_body": 6,
"name": "PAZHAMTHOTTAM",
"number": 1
}
}
]
Loading

0 comments on commit 09edf05

Please sign in to comment.