Prefer English food_desc for CarePlan dietary advice in FHIR bundle
This commit is contained in:
parent
8a0396a2c8
commit
0af2d557b2
|
|
@ -3607,9 +3607,9 @@ class AbdmGateway extends BaseController
|
||||||
$dietParts = [];
|
$dietParts = [];
|
||||||
foreach ($foodRows as $fRow) {
|
foreach ($foodRows as $fRow) {
|
||||||
$heading = trim((string) ($fRow['food_short'] ?? ''));
|
$heading = trim((string) ($fRow['food_short'] ?? ''));
|
||||||
$line = trim((string) ($fRow['food_desc_lang'] ?? ''));
|
$line = trim((string) ($fRow['food_desc'] ?? ''));
|
||||||
if ($line === '') {
|
if ($line === '') {
|
||||||
$line = trim((string) ($fRow['food_desc'] ?? ''));
|
$line = trim((string) ($fRow['food_desc_lang'] ?? ''));
|
||||||
}
|
}
|
||||||
if ($heading !== '' && $line !== '') {
|
if ($heading !== '' && $line !== '') {
|
||||||
$dietParts[] = $heading . ': ' . $line;
|
$dietParts[] = $heading . ': ' . $line;
|
||||||
|
|
|
||||||
|
|
@ -9612,9 +9612,9 @@ class Ipd_discharge extends BaseController
|
||||||
$dietParts = [];
|
$dietParts = [];
|
||||||
foreach ($foodRows as $fRow) {
|
foreach ($foodRows as $fRow) {
|
||||||
$heading = trim((string) ($fRow['food_short'] ?? ''));
|
$heading = trim((string) ($fRow['food_short'] ?? ''));
|
||||||
$line = trim((string) ($fRow['food_desc_lang'] ?? ''));
|
$line = trim((string) ($fRow['food_desc'] ?? ''));
|
||||||
if ($line === '') {
|
if ($line === '') {
|
||||||
$line = trim((string) ($fRow['food_desc'] ?? ''));
|
$line = trim((string) ($fRow['food_desc_lang'] ?? ''));
|
||||||
}
|
}
|
||||||
if ($heading !== '' && $line !== '') {
|
if ($heading !== '' && $line !== '') {
|
||||||
$dietParts[] = $heading . ': ' . $line;
|
$dietParts[] = $heading . ': ' . $line;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user