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

Production Release; Spetember Week 3 #6295

Merged
merged 23 commits into from
Sep 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ca51ef1
Refactor Consultation Details (#6258)
thtauhid Sep 11, 2023
ac9a4ee
Add validation for average working hours (#6243)
Ashesh3 Sep 11, 2023
3d73c69
changed priority of backUrl and history for back button in pageTitle …
kshitijv256 Sep 11, 2023
baecaab
Asset filter parameters reset on unselect (#6255)
print-Sathvik Sep 11, 2023
4e8005c
Make the form consistent (#6238)
Pranshu1902 Sep 11, 2023
7cda789
Disabled asset config for user other than admin (#6259)
thtauhid Sep 11, 2023
2da1eee
add test to search asset by qr and serial number (#6266)
nihal467 Sep 12, 2023
203288e
remove quotes from `.env`, gitignore bun lock file (#6263)
rithviknishad Sep 12, 2023
f7ac333
remove `REACT_APP_CONFIG` from `.env` (#6268)
rithviknishad Sep 12, 2023
dd1dcc3
fix load dummy data command (#6270)
sainak Sep 12, 2023
d0ffbd5
Refactor workflow to properly wait for migrations (#6272)
Ashesh3 Sep 12, 2023
8c242d6
Asset CSV export (#6262)
Ashesh3 Sep 12, 2023
87f36ba
add readmission (#6239)
rithviknishad Sep 12, 2023
3fdf1d5
Add Consultation button is now conditionally active (#6260)
thtauhid Sep 12, 2023
8a704af
Added None option in admitted_to bed filters so that we can filter fo…
yaswanthsaivendra Sep 12, 2023
f72a1cf
verify asset filter (#6275)
nihal467 Sep 13, 2023
cc6b570
Vitals Monitor (HL7): Add support to detect multiple ecg wavenames (#…
rithviknishad Sep 13, 2023
2956fa9
fix `goBack` precedence (#6285)
rithviknishad Sep 14, 2023
c5f3b79
Implements `useQuery` & `request` data fetching utilities (used in Lo…
rithviknishad Sep 14, 2023
d790af0
Cypress parallel (#6273)
mathew-alex Sep 14, 2023
5ac9e15
Fixed Cypress Failure in Facility and Resource Page (#6293)
nihal467 Sep 15, 2023
6b8f706
Add Cypress test to Assets Export Functionality (#6291)
nihal467 Sep 15, 2023
0167315
Cam reset (#6286)
khavinshankar Sep 15, 2023
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
34 changes: 28 additions & 6 deletions src/Components/VitalsMonitor/HL7DeviceClient.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
import { EventEmitter } from "events";
import { VitalsDataBase, VitalsValueBase, VitalsWaveformBase } from "./types";

const WAVEFORM_KEY_MAP: Record<string, EventName> = {
II: "ecg-waveform",
Pleth: "pleth-waveform",
Respiration: "spo2-waveform",
};
const ECG_WAVENAME_KEYS = [
"I",
"II",
"III",
"aVR",
"aVL",
"aVF",
"V1",
"V2",
"V3",
"V4",
"V5",
"V6",
] as const;

const WAVEFORM_KEY_MAP: Record<HL7VitalsWaveformData["wave-name"], EventName> =
{
Pleth: "pleth-waveform",
Respiration: "spo2-waveform",

// Maps each ECG wave name to the event "ecg-waveform"
...(Object.fromEntries(
ECG_WAVENAME_KEYS.map((key) => [key, "ecg-waveform"])
) as Record<EcgWaveName, EventName>),
};

/**
* Provides the API for connecting to the Vitals Monitor WebSocket and emitting
@@ -74,8 +94,10 @@ export interface HL7VitalsValueData extends VitalsDataBase, VitalsValueBase {
| "body-temperature2";
}

type EcgWaveName = (typeof ECG_WAVENAME_KEYS)[number];

export interface HL7VitalsWaveformData extends VitalsWaveformBase {
"wave-name": "II" | "Pleth" | "Respiration";
"wave-name": EcgWaveName | "Pleth" | "Respiration";
}

export interface HL7VitalsBloodPressureData extends VitalsDataBase {
2 changes: 1 addition & 1 deletion src/Components/VitalsMonitor/HL7PatientVitalsMonitor.tsx
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ export default function HL7PatientVitalsMonitor(props: IVitalsComponentProps) {
{/* Pulse Rate */}
<NonWaveformData
label="ECG"
attr={data.pulseRate ?? data.heartRate}
attr={data.pulseRate?.value ? data.pulseRate : data.heartRate}
className="text-green-400"
suffix={
<span className="animate-pulse font-sans text-red-500">❤️</span>