Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5de7ea3
build(deps): bump actions/cache from 2.1.5 to 2.1.6
dependabot[bot] Jul 7, 2021
9d63abc
fix: fix hospitals payload
Jul 7, 2021
84452d2
feat(patients-directory): api implementation
kostasdano Jul 7, 2021
1d0437a
feat: add correct routes
Jul 7, 2021
350d16e
Merge pull request #47 from swiftss-org/feat/patient-directory-api
whosyourtaco Jul 7, 2021
d67e394
fix: fix token storage
Jul 7, 2021
c7908cb
style: change primary color
Jul 7, 2021
6be7d77
style: add minor changes
Jul 7, 2021
6959ebb
fix: fix app crash when no hospitals are provided
Sep 24, 2021
0fa8b3c
feat: update ictinus and eliminate console warnings
Sep 24, 2021
2fd4f0d
build(deps): bump actions/setup-node from 2.1.5 to 2.4.1
dependabot[bot] Sep 27, 2021
9a1075e
build(deps-dev): bump @commitlint/config-conventional
dependabot[bot] Sep 28, 2021
379b384
build(deps): bump @testing-library/react from 11.2.7 to 12.1.2
dependabot[bot] Oct 4, 2021
de34921
build(deps-dev): bump @commitlint/cli from 11.0.0 to 13.2.1
dependabot[bot] Oct 11, 2021
7229bbe
build(deps): bump actions/checkout from 2.3.4 to 2.3.5
dependabot[bot] Oct 15, 2021
0e65998
feat: redesign login
Oct 13, 2021
9e6201c
Merge pull request #88 from swiftss-org/feat/redesign-login
whosyourtaco Oct 20, 2021
5c19aab
feat: patients directory refactor
kostasdano Oct 20, 2021
1544ae7
refactor: update register patient form for new field
Oct 20, 2021
c48116e
Merge branch 'staging' into feat/patients-directory-refactor
kostasdano Oct 20, 2021
c81ddb3
feat: add custom drawer
Oct 20, 2021
6c151b2
Merge branch 'staging' into feat/patients-directory-refactor
kostasdano Oct 20, 2021
ca0990e
Merge pull request #91 from swiftss-org/feat/drawer-redesign
whosyourtaco Oct 21, 2021
feef8fd
build(deps-dev): bump eslint-config-prettier from 7.2.0 to 8.3.0
dependabot[bot] Oct 21, 2021
39ad321
Merge branch 'staging' into feat/patients-directory-refactor
kostasdano Oct 21, 2021
7ee54bb
Merge pull request #90 from swiftss-org/feat/patients-directory-refactor
kostasdano Oct 21, 2021
9aa7fde
fix: property of undefined
kostasdano Oct 21, 2021
a597e13
Merge pull request #92 from swiftss-org/fix/property-of-undefined
kostasdano Oct 21, 2021
56b2704
feat: add email and avatar to drawer when logged in
Oct 21, 2021
b941dee
feat: add search component in directory
Oct 21, 2021
de80404
Merge pull request #89 from swiftss-org/dependabot/github_actions/act…
whosyourtaco Oct 21, 2021
95bb66d
Merge pull request #87 from swiftss-org/dependabot/npm_and_yarn/commi…
whosyourtaco Oct 21, 2021
71c4007
Merge pull request #86 from swiftss-org/dependabot/npm_and_yarn/testi…
whosyourtaco Oct 21, 2021
6cdc8bd
Merge pull request #82 from swiftss-org/dependabot/github_actions/act…
whosyourtaco Oct 21, 2021
3c2170c
Merge pull request #79 from swiftss-org/dependabot/npm_and_yarn/eslin…
whosyourtaco Oct 21, 2021
69f5de4
Merge pull request #16 from swiftss-org/dependabot/github_actions/act…
whosyourtaco Oct 21, 2021
3d57e5c
Merge branch 'staging' into dependabot/npm_and_yarn/commitlint/config…
whosyourtaco Oct 21, 2021
40c5eb0
Merge pull request #85 from swiftss-org/dependabot/npm_and_yarn/commi…
whosyourtaco Oct 21, 2021
dfd94ed
fix: remove console.log
Oct 21, 2021
2f490bb
Merge branch 'staging' into feat/add-search
Oct 21, 2021
637640d
feat: add confirmation modal component
Oct 21, 2021
d9e122e
feat: redesign patient registration form
kostasdano Oct 21, 2021
914285f
Merge pull request #93 from swiftss-org/feat/add-search
kostasdano Oct 21, 2021
5e33166
Merge pull request #100 from swiftss-org/feat/add-confirmation-modal
kostasdano Oct 21, 2021
0dd4cf1
Merge branch 'staging' into feat/redesign-patient-registration-form
kostasdano Oct 21, 2021
d80a7a5
feat: test deploy
Oct 22, 2021
d0ced1d
feat: add validation to utils
kostasdano Oct 22, 2021
e50a5a0
Merge pull request #101 from swiftss-org/feat/redesign-patient-regist…
kostasdano Oct 22, 2021
8cd2cfa
feat: add logout
Jan 27, 2022
b190016
feat: connect sorting with api
Jan 27, 2022
42266a6
feat: get patient hospital ids from hospital mapping object
Jan 27, 2022
cc0ab14
chore: remove console.log
Jan 27, 2022
9c66f1a
style: add hover style to card
Jan 27, 2022
d646798
feat: add General Information and Patient Details screen
whosyourtaco Feb 22, 2022
c121d50
feat: add RegisterEpisode and connect with api
whosyourtaco Feb 22, 2022
1014827
feat: add createHospitalMapping functionality
whosyourtaco Feb 23, 2022
1717bfb
feat: use surgeon names instead of emails
whosyourtaco Feb 23, 2022
636bda8
feat: add episode list view
whosyourtaco Feb 23, 2022
cefb16a
feat: add episode routing
whosyourtaco Feb 23, 2022
2ed5588
feat: add episode surgery details
whosyourtaco Feb 23, 2022
9d986bd
feat: add discharge
whosyourtaco Feb 23, 2022
e74e18d
feat: add follow up
whosyourtaco Feb 23, 2022
d602f5f
feat: add episode type
whosyourtaco Feb 23, 2022
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
4 changes: 2 additions & 2 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module.exports = {
plugins: [
'@babel/plugin-proposal-optional-chaining',
[
'emotion',
'@emotion',
{
sourceMap: false,
autoLabel: process.env.NODE_ENV !== 'production',
autoLabel: process.env.NODE_ENV !== 'production' ? 'always' : undefined,
labelFormat: '[filename]_[local]',
cssPropOptimization: true,
},
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:

steps:
- name: Checkout 📥
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.3.5

- name: Get yarn cache 📦
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2.1.5
- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/setup-node@v2.1.5
- uses: actions/setup-node@v2.1.5
- uses: actions/setup-node@v2.4.1
- uses: actions/setup-node@v2.4.1
with:
node-version: '12'

Expand All @@ -50,7 +50,7 @@ jobs:
- test
steps:
- name: Checkout Repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2.3.5

- name: Push to Staging 🛠
if: github.ref == 'refs/heads/staging'
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/core": "10.1.1",
"@emotion/jest": "^11.2.1",
"@emotion/react": "^11.1.5",
"@emotion/styled": "^10.0.27",
"@orfium/ictinus": "^2.70.2",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@orfium/ictinus": "^3.14.1",
"@testing-library/jest-dom": "^5.11.9",
"@testing-library/react": "^11.2.5",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.1.3",
"@types/jest": "^26.0.23",
"@types/node": "^14.14.28",
Expand All @@ -24,12 +23,13 @@
"axios": "^0.21.1",
"customize-cra": "^1.0.0",
"final-form": "^4.20.2",
"history": "^5.0.0",
"jest-emotion": "^11.0.0",
"final-form-arrays": "^3.0.2",
"history": "^4.10.1",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-final-form": "^6.5.3",
"react-final-form-arrays": "^3.1.3",
"react-final-form-listeners": "^1.0.3",
"react-query": "^3.16.0",
"react-router-dom": "^5.2.0",
Expand Down Expand Up @@ -62,8 +62,8 @@
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/preset-react": "^7.12.10",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/cli": "^13.2.1",
"@commitlint/config-conventional": "^13.2.0",
"@emotion/babel-plugin": "^11.3.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
Expand All @@ -73,7 +73,7 @@
"babel-jest": "^26.6.3",
"babel-plugin-styled-components": "^1.12.0",
"cross-env": "^7.0.3",
"eslint-config-prettier": "^7.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-better-styled-components": "^1.1.2",
"eslint-plugin-import": "^2.23.4",
"husky": "^6.0.0",
Expand Down
1 change: 1 addition & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="portal-root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
8 changes: 4 additions & 4 deletions src/App.style.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import styled from '@emotion/styled';

import theme from 'theme/globals';
import { appTheme } from './theme/globals';

export const AppWrapper = styled.div`
background-color: ${theme.defaultBackgroundColor};
color: ${theme.defaultTextColor};
font-family: ${theme.fontFamily};
background-color: white;
color: black;
font-family: ${appTheme.fontFamily};
height: calc(100vh);
overflow: hidden;
position: relative;
Expand Down
23 changes: 13 additions & 10 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@ import { QueryClient, QueryClientProvider } from 'react-query';
import { BrowserRouter as Router } from 'react-router-dom';

import { AppWrapper } from './App.style';
import NotificationsProvider from './providers/Notifications/NotificationProvider';
import Routes from './routing/Routes';
import theme from 'theme/globals';
import { themeOverride } from './theme/globals';

const queryClient = new QueryClient({
defaultOptions: { queries: { refetchOnWindowFocus: false, refetchOnReconnect: false } },
});

const App: React.FC = () => {
return (
<ThemeProvider theme={{ palette: { branded1: theme.colors.branded1 } }}>
<QueryClientProvider client={queryClient}>
<Router>
<AppWrapper>
<Routes />
</AppWrapper>
</Router>
</QueryClientProvider>
</ThemeProvider>
<QueryClientProvider client={queryClient}>
<ThemeProvider theme={themeOverride}>
<NotificationsProvider>
<Router>
<AppWrapper>
<Routes />
</AppWrapper>
</Router>
</NotificationsProvider>
</ThemeProvider>
</QueryClientProvider>
);
};

Expand Down
26 changes: 24 additions & 2 deletions src/api/patientsAPI/patientsAPI.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { RegisterPatientPayload } from '../../models/apiTypes';
import {
RegisterPatientPayload,
PatientsPayload,
PaginationParams,
RegisterEpisodePayload,
HospitalMappingPayload,
DischargePayload,
FollowUpPayload,
} from '../../models/apiTypes';
import { METHODS, request } from '../axiosInstances';

export default {
getHospitals: () => request(METHODS.GET, '/hospitals/', {}),
getHospitals: (params?: PaginationParams) => request(METHODS.GET, '/hospitals/', { params }),
getHospital: (id: string) => request(METHODS.GET, `/hospitals/${id}/`, {}),
getPatients: (params?: PatientsPayload) => request(METHODS.GET, '/patients/', { params }),
getSurgeons: (params?: PaginationParams) =>
request(METHODS.GET, '/medical-personnel/', { params }),
getPatient: (id: string) => request(METHODS.GET, `/patients/${id}/`, {}),
getEpisode: (id: string) => request(METHODS.GET, `/episodes/${id}/`, {}),
getEpisodeDischarge: (id: string) => request(METHODS.GET, `/episodes/${id}/discharge/`, {}),
getEpisodeFollowUps: (id: string) => request(METHODS.GET, `/episodes/${id}/follow-ups/`, {}),
registerPatient: (params: RegisterPatientPayload) =>
request(METHODS.POST, '/patients/', { params }),
registerEpisode: (params: RegisterEpisodePayload) =>
request(METHODS.POST, '/episodes/', { params }),
createHospitalMapping: (params: HospitalMappingPayload) =>
request(METHODS.POST, '/patient-hospital-mappings/', { params }),
dischargePatient: (params: DischargePayload) => request(METHODS.POST, `/discharges/`, { params }),
followUpPatient: (params: FollowUpPayload) => request(METHODS.POST, `/follow-ups/`, { params }),
};
4 changes: 2 additions & 2 deletions src/api/userAPI/userAPI.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { LoginResponse } from '../../models/apiTypes';
import { LoginFormType } from '../../models/apiTypes';
import { METHODS, request } from '../axiosInstances';

export default {
signIn: (params: LoginResponse) => request(METHODS.POST, '/sign-in/', { params }),
signIn: (params: LoginFormType) => request(METHODS.POST, '/sign-in/', { params }),
};
4 changes: 4 additions & 0 deletions src/assets/PatientDirectory/sortIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/assets/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import SwiftSSLogo from 'assets/swiftss-logo.png';
import TSALogo from 'assets/tsa-logo.png';

export default {
TSALogo,
SwiftSSLogo,
};
Binary file added src/assets/swiftss-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/tsa-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 38 additions & 28 deletions src/common.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,19 @@ export const PageWrapper = styled.div`
`;

export const CheckBoxContainer = styled.div<{ error?: boolean; checked?: boolean }>`
&& * {
color: black;
}

//checked checkbox color
label:after {
box-shadow: 2px 0 0 black, 4px 0 0 black, 4px -2px 0 black, 4px -4px 0 black, 4px -6px 0 black,
4px -8px 0 black, 4px -10px 0 black !important;
background-color: black !important;
}

label:before {
box-shadow: inset 0px 0px 0px 0.125rem
${(props) =>
props.checked
? props.theme.utils.getColor('lightGray', 400)
: props.theme.utils.getColor('lightGray', 400)} !important;
background-color: ${(props) =>
props.checked ? props.theme.utils.getColor('lightGray', 400) : 'inherit'} !important;
}

span {
color: white;
white-space: pre-line;
}
margin-left: -12px;

svg path {
fill: black;
fill: white;
}
`;

export const FieldsContainer = styled.div<{ withMargin?: boolean }>`
${grid};
column-gap: 38px;
column-gap: 8px;
grid-template-columns: 1fr 1fr;
margin-bottom: ${(props) => (props.withMargin ? '24px' : null)};
row-gap: 24px;
row-gap: 8px;
`;

export const LongFieldWrapper = styled.div`
Expand Down Expand Up @@ -90,3 +66,37 @@ export const scrollBar = css`
background: #555;
}
`;

export const PageTitle = styled.div`
color: ${(props) => props.theme.utils.getColor('darkGray', 400)};
display: flex;
font-size: 24px;
font-weight: 700;
gap: 16px;
padding: 16px;
`;

export const PageSubtitle = styled.div`
color: ${(props) => props.theme.utils.getColor('darkGray', 400)};
display: flex;
font-size: 18px;
font-weight: 400;
gap: 16px;
padding: 16px;
`;

export const SectionTitle = styled.div`
color: ${(props) => props.theme.utils.getColor('blue', 500)};
font-size: 18px;
font-weight: 500;
`;

export const ButtonContainer = styled.div`
background: ${(props) => props.theme.utils.getColor('lightCoolGray', 400)};
border-top: 1px solid ${(props) => props.theme.utils.getColor('lightGray', 200)};
bottom: 0;
box-sizing: border-box;
padding: 16px;
position: fixed;
width: 100%;
`;
22 changes: 22 additions & 0 deletions src/components/ConfirmationModal/ConfirmationModal.style.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import styled from '@emotion/styled';
import { rem } from 'polished';

export const IBWRapper = styled.div`
pointer-events: none;
> button > span > svg > path {
fill: white;
}
`;

export const Title = styled.div`
font-size: ${(props) => props.theme.typography.fontSizes[18]};
font-weight: ${(props) => props.theme.typography.weights.medium};
line-height: ${rem(21)};
`;

export const Subtitle = styled.div`
color: ${(props) => props.theme.utils.getColor('lightGray', 600)};
font-size: ${(props) => props.theme.typography.fontSizes[16]};
font-weight: ${(props) => props.theme.typography.weights.regular};
line-height: ${rem(19)};
`;
38 changes: 38 additions & 0 deletions src/components/ConfirmationModal/ConfirmationModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';

import { Button, IconButton } from '@orfium/ictinus';

import Modal from '../Modal';
import { Portal } from '../Portal';
import { IBWRapper, Subtitle, Title } from './ConfirmationModal.style';

interface Props {
onClose: () => void;
title: string;
subtitle?: string;
onClick: () => void;
buttonText: string;
}

const ConfirmationModal: React.FC<Props> = ({ onClose, title, subtitle, buttonText, onClick }) => {
return (
<Portal baseComponent={Modal} onClose={onClose}>
<IBWRapper>
<IconButton
name={'warning'}
iconSize={36}
type={'warning'}
color={'orange-400'}
size={48}
/>
</IBWRapper>
<Title>{title}</Title>
<Subtitle>{subtitle}</Subtitle>
<Button onClick={onClick} buttonType={'button'} type={'primary'} filled={false}>
{buttonText}
</Button>
</Portal>
);
};

export default ConfirmationModal;
1 change: 1 addition & 0 deletions src/components/ConfirmationModal/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './ConfirmationModal';
22 changes: 22 additions & 0 deletions src/components/Drawer/Drawer.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import styled from '@emotion/styled';
import { transition } from '@orfium/ictinus/dist/theme/functions';
import { rem } from 'polished';

export const Container = styled.div<{
expanded: boolean;
isDesktop: boolean;
isSmallDesktop: boolean;
}>`
${transition(0.2)};
background-color: white;
border-right: ${rem(1)} solid ${(props) => props.theme.utils.getColor('lightGray', 200)};
flex-grow: 0;
flex-shrink: 0;
height: 100%;
min-height: 100%;
overflow: hidden;
position: ${(props) => (props.isSmallDesktop ? 'absolute' : 'relative')};
width: ${(props) =>
props.expanded ? rem('308px') : props.isDesktop ? rem('112px') : rem('0px')};
z-index: 100;
`;
Loading