(parent_ref, parent_resource_type)
Validates that ``parent_ref`` is a relative reference with an
    expected resource type. e.g. "Patient/12345"
Validates that ``parent_ref`` is a relative reference with an
    expected resource type. e.g. "Patient/12345"
Validates that parent_ref is a relative reference with an expected resource type . e . g . Patient / 12345
def validate_parent_ref(parent_ref, parent_resource_type):
    """
    Validates that ``parent_ref`` is a relative reference with an
    expected resource type. e.g. "Patient/12345"
    """
    try:
        resource_type_name, resource_id = parent_ref.split('/')
    except (AttributeError, ValueError):
        raise ConfigurationError(
            f'Unexpected reference format {parent_ref!r}')
    if resource_type_name != parent_resource_type.name:
        raise ConfigurationError(
            'Resource type does not match expected parent resource type')
def validate_parent_ref ( parent_ref , parent_resource_type ) : try : resource_type_name , resource_id = parent_ref . split ( '/' ) except ( AttributeError , ValueError ) : raise ConfigurationError ( f'Unexpected reference format {parent_ref!r}' ) if resource_type_name != parent_resource_type . name : raise ConfigurationError ( 'Resource type does not match expected parent resource type' )