From 4a51198c8358bfe23fd94636e400b33fead36da7 Mon Sep 17 00:00:00 2001 From: akashkrishna619 Date: Mon, 8 Aug 2022 14:11:12 +0530 Subject: [PATCH] fix: Renamed ABDM Integration to ABDM Settings --- .../{abdm_integration => abdm_settings}/__init__.py | 0 .../abdm_settings.js} | 2 +- .../abdm_settings.json} | 2 +- .../abdm_settings.py} | 2 +- .../test_abdm_settings.py} | 2 +- healthcare/regional/india/abdm/js/patient.js | 4 ++-- healthcare/regional/india/abdm/test_abdm.py | 2 +- healthcare/regional/india/abdm/utils.py | 12 ++++++------ 8 files changed, 13 insertions(+), 13 deletions(-) rename healthcare/healthcare/doctype/{abdm_integration => abdm_settings}/__init__.py (100%) rename healthcare/healthcare/doctype/{abdm_integration/abdm_integration.js => abdm_settings/abdm_settings.js} (78%) rename healthcare/healthcare/doctype/{abdm_integration/abdm_integration.json => abdm_settings/abdm_settings.json} (98%) rename healthcare/healthcare/doctype/{abdm_integration/abdm_integration.py => abdm_settings/abdm_settings.py} (83%) rename healthcare/healthcare/doctype/{abdm_integration/test_abdm_integration.py => abdm_settings/test_abdm_settings.py} (70%) diff --git a/healthcare/healthcare/doctype/abdm_integration/__init__.py b/healthcare/healthcare/doctype/abdm_settings/__init__.py similarity index 100% rename from healthcare/healthcare/doctype/abdm_integration/__init__.py rename to healthcare/healthcare/doctype/abdm_settings/__init__.py diff --git a/healthcare/healthcare/doctype/abdm_integration/abdm_integration.js b/healthcare/healthcare/doctype/abdm_settings/abdm_settings.js similarity index 78% rename from healthcare/healthcare/doctype/abdm_integration/abdm_integration.js rename to healthcare/healthcare/doctype/abdm_settings/abdm_settings.js index 8a1b4fb60c..9901933895 100644 --- a/healthcare/healthcare/doctype/abdm_integration/abdm_integration.js +++ b/healthcare/healthcare/doctype/abdm_settings/abdm_settings.js @@ -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) { // } diff --git a/healthcare/healthcare/doctype/abdm_integration/abdm_integration.json b/healthcare/healthcare/doctype/abdm_settings/abdm_settings.json similarity index 98% rename from healthcare/healthcare/doctype/abdm_integration/abdm_integration.json rename to healthcare/healthcare/doctype/abdm_settings/abdm_settings.json index c51356a2e4..6dd37fbca2 100644 --- a/healthcare/healthcare/doctype/abdm_integration/abdm_integration.json +++ b/healthcare/healthcare/doctype/abdm_settings/abdm_settings.json @@ -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": [ diff --git a/healthcare/healthcare/doctype/abdm_integration/abdm_integration.py b/healthcare/healthcare/doctype/abdm_settings/abdm_settings.py similarity index 83% rename from healthcare/healthcare/doctype/abdm_integration/abdm_integration.py rename to healthcare/healthcare/doctype/abdm_settings/abdm_settings.py index 6f85ea3b3d..c17b96e0be 100644 --- a/healthcare/healthcare/doctype/abdm_integration/abdm_integration.py +++ b/healthcare/healthcare/doctype/abdm_settings/abdm_settings.py @@ -4,5 +4,5 @@ # import frappe from frappe.model.document import Document -class ABDMIntegration(Document): +class ABDMSettings(Document): pass diff --git a/healthcare/healthcare/doctype/abdm_integration/test_abdm_integration.py b/healthcare/healthcare/doctype/abdm_settings/test_abdm_settings.py similarity index 70% rename from healthcare/healthcare/doctype/abdm_integration/test_abdm_integration.py rename to healthcare/healthcare/doctype/abdm_settings/test_abdm_settings.py index 0b02f6795f..9d0f6cd9d2 100644 --- a/healthcare/healthcare/doctype/abdm_integration/test_abdm_integration.py +++ b/healthcare/healthcare/doctype/abdm_settings/test_abdm_settings.py @@ -4,5 +4,5 @@ # import frappe import unittest -class TestABDMIntegration(unittest.TestCase): +class TestABDMSettings(unittest.TestCase): pass diff --git a/healthcare/regional/india/abdm/js/patient.js b/healthcare/regional/india/abdm/js/patient.js index 619c0490af..9d881095b6 100644 --- a/healthcare/regional/india/abdm/js/patient.js +++ b/healthcare/regional/india/abdm/js/patient.js @@ -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', @@ -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') diff --git a/healthcare/regional/india/abdm/test_abdm.py b/healthcare/regional/india/abdm/test_abdm.py index 3866e279d3..e12a4900a3 100644 --- a/healthcare/regional/india/abdm/test_abdm.py +++ b/healthcare/regional/india/abdm/test_abdm.py @@ -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/', diff --git a/healthcare/regional/india/abdm/utils.py b/healthcare/regional/india/abdm/utils.py index 60d8c084b1..f1702ef4ba 100644 --- a/healthcare/regional/india/abdm/utils.py +++ b/healthcare/regional/india/abdm/utils.py @@ -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 @@ -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') @@ -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 @@ -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) @@ -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 @@ -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: