All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gel.models.participant.avro.Referral Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
/**
 * Autogenerated by Avro
 * 
 * DO NOT EDIT DIRECTLY
 */
package org.gel.models.participant.avro;  
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class Referral extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Referral\",\"namespace\":\"org.gel.models.participant.avro\",\"fields\":[{\"name\":\"referralId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Referral unique identifier (to be displayed)\"},{\"name\":\"referralUid\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Referral internal unique identifier\"},{\"name\":\"referralTests\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ReferralTest\",\"fields\":[{\"name\":\"referralTestId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Test UID\"},{\"name\":\"referralTestOrderingDate\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Date\",\"doc\":\"This defines a date record\",\"fields\":[{\"name\":\"year\",\"type\":\"int\",\"doc\":\"Format YYYY\"},{\"name\":\"month\",\"type\":[\"null\",\"int\"],\"doc\":\"Format MM. e.g June is 06\"},{\"name\":\"day\",\"type\":[\"null\",\"int\"],\"doc\":\"Format DD e.g. 12th of October is 12\"}]}],\"doc\":\"The date of which the referralTest was sent to Bioinformatics\"},{\"name\":\"clinicalIndicationTest\",\"type\":{\"type\":\"record\",\"name\":\"ClinicalIndicationTest\",\"fields\":[{\"name\":\"clinicalIndicationTestTypeId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Clinical indication Test type ID\"},{\"name\":\"clinicalIndicationTestTypeCode\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Clinical indication Test code (e.g. R13-1)\"},{\"name\":\"testTypeId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Test Type Id\"},{\"name\":\"testTypeName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Test Type Name\"},{\"name\":\"technology\",\"type\":{\"type\":\"record\",\"name\":\"Technology\",\"fields\":[{\"name\":\"testTechnologyId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Technology unique identifier\"},{\"name\":\"testTechnologyDescription\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Technology description\"}]},\"doc\":\"Technology used in ClinicalIndicationTest\"}]},\"doc\":\"Clinical indication test\"},{\"name\":\"tumourSamples\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"TumourSample\",\"doc\":\"A tumour sample\",\"fields\":[{\"name\":\"sampleId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Sample identifier (e.g, LP00012645_5GH))\"},{\"name\":\"labSampleId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Lab sample identifier\"},{\"name\":\"LDPCode\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"LDP Code (Local Delivery Partner)\"},{\"name\":\"tumourId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is the ID of the tumour from which this tumour sample was taken from\"},{\"name\":\"programmePhase\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Genomics England programme phase\"},{\"name\":\"diseaseType\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"diseaseType\",\"symbols\":[\"ADULT_GLIOMA\",\"BLADDER\",\"BREAST\",\"CARCINOMA_OF_UNKNOWN_PRIMARY\",\"CHILDHOOD\",\"COLORECTAL\",\"ENDOCRINE\",\"ENDOMETRIAL_CARCINOMA\",\"HAEMONC\",\"HEPATOPANCREATOBILIARY\",\"LUNG\",\"MALIGNANT_MELANOMA\",\"NASOPHARYNGEAL\",\"ORAL_OROPHARYNGEAL\",\"OVARIAN\",\"PROSTATE\",\"RENAL\",\"SARCOMA\",\"SINONASAL\",\"TESTICULAR_GERM_CELL_TUMOURS\",\"UPPER_GASTROINTESTINAL\",\"OTHER\",\"NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE\",\"CLASSICAL_HODGKINS\",\"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS\",\"T_CELL_LYMPHOMA\"]}],\"doc\":\"Disease type.\\n        NOTE: Deprecated in GMS\"},{\"name\":\"diseaseSubType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Disease subtype.\\n        NOTE: Deprecated in GMS\"},{\"name\":\"haematologicalCancer\",\"type\":[\"null\",\"boolean\"],\"doc\":\"True or false if this sample is of type: Haematological Cancer\"},{\"name\":\"haematologicalCancerLineage\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"HaematologicalCancerLineage\",\"symbols\":[\"MYELOID\",\"LYMPHOID\",\"UNKNOWN\"]}],\"doc\":\"This is the Haematological cancer lineage of the tumourSample if this sample is from a haematological cancer\"},{\"name\":\"clinicalSampleDateTime\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The time when the sample was received. In the format YYYY-MM-DDTHH:MM:SS+0000\"},{\"name\":\"tumourType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Tumor type.\\n        NOTE: Deprecated in GMS in tumourSample but available in tumour record\"},{\"name\":\"tumourContent\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"TumourContent\",\"symbols\":[\"High\",\"Medium\",\"Low\"]}],\"doc\":\"This is the tumour content\"},{\"name\":\"tumourContentPercentage\",\"type\":[\"null\",\"float\"],\"doc\":\"This is the tumour content percentage\"},{\"name\":\"source\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"SampleSource\",\"doc\":\"The source of the sample\\n    NOTE: IN GMS, BONE_MARROW_ASPIRATE_TUMOUR_CELLS and BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS are deprecated as they have been separated into their respective biotypes\",\"symbols\":[\"AMNIOTIC_FLUID\",\"BLOOD\",\"BONE_MARROW\",\"BONE_MARROW_ASPIRATE_TUMOUR_CELLS\",\"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS\",\"BUCCAL_SWAB\",\"CHORIONIC_VILLUS_SAMPLE\",\"FIBROBLAST\",\"FLUID\",\"FRESH_TISSUE_IN_CULTURE_MEDIUM\",\"OTHER\",\"SALIVA\",\"TISSUE\",\"TUMOUR\",\"URINE\"]}],\"doc\":\"Source of the sample\"},{\"name\":\"preparationMethod\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"PreparationMethod\",\"doc\":\"In 100K, preparation Method of sample\\n    NOTE: In GMS, this field is deprecated in favour of StorageMedium and Method\",\"symbols\":[\"ASPIRATE\",\"CD128_SORTED_CELLS\",\"CD138_SORTED_CELLS\",\"EDTA\",\"FF\",\"FFPE\",\"LI_HEP\",\"ORAGENE\"]}],\"doc\":\"The preparation method of the sample\\n        NOTE: Deprecated in GMS in replace of Method and storageMedium record\"},{\"name\":\"tissueSource\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The tissue source of the sample.\\n        NOTE: DEPRECATED IN GMS in replace of method record\"},{\"name\":\"product\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Product\",\"symbols\":[\"DNA\",\"RNA\"]}],\"doc\":\"Product of the sample\"},{\"name\":\"sampleMorphologies\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Morphology\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The ontology term id or accession in OBO format ${ONTOLOGY_ID}:${TERM_ID} (http://www.obofoundry.org/id-policy.html)\"},{\"name\":\"name\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The ontology term name\"},{\"name\":\"value\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Optional value for the ontology term, the type of the value is not checked\\n        (i.e.: we could set the pvalue term to \\\"significant\\\" or to \\\"0.0001\\\")\"},{\"name\":\"version\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Ontology version\"}]}}],\"doc\":\"Morphology according to the sample taken\"},{\"name\":\"sampleTopographies\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Topography\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The ontology term id or accession in OBO format ${ONTOLOGY_ID}:${TERM_ID} (http://www.obofoundry.org/id-policy.html)\"},{\"name\":\"name\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The ontology term name\"},{\"name\":\"value\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Optional value for the ontology term, the type of the value is not checked\\n        (i.e.: we could set the pvalue term to \\\"significant\\\" or to \\\"0.0001\\\")\"},{\"name\":\"version\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Ontology version\"}]}}],\"doc\":\"Topography according to the sample taken\"},{\"name\":\"sampleUid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"In GMS, this is the GUID of the sample\"},{\"name\":\"participantId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Participant Id of the sample\"},{\"name\":\"participantUid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Participant UId of the sample\"},{\"name\":\"maskedPid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"In GMS, this is the maskedPID\"},{\"name\":\"method\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Method\",\"doc\":\"In GMS, Method is defined as how the sample was taken directly from the patient\",\"symbols\":[\"ASPIRATE\",\"BIOPSY\",\"NOT_APPLICABLE\",\"RESECTION\",\"SORTED_OTHER\",\"UNKNO","WN\",\"UNSORTED\",\"CD138_SORTED\"]}],\"doc\":\"In GMS, this is how the sample was extracted from the participant\"},{\"name\":\"storageMedium\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"StorageMedium\",\"doc\":\"In GMS, storage medium of sample\",\"symbols\":[\"EDTA\",\"FF\",\"LI_HEP\",\"ORAGENE\",\"FFPE\"]}],\"doc\":\"In GMS, this is what solvent/medium the sample was stored in\"},{\"name\":\"sampleType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"In GMS, this is the sampleType as entered by the clinician in TOMs\"},{\"name\":\"sampleState\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"In GMS, this is the sampleState as entered by the clinician in TOMs\"}]}}],\"doc\":\"List of all somatic samples applicable to this test\"},{\"name\":\"germlineSamples\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"GermlineSample\",\"doc\":\"A germline sample\",\"fields\":[{\"name\":\"sampleId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Sample identifier (e.g, LP00012645_5GH))\"},{\"name\":\"labSampleId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Lab sample identifier\"},{\"name\":\"LDPCode\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"LDP Code (Local Delivery Partner)\"},{\"name\":\"source\",\"type\":[\"null\",\"SampleSource\"],\"doc\":\"Source of the sample\"},{\"name\":\"product\",\"type\":[\"null\",\"Product\"],\"doc\":\"Product of the sample\"},{\"name\":\"preparationMethod\",\"type\":[\"null\",\"PreparationMethod\"],\"doc\":\"Preparation method\\n        NOTE: In GMS, this has been deprecated in favour of Method and storageMedium\"},{\"name\":\"programmePhase\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"ProgrammePhase\",\"symbols\":[\"CRUK\",\"OXFORD\",\"CLL\",\"IIP\",\"MAIN\",\"EXPT\"]}],\"doc\":\"Genomics England programme phase\"},{\"name\":\"clinicalSampleDateTime\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The time when the sample was received. In the format YYYY-MM-DDTHH:MM:SS+0000\"},{\"name\":\"participantId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"participantUid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Participant UId of the sample\"},{\"name\":\"sampleUid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"maskedPid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"method\",\"type\":[\"null\",\"Method\"],\"doc\":\"In GMS, this is how the sample was extracted from the participant\"},{\"name\":\"storageMedium\",\"type\":[\"null\",\"StorageMedium\"],\"doc\":\"In GMS, this is what solvent/medium the sample was stored in\"},{\"name\":\"sampleType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"In GMS, this is the sampleType as entered by the clinician in TOMs\"},{\"name\":\"sampleState\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"In GMS, this is the sampleState as entered by the clinician in TOMs\"}]}}],\"doc\":\"List of all germline samples aplicable to this test\"},{\"name\":\"analysisPanels\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AnalysisPanel\",\"doc\":\"An analysis panel\",\"fields\":[{\"name\":\"specificDisease\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The specific disease that a panel tests\"},{\"name\":\"panelName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The name of the panel\"},{\"name\":\"panelId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Id of the panel\"},{\"name\":\"panelVersion\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"The version of the panel\"},{\"name\":\"reviewOutcome\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Deprecated\"},{\"name\":\"multipleGeneticOrigins\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Deprecated\"}]}}],\"doc\":\"List of Analysis panels\"},{\"name\":\"interpreter\",\"type\":{\"type\":\"record\",\"name\":\"OrganisationNgis\",\"fields\":[{\"name\":\"organisationId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Organisation Id\"},{\"name\":\"organisationCode\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Ods code\"},{\"name\":\"organisationName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Organisation Name\"},{\"name\":\"organisationNationalGroupingId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"National Grouping (GLH) Id\"},{\"name\":\"organisationNationalGroupingName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"National Grouping (GLH) Name\"}]},\"doc\":\"Organisation assigned for the interpretation of this test\"},{\"name\":\"processingLab\",\"type\":\"OrganisationNgis\",\"doc\":\"Organisation assigned for the processing of the test\"},{\"name\":\"priority\",\"type\":{\"type\":\"enum\",\"name\":\"Priority\",\"doc\":\"Transformed from TOMs from routine=medium, and urgent=high\",\"symbols\":[\"low\",\"routine\",\"urgent\"]},\"doc\":\"Priority\"},{\"name\":\"pipelineStartDate\",\"type\":[\"null\",\"Date\"],\"doc\":\"Date of ordering. NOTE: this field is not required from upstream\\n        and will be generated by Bioinformatics when all sample data and all\\n        required clinical data is received for the first time\"},{\"name\":\"diseasePenetrances\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"DiseasePenetrance\",\"doc\":\"A disease penetrance definition\",\"fields\":[{\"name\":\"specificDisease\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The disease to which the penetrance applies\"},{\"name\":\"penetrance\",\"type\":{\"type\":\"enum\",\"name\":\"Penetrance\",\"doc\":\"Penetrance assumed in the analysis\",\"symbols\":[\"complete\",\"incomplete\"]},\"doc\":\"The penetrance\"}]}}],\"doc\":\"Disease Penetrance applied for that referralTest\"},{\"name\":\"matchedSamples\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"MatchedSamples\",\"doc\":\"This defines a pair of germline and tumor, this pair should/must be analyzed together\",\"fields\":[{\"name\":\"germlineSampleId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Sample identifier (e.g, LP00012645_5GH)) for the germline\"},{\"name\":\"tumourSampleId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Sample identifier (e.g, LP00012643_7JS)) for the tumor\"}]}}],\"doc\":\"List of matched samples (i.e.: pairs tumour-germline)\"}]}},\"doc\":\"List of tests associated to the referral\"},{\"name\":\"requester\",\"type\":\"OrganisationNgis\",\"doc\":\"Requesting Organisation of the Referral\"},{\"name\":\"orderingDate\",\"type\":[\"null\",\"Date\"],\"doc\":\"Date of referral being created\"},{\"name\":\"pedigree\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Pedigree\",\"doc\":\"This is the concept of a family with associated phenotypes as present in the record RDParticipant\",\"fields\":[{\"name\":\"versionControl\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"VersionControl\",\"fields\":[{\"name\":\"GitVersionControl\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"This is the version for the entire set of data models as referred to the Git release tag\",\"default\":\"1.3.0\"}]}],\"doc\":\"Model version number\"},{\"name\":\"LDPCode\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"LDP Code (Local Delivery Partner)\"},{\"name\":\"familyId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Family identifier which internally translate to a sample set\"},{\"name\":\"members\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"PedigreeMember\",\"doc\":\"This defines a RD Participant (demographics and pedigree information)\",\"fields\":[{\"name\":\"pedigreeId\",\"type\":[\"null\",\"int\"],\"doc\":\"Numbering used to refer to each member of the pedigree\"},{\"name\":\"isProband\",\"type\":[\"null\",\"boolean\"],\"doc\":\"If this field is true, the member should be considered the proband of this family\"},{\"name\":\"participantId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"participantId.  This is the human readable ID in GMS\"},{\"name\":\"participantQCState\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"ParticipantQCState\",\"doc\":\"QCState Status\",\"symbols\":[\"noState\",\"passedMedicalReviewReadyForInterpretation\",\"passedMedicalReviewNotReadyForInterpretation\",\"queryToGel\",\"queryToGMC\",\"failed\"]}],\"doc\":\"participantQCState\"},{\"name\":\"gelSuperFamilyId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"superFamily id, this id is built as a concatenation of all\\n       "," families id in this superfamily i.e, fam10024_fam100457.\\n        NOTE: Retired for GMS\"},{\"name\":\"sex\",\"type\":{\"type\":\"enum\",\"name\":\"Sex\",\"doc\":\"Sex\",\"symbols\":[\"MALE\",\"FEMALE\",\"UNKNOWN\"]},\"doc\":\"Sex of the Participant\"},{\"name\":\"personKaryotypicSex\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"PersonKaryotipicSex\",\"doc\":\"Karyotipic Sex\",\"symbols\":[\"UNKNOWN\",\"XX\",\"XY\",\"XO\",\"XXY\",\"XXX\",\"XXYY\",\"XXXY\",\"XXXX\",\"XYY\",\"OTHER\"]}],\"doc\":\"Karyotypic sex of the participant as previously established or by looking at the GEL genome\"},{\"name\":\"yearOfBirth\",\"type\":[\"null\",\"int\"],\"doc\":\"Year of Birth\"},{\"name\":\"fatherId\",\"type\":[\"null\",\"int\"],\"doc\":\"refers to the pedigreeId of the father\\n        Id of the parent, if unknown then no parent is referenced. Parents may need to be entered even if no data is known\\n        about them in order to unambiguously reconstruct the pedigree.\"},{\"name\":\"motherId\",\"type\":[\"null\",\"int\"],\"doc\":\"refers to the pedigreeId of the mother\\n        Id of the parent, if unknown then no parent is referenced. Parents may need to be entered even if no data is known\\n        about them in order to unambiguously reconstruct the pedigree.\"},{\"name\":\"superFatherId\",\"type\":[\"null\",\"int\"],\"doc\":\"this id is built using the original familyId and the original pedigreeId of the father\\n        NOTE: retired for GMS\"},{\"name\":\"superMotherId\",\"type\":[\"null\",\"int\"],\"doc\":\"this id is built using the original familyId and the original pedigreeId of the mother\\n        NOTE: Retired for GMS\"},{\"name\":\"twinGroup\",\"type\":[\"null\",\"int\"],\"doc\":\"Each twin group is numbered, i.e. all members of a group of multiparous births receive the same number\"},{\"name\":\"monozygotic\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"TernaryOption\",\"doc\":\"This defines a yes/no/unknown case\",\"symbols\":[\"yes\",\"no\",\"unknown\"]}],\"doc\":\"A property of the twinning group but should be entered for all members\"},{\"name\":\"adoptedStatus\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"AdoptedStatus\",\"doc\":\"adoptedin means adopted into the family\\n    adoptedout means child belonged to the family and was adopted out\",\"symbols\":[\"notadopted\",\"adoptedin\",\"adoptedout\"]}],\"doc\":\"Adopted Status\"},{\"name\":\"lifeStatus\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"LifeStatus\",\"doc\":\"Life Status\",\"symbols\":[\"ALIVE\",\"ABORTED\",\"DECEASED\",\"UNBORN\",\"STILLBORN\",\"MISCARRIAGE\"]}],\"doc\":\"Life Status\"},{\"name\":\"consanguineousParents\",\"type\":[\"null\",\"TernaryOption\"],\"doc\":\"The parents of this participant has a consanguineous relationship\"},{\"name\":\"affectionStatus\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"AffectionStatus\",\"doc\":\"Affection Status\",\"symbols\":[\"UNAFFECTED\",\"AFFECTED\",\"UNCERTAIN\"]}],\"doc\":\"Affection Status\"},{\"name\":\"disorderList\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Disorder\",\"doc\":\"This is quite GEL specific. This is the way is stored in ModelCatalogue and PanelApp.\\n    Currently all specific disease titles are assigned to a disease subgroup so really only specificDisease needs to be\\n    completed but we add the others for generality\",\"fields\":[{\"name\":\"diseaseGroup\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is Level2 Title for this disorder\"},{\"name\":\"diseaseSubGroup\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is Level3 Title for this disorder\"},{\"name\":\"specificDisease\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is Level4 Title for this disorder.\\n        In GMS, this is the clinicalIndicationFullName/clinicalIndicationCode.\"},{\"name\":\"ageOfOnset\",\"type\":[\"null\",\"float\"],\"doc\":\"Age of onset in years\"}]}}],\"doc\":\"Clinical Data (disorders). If the family member is unaffected as per affectionStatus then this list is empty.\"},{\"name\":\"hpoTermList\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"HpoTerm\",\"doc\":\"This defines an HPO term and its modifiers (possibly multiple)\\n    If HPO term presence is unknown we don't have a entry on the list\",\"fields\":[{\"name\":\"term\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Identifier of the HPO term\"},{\"name\":\"termPresence\",\"type\":[\"null\",\"TernaryOption\"],\"doc\":\"This is whether the term is present in the participant (default is unknown) yes=term is present in participant,\\n        no=term is not present\"},{\"name\":\"hpoBuildNumber\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"hpoBuildNumber\"},{\"name\":\"modifiers\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"HpoTermModifiers\",\"doc\":\"HPO Modifiers\\n    For GMS, hpoModifierCode and hpoModifierVersion will be used\",\"fields\":[{\"name\":\"laterality\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Laterality\",\"symbols\":[\"RIGHT\",\"UNILATERAL\",\"BILATERAL\",\"LEFT\"]}]},{\"name\":\"progression\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Progression\",\"symbols\":[\"PROGRESSIVE\",\"NONPROGRESSIVE\"]}]},{\"name\":\"severity\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"Severity\",\"symbols\":[\"BORDERLINE\",\"MILD\",\"MODERATE\",\"SEVERE\",\"PROFOUND\"]}]},{\"name\":\"spatialPattern\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"SpatialPattern\",\"symbols\":[\"DISTAL\",\"GENERALIZED\",\"LOCALIZED\",\"PROXIMAL\"]}]},{\"name\":\"hpoModifierCode\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"hpoModifierVersion\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]}]}}],\"doc\":\"Modifier associated with the HPO term\"},{\"name\":\"ageOfOnset\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"AgeOfOnset\",\"symbols\":[\"EMBRYONAL_ONSET\",\"FETAL_ONSET\",\"NEONATAL_ONSET\",\"INFANTILE_ONSET\",\"CHILDHOOD_ONSET\",\"JUVENILE_ONSET\",\"YOUNG_ADULT_ONSET\",\"LATE_ONSET\",\"MIDDLE_AGE_ONSET\"]}],\"doc\":\"Age of onset in months\"}]}}],\"doc\":\"Clinical Data (HPO terms)\"},{\"name\":\"ancestries\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"Ancestries\",\"doc\":\"Ancestries, defined as Ethnic category(ies) and Chi-square test\",\"fields\":[{\"name\":\"mothersEthnicOrigin\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"EthnicCategory\",\"doc\":\"This is the list of ethnicities in ONS16\\n\\n    * `D`:  Mixed: White and Black Caribbean\\n    * `E`:  Mixed: White and Black African\\n    * `F`:  Mixed: White and Asian\\n    * `G`:  Mixed: Any other mixed background\\n    * `A`:  White: British\\n    * `B`:  White: Irish\\n    * `C`:  White: Any other White background\\n    * `L`:  Asian or Asian British: Any other Asian background\\n    * `M`:  Black or Black British: Caribbean\\n    * `N`:  Black or Black British: African\\n    * `H`:  Asian or Asian British: Indian\\n    * `J`:  Asian or Asian British: Pakistani\\n    * `K`:  Asian or Asian British: Bangladeshi\\n    * `P`:  Black or Black British: Any other Black background\\n    * `S`:  Other Ethnic Groups: Any other ethnic group\\n    * `R`:  Other Ethnic Groups: Chinese\\n    * `Z`:  Not stated\",\"symbols\":[\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"L\",\"M\",\"N\",\"H\",\"J\",\"K\",\"P\",\"S\",\"R\",\"Z\"]}],\"doc\":\"Mother's Ethnic Origin\"},{\"name\":\"mothersOtherRelevantAncestry\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Mother's Ethnic Origin Description\"},{\"name\":\"fathersEthnicOrigin\",\"type\":[\"null\",\"EthnicCategory\"],\"doc\":\"Father's Ethnic Origin\"},{\"name\":\"fathersOtherRelevantAncestry\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Father's Ethnic Origin Description\"},{\"name\":\"chiSquare1KGenomesPhase3Pop\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ChiSquare1KGenomesPhase3Pop\",\"doc\":\"Chi-square test for goodness of fit of this sample to 1000 Genomes Phase 3 populations\",\"fields\":[{\"name\":\"kgSuperPopCategory\",\"type\":{\"type\":\"enum\",\"name\":\"KgSuperPopCategory\",\"doc\":\"1K Genomes project super populations\",\"symbols\":[\"AFR\",\"AMR\",\"EAS\",\"EUR\",\"SAS\"]},\"doc\":\"1K Super Population\"},{\"name\":\"kgPopCategory\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"KgPopCategory\",\"doc\":\"1K Genomes project populations\",\"symbols\":[\"ACB\",\"ASW\",\"BEB\",\"CDX\",\"CEU\",\"CHB\",\"CHS\",\"CLM\",\"ESN\",\"FIN\",\"GBR\",\"GIH\",\"GWD\",\"IBS\",\"ITU\",\"JPT\",\"KHV\",\"LWK\",\"MSL\",\"MXL\",\"PEL\",\"PJL\",\"PUR\",\"STU\",\"TSI\",\"YRI\"]}],\"doc\":\"1K Population\"},{\"name\":\"chiSquare\",\"type\":\"double\",\"doc\":\"Chi-square test for goodness of fit of this sample to this 1000 Genomes Phase 3 population\"}]}}],\"doc\":\"Chi-square test for goodness of fit of this sample to 1000 Genomes Phase 3 populations\"}]}],\"d","oc\":\"Participant's ancestries, defined as Mother's/Father's Ethnic Origin and Chi-square test for goodness of fit of this sample to 1000 Genomes Phase 3 populations.\\n        NOTE: for GMS this field has been deprecated in favour of clinicalEthnicities\"},{\"name\":\"consentStatus\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"ConsentStatus\",\"doc\":\"Consent Status for 100k program\",\"fields\":[{\"name\":\"programmeConsent\",\"type\":\"boolean\",\"doc\":\"Is this individual consented to the programme?\\n        It could simply be a family member that is not consented but for whom affection status is known\",\"default\":false},{\"name\":\"primaryFindingConsent\",\"type\":\"boolean\",\"doc\":\"Consent for feedback of primary findings?\",\"default\":false},{\"name\":\"secondaryFindingConsent\",\"type\":\"boolean\",\"doc\":\"Consent for secondary finding lookup\",\"default\":false},{\"name\":\"carrierStatusConsent\",\"type\":\"boolean\",\"doc\":\"Consent for carrier status check?\",\"default\":false}]}],\"doc\":\"What has this participant consented to?\\n        A participant that has been consented to the programme should also have sequence data associated with them; however\\n        this needs to be programmatically checked\"},{\"name\":\"testConsentStatus\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"GmsConsentStatus\",\"doc\":\"Consent Status for GMS\",\"fields\":[{\"name\":\"programmeConsent\",\"type\":{\"type\":\"enum\",\"name\":\"GenericConsent\",\"doc\":\"clinicalEthnicities supersedes Ancestries in GMS\",\"symbols\":[\"yes\",\"no\",\"undefined\",\"not_applicable\"]},\"doc\":\"Is this individual consented to the programme? It could simply be a family member that is not consented\\n        but for whom affection status is known\"},{\"name\":\"primaryFindingConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for feedback of primary findings?\\n        RD: Primary Findings\\n        Cancer: PrimaryFindings is somatic + pertinent germline findings\"},{\"name\":\"researchConsent\",\"type\":\"GenericConsent\",\"doc\":\"Research Consent\"},{\"name\":\"healthRelatedFindingConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for secondary health related findings?\"},{\"name\":\"carrierStatusConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for carrier status check?\"},{\"name\":\"pharmacogenomicsFindingConsent\",\"type\":\"GenericConsent\",\"doc\":\"Consent for pharmacogenomics consent as secondary findings?\"}]}],\"doc\":\"What has this participant consented in the context of a Genomic Test?\"},{\"name\":\"samples\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"GermlineSample\"}],\"doc\":\"This is an array containing all the samples that belong to this individual, e.g [\\\"LP00002255_GA4\\\"]\"},{\"name\":\"inbreedingCoefficient\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"InbreedingCoefficient\",\"doc\":\"Inbreeding coefficient\",\"fields\":[{\"name\":\"sampleId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"This is the sample id against which the coefficient was estimated\"},{\"name\":\"program\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Name of program used to calculate the coefficient\"},{\"name\":\"version\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Version of the programme\"},{\"name\":\"estimationMethod\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Where various methods for estimation exist, which method was used.\"},{\"name\":\"coefficient\",\"type\":\"double\",\"doc\":\"Inbreeding coefficient ideally a real number in [0,1]\"},{\"name\":\"standardError\",\"type\":[\"null\",\"double\"],\"doc\":\"Standard error of the Inbreeding coefficient\"}]}],\"doc\":\"Inbreeding Coefficient Estimation\"},{\"name\":\"additionalInformation\",\"type\":[\"null\",{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}],\"doc\":\"We could add a map here to store additional information for example URIs to images, ECGs, etc\\n        Null by default\"},{\"name\":\"lastMenstrualPeriod\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Last Menstrual Period\"},{\"name\":\"diagnosticDetails\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"DiagnosticDetail\",\"fields\":[{\"name\":\"diagnosisCodingSystem\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Diagnosis coding system\"},{\"name\":\"diagnosisCodingSystemVersion\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis Coding System Version\"},{\"name\":\"diagnosisCode\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Diagnosis Code\"},{\"name\":\"diagnosisDescription\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis description\"},{\"name\":\"diagnosisCertainty\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Diagnosis Certainty\"},{\"name\":\"ageAtOnsetInYears\",\"type\":[\"null\",\"float\"],\"doc\":\"Age at diagnosis\"}]}}],\"doc\":\"Additional set of diagnostic ontology terms\"},{\"name\":\"participantUid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"ParticipantGUID in GMS\"},{\"name\":\"clinicalEthnicities\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"enum\",\"name\":\"ClinicalEthnicity\",\"doc\":\"* A     British, Mixed British\\n    * B     Irish\\n    * C     Any other White background\\n    * C2    Northern Irish\\n    * C3    Other white, white unspecified\\n    * CA    English\\n    * CB    Scottish\\n    * CC    Welsh\\n    * CD    Cornish\\n    * CE    Cypriot (part not stated)\\n    * CF    Greek\\n    * CG    Greek Cypriot\\n    * CH    Turkish\\n    * CJ    Turkish Cypriot\\n    * CK    Italian\\n    * CL    Irish Traveller\\n    * CM    Traveller\\n    * CN    Gypsy/Romany\\n    * CP    Polish\\n    * CQ    All republics which made up the former USSR\\n    * CR    Kosovan\\n    * CS    Albanian\\n    * CT    Bosnian\\n    * CU    Croatian\\n    * CV    Serbian\\n    * CW    Other republics which made up the former Yugoslavia\\n    * CX    Mixed white\\n    * CY    Other white European, European unspecified, European mixed\\n    * D     White and Black Caribbean\\n    * E     White and Black African\\n    * F     White and Asian\\n    * G     Any other mixed background\\n    * GA    Black and Asian\\n    * GB    Black and Chinese\\n    * GC    Black and White\\n    * GD    Chinese and White\\n    * GE    Asian and Chinese\\n    * GF    Other Mixed, Mixed Unspecified\\n    * H     Indian or British Indian\\n    * J     Pakistani or British Pakistani\\n    * K     Bangladeshi or British Bangladeshi\\n    * L     Any other Asian background\\n    * LA    Mixed Asian\\n    * LB    Punjabi\\n    * LC    Kashmiri\\n    * LD    East African Asian\\n    * LE    Sri Lanka\\n    * LF    Tamil\\n    * LG    Sinhalese\\n    * LH    British Asian\\n    * LJ    Caribbean Asian\\n    * LK    Other Asian, Asian unspecified\\n    * M     Caribbean\\n    * N     African\\n    * P     Any other Black background\\n    * PA    Somali\\n    * PB    Mixed Black\\n    * PC    Nigerian\\n    * PD    Black British\\n    * PE    Other Black, Black unspecified\\n    * R     Chinese\\n    * S     Any other ethnic group\\n    * S1    Ashkenazi\\n    * S2    Sephardi\\n    * SA    Vietnamese\\n    * SB    Japanese\\n    * SC    Filipino\\n    * SD    Malaysian\\n    * SE    Any Other Group\\n    * Z     Not stated\",\"symbols\":[\"A\",\"B\",\"C\",\"C2\",\"C3\",\"CA\",\"CB\",\"CC\",\"CD\",\"CE\",\"CF\",\"CG\",\"CH\",\"CJ\",\"CK\",\"CL\",\"CM\",\"CN\",\"CP\",\"CQ\",\"CR\",\"CS\",\"CT\",\"CU\",\"CV\",\"CW\",\"CX\",\"CY\",\"D\",\"E\",\"F\",\"G\",\"GA\",\"GB\",\"GC\",\"GD\",\"GE\",\"GF\",\"H\",\"J\",\"K\",\"L\",\"LA\",\"LB\",\"LC\",\"LD\",\"LE\",\"LF\",\"LG\",\"LH\",\"LJ\",\"LK\",\"M\",\"N\",\"P\",\"PA\",\"PB\",\"PC\",\"PD\",\"PE\",\"R\",\"S\",\"S1\",\"S2\",\"SA\",\"SB\",\"SC\",\"SD\",\"SE\",\"Z\"]}}],\"doc\":\"ClinicalEthnicity as defined for GMS\"},{\"name\":\"previousTreatment\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"PreviousTreatment\",\"doc\":\"In GMS, Previous Treatment of Patient\",\"fields\":[{\"name\":\"previousTreatmentType\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"previousTreatmentName\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"previousTreatmentDate\",\"type\":[\"null\",\"Date\"]}]}}],\"doc\":\"For GMS cases, previous Treatment History\"}]}},\"doc\":\"List of members of a pedigree\"},{\"name\":\"analysisPanels\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"AnalysisPanel\"}],\"doc\":\"List of panels\"},{\"name\":\"diseasePenetrances\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"DiseasePenetrance\"}],\"doc\":\"List of disease penetrances. Moved to referralTest fo","r GMS\"},{\"name\":\"readyForAnalysis\",\"type\":\"boolean\",\"doc\":\"Flag indicating if a pedigree is ready for analysis\"},{\"name\":\"familyQCState\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"FamilyQCState\",\"doc\":\"FamilyQCState\",\"symbols\":[\"noState\",\"passedMedicalReviewReadyForInterpretation\",\"passedMedicalReviewNotReadyForInterpretation\",\"queryToGel\",\"queryToGMC\",\"failed\"]}],\"doc\":\"The family quality control status\"}]}],\"doc\":\"Pedigree\"},{\"name\":\"cancerParticipant\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"CancerParticipant\",\"doc\":\"This defines a Cancer Participant\",\"fields\":[{\"name\":\"yearOfBirth\",\"type\":[\"null\",\"int\"],\"doc\":\"Year of birth for the cancer participant\"},{\"name\":\"morphology\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"Morphology of any tumours\\n        NOTE: In GMS, this field is deprecated as morphology will be in sample or with respect to a tumour record\"},{\"name\":\"readyForAnalysis\",\"type\":\"boolean\",\"doc\":\"Flag indicating if the participant is ready for analysis\\n        NOTE: In GMS, this will default to true\"},{\"name\":\"consentStatus\",\"type\":[\"null\",\"ConsentStatus\"],\"doc\":\"What has this participant consented to?\\n        A participant that has been consented to the programme should also have sequence data associated with them; however\\n        this needs to be programmatically checked\"},{\"name\":\"testConsentStatus\",\"type\":[\"null\",\"GmsConsentStatus\"],\"doc\":\"What has this participant consented in the context of a Genomic Test?\"},{\"name\":\"center\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Center\\n        NOTE: In GMS, this will be taken from the ReferralTest and duplicated here\"},{\"name\":\"individualId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Individual identifier\"},{\"name\":\"participantId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"This is a human readable participant ID\"},{\"name\":\"primaryDiagnosisDisease\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"This should be an enumeration when it is well defined\\n        blood, breast, prostate, colorectal, cll, aml, renal, ovarian, skin, lymphNode, bone, saliva //for individual - there could be more than I have listed here, in fact there definitely will.\\n        In GMS, this field is deprecated\"},{\"name\":\"primaryDiagnosisSubDisease\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"This should be an enumeration when it is well defined\\n        blood, breast, prostate, colorectal, cll, aml, renal, ovarian, skin, lymphNode, bone, saliva //for individual - there could be more than I have listed here, in fact there definitely will.\\n        In GMS, this field is deprecated\"},{\"name\":\"sex\",\"type\":\"Sex\",\"doc\":\"Sex\"},{\"name\":\"additionalInformation\",\"type\":[\"null\",{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"}],\"doc\":\"We could add a map here to store additional information for example URIs to images, ECGs, etc\"},{\"name\":\"assignedICD10\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}],\"doc\":\"assigned ICD10 code\\n        IN GMS, this is deprecated\"},{\"name\":\"tumourSamples\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"TumourSample\"}],\"doc\":\"List of tumour samples\\n        IN GMS, this is deprecated and moved to ReferralTest\"},{\"name\":\"germlineSamples\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"GermlineSample\"}],\"doc\":\"List of germline samples\\n        IN GMS, this is deprecated and moved to ReferralTest\"},{\"name\":\"versionControl\",\"type\":[\"null\",\"VersionControl\"],\"doc\":\"Model version number\"},{\"name\":\"participantUid\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Individual UID in GMS\"},{\"name\":\"tumours\",\"type\":[\"null\",{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Tumour\",\"fields\":[{\"name\":\"tumourId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"TumourId in GMS\"},{\"name\":\"tumourLocalId\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Local hospital tumour ID from the GLH Laboratory Information Management System (LIMS) in GMS\"},{\"name\":\"tumourType\",\"type\":{\"type\":\"enum\",\"name\":\"TumourType\",\"doc\":\"NOTE: This has been changed completely, the previous tumour type has been split into TumourPresentation and PrimaryOrMetastatic\",\"symbols\":[\"BRAIN_TUMOUR\",\"HAEMATOLOGICAL_MALIGNANCY_SOLID_SAMPLE\",\"HAEMATOLOGICAL_MALIGNANCY_LIQUID_SAMPLE\",\"SOLID_TUMOUR_METASTATIC\",\"SOLID_TUMOUR_PRIMARY\",\"SOLID_TUMOUR\",\"UNKNOWN\"]},\"doc\":\"tumourType\"},{\"name\":\"tumourParentId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Parent Tumour UID if this tumour is metastatic\"},{\"name\":\"tumourDiagnosisDate\",\"type\":[\"null\",\"Date\"],\"doc\":\"Date of Diagnosis of the specific tumour\"},{\"name\":\"tumourDescription\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Description of the tumour\"},{\"name\":\"tumourMorphologies\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"Morphology\"}],\"doc\":\"Morphology of the tumour\"},{\"name\":\"tumourTopographies\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"Topography\"}],\"doc\":\"Topography of the tumour\"},{\"name\":\"tumourPrimaryTopographies\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"Topography\"}],\"doc\":\"Associated primary topography for metastatic tumours\"},{\"name\":\"tumourGrade\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Grade of the Tumour\"},{\"name\":\"tumourStage\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Stage of the Tumour\"},{\"name\":\"tumourPrognosticScore\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Prognostic Score of the Tumour\"},{\"name\":\"tumourPresentation\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"TumourPresentation\",\"symbols\":[\"FIRST_PRESENTATION\",\"RECURRENCE\",\"UNKNOWN\"]}],\"doc\":\"In GMS, tumour presentation\"},{\"name\":\"primaryOrMetastatic\",\"type\":[\"null\",{\"type\":\"enum\",\"name\":\"PrimaryOrMetastatic\",\"symbols\":[\"PRIMARY\",\"METASTATIC\",\"UNKNOWN\",\"NOT_APPLICABLE\"]}],\"doc\":\"In GMS, primary or metastatic\"}]}}],\"doc\":\"In GMS, for all tumours for the CancerParticipant, independent of any samples\"},{\"name\":\"previousTreatment\",\"type\":[\"null\",{\"type\":\"array\",\"items\":\"PreviousTreatment\"}],\"doc\":\"In GMS, any previous treatment recorded in TOMs\"}]}],\"doc\":\"Cancer Participant\"},{\"name\":\"clinicalIndication\",\"type\":{\"type\":\"record\",\"name\":\"ClinicalIndication\",\"fields\":[{\"name\":\"clinicalIndicationUid\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"GUID of Clinical Indication for the Referral\"},{\"name\":\"clinicalIndicationCode\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Code of Clinical Indication, e.g. (RT-13)\"},{\"name\":\"clinicalIndicationFullName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Clinical Indication Full Name\"},{\"name\":\"clinicalIndicationVersionNumber\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Clinical Indication version number\"}]},\"doc\":\"Clinical Indication of the referral\"},{\"name\":\"collection\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"doc\":\"Collection common identifier for research cohorts using GMS Framework\"}]}");
  public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
  /** Referral unique identifier (to be displayed) */
   private java.lang.String referralId;
  /** Referral internal unique identifier */
   private java.lang.String referralUid;
  /** List of tests associated to the referral */
   private java.util.List referralTests;
  /** Requesting Organisation of the Referral */
   private org.gel.models.participant.avro.OrganisationNgis requester;
  /** Date of referral being created */
   private org.gel.models.participant.avro.Date orderingDate;
  /** Pedigree */
   private org.gel.models.participant.avro.Pedigree pedigree;
  /** Cancer Participant */
   private org.gel.models.participant.avro.CancerParticipant cancerParticipant;
  /** Clinical Indication of the referral */
   private org.gel.models.participant.avro.ClinicalIndication clinicalIndication;
  /** Collection common identifier for research cohorts using GMS Framework */
   private java.lang.String collection;

  /**
   * Default constructor.  Note that this does not initialize fields
   * to their default values from the schema.  If that is desired then
   * one should use newBuilder(). 
   */
  public Referral() {}

  /**
   * All-args constructor.
   */
  public Referral(java.lang.String referralId, java.lang.String referralUid, java.util.List referralTests, org.gel.models.participant.avro.OrganisationNgis requester, org.gel.models.participant.avro.Date orderingDate, org.gel.models.participant.avro.Pedigree pedigree, org.gel.models.participant.avro.CancerParticipant cancerParticipant, org.gel.models.participant.avro.ClinicalIndication clinicalIndication, java.lang.String collection) {
    this.referralId = referralId;
    this.referralUid = referralUid;
    this.referralTests = referralTests;
    this.requester = requester;
    this.orderingDate = orderingDate;
    this.pedigree = pedigree;
    this.cancerParticipant = cancerParticipant;
    this.clinicalIndication = clinicalIndication;
    this.collection = collection;
  }

  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
  // Used by DatumWriter.  Applications should not call. 
  public java.lang.Object get(int field$) {
    switch (field$) {
    case 0: return referralId;
    case 1: return referralUid;
    case 2: return referralTests;
    case 3: return requester;
    case 4: return orderingDate;
    case 5: return pedigree;
    case 6: return cancerParticipant;
    case 7: return clinicalIndication;
    case 8: return collection;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }
  // Used by DatumReader.  Applications should not call. 
  @SuppressWarnings(value="unchecked")
  public void put(int field$, java.lang.Object value$) {
    switch (field$) {
    case 0: referralId = (java.lang.String)value$; break;
    case 1: referralUid = (java.lang.String)value$; break;
    case 2: referralTests = (java.util.List)value$; break;
    case 3: requester = (org.gel.models.participant.avro.OrganisationNgis)value$; break;
    case 4: orderingDate = (org.gel.models.participant.avro.Date)value$; break;
    case 5: pedigree = (org.gel.models.participant.avro.Pedigree)value$; break;
    case 6: cancerParticipant = (org.gel.models.participant.avro.CancerParticipant)value$; break;
    case 7: clinicalIndication = (org.gel.models.participant.avro.ClinicalIndication)value$; break;
    case 8: collection = (java.lang.String)value$; break;
    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
    }
  }

  /**
   * Gets the value of the 'referralId' field.
   * Referral unique identifier (to be displayed)   */
  public java.lang.String getReferralId() {
    return referralId;
  }

  /**
   * Sets the value of the 'referralId' field.
   * Referral unique identifier (to be displayed)   * @param value the value to set.
   */
  public void setReferralId(java.lang.String value) {
    this.referralId = value;
  }

  /**
   * Gets the value of the 'referralUid' field.
   * Referral internal unique identifier   */
  public java.lang.String getReferralUid() {
    return referralUid;
  }

  /**
   * Sets the value of the 'referralUid' field.
   * Referral internal unique identifier   * @param value the value to set.
   */
  public void setReferralUid(java.lang.String value) {
    this.referralUid = value;
  }

  /**
   * Gets the value of the 'referralTests' field.
   * List of tests associated to the referral   */
  public java.util.List getReferralTests() {
    return referralTests;
  }

  /**
   * Sets the value of the 'referralTests' field.
   * List of tests associated to the referral   * @param value the value to set.
   */
  public void setReferralTests(java.util.List value) {
    this.referralTests = value;
  }

  /**
   * Gets the value of the 'requester' field.
   * Requesting Organisation of the Referral   */
  public org.gel.models.participant.avro.OrganisationNgis getRequester() {
    return requester;
  }

  /**
   * Sets the value of the 'requester' field.
   * Requesting Organisation of the Referral   * @param value the value to set.
   */
  public void setRequester(org.gel.models.participant.avro.OrganisationNgis value) {
    this.requester = value;
  }

  /**
   * Gets the value of the 'orderingDate' field.
   * Date of referral being created   */
  public org.gel.models.participant.avro.Date getOrderingDate() {
    return orderingDate;
  }

  /**
   * Sets the value of the 'orderingDate' field.
   * Date of referral being created   * @param value the value to set.
   */
  public void setOrderingDate(org.gel.models.participant.avro.Date value) {
    this.orderingDate = value;
  }

  /**
   * Gets the value of the 'pedigree' field.
   * Pedigree   */
  public org.gel.models.participant.avro.Pedigree getPedigree() {
    return pedigree;
  }

  /**
   * Sets the value of the 'pedigree' field.
   * Pedigree   * @param value the value to set.
   */
  public void setPedigree(org.gel.models.participant.avro.Pedigree value) {
    this.pedigree = value;
  }

  /**
   * Gets the value of the 'cancerParticipant' field.
   * Cancer Participant   */
  public org.gel.models.participant.avro.CancerParticipant getCancerParticipant() {
    return cancerParticipant;
  }

  /**
   * Sets the value of the 'cancerParticipant' field.
   * Cancer Participant   * @param value the value to set.
   */
  public void setCancerParticipant(org.gel.models.participant.avro.CancerParticipant value) {
    this.cancerParticipant = value;
  }

  /**
   * Gets the value of the 'clinicalIndication' field.
   * Clinical Indication of the referral   */
  public org.gel.models.participant.avro.ClinicalIndication getClinicalIndication() {
    return clinicalIndication;
  }

  /**
   * Sets the value of the 'clinicalIndication' field.
   * Clinical Indication of the referral   * @param value the value to set.
   */
  public void setClinicalIndication(org.gel.models.participant.avro.ClinicalIndication value) {
    this.clinicalIndication = value;
  }

  /**
   * Gets the value of the 'collection' field.
   * Collection common identifier for research cohorts using GMS Framework   */
  public java.lang.String getCollection() {
    return collection;
  }

  /**
   * Sets the value of the 'collection' field.
   * Collection common identifier for research cohorts using GMS Framework   * @param value the value to set.
   */
  public void setCollection(java.lang.String value) {
    this.collection = value;
  }

  /** Creates a new Referral RecordBuilder */
  public static org.gel.models.participant.avro.Referral.Builder newBuilder() {
    return new org.gel.models.participant.avro.Referral.Builder();
  }
  
  /** Creates a new Referral RecordBuilder by copying an existing Builder */
  public static org.gel.models.participant.avro.Referral.Builder newBuilder(org.gel.models.participant.avro.Referral.Builder other) {
    return new org.gel.models.participant.avro.Referral.Builder(other);
  }
  
  /** Creates a new Referral RecordBuilder by copying an existing Referral instance */
  public static org.gel.models.participant.avro.Referral.Builder newBuilder(org.gel.models.participant.avro.Referral other) {
    return new org.gel.models.participant.avro.Referral.Builder(other);
  }
  
  /**
   * RecordBuilder for Referral instances.
   */
  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
    implements org.apache.avro.data.RecordBuilder {

    private java.lang.String referralId;
    private java.lang.String referralUid;
    private java.util.List referralTests;
    private org.gel.models.participant.avro.OrganisationNgis requester;
    private org.gel.models.participant.avro.Date orderingDate;
    private org.gel.models.participant.avro.Pedigree pedigree;
    private org.gel.models.participant.avro.CancerParticipant cancerParticipant;
    private org.gel.models.participant.avro.ClinicalIndication clinicalIndication;
    private java.lang.String collection;

    /** Creates a new Builder */
    private Builder() {
      super(org.gel.models.participant.avro.Referral.SCHEMA$);
    }
    
    /** Creates a Builder by copying an existing Builder */
    private Builder(org.gel.models.participant.avro.Referral.Builder other) {
      super(other);
      if (isValidValue(fields()[0], other.referralId)) {
        this.referralId = data().deepCopy(fields()[0].schema(), other.referralId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.referralUid)) {
        this.referralUid = data().deepCopy(fields()[1].schema(), other.referralUid);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.referralTests)) {
        this.referralTests = data().deepCopy(fields()[2].schema(), other.referralTests);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.requester)) {
        this.requester = data().deepCopy(fields()[3].schema(), other.requester);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.orderingDate)) {
        this.orderingDate = data().deepCopy(fields()[4].schema(), other.orderingDate);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.pedigree)) {
        this.pedigree = data().deepCopy(fields()[5].schema(), other.pedigree);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.cancerParticipant)) {
        this.cancerParticipant = data().deepCopy(fields()[6].schema(), other.cancerParticipant);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.clinicalIndication)) {
        this.clinicalIndication = data().deepCopy(fields()[7].schema(), other.clinicalIndication);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.collection)) {
        this.collection = data().deepCopy(fields()[8].schema(), other.collection);
        fieldSetFlags()[8] = true;
      }
    }
    
    /** Creates a Builder by copying an existing Referral instance */
    private Builder(org.gel.models.participant.avro.Referral other) {
            super(org.gel.models.participant.avro.Referral.SCHEMA$);
      if (isValidValue(fields()[0], other.referralId)) {
        this.referralId = data().deepCopy(fields()[0].schema(), other.referralId);
        fieldSetFlags()[0] = true;
      }
      if (isValidValue(fields()[1], other.referralUid)) {
        this.referralUid = data().deepCopy(fields()[1].schema(), other.referralUid);
        fieldSetFlags()[1] = true;
      }
      if (isValidValue(fields()[2], other.referralTests)) {
        this.referralTests = data().deepCopy(fields()[2].schema(), other.referralTests);
        fieldSetFlags()[2] = true;
      }
      if (isValidValue(fields()[3], other.requester)) {
        this.requester = data().deepCopy(fields()[3].schema(), other.requester);
        fieldSetFlags()[3] = true;
      }
      if (isValidValue(fields()[4], other.orderingDate)) {
        this.orderingDate = data().deepCopy(fields()[4].schema(), other.orderingDate);
        fieldSetFlags()[4] = true;
      }
      if (isValidValue(fields()[5], other.pedigree)) {
        this.pedigree = data().deepCopy(fields()[5].schema(), other.pedigree);
        fieldSetFlags()[5] = true;
      }
      if (isValidValue(fields()[6], other.cancerParticipant)) {
        this.cancerParticipant = data().deepCopy(fields()[6].schema(), other.cancerParticipant);
        fieldSetFlags()[6] = true;
      }
      if (isValidValue(fields()[7], other.clinicalIndication)) {
        this.clinicalIndication = data().deepCopy(fields()[7].schema(), other.clinicalIndication);
        fieldSetFlags()[7] = true;
      }
      if (isValidValue(fields()[8], other.collection)) {
        this.collection = data().deepCopy(fields()[8].schema(), other.collection);
        fieldSetFlags()[8] = true;
      }
    }

    /** Gets the value of the 'referralId' field */
    public java.lang.String getReferralId() {
      return referralId;
    }
    
    /** Sets the value of the 'referralId' field */
    public org.gel.models.participant.avro.Referral.Builder setReferralId(java.lang.String value) {
      validate(fields()[0], value);
      this.referralId = value;
      fieldSetFlags()[0] = true;
      return this; 
    }
    
    /** Checks whether the 'referralId' field has been set */
    public boolean hasReferralId() {
      return fieldSetFlags()[0];
    }
    
    /** Clears the value of the 'referralId' field */
    public org.gel.models.participant.avro.Referral.Builder clearReferralId() {
      referralId = null;
      fieldSetFlags()[0] = false;
      return this;
    }

    /** Gets the value of the 'referralUid' field */
    public java.lang.String getReferralUid() {
      return referralUid;
    }
    
    /** Sets the value of the 'referralUid' field */
    public org.gel.models.participant.avro.Referral.Builder setReferralUid(java.lang.String value) {
      validate(fields()[1], value);
      this.referralUid = value;
      fieldSetFlags()[1] = true;
      return this; 
    }
    
    /** Checks whether the 'referralUid' field has been set */
    public boolean hasReferralUid() {
      return fieldSetFlags()[1];
    }
    
    /** Clears the value of the 'referralUid' field */
    public org.gel.models.participant.avro.Referral.Builder clearReferralUid() {
      referralUid = null;
      fieldSetFlags()[1] = false;
      return this;
    }

    /** Gets the value of the 'referralTests' field */
    public java.util.List getReferralTests() {
      return referralTests;
    }
    
    /** Sets the value of the 'referralTests' field */
    public org.gel.models.participant.avro.Referral.Builder setReferralTests(java.util.List value) {
      validate(fields()[2], value);
      this.referralTests = value;
      fieldSetFlags()[2] = true;
      return this; 
    }
    
    /** Checks whether the 'referralTests' field has been set */
    public boolean hasReferralTests() {
      return fieldSetFlags()[2];
    }
    
    /** Clears the value of the 'referralTests' field */
    public org.gel.models.participant.avro.Referral.Builder clearReferralTests() {
      referralTests = null;
      fieldSetFlags()[2] = false;
      return this;
    }

    /** Gets the value of the 'requester' field */
    public org.gel.models.participant.avro.OrganisationNgis getRequester() {
      return requester;
    }
    
    /** Sets the value of the 'requester' field */
    public org.gel.models.participant.avro.Referral.Builder setRequester(org.gel.models.participant.avro.OrganisationNgis value) {
      validate(fields()[3], value);
      this.requester = value;
      fieldSetFlags()[3] = true;
      return this; 
    }
    
    /** Checks whether the 'requester' field has been set */
    public boolean hasRequester() {
      return fieldSetFlags()[3];
    }
    
    /** Clears the value of the 'requester' field */
    public org.gel.models.participant.avro.Referral.Builder clearRequester() {
      requester = null;
      fieldSetFlags()[3] = false;
      return this;
    }

    /** Gets the value of the 'orderingDate' field */
    public org.gel.models.participant.avro.Date getOrderingDate() {
      return orderingDate;
    }
    
    /** Sets the value of the 'orderingDate' field */
    public org.gel.models.participant.avro.Referral.Builder setOrderingDate(org.gel.models.participant.avro.Date value) {
      validate(fields()[4], value);
      this.orderingDate = value;
      fieldSetFlags()[4] = true;
      return this; 
    }
    
    /** Checks whether the 'orderingDate' field has been set */
    public boolean hasOrderingDate() {
      return fieldSetFlags()[4];
    }
    
    /** Clears the value of the 'orderingDate' field */
    public org.gel.models.participant.avro.Referral.Builder clearOrderingDate() {
      orderingDate = null;
      fieldSetFlags()[4] = false;
      return this;
    }

    /** Gets the value of the 'pedigree' field */
    public org.gel.models.participant.avro.Pedigree getPedigree() {
      return pedigree;
    }
    
    /** Sets the value of the 'pedigree' field */
    public org.gel.models.participant.avro.Referral.Builder setPedigree(org.gel.models.participant.avro.Pedigree value) {
      validate(fields()[5], value);
      this.pedigree = value;
      fieldSetFlags()[5] = true;
      return this; 
    }
    
    /** Checks whether the 'pedigree' field has been set */
    public boolean hasPedigree() {
      return fieldSetFlags()[5];
    }
    
    /** Clears the value of the 'pedigree' field */
    public org.gel.models.participant.avro.Referral.Builder clearPedigree() {
      pedigree = null;
      fieldSetFlags()[5] = false;
      return this;
    }

    /** Gets the value of the 'cancerParticipant' field */
    public org.gel.models.participant.avro.CancerParticipant getCancerParticipant() {
      return cancerParticipant;
    }
    
    /** Sets the value of the 'cancerParticipant' field */
    public org.gel.models.participant.avro.Referral.Builder setCancerParticipant(org.gel.models.participant.avro.CancerParticipant value) {
      validate(fields()[6], value);
      this.cancerParticipant = value;
      fieldSetFlags()[6] = true;
      return this; 
    }
    
    /** Checks whether the 'cancerParticipant' field has been set */
    public boolean hasCancerParticipant() {
      return fieldSetFlags()[6];
    }
    
    /** Clears the value of the 'cancerParticipant' field */
    public org.gel.models.participant.avro.Referral.Builder clearCancerParticipant() {
      cancerParticipant = null;
      fieldSetFlags()[6] = false;
      return this;
    }

    /** Gets the value of the 'clinicalIndication' field */
    public org.gel.models.participant.avro.ClinicalIndication getClinicalIndication() {
      return clinicalIndication;
    }
    
    /** Sets the value of the 'clinicalIndication' field */
    public org.gel.models.participant.avro.Referral.Builder setClinicalIndication(org.gel.models.participant.avro.ClinicalIndication value) {
      validate(fields()[7], value);
      this.clinicalIndication = value;
      fieldSetFlags()[7] = true;
      return this; 
    }
    
    /** Checks whether the 'clinicalIndication' field has been set */
    public boolean hasClinicalIndication() {
      return fieldSetFlags()[7];
    }
    
    /** Clears the value of the 'clinicalIndication' field */
    public org.gel.models.participant.avro.Referral.Builder clearClinicalIndication() {
      clinicalIndication = null;
      fieldSetFlags()[7] = false;
      return this;
    }

    /** Gets the value of the 'collection' field */
    public java.lang.String getCollection() {
      return collection;
    }
    
    /** Sets the value of the 'collection' field */
    public org.gel.models.participant.avro.Referral.Builder setCollection(java.lang.String value) {
      validate(fields()[8], value);
      this.collection = value;
      fieldSetFlags()[8] = true;
      return this; 
    }
    
    /** Checks whether the 'collection' field has been set */
    public boolean hasCollection() {
      return fieldSetFlags()[8];
    }
    
    /** Clears the value of the 'collection' field */
    public org.gel.models.participant.avro.Referral.Builder clearCollection() {
      collection = null;
      fieldSetFlags()[8] = false;
      return this;
    }

    @Override
    public Referral build() {
      try {
        Referral record = new Referral();
        record.referralId = fieldSetFlags()[0] ? this.referralId : (java.lang.String) defaultValue(fields()[0]);
        record.referralUid = fieldSetFlags()[1] ? this.referralUid : (java.lang.String) defaultValue(fields()[1]);
        record.referralTests = fieldSetFlags()[2] ? this.referralTests : (java.util.List) defaultValue(fields()[2]);
        record.requester = fieldSetFlags()[3] ? this.requester : (org.gel.models.participant.avro.OrganisationNgis) defaultValue(fields()[3]);
        record.orderingDate = fieldSetFlags()[4] ? this.orderingDate : (org.gel.models.participant.avro.Date) defaultValue(fields()[4]);
        record.pedigree = fieldSetFlags()[5] ? this.pedigree : (org.gel.models.participant.avro.Pedigree) defaultValue(fields()[5]);
        record.cancerParticipant = fieldSetFlags()[6] ? this.cancerParticipant : (org.gel.models.participant.avro.CancerParticipant) defaultValue(fields()[6]);
        record.clinicalIndication = fieldSetFlags()[7] ? this.clinicalIndication : (org.gel.models.participant.avro.ClinicalIndication) defaultValue(fields()[7]);
        record.collection = fieldSetFlags()[8] ? this.collection : (java.lang.String) defaultValue(fields()[8]);
        return record;
      } catch (Exception e) {
        throw new org.apache.avro.AvroRuntimeException(e);
      }
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy