The brain-based assessments under anesthesia have provided the ability to evaluate pain/nociception during surgery and the potential to prevent long-term evolution of chronic pain. Prior studies have shown that the functional near-infrared spectroscopy (fNIRS)-measured changes in cortical regions such as the primary somatosensory and the polar frontal cortices show consistent response to evoked and ongoing pain in awake, sedated, and anesthetized patients. We take this basic approach and integrate it into a potential framework that could provide real-time measures of pain/nociception during the peri-surgical period. This application could have significant implications for providing analgesia during surgery, a practice that currently lacks quantitative evidence to guide patient tailored pain management. Through a simple readout of "pain" or "no pain," the proposed system could diminish or eliminate levels of intraoperative, early post-operative, and potentially, the transition to chronic post-surgical pain. The system, when validated, could also be applied to measures of analgesic efficacy in the clinic.