Skip to content

Commit

Permalink
Merge pull request #282 from masslight/develop
Browse files Browse the repository at this point in the history
Release Dnipro v0.4
  • Loading branch information
GiladSchneider authored Jul 22, 2024
2 parents 13cafbd + 8588aab commit 6a06944
Show file tree
Hide file tree
Showing 69 changed files with 14,205 additions and 9,985 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/build-and-deploy-telemed-intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,39 +121,6 @@ jobs:
BRANCH: ${{ github.ref }}
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }}
with:
<<<<<<< HEAD
<<<<<<< HEAD
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy to AWS S3
run: |
aws s3 sync ./packages/telemed-intake/app/build s3://telemed.ottehr.com --delete
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
- name: Deploy to AWS Lambda
run: |
aws lambda update-function-code --function-name ottehr-telemed-intake-dev --zip-file fileb://function.zip
>>>>>>> 722ec45 (fix build errors and create deploy file)
=======
>>>>>>> 358b140 (remove vercel from deploy yml)
- name: Notify Slack
if: always()
uses: edge/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
BRANCH: ${{ github.ref }}
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }}
with:
=======
>>>>>>> dbbf36e (complete build for telemed intake)
=======
>>>>>>> 9dc5508 (refactor deploy scripts)
channel: '#ottehr-notifications'
status: ${{ job.status }}
success_text: '${{ env.GITHUB_WORKFLOW }} (Run #${{ env.GITHUB_RUN_NUMBER }}) deploy completed successfully'
Expand All @@ -165,30 +132,3 @@ jobs:
{ "title": "Branch", "value": "${{ env.BRANCH }}", "short": true },
{ "title": "Environment", "value": "${{ env.ENVIRONMENT }}", "short": true },
{ "title": "Version", "value": "${{ env.PACKAGE_VERSION }}", "short": true }]
<<<<<<< HEAD
<<<<<<< HEAD
=======
# - name: Notify Slack
# if: always()
# uses: edge/[email protected]
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# BRANCH: ${{ github.ref }}
# PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }}
# with:
# channel: '#ottehr-notifications'
# status: ${{ job.status }}
# success_text: '${{ env.GITHUB_WORKFLOW }} (Run #${{ env.GITHUB_RUN_NUMBER }}) deploy completed successfully'
# failure_text: '${{ env.GITHUB_WORKFLOW }} (Run #${{ env.GITHUB_RUN_NUMBER }}) deploy failed'
# cancelled_text: '${{ env.GITHUB_WORKFLOW }} (Run #${{ env.GITHUB_RUN_NUMBER }}) deploy was cancelled'
# fields: |
# [{ "title": "Service", "value": "${{ env.SLACK_NOTIFICATION_SERVICE_NAME }}", "short": true },
# { "title": "Action URL", "value": "${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}"},
# { "title": "Branch", "value": "${{ env.BRANCH }}", "short": true },
# { "title": "Environment", "value": "${{ env.ENVIRONMENT }}", "short": true },
# { "title": "Version", "value": "${{ env.PACKAGE_VERSION }}", "short": true }]
>>>>>>> bf2b1b4 (checkout the env variables from secrets repo)
=======
>>>>>>> dbbf36e (complete build for telemed intake)
=======
>>>>>>> 9dc5508 (refactor deploy scripts)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,6 @@ Lints all packages using [ESLint](https://eslint.org/).
### `update`
Interactively updates all dependencies to their latest versions, respecting ranges specified in `package.json`.
## Contribute to Ottehr!
We love it when you contribute to Ottehr! By submitting to this project, you agree to adopt the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) for your contributions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ottehr",
"version": "0.3",
"version": "0.4",
"private": true,
"scripts": {
"test": "pnpm recursive run test",
Expand Down
2 changes: 1 addition & 1 deletion packages/ehr-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ehr-utils",
"private": true,
"version": "0.3",
"version": "0.4",
"main": "lib/main.ts",
"types": "lib/main.ts",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ export const CustomContainer: FC<ContainerProps> = ({
}}
>
{isAuthenticated && (
<Button variant="text" onClick={handleLogout} sx={{ '&:hover': { backgroundColor: 'transparent' } }}>
<Button
variant="text"
color="secondary"
onClick={handleLogout}
sx={{ '&:hover': { backgroundColor: 'transparent' } }}
>
Logout
</Button>
)}
Expand Down
3 changes: 2 additions & 1 deletion packages/ottehr-components/lib/data/zapEHRApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
PaperworkResponseWithoutResponses,
PatientInfo,
UpdateAppointmentRequestParams,
UpdateAppointmentResponse,
UpdatePaperworkInput,
UpdatePaperworkResponse,
VideoChatCreateInviteResponse,
Expand Down Expand Up @@ -197,7 +198,7 @@ export const getZapEHRAPI = (
return await makeZapRequest('cancel appointment', parameters, NotFoundApointmentErrorHandler);
};

const updateAppointment = async (parameters: UpdateAppointmentRequestParams): Promise<any> => {
const updateAppointment = async (parameters: UpdateAppointmentRequestParams): Promise<UpdateAppointmentResponse> => {
return await makeZapRequest('update appointment', parameters);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/ottehr-components/lib/types/string-format.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type StringFormat = 'Phone Number' | 'Email' | 'State' | 'ZIP' | 'Signature';
export type StringFormat = 'Phone Number' | 'Decimal' | 'Email' | 'State' | 'ZIP' | 'Signature';
2 changes: 1 addition & 1 deletion packages/ottehr-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ottehr-components",
"private": true,
"version": "0.3",
"version": "0.4",
"main": "lib/main.ts",
"types": "lib/main.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/telemed-ehr/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telemed-ehr-app",
"version": "0.3",
"version": "0.4",
"private": true,
"browserslist": {
"production": [
Expand Down
2 changes: 1 addition & 1 deletion packages/telemed-ehr/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (MUI_X_LICENSE_KEY != null) {
function App(): ReactElement {
useApiClients();
const currentUser = useOttehrUser();
const currentTab = useNavStore((state) => state.currentTab) || 'In Person';
const currentTab = useNavStore((state: any) => state.currentTab) || 'In Person';

const roleUnknown =
!currentUser || !currentUser.hasRole([RoleType.Administrator, RoleType.Staff, RoleType.Manager, RoleType.Provider]);
Expand Down
9 changes: 5 additions & 4 deletions packages/telemed-ehr/app/src/CustomThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const palette = {
},
primary: {
main: '#2169F5',
light: '#4AC0F2',
dark: '#3B98BF',
light: '#2169F5',
dark: '##0A2143',
contrast: '#FFFFFF',
},
secondary: {
main: '#4AC0F2',
main: '#FFCD75',
light: '#0000009A',
dark: '#377DCE',
contrast: '#FFFFFF',
Expand Down Expand Up @@ -46,7 +46,8 @@ const palette = {
};

export const otherColors = {
headerBackground: '#202A3E',
appbarContrast: '#FFCD75',
headerBackground: '#15376a',
blackTransparent: 'rgba(0, 0, 0, 0.5)',
disabled: 'rgba(0,0,0,0.38)',
tableRow: 'rgba(0,0,0,0.87)',
Expand Down
3 changes: 3 additions & 0 deletions packages/telemed-ehr/app/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ export const phoneNumberRegex = /^\d{10}$/;
export const MAXIMUM_CHARACTER_LIMIT = 160;

export const HOP_QUEUE_URI = 'hop-queue';

export const TIMEZONE_EXTENSION_URL = 'http://hl7.org/fhir/StructureDefinition/timezone';
export const TIMEZONES = ['America/New_York', 'America/Chicago', 'America/Denver', 'America/Los_Angeles'];
3 changes: 2 additions & 1 deletion packages/telemed-ehr/app/src/features/chat/ChatModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
import { useApiClients } from '../../hooks/useAppClients';
import useOttehrUser, { OttehrUser } from '../../hooks/useOttehrUser';
import { useFetchChatMessagesQuery, useSendMessagesMutation } from './chat.queries';
import { TIMEZONE_EXTENSION_URL } from '../../constants';

interface PatientParticipant {
firstName: string;
Expand Down Expand Up @@ -99,7 +100,7 @@ const ChatModal = memo(
// const state = currentLocation?.address?.state;
return (
currentLocation?.extension?.find((ext) => {
return ext.url === 'http://hl7.org/fhir/StructureDefinition/timezone';
return ext.url === TIMEZONE_EXTENSION_URL;
})?.valueString ?? 'America/New_York'
);
}, [currentLocation]);
Expand Down
11 changes: 6 additions & 5 deletions packages/telemed-ehr/app/src/helpers/formatDateTime.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Location } from 'fhir/r4';
import { HealthcareService, Location, Practitioner } from 'fhir/r4';
import { DateTime } from 'luxon';
import { TIMEZONE_EXTENSION_URL } from '../constants';

export const OVERRIDE_DATE_FORMAT = 'M/d/yyyy';

Expand Down Expand Up @@ -71,11 +72,11 @@ export function formatISOStringToDateAndTime(isoString: string): string {
return formattedDateTime;
}

export function getTimezone(location: Location | undefined): string {
export function getTimezone(resource: Location | Practitioner | HealthcareService | undefined): string {
let timezone = 'America/New_York';
if (location) {
const timezoneTemp = location.extension?.find(
(extensionTemp) => extensionTemp.url === 'http://hl7.org/fhir/StructureDefinition/timezone',
if (resource) {
const timezoneTemp = resource.extension?.find(
(extensionTemp) => extensionTemp.url === TIMEZONE_EXTENSION_URL,
)?.valueString;
if (timezoneTemp) timezone = timezoneTemp;
}
Expand Down
14 changes: 14 additions & 0 deletions packages/telemed-ehr/app/src/helpers/schedule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export function getResource(
scheduleType: 'office' | 'provider' | 'group',
): 'Location' | 'Practitioner' | 'HealthcareService' {
if (scheduleType === 'office') {
return 'Location';
} else if (scheduleType === 'provider') {
return 'Practitioner';
} else if (scheduleType === 'group') {
return 'HealthcareService';
}

console.log(`'scheduleType unknown ${scheduleType}`);
throw new Error('scheduleType unknown');
}
12 changes: 11 additions & 1 deletion packages/telemed-ehr/app/src/pages/AddSchedulePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { useNavigate, useParams } from 'react-router-dom';
import CustomBreadcrumbs from '../components/CustomBreadcrumbs';
import { useApiClients } from '../hooks/useAppClients';
import PageContainer from '../layout/PageContainer';
import { getResource } from './Schedule';
import { getResource } from '../helpers/schedule';
import { TIMEZONE_EXTENSION_URL } from '../constants';
import { Resource } from 'fhir/r4';

export default function AddSchedulePage(): ReactElement {
Expand Down Expand Up @@ -33,6 +34,15 @@ export default function AddSchedulePage(): ReactElement {
const resource: Resource = await fhirClient.createResource({
resourceType: getResource(scheduleType),
name: scheduleType === 'provider' ? [{ given: [firstName], family: lastName }] : name,
// if it is a group, must add a default time zone extension
...(scheduleType === 'group' && {
extension: [
{
url: TIMEZONE_EXTENSION_URL,
valueString: 'America/New_York',
},
],
}),
});
navigate(`/schedule/${scheduleType}/${resource.id}`);
setLoading(false);
Expand Down
7 changes: 3 additions & 4 deletions packages/telemed-ehr/app/src/pages/Appointments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import PageContainer from '../layout/PageContainer';
import { VisitType, VisitTypeToLabel } from '../types/types';
import ProvidersSelect from '../components/inputs/ProvidersSelect';
import GroupSelect from '../components/inputs/GroupSelect';
import { TIMEZONE_EXTENSION_URL } from '../constants';

type LoadingState = { status: 'loading' | 'initial'; id?: string | undefined } | { status: 'loaded'; id: string };

Expand Down Expand Up @@ -224,9 +225,8 @@ export default function Appointments(): ReactElement {
pageIsVisible
) {
const timezone =
locationSelected?.extension?.find(
(extTemp) => extTemp.url === 'http://hl7.org/fhir/StructureDefinition/timezone',
)?.valueString ?? 'America/New_York';
locationSelected?.extension?.find((extTemp) => extTemp.url === TIMEZONE_EXTENSION_URL)?.valueString ??
'America/New_York';
const searchDateToUse =
(searchDate && DateTime.fromISO(searchDate, { zone: timezone })) || appointmentDate || undefined;
void fetchStuff(zambdaClient, searchDateToUse);
Expand Down Expand Up @@ -398,7 +398,6 @@ function AppointmentsBody(props: AppointmentsBodyProps): ReactElement {
textTransform: 'none',
fontWeight: 600,
}}
color="secondary"
variant="contained"
>
<AddIcon />
Expand Down
2 changes: 1 addition & 1 deletion packages/telemed-ehr/app/src/pages/Patients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default function PatientsPage(): ReactElement {
/>
</Grid>
<Grid item xs={12} sm={2}>
<Button type="submit" variant="contained" fullWidth color="secondary">
<Button type="submit" variant="contained" fullWidth>
Submit
</Button>
</Grid>
Expand Down
Loading

0 comments on commit 6a06944

Please sign in to comment.