Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
bradsawadye and coderabbitai[bot] authored May 14, 2024
1 parent 2ccda18 commit 8b178a0
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/routes/handlers/fetchPatient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ const {
export const fetchPatientByQuery = async (
query: object
): Promise<MpiMediatorResponseObject> => {
const params = Object.entries(query);
let combinedParams = '';

if (params.length > 0) {
combinedParams = params
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
.join('&');
}
const combinedParams = new URLSearchParams(query as Record<string, string>).toString();

const headers: HeadersInit = {
'Content-Type': 'application/fhir+json',
Expand Down

0 comments on commit 8b178a0

Please sign in to comment.