Legal foundations of medical practice