from typing import Dict


def canonical_for_code_system(jcs: Dict) -> str:
    """get the canonical URL for a code system entry from the art decor json. Prefer FHIR URIs over the generic OID URI.

    Args:
        jcs (Dict): the dictionary describing the code system

    Returns:
        str: the canonical URL
    """
    if "canonicalUriR4" in jcs:
        return jcs["canonicalUriR4"]
    else:
        return jcs["canonicalUri"]