Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert ABDM into Plug - Part 2/3 #2313

Merged
merged 89 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
9ec18a3
added consent flows in abdm
khavinshankar Aug 30, 2023
87cbc4b
Merge branch 'master' into abdm-m3
khavinshankar Aug 30, 2023
515f38a
made patient_abha as a foriegn key field in consent
khavinshankar Aug 30, 2023
5f8ec34
renamed patient_health_id to patient_abha
khavinshankar Aug 30, 2023
761e725
renamed patient_health_id to patient_abha
khavinshankar Aug 30, 2023
021f0a0
added filterset class to consent
khavinshankar Aug 31, 2023
0eb7f64
send external_id as id in consent serializer
khavinshankar Aug 31, 2023
eae6342
Merge branch 'master' into abdm-m3
khavinshankar Sep 13, 2023
89577c4
resolved migration conflicts
khavinshankar Sep 26, 2023
eb4b495
seperated out consent request and consent artefact
khavinshankar Oct 1, 2023
a3138f0
get health information from hip
khavinshankar Oct 1, 2023
9220755
decrypt data from abdm
khavinshankar Oct 1, 2023
57a946f
store health information in s3
khavinshankar Oct 1, 2023
49ae5ee
moved status from consent request to consent artefact
khavinshankar Oct 1, 2023
cd2d20c
display health information
khavinshankar Oct 2, 2023
fa37907
added patients find apis
khavinshankar Oct 10, 2023
87a8a71
added consents__hiu__notify
khavinshankar Oct 10, 2023
6c8f2a0
send push notification in patients/on-find
khavinshankar Oct 17, 2023
5e063bd
fixed gateway api calls
khavinshankar Oct 17, 2023
f284f62
remove date range from health-information/cm/request
khavinshankar Oct 17, 2023
da35803
added ratelimits to abdm m3 apis
khavinshankar Nov 2, 2023
89522ca
added status in consent request
khavinshankar Dec 4, 2023
159c4bc
fix consent denied logic
khavinshankar Dec 5, 2023
c56f67b
added facility filter to consent requests
khavinshankar Dec 18, 2023
32a9247
fixed a typo
khavinshankar Dec 18, 2023
f57ceff
added patient_abha_object in consent request serializer
khavinshankar Dec 18, 2023
7986c78
fixed consent status update logic
khavinshankar Dec 18, 2023
0684c45
support retrieve hi docs by consent id
khavinshankar Dec 19, 2023
2233f36
Merge branch 'master' of github.com:coronasafe/care into abdm-m3
khavinshankar Jan 20, 2024
3df5835
Merge branch 'abdm-m3' of github.com:coronasafe/care into abdm-m3
khavinshankar Jan 20, 2024
00624b9
added all the suggestions from review
khavinshankar Jan 20, 2024
079f0a3
Merge branch 'master' into abdm-m3
khavinshankar Feb 6, 2024
ac41a56
Merge branch 'master' of github.com:coronasafe/care into abdm-m3
khavinshankar Mar 7, 2024
e0692f0
Merge remote-tracking branch 'origin/master' into abdm-m3
sainak Mar 8, 2024
cb841d3
update migrations
sainak Mar 8, 2024
06cd7f4
added date range to health_information__cm__request
khavinshankar Apr 12, 2024
68be86b
fixed reverse mapping of an enum REVERSE_CONDITION_VERIFICATION_STATUSES
khavinshankar Apr 12, 2024
0f5f4f4
fix a type in health_id
khavinshankar Apr 12, 2024
3c81813
Merge branch 'develop' into abdm-m3
sainak Apr 12, 2024
ca2c7e1
fix migration
khavinshankar Apr 12, 2024
41ae638
fix linting error
khavinshankar Apr 12, 2024
ea9ff1b
added backend domain env
khavinshankar Apr 12, 2024
24cfd21
removed https prefix while using BACKEND_DOMAIN
khavinshankar Apr 12, 2024
a44d1f0
removed duplicate conditional logic
khavinshankar Apr 12, 2024
6056e3b
fix linting issues
khavinshankar Apr 12, 2024
0e99c97
Merge branch 'develop' into abdm-m3
khavinshankar Apr 13, 2024
685c62c
added patient field to abdm.abhanumber model
khavinshankar Apr 21, 2024
2c0d4fb
remove abha_number field from facility.patientregistration model
khavinshankar Apr 21, 2024
bae0b03
remove abdm references in the patient serializer
khavinshankar Apr 21, 2024
027a0d9
remove abdm references (auto add care context on consultation create)…
khavinshankar Apr 21, 2024
561b638
removed an unused abdm import
khavinshankar Apr 21, 2024
8c05d01
added related_name to patient field in abdm.abhanumber model
khavinshankar Apr 21, 2024
e242628
add hasattr check while patient.abha_number and revert patient.abha_n…
khavinshankar Apr 22, 2024
49f42bf
added consultation receiver to auto add care context on create
khavinshankar Apr 22, 2024
0042cec
added abha_number viewset and serializer
khavinshankar May 6, 2024
c114997
remove abha number from patient model in dummy data
khavinshankar May 14, 2024
f613fc9
Merge branch 'develop' into pre-abdm-plug
khavinshankar May 14, 2024
004d52d
resolve migration conflicts
khavinshankar May 14, 2024
6d7fcef
fix linting errors
khavinshankar May 14, 2024
73baf5e
fixed migration reference
khavinshankar May 14, 2024
82bbfdb
Merge branch 'develop' into pre-abdm-plug
sainak May 14, 2024
10a8a14
Apply suggestions from code review
sainak May 14, 2024
16fb40c
Merge branch 'develop' into pre-abdm-plug
May 20, 2024
da2dbad
resolve migration conflict
May 20, 2024
3aa812e
use bulk update in reverse_patient_abhanumber_relation
May 20, 2024
e6c3143
Merge branch 'develop' into pre-abdm-plug
khavinshankar May 28, 2024
8f690f8
resolve migration conflict
khavinshankar May 28, 2024
e9dc343
fix the migration logic abha_number not found on patient
khavinshankar May 28, 2024
3b6f2ca
added validation errors
khavinshankar May 29, 2024
9471e48
replaced general exceptions with validation error
khavinshankar May 29, 2024
c49ff4d
fixed consent filters
khavinshankar Jul 3, 2024
27c4009
Merge branch 'develop' into pre-abdm-plug
khavinshankar Jul 3, 2024
ca79856
fix migration conflict
khavinshankar Jul 3, 2024
e9e91e3
fix dummy data
khavinshankar Jul 3, 2024
c88f1a8
revert dummy data changes
sainak Jul 3, 2024
7a1b161
remove abha_number field
sainak Jul 3, 2024
bcee797
handle json decode errors for abdm responses
khavinshankar Jul 4, 2024
a9d1e17
use correct json exception
sainak Jul 4, 2024
9d83712
added replace migrations for migrations with abdm dependencies
khavinshankar Jul 20, 2024
dc2c302
Merge branch 'develop' into pre-abdm-plug
khavinshankar Aug 23, 2024
7fc24bd
fixed migration conflict
khavinshankar Aug 23, 2024
6cee939
Merge branch 'pre-abdm-plug' into pre-abdm-plug-2
khavinshankar Aug 23, 2024
9b7b86f
fixed squash migration conflicts
khavinshankar Aug 23, 2024
c0d52e0
Merge branch 'develop' into pre-abdm-plug-2
khavinshankar Sep 10, 2024
077a7ec
renamed migration
khavinshankar Sep 10, 2024
f551992
Merge branch 'develop' into pre-abdm-plug-2
khavinshankar Oct 18, 2024
9059474
fixed migration conflicts
khavinshankar Oct 18, 2024
1ceac69
fixed migration issues
khavinshankar Oct 18, 2024
befc660
fix migrations
sainak Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions care/abdm/migrations/0014_replace_0013.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.10 on 2024-04-21 17:40

# This is a replacement migration for abdm.0013 that omits the RunPython operation (reverse_patient_abhanumber_relation) and facility migration dependency.

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("abdm", "0012_consentrequest_status"),
]

replaces = [
("abdm", "0013_abhanumber_patient"),
]

operations = [
migrations.AddField(
model_name="abhanumber",
name="patient",
field=models.OneToOneField(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="abha_number",
to="facility.patientregistration",
),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ def reverse_patient_abhanumber_relation(apps, schema_editor):
AbhaNumber = apps.get_model("abdm", "AbhaNumber")

patients = (
Patient.objects.annotate(removed_field=RawSQL("abha_number_id", ()))
.filter(abha_number__isnull=False)
.select_related("abha_number")
Patient.objects.filter(abha_number__isnull=False)
)
abha_numbers_to_update = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class Migration(migrations.Migration):
dependencies = [
("abdm", "0001_initial_squashed_0007_alter_abhanumber_id"),
# ("abdm", "0001_initial_squashed_0007_alter_abhanumber_id"),
("facility", "0373_remove_patientconsultation_hba1c"),
]

Expand All @@ -22,23 +22,17 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="historicalpatientregistration",
name="abha_number",
field=models.ForeignKey(
field=models.IntegerField(
blank=True,
db_constraint=False,
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
related_name="+",
to="abdm.abhanumber",
),
),
migrations.AddField(
model_name="patientregistration",
name="abha_number",
field=models.OneToOneField(
field=models.IntegerField(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="abdm.abhanumber",
),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class Migration(migrations.Migration):
dependencies = [
("facility", "0453_merge_20240824_2040"),
("abdm", "0013_abhanumber_patient"),
# ("abdm", "0013_abhanumber_patient"),
]

operations = [
Expand Down
Loading