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

(feat) O3-4166 - Ward app - add ability to hide links in vitals heade… #1359

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions packages/esm-ward-app/src/config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ export const configSchema: ConfigSchema = {
},
},
},
hideWorkspaceVitalsLinks: {
_description: 'Configure whether to hide vital history and record vital links in the ward patient workspace.',
_type: Type.Boolean,
_default: false,
},
};

export interface WardConfigObject {
Expand All @@ -266,6 +271,7 @@ export interface WardConfigObject {
admissionRequestNote: Array<AdmissionRequestNoteElementConfig>;
};
wards: Array<WardDefinition>;
hideWorkspaceVitalsLinks: boolean;
}

export interface PendingItemsElementConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { attach, ExtensionSlot } from '@openmrs/esm-framework';
import { attach, ExtensionSlot, useConfig } from '@openmrs/esm-framework';
import React from 'react';
import { type WardPatientWorkspaceProps } from '../../types';
import WardPatientWorkspaceBanner from '../patient-banner/patient-banner.component';
import styles from './ward-patient.style.scss';
import { type WardConfigObject } from '../../config-schema';

attach('ward-patient-workspace-header-slot', 'patient-vitals-info');

export default function WardPatientWorkspace({ wardPatient, WardPatientHeader }: WardPatientWorkspaceProps) {
export default function WardPatientWorkspace({ wardPatient }: WardPatientWorkspaceProps) {
const { patient } = wardPatient ?? {};
const extensionSlotState = { patient, patientUuid: patient?.uuid };
const { hideWorkspaceVitalsLinks } = useConfig<WardConfigObject>();
const extensionSlotState = { patient, patientUuid: patient?.uuid, hideLinks: hideWorkspaceVitalsLinks };

return (
<>
Expand Down
Loading