Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Mar 5, 2024
1 parent 5fef844 commit ea02b05
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
2 changes: 1 addition & 1 deletion apps/nar-v3/src/components/DatasetCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function SubjectCard(props) {
<dd>{subject.studiedState[0].ageCategory}</dd>
<dt>Pathologies</dt>
<dd>
{subject.studiedState[0].pathology
{subject.studiedState[0].pathology.length > 0
? subject.studiedState[0].pathology[0].name
: "none"}
</dd>
Expand Down
3 changes: 2 additions & 1 deletion apps/nar-v3/src/datastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class DataStore {
"patch clamp recordings summary": {},
"patch clamp recordings detail": {}
};
this.cache["datasets detail"][uuidFromUri(examplePatchClampData["@id"])] = examplePatchClampData;
//this.cache["datasets detail"][uuidFromUri(examplePatchClampData["@id"])] = examplePatchClampData;
this.cache["datasets detail"]["example"] = examplePatchClampData;
}

buildRequestConfig(method="GET", body={}) {
Expand Down
45 changes: 33 additions & 12 deletions apps/nar-v3/src/routes/dataset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const actorQuery = [
S("givenName"),
S("familyName"),
S("fullName"),
S("shortName")
]
S("shortName"),
];

const MULTIPLE = { expectSingle: false };

const query = buildKGQuery("core/DatasetVersion", [
S("@id"),
Expand All @@ -31,23 +33,20 @@ const query = buildKGQuery("core/DatasetVersion", [
L("ethicsAssessment/name"),
L("license/shortName"),
S("releaseDate"),
L("custodian", actorQuery, { expectSingle: false }),
L("author", actorQuery, { expectSingle: false }),
L("custodian", actorQuery, MULTIPLE),
L("author", actorQuery, MULTIPLE),
R("isVersionOf", "hasVersion", [
S("fullName"),
S("description"),
S("shortName"),
L("custodian", actorQuery, { expectSingle: false }),
L("author", actorQuery, { expectSingle: false }),
L("custodian", actorQuery, MULTIPLE),
L("author", actorQuery, MULTIPLE),
]),
L(
"studiedSpecimen",
[
S("lookupLabel"),
L("species", [
S("name"),
L("species/name")
]),
L("species", [S("name"), L("species/name")]),
L("biologicalSex/name"),
L(
"studiedState",
Expand All @@ -62,9 +61,31 @@ const query = buildKGQuery("core/DatasetVersion", [
L("maxValueUnit/name"),
]),
L("ageCategory/name"),
L("pathology", [], { expectSingle: false }),
L("pathology", [S("name")], MULTIPLE),
R(
"slicePreparation",
"input",
[
// slice preparation
S("lookupLabel"),
S("@type"),
L("device", []),
L("studyTarget/name", [], MULTIPLE),
L("temperature", [S("name"), L("unit/name")]),
L("tissueBathSolution", [S("name"), L("hasPart", [], MULTIPLE)]),
L(
"output",
[
// slices
S("lookupLabel"),
],
MULTIPLE
),
],
MULTIPLE
),
],
{ expectSingle: false }
MULTIPLE
),
],
{ type: "core/Subject", expectSingle: false }
Expand Down

0 comments on commit ea02b05

Please sign in to comment.