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 1/2 #2161

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from
Open

Conversation

khavinshankar
Copy link
Member

This pull request represents the first phase of converting the ABDM system into a plug. The primary focus of this PR is to refactor the relationship between the ABHA number and the patient model, alongside improvements to signal handling and routing. Detailed changes include:

  • Model Relationship Reversal: Changed the relationship dynamics by moving the abha_number field from the patient model to the abha_number model. This involves making patient a field within the abha_number model to better align with our new architecture.

  • Signal Creation for Care Context: Implemented a new signal that triggers the creation of a care context whenever a consultation is saved. This enhances the functionality and integration of care context within our system.

  • ABHA Number API Enhancements: Introduced a new abha_number viewset, serializer, and routes. These additions are designed to streamline the handling and accessibility of ABHA numbers within our system.

This PR lays the groundwork for the subsequent phase, which will further integrate and optimize the ABDM plug system.

care/abdm/api/viewsets/healthid.py Outdated Show resolved Hide resolved
care/abdm/api/viewsets/healthid.py Outdated Show resolved Hide resolved
care/abdm/api/viewsets/healthid.py Outdated Show resolved Hide resolved
care/abdm/migrations/0013_abhanumber_patient.py Outdated Show resolved Hide resolved
care/abdm/receivers/consultation.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 57.57576% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 62.69%. Comparing base (51ce81e) to head (3aa812e).
Report is 102 commits behind head on develop.

Current head 3aa812e differs from pull request most recent head 9471e48

Please upload reports for the commit 9471e48 to get more accurate results.

Files Patch % Lines
care/abdm/api/viewsets/abha_number.py 55.00% 18 Missing ⚠️
care/abdm/api/viewsets/healthid.py 10.00% 9 Missing ⚠️
care/abdm/api/viewsets/hip.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2161      +/-   ##
===========================================
+ Coverage    62.20%   62.69%   +0.49%     
===========================================
  Files          221      236      +15     
  Lines        12204    13032     +828     
  Branches      1742     1854     +112     
===========================================
+ Hits          7591     8170     +579     
- Misses        4305     4526     +221     
- Partials       308      336      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@khavinshankar khavinshankar requested a review from sainak May 20, 2024 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants