diff --git a/src/components/DataTable/DataTablePatient.tsx b/src/components/DataTable/DataTablePatient.tsx index d33f6a18c..b6bfa08d6 100644 --- a/src/components/DataTable/DataTablePatient.tsx +++ b/src/components/DataTable/DataTablePatient.tsx @@ -43,12 +43,12 @@ const DataTablePatient: React.FC = ({ const { classes } = useStyles() const columns: Column[] = [ - { label: `Sexe`, code: 'gender', align: 'center', sortableColumn: true }, + { label: `Sexe`, code: 'gender,id', align: 'center', sortableColumn: true }, { label: 'Prénom', code: 'name', align: 'center', sortableColumn: !deidentified }, { label: 'Nom', code: 'family', align: 'left', sortableColumn: !deidentified }, { label: !deidentified ? 'Date de naissance' : 'Âge', - code: 'birthdate', + code: 'birthdate,id', align: 'center', sortableColumn: !deidentified }, diff --git a/src/components/Patient/PatientBiology/PatientBiology.tsx b/src/components/Patient/PatientBiology/PatientBiology.tsx index 6a1f11080..b5a6f3fb8 100644 --- a/src/components/Patient/PatientBiology/PatientBiology.tsx +++ b/src/components/Patient/PatientBiology/PatientBiology.tsx @@ -92,6 +92,8 @@ const PatientBiology: React.FC = ({ groupId }) => { } catch (error) { if (error instanceof CanceledError) { setLoadingStatus(LoadingStatus.FETCHING) + } else { + setLoadingStatus(LoadingStatus.SUCCESS) } } } diff --git a/src/components/Patient/PatientMedication/PatientMedication.tsx b/src/components/Patient/PatientMedication/PatientMedication.tsx index 99ae7d2c6..a4ec6fd1e 100644 --- a/src/components/Patient/PatientMedication/PatientMedication.tsx +++ b/src/components/Patient/PatientMedication/PatientMedication.tsx @@ -81,6 +81,8 @@ const PatientMedication: React.FC = ({ groupId }) => { } catch (error) { if (error instanceof CanceledError) { setLoadingStatus(LoadingStatus.FETCHING) + } else { + setLoadingStatus(LoadingStatus.SUCCESS) } } } diff --git a/src/components/Patient/PatientPMSI/PatientPMSI.tsx b/src/components/Patient/PatientPMSI/PatientPMSI.tsx index d4eaf12f7..c58f5a971 100644 --- a/src/components/Patient/PatientPMSI/PatientPMSI.tsx +++ b/src/components/Patient/PatientPMSI/PatientPMSI.tsx @@ -95,6 +95,8 @@ const PatientPMSI: React.FC = ({ groupId }) => { } catch (error) { if (error instanceof CanceledError) { setLoadingStatus(LoadingStatus.FETCHING) + } else { + setLoadingStatus(LoadingStatus.SUCCESS) } } } diff --git a/src/services/aphp/serviceCohorts.ts b/src/services/aphp/serviceCohorts.ts index 2633de5fb..efe4f777d 100644 --- a/src/services/aphp/serviceCohorts.ts +++ b/src/services/aphp/serviceCohorts.ts @@ -351,8 +351,13 @@ const servicesCohorts: IServiceCohorts = { .trim() // Remove space before/after search .split(' ') // Split by space (= ['mot1', 'mot2' ...]) .filter((elem: string) => elem) // Filter if you have ['mot1', '', 'mot2'] (double space) - for (const _search of searches) { - _searchInput = _searchInput ? `${_searchInput} AND "${_search}"` : `"${_search}"` + + if (searchBy === SearchByTypes.identifier) { + _searchInput = searches.join() + } else { + for (const _search of searches) { + _searchInput = _searchInput ? `${_searchInput} AND "${_search}"` : `"${_search}"` + } } // convert birthdates into days or months depending of if it's a deidentified perimeter or not diff --git a/src/state/patient.ts b/src/state/patient.ts index cc8aa9f30..523399a1a 100644 --- a/src/state/patient.ts +++ b/src/state/patient.ts @@ -151,9 +151,10 @@ const fetchPmsi = createAsyncThunk } } } catch (error) { - console.error(error) if (error instanceof CanceledError) { return thunkApi.rejectWithValue({ error }) + } else { + throw error } } } @@ -243,6 +244,8 @@ const fetchBiology = createAsyncThunk