Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-transifex
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen authored Jan 13, 2025
2 parents 5db19ee + 8d84f6c commit 1641dde
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import { HeaderGlobalAction } from '@carbon/react';
import { UserFollow } from '@carbon/react/icons';
import { navigate } from '@openmrs/esm-framework';
import styles from './add-patient-link.scss';
import { useTranslation } from 'react-i18next';

export default function Root() {
const { t } = useTranslation();
const addPatient = React.useCallback(() => navigate({ to: '${openmrsSpaBase}/patient-registration' }), []);

return (
<HeaderGlobalAction
aria-label="Add Patient"
aria-labelledby="Add Patient"
aria-label={t('addPatient', 'Add patient')}
aria-labelledby={t('addPatient', 'Add patient')}
enterDelayMs={500}
name="AddPatientIcon"
onClick={addPatient}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import userEvent from '@testing-library/user-event';
import { render, screen } from '@testing-library/react';
import { navigate } from '@openmrs/esm-framework';
import Root from './add-patient-link';
import Root from './add-patient-link.extension';

const mockNavigate = jest.mocked(navigate);

Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-registration-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { esmPatientRegistrationSchema } from './config-schema';
import { moduleName, patientRegistration } from './constants';
import { setupOffline } from './offline';
import rootComponent from './root.component';
import addPatientLinkComponent from './add-patient-link';
import addPatientLinkComponent from './add-patient-link.extension';
import editPatientDetailsButtonComponent from './widgets/edit-patient-details-button.component';
import { PatientPhotoExtension } from './patient-photo.extension';

Expand Down
1 change: 1 addition & 0 deletions packages/esm-patient-registration-app/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"addPatient": "Add patient",
"addRelationshipButtonText": "Add Relationship",
"addressHeader": "Address",
"allFieldsRequiredText": "All fields are required unless marked optional",
Expand Down
40 changes: 26 additions & 14 deletions packages/esm-ward-app/src/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,19 @@
"component": "admissionRequestWorkspace",
"title": "admissionRequests",
"type": "pending-admission-requests",
"width": "wider",
"groups": ["ward-patient-admission-requests"]
"width": "wider"
},{
"name": "create-admission-encounter-workspace",
"component": "createAdmissionEncounterWorkspace",
"title": "admitPatient",
"type": "patient-search-workspace",
"width": "wider",
"groups": ["ward-patient-admission-requests"]
"width": "wider"
},
{
"name": "ward-patient-notes-workspace",
"component": "wardPatientNotesWorkspace",
"type": "ward-patient-notes",
"title": "inpatientNotesWorkspaceTitle",
"groups": ["ward-patient"]
"title": "inpatientNotesWorkspaceTitle"

},
{
Expand All @@ -116,15 +113,13 @@
"component": "wardPatientWorkspace",
"type": "ward",
"title": "Ward patient",
"width": "extra-wide",
"groups": ["ward-patient"]
"width": "extra-wide"
},
{
"name": "patient-transfer-swap-workspace",
"component": "patientTransferAndSwapWorkspace",
"title": "transfers",
"type": "transfer-swap-bed-form",
"groups": ["ward-patient"]
"type": "transfer-swap-bed-form"

},
{
Expand All @@ -137,22 +132,39 @@
"name": "patient-discharge-workspace",
"component": "patientDischargeWorkspace",
"title": "discharge",
"type": "ward-patient-discharge",
"groups": ["ward-patient"]
"type": "ward-patient-discharge"
},
{
"name": "ward-patient-clinical-forms-workspace",
"component": "patientClinicalFormsWorkspace",
"title": "clinicalForms",
"type": "ward-patient-clinical-forms",
"width": "wider",
"groups": ["ward-patient"]
"width": "wider"
},
{
"name": "cancel-admission-request-workspace",
"component": "cancelAdmissionRequestWorkspace",
"title": "cancelAdmissionRequest",
"type": "cancel-admission-request"
}
],
"workspaceGroups": [
{
"name": "ward-patient",
"members": [
"ward-patient-workspace",
"ward-patient-notes-workspace",
"patient-transfer-swap-workspace",
"patient-discharge-workspace",
"ward-patient-clinical-forms-workspace"
]
},
{
"name": "ward-patient-admission-requests",
"members": [
"admission-requests-workspace",
"create-admission-encounter-workspace"
]
}
]
}
Loading

0 comments on commit 1641dde

Please sign in to comment.