Determine which client->primaryCoverage to use 

if there is latest_manual_client_primary_coverage_id  and its not cancelled use it 
else:
    if there is latest_auto_refresh_client_primary_coverage_id and latest_new_client_primary_coverage_id use the latest 
    else use whichever is there 
    else
        no coverage 

TEST CASE
    - create a new client 
    - add manual coverage 
    - cancel manual coverage 
    - add new coverage 
    - auto refresh the new coverage 
    - add another new 


=====================
- add new (automatically when you create a client ), or when you go Primary Coverage -> Add +
- go  primary coverage, on an exising coverage, do manual determination 
- go to primary coverage, on an existing coverage, click refresh 


client->getPrimaryCoverage(); //Already done 
TODO: use this everywhere on the ui NO $client->latestClientPrimaryCoverage

1. header blade 
2. thin blade to be used for tables

How to display on the header and table columns
- is client covered  
        $coverage->is_covered
        - Medicare 
            IF AUTO/NEW
                autoMedicareIsPartBActive;
                autoMedicareIsPartBPrimary;
                autoMedicareIsPartCActive;
                autoMedicareIsInpatient;
                autoMedicareIsHospiceOrHomeHealth;
                autoMedicareMpbRemaining
            IF MANUAL 
                manualDeterminationCategory
                manualMedicareIsPartBActive
                manualMedicareIsPartBPrimary
                manualMedicareIsPartCActive
                manualMedicareIsInpatient
                manualMedicareIsHospiceOrHomeHealth
                manualMedicareIsMsp
                manualMedicareMspMemo
        - Commercial
                commercialPayerUid;
                commercialPayerName;
                **commercialMemberIdentifier;
                **commercialGroupNumber;
                **mcrNumber;
                mcdPayerName;
                **mcdNumber;
            IF AUTO/NEW
                autoCommercialIsMatchFound;
                autoCommercialMoreSpecificPayerId; //gives official commerical name 
                if has medicare 
                    autoMedicareIsMatchFound
                    autoMedicareIsPartBActive;
                    autoMedicareIsPartBPrimary;
                    autoMedicareIsPartCActive;
                    autoMedicareIsInpatient;
                    autoMedicareIsHospiceOrHomeHealth;
                    mpbRemaining 
                if has medicaid 
                    autoMedicaidIsMatchFound

            IF MANUAL 
                manualDeterminationCategory
                manualCommercialIsMatched
                if has medicare 
                    manualMedicareIsMatched
                    manualMedicareIsPartBActive
                    manualMedicareIsPartBPrimary
                    manualMedicareIsPartCActive
                    manualMedicareIsInpatient
                    manualMedicareIsHospiceOrHomeHealth
                    manualMedicareIsMsp
                    manualMedicareMspMemo
                if has medicaid 
                    manualMedicaidIsMatched;

        - Medicaid 
            mcdPayerName;
		    mcdNumber;
            IF AUTO/NEW
                autoMedicaidIsMatchFound
            IF MANUAL
                manualDeterminationCategory
                manualMedicareIsMatched


 
    latest_auto_refresh_client_primary_coverage_id //latest after refresh
    latest_client_primary_coverage_id //lastest after manual or refresh
    latest_manual_client_primary_coverage_id //latest after manual
    latest_new_client_primary_coverage_id /latest after a client has just been created, always the latest client_primary_coverage, 

How to display on client primary coverage section
on coverage section show 3 tabs with all the columns 
    latest_manual_client_primary_coverage_id //latest after manual
    latest_auto_refresh_client_primary_coverage_id //latest after refresh
    latest_new_client_primary_coverage_id
- Highlight the one that is currently in use 

auto_medicare_detail_json
auto_commercial_detail_json
auto_medicaid_detail_json



client 
    is_hospice
    is_mcn_valid_number
    is_medicare_advantage
    is_part_b_primary
    mcn
    mcn_address_city
    mcn_address_state
    mcn_address_street_line1
    mcn_address_street_line2
    mcn_address_zip
    mcn_error_details
    mcn_follow_up_action_code
    mcn_follow_up_action_description
    mcn_reject_reason_code
    mcn_reject_reason_description
    mcn_response_detail
    medicare_advantage_plan
    mother_maiden_name
    was_medicare_validation_successful
    is_coverage_manually_verified
    coverage_manual_verification_memo
    latest_eligible_refresh_id
    latest_eligible_refresh_at
    mpb_active
    mpb_start_date
    mpb_end_date
    mpb_deductible
    mpb_remaining
    mpb_insurance_type
    mpb_insurance_type_label
    mpb_coinsurance_percent
    mpb_info_valid_until
    mpb_info_valid_till
    mpb_last_refreshed_atpayer_name
    payer_name
    payer_member_id
    non_mc_primary_payer_id
    non_mc_secondary_payer_id
    latest_auto_refresh_client_primary_coverage_id
    latest_client_primary_coverage_id
    latest_manual_client_primary_coverage_id
    latest_new_client_primary_coverage_id
    temporary_outsider_new_client_primary_coverage_id
    is_auto_part_b_primary



client_primary_coverage
    client_id
    creation_strategy
    auto_refresh_of_client_primary_coverage_id
    manual_determination_of_client_primary_coverage_id
    plan_type
    is_partbprimary
    is_manually_determined
    is_entry_error
    subscriber_name_first
    subscriber_name_last
    subscriber_sex
    subscriber_dob
    date_of_service
    auto_medicare_is_partbprimary
    auto_medicare_is_partbactive
    auto_medicare_is_partcactive
    auto_medicare_is_inpatient
    auto_medicare_is_hospice_or_home_health
    auto_medicare_is_msp
    auto_medicare_msp_memo
    auto_medicare_mpb_start_date
    auto_medicare_mpb_end_date
    auto_medicare_mpb_deductible
    auto_medicare_mpb_remaining
    auto_medicare_mpb_insurance_type
    auto_medicare_mpb_insurance_type_label
    auto_medicare_mpb_coinsurance_percent
    auto_medicare_mpb_info_valid_until
    auto_medicare_mpb_info_valid_till
    auto_medicare_mpb_last_refreshed_at
    was_successful
    reject_reason_code
    reject_reason_description
    follow_up_action_code
    follow_up_action_description
    details
    is_mcn_valid_number
    address_street_line1
    address_street_line2
    address_city
    address_state
    address_zip
    is_hospice
    mcn_response_detail
    billing_address
    reason_not_partb
    reason_not_partbmemo
    is_medicare_advantage
    medicare_advantage_plan
    mpb_active
    mpb_start_date
    mpb_end_date
    mpb_deductible
    mpb_remaining
    mpb_insurance_type
    mpb_insurance_type_label
    mpb_coinsurance_percent
    mpb_info_valid_until
    mpb_info_valid_till
    mpb_last_refreshed_at
    manual_determination_strategy
    manual_determination_category
    manual_determination_category_memo
    manual_medicare_is_partbprimary
    manual_medicare_is_partbactive
    manual_medicare_is_partcactive
    manual_medicare_is_inpatient
    manual_medicare_is_hospice_or_home_health
    manual_medicare_is_msp
    manual_medicare_msp_memo
    auto_medicare_result_id
    mcd_number
    mcr_number
    subscriber_name_middle
    subscriber_name_suffix
    auto_commercial_detail_json
    auto_commercial_is_match_found
    auto_commercial_more_specific_payer_id
    auto_medicaid_detail_json
    auto_medicaid_is_match_found
    auto_medicare_is_match_found
    commercial_member_identifier
    commercial_payer_id
    commercial_payer_name
    is_partcactive
    is_patient_subscriber
    manual_medicaid_is_matched
    manual_medicare_is_matched
    mcd_payer_id
    patient_dob
    patient_name_first
    patient_name_last
    patient_name_middle
    patient_name_suffix
    patient_relationship_to_subscriber
    patient_sex
    commercial_group_number
    auto_medicare_detail_json
    is_covered
    last_updated_at
    deductible_amount
    family_deductible
    member_accumulated_total
    plan_description
    plan_effective_date
    provider_status
    total_family_balance
    total_individual_balance
    mental_health_coverage
    telehealth_coverage
    cancellation_memo
    cancelled_at
    cancelled_by_session_id
    is_cancelled


    medicare
    medicaid 
    commercial
