Problem with medplumClient.search encoding
# support
t
Hi Medplum team. I've been playing around with the Medplum patient search and when I send a request with
name=john doe
or
name=john,doe
through a service like insomnia or postman it applies percent-encoding to the name field and the Medplum server responds with the patient John Doe as expected. However, when trying to send the same request using
medplumClient.search
the encoding is done with
URLSearchParams
(e.g.
name=john+doe
) and Medplum server returns no matches. Is there a workaround within
medplumClient
for this?
c
Hi @thaismorato - very interesting finding. I ran some quick tests. I was able to reproduce the "+" vs "%20" issue, but in my tests Medplum server handled the "+" input ok, and correctly returned results. Are you using Medplum's hosted server (api.medplum.com) or a self-hosted environment? If self-hosted, can. you share your Medplum version and Node.js version?
t
hi @cody, I reached out to the person responsible for Medplum in my company to answer your question and found out that we have a channel for communicating with the Medplum team, so I'll be following up there. I appreciate the availability
201 Views