-
ABHA Number Create and Verify
-
Create and verify your unique health identification number
-
-
- -
-
-
- -
-
-
-
-
-
+
-
+
-
-
-
Create ABHA
-
-
Register a new Ayushman Bharat Health Account for a patient using their Aadhaar number. OTP is sent to the Aadhaar-linked mobile.
-
- - Aadhaar-based identity verification
- - Choose or customise the ABHA address
- - Official ABHA card stored for printing
-
-
-
-
-
-
-
-
-
-
-
Verify ABHA Account
-
-
Verify an existing ABHA account using the ABHA address or ABHA number. An OTP is sent to the linked mobile for authentication.
-
- - Verify via ABHA address or ABHA number
- - Link ABHA to a patient record
- - View and download the ABHA card
-
@@ -615,53 +636,13 @@
-
-
-
+
-
+
-
ABHA-Based Patient Registration
-
-
-
-
-
-
🆔
-
By ABHA Number
-
14-digit or @abdm address
-
-
-
-
-
📷
-
Scan ABHA QR
-
Scan patient's ABHA card QR
-
-
-
-
-
🏥
-
Scan Facility QR
-
Patient scans hospital QR
-
-
-
-
-
📱
-
By Mobile OTP
-
OTP to ABHA-linked mobile
-
-
-
-
-
-
-
-
+
+
+
@@ -1468,8 +1451,9 @@
$('#abhareg_mob_step1_alert,#abhareg_mob_step2_alert').html('');
};
- function loadFacilityQr(force) {
+ function loadFacilityQr(force, onReady) {
if (facilityQrLoaded && !force) {
+ if (typeof onReady === 'function') { onReady(true); }
return;
}
@@ -1483,6 +1467,7 @@
var msg = pickApiMessage(resp, 'Unable to load Health Facility QR.');
$('#abhareg_facility_loading').html('');
$('#abhareg_facility_alert').html('
' + msg + '
');
+ if (typeof onReady === 'function') { onReady(false, msg); }
return;
}
@@ -1499,6 +1484,7 @@
$('#abhareg_facility_hfr').text(resp.hfr_id || '—');
$('#abhareg_facility_qr_img').data('hospitalName', resp.hospital_name || 'Health Facility');
$('#abhareg_facility_qr_img').data('hfrId', resp.hfr_id || '');
+ if (typeof onReady === 'function') { onReady(true); }
}).fail(function(xhr) {
var msg = 'Unable to load Health Facility QR.';
if (xhr && xhr.responseJSON && xhr.responseJSON.error_text) {
@@ -1506,6 +1492,7 @@
}
$('#abhareg_facility_loading').html('');
$('#abhareg_facility_alert').html('
' + msg + '
');
+ if (typeof onReady === 'function') { onReady(false, msg); }
}).always(function() {
$('#abhareg_facility_refresh_btn').prop('disabled', false);
});
@@ -1715,6 +1702,16 @@
// --- Method 2: QR Scanner ---
$('#abhareg_qr_open_modal_btn').on('click', function() { openAbhaQrScan(); });
+ $('#abhareg_facility_print_launch_btn').on('click', function() {
+ var $btn = $(this);
+ var original = $btn.html();
+ $btn.prop('disabled', true).html('
Loading QR');
+ loadFacilityQr(false, function(ok, msg) {
+ $btn.prop('disabled', false).html(original);
+ if (ok) { printFacilityQr(); return; }
+ alert(msg || 'Unable to load the Health Facility QR.');
+ });
+ });
$('#abhareg_facility_refresh_btn').on('click', function() { loadFacilityQr(true); });
$('#abhareg_facility_print_btn').on('click', function() { printFacilityQr(); });