Skip to content

Commit

Permalink
alternative.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Jul 15, 2024
1 parent c41a6eb commit d0b4f78
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
50 changes: 25 additions & 25 deletions tests/data/fixtures/query_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"label": "cisplatin",
"description": null,
"id": "normalize.therapy.rxcui:2555",
"alternateLabels": [
"alternativeLabels": [
"Liplacis",
"cis-diamminedichloroplatinum III",
"APRD00359",
Expand Down Expand Up @@ -3242,7 +3242,7 @@
}
],
"type": "TherapeuticAgent",
"alternateLabels": [
"alternativeLabels": [
"PHENOBARBITAL",
"Phenemal",
"5-Ethyl-5-phenyl-2,4,6(1H,3H,5H)-pyrimidinetrione",
Expand Down Expand Up @@ -3358,7 +3358,7 @@
}
],
"type": "TherapeuticAgent",
"alternateLabels": [
"alternativeLabels": [
"Rovamycin",
"Spiramycin 1",
"Foromacidin A",
Expand All @@ -3381,7 +3381,7 @@
"label": "Therapeutic Procedure",
"description": null,
"id": "normalize.therapy.ncit:C49236",
"alternateLabels": [
"alternativeLabels": [
"Therapeutic Interventions",
"any therapy",
"therapy",
Expand Down Expand Up @@ -3415,7 +3415,7 @@
{
"concept_id": "ncit:C49236",
"label": "Therapeutic Procedure",
"alternateLabels": [
"alternativeLabels": [
"treatment_or_therapy",
"treatment",
"TREAT",
Expand Down Expand Up @@ -3462,7 +3462,7 @@
{
"concept_id": "rxcui:9991",
"label": "spiramycin",
"alternateLabels": [
"alternativeLabels": [
"Spiramycin 1",
"Spiramycin A",
"Foromacidin A",
Expand Down Expand Up @@ -3496,7 +3496,7 @@
{
"concept_id": "ncit:C839",
"label": "Spiramycin",
"alternateLabels": [
"alternativeLabels": [
"(4R,5S,6R,7R,9R,10R,11E,13E,16R)-10-{[(2R,5S,6R)-5-(dimethylamino)-6-methyltetrahydro-2H-pyran-2-yl]oxy}-9,16-dimethyl-5-methoxy-2-oxo-7-(2-oxoethyl)oxacyclohexadeca-11,13-dien-6-yl 3,6-dideoxy-4-O-(2,6-dideoxy-3-C-methyl-alpha-L-ribo-hexopyranosyl)-3-(dimethylamino)-alpha-D-glucopyranoside",
"Rovamycin",
"Rovamycine",
Expand Down Expand Up @@ -3531,7 +3531,7 @@
{
"concept_id": "drugbank:DB06145",
"label": "Spiramycin",
"alternateLabels": [
"alternativeLabels": [
"Spiramycin A",
"Spiramycin I",
"Spiramycin 1",
Expand Down Expand Up @@ -3568,7 +3568,7 @@
{
"concept_id": "chemidplus:8025-81-8",
"label": "Spiramycin",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": [],
"associated_with": ["unii:71ODY0V87H"],
Expand All @@ -3595,7 +3595,7 @@
{
"concept_id": "wikidata:Q422265",
"label": "spiramycin",
"alternateLabels": ["spiramycin I"],
"alternativeLabels": ["spiramycin I"],
"trade_names": [],
"xrefs": [
"chemidplus:8025-81-8",
Expand Down Expand Up @@ -3631,7 +3631,7 @@
{
"concept_id": "rxcui:2555",
"label": "cisplatin",
"alternateLabels": [
"alternativeLabels": [
"DDP",
"CIS-DIAMMINEDICHLOROPLATINUM II",
"CISplatin",
Expand Down Expand Up @@ -3676,7 +3676,7 @@
{
"concept_id": "ncit:C376",
"label": "Cisplatin",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": ["chemidplus:15663-27-1"],
"associated_with": [
Expand Down Expand Up @@ -3707,7 +3707,7 @@
{
"concept_id": "hemonc:105",
"label": "Cisplatin",
"alternateLabels": [
"alternativeLabels": [
"NSC 119875",
"DDP",
"DACP",
Expand Down Expand Up @@ -3767,7 +3767,7 @@
{
"concept_id": "drugbank:DB00515",
"label": "Cisplatin",
"alternateLabels": [
"alternativeLabels": [
"cisplatino",
"cis-diamminedichloroplatinum(II)",
"CDDP",
Expand All @@ -3787,7 +3787,7 @@
{
"concept_id": "drugbank:DB12117",
"label": "Mitometh",
"alternateLabels": ["DDP"],
"alternativeLabels": ["DDP"],
"trade_names": [],
"xrefs": ["chemidplus:107465-03-2"],
"associated_with": [
Expand Down Expand Up @@ -3817,7 +3817,7 @@
{
"concept_id": "drugsatfda.anda:074656",
"label": "CISPLATIN",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": ["rxcui:309311"],
"associated_with": [
Expand All @@ -3833,7 +3833,7 @@
{
"concept_id": "drugsatfda.anda:074735",
"label": "CISPLATIN",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": ["rxcui:309311"],
"associated_with": [
Expand All @@ -3848,7 +3848,7 @@
{
"concept_id": "drugsatfda.anda:075036",
"label": "CISPLATIN",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": ["rxcui:309311"],
"associated_with": [
Expand All @@ -3864,7 +3864,7 @@
{
"concept_id": "drugsatfda.anda:206774",
"label": "CISPLATIN",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": ["rxcui:309311"],
"associated_with": [
Expand All @@ -3881,7 +3881,7 @@
{
"concept_id": "drugsatfda.anda:207323",
"label": "CISPLATIN",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": [],
"xrefs": ["rxcui:309311"],
"associated_with": [
Expand All @@ -3904,7 +3904,7 @@
{
"concept_id": "drugsatfda.nda:018057",
"label": "CISPLATIN",
"alternateLabels": [],
"alternativeLabels": [],
"trade_names": ["PLATINOL-AQ", "PLATINOL"],
"xrefs": ["rxcui:309311", "rxcui:1736854"],
"associated_with": [
Expand Down Expand Up @@ -3939,7 +3939,7 @@
{
"concept_id": "iuphar.ligand:5343",
"label": "cisplatin",
"alternateLabels": ["Platinol"],
"alternativeLabels": ["Platinol"],
"trade_names": [],
"xrefs": [
"chemidplus:15663-27-1",
Expand Down Expand Up @@ -3974,7 +3974,7 @@
{
"concept_id": "chembl:CHEMBL11359",
"label": "CISPLATIN",
"alternateLabels": [
"alternativeLabels": [
"CIS-DDP",
"Cis-diamminedichloroplatinum",
"Peyrone's salt",
Expand Down Expand Up @@ -4983,7 +4983,7 @@
{
"concept_id": "chemidplus:15663-27-1",
"label": "Cisplatin",
"alternateLabels": [
"alternativeLabels": [
"cis-Diaminedichloroplatinum",
"1,2-Diaminocyclohexaneplatinum II citrate"
],
Expand Down Expand Up @@ -5013,7 +5013,7 @@
{
"concept_id": "wikidata:Q412415",
"label": "cisplatin",
"alternateLabels": [
"alternativeLabels": [
"CIS-DDP",
"cis-diamminedichloroplatinum(II)",
"CDDP",
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ def compare_ta(response, fixture, query, match_type, warnings=None):
assert no_matches == [], no_matches
assert len(actual.mappings) == len(fixture.mappings)

assert bool(actual.aliases) == bool(fixture.aliases)
if actual.aliases:
assert set(actual.aliases) == set(fixture.aliases)
assert bool(actual.alternativeLabels) == bool(fixture.alternativeLabels)
if actual.alternativeLabels:
assert set(actual.alternativeLabels) == set(fixture.alternativeLabels)

def get_extension(extensions, name):
matches = [e for e in extensions if e.name == name]
Expand Down

0 comments on commit d0b4f78

Please sign in to comment.