Skip to content

Commit

Permalink
Remove dosage from TimelineNode component
Browse files Browse the repository at this point in the history
  • Loading branch information
GokulramGHV committed Nov 30, 2023
1 parent 91c3549 commit 72f9bdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
18 changes: 0 additions & 18 deletions src/CAREUI/display/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export interface TimelineEvent<TType = string> {
by: PerformedByModel | undefined;
icon: IconName;
notes?: string;
dosage?: string;
cancelled?: boolean;
}

Expand Down Expand Up @@ -100,7 +99,6 @@ export const TimelineNode = (props: TimelineNodeProps) => {
</div>

<div className="flex w-full flex-col items-start gap-y-2 pl-10">
<TimelineNodeDosage>{props.event.dosage}</TimelineNodeDosage>
<TimelineNodeNotes>{props.event.notes}</TimelineNodeNotes>
{props.children}
</div>
Expand Down Expand Up @@ -158,19 +156,3 @@ export const TimelineNodeNotes = ({
</div>
);
};

export const TimelineNodeDosage = ({
children,
icon = "l-capsule",
}: TimelineNodeNotesProps) => {
if (!children) {
return;
}

return (
<div className="flex w-full items-start gap-2 rounded-md p-3 ring-1 ring-inset ring-gray-200">
<CareIcon icon={icon} className="text-lg text-gray-700" />
<div className="mt-1 flex-auto text-xs text-gray-700">{children}</div>
</div>
);
};
6 changes: 3 additions & 3 deletions src/Components/Medicine/PrescrpitionTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ const MedicineAdministeredNode = ({
name="medicine"
event={event}
className={classNames(event.cancelled && "opacity-70")}
// TODO: to add administered dosage when Titrated Prescriptions are implemented
titleSuffix={`administered the medicine at ${formatTime(
titleSuffix={`administered ${
event.administration.dosage
} dose of the medicine at ${formatTime(
event.administration.administered_date
)}.`}
actions={
Expand Down Expand Up @@ -211,7 +212,6 @@ const compileEvents = (
by: administration.administered_by,
cancelled: !!administration.archived_on,
administration,
dosage: administration.dosage,
notes: administration.notes,
});
});
Expand Down

0 comments on commit 72f9bdd

Please sign in to comment.