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

[WEB-3352] - TIDE Drawer Navigation Bugs #1500

Open
wants to merge 14 commits into
base: WEB-3397-mobile-views
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'develop' into WEB-3352-tide-nav-bugs
  • Loading branch information
henry-tp committed Jan 17, 2025
commit dccfc782ca497416033f09cd0bfbefba75f57a74
3 changes: 2 additions & 1 deletion app/components/navpatientheader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const HeaderContainer = ({ children }) => (

const NavPatientHeader = ({
patient,
user,
clinicPatient,
user,
permsOfLoggedInUser,
trackMetric,
clinicFlowActive,
Expand Down
12 changes: 11 additions & 1 deletion app/components/navpatientheader/navPatientHeaderHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,14 @@ export const getPatientListLink = (clinicFlowActive, selectedClinicId, initialSe
}

return '/patients';
};
};

export const getDemographicInfo = (patient, clinicPatient) => {
const combinedPatient = personUtils.combinedAccountAndClinicPatient(patient, clinicPatient);

const name = personUtils.patientFullName(combinedPatient);
const birthday = combinedPatient?.profile?.patient?.birthday;
const mrn = clinicPatient?.mrn;

return { name, birthday, mrn };
};
10 changes: 6 additions & 4 deletions test/unit/components/navpatientheader/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ describe('NavPatientHeader', () => {
const props = {
user: { roles: ['clinician'] },
trackMetric: mockTrackMetric,
patient: { ...defaultPatientProps, permissions: { } },
permsOfLoggedInUser: {},
patient: { ...patientProps, permissions: { } },
clinicPatient: { ...clinicPatientProps },
permsOfLoggedInUser: {}
};

const wrapper = mount(
Expand Down Expand Up @@ -158,7 +159,8 @@ describe('NavPatientHeader', () => {
const props = {
user: { roles: ['clinician'] },
trackMetric: mockTrackMetric,
patient: { ...defaultPatientProps, permissions: { root: {} } },
patient: { ...patientProps, permissions: { root: {} } },
clinicPatient: { ...clinicPatientProps },
permsOfLoggedInUser: { upload: {} },
};

Expand Down Expand Up @@ -335,7 +337,7 @@ describe('NavPatientHeader', () => {
describe('viewing patient or profile views and user originates from TIDE Dashboard', () => {
const clinicClinicianProps = {
trackMetric: mockTrackMetric,
patient: { ...defaultPatientProps, permissions: { } },
patient: { ...patientProps, permissions: { } },
clinicFlowActive: true,
user: { isClinicMember: true },
selectedClinicId: 'clinic123',
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.