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-3773 Support for Patient Program Summary in Patient Chart #1969

Merged
merged 15 commits into from
Jan 17, 2025

Conversation

kajambiya
Copy link
Contributor

@kajambiya kajambiya commented Aug 22, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR introduces summary program summary to patient chart.

Screenshots

Screenshot 2024-09-06 at 10 03 33

Related Issue

Other

@kajambiya kajambiya force-pushed the O3-3773 branch 2 times, most recently from eaf5653 to 6b763ca Compare September 4, 2024 05:28
@kajambiya kajambiya changed the title (feat) O3-3773 Support Summary Tiles in Patient Chart (feat) O3-3773 Support for Patient Program Summary in Patient Chart Sep 4, 2024
@kajambiya kajambiya marked this pull request as ready for review September 4, 2024 06:36
@kajambiya kajambiya requested a review from samuelmale September 4, 2024 06:37
Copy link
Contributor

@hadijahkyampeire hadijahkyampeire left a 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

@CynthiaKamau CynthiaKamau force-pushed the O3-3773 branch 2 times, most recently from d5c1461 to b9b0d00 Compare October 12, 2024 07:25
Copy link
Member

@ibacher ibacher left a 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:

Screenshot

  • 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:

Screenshot2

@brandones
Copy link
Contributor

Ping @ibacher

Copy link
Member

@ibacher ibacher left a 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!

@CynthiaKamau CynthiaKamau force-pushed the O3-3773 branch 2 times, most recently from 8dcedbb to bd4e5dc Compare November 26, 2024 13:32
@gracepotma
Copy link
Contributor

I'm confused, is this ready for rull re-review?

@eudson
Copy link

eudson commented Dec 16, 2024

I'm confused, is this ready for rull re-review?

@gracepotma what does ready for full re-review means?

@eudson
Copy link

eudson commented Jan 8, 2025

I have restructured a few files that cut across this pr and the encounter list PR

@ibacher @gracepotma kindly re-review the PR

Copy link
Member

@ibacher ibacher left a 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!

@CynthiaKamau CynthiaKamau force-pushed the O3-3773 branch 2 times, most recently from 4df2838 to 5312489 Compare January 14, 2025 10:05
@CynthiaKamau CynthiaKamau requested a review from ibacher January 15, 2025 06:52
Copy link
Collaborator

@NethmiRodrigo NethmiRodrigo left a 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';
Copy link
Collaborator

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:

Suggested change
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';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

Comment on lines 1 to 8
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';
Copy link
Collaborator

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:

Suggested change
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';
Suggested change
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 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto on types

Copy link
Member

@ibacher ibacher left a 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!

@CynthiaKamau CynthiaKamau merged commit 55b4ad5 into openmrs:main Jan 17, 2025
6 checks passed
@ibacher
Copy link
Member

ibacher commented Jan 18, 2025

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.

ibacher added a commit that referenced this pull request Jan 18, 2025
…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]>
Muppasanipraneeth pushed a commit to Muppasanipraneeth/openmrs-esm-patient-chart that referenced this pull request Jan 20, 2025
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants