The apostrophe, or single quote, is used by many databases to denote a string. For example, in the TRANSACT-SQL language to find all records with my last name you would do this:
SELECT [First], [Last], Birthdate FROM Patients WHERE [Last] = 'Summerlin'
Also, the double hyphen, --, is used to place a comment in code or is used for subtraction.
This is also true for other languages such as C# and Visual Basic.
I cannot speak for Phreesia as I have not used that product but I suspect you are seeing similar issues there.
Consider the following example:
SELECT * FROM Patients WHERE LastName LIKE '%O'Brian%'
I trust we see the problem there.
JamesNT