It is shown that Ramanujan-type measures for a hierarchy of classical q-orthogonal polynomials can be systematically built from simple cases of continuous q-Hermite and q−1-Hermite polynomials using the Berg-Ismail procedure of attaching generating functions to measures. Applications of this technique also leads to the evaluation of Ramanujan-type integrals for Al-Salam-Chihara polynomials where 0 1, as well as for the product of four particular nonterminating basic hypergeometric functions 2φ1.