diff --git a/app/forms/GICs.json b/app/forms/GICs.json index 63c67e7..07a5b41 100644 --- a/app/forms/GICs.json +++ b/app/forms/GICs.json @@ -1 +1 @@ -{"GICs": [["Wales", "Welsh Gender Service - Wait time (months): 15"], ["Scotland", "The Edinburgh Chalmers Gender Identity Clinic - Wait time (months): 23"], ["Y-Northern Ireland", "KOI (young people) - Wait time (months): 24"], ["England", "Nottinghamshire Healthcare NHS Foundation Trust The Nottingham Centre for Transgender Health - Wait time (months): 27"], ["Scotland", "Highland Gender Identity Service - Wait time (months): 29"], ["Scotland", "Grampian Gender Identity Clinic - Wait time (months): 34"], ["England", "Northamptonshire Healthcare NHS Foundation Trust Gender Identity Clinic - Wait time (months): 53"], ["Y-Scotland", "The Sandyford NHS Gender Identity Clinic (Young People) - Wait time (months): 58"], ["England", "Leeds and York Partnership NHS Foundation Trust Gender Identity Service - Wait time (months): 58"], ["England", "The\u00a0Tavistock and Portman NHS Foundation Trust: Gender Identity Clinic for Adults - Wait time (months): 61"], ["Scotland", "The Sandyford NHS Gender Identity Clinic (Adults) - Wait time (months): 65"], ["England", "Sheffield Health and Social Care NHS Foundation Trust Gender Identity Service - Wait time (months): 65"], ["Northern Ireland", "Brackenburn Clinic Gender Identity Service - Wait time (months): 75"], ["England", "Devon Partnership NHS Trust West of England Specialist Gender Identity Clinic - Wait time (months): 88"], ["Y-England", "National Referral Support Service - Wait time: Unknown"], ["Y-Wales", "National Referral Support Service - Wait time: Unknown"]]} \ No newline at end of file +{"GICs": [["Scotland", "The Edinburgh Chalmers Gender Identity Clinic - Wait time (months): 15"], ["Y-Northern Ireland", "KOI (young people) - Wait time (months): 24"], ["Wales", "Welsh Gender Service - Wait time (months): 25"], ["England", "Nottinghamshire Healthcare NHS Foundation Trust The Nottingham Centre for Transgender Health - Wait time (months): 26"], ["Scotland", "Highland Gender Identity Service - Wait time (months): 29"], ["Scotland", "Grampian Gender Identity Clinic - Wait time (months): 34"], ["England", "Northamptonshire Healthcare NHS Foundation Trust Gender Identity Clinic - Wait time (months): 57-69"], ["Y-Scotland", "The Sandyford NHS Gender Identity Clinic (Young People) - Wait time (months): 64"], ["England", "Leeds and York Partnership NHS Foundation Trust Gender Identity Service - Wait time (months): 64"], ["England", "Sheffield Health and Social Care NHS Foundation Trust Gender Identity Service - Wait time (months): 65"], ["Scotland", "The Sandyford NHS Gender Identity Clinic (Adults) - Wait time (months): 71"], ["England", "Northumberland, Tyne and Wear NHS Foundation Trust Northern Region\u00a0Gender Dysphoria Service - Wait time (months): 75"], ["England", "The\u00a0Tavistock and Portman NHS Foundation Trust: Gender Identity Clinic for Adults - Wait time (months): 79"], ["Northern Ireland", "Brackenburn Clinic Gender Identity Service - Wait time (months): 85"], ["England", "Devon Partnership NHS Trust West of England Specialist Gender Identity Clinic - Wait time (months): 99"], ["Y-England", "National Referral Support Service - Wait time: Unknown"], ["Y-Wales", "National Referral Support Service - Wait time: Unknown"]]} \ No newline at end of file diff --git a/app/scripts/gics.py b/app/scripts/gics.py index 808c015..a2efd06 100644 --- a/app/scripts/gics.py +++ b/app/scripts/gics.py @@ -77,11 +77,11 @@ async def on_ready(): -# Filter services not taking new referrals from GP/self -invalid_services = ["London TransPlus", "The Northern Hub", "The Southern Hub", "for under 18s, coming soon", "Indigo Gender Service (New style clinic)"] +# Filter services not taking new referrals from GP/self or limited access +invalid_services = ["London TransPlus", "The Northern Hub", "The Southern Hub", "for under 18s, coming soon", "Indigo Gender Service (New style clinic)", "Sussex Gender Service (Pilot clinic)"] options = [gic for gic in options if all(service not in gic[1] for service in invalid_services)] # filter out < > from options -options = [(country, re.sub(r'<|>', '', option)) for country, option in options] +options = [(country, re.sub(r'<|>|\*', '', option)) for country, option in options] # Add NRSS or the very concise name: NATIONAL REFERRAL SUPPORT SERVICE FOR THE NHS GENDER INCONGRUENCE SERVICE FOR CHILDREN AND YOUNG PEOPLE options.append(("Y-England", f"National Referral Support Service - Wait time: Unknown")) @@ -92,10 +92,9 @@ async def on_ready(): new_options = {"GICs": options} new_options = json.dumps(new_options) -with open(path / 'forms' / 'GICs.json') as f: +with open(path / 'forms' / 'GICs.json', encoding="utf-8") as f: old_options = json.loads(f.read()) - # Compare items with the same name in the diff old_options_dict = {item[1].split(" - ")[0]: item for item in old_options["GICs"]} new_options_dict = {item[1].split(" - ")[0]: item for item in json.loads(new_options)["GICs"]}