Skip to content

Commit

Permalink
fix: Renamed ABDM Integration to ABDM Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
akashkrishna619 committed Aug 25, 2022
1 parent 6d2ab06 commit 4a51198
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2022, healthcare and contributors
// For license information, please see license.txt

frappe.ui.form.on('ABDM Integration', {
frappe.ui.form.on('ABDM Settings', {
// refresh: function(frm) {

// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"modified": "2022-04-18 14:59:24.279125",
"modified_by": "Administrator",
"module": "Healthcare",
"name": "ABDM Integration",
"name": "ABDM Settings",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# import frappe
from frappe.model.document import Document

class ABDMIntegration(Document):
class ABDMSettings(Document):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# import frappe
import unittest

class TestABDMIntegration(unittest.TestCase):
class TestABDMSettings(unittest.TestCase):
pass
4 changes: 2 additions & 2 deletions healthcare/regional/india/abdm/js/patient.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ let create_abha = function (frm) {
fieldname: 'patient_consent_attach',
fieldtype: 'Attach',
description: `Please attach patient's signed consent for using
their Aadhar for ABHA creation`
their Aadhaar for ABHA creation`
},
{
label: 'OR',
Expand Down Expand Up @@ -395,7 +395,7 @@ let create_abha = function (frm) {
})
})

frappe.db.get_value('ABDM Integration', {
frappe.db.get_value('ABDM Settings', {
company: frappe.defaults.get_user_default("Company"),
default: 1
}, 'patient_aadhaar_consent')
Expand Down
2 changes: 1 addition & 1 deletion healthcare/regional/india/abdm/test_abdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def setUpClass(cls):
super().setUpClass()

doc = frappe.get_doc({
'doctype': 'ABDM Integration',
'doctype': 'ABDM Settings',
'default': 1,
'auth_base_url': 'https://dev.abdm.gov.in/gateway/',
'health_id_base_url': 'https://healthidsbx.abdm.gov.in/api/',
Expand Down
12 changes: 6 additions & 6 deletions healthcare/regional/india/abdm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@frappe.whitelist()
def get_authorization_token():
client_id, client_secret, auth_base_url = frappe.db.get_value(
'ABDM Integration',
'ABDM Settings',
{
'company': frappe.defaults.get_user_default("Company"),
'default': 1
Expand All @@ -26,7 +26,7 @@ def get_authorization_token():
if not auth_base_url:
frappe.throw(
title='Not Configured',
msg='Base URL not configured in ABDM Integration!',
msg='Base URL not configured in ABDM Settings!',
)

req = frappe.new_doc('ABDM Request')
Expand Down Expand Up @@ -69,7 +69,7 @@ def abdm_request(payload, url_key, req_type, rec_headers=None, to_be_enc=None, p
url_type = 'health_id_base_url'

base_url = frappe.db.get_value(
'ABDM Integration',
'ABDM Settings',
{
'company': frappe.defaults.get_user_default("Company"),
'default': 1
Expand All @@ -79,7 +79,7 @@ def abdm_request(payload, url_key, req_type, rec_headers=None, to_be_enc=None, p
if not base_url:
frappe.throw(
title='Not Configured',
msg='Base URL not configured in ABDM Integration!'
msg='Base URL not configured in ABDM Settings!'
)

config = get_url(url_key)
Expand Down Expand Up @@ -156,7 +156,7 @@ def abdm_request(payload, url_key, req_type, rec_headers=None, to_be_enc=None, p

def get_encrypted_message(message):
base_url = frappe.db.get_value(
'ABDM Integration',
'ABDM Settings',
{
'company': frappe.defaults.get_user_default("Company"),
'default': 1
Expand Down Expand Up @@ -243,7 +243,7 @@ def get_health_data(otp, txnId, auth_method):
# patient after_insert
def set_consent_attachment_details(doc, method=None):
if frappe.db.exists(
"ABDM Integration",
"ABDM Settings",
{"company": frappe.defaults.get_user_default("Company"), "default": 1},
):
if doc.consent_for_aadhaar_use:
Expand Down

0 comments on commit 4a51198

Please sign in to comment.