Skip to content

Commit

Permalink
feat: added imaging viewing for a patient and imaging requestor - Ref…
Browse files Browse the repository at this point in the history
… gestion-de-projet#1151 gestion-de-projet#2100

* feat: added imaging viewing for a patient and imaging requestor - Ref gestion-de-projet#1151 gestion-de-projet#2100

* feat: finished adding imaging viewing - Ref gestion-de-projet#1151

* refactor: removed unused style - Ref gestion-de-projet#1151

* fix: changed imaging column name- Ref gestion-de-projet#1151

* feat: added imaging in requestor - Ref gestion-de-projet#2100

* fix: fixed imaging criteria calls - Ref gestion-de-projet#2100

* fix: fixed imaging criteria patient active - Ref gestion-de-projet#2100

---------

Co-authored-by: manelleg <manelle.gueriouz@aphp.fr>

* fix: fix rebase main into imaging

* fix: fixed imaging nda and encounter - Ref gestion-de-projet#1151

* fix: fixed imaging columns when deidentified - Ref gestion-de-projet#1151

* fix: fixed imaging requestor after rebase - Ref gestion-de-projet#2100

* feat: added advanced criterias to imaging - Ref gestion-de-projet#2100

* feat: added imaging icon- Ref gestion-de-projet#2100

* fix: tried to fix reset of demographic age criteria - Ref gestion-de-projet#2100

* fix: fixed modalities display - Ref gestion-de-projet#2100

* fix: fixed style of imaging criteria - Ref gestion-de-projet#2100

* feat: added error gestion in imaging criteria - Ref gestion-de-projet#2100

* feat: added imaging viewing for a patient and imaging requestor - Ref gestion-de-projet#1151 gestion-de-projet#2100

* feat: finished adding imaging viewing - Ref gestion-de-projet#1151

* refactor: removed unused style - Ref gestion-de-projet#1151

* fix: changed imaging column name- Ref gestion-de-projet#1151

* feat: added imaging in requestor - Ref gestion-de-projet#2100

* fix: fixed imaging criteria calls - Ref gestion-de-projet#2100

* fix: fixed imaging criteria patient active - Ref gestion-de-projet#2100

---------

Co-authored-by: manelleg <manelle.gueriouz@aphp.fr>

* fix: fix rebase main into imaging

* fix: fixed imaging nda and encounter - Ref gestion-de-projet#1151

* fix: fixed imaging columns when deidentified - Ref gestion-de-projet#1151

* fix: fixed imaging requestor after rebase - Ref gestion-de-projet#2100

* feat: added advanced criterias to imaging - Ref gestion-de-projet#2100

* feat: added imaging icon- Ref gestion-de-projet#2100

* fix: tried to fix reset of demographic age criteria - Ref gestion-de-projet#2100

* fix: fixed modalities display - Ref gestion-de-projet#2100

* fix: fixed style of imaging criteria - Ref gestion-de-projet#2100

* feat: added error gestion in imaging criteria - Ref gestion-de-projet#2100

* feat: added alerts in imaging criteria - Ref gestion-de-projet#2100

* fix: fixed display when no days of delays in imaging form - Ref gestion-de-projet#2100

* fix: fixed display of modalities - Ref gestion-de-projet#2100

* fix: fixed criteria title - Ref gestion-de-projet#2100

* fix: fixed criteria layout buttons - Ref gestion-de-projet#2100

* fix: fixed display of modalities - Ref gestion-de-projet#2100

* fix: fixed display of uid lists - Ref gestion-de-projet#2100

* fix: fixed display of series criteria - Ref gestion-de-projet#2100

* fix: fixed multi calls to search check - Ref gestion-de-projet#2100

* fix: fixed uid inputs- Ref gestion-de-projet#2100

* fix: fixed advanced criteria - Ref gestion-de-projet#2100

* fix: fixed modalities - Ref gestion-de-projet#2100

* fix: deleted double document search help - Ref gestion-de-projet#2100

* fix: fixed type in fetch modalities - Ref gestion-de-projet#2100

* fix: fixed type in fetch modalities - Ref gestion-de-projet#2100

---------

Co-authored-by: manelleg <manelle.gueriouz@aphp.fr>
  • Loading branch information
Mehdi-BOUYAHIA and ManelleG authored Dec 4, 2023
1 parent f881f59 commit 9956ef1
Show file tree
Hide file tree
Showing 97 changed files with 2,531 additions and 1,185 deletions.
4 changes: 0 additions & 4 deletions src/components/CohortsTable/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ const useStyles = makeStyles()(() => ({
color: '#0063AF',
padding: '0 20px'
},
status: {
fontSize: '12px',
fontWeight: 'bold'
},
notAllow: {
opacity: 0.7,
cursor: 'not-allowed'
Expand Down
18 changes: 16 additions & 2 deletions src/components/CreationCohort/DataList_Criteria.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import Cim10Form from './DiagramView/components/LogicalOperator/components/Crite
import GhmForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/GHM'
import MedicationForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/MedicationForm'
import BiologyForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/BiologyForm'
import DemographicForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DemographicForm'
import ImagingForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/ImagingForm'

import services from 'services/aphp'

import { ODD_BIOLOGY, ODD_MEDICATION } from '../../constants'
import DemographicForm from './DiagramView/components/LogicalOperator/components/CriteriaRightPanel/DemographicForm'
import { ODD_BIOLOGY, ODD_IMAGING, ODD_MEDICATION } from '../../constants'

// ├── Mes requêtes
// ├── Liste d'IPP
Expand All @@ -30,6 +31,7 @@ import DemographicForm from './DiagramView/components/LogicalOperator/components
// ├── Biologie/Microbiologie
// │ ├── Biologie
// │ ├── Microbiologie
// ├── Imagerie
// ├── Physiologie

const criteriaList: CriteriaItemType[] = [
Expand Down Expand Up @@ -202,6 +204,18 @@ const criteriaList: CriteriaItemType[] = [
}
]
},
{
id: 'ImagingStudy',
title: 'Imagerie',
color: ODD_IMAGING ? '#0063AF' : '#808080',
fontWeight: 'bold',
components: ODD_IMAGING ? ImagingForm : null,
disabled: !ODD_IMAGING ?? false,
data: { modalities: 'loading' },
fetch: {
fetchModalities: services.cohortCreation.fetchModalities
}
},
{
id: 'physiologie',
title: 'Physiologie',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import React, { useState, useEffect } from 'react'

import { Breadcrumbs, Grid, Typography } from '@mui/material'
import { Breadcrumbs, Grid, Typography, useTheme } from '@mui/material'

import { useAppSelector, useAppDispatch } from 'state'
import { fetchProjects as fetchProjectsList } from 'state/project'
import { fetchRequests as fetchRequestsList } from 'state/request'

import useStyles from './styles'

const CohortCreationBreadcrumbs: React.FC = () => {
const { classes } = useStyles()
const theme = useTheme()
const dispatch = useAppDispatch()

const {
Expand Down Expand Up @@ -49,7 +47,7 @@ const CohortCreationBreadcrumbs: React.FC = () => {
}, [projects, requests])

return (
<Grid container className={classes.root}>
<Grid container marginBottom={theme.spacing(2)}>
<Breadcrumbs separator=">" aria-label="breadcrumb">
<Typography>{projectName}</Typography>
<Typography>{requestName}</Typography>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@ const useStyles = makeStyles()((theme: Theme) => ({
marginLeft: -46
}
},
criteriaTitleAndChips: {
width: 'calc(100% - 80px)',
[theme.breakpoints.down('md')]: {
flexWrap: 'wrap'
}
},
title: {
whiteSpace: 'nowrap',
marginLeft: 4
},
actionContainer: {
display: 'flex',
flexWrap: 'nowrap'
},
secondItem: {
overflow: 'hidden',
[theme.breakpoints.down('xl')]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ type AdvancedInputsProps = {
const AdvancedInputs: React.FC<AdvancedInputsProps> = (props) => {
const { form, selectedCriteria = {}, onChangeValue } = props
const optionsIsUsed =
+selectedCriteria.occurrence !== 1 ||
selectedCriteria.occurrenceComparator !== '>=' ||
!!selectedCriteria.startOccurrence ||
!!selectedCriteria.endOccurrence ||
!!selectedCriteria.encounterStartDate ||
!!selectedCriteria.encounterEndDate
selectedCriteria?.encounterService.length > 0 ||
!!selectedCriteria?.startOccurrence ||
!!selectedCriteria?.endOccurrence ||
!!selectedCriteria?.encounterStartDate ||
!!selectedCriteria?.encounterEndDate

const [checked, setCheck] = useState(optionsIsUsed)
const label = 'Séléctionnez une unité exécutrice'
const label = 'Sélectionnez une unité exécutrice'

const _onSubmitExecutiveUnits = (_selectedExecutiveUnits: ScopeTreeRow[] | undefined) => {
onChangeValue('encounterService', _selectedExecutiveUnits)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,13 @@ import ClearIcon from '@mui/icons-material/Clear'

import useStyles from './styles'

const defaultOccurrenceInputs = {
code: [],
isLeaf: false,
valueMin: 0,
valueMax: 0,
valueComparator: '>=',
occurrence: 1,
occurrenceComparator: '>=',
startOccurrence: '',
endOccurrence: '',
isInclusive: true
}

type OccurrenceDateInputsProps = {
selectedCriteria: any
onChangeValue: (key: string, value: any) => void
}

const OccurrenceDateInputs: React.FC<OccurrenceDateInputsProps> = (props) => {
const { onChangeValue } = props
const selectedCriteria = { ...defaultOccurrenceInputs, ...props.selectedCriteria }
const { onChangeValue, selectedCriteria } = props

const { classes } = useStyles()

Expand All @@ -44,7 +30,7 @@ const OccurrenceDateInputs: React.FC<OccurrenceDateInputsProps> = (props) => {
<Input
id="date-start-occurrence"
type="date"
value={selectedCriteria.startOccurrence}
value={selectedCriteria?.startOccurrence}
endAdornment={
<IconButton size="small" onClick={() => onChangeValue('startOccurrence', '')}>
<ClearIcon />
Expand All @@ -61,7 +47,7 @@ const OccurrenceDateInputs: React.FC<OccurrenceDateInputsProps> = (props) => {
<Input
id="date-end-occurrence"
type="date"
value={selectedCriteria.endOccurrence}
value={selectedCriteria?.endOccurrence}
endAdornment={
<IconButton size="small" onClick={() => onChangeValue('endOccurrence', '')}>
<ClearIcon />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,9 @@
import { makeStyles } from 'tss-react/mui'

const useStyles = makeStyles()(() => ({
root: {
display: 'flex',
flexDirection: 'column',
flex: '1 1 auto'
},
actionContainer: {
display: 'flex',
alignItems: 'center',
height: 72,
padding: 20,
backgroundColor: '#317EAA',
color: 'white',
// Not default
marginBottom: 48
},
backButton: { color: 'white' },
divider: { background: 'white' },
titleLabel: { marginLeft: '1em' },
formContainer: {
overflow: 'auto',
maxHeight: 'calc(100vh - 183px)'
},
inputContainer: {
padding: '1em',
display: 'flex',
flex: '1 1 0%',
flexDirection: 'column'
},
inputItem: {
margin: '1em',
width: 'calc(100% - 2em)'
},
criteriaActionContainer: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexWrap: 'wrap',
borderTop: '1px solid grey',
position: 'absolute',
width: '100%',
bottom: 0,
left: 0,
background: '#fff',
'& > button': {
margin: '12px 8px'
}
}
}))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const VisitInputs: React.FC<VisitInputsProps> = (props) => {
<Input
id="date-start-occurrence"
type="date"
value={selectedCriteria.encounterStartDate}
value={selectedCriteria?.encounterStartDate}
endAdornment={
<IconButton size="small" onClick={() => onChangeValue('encounterStartDate', '')}>
<ClearIcon />
Expand All @@ -47,7 +47,7 @@ const VisitInputs: React.FC<VisitInputsProps> = (props) => {
<Input
id="date-end-occurrence"
type="date"
value={selectedCriteria.encounterEndDate}
value={selectedCriteria?.encounterEndDate}
endAdornment={
<IconButton size="small" onClick={() => onChangeValue('encounterEndDate', '')}>
<ClearIcon />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ const useStyles = makeStyles()((theme: Theme) => ({
backButton: { color: 'white' },
divider: { background: 'white' },
titleLabel: { marginLeft: '1em' },
tabTitle: {
minWidth: 0,
color: 'rgba(0, 99, 175, 0.4)',
borderBottom: '#CFE4FD 2px inset'
},
indicator: {
width: 20,
height: 20,
Expand All @@ -40,15 +35,6 @@ const useStyles = makeStyles()((theme: Theme) => ({
border: '2px solid currentColor',
borderRadius: 10
},
indeterminateIndicator: {
color: '#555 !important',
width: 20,
height: 20,
backgroundColor: 'currentColor',
boxShadow: 'inset 0 0 0 4px white',
border: '2px solid currentColor',
borderRadius: 10
},
biologyItem: {
padding: '4px 16px'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const CcamForm: React.FC<CcamFormProps> = (props) => {

<Grid>
<Alert severity="info">
Les données PMSI d'Obris sont codées au quotidien par les médecins. Les données PMSI AREM sont validées,
Les données PMSI d'ORBIS sont codées au quotidien par les médecins. Les données PMSI AREM sont validées,
remontées aux tutelles et disponibles dans le SNDS.
</Alert>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import CoronavirusIcon from '@mui/icons-material/Coronavirus'
import { CriteriaItemType } from 'types'
import useStyles from './styles'
import { RessourceType, SelectedCriteriaType } from 'types/requestCriterias'
import { PhotoCameraFront } from '@mui/icons-material'

type CriteriaListItemProps = {
criteriaItem: CriteriaItemType
Expand All @@ -35,45 +36,51 @@ const CriteriaListItem: React.FC<CriteriaListItemProps> = (props) => {
const { classes } = useStyles()
const [open, setOpen] = useState(true)

const svgIcone =
id === RessourceType.REQUEST ? (
<SavedSearchIcon />
) : id === RessourceType.IPP_LIST ? (
<PersonSearchIcon />
) : id === RessourceType.PATIENT ? (
<BarChartIcon />
) : id === RessourceType.ENCOUNTER ? (
<EventIcon />
) : id === RessourceType.DOCUMENTS ? (
<DescriptionIcon />
) : id === RessourceType.PMSI ? (
<MedicalInformationIcon />
) : id === RessourceType.CONDITION ? (
<ArticleIcon />
) : id === RessourceType.PROCEDURE ? (
<ContactPageIcon />
) : id === RessourceType.CLAIM ? (
<LocalHospitalIcon />
) : id === RessourceType.MEDICATION ? (
<VaccinesIcon />
) : id === RessourceType.BIO_MICRO ? (
<BiotechIcon />
) : id === RessourceType.OBSERVATION ? (
<CoronavirusIcon />
) : id === RessourceType.MICROBIOLOGIE ? (
<ScienceIcon />
) : id === RessourceType.PHYSIOLOGIE ? (
<MonitorHeartIcon />
) : (
<></>
)
const getCriteriaIcon = (id: string) => {
switch (id) {
case RessourceType.REQUEST:
return <SavedSearchIcon />
case RessourceType.IPP_LIST:
return <PersonSearchIcon />
case RessourceType.PATIENT:
return <BarChartIcon />
case RessourceType.ENCOUNTER:
return <EventIcon />
case RessourceType.DOCUMENTS:
return <DescriptionIcon />
case RessourceType.PMSI:
return <MedicalInformationIcon />
case RessourceType.CONDITION:
return <ArticleIcon />
case RessourceType.PROCEDURE:
return <ContactPageIcon />
case RessourceType.CLAIM:
return <LocalHospitalIcon />
case RessourceType.MEDICATION:
return <VaccinesIcon />
case RessourceType.BIO_MICRO:
return <BiotechIcon />
case RessourceType.OBSERVATION:
return <CoronavirusIcon />
case RessourceType.MICROBIOLOGIE:
return <ScienceIcon />
case RessourceType.PHYSIOLOGIE:
return <MonitorHeartIcon />
case RessourceType.IMAGING:
return <PhotoCameraFront />
default:
return <></>
}
}

const svgIcon = getCriteriaIcon(id)

const cursor = disabled ? 'not-allowed' : components ? 'pointer' : 'default'

if (!subItems || (subItems && subItems.length === 0)) {
return (
<ListItem onClick={disabled ? undefined : () => handleClick(criteriaItem)} className={classes.criteriaItem}>
<ListItemIcon style={{ minWidth: '2rem', color: 'currentcolor' }}>{svgIcone}</ListItemIcon>
<ListItemIcon style={{ minWidth: '2rem', color: 'currentcolor' }}>{svgIcon}</ListItemIcon>
<ListItemText disableTypography style={{ cursor, color, fontWeight }} primary={title} />
</ListItem>
)
Expand All @@ -87,7 +94,7 @@ const CriteriaListItem: React.FC<CriteriaListItemProps> = (props) => {
>
<Grid container flexDirection="column">
<Grid container flexDirection="row">
<ListItemIcon style={{ minWidth: '2rem', color: 'currentcolor' }}>{svgIcone}</ListItemIcon>
<ListItemIcon style={{ minWidth: '2rem', color: 'currentcolor' }}>{svgIcon}</ListItemIcon>
<ListItemText
disableTypography
style={{ cursor, color, fontWeight }}
Expand Down
Loading

0 comments on commit 9956ef1

Please sign in to comment.