def shortid(obsid):
    """
    Compact format for the observation id, like QPT

    Parameters
    ----------
    obsid : string
        Program id string

    Returns
    -------
    shortid : string
        Compact format
    """

    idvals = obsid.split('-')

    shortid = idvals[0][-1] + idvals[1][2:] + '-' + idvals[2] + '-' + idvals[3] + '[' + idvals[4] + ']'

    return shortid