"""
This script was produced to handle the non-standard outcomes, observed in the LHP outcomes sheet
"""
import numpy as np

outcomes_values = [
    "Access Issues", "No Outcome", "Asked for a later date", "Customer Refusal",
    "Installer Refusal", "No Answer", "Not Viable", "Surveyed",
    "Rescheduled", "Not Knocked", "Void"
]

outcomes_map = {
    'Access issues, shed against rear wall. Sent photos to Matt JJC, declined': 'Access Issues',
    'NO ANSWER /TICKET LEFT': 'No Answer',
    'Looks Void - No Answer': 'No Answer',
    'No Answer - they were in - No response to my drop card': 'No Answer', 'No Answer': 'No Answer',
    'No Answer - Even they were in - No response to my drop card': 'No Answer', 'no answer': 'No Answer',
    'NO ANSWER': 'No Answer', 'No answer': 'No Answer',
    np.nan: 'unknown',
    'Access Issues Health reasons try another time': 'Access Issues',
    'LOFT FULL, CUSTOMER WONT REMOVE': 'Access Issues',
    'Failed Appointment - Ivy': 'Access Issues',
    'Failed Appointment - Void soon': 'Void',
    'Hoarding in loft': 'Access Issues',
    'Non Complained - Extension at rear and side': 'Not Viable',
    'Said No letter - then texted me I can only do outside but cant come in': 'Customer Refusal',
    'Hoarding - unwilling to shift from loft': 'Customer Refusal',
    'Overgrown vegatation - Happy for HA to deal with': 'Access Issues',
    'No access to side of property': 'Not Viable',
    'Very rude': 'Customer Refusal',
    'REFUSED ACCESS': 'Customer Refusal',
    'SURVEYED': 'Surveyed',
    'ELECTRIC ROOM HEATERS. Kieran to check re funding and possible PV?': 'Not Viable',
    'SUBMITTED': 'Surveyed',
    '2 single storey extensions': 'Not Viable',
    'Rebook': 'Rescheduled',
    'surveyed': 'Surveyed',
    'not intrested': 'Customer Refusal',
    'Fixed seating area against rear elevation': 'Not Viable',
    "Matt said can't install": 'Installer Refusal',
    'Gave excuses to come this and that time and no reponse': 'No Answer',
    'NOT KNOCKED': 'Not Knocked',
    'VOID PROPERTY': 'Void',
    'Glass lean to. JJC declined': 'Installer Refusal',
    'Left slip Overgrown vegatation': 'No Answer',
    'covid': 'Rescheduled',
    'Lean-to on side elevation': 'Not Viable',
    'Opted out as moving out': 'Customer Refusal',
    'Surveyed': 'Surveyed',
    'refused': 'Customer Refusal',
    'COVID': 'Rescheduled',
    'Said No letter received and didn’t answer again': 'No Answer',
    'Survey completed': 'Surveyed',
    'Loft fully boarded': 'Access Issues',
    'Not Available during the day': 'No Answer',
    'Conservatory. JJC declined.': 'Installer Refusal',
    'Booked for 19.10.23': 'Rescheduled',
    'LETTER LEFT': 'No Answer',
    'Knocked/lettered': 'No Answer',
    'Survey Complete': 'Surveyed',
    'Refused by calling office': 'Customer Refusal',
    'Extension on rear elevation': 'No Viable',
    'Left Slip - Potential access issue with conservatory': 'Access Issues',
    'Overgrown vegatation': 'Access Issues',
    'Left slip Overgrown Ivy and Hedge': 'No Answer',
    'NOT AVAILABLE THIS WEEK': 'No Answer',
    'Unwilling to clear loft': 'Access Issues',
    'survey complete': 'Surveyed',
    'ivy on wall': 'Access Issues',
    'not in': 'No Answer',
    'Covid shrub very close to building': 'Rescheduled',
    'ON HOLIDAY, UNDER 18 IN HOUSE': 'Rescheduled',
    'wont do as extention': 'Not Viable',
    'IN, WONT ANSWER': 'Customer Refusal',
    'Too many plants next to the walls': 'Access Issues',
    'obstructions': 'Access Issues',
    'Left slip -Wall plant': 'Access Issues',
    'On holiday': 'No Answer',
    'Failed appointment': 'No Answer',
    'LOFT FULLY BOARDED': 'Access Issues',
    'ivy and didn’t want people inside the house': 'Customer Refusal',
    'Partly IWI': 'Not Viable',
    'Covid': 'Rescheduled',
    'REFUSE TO REMOVE IVY': 'Access Issues',
    'Insulated 2 years ago. Carbon bead in walls, 300mm rock wool in loft': 'Not Viable',
    'INCONVIENIENT TIME': 'No Answer',
    'EXT TO REAR': 'Not Viable',
    'Not In': 'No Answer',
    'Damp issues.Black mould on walls': 'Access Issues',
    'Lean to. JJC declined': 'Installer Refusal',
    'DISABLED CHILD / INCONVIENIENT': 'Customer Refusal',
    'Plants on wall': 'Access Issues',
    'Left Slip': 'No Answer',
    'Never answered': 'No Answer',
    'SOLAR PV CONNECTED TO MAINS': 'Not Viable',
    'Bungalow': 'unknown',
    'call back': 'No Answer',
    'Message from WFT OFFICE; tenant unavailable this week, no telephone number provided': 'Rescheduled',
    'LEAN TO PRESENT': 'Not Viable',
    'She said come Tuesday and never answered': 'Rescheduled',
    'Sold': 'Surveyed',
    'Too much mould and cluttered house': 'Access Issues',
    'Overgrown vegatation will call when clear': 'Access Issues',
    'LOFT DEC 2013': 'Not Viable',
    'Ivy': 'Access Issues',
    'Booked for next week': 'Rescheduled',
    'empty': 'Void',
    'Been told property is empty as tenant has passed away': 'Void',
    'Non Complianced - Single Storey Extension to the front and rear': 'Not Viable',
    'Going back this week': 'Rescheduled',
    'Loft insulated in last few months. Ongoing damp issues in bathroom, black mould up wall': 'Access Issues',
    'rear Extension': 'Not Viable',
    'DECKING AROUND PROPERTY IN BREACH OF DPC BY 300MM': 'Not Viable',
    'Said no letter received': 'Customer Refusal',
    'Unwell, not convenient this week': 'Rescheduled',
    'IVY on Wall': 'Access Issues',
    'REFUSED EXTRACTOR': 'Customer Refusal',
    'ON HOLIDAY': 'Rescheduled',
    'COVID. Not this week.': 'Rescheduled',
    'COVID POSITIVE': 'Rescheduled',
    'VOID. Appears to be under refurbishment': 'Void',
    'Survey Completed': 'Surveyed',
    'INCONVIENIENT': 'Rescheduled',
    'Knocked/lettered. 07598 112360': 'No Answer',
    'Single skin lean to. JJC declined': 'Installer Refusal',
    'DENIES LETER, REFUSED ACCESS': 'Customer Refusal',
    'Loft hoard unable to clear': 'Access Issues',
    'Left Slip - Look Void': 'Void',
    'EXCESSIVE IVY GROWTH, CUSOMER UNABLE TO REMOVE, ELDERLEY': 'Access Issues',
    'Refused': 'Customer Refusal',
    'REFUSED / INCONVENIENT': 'Customer Refusal',
    'AGGRESSIVE DOGS LOOSE IN FRONT GARDEN': 'Access Issues',
    'EXCESSIVE IVY': 'Access Issues',
    "Won't remove plastic roof": 'Access Issues',
    'SURVEY COMPLETED': 'Surveyed',
    'VOID. Under refurbishment. Electric storage heating currently removed for refurbishment': 'Void',
    'Surveyed ECO4': 'Surveyed',
    'after 5.30': 'Rescheduled',
    'CUSTOMER IN, WONT ANSWER DOOR': 'No Answer',
    'IVY': 'Access Issues',
    'Single storey extension on gable': 'Not Viable',
    'No answer.': 'No Answer',
    'Full extension at rear. Not viable.': 'Not Viable',
    'Access issues': 'Access Issues',
    'VOID PROPERTY NOW': 'Void',
    'Not viable': 'Not Viable',
    'Looks like a VOID property': 'Void',
    'NOT VIABLE': 'Not Viable',
    'No Answer.': 'No Answer',
    'Not viable.': 'Not Viable',
    'Looks to be void.': 'Void',
    'Access issues and loft fully boarded/full': 'Access Issues',
    'Extension on property. Not Viable': 'Not Viable',
    'No good. Serious Access issues.': 'Access Issues',
    'Surveyed and Submitted': 'Surveyed',
    'UNSANITARY CONDITIONS, RUBBISH EVERYWHERE': 'Access Issues',
    'Will call when rubbish removed.': 'Access Issues',
    'Covered in Ivy': 'Access Issues',
    'CUSTOMER REFUSED': 'Customer Refusal',
    'Still covered in ivy': 'Access Issues',
    'CUSTOMER SHOUTED OUT OF WINDOW TO COME BACK ANOTHER TIME': 'Customer Refusal',
    "Extension on property, can't be done.": 'Not Viable',
    'Will be looking to do Survey WC 19.02': 'Rescheduled',
    "Tenant was working, couldn't do survey.": 'No Answer',
    'PROPERTY EMPTY, SPOKE TO EX TENNANT WHO LEFT 3 WEEKS AGO?': 'Void',
    'Will call back.': 'Rescheduled',
    "Tenant not interested. Won't empty loft.": 'Customer Refusal',
    "Won't answer door.": 'Customer Refusal',
    "Tenant 'Doesn't want anything to do with LHP'": 'Customer Refusal',
    "Loft full. Tenant won't empty.": 'Access Issues',
    'Covered in foliage': 'Access Issues',
    'Customer not home for appointment.': 'No Answer',
    'Blown in bead': 'Not Viable',
    'Distance to property to far from road.': 'Access Issues',
    'LOFT FULL, CUSTOMER UNABLE TO CLEAR': 'Access Issues',
    'Stuff against rear wall. Will call when removed.': 'Access Issues',
    'Will call when rubbish is removed': 'Access Issues',
    'Mid Terrace': 'unknown',
    'Tile Hung areas.': 'Not Viable',
    'REFUSED / UNABLE TO CLEAR LOFT': 'Customer Refusal',
    'Calling back on Monday (19.02)': 'Rescheduled',
    'Solid Wall': 'Not Viable',
    'FAULTY PHONE NUMBER, 3 X KNOCK, LETTER LEFT ON FIRST ATTEMPT, NO REPLY OR CALL BACK': 'No Answer',
    'Not interested': 'Customer Refusal',
    'ACCESS DENIED': 'Customer Refusal',
    'Covered in Ivy.': 'Access Issues',
    'UNABLE TO GENERATE SAP GAIN WITH EXTENSIONS FRONT AND REAR': 'Not Viable',
    'Extension on the property.': 'Not Viable',
    "Covered in Ivy. Can't remove it.": 'Access Issues',
    'Booked in, but not in when called back': 'No Answer',
    'EXCESSIVE IVY ON WALLS (SEE PICS)': 'Access Issues',
    'Moved out': 'Void',
    'Buying the property. Not interested.': 'Customer Refusal',
    'Not been to yet': 'No Answer',
    'CUSTOMER STATES LOFT WAS INSULATED A FEW MONTHS AGO BY LHP': 'Customer Refusal',
    'Will try again.': 'No Answer',
    'HOUSE MARTINS NESTING IN EAVES OF 3 ADJOINING PROPERTIES': 'Access Issues',
    'Told me to call back': 'Rescheduled',
    'CUSTOMER SAYS PROPERTY ALREADY REFUSED AT PREVIOUS SURVEY, NO REASON GIVEN': 'Customer Refusal',
    "Won't answer the door.": 'Customer Refusal',
    'Tenant not interested.': 'Customer Refusal',
    'Keep trying, keeps putting me off.': 'Customer Refusal',
    'Already insulated.': 'Not Viable',
    'Works all day.': 'No Answer',
    'PROPERTY COVER IN FOILAGE AND SHRUBS': 'Access Issues',
    'ACCESS IVY GROWTH, LEAN TO / CONSERVATORY IN WAY OF REAR': 'Not Viable',
    "Tenant unwell. Doesn't want survey.": 'No Answer',
    'Wont empty loft.': 'Access Issues',
    'LOFT FULLY BOARDED AS PREVIOUSLY DISCUSSED WITH CUSTOMER BY PREVIOUS SURVEYOR': 'Access Issues',
    "Property can't be done.": 'Not Viable',
    'Works everyday. Will call.': 'No Answer',
    'A LOT OF FOLIAGE IN WAY, PROPERTY LOOKS EMPTY FROM OUTSIDE?': 'Void',
    "Very old tenant. Said they didn't want it.": 'Customer Refusal',
    'Covered in ivy. Unable to remove.': 'Access Issues',
    'Climbers on walls': 'Access Issues',
    'Will not remove foliage': 'Access Issues',
    'Not Interested.': 'Customer Refusal',
    'OFF GAS': 'unknown',
    'Tenant not interested': 'Customer Refusal',
    'Will call me. Left my number.': 'Rescheduled',
    'Keep trying but keeps putting me off': 'Customer Refusal',
    'Moving out.': 'Void',
    'Booked in': 'Recheduled',
    'Refused Survey': 'Customr Refusal',
    'Big dogs running around front garden.': 'Access Issues',
    'CUSTOMER HAS CLADDED WALL AT REAR IN CONSERVATORY, REFUSED INTERNAL DRILL': 'Customer Refusal',
    'Booked in.': 'Rescheduled',
    'WRONG ADDRESS?': 'unknown',
    'Works everyday. Will call me.': 'No Answer',
    'Will not remove foliage.': 'Access Issues'
}
