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

Ottehr Kura 0.11 release #411

Merged
merged 24 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0d76fe8
added Links
GiladSchneider Sep 9, 2024
9318e68
fixed build
GiladSchneider Sep 9, 2024
8f925ef
Merge pull request #391 from masslight/380-link-buttons
GiladSchneider Sep 9, 2024
01fb2a8
feat: add side panel
AykhanAhmadli Sep 11, 2024
b383771
minor adjusments footer and questionnaire
AykhanAhmadli Sep 11, 2024
32e18fe
change freemultiselect input behaviour
AykhanAhmadli Sep 12, 2024
e2b8457
fix weight last updated
AykhanAhmadli Sep 12, 2024
4373eb5
fix: refactor ehr UX
AykhanAhmadli Sep 12, 2024
0b5e80e
fix build error
AykhanAhmadli Sep 12, 2024
2d8b8ab
issue #363
GiladSchneider Sep 12, 2024
2c084a8
updates validation
GiladSchneider Sep 12, 2024
fce2563
employee search bug (#371)
rzinger Sep 12, 2024
bd7c006
fix appointment side panel
AykhanAhmadli Sep 12, 2024
2e47c19
fix in-person appointments tab ui
AykhanAhmadli Sep 13, 2024
6d265a3
refactor
AykhanAhmadli Sep 13, 2024
089213d
fix telemed status map
AykhanAhmadli Sep 13, 2024
ce00304
Merge pull request #398 from masslight/employees/371
rzinger Sep 13, 2024
43b4035
fix: set date picker maximum year
AykhanAhmadli Sep 13, 2024
3ed2880
Merge pull request #395 from masslight/aykhan/intake-testing-bugs
AykhanAhmadli Sep 13, 2024
2fbcb4b
Merge pull request #397 from masslight/363/cancel-appointment
GiladSchneider Sep 13, 2024
e1117ff
edit button texts
AykhanAhmadli Sep 13, 2024
ab98c8d
Merge pull request #394 from masslight/aykhan/ehr-appointment-page
AykhanAhmadli Sep 13, 2024
e0e65cd
version bump
GiladSchneider Sep 13, 2024
fd8dc1a
Merge pull request #405 from masslight/0.11-Kura-version-bump
GiladSchneider Sep 13, 2024
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: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ottehr",
"version": "0.10.0",
"version": "0.11.0",
"private": true,
"scripts": {
"test": "pnpm recursive run test",
Expand Down Expand Up @@ -115,6 +115,7 @@
"@types/node-fetch": "^2.6.2",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/react-window": "1.8.8",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@vitest/coverage-v8": "^0.34.6",
Expand All @@ -140,6 +141,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "^5.0.1",
"react-window": "1.8.10",
"serverless": "^3.26.0",
"serverless-esbuild": "^1.45.1",
"serverless-offline": "^12.0.3",
Expand Down
1 change: 1 addition & 0 deletions packages/ehr-utils/lib/types/appointment.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum ApptStatus {
'on-video' = 'on-video',
'unsigned' = 'unsigned',
'complete' = 'complete',
'cancelled' = 'cancelled',
}

export type TelemedCallStatuses = `${ApptStatus}`;
Expand Down
2 changes: 2 additions & 0 deletions packages/ehr-utils/lib/types/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ export const PRACTITIONER_QUALIFICATION_EXTENSION_URL =
export const PRACTITIONER_QUALIFICATION_CODE_SYSTEM = 'http://terminology.hl7.org/CodeSystem/v2-0360|2.7';

export const PRACTITIONER_QUALIFICATION_STATE_SYSTEM = 'http://hl7.org/fhir/us/core/ValueSet/us-core-usps-state';

export const INTERPRETER_PHONE_NUMBER = '(123) 456-7890';
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export type VisitStatus = VISIT_STATUS_LABEL_TYPE[number];

export const getStatusLabelForAppointmentAndEncounter = (appointment: Appointment): VisitStatus => {
const statusToMap = getStatusFromExtension(appointment);
console.log('statusToMap', statusToMap);
if (statusToMap == undefined) {
console.log(
`Unable to derive Visit status from ${
Expand Down Expand Up @@ -98,7 +97,6 @@ type AppOrEncounter = Appointment | Encounter;
export const getVisitStatusHistory = <T extends AppOrEncounter>(resource: T): VisitStatusHistoryEntry[] => {
const extensions = (resource.extension ?? []).find((ext) => ext.url === visitStatusExtensionUrl)?.extension ?? [];
const history = extensions.map((ext) => {
console.log(2, ext);
const reduced: VisitStatusHistoryEntry = (ext.extension ?? []).reduce(
(accum, currentExt) => {
if (currentExt.url === 'status') {
Expand Down
7 changes: 6 additions & 1 deletion packages/ehr-utils/lib/types/messaging.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Appointment, Coding } from 'fhir/r4';
import { Appointment, Coding, Communication, RelatedPerson } from 'fhir/r4';

export const OTTEHR_PATIENT_MESSAGE_SYSTEM = 'ottehr-patient-message-status';
export const OTTEHR_PATIENT_MESSAGE_CODE = 'read-by-ottehr';
Expand All @@ -17,6 +17,11 @@ export interface ConversationMessage {
isFromPatient: boolean;
}

export type RelatedPersonMaps = {
rpsToPatientIdMap: Record<string, RelatedPerson[]>;
commsToRpRefMap: Record<string, Communication[]>;
};

export interface SMSRecipient {
relatedPersonId: string;
smsNumber: string;
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.10.0",
"version": "0.11.0",
"main": "lib/main.ts",
"types": "lib/main.ts",
"scripts": {
Expand Down
31 changes: 18 additions & 13 deletions packages/ottehr-components/lib/components/PageForm.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { yupResolver } from '@hookform/resolvers/yup';
import { Grid } from '@mui/material';
import { DateTime } from 'luxon';
import React, { ReactElement, memo, useMemo } from 'react';
import React, { ReactElement, memo, useMemo, useRef } from 'react';
import { FieldValues, FormProvider, SubmitHandler, useForm } from 'react-hook-form';
import {
DATE_ERROR_MESSAGE,
Expand All @@ -16,6 +16,7 @@ import * as Yup from 'yup';
import { checkEnable, filterFormInputFields } from '../helpers';
import { ControlButtonsProps, FormInputType, FormInputTypeField, FormInputTypeGroup, OverrideValues } from '../types';
import { ControlButtons } from './form';
import { PageFormContext } from '../contexts';

interface PageFormProps {
formElements?: FormInputType[];
Expand Down Expand Up @@ -257,19 +258,23 @@ const PageForm: React.FC<PageFormProps> = memo(
};
};

const formRef = useRef<HTMLFormElement | null>(null);

return (
<FormProvider {...methods}>
<form onSubmit={createSubmitHandler()} style={{ width: '100%' }}>
{formElements && (
<Grid container spacing={1}>
{filterFormInputFields(formElements, values, methods, overrideValues)}
</Grid>
)}
<div id="page-form-inner-form" />
{bottomComponent}
{!hideControls && <ControlButtons {...controlButtons} />}
</form>
</FormProvider>
<PageFormContext.Provider value={{ formRef }}>
<FormProvider {...methods}>
<form onSubmit={createSubmitHandler()} style={{ width: '100%' }}>
{formElements && (
<Grid container spacing={1}>
{filterFormInputFields(formElements, values, methods, overrideValues)}
</Grid>
)}
<div id="page-form-inner-form" />
{bottomComponent}
{!hideControls && <ControlButtons {...controlButtons} />}
</form>
</FormProvider>
</PageFormContext.Provider>
);
},
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useContext, useEffect, useMemo, useState } from 'react';
import { Select, MenuItem, InputLabel, FormControl, Box } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { months } from 'ottehr-utils';
import { DateTime } from 'luxon';
import { BoldPurpleInputLabel } from './BoldPurpleInputLabel';
Expand Down Expand Up @@ -37,7 +36,6 @@ const CoalescedDateInput = ({
const [selectedMonth, setSelectedMonth] = useState<string>('');
const [selectedDay, setSelectedDay] = useState<string>('');
const [selectedYear, setSelectedYear] = useState<string>('');
const { t } = useTranslation();

useEffect(() => {
if (currentValue === '') {
Expand All @@ -53,9 +51,8 @@ const CoalescedDateInput = ({
}, [currentValue, defaultValue, readOnlyValue]);

const currentDate = new Date();
const maximumAge = t('general.maximumAge') as unknown as number;
const currentYear = currentDate.getFullYear();
const startYear = currentYear - maximumAge + 1;
const startYear = 1900;

const days = Array.from({ length: 31 }, (_, index) => {
const day: number = index + 1;
Expand Down
6 changes: 1 addition & 5 deletions packages/ottehr-components/lib/components/form/FormList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { FormInputTypeField } from '../../types';
import { FieldValues } from 'react-hook-form';
import { Box, Card, Grid, IconButton, Typography, useTheme } from '@mui/material';
import { Box, Card, Grid, IconButton, Typography } from '@mui/material';
import { deleteIcon } from '../../assets';
import { createPortal } from 'react-dom';
import PageForm from '../PageForm';
Expand All @@ -11,7 +11,6 @@ export const FormList: React.FC<{ formInput: FormInputTypeField; values: FieldVa
const { formInput, values, methods } = props;

const [innerForm, setInnerForm] = useState<HTMLElement | null>();
const theme = useTheme();

useEffect(() => {
setInnerForm(document.getElementById('page-form-inner-form'));
Expand All @@ -34,8 +33,6 @@ export const FormList: React.FC<{ formInput: FormInputTypeField; values: FieldVa

const fieldValue = methods.watch()[formInput.name];

const error = methods?.formState.errors[formInput.name];

return (
<Grid>
{getFormInputField(
Expand Down Expand Up @@ -78,7 +75,6 @@ export const FormList: React.FC<{ formInput: FormInputTypeField; values: FieldVa
}}
>
<PageForm formElements={formInput.item} onSubmit={onAdd} hideControls innerForm />
{error && <Typography color={theme.palette.error.main}>{error.message}</Typography>}
</Card>,
innerForm,
)}
Expand Down
Loading
Loading