EFSPIntegration.interview_logic
A group of methods that were code blocks in various parts of the EFSP package, but for better python tooling support, were moved here.
EFCaseSearch Objects
class EFCaseSearch(DAObject)
A data-class that has holds all of the information and state for a single case search
search_went_wrong
def search_went_wrong() -> bool
Returns true if something errored during the case search process
get_lookup_choices
def get_lookup_choices(
can_file_non_indexed_case: bool) -> List[Dict[str, str]]
Returns the DA choice list of what ways you are allowed to search for a case; By default, this is "party_search", and "docket_lookup", and depending on the court, it could also include "non_indexed_case".
Not passed as direct arguments, but the object attributes party_search_choice
,
docket_lookup_choice
, and non_indexed_choice
are the user-facing labels
for each choice.
num_case_choices
def num_case_choices() -> int
The number of cases that someone should have to choose between if there are too many. Mostly to limit the amount of up-front waiting someone will have to do.
search_case_by_name
def search_case_by_name(*,
proxy_conn,
var_name: str = None,
court_id: str,
somebody,
filter_fn: Callable[[Any], bool],
roles=None) -> Tuple[bool, DAList]
Searches for cases by party name. If there are more than 10 cases found, we don't add all of the detailed information about the case, just for the first few cases
shift_case_select_window
def shift_case_select_window(proxy_conn,
found_cases: DAList,
*,
direction: str,
start_idx: int,
end_idx: int,
roles: dict = None) -> Tuple[int, int]
Specifically used in case_search.yml, with an action to only fetch a detailed information for a few cases at a time
get_full_court_info
def get_full_court_info(proxy_conn, court_id: str) -> Dict
Gets all of the information about the court from the id
get_max_allowed_sizes
def get_max_allowed_sizes(proxy_conn,
court_id: str) -> Optional[Tuple[int, int]]
Returns attachment max size, then message max size
make_filter
def make_filter(
search: Union[Callable[..., bool], SearchType,
None]) -> Callable[..., bool]
Makes a 'filter' function from some simple type.
Necessary because docassemble doesn't store lambdas and functions well in interview dicts, so the filters need to be set as primitive types and kept that way until the search actually happens (in filter_codes).
filter_codes
def filter_codes(
options: Iterable,
filters: Iterable[Union[Callable[..., bool], SearchType]],
default: str,
exclude: Union[Callable[..., bool], SearchType, None] = None
) -> Tuple[List[Any], Optional[str]]
Given a list of filter functions from most specific to least specific, (if true, use that code), filters a total list of codes. If any codes match the exclude filter, won't use them.
get_available_efile_courts
def get_available_efile_courts(proxy_conn) -> list
Gets the list of efilable courts, if it can