diff --git a/src/Components/Facility/ConsultationDetails.tsx b/src/Components/Facility/ConsultationDetails.tsx index 25b24139550..9b60710de62 100644 --- a/src/Components/Facility/ConsultationDetails.tsx +++ b/src/Components/Facility/ConsultationDetails.tsx @@ -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();