Skip to content

Commit

Permalink
partway save progress
Browse files Browse the repository at this point in the history
  • Loading branch information
BSnelling committed Jun 4, 2024
1 parent 31d5a8a commit 66864c6
Show file tree
Hide file tree
Showing 22 changed files with 2,949 additions and 11 deletions.
83 changes: 83 additions & 0 deletions hdr_schemata/definitions/HDRUK/DatasetType.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,92 @@
from typing import Optional
from pydantic import RootModel,constr
from enum import Enum

#note: contructed as a string of max_length=100
# in the future we may want to limit this with Enums
class DatasetType(RootModel):
root: Optional[constr(min_length=2, max_length=100)]

class DatasetTypeV2(Enum):
HEALTH_AND_DISEASE = 'Health and disease'
TREATMENTS_INTERVENTIONS = 'Treatments/Interventions'
MEASUREMENTS_TESTS = 'Measurements/Tests'
IMAGING_TYPES = 'Imaging types'
IMAGING_AREA_OF_THE_BODY = 'Imaging area of the body'
OMICS = 'Omics'
SOCIOECONOMIC = 'Socioeconomic'
LIFESTYLE = 'Lifestyle'
REGISTRY = 'Registry'
ENVIRONMENT_AND_ENERGY = 'Environment and energy'
INFORMATION_AND_COMMUNICATION = 'Information and communication'
POLITICS = 'Politics'

class DatasetSubType(Enum):
MENTAL_HEALTH = 'Mental health'
CARDIOVASCULAR = 'Cardiovascular'
CANCER = 'Cancer'
RARE_DISEASES = 'Rare diseases'
METABOLIC_AND_ENDOCRINE = 'Metabolic and Endocrine'
NEUROLOGICAL = 'Neurological'
REPRODUCTIVE = 'Reproductive'
MATERNITY_AND_NEONATOLOGY = 'Maternity and neonatology'
RESPIRATORY = 'Respiratory'
IMMUNITY = 'Immunity'
MUSCULOSKELETAL = 'Musculoskeletal'
VISION = 'Vision'
RENAL_AND_UROGENITAL = 'Renal and urogenital'
ORAL_AND_GASTROINTESTINAL = 'Oral and Gastrointestinal'
COGNITIVE_FUNCTION = 'Cognitive Function'
HEARING = 'Hearing'
OTHERS = 'Others'
VACCINES = 'Vaccines'
PREVENTIVE = 'Preventive'
THERAPEUTIC = 'Therapeutic'
# OTHERS = 'Others'
LABORATORY = 'Laboratory'
OTHER_DIAGNOSTICS = 'Other diagnostics'
CT = 'CT'
MRI = 'MRI'
PET = 'PET'
X_RAY = 'X-ray'
ULTRASOUND = 'Ultrasound'
PATHOLOGY = 'Pathology'
# OTHERS = 'Others'
HEAD = 'Head'
CHEST = 'Chest'
ARM = 'Arm'
ABDOMEN = 'Abdomen'
LEG = 'Leg'
# OTHERS = 'Others'
PROTEOMICS = 'Proteomics'
TRANSCRIPTOMICS = 'Transcriptomics'
EPIGENOMICS = 'Epigenomics'
METABOLOMICS = 'Metabolomics'
MULTIOMICS = 'Multiomics'
METAGENOMICS = 'Metagenomics'
GENOMICS = 'Genomics'
# OTHERS = 'Others'
EDUCATION = 'Education'
CRIME_AND_JUSTICE = 'Crime and Justice'
ETHNICITY = 'Ethnicity'
HOUSING_ = 'Housing '
LABOUR = 'Labour'
AGEING_ = 'Ageing '
ECONOMICS = 'Economics'
MARITAL_STATUS = 'Marital status'
SOCIAL_SUPPORT = 'Social support'
DEPRIVATION = 'Deprivation'
RELIGION = 'Religion'
OCCUPATION = 'Occupation'
FINANCES = 'Finances'
FAMILY_CIRCUMSTANCE = 'Family circumstance'
# OTHERS = 'Others'
SMOKING = 'Smoking'
PHYSICAL_ACTIVITY = 'Physical Activity'
DIETARY_HABITS = 'Dietary habits'
ALCOHOL = 'Alcohol'
# OTHERS = 'Others'
DISEASE_REGISTRY_RESEARCH = 'Disease Registry (research)'
NATIONAL_DISEASE_REGISTRIES_AND_AUDITS = 'National Disease Registries and Audits'
BIRTHS_AND_DEATHS = 'Births and Deaths'
# OTHERS = 'Others'
17 changes: 16 additions & 1 deletion hdr_schemata/definitions/HDRUK/Periodicity.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,19 @@ class Periodicity(Enum):
OTHER = 'OTHER'
NoneType_None = None


class PeriodicityV2(Enum):
STATIC = 'Static'
IRREGULAR = 'Irregular'
CONTINUOUS = 'Continuous'
BIENNIAL = 'Biennial'
ANNUAL = 'Annual'
BIANNUAL = 'Biannual'
QUARTERLY = 'Quarterly'
BIMONTHLY = 'Bimonthly'
MONTHLY = 'Monthly'
BIWEEKLY = 'Biweekly'
WEEKLY = 'Weekly'
TWICE_A_WEEK = 'Twice a week'
DAILY = 'Daily'
OTHER = 'Other'
NoneType_None = None
13 changes: 12 additions & 1 deletion hdr_schemata/definitions/HDRUK/Purpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@ class Purpose(Enum):
OTHER = 'OTHER'
NoneType_None = None


class PurposeV2(Enum):
RESEARCH_COHORT = 'Research cohort'
STUDY = 'Study'
DISEASE_REGISTRY = 'Disease registry'
TRIAL = 'Trial'
CARE = 'Care'
AUDIT = 'Audit'
ADMINISTRATIVE = 'Administrative'
FINANCIAL = 'Financial'
STATUATORY = 'Statuatory'
OTHER = 'Other'
NoneType_None = None
26 changes: 26 additions & 0 deletions hdr_schemata/definitions/HDRUK/Setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,29 @@ class Setting(Enum):
OTHER = 'OTHER'


class SettingV2(Enum):
COHORT_STUDY_TRIAL = 'Cohort, study, trial'
CLINIC = 'Clinic'
PRIMARY_CARE_REFERRALS = 'Primary care - Referrals'
PRIMARY_CARE_CLINIC = 'Primary care - Clinic'
PRIMARY_CARE_OUT_OF_HOURS = 'Primary care - Out of hours'
SECONDARY_CARE_ACCIDENT_AND_EMERGENCY = 'Secondary care - Accident and Emergency'
SECONDARY_CARE_OUTPATIENTS = 'Secondary care - Outpatients'
SECONDARY_CARE_INPATIENTS = 'Secondary care - In-patients'
SECONDARY_CARE_AMBULANCE = 'Secondary care - Ambulance'
SECONDARY_CARE_ICU = 'Secondary care - ICU'
PRESCRIBING_COMMUNITY_PHARMACY = 'Prescribing - Community pharmacy'
PRESCRIBING_HOSPITAL = 'Prescribing - Hospital'
PATIENT_REPORT_OUTCOME = 'Patient report outcome'
WEARABLES = 'Wearables'
LOCAL_AUTHORITY = 'Local authority'
NATIONAL_GOVERNMENT = 'National government'
COMMUNITY = 'Community'
SERVICES = 'Services'
HOME = 'Home'
PRIVATE = 'Private'
SOCIAL_CARE_HEALTH_CARE_AT_HOME = 'Social care - Health care at home'
SOCIAL_CARE_OTHER_SOCIAL_DATA = 'Social care - Other social data'
CENSUS = 'Census'
OTHER = 'Other'
NoneType_None = None
9 changes: 8 additions & 1 deletion hdr_schemata/definitions/HDRUK/Source.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ class Source(Enum):
MACHINE_GENERATED = 'MACHINE GENERATED'
OTHER = 'OTHER'


class SourceV2(Enum):
EPR = 'EPR'
ELECTRONIC_SURVEY = 'Electronic survey'
LIMS = 'LIMS'
PAPER_BASED = 'Paper-based'
FREE_TEXT_NLP = 'Free text NLP'
MACHINE_GENERATED = 'Machine generated'
OTHER = 'Other'
6 changes: 6 additions & 0 deletions hdr_schemata/definitions/HDRUK/Ternary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from enum import Enum

class Ternary(Enum):
YES = 'Yes'
NO = 'No'
NOT_STATED = 'Not stated'
10 changes: 10 additions & 0 deletions hdr_schemata/definitions/HDRUK/TimeLag.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,14 @@ class TimeLag(Enum):
OTHER = 'OTHER'
NoneType_None = None

class TimeLagV2(Enum):
LESS_THAN_1_WEEK = 'Less than 1 week'
ONE_TWO_WEEKS = '1-2 weeks'
TWO_FOUR_WEEKS = '2-4 weeks'
ONE_TWO_MONTHS = '1-2 months'
TWO_SIX_MONTHS = '2-6 months'
SIX_MONTHS_PLUS = '6 months plus'
VARIABLE = 'Variable'
NOT_APPLICABLE = 'Not applicable'
OTHER = 'Other'

13 changes: 7 additions & 6 deletions hdr_schemata/definitions/HDRUK/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .ControlledVocabulary import ControlledVocabulary
from .ControlledVocabularyEnum import ControlledVocabularyEnum
from .DataUseLimitation import DataUseLimitation
from .DatasetType import DatasetType
from .DatasetType import DatasetType, DatasetTypeV2, DatasetSubType
from .DataUseRequirements import DataUseRequirements
from .DeliveryLeadTime import DeliveryLeadTime
from .Description import Description
Expand All @@ -27,18 +27,19 @@
from .MemberOf import MemberOf
from .Name import Name
from .OneHundredFiftyCharacters import OneHundredFiftyCharacters
from .Periodicity import Periodicity
from .Periodicity import Periodicity, PeriodicityV2
from .PhysicalSampleAvailability import PhysicalSampleAvailability
from .Purpose import Purpose
from .Purpose import Purpose, PurposeV2
from .Semver import Semver
from .Setting import Setting
from .Setting import Setting, SettingV2
from .ShortDescription import ShortDescription
from .ShortTitle import ShortTitle
from .Source import Source
from .Source import Source, SourceV2
from .StandardisedDataModels import StandardisedDataModels
from .StandardisedDataModelsEnum import StandardisedDataModelsEnum
from .StatisticalPopulationConstrained import StatisticalPopulationConstrained
from .TimeLag import TimeLag
from .Ternary import Ternary
from .TimeLag import TimeLag, TimeLagV2
from .TissueCollectionTypeEnum import TissueCollectionTypeEnum
from .TissueDataCategoriesEnum import TissueDataCategoriesEnum
from .TwoHundredFiftyFiveCharacters import TwoHundredFiftyFiveCharacters
Expand Down
4 changes: 2 additions & 2 deletions hdr_schemata/models/HDRUK/2.2.1/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,7 @@
],
"default": null,
"description": "Please indicate the purpose(s) that the dataset was collected.",
"title": "Purpose"
"title": "Purpose of dataset collection"
},
"source": {
"anyOf": [
Expand All @@ -1489,7 +1489,7 @@
],
"default": null,
"description": "Please indicate the source of the data extraction",
"title": "Source"
"title": "Source of data extraction"
},
"collectionSituation": {
"anyOf": [
Expand Down
Loading

0 comments on commit 66864c6

Please sign in to comment.