def new_phi(text, index_start, index_end, phi_type, scrub_type):
    """
    Factory function to create a JSON representation of a PHI entry.

    Positional Args:
        text: String        Text value of the PHI.
        index_start: Int    Character offset from document start to PHI start.
        index_end: Int      Character offset from document start to PHI end.
        phi_type: String    Category of PHI (ie. PERSON, DATE,...).
        scrub_type: String  Method used by scrubber (ie. DICT, REGEX, or ML).

    Returns:
        A JSON representation of a PHI entry.
    """

    entry = {
        "text": text,
        "index_start": index_start,
        "index_end": index_end,
        "phi_type": phi_type,
        "scrub_type": scrub_type
    }

    return entry