(
    repeater: OpenmrsRepeater,
    patient_uuid: str,
)
return case_block.case_id, case_block.owner_id, case_block
If a case exists with external_id == patient_uuid, returns its
    case_id, owner_id, and None. Otherwise returns the case_id, owner_id
    and case block for a new case.
If a case exists with external_id == patient_uuid, returns its
    case_id, owner_id, and None. Otherwise returns the case_id, owner_id
    and case block for a new case.
If a case exists with external_id == patient_uuid returns its case_id owner_id and None . Otherwise returns the case_id owner_id and case block for a new case .
def get_case_id_owner_id_case_block(
    repeater: OpenmrsRepeater,
    patient_uuid: str,
) -> Tuple[Optional[str], Optional[str], Optional[CaseBlock]]:
    """
    If a case exists with external_id == patient_uuid, returns its
    case_id, owner_id, and None. Otherwise returns the case_id, owner_id
    and case block for a new case.
    """
    # NOTE: Atom Feed integration requires Patient UUID to be external_id
    case = get_case(repeater, patient_uuid)
    if case:
        return case.case_id, case.owner_id, None
    if not repeater.openmrs_config.case_config.import_creates_cases:
        # We cannot create new cases for patients in the Atom feed.
        return None, None, None
    case_block = create_case(repeater, patient_uuid)
    return case_block.case_id, case_block.owner_id, case_block
def get_case_id_owner_id_case_block ( repeater : OpenmrsRepeater , patient_uuid : str , ) -> Tuple [ Optional [ str ] , Optional [ str ] , Optional [ CaseBlock ] ] : # NOTE: Atom Feed integration requires Patient UUID to be external_id case = get_case ( repeater , patient_uuid ) if case : return case . case_id , case . owner_id , None if not repeater . openmrs_config . case_config . import_creates_cases : # We cannot create new cases for patients in the Atom feed. return None , None , None case_block = create_case ( repeater , patient_uuid ) return case_block . case_id , case_block . owner_id , case_block