You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def all_unique(x):
x=list(x)
return len(set(x)) == len(x)
ids = [p.id for p in phenos]
us_ids = [urllib.parse.quote_plus(p.id) for p in phenos]
dns = [p.displayname for p in phenos]
assert all_unique(ids)
assert all_unique(us_ids)
assert all_unique(dns)
assert all(id == dn or id not in dns for id,dn in zip(ids,dns))
assert all(us_id == dn or us_id not in dns for us_id,dn in zip(us_ids,dns))
Replace --simple-phenocode with --simple-id.
When anything except phenolist.py loads pheno-list.json,
if 'displayname' not in p: p['displayname'] = p['id']
p['id'] = urllib.parse.quote_plus(p['id'])
It's unfortunate that id will mean slightly different things in different parts of PheWeb, but that shouldn't be a problem I hope.
In typeahead, use {value:p.displayname, display:p.displayname, url:'/pheno/'+p.id} and {value:p.id, display:p.id, url:'/pheno/'+p.id}.
In icd9-phewas, we'll have {id:'008.2', displayname:'infection diseases', icd9_phewas_id:'008.2'}. pheno/h1.html will recognize icd9_phewas_id and display it.
The text was updated successfully, but these errors were encountered:
Replace
--simple-phenocode
with--simple-id
.When anything except
phenolist.py
loadspheno-list.json
,if 'displayname' not in p: p['displayname'] = p['id']
p['id'] = urllib.parse.quote_plus(p['id'])
id
will mean slightly different things in different parts of PheWeb, but that shouldn't be a problem I hope.In typeahead, use
{value:p.displayname, display:p.displayname, url:'/pheno/'+p.id}
and{value:p.id, display:p.id, url:'/pheno/'+p.id}
.In icd9-phewas, we'll have
{id:'008.2', displayname:'infection diseases', icd9_phewas_id:'008.2'}
.pheno/h1.html
will recognizeicd9_phewas_id
and display it.The text was updated successfully, but these errors were encountered: