Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patient Updates Tab, Structured responses filter by Encounter #10329

Merged
merged 15 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@
"has_domestic_healthcare_support": "Has domestic healthcare support?",
"has_sari": "Has SARI (Severe Acute Respiratory illness)?",
"health-profile": "Health Profile",
"health_profile": "Health Profile",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Remove unused health-profile translation key

The health-profile key exists in translation files but isn't used anywhere in the codebase. The new health_profile key is actively used in HealthProfileSummary.tsx. Please remove the unused health-profile key from the locale files.

  • Remove "health-profile" from public/locale/en.json
  • Remove "health-profile" from public/locale/ml.json
🔗 Analysis chain

Verify the need for duplicate health profile translation keys.

The new key health_profile seems redundant with the existing health-profile key. Please verify if both keys are necessary or if we should standardize on one format.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check usage of both health profile translation keys

echo "Checking usage of 'health-profile' key:"
rg "t\([\"']health-profile[\"']\)" -A 2

echo -e "\nChecking usage of 'health_profile' key:"
rg "t\([\"']health_profile[\"']\)" -A 2

Length of output: 557


Script:

#!/bin/bash
# Check if health-profile key exists in locale files
echo "Checking for 'health-profile' in locale files:"
rg '"health-profile"' public/locale/

Length of output: 267

"hearing": "We are hearing you...",
"help_confirmed": "There is sufficient diagnostic and/or clinical evidence to treat this as a confirmed condition.",
"help_differential": "One of a set of potential (and typically mutually exclusive) diagnoses asserted to further guide the diagnostic process and preliminary treatment.",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Common/Charts/ObservationChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const ObservationVisualizer = ({
{codeGroups.map((group, index) => (
<Card key={index} className="p-4">
<div
className="flex items-center justify-center text-muted-foreground"
className="flex items-center justify-center text-gray-500"
style={{ height: `${height}px` }}
>
No data available
Expand Down Expand Up @@ -365,7 +365,7 @@ export const ObservationVisualizer = ({
details.note && (
<div
key={code.code}
className="text-sm text-muted-foreground"
className="text-sm text-gray-500"
>
<span className="font-medium">
{code.display}:
Expand Down
4 changes: 2 additions & 2 deletions src/components/Common/Charts/ObservationHistoryTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const ObservationHistoryTable = ({

if (!data?.pages[0]?.results.length) {
return (
<div className="flex h-[200px] items-center justify-center text-muted-foreground">
<div className="flex h-[200px] items-center justify-center text-gray-500">
No data available
</div>
);
Expand Down Expand Up @@ -134,7 +134,7 @@ export const ObservationHistoryTable = ({
<span>{name}</span>
</div>
</TableCell>
<TableCell className="text-sm text-muted-foreground">
<TableCell className="text-sm text-gray-500">
{observation.note}
</TableCell>
</TableRow>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Common/ComboboxQuantityInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function ComboboxQuantityInput({
autoFocus={autoFocus}
/>
{selectedUnit && (
<div className="absolute right-1.5 top-1/2 -translate-y-1/2 text-sm text-muted-foreground">
<div className="absolute right-1.5 top-1/2 -translate-y-1/2 text-sm text-gray-500">
{selectedUnit.display}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Common/SearchByMultipleFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ const SearchByMultipleFields: React.FC<SearchByMultipleFieldsProps> = ({
<Button
variant="ghost"
size="sm"
className="w-full flex items-center justify-center text-muted-foreground"
className="w-full flex items-center justify-center text-gray-500"
onClick={() => {
setSearchValue("");
inputRef.current?.focus();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Encounter/CreateEncounterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default function CreateEncounterForm({
<div className="flex flex-col items-center text-center">
<Icon className="size-6" />
<div className="text-sm font-bold">{label}</div>
<div className="text-wrap text-xs text-center text-xs text-muted-foreground">
<div className="text-wrap text-xs text-center text-xs text-gray-500">
{description}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ export default function ObservationsList(props: Props) {
if (isLoading) {
return (
<Card className="p-6">
<div className="text-lg font-medium text-muted-foreground">
{t("loading")}
</div>
<div className="text-lg font-medium text-gray-500">{t("loading")}</div>
</Card>
);
}
Expand All @@ -70,7 +68,7 @@ export default function ObservationsList(props: Props) {
if (observations.length === 0) {
return (
<Card className="p-6">
<div className="text-lg font-medium text-muted-foreground">
<div className="text-lg font-medium text-gray-500">
{t("no_observations")}
</div>
</Card>
Expand All @@ -83,7 +81,7 @@ export default function ObservationsList(props: Props) {
{observations.map((item: Observation) => (
<Card key={item.id} className="flex items-center justify-between p-4">
<div>
<div className="text-xs flex items-center gap-1 text-muted-foreground">
<div className="text-xs flex items-center gap-1 text-gray-500">
<CareIcon icon="l-calender" />
<span>{formatDateTime(item.effective_datetime)}</span>
</div>
Expand All @@ -102,16 +100,14 @@ export default function ObservationsList(props: Props) {
</div>
)}
{item.note && (
<div className="mt-1 text-sm text-muted-foreground">
{item.note}
</div>
<div className="mt-1 text-sm text-gray-500">{item.note}</div>
)}
</div>
</Card>
))}
{hasNextPage && (
<div ref={ref} className="flex justify-center p-4">
<div className="text-sm text-muted-foreground">
<div className="text-sm text-gray-500">
{isFetchingNextPage ? t("loading_more") : t("load_more")}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function QuestionnaireResponseView({
if (!formResponse) {
return (
<Card className="p-6 text-center">
<p className="text-lg font-medium text-muted-foreground">
<p className="text-lg font-medium text-gray-500">
{t("error_loading_questionnaire_response")}
</p>
</Card>
Expand All @@ -54,12 +54,12 @@ export default function QuestionnaireResponseView({
<Card className="p-6">
<div className="space-y-4">
<div>
<p className="text-sm text-muted-foreground">
<p className="text-sm text-gray-500">
{formResponse.questionnaire?.description}
</p>
</div>

<div className="flex items-center gap-4 text-sm text-muted-foreground">
<div className="flex items-center gap-4 text-sm text-gray-500">
<div className="flex items-center gap-2">
<CareIcon icon="l-calender" className="h-4 w-4" />
<span>{formatDateTime(formResponse.created_date)}</span>
Expand Down Expand Up @@ -95,13 +95,13 @@ export default function QuestionnaireResponseView({

return (
<div key={question.id} className="grid grid-cols-2 gap-4">
<div className="text-sm text-muted-foreground">
<div className="text-sm text-gray-500">
{question.text}
</div>
<div className="font-medium">
{String(value)}
{questionResponse.note && (
<span className="ml-2 text-sm text-muted-foreground">
<span className="ml-2 text-sm text-gray-500">
({questionResponse.note})
</span>
)}
Expand Down
Loading
Loading