Skip to content

Commit

Permalink
Reset HL7/Ventilator socket url when not available (#5808)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 authored Jul 1, 2023
1 parent dcce8f8 commit 9e22228
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Components/Facility/ConsultationDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ export const ConsultationDetails = (props: any) => {
`wss://${ventilatorMiddleware}/observations/${ventilatorMeta?.local_ip_address}`
);
}

if (
!(hl7Middleware && hl7Meta?.local_ip_address) &&
!(ventilatorMiddleware && ventilatorMeta?.local_ip_address)
) {
setHL7SocketUrl(undefined);
setVentilatorSocketUrl(undefined);
}
};

fetchData();
Expand Down

0 comments on commit 9e22228

Please sign in to comment.