Skip to content

Commit

Permalink
(feat) O3-4166 - Ward app - add ability to hide links in vitals heade…
Browse files Browse the repository at this point in the history
…r in ward patient workspace (#1359)
  • Loading branch information
chibongho authored Nov 12, 2024
1 parent a9983f5 commit 5ee1112
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit 5ee1112

Please sign in to comment.