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

fix/03-2846: Adding Medications from Past Medications Section Places Them in Active Medications List #2120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { type ConfigObject } from '../config-schema';
import PrintComponent from '../print/print.component';
import styles from './medications-details-table.scss';

export interface ActiveMedicationsProps {
export interface MedicationsDetailsTableProps {
isValidating?: boolean;
title?: string;
medications?: Array<Order> | null;
Expand All @@ -56,7 +56,7 @@ export interface ActiveMedicationsProps {
patient: fhir.Patient;
}

const MedicationsDetailsTable: React.FC<ActiveMedicationsProps> = ({
const MedicationsDetailsTable: React.FC<MedicationsDetailsTableProps> = ({
isValidating,
title,
medications,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function MedicationsSummary({ patient }: MedicationsSummaryProps)
const displayText = t('pastMedicationsDisplayText', 'Past medications');
const headerTitle = t('pastMedicationsHeaderTitle', 'past medications');

if (isValidatingPastOrders) return <DataTableSkeleton role="progressbar" />;
if (isLoadingPastOrders) return <DataTableSkeleton role="progressbar" />;

if (pastOrdersError) return <ErrorState error={pastOrdersError} headerTitle={headerTitle} />;

Expand All @@ -72,6 +72,7 @@ export default function MedicationsSummary({ patient }: MedicationsSummaryProps)
isValidating={isValidatingPastOrders}
title={t('pastMedicationsTableTitle', 'Past Medications')}
medications={pastOrders}
showAddButton={false}
showDiscontinueButton={false}
showModifyButton={false}
showReorderButton={true}
Expand Down