-
Notifications
You must be signed in to change notification settings - Fork 251
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-3773 Support for Patient Program Summary in Patient Chart #1969
Conversation
eaf5653
to
6b763ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, thanks @kajambiya , just a few comments
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/utils/helpers.ts
Outdated
Show resolved
Hide resolved
cb49d63
to
cab9b91
Compare
...ges/esm-patient-chart-app/src/clinical-views/components/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
...ges/esm-patient-chart-app/src/clinical-views/components/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
...ges/esm-patient-chart-app/src/clinical-views/components/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
...ges/esm-patient-chart-app/src/clinical-views/components/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/components/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/components/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/hooks/useLastEncounter.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/encounter-tile/components/tile.scss
Outdated
Show resolved
Hide resolved
d5c1461
to
b9b0d00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This widget is getting much closer. A few more nit-picking comments on the code.
Now looking at the visual of this widget, we should bring it in line with the existing RefApp chart tiles specifically:
- The h4 header font rendering is inconsistent with other tiles in the chart. Both the font-size (20px vs 16px) is off and the font-weight (400 vs 600).
- The header ::after element is not correctly sized (border-bottom-width is 2px too large and padding-top is off by 1px — 2px in this component vs 3px in others)
Oddly, when located in the top-of-all-patient-dashboards-slot, as shown above the box appears too wide, but when located in the same slot as the other elements, the width is too small:
...ges/esm-patient-chart-app/src/clinical-views/components/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/encounter-tile-config-builder.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/encounter-tile-config-builder.ts
Outdated
Show resolved
Hide resolved
...ges/esm-patient-chart-app/src/clinical-views/components/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
Ping @ibacher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I've covered everything, but here are some things that need to be cleaned-up before this is mergeable. Goal here is to make sure that the code is in a format that the community can support over the long term. Thanks!
...-patient-chart-app/src/clinical-views/components/encounter-tile/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
...-patient-chart-app/src/clinical-views/components/encounter-tile/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
...-patient-chart-app/src/clinical-views/components/encounter-tile/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
...-patient-chart-app/src/clinical-views/components/encounter-tile/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
...-patient-chart-app/src/clinical-views/components/encounter-tile/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
8dcedbb
to
bd4e5dc
Compare
I'm confused, is this ready for rull re-review? |
@gracepotma what does ready for full re-review means? |
12d5ba0
to
797618b
Compare
@ibacher @gracepotma kindly re-review the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @CynthiaKamau! A few more nitpicky things that need to addressed before this is mergeable. Thanks!
packages/esm-patient-chart-app/src/clinical-views/encounter-list/encounter-list.component.tsx
Outdated
Show resolved
Hide resolved
...esm-patient-chart-app/src/clinical-views/encounter-tile/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
...esm-patient-chart-app/src/clinical-views/encounter-tile/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
...esm-patient-chart-app/src/clinical-views/encounter-tile/clinical-views-summary.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/encounter-tile/encounter-tile.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/index.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/hooks/useLastEncounter.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/hooks/useLastEncounter.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/hooks/useLastEncounter.ts
Outdated
Show resolved
Hide resolved
4df2838
to
5312489
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @CynthiaKamau! Haven't gone through it in its entirety but left some minor nit picks and suggestions:
import { useEncounterRows, useFormsJson } from '../hooks'; | ||
|
||
import styles from './encounter-list.scss'; | ||
import { type TableRow, type Encounter, type Mode, type ColumnValue } from '../types'; | ||
import { type FormattedColumn } from '../utils/encounter-list-config-builder'; | ||
import { type TableRow, type Encounter, type Mode, type ColumnValue, type FormattedColumn } from '../types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick, but we could do:
import { type TableRow, type Encounter, type Mode, type ColumnValue, type FormattedColumn } from '../types'; | |
import type { TableRow, Encounter, Mode, ColumnValue, FormattedColumn } from '../types'; |
import styles from './tile.scss'; | ||
import { groupColumnsByEncounterType } from '../utils/helpers'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { type EncounterTileColumn, type EncounterTileProps } from '../types'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
import React, { memo, useMemo } from 'react'; | ||
import { useLayoutType } from '@openmrs/esm-framework'; | ||
import { CodeSnippetSkeleton, Tile, Column, Layer } from '@carbon/react'; | ||
import styles from './tile.scss'; | ||
import { groupColumnsByEncounterType } from '../utils/helpers'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { type EncounterTileColumn, type EncounterTileProps } from '../types'; | ||
import { useLastEncounter } from '../hooks'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor correction for the imports reorder:
import React, { memo, useMemo } from 'react'; | |
import { useLayoutType } from '@openmrs/esm-framework'; | |
import { CodeSnippetSkeleton, Tile, Column, Layer } from '@carbon/react'; | |
import styles from './tile.scss'; | |
import { groupColumnsByEncounterType } from '../utils/helpers'; | |
import { useTranslation } from 'react-i18next'; | |
import { type EncounterTileColumn, type EncounterTileProps } from '../types'; | |
import { useLastEncounter } from '../hooks'; | |
import React, { memo, useMemo } from 'react'; | |
import { useLayoutType } from '@openmrs/esm-framework'; | |
import { useTranslation } from 'react-i18next'; | |
import { CodeSnippetSkeleton, Tile, Column, Layer } from '@carbon/react'; | |
import { groupColumnsByEncounterType } from '../utils/helpers'; | |
import { useLastEncounter } from '../hooks'; | |
import type { EncounterTileColumn, EncounterTileProps } from '../types'; | |
import styles from './tile.scss'; |
import React, { memo, useMemo } from 'react'; | |
import { useLayoutType } from '@openmrs/esm-framework'; | |
import { CodeSnippetSkeleton, Tile, Column, Layer } from '@carbon/react'; | |
import styles from './tile.scss'; | |
import { groupColumnsByEncounterType } from '../utils/helpers'; | |
import { useTranslation } from 'react-i18next'; | |
import { type EncounterTileColumn, type EncounterTileProps } from '../types'; | |
import { useLastEncounter } from '../hooks'; | |
import React, { memo, useMemo } from 'react'; | |
import { useLayoutType } from '@openmrs/esm-framework'; | |
import { CodeSnippetSkeleton, Tile, Column, Layer } from '@carbon/react'; | |
import styles from './tile.scss'; | |
import { groupColumnsByEncounterType } from '../utils/helpers'; | |
import { useTranslation } from 'react-i18next'; | |
import { type EncounterTileColumn, type EncounterTileProps } from '../types'; | |
import { useLastEncounter } from '../hooks'; |
import { formatDate, parseDate, formatDatetime, type Concept, age, type Visit } from '@openmrs/esm-framework'; | ||
import { type Observation, type Encounter, type Form, type ConfigConcepts } from '../types'; | ||
import { age, formatDate, parseDate, type Visit } from '@openmrs/esm-framework'; | ||
import { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto on types
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/index.ts
Outdated
Show resolved
Hide resolved
packages/esm-patient-chart-app/src/clinical-views/utils/helpers.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work on this!
Hi @CynthiaKamau! I intentionally left this unmerged because we're in a release cycle right now. I'm going to need to back this out and we're going to need to revive this PR. |
…1969) * Introduce summary card * add logic * clean up * code review * code review * Introduce summary card * add logic * clean up * code review * code review * Restructure directories and fix conflicts * code review * code review * code review * Update encounter-list.component.tsx --------- Co-authored-by: CynthiaKamau <[email protected]> Co-authored-by: Ian <[email protected]>
…penmrs#1969) * Introduce summary card * add logic * clean up * code review * code review * Introduce summary card * add logic * clean up * code review * code review * Restructure directories and fix conflicts * code review * code review * code review * Update encounter-list.component.tsx --------- Co-authored-by: CynthiaKamau <[email protected]> Co-authored-by: Ian <[email protected]>
Requirements
Summary
This PR introduces summary program summary to patient chart.
Screenshots
Related Issue
Other