We're updating the issue view to help you get more done. 

Sometimes patients are included twice in the XLS/JSON export

Description

See the following output. Happens when selecting "Pain" and "Microcephaly" as filtered phenotypes. The count is also wrong (3 matching records). Probably missing a distinct in the query.

`
[
{
"features": [
{
"id": "HP:0000925",
"label": "Abnormality of the vertebral column",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0012533",
"label": "Allodynia",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0007018",
"label": "Attention deficit hyperactivity disorder",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0000518",
"label": "Cataract",
"type": "phenotype",
"observed": "no"
},
{
"id": "HP:0000589",
"label": "Coloboma",
"type": "phenotype",
"observed": "yes",
"qualifiers": [
{
"id": "HP:0003581",
"label": "Adult onset",
"type": "age_of_onset"
},
{
"id": "HP:0012834",
"label": "Right",
"type": "laterality"
},
{
"id": "HP:0012825",
"label": "Mild",
"type": "severity"
}
]
},
{
"id": "HP:0001249",
"label": "Intellectual disability",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0003010",
"label": "Prolonged bleeding time",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0000407",
"label": "Sensorineural hearing impairment",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0001518",
"label": "Small for gestational age",
"type": "prenatal_phenotype",
"observed": "yes"
}
],
"nonstandard_features": [],
"disorders": [
{
"id": "MIM:129500",
"label": "#129500 CLOUSTON SYNDROME ;;ECTODERMAL DYSPLASIA 2, CLOUSTON TYPE; ECTD2;; ECTODERMAL DYSPLASIA, HIDROTIC, AUTOSOMAL DOMINANT;; CLOUSTON HIDROTIC ECTODERMAL DYSPLASIA;; ECTODERMAL DYSPLASIA, HIDROTIC, 2, FORMERLY; HED2, FORMERLY"
},
{
"id": "MIM:600628",
"label": "600628 LOOSE ANAGEN HAIR SYNDROME"
}
],
"sex": "F",
"external_id": "P1",
"family_history": {},
"date_of_birth": "2002-09-19",
"clinicalStatus": {
"clinicalStatus": "affected"
},
"report_id": "P0000001",
"referrer": "Administrator",
"date": "01/15/2015",
"last_modified_by": "Administrator",
"last_modification_date": "01/15/2015"
},
{
"features": [
{
"id": "HP:0000252",
"label": "Microcephaly",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0012531",
"label": "Pain",
"type": "phenotype",
"observed": "yes"
}
],
"nonstandard_features": [],
"sex": "M",
"external_id": "P2",
"family_history": {},
"clinicalStatus": {
"clinicalStatus": "affected"
},
"report_id": "P0000002",
"referrer": "Administrator",
"date": "01/15/2015",
"last_modified_by": "Administrator",
"last_modification_date": "01/15/2015"
},
{
"features": [
{
"id": "HP:0000252",
"label": "Microcephaly",
"type": "phenotype",
"observed": "yes"
},
{
"id": "HP:0012531",
"label": "Pain",
"type": "phenotype",
"observed": "yes"
}
],
"nonstandard_features": [],
"sex": "M",
"external_id": "P2",
"family_history": {},
"clinicalStatus": {
"clinicalStatus": "affected"
},
"report_id": "P0000002",
"referrer": "Administrator",
"date": "01/15/2015",
"last_modified_by": "Administrator",
"last_modification_date": "01/15/2015"
}
]

Environment

None

Status

Assignee

SergiuD

Reporter

Sergiu Dumitriu

Labels

External issue ID

1373

External issue ID

None

Fix versions

Priority

Medium