feat(abdm): align modal hi_type values with standard ABDM HI Types

This commit is contained in:
DevSoftTech Server 2026-10-08 09:54:40 +05:30
parent e8a2cf2cf3
commit a4f8e8a445

View File

@ -867,17 +867,17 @@
} else if (/^DOC-/i.test(ref)) { } else if (/^DOC-/i.test(ref)) {
itemHiType = 'HealthDocumentRecord'; itemHiType = 'HealthDocumentRecord';
} else if (/^INVOICE-/i.test(ref)) { } else if (/^INVOICE-/i.test(ref)) {
itemHiType = 'InvoiceRecord'; itemHiType = 'Invoice';
} else if (/^(?:LAB|RAD)-/i.test(ref)) { } else if (/^(?:LAB|RAD)-/i.test(ref)) {
itemHiType = 'DiagnosticReportRecord'; itemHiType = 'DiagnosticReport';
} else if (/^IMM-/i.test(ref)) { } else if (/^IMM-/i.test(ref)) {
itemHiType = 'ImmunizationRecord'; itemHiType = 'ImmunizationRecord';
} else if (/^(?:DISCHARGE|IPD)-/i.test(ref)) { } else if (/^(?:DISCHARGE|IPD)-/i.test(ref)) {
itemHiType = 'DischargeSummaryRecord'; itemHiType = 'DischargeSummary';
} else if (/^(?:PRESC|PRESCRIPTION)-/i.test(ref)) { } else if (/^(?:PRESC|PRESCRIPTION)-/i.test(ref)) {
itemHiType = 'PrescriptionRecord'; itemHiType = 'Prescription';
} else if (/^OPD-/i.test(ref)) { } else if (/^OPD-/i.test(ref)) {
itemHiType = 'OPConsultRecord'; itemHiType = 'OPConsultation';
} }
if (!dominantHiType && itemHiType) { if (!dominantHiType && itemHiType) {
dominantHiType = itemHiType; dominantHiType = itemHiType;
@ -1021,9 +1021,6 @@
} }
}); });
var hiTypeToSend = distinctTypes.length === 1 ? distinctTypes[0] : ''; var hiTypeToSend = distinctTypes.length === 1 ? distinctTypes[0] : '';
if (hiTypeToSend === 'OPConsultation') {
hiTypeToSend = 'OPConsultRecord';
}
// Step 2: Link Care Contexts // Step 2: Link Care Contexts
csrf = getCsrfData(); csrf = getCsrfData();