Skip to content

Commit

Permalink
Merge pull request #332 from beawitcht/development
Browse files Browse the repository at this point in the history
update gics
  • Loading branch information
beawitcht authored Nov 7, 2024
2 parents ac6eeb0 + 2eeb3bd commit 8fbfab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/forms/GICs.json
Original file line number Diff line number Diff line change
@@ -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"]]}
{"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"]]}
9 changes: 4 additions & 5 deletions app/scripts/gics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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"]}
Expand Down

0 comments on commit 8fbfab6

Please sign in to comment.