Skip to content

Commit

Permalink
fix(OH2-375): Fix search patient states
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGT96 committed Sep 3, 2024
1 parent 60f88c1 commit 4f43c7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/state/patients/thunk.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createAsyncThunk } from "@reduxjs/toolkit";
import { PatientDTO, PatientsApi, UpdatePatientRequest } from "../../generated";
import { customConfiguration } from "../../libraries/apiUtils/configuration";
import moment from "moment";
import { TValues } from "../../components/activities/searchPatientActivity/types";
import { PatientDTO, PatientsApi, UpdatePatientRequest } from "../../generated";
import { customConfiguration } from "../../libraries/apiUtils/configuration";

const api = new PatientsApi(customConfiguration());

Expand All @@ -13,7 +13,7 @@ export const searchPatient = createAsyncThunk(
return api
.getPatient({ code: parseInt(values.id) })
.toPromise()
.then((result) => [result])
.then((result) => (result ? [result] : []))
.catch((error) => thunkApi.rejectWithValue(error.response));
}
return api
Expand Down

0 comments on commit 4f43c7d

Please sign in to comment.