diff --git a/cypress/fixtures/sampleAsset.xlsx b/cypress/fixtures/sampleAsset.xlsx
index f8e234ce447..49421f62bac 100644
Binary files a/cypress/fixtures/sampleAsset.xlsx and b/cypress/fixtures/sampleAsset.xlsx differ
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts
index 7f5484564fc..2dd8c477233 100644
--- a/cypress/support/commands.ts
+++ b/cypress/support/commands.ts
@@ -81,7 +81,7 @@ Cypress.Commands.add(
Cypress.Commands.add("verifyNotification", (text) => {
cy.get(".pnotify-container").should("exist").contains(text);
- return cy.get(".pnotify-container").click({ force: true });
+ return cy.get(".pnotify-container").contains(text).click({ force: true });
});
Cypress.on("uncaught:exception", () => {
diff --git a/package-lock.json b/package-lock.json
index 4871fbe374b..2a9fe3f520f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14496,8 +14496,6 @@
},
"node_modules/npm/node_modules/cross-spawn/node_modules/which": {
"version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"inBundle": true,
"license": "ISC",
@@ -15254,8 +15252,6 @@
},
"node_modules/npm/node_modules/minipass": {
"version": "5.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
- "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
"dev": true,
"inBundle": true,
"license": "ISC",
@@ -16398,8 +16394,6 @@
},
"node_modules/npm/node_modules/tar": {
"version": "6.1.15",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz",
- "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==",
"dev": true,
"inBundle": true,
"license": "ISC",
@@ -16500,8 +16494,6 @@
},
"node_modules/npm/node_modules/util-deprecate": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"dev": true,
"inBundle": true,
"license": "MIT"
@@ -16569,8 +16561,6 @@
},
"node_modules/npm/node_modules/wrap-ansi": {
"version": "8.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
- "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
"dev": true,
"inBundle": true,
"license": "MIT",
@@ -16589,8 +16579,6 @@
"node_modules/npm/node_modules/wrap-ansi-cjs": {
"name": "wrap-ansi",
"version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"inBundle": true,
"license": "MIT",
@@ -16670,8 +16658,6 @@
},
"node_modules/npm/node_modules/wrappy": {
"version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
"dev": true,
"inBundle": true,
"license": "ISC"
@@ -16691,8 +16677,6 @@
},
"node_modules/npm/node_modules/yallist": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true,
"inBundle": true,
"license": "ISC"
diff --git a/src/CAREUI/display/RecordMeta.tsx b/src/CAREUI/display/RecordMeta.tsx
index 83928f1f23a..48cc8d370ad 100644
--- a/src/CAREUI/display/RecordMeta.tsx
+++ b/src/CAREUI/display/RecordMeta.tsx
@@ -11,13 +11,14 @@ interface Props {
last_name: string;
last_login: string | undefined;
};
+ inlineUser?: boolean;
}
/**
* A generic component to display relative time along with a tooltip and a user
* if provided.
*/
-const RecordMeta = ({ time, user, prefix, className }: Props) => {
+const RecordMeta = ({ time, user, prefix, className, inlineUser }: Props) => {
const isOnline = user && isUserOnline(user);
let child = (
@@ -25,14 +26,15 @@ const RecordMeta = ({ time, user, prefix, className }: Props) => {
{relativeTime(time)}
{formatDateTime(time)}
- {user && (
- <>
+ {user && !inlineUser && (
+
+ by
- Update record for asset + {t("update_record_for_asset")} {props.asset?.name}
Edited On
++ {t("edited_on")} +
{formatDateTime(editRecord.edited_on)}
Edited By
++ {t("edited_by")} +
{editRecord.edited_by.username}
@@ -125,7 +129,7 @@ export const AssetServiceEditModal = (props: {- Serviced On + {t("serviced_on")}
Notes
++ {t("notes")} +
{editRecord.note || "-"}
@@ -151,7 +157,7 @@ export const AssetServiceEditModal = (props: { editRecord ? setEditRecord(undefined) : props.handleClose(); }} > - {editRecord ? "Back" : "Close"} + {editRecord ? t("back") : t("close")}- Update record for asset + {t("update_record_for_asset")} {props.asset?.name}
- You need at least a location to create an assest. + {t("you_need_at_least_a_location_to_create_an_assest")}
@@ -440,7 +441,8 @@ const AssetCreate = (props: AssetProps) => { onClick={() => setIsScannerActive(false)} className="btn btn-default mb-2" > - Close Scanner + + {t("close_scanner")}
@@ -184,9 +182,9 @@ export default function PrescriptionAdministrationsTable({
border
className="mx-2 px-1"
variant="secondary"
- disabled={!pagination.hasNext}
- onClick={pagination.next}
- tooltip="Next 24 hours"
+ disabled={!pagination.hasPrevious}
+ onClick={pagination.previous}
+ tooltip="Previous 24 hours"
tooltipClassName="tooltip-bottom -translate-x-1/2 text-xs"
>
|
))
- : pagination.slots
- ?.map(({ start, end }, index) => (
-
- {formatDateTime(end, "DD/MM")} -{formatDateTime(end, "HH:mm")} - - - Administration(s) between -- {formatTime(start)} and{" "} - {formatTime(end)} - - on {formatDate(start)} - - |
- ))
- .reverse()}
+ : pagination.slots?.map(({ start, end }, index) => (
+
+ {formatDateTime(start, "DD/MM")} +{formatDateTime(start, "HH:mm")} + + + Administration(s) between ++ {formatTime(start)} and{" "} + {formatTime(end)} + + on {formatDate(start)} + + |
+ ))}
setShowDetails(true)}
+ {showEdit && (
+ |
+
+ }
+ className="w-full max-w-3xl lg:min-w-[600px]"
>
-
-
-
- {prescription.medicine_object?.name ??
- prescription.medicine_old}
-
-
- {prescription.discontinued && (
-
- {t("discontinued")}
-
+ setShowDetails(true)}
+ >
+ |
-
-
+
-
+
+ {prescription.medicine_object?.name ?? prescription.medicine_old}
+
- {prescription.route && (
-
- {t(prescription.route)}
-
- )}
-
+ {prescription.discontinued && (
+
+ {t("discontinued")}
+
+ )}
-
-
+ {prescription.route && (
+
+ {t(prescription.route)}
+
+ )}
{prescription.dosage} -- {!prescription.is_prn - ? t("PRESCRIPTION_FREQUENCY_" + prescription.frequency) - : prescription.indicator} - -
- {/* Administration Cells */}
- {props.intervals
- .map(({ start, end }, index) => (
- |
- {administrations === undefined ? (
- |
- ))
- .reverse()}
-
- {/* Action Buttons */}
- |
- |
+
+
+
+
+ {prescription.dosage} ++ {!prescription.is_prn + ? t("PRESCRIPTION_FREQUENCY_" + prescription.frequency) + : prescription.indicator} + +
+ {/* Administration Cells */}
+ {props.intervals.map(({ start, end }, index) => (
+ |
+ {administrations === undefined ? (
+ |
-
+
+ {/* Action Buttons */}
+ |
+ |
+
+
@@ -83,7 +84,7 @@ export default function PrescriptionDetailCard({
+
{props.children}
diff --git a/src/Components/Medicine/models.ts b/src/Components/Medicine/models.ts
index 62aea46b6d2..0c49d199b21 100644
--- a/src/Components/Medicine/models.ts
+++ b/src/Components/Medicine/models.ts
@@ -1,7 +1,7 @@
import { PerformedByModel } from "../HCX/misc";
interface BasePrescription {
- readonly id?: string;
+ readonly id: string;
medicine?: string;
medicine_object?: MedibaseMedicine;
medicine_old?: string;
diff --git a/src/Components/Medicine/validators.ts b/src/Components/Medicine/validators.ts
new file mode 100644
index 00000000000..40261646d05
--- /dev/null
+++ b/src/Components/Medicine/validators.ts
@@ -0,0 +1,49 @@
+import { FieldError, RequiredFieldValidator } from "../Form/FieldValidators";
+import { FormErrors } from "../Form/Utils";
+import { Prescription } from "./models";
+
+export const PrescriptionFormValidator = () => {
+ return (form: Prescription): FormErrors
+
+ Prescribed
+
-
- )}
+ {!showUnread &&
+ totalCount > RESULT_LIMIT &&
+ offset < totalCount - RESULT_LIMIT && (
+
+
+ )}
>
);
} else if (data && data.length === 0) {
@@ -448,6 +453,21 @@ export default function NotificationsList({
/>
{t("mark_all_as_read")}
+
diff --git a/src/Components/Shifting/BoardView.tsx b/src/Components/Shifting/BoardView.tsx
index 0eddfddf745..85815770acf 100644
--- a/src/Components/Shifting/BoardView.tsx
+++ b/src/Components/Shifting/BoardView.tsx
@@ -95,9 +95,7 @@ export default function BoardView() {
{props.patientAssetBed && (
@@ -97,24 +110,37 @@ export default function HL7PatientVitalsMonitor(props: IVitalsComponentProps) {
{/* Blood Pressure */}
-
+
diff --git a/src/Components/VitalsMonitor/types.ts b/src/Components/VitalsMonitor/types.ts
index 066b7a7cc78..60979a6f9b0 100644
--- a/src/Components/VitalsMonitor/types.ts
+++ b/src/Components/VitalsMonitor/types.ts
@@ -8,7 +8,7 @@ export interface VitalsDataBase {
"patient-name": string;
}
-export interface VitalsValueBase {
+export interface VitalsValueBase extends VitalsDataBase {
value: number;
unit: string;
interpretation: string;
diff --git a/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts b/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts
index 8b74a2d05d2..ed16cc2edfd 100644
--- a/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts
+++ b/src/Components/VitalsMonitor/useHL7VitalsMonitor.ts
@@ -8,11 +8,12 @@ import useCanvas from "../../Common/hooks/useCanvas";
import {
ChannelOptions,
IVitalsComponentProps,
+ VitalsDataBase,
VitalsValueBase as VitalsValue,
} from "./types";
import { getChannel, getVitalsCanvasSizeAndDuration } from "./utils";
-interface VitalsBPValue {
+interface VitalsBPValue extends VitalsDataBase {
systolic: VitalsValue;
diastolic: VitalsValue;
map: VitalsValue;
diff --git a/src/Locale/en/Asset.json b/src/Locale/en/Asset.json
index cf13de5cd47..f24549ee0b6 100644
--- a/src/Locale/en/Asset.json
+++ b/src/Locale/en/Asset.json
@@ -1,3 +1,15 @@
{
- "create_asset": "Create Asset"
+ "create_asset": "Create Asset",
+ "edit_history": "Edit History",
+ "update_record_for_asset": "Update record for asset",
+ "edited_on": "Edited On",
+ "edited_by": "Edited By",
+ "serviced_on": "Serviced On",
+ "notes": "Notes",
+ "back": "Back",
+ "close": "Close",
+ "update_asset_service_record": "Update Asset Service Record",
+ "eg_details_on_functionality_service_etc": "Eg. Details on functionality, service, etc.",
+ "updating": "Updating",
+ "update": "Update"
}
diff --git a/src/Locale/en/Facility.json b/src/Locale/en/Facility.json
index aa44d86dda5..5e69f8108af 100644
--- a/src/Locale/en/Facility.json
+++ b/src/Locale/en/Facility.json
@@ -20,5 +20,37 @@
"type_b_cylinders": "B Type Cylinders",
"type_c_cylinders": "C Type Cylinders",
"type_d_cylinders": "D Type Cylinders",
- "select_local_body": "Select Local Body"
+ "select_local_body": "Select Local Body",
+ "update_asset": "Update Asset",
+ "create_new_asset": "Create New Asset",
+ "you_need_at_least_a_location_to_create_an_assest": "You need at least a location to create an assest.",
+ "add_location": "Add Location",
+ "close_scanner": "Close Scanner",
+ "scan_asset_qr": "Scan Asset QR!",
+ "update": "Update",
+ "create": "Create",
+ "asset_name": "Asset Name",
+ "asset_location": "Asset Location",
+ "asset_type": "Asset Type",
+ "asset_class": "Asset Class",
+ "description": "Description",
+ "details_about_the_equipment": "Details about the equipment",
+ "working_status": "Working Status",
+ "why_the_asset_is_not_working": "Why the asset is not working?",
+ "describe_why_the_asset_is_not_working": "Describe why the asset is not working",
+ "asset_qr_id": "Asset QR ID",
+ "manufacturer": "Manufacturer",
+ "eg_xyz": "Eg. XYZ",
+ "eg_abc": "Eg. ABC",
+ "warranty_amc_expiry": "Warranty / AMC Expiry",
+ "customer_support_name": "Customer Support Name",
+ "customer_support_number": "Customer support number",
+ "customer_support_email": "Customer Support Email",
+ "eg_mail_example_com": "Eg. mail@example.com",
+ "vendor_name": "Vendor Name",
+ "serial_number": "Serial Number",
+ "last_serviced_on": "Last Serviced On",
+ "notes": "Notes",
+ "create_asset": "Create Asset",
+ "create_add_more": "Create & Add More"
}
diff --git a/src/Locale/en/Medicine.json b/src/Locale/en/Medicine.json
index 8cc80234b74..d32015e7618 100644
--- a/src/Locale/en/Medicine.json
+++ b/src/Locale/en/Medicine.json
@@ -33,7 +33,9 @@
"last_administered": "Last administered",
"modification_caution_note": "No modifications possible once added",
"discontinue_caution_note": "Are you sure you want to discontinue this prescription?",
+ "edit_caution_note": "A new prescription will be added to the consultation with the edited details and the current prescription will be discontinued.",
"reason_for_discontinuation": "Reason for discontinuation",
+ "reason_for_edit": "Reason for edit",
"PRESCRIPTION_ROUTE_ORAL": "Oral",
"PRESCRIPTION_ROUTE_IV": "IV",
"PRESCRIPTION_ROUTE_IM": "IM",
@@ -47,4 +49,4 @@
"PRESCRIPTION_FREQUENCY_Q4H": "4th hourly",
"PRESCRIPTION_FREQUENCY_QOD": "Alternate day",
"PRESCRIPTION_FREQUENCY_QWK": "Once a week"
-}
+}
\ No newline at end of file
diff --git a/src/Locale/en/Notifications.json b/src/Locale/en/Notifications.json
index a4770af5618..8c6255ca850 100644
--- a/src/Locale/en/Notifications.json
+++ b/src/Locale/en/Notifications.json
@@ -3,6 +3,8 @@
"mark_as_read": "Mark as Read",
"subscribe": "Subscribe",
"subscribe_on_this_device": "Subscribe on this device",
+ "show_unread_notifications": "Show Unread",
+ "show_all_notifications": "Show All",
"filter_by_category": "Filter by category",
"mark_all_as_read": "Mark all as Read",
"reload": "Reload",
diff --git a/src/Redux/actions.tsx b/src/Redux/actions.tsx
index 1a5bd7e4fb1..26e006f4cea 100644
--- a/src/Redux/actions.tsx
+++ b/src/Redux/actions.tsx
@@ -501,7 +501,7 @@ export const sampleReport = (id: string, sampleId: string) => {
export const getTestList = (params: object) => {
return fireRequest("getTestSampleList", [], params);
};
-export const getTestSample = (id: number) => {
+export const getTestSample = (id: string) => {
return fireRequest("getTestSample", [id], {});
};
export const patchSample = (params: object, pathParam: object) => {
@@ -1003,7 +1003,7 @@ export const PrescriptionActions = (consultation_external_id: string) => {
const pathParams = { consultation_external_id };
return {
- list: (query?: Record
NIBP
- {data.bp?.systolic.unit ?? "--"}
+
+ {bpWithinMaxPersistence ? data.bp?.systolic.unit ?? "--" : "--"}
+
+
+ {data.bp?.["date-time"] && minutesAgo(data.bp?.["date-time"])}
+
Sys / Dia
- {data.bp?.systolic.value ?? "--"}
+
+ {bpWithinMaxPersistence
+ ? data.bp?.systolic.value ?? "--"
+ : "--"}
+
/
- {data.bp?.diastolic.value ?? "--"}
+
+ {bpWithinMaxPersistence
+ ? data.bp?.diastolic.value ?? "--"
+ : "--"}
+
Mean
- {data.bp?.map.value ?? "--"}
+ {bpWithinMaxPersistence ? data.bp?.map.value ?? "--" : "--"}
|
---|