That is a good question. The answer is that you don't put the data in the blockchain, you just keep the log of who is interacting with the patient and who needs access to the records. ;)
Indeed, for example "John Smith went to see a HIV specialist on Monday" is protected information and would be a HIPAA violation if leaked. Its much simpler to throw it in a relational database and only let the HIV specialist and staff see the appointment.
Anyway, both the example of advertisement and health care data need to also provide privacy. In both cases the data should be considered sensitive and not public. In both cases, the data can be protected through blind signatures.