Skip to content

Commit

Permalink
delete unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
sriharsh05 committed Nov 6, 2023
1 parent 66731de commit 4a34fb3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ const minutesAgo = (timestamp: string) => {
return `${dayjs().diff(dayjs(timestamp), "minute")}m ago`;
};

const isWithinMinutes = (timestamp: string, bedAssignmentStartDate: string) => {
return (
dayjs().diff(dayjs(timestamp), "minute") <
dayjs().diff(dayjs(bedAssignmentStartDate), "minute")
);
};

export default function HL7PatientVitalsMonitor(props: IVitalsComponentProps) {
const { connect, waveformCanvas, data, isOnline } = useHL7VitalsMonitor(
props.config
Expand All @@ -42,13 +35,8 @@ export default function HL7PatientVitalsMonitor(props: IVitalsComponentProps) {
connect(props.socketUrl);
}, [props.socketUrl]);

const bpWithinMaxPersistence = !!(
data.bp?.["date-time"] &&
props.patientCurrentBedAssignmentDate &&
isWithinMinutes(
data.bp?.["date-time"],
props.patientCurrentBedAssignmentDate
)
const bpWithinMaxPersistence = dayjs(data.bp?.["date-time"]).isAfter(
props.patientCurrentBedAssignmentDate
);

return (
Expand Down

0 comments on commit 4a34fb3

Please sign in to comment.