CDCgov / dibbs-query-connector

A FHIR client allowing public health agencies to query health care organizations directly or via a TEFCA QHIN
Creative Commons Zero v1.0 Universal
4 stars 0 forks source link

Replace non-numeric characters in phone numbers with url encoding #166

Closed m-goggins closed 1 day ago

m-goggins commented 1 day ago

PULL REQUEST

Summary

This PR changes the way that we generate the list of phone numbers to search for by replacing non-numeric characters, e.g. + and -, with their url encoded equivalents. This allows us to query for multiple phone numbers via eHealth Exchange, which eHealth devs recommend.

Related Issue

Fixes #167

Additional Information

We may look into more robust URL encoding for other fields, e.g., first names with spaces.

Checklist

m-goggins commented 1 day ago

Nice find @robertandremitchell! I added your suggestion (had to use encodeURIComponent) to get it to work on the full list. I'm going to follow up this ticket with a more comprehensive look at how we can do encoding for all input fields since I know first name also can have this issue if you have two given names with a space, e.g., 'Jacob Jingleheimer`