The source code of all Simscape foundation library blocks are available, including the hydraulic domain. I can verify back to the 2018b version but not sure about earlier ones. The parameter dialog box has a link to the source code for each block (.ssc file).
To make certain fluid properties as a function of pressure, you may define property lookup tables in the domain definition, and use the "tablelookup" function whenever appropriate to get the local fluid property. There are plenty of such examples in the source code of the thermal liquid (TL) domain.