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

ABDM M3 #1829

Merged
merged 48 commits into from
May 13, 2024
Merged

ABDM M3 #1829

merged 48 commits into from
May 13, 2024

Conversation

khavinshankar
Copy link
Member

@khavinshankar khavinshankar commented Jan 17, 2024

This PR implements ABDM Milestone 3, fetching patient records from other HIPs.

Prerequisites:

  1. The Health Facility ID should be configured for the respective facility.
  2. Abha number of the patient should be linked (M1).
  3. The care context of the respective consultation should be linked (M2).

The flow is as follows:

  1. A consent request is created for the respective patient which is also stored in care before sending it to ABDM.
  2. [Not Related to CARE] ABDM sends a consent request to the respective patient on their ABHA app.
  3. ABDM sends the response from the patient (approved / rejected).
  • If the patient approves, ABDM sends the respective consent artefacts (can be more than 1 i.e., 1 consent artefact is created for each HIP patient visited during the date range we requested in the consent request).
  • If the patient rejects, only the rejection status is sent.
  1. [Not Related to CARE in M3 context] Simultaneously, ABDM sends out the respective consent artefact to the HIPs.
  2. Once we receive the consent artefacts, we store them and send a health information request to ABDM with encryption details (public key and nonce) + data push URL where the HIP can directly send the data.
  3. [Not Related to CARE in M3 context] ABDM sends the data push URL and encryption details to HIP where the HIP encrypts the respective data (data will either be a raw file or in FHIR format) and send it directly to HIU through data push url.
  4. Once we receive the data, we update the consent artefact status and decrypt the data and dump it to an S3 bucket using the already existing File Upload utility.
  5. When the data is requested from the frontend, we fetch the data from the S3 bucket and send it.
  6. If the patient revokes the consent or if the consent expires, we mark the file as archived with the respective reasons (expired or revoked) and after that the data is inaccessible by the frontend.

Frontend PR: ohcnetwork/care_fe#7193

References:

@khavinshankar khavinshankar requested a review from a team as a code owner April 12, 2024 10:38
care/abdm/utils/api_call.py Outdated Show resolved Hide resolved
khavinshankar and others added 3 commits April 12, 2024 18:07
Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Co-authored-by: Aakash Singh <mail@singhaakash.dev>
@gigincg
Copy link
Member

gigincg commented Apr 13, 2024

@khavinshankar Can you make a PR on the docs Repo for ABDM M3 and placeholders for M1 & M2

Also, there seems to be a couple of conflicts, can you get these cleared

@sainak sainak added to-be-closed PRs with no updates in the last 3 weeks will be closed and removed to-be-closed PRs with no updates in the last 3 weeks will be closed labels May 12, 2024
@gigincg gigincg merged commit 4a5bacb into develop May 13, 2024
10 checks passed
@gigincg gigincg deleted the abdm-m3 branch May 13, 2024 14:07
vigneshhari added a commit that referenced this pull request May 15, 2024
* Update max_length for phone numbers to adhere to ITU-T E.164 standard (#2138)

* Update max_length for phone numbers to adhere to ITU-T E.164 standard

* Clean up an empty line

* Adds missing migrations

---------

Co-authored-by: rithviknishad <mail@rithviknishad.dev>
Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* Adds support for doctors and nurses discussions threads in Discussion Notes (#2137)

* Adds support for doctors and nurses discussions threads in Discussion Notes

* switch to using small integer field

* updated and fixes based on test cases

* rebase migrations

* Remake migrations

---------

Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* Allow `audio/mp4` by default (#2094)

Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* Bump Dependencies (#2143)

* Vigneshhari/bump dependencies (#2145)

* Bump Dependencies

* Bump Dependencies

* Bump Dependencies

* Bump Dependencies

* Skip creating event group if all fields are null (#2134)

* ABDM M3 (#1829)

Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Co-authored-by: Gigin George <mail.gigin@gmail.com>

* Increase area of specialisation in doctors (#2102)

* update doctor types

* Add Migration

---------

Co-authored-by: Rithvik Nishad <rithvik.nishad@egovernments.org>
Co-authored-by: Gigin George <mail.gigin@gmail.com>

* Added discharge patient filters (#2124)

* added discharge patient filters

* updated filters

---------

Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* converted investigation and investigation group data into JSON (#1912)

* converted investigation and investigation group data into JSON

* created json files for investigations and investigation_groups

* updated investigations.json

* fixed json data,command and migrations

* fixing migrations

* fixing lint issue

* update migrations

* update migrations

---------

Co-authored-by: Aakash Singh <mail@singhaakash.dev>

* Drops support for cloning previous log update (#2127)

* Drop support for cloning previous log update

* undo unrelated changes

---------

Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* Change devcontainer make up command to run after start (#2146)

Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* Removes unused `current_health` field from Daily Rounds (#2162)

Removes unused `current_health` from Daily Rounds

Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* Display users list based on user access limitation (#1742)

* Refactor get_queryset method in UserViewSet

* Used get_accessible_facilities instead of subquery
to fetch the facilities linked to the user

* fixed failing tests

* fix queryset

---------

Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Co-authored-by: khavinshankar <khavinshankar@gmail.com>
Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>

* adds missing merge migrations (#2169)

merge migrations

---------

Co-authored-by: Bodhish Thomas <bodhish@gmail.com>
Co-authored-by: rithviknishad <mail@rithviknishad.dev>
Co-authored-by: Vignesh Hari <vichuhari100@gmail.com>
Co-authored-by: Rithvik Nishad <rithvik.nishad@egovernments.org>
Co-authored-by: Aakash Singh <mail@singhaakash.dev>
Co-authored-by: Khavin Shankar <khavinshankar@gmail.com>
Co-authored-by: Gigin George <mail.gigin@gmail.com>
Co-authored-by: Rashmik <146672184+rash-27@users.noreply.github.com>
Co-authored-by: Shivank Kacker <kacker.shivank@gmail.com>
Co-authored-by: Prafful Sharma <115104695+DraKen0009@users.noreply.github.com>
Co-authored-by: Gokulram A <gokulram2010418@ssn.edu.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants