fix(abdm): replace ampersand and slashes in careContextDisplay to prevent ABDM-9999 Invalid display
This commit is contained in:
parent
8fc443f1ba
commit
a44256b530
|
|
@ -6668,7 +6668,7 @@ class AbdmGateway extends BaseController
|
|||
$hiType = str_starts_with($ccRef, 'WELLNESS-') ? 'WellnessRecord' : 'HealthDocumentRecord';
|
||||
}
|
||||
$dateStr = date('d M Y', strtotime((string) ($row['created_at'] ?? $row['updated_at'] ?? 'now')));
|
||||
$display = ($hiType === 'WellnessRecord' ? 'Wellness & Vitals Record - ' : ($hiType . ' - ')) . $dateStr;
|
||||
$display = ($hiType === 'WellnessRecord' ? 'Wellness and Vitals Record - ' : ($hiType . ' - ')) . $dateStr;
|
||||
|
||||
$addContext([
|
||||
'careContextId' => $ccRef,
|
||||
|
|
|
|||
|
|
@ -949,7 +949,7 @@ class NursingApi extends BaseController
|
|||
// Build compliant ABDM NRCES FHIR R4 WellnessRecord Document Bundle
|
||||
$cleanDate = date('Ymd', strtotime($recordedAt));
|
||||
$careContextRef = 'WELLNESS-' . $patientId . '-W' . $wellnessId . '-' . $cleanDate;
|
||||
$careContextDisplay = 'Wellness & Vitals Record - ' . date('d M Y', strtotime($recordedAt));
|
||||
$careContextDisplay = 'Wellness and Vitals Record - ' . date('d M Y', strtotime($recordedAt));
|
||||
$fhirBundleJson = null;
|
||||
|
||||
try {
|
||||
|
|
@ -1121,8 +1121,8 @@ class NursingApi extends BaseController
|
|||
'record_type' => 'WellnessRecord',
|
||||
'visit_date' => date('Y-m-d', strtotime($recordedAt)),
|
||||
'care_context_reference' => $careContextRef,
|
||||
'care_context_display' => 'Wellness Record - ' . date('d/m/Y', strtotime($recordedAt)),
|
||||
'notes' => 'Wellness & Vitals Record',
|
||||
'care_context_display' => 'Wellness Record - ' . date('d M Y', strtotime($recordedAt)),
|
||||
'notes' => 'Wellness and Vitals Record',
|
||||
'queue_id' => $careContextRef,
|
||||
'record_data' => ! empty($fhirBundle) ? $fhirBundle : json_decode((string) ($fhirBundleJson ?? '{}'), true),
|
||||
];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class WellnessFhirGenerator extends AbstractModuleFhirGenerator
|
|||
$visitDate = (string) ($source['visit_date'] ?? date('Y-m-d'));
|
||||
|
||||
$careContextReference = 'WELLNESS-' . $recordId . ($sessionId !== '0' ? '-S' . $sessionId : '') . '-' . $visitDate . '-' . date('His');
|
||||
$careContextDisplay = 'Wellness & Vitals Record ' . $visitDate;
|
||||
$careContextDisplay = 'Wellness and Vitals Record ' . $visitDate;
|
||||
|
||||
$builder = new \App\Libraries\Abdm\Fhir\FhirDocumentBuilder();
|
||||
|
||||
|
|
@ -587,7 +587,7 @@ class WellnessFhirGenerator extends AbstractModuleFhirGenerator
|
|||
'code' => ['text' => 'General Wellness Note'],
|
||||
'subject' => ['reference' => $patientRef, 'display' => (string) ($source['patient']['name'] ?? 'Patient')],
|
||||
'effectiveDateTime' => $timestamp,
|
||||
'valueString' => 'General Wellness & Vitals Assessment for ' . $visitDate,
|
||||
'valueString' => 'General Wellness and Vitals Assessment for ' . $visitDate,
|
||||
]);
|
||||
$sections[] = [
|
||||
'title' => 'Vital Signs',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user