Quantification of exposure to psychosocial stressors and drug availability might assist in the prevention and treatment of substance-use problems. The core of such interventions lies in combining real-time self-report data (via Ecological Momentary Assessment, EMA) with real-time geolocation data (via GPS logging). Combining these types of data and linking the result with patients' clinical research records has inherent technical challenges. In this paper, we describe how we have addressed those challenges with our Psychosocial Geolocation Integration System (PGIS), which we successfully used in two clinical studies involving polydrug-abusing participants.