Skip to content
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
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

801 changes: 0 additions & 801 deletions .yarn/releases/yarn-3.2.4.cjs

This file was deleted.

942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.9.2.cjs

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.2.4.cjs
yarnPath: .yarn/releases/yarn-4.9.2.cjs
48 changes: 23 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"react-to-print": "^2.14.13",
"recharts": "^2.7.2",
"swr": "^2.1.1",
"zod": "^3.22.4"
"zod": "^3.23.8"
},
"devDependencies": {
"@carbon/react": "^1.64.1",
"@carbon/react": "^1.83.0",
"@ohri/openmrs-esm-ohri-commons-lib": "next",
"@openmrs/esm-framework": "next",
"@openmrs/esm-patient-common-lib": "next",
Expand All @@ -49,49 +49,47 @@
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^28.1.8",
"@types/lodash-es": "^4.17.3",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@types/testing-library__jest-dom": "^5.14.1",
"@types/webpack-env": "^1.18.1",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"clean-webpack-plugin": "^3.0.0",
"concurrently": "^7.4.0",
"@types/webpack-env": "^1.18.8",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"clean-webpack-plugin": "^4.0.0",
"concurrently": "^8.2.1",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"eslint": "^8.44.0",
"eslint": "^8.50.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-ts-react-important-stuff": "^3.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^8.0.3",
"i18next": "^23.2.8",
"i18next-parser": "^8.0.0",
"identity-obj-proxy": "^3.0.0",
"install-peers": "^1.0.4",
"jest": "^28.1.3",
"jest-cli": "^28.1.3",
"jest-environment-jsdom": "^28.1.3",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lerna": "^5.6.1",
"lodash": "^4.17.21",
"openmrs": "next",
"prettier": "^2.8.8",
"openmrs": "^7.0.1-pre.3259",
"prettier": "^3.0.3",
"pretty-quick": "^3.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^11.18.6",
"react-router-dom": "^6.14.1",
"rxjs": "^6.6.7",
"sass": "^1.54.3",
"swc-loader": "^0.2.3",
"systemjs-webpack-interop": "^2.3.7",
"turbo": "^1.10.13",
"turbo": "^2.5.2",
"typescript": "^5.0.2",
"webpack": "^5.83.1",
"webpack": "^5.99.9",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.8.1"
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.1"
},
"packageManager": "yarn@3.2.4"
"packageManager": "yarn@4.9.2"
}
8 changes: 4 additions & 4 deletions packages/esm-care-panel-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
"url": "git+https://github.com/METS-Programme/esm-ugandaemr-core/issues"
},
"dependencies": {
"@carbon/react": "^1.64.1",
"@carbon/react": "^1.83.0",
"lodash-es": "^4.17.15",
"react-to-print": "^2.14.13"
},
"peerDependencies": {
"@openmrs/esm-framework": "*",
"@openmrs/esm-patient-common-lib": "x",
"@openmrs/esm-framework": "7.x",
"@openmrs/esm-patient-common-lib": "10.x",
"react": "^18.1.0",
"react-i18next": "11.x",
"react-router-dom": "6.x",
"swr": "2.x"
},
"devDependencies": {
"@openmrs/esm-patient-common-lib": "next",
"webpack": "^5.74.0"
"webpack": "^5.99.9"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ const CarePanelTabs: React.FC<CarePanelTabsProps> = ({ patientUuid }) => {
const [selectedTab, setSelectedTab] = useState(0);
return (
<div className={styles.tabContainer}>
<Tabs
selectedIndex={selectedTab}
onChange={({ selectedIndex }) => setSelectedTab(selectedIndex)}
className={styles.tabs}
>
<Tabs selectedIndex={selectedTab} onChange={({ selectedIndex }) => setSelectedTab(selectedIndex)}>
<TabList contained className={styles.tabList}>
<Tab>{t('dsdmHistory', 'DSDM History')}</Tab>
<Tab>{t('vlHistory', 'Viral Load History')}</Tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const CarePanel: React.FC<CarePanelProps> = ({ patientUuid, formEntrySub, launch
if (isLoading) {
return (
<div className={styles.widgetCard}>
<StructuredListSkeleton role="progressbar" />
<StructuredListSkeleton />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const CarePanelMCH: React.FC<CarePanelProps> = ({ patientUuid, formEntrySub, lau
if (isLoading) {
return (
<div className={styles.widgetCard}>
<StructuredListSkeleton role="progressbar" />
<StructuredListSkeleton />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const CarePanelTB: React.FC<CarePanelProps> = ({ patientUuid, formEntrySub, laun
if (isLoading) {
return (
<div className={styles.widgetCard}>
<StructuredListSkeleton role="progressbar" />
<StructuredListSkeleton />
</div>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ import {
Tile,
} from '@carbon/react';
import { Close, DocumentAdd } from '@carbon/react/icons';
import {
CardHeader,
EmptyState,
launchPatientWorkspace,
launchStartVisitPrompt,
} from '@openmrs/esm-patient-common-lib';
import { CardHeader, EmptyState, launchStartVisitPrompt } from '@openmrs/esm-patient-common-lib';
import { useTranslation } from 'react-i18next';
import { PatientCarePrograms, useCarePrograms } from '../hooks/useCarePrograms';
import { ErrorState, formatDate, useLayoutType, useVisit } from '@openmrs/esm-framework';
import { ErrorState, formatDate, launchWorkspace, useLayoutType, useVisit } from '@openmrs/esm-framework';
import capitalize from 'lodash/capitalize';
import { mutate } from 'swr';

Expand All @@ -46,7 +41,7 @@ const CarePrograms: React.FC<CareProgramsProps> = ({ patientUuid }) => {
: `${careProgram.display} Enrollment form`;

currentVisit
? launchPatientWorkspace('patient-form-entry-workspace', {
? launchWorkspace('patient-form-entry-workspace', {
workspaceTitle: workspaceTitle,
mutateForm: () => {
mutate((key) => true, undefined, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const PatientSummary: React.FC<PatientSummaryProps> = ({ patientUuid }) => {
};

if (isLoading) {
return <StructuredListSkeleton role="progressbar" />;
return <StructuredListSkeleton />;
}

if (isError) {
Expand All @@ -59,7 +59,7 @@ const PatientSummary: React.FC<PatientSummaryProps> = ({ patientUuid }) => {
size="sm"
className={styles.btnShow}
onClick={() => {
handlePrint(), setPrintMode(true);
(handlePrint(), setPrintMode(true));
}}
kind="tertiary"
renderIcon={(props) => <Printer size={16} {...props} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const ProgramEnrollment: React.FC<ProgramEnrollmentProps> = ({ enrollments = [],

<span className={styles.value}>{programData.currentRegimen}</span>
<span>
<RegimenButton />
<RegimenButton patientUuid={patientUuid} />
</span>
</div>
<div className={styles.content}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ProgramSummary: React.FC<ProgramSummaryProps> = ({ patientUuid, programNam

const isTablet = useLayoutType() == 'tablet';
if (isLoading) {
return <StructuredListSkeleton role="progressbar" />;
return <StructuredListSkeleton />;
}
if (isError) {
return <span>{t('errorProgramSummary', 'Error loading HIV summary')}</span>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { launchPatientWorkspace, useLaunchWorkspaceRequiringVisit } from '@openmrs/esm-patient-common-lib';
import { useLaunchWorkspaceRequiringVisit } from '@openmrs/esm-patient-common-lib';
import { Link } from '@carbon/react';
import styles from './standard-regimen.scss';
import { launchWorkspace } from '@openmrs/esm-framework';

const RegimenButton: React.FC = () => {
interface RegimenButtonProps {
patientUuid: string;
}

const RegimenButton: React.FC<RegimenButtonProps> = ({ patientUuid }) => {
const { t } = useTranslation();
const launchFormsWorkspace = useLaunchWorkspaceRequiringVisit('patient-form-entry-workspace');

Expand All @@ -17,9 +22,10 @@ const RegimenButton: React.FC = () => {
<Link
className={styles.linkName}
onClick={() =>
launchPatientWorkspace('patient-form-entry-workspace', {
launchWorkspace('patient-form-entry-workspace', {
formInfo: {
formUuid: '53a3850c-855a-11eb-8dcd-0242ac130003',
patientUuid,
},
workspaceTitle: 'Clinical Form',
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,14 @@ const RegimenForm: React.FC<RegimenFormProps> = ({
className={styles.radioButtonWrapper}
name="regimenEvent"
onChange={(uuid) => {
setRegimenEvent(uuid);
setRegimenEvent(uuid as string);
}}
>
<RadioButton
key={'start-regimen'}
labelText={t('startRegimen', 'Start')}
value={Regimen.startOrRestartConcept}
disabled={lastRegimenEncounter.uuid}
disabled={!lastRegimenEncounter.uuid}
/>

<RadioButton
Expand All @@ -272,7 +272,9 @@ const RegimenForm: React.FC<RegimenFormProps> = ({
key={'stop-regimen'}
labelText={t('stopRegimen', 'Stop')}
value={Regimen.stopRegimenConcept}
disabled={lastRegimenEncounter.endDate || (!lastRegimenEncounter.uuid && !lastRegimenEncounter.endDate)}
disabled={
!lastRegimenEncounter.endDate || (!lastRegimenEncounter.uuid && !lastRegimenEncounter.endDate)
}
/>
</RadioButtonGroup>
{regimenEvent ? (
Expand All @@ -281,8 +283,6 @@ const RegimenForm: React.FC<RegimenFormProps> = ({
<DatePicker
dateFormat="d/m/Y"
datePickerType="single"
id="regimenDate"
style={{ paddingBottom: '1rem' }}
maxDate={new Date().toISOString()}
onChange={([date]) => setVisitDate(date)}
value={visitDate}
Expand All @@ -302,7 +302,7 @@ const RegimenForm: React.FC<RegimenFormProps> = ({
className={styles.radioButtonWrapper}
name="regimenType"
onChange={(uuid) => {
setSelectedRegimenType(uuid);
setSelectedRegimenType(uuid as string);
}}
>
<RadioButton key={'standardUuid'} labelText={'Use standard regimen'} value={'standardUuid'} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const RegimenHistory: React.FC<RegimenHistoryProps> = ({ patientUuid, category }
const { regimen, isLoading, error } = useRegimenHistory(patientUuid, RegimenType[category]);

if (isLoading) {
return <StructuredListSkeleton role="progressbar" />;
return <StructuredListSkeleton />;
}

if (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const ViralLoadList: React.FC<ViralLoadProps> = ({ patientUuid }) => {

const pageSizes = [10, 20, 30, 40, 50];
const [currentPageSize, setPageSize] = useState(10);
const [allRows, setAllRows] = useState([]);

const tableHeaders = [
{ id: 0, header: t('hivViralLoadDate', 'Viral Load Date'), key: 'hivViralLoadDate' },
Expand Down Expand Up @@ -56,7 +57,7 @@ const ViralLoadList: React.FC<ViralLoadProps> = ({ patientUuid }) => {
}

return (
<DataTable rows={paginatedData} headers={tableHeaders} useZebraStyles overflowMenuOnHover={true}>
<DataTable rows={allRows} headers={tableHeaders} useZebraStyles overflowMenuOnHover={true}>
{({ rows, headers, getHeaderProps, getTableProps, getRowProps }) => (
<TableContainer className={styles.tableContainer}>
<Table {...getTableProps()} className={styles.activePatientsTable}>
Expand Down Expand Up @@ -92,7 +93,7 @@ const ViralLoadList: React.FC<ViralLoadProps> = ({ patientUuid }) => {
page={currentPage}
pageSize={currentPageSize}
pageSizes={pageSizes}
totalItems={tableRows?.length}
totalItems={paginatedData?.length}
className={styles.pagination}
onChange={({ pageSize, page }) => {
if (pageSize !== currentPageSize) {
Expand Down
6 changes: 3 additions & 3 deletions packages/esm-patient-flags-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@
"url": "https://github.com/METS-Programme/esm-ugandaemr-core/issues"
},
"dependencies": {
"@carbon/react": "^1.64.1",
"@carbon/react": "^1.83.0",
"lodash-es": "^4.17.15"
},
"peerDependencies": {
"@openmrs/esm-framework": "*",
"@openmrs/esm-framework": "7.x",
"react": "^18.1.0",
"react-i18next": "11.x",
"react-router-dom": "6.x"
},
"devDependencies": {
"webpack": "^5.74.0"
"webpack": "^5.99.9"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export interface Link {
export const usePatientFlags = (patientUuid: string) => {
const patientFlagsUrl = `/ws/rest/v1/patientflags/patientflag?patient=${patientUuid}`;
const { data, error, isLoading } = useSWR<{ data: { results: Array<Result> } }, Error>(patientFlagsUrl, openmrsFetch);
const patientFlags = typeof data?.data === 'string' ? [] : data?.data?.results ?? [];
const patientFlags = typeof data?.data === 'string' ? [] : (data?.data?.results ?? []);
return { patientFlags, isLoading, error };
};
6 changes: 3 additions & 3 deletions packages/esm-patient-queues-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"url": "https://github.com/METS-Programme/esm-ugandaemr-core/issues"
},
"dependencies": {
"@carbon/react": "^1.64.1",
"@carbon/react": "^1.83.0",
"@hookform/resolvers": "^4.0.0",
"dayjs": "^1.11.6",
"lodash-es": "^4.17.15",
Expand All @@ -47,13 +47,13 @@
"zod": "^3.24.2"
},
"peerDependencies": {
"@openmrs/esm-framework": "*",
"@openmrs/esm-framework": "7.x",
"react": "18.x",
"react-i18next": "11.x",
"react-router-dom": "6.x"
},
"devDependencies": {
"react-tooltip": "^5.26.3",
"webpack": "^5.83.1"
"webpack": "^5.99.9"
}
}
Loading