Skip to content
Open
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cc04acc
[WEB-3071] initial work on smart-on-fhir launch endpoint
krystophv Mar 5, 2025
867ef6b
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Mar 5, 2025
63206c6
[WEB-3071] update unit tests
krystophv Mar 6, 2025
261a2a0
[WEB-3071] lintfix
krystophv Mar 6, 2025
d0103b8
Merge remote-tracking branch 'origin/develop' into WEB-3071-smart-on-…
krystophv Apr 11, 2025
7f8724c
[WEB-3071] add patient fetch and redirection
krystophv Apr 15, 2025
d324312
try disabling vulkan
krystophv Apr 15, 2025
839d14e
try old headless
krystophv Apr 15, 2025
3a0cedf
restore travis.yml
krystophv Apr 16, 2025
40d015b
Update CI to run in docker instead of in Travis CI container
clintonium-119 Apr 16, 2025
0879486
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Apr 29, 2025
5fb5ba2
[WEB-3071] avoiding sessionStorage collisions
krystophv May 6, 2025
150041d
[WEB-3071] allow epic frame ancestors
krystophv May 6, 2025
082d3a5
[WEB-3071] preserve route state on login redirect
krystophv May 6, 2025
21da3c7
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv May 12, 2025
425342d
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Jun 8, 2025
79c850a
[WEB-3593] selectively hide UI elements when in smart-on-fhir
krystophv Jun 11, 2025
b30ea8f
Merge remote-tracking branch 'origin/develop' into WEB-3071-smart-on-…
krystophv Jun 11, 2025
0919e8c
[WEB-3593] hide profile editing and upload buttons
krystophv Jun 11, 2025
f39f1dc
[WEB-3593] hide more elements
krystophv Jun 17, 2025
46efd8a
Merge remote-tracking branch 'origin/develop' into WEB-3071-smart-on-…
krystophv Jun 20, 2025
71d0b74
[WEB-3593] prop drilling for hiding print button
krystophv Jun 23, 2025
e9f6fd1
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Jul 7, 2025
2ed4a23
bump platform-client
krystophv Jul 7, 2025
a13a432
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Jul 16, 2025
e21e647
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Jul 16, 2025
25beeaf
[WEB-3017] prevent uploader card from showing in SoF mode
krystophv Jul 16, 2025
5c448fc
v1.87.0-web-3071-smart-on-fhir.1
krystophv Jul 17, 2025
25e5d11
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Sep 3, 2025
58799d6
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Sep 3, 2025
abed6b5
WEB-3964 Add SMART on FHIR analytics tracking support
krystophv Sep 4, 2025
5b76100
WEB-3594 Adds clinic validation and error handling to Smart-on-FHIR flow
krystophv Sep 4, 2025
e8b4079
Updates import paths to use @app alias consistently
krystophv Sep 4, 2025
a75d74d
Merge branch 'develop' into WEB-3071-smart-on-fhir-launch
krystophv Sep 8, 2025
44a9540
WEB-3071 bump platform-client
krystophv Sep 8, 2025
54acddc
WEB-3071 various cleanup and automated code review suggestions
krystophv Sep 9, 2025
aac9bd3
WEB-3071 Refactor WorkspaceSwitcher to use useSelector for isSmartOnF…
krystophv Sep 11, 2025
2066f68
WEB-3071 Update SmartOnFhir page to use react-i18next and improve err…
krystophv Sep 11, 2025
dd558e9
WEB-3071 Remove unnecessary unmount calls from MobileNavbar tests
krystophv Sep 11, 2025
9b80f91
WEB-3071 Remove unused test case for fetchPatients action
krystophv Sep 11, 2025
ac68090
WEB-3071 Updates Smart-on-FHIR mode detection to use selector
krystophv Sep 11, 2025
0a563c2
Merge remote-tracking branch 'origin/develop' into WEB-3071-smart-on-…
krystophv Sep 12, 2025
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
2 changes: 2 additions & 0 deletions app/components/chart/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Basics extends Component {
updateChartPrefs: PropTypes.func.isRequired,
uploadUrl: PropTypes.string.isRequired,
removeGeneratedPDFS: PropTypes.func.isRequired,
isSmartOnFhirMode: PropTypes.bool.isRequired,

Choose a reason for hiding this comment

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

PropTypes Consistency Issue

Inconsistent PropTypes declarations across chart components. Some mark isSmartOnFhirMode as isRequired while others don't for the same prop. Consider standardizing this - if the prop is always passed down, it should consistently be marked as isRequired.

Also appears in: app/components/chart/daily.js, app/components/chart/trends.js, etc.

};

static displayName = 'Basics';
Expand Down Expand Up @@ -91,6 +92,7 @@ class Basics extends Component {
onClickSettings={this.props.onSwitchToSettings}
onClickBgLog={this.handleClickBgLog}
onClickPrint={this.handleClickPrint}
isSmartOnFhirMode={this.props.isSmartOnFhirMode}
ref="header"
/>

Expand Down
7 changes: 5 additions & 2 deletions app/components/chart/bgLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ class BgLog extends Component {
trackMetric: PropTypes.func.isRequired,
uploadUrl: PropTypes.string.isRequired,
removeGeneratedPDFS: PropTypes.func.isRequired,
isSmartOnFhirMode: PropTypes.bool,
};

constructor(props) {
Expand Down Expand Up @@ -379,7 +380,8 @@ class BgLog extends Component {
onClickSettings={this.props.onSwitchToSettings}
onClickBgLog={this.handleClickBgLog}
onClickPrint={this.handleClickPrint}
ref="header" />
isSmartOnFhirMode={this.props.isSmartOnFhirMode}
ref="header" />
);
};

Expand All @@ -396,7 +398,8 @@ class BgLog extends Component {
onClickSettings={this.props.onSwitchToSettings}
onClickBgLog={this.handleClickBgLog}
onClickPrint={this.handleClickPrint}
ref="header" />
isSmartOnFhirMode={this.props.isSmartOnFhirMode}
ref="header" />
);
};

Expand Down
2 changes: 2 additions & 0 deletions app/components/chart/daily.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class Daily extends Component {
updateChartPrefs: PropTypes.func.isRequired,
trackMetric: PropTypes.func.isRequired,
removeGeneratedPDFS: PropTypes.func.isRequired,
isSmartOnFhirMode: PropTypes.bool.isRequired,
};

constructor(props) {
Expand Down Expand Up @@ -317,6 +318,7 @@ class Daily extends Component {
onClickSettings={this.props.onSwitchToSettings}
onClickBgLog={this.handleClickBgLog}
onClickPrint={this.handleClickPrint}
isSmartOnFhirMode={this.props.isSmartOnFhirMode}
ref={this.headerRef}
/>

Expand Down
3 changes: 3 additions & 0 deletions app/components/chart/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Header = withTranslation()(class Header extends Component {
onClickBgLog: PropTypes.func,
onClickSettings: PropTypes.func,
onClickPrint: PropTypes.func,
isSmartOnFhirMode: PropTypes.bool.isRequired,
};

static defaultProps = {
Expand Down Expand Up @@ -180,6 +181,7 @@ const Header = withTranslation()(class Header extends Component {
{this.renderNavButton(mostRecentClass, this.props.onClickMostRecent, this.props.iconMostRecent)}
</div>
<div className="app-no-print patient-data-subnav-right">
{!this.props.isSmartOnFhirMode && (
<a href="" className={printLinkClass} onClick={this.props.onClickPrint}>
<Icon
className="icon"
Expand All @@ -195,6 +197,7 @@ const Header = withTranslation()(class Header extends Component {
/>
{t('Print')}
</a>
)}
</div>
</Box>
);
Expand Down
5 changes: 4 additions & 1 deletion app/components/chart/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ const Settings = ({
uploadUrl,
pdf,
currentPatientInViewId,
t
t,
isSmartOnFhirMode
}) => {
const { location } = useHistory();
const isJustConnected = !!location?.query?.dataConnectionStatus;
Expand Down Expand Up @@ -739,6 +740,7 @@ const Settings = ({
onClickSettings={handleClickSettings}
onClickBgLog={handleClickBgLog}
onClickPrint={handleClickPrint}
isSmartOnFhirMode={isSmartOnFhirMode}
/>

<Box variant="containers.patientDataInner">
Expand Down Expand Up @@ -808,6 +810,7 @@ Settings.propTypes = {
pdf: PropTypes.object,
currentPatientInViewId: PropTypes.string.isRequired,
t: PropTypes.func.isRequired,
isSmartOnFhirMode: PropTypes.bool.isRequired,
};

export default withTranslation()(Settings);
2 changes: 2 additions & 0 deletions app/components/chart/trends.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const Trends = withTranslation()(class Trends extends PureComponent {
updateChartPrefs: PropTypes.func.isRequired,
uploadUrl: PropTypes.string.isRequired,
removeGeneratedPDFS: PropTypes.func.isRequired,
isSmartOnFhirMode: PropTypes.bool.isRequired,
};

constructor(props) {
Expand Down Expand Up @@ -635,6 +636,7 @@ const Trends = withTranslation()(class Trends extends PureComponent {
onClickBgLog={this.handleClickBgLog}
onClickSettings={this.handleClickSettings}
onClickPrint={this.handleClickPrint}
isSmartOnFhirMode={this.props.isSmartOnFhirMode}
ref="header" />
);
}
Expand Down
139 changes: 73 additions & 66 deletions app/components/clinic/WorkspaceSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import Popover from '../elements/Popover';
import { colors } from '../../themes/baseTheme';

export const WorkspaceSwitcher = props => {
const { t, api, trackMetric } = props;
const { t, api, trackMetric, isSmartOnFhirMode } = props;
Copy link
Member

Choose a reason for hiding this comment

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

You're passing isSmartOnFhirMode in as a prop here, whereas all other functional components seem to be using the custom selector. Should this be changed to use the selector for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think this one was earlier on and I was having issues determining which components to go with the selector vs. prop drilling (and issues around just how many unit tests I'd have to update to have a provider if I added the selector). But, as you point out - this one's already functional. Updated. 👍🏼

const dispatch = useDispatch();
const loggedInUserId = useSelector((state) => state.blip.loggedInUserId);
const allUsersMap = useSelector((state) => state.blip.allUsersMap);
Expand Down Expand Up @@ -88,81 +88,88 @@ export const WorkspaceSwitcher = props => {

return menuOptions.length ? (
<Flex id='workspace-switcher' sx={{ justifyContent: ['center', 'flex-start', 'center'] }}>
{menuOptions.length > 1 && (
{isSmartOnFhirMode ? (
<Text fontSize={2} color="text.primary">{selectedClinic?.label}</Text>
) : (
<>
<Button
id="workspace-switcher-current"
variant="textPrimary"
color="text.primary"
{...bindTrigger(popupState)}
icon={KeyboardArrowDownRoundedIcon}
iconLabel={t('Open navigation menu')}
sx={{
fontSize: 2,
'&:hover': {
color: colors.purpleDark,
},
}}
>
{selectedClinic?.label}
</Button>

<Popover
minWidth="15em"
anchorOrigin={{
vertical: 'bottom',
horizontal: 'center',
}}
transformOrigin={{
vertical: 'top',
horizontal: 'center',
}}
{...bindPopover(popupState)}
>
<Box py={2}>
{map(menuOptions, (option, key) => (
<Button
className="workspace-option"
variant="textPrimary"
color="text.primary"
pt={2}
pb={3}
px={3}
key={key}
icon={option.id === selectedClinic?.id ? CheckRoundedIcon : null}
iconLabel={t('Selected')}
onClick={() => handleSelect(option)}
sx={{
width: '100%',
fontSize: 2,
justifyContent: 'space-between',
'&:hover': {
color: colors.purpleDark,
},
'&:last-child': {
pb: 2,
},
textAlign: 'left',
}}
>
{option.label}
</Button>
))}
</Box>
</Popover>
{menuOptions.length > 1 && (
<>
<Button
id="workspace-switcher-current"
variant="textPrimary"
color="text.primary"
{...bindTrigger(popupState)}
icon={KeyboardArrowDownRoundedIcon}
iconLabel={t('Open navigation menu')}
sx={{
fontSize: 2,
'&:hover': {
color: colors.purpleDark,
},
}}
>
{selectedClinic?.label}
</Button>

<Popover
minWidth="15em"
anchorOrigin={{
vertical: 'bottom',
horizontal: 'center',
}}
transformOrigin={{
vertical: 'top',
horizontal: 'center',
}}
{...bindPopover(popupState)}
>
<Box py={2}>
{map(menuOptions, (option, key) => (
<Button
className="workspace-option"
variant="textPrimary"
color="text.primary"
pt={2}
pb={3}
px={3}
key={key}
icon={option.id === selectedClinic?.id ? CheckRoundedIcon : null}
iconLabel={t('Selected')}
onClick={() => handleSelect(option)}
sx={{
width: '100%',
fontSize: 2,
justifyContent: 'space-between',
'&:hover': {
color: colors.purpleDark,
},
'&:last-child': {
pb: 2,
},
textAlign: 'left',
}}
>
{option.label}
</Button>
))}
</Box>
</Popover>
</>
)}

{menuOptions.length === 1 && (
<Text fontSize={2} color="text.primary">{selectedClinic?.label}</Text>
)}
</>
)}

{menuOptions.length === 1 && (
<Text fontSize={2} color="text.primary">{selectedClinic?.label}</Text>
)}
</Flex>
) : null;
};

WorkspaceSwitcher.propTypes = {
api: PropTypes.object.isRequired,
trackMetric: PropTypes.func.isRequired,
isSmartOnFhirMode: PropTypes.bool,
};

export default withTranslation()(WorkspaceSwitcher);
Loading