Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create generateLecternJsonFromCustomLinkml.py #18

Merged
merged 4 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions custom/example/example_full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,13 @@ slots:
* PipelineF\n"
title: Image Processing Pipeline
range: ImageProcessPipelineMenu
image_number:
name: image_number
description: "A number example for image"
title: Image Number
range: integer
multivalued: true
required: true
image_processing_personel:
name: image_processing_personel
description: 'String value for the person who processed the image.
Expand Down Expand Up @@ -1820,6 +1827,7 @@ classes:
- image_processing_pipeline
- image_processing_personel
- image_processing_null_reason
- image_number
slot_usage:
image_hosted_url:
name: image_hosted_url
Expand All @@ -1841,6 +1849,10 @@ classes:
name: image_processing_null_reason
rank: 5
slot_group: Extended Imaging
image_number:
name: image_number
rank: 6
slot_group: Extended Imaging
rules:
- preconditions:
description: 'An example of if value==''A'' must follow enum
Expand Down
216 changes: 188 additions & 28 deletions lectern/example/example_lectern.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "1.0",
"schemas": [
{
"name": "Comorbidity",
"name": "comorbidity",
"description": "TBA...",
"fields": [
{
Expand Down Expand Up @@ -99,10 +99,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Demographic",
"name": "demographic",
"description": "Data for the characterization of the participant by means of segmenting the population (e.g., characterization by age, sex, or race).",
"fields": [
{
Expand Down Expand Up @@ -352,10 +365,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Diagnosis",
"name": "diagnosis",
"description": "The disease that is inferred to be present in the individual, family or cohort being analyzed.",
"fields": [
{
Expand Down Expand Up @@ -402,7 +428,8 @@
"required": true,
"regex": "^[A-Za-z0-9\\-\\._]{1,64}$"
},
"valueType": "string"
"valueType": "string",
"unique": true
},
{
"meta": {
Expand Down Expand Up @@ -506,10 +533,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Exposure",
"name": "exposure",
"description": "TBA...",
"fields": [
{
Expand Down Expand Up @@ -594,10 +634,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Follow_up",
"name": "follow_up",
"description": "Any point of contact with a patient after primary diagnosis. ",
"fields": [
{
Expand Down Expand Up @@ -653,10 +706,23 @@
},
"valueType": "string"
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Measurement",
"name": "measurement",
"description": "Record individual measurements to capture quantitative, ordinal (e.g., absent/present), or categorical measurements.",
"fields": [
{
Expand Down Expand Up @@ -738,10 +804,23 @@
"description": "The categorical result of the lab test or measurement.",
"valueType": "string"
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Medication",
"name": "medication",
"description": "An agent such as a drug (pharmaceutical agent), broadly defined as prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies.",
"fields": [
{
Expand Down Expand Up @@ -820,10 +899,23 @@
"description": "Indicate the total actual cumulative drug dose in the same units specified in drug_dose_units.",
"valueType": "number"
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "treatment",
"mappings": [
{
"local": "submitter_treatment_id",
"foreign": "submitter_treatment_id"
}
]
}
]
}
},
{
"name": "Participant",
"name": "participant",
"description": "The collection of all data related to a specific individual human in the context of a specific study.",
"fields": [
{
Expand Down Expand Up @@ -862,7 +954,8 @@
"required": true,
"regex": "^[A-Za-z0-9\\-\\._]{1,64}"
},
"valueType": "string"
"valueType": "string",
"unique": true
},
{
"meta": {
Expand Down Expand Up @@ -926,7 +1019,7 @@
]
},
{
"name": "Phenotype",
"name": "phenotype",
"description": "Individual phenotypic features, observed as either present or absent (excluded), with possible onset, modifiers and frequency",
"fields": [
{
Expand Down Expand Up @@ -1028,10 +1121,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Procedure",
"name": "procedure",
"description": "A clinical procedure performed on a subject. For example a surgical or diagnostic procedure such as a biopsy.",
"fields": [
{
Expand Down Expand Up @@ -1104,10 +1210,23 @@
"description": "Provide the standardized and human readable term derived from the coding system associated with the procedure_body_site_code",
"valueType": "string"
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "treatment",
"mappings": [
{
"local": "submitter_treatment_id",
"foreign": "submitter_treatment_id"
}
]
}
]
}
},
{
"name": "Specimen",
"name": "specimen",
"description": "Any material sample taken from a biological entity, living or dead, from physical object or the environment",
"fields": [
{
Expand Down Expand Up @@ -1156,7 +1275,8 @@
"required": true,
"regex": "^[A-Za-z0-9\\-\\._]{1,64}$"
},
"valueType": "string"
"valueType": "string",
"unique": true
},
{
"meta": {
Expand Down Expand Up @@ -1297,10 +1417,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Treatment",
"name": "treatment",
"description": "Medications, procedures, other actions taken for clinical management",
"fields": [
{
Expand Down Expand Up @@ -1342,7 +1475,8 @@
"required": true,
"regex": "^[A-Za-z0-9\\-\\._]{1,64}$"
},
"valueType": "string"
"valueType": "string",
"unique": true
},
{
"meta": {
Expand Down Expand Up @@ -1442,10 +1576,23 @@
]
}
}
]
],
"restrictions": {
"foreignKey": [
{
"schema": "participant",
"mappings": [
{
"local": "submitter_participant_id",
"foreign": "submitter_participant_id"
}
]
}
]
}
},
{
"name": "Imaging",
"name": "imaging",
"description": "An imaging test",
"fields": [
{
Expand Down Expand Up @@ -1611,6 +1758,19 @@
"empty": true
}
}
},
{
"meta": {
"displayName": "Image Number"
},
"name": "image_number",
"description": "A number example for image",
"restrictions": {
"required": true
},
"valueType": "integer",
"isArray": true,
"delimiter": "|"
}
]
}
Expand Down
Loading