/// <summary>
        /// Creates and hydrates the 'SpecimenDetail' section.
        /// </summary>
        /// <returns>A hydrated 'SpecimenDetail' object.</returns>
        public static SpecimenDetail CreateTestSpecimenDetail(Boolean mandatorySectionsOnly)
        {
            // Test Specimen Detail (SPECIMEN)
            SpecimenDetail specimenDetailOne = BaseCDAModel.CreateSpecimenDetail();

            // Date and Time of Collection (Collection DateTime)
            specimenDetailOne.CollectionDateTime = new ISO8601DateTime(DateTimeNow);

            if (!mandatorySectionsOnly)
            {
                // Specimen Tissue Type
                specimenDetailOne.SpecimenTissueType = BaseCDAModel.CreateCodableText("85756007", CodingSystem.SNOMED, "Body tissue structure");

                // Collection Procedure
                specimenDetailOne.CollectionProcedure = BaseCDAModel.CreateCodableText("82078001", CodingSystem.SNOMED, "Collection of blood specimen for laboratory");

                // Anatomical Site (ANATOMICAL LOCATION)
                specimenDetailOne.AnatomicalSite = new List <AnatomicalSite>
                {
                    CreateAnatomicalSite(
                        BaseCDAModel.CreateCodableText("88738008", CodingSystem.SNOMED, "Subcutaneous tissue structure of lateral surface of index finger"),
                        BaseCDAModel.CreateCodableText("7771000", CodingSystem.SNOMED, "Left"),
                        new List <ExternalData>
                    {
                        BaseCDAModel.CreateExternalData(MediaType.JPEG, ImageFileNameAndPath, "Anatomical Site")
                    }
                        ),
                    CreateAnatomicalSite(
                        "Subcutaneous tissue structure of lateral surface of index finger"
                        ),
                };

                // Anatomical Location Description
                specimenDetailOne.PhysicalDescription = "Physical Details Description";

                // Physical Details (PHYSICAL PROPERTIES OF AN OBJECT)
                specimenDetailOne.PhysicalDetails = new List <PhysicalDetails> {
                    BaseCDAModel.CreatePhysicalDetails("6", "ml", BaseCDAModel.CreateExternalData(MediaType.PDF, AttachmentFileNameAndPath, "Physical Details One"))
                };

                // Sampling Preconditions
                specimenDetailOne.SamplingPreconditions = BaseCDAModel.CreateCodableText("16985007", CodingSystem.SNOMED, "fasting");

                // Collection Setting
                specimenDetailOne.CollectionSetting = "Ward 1A";

                // Date and Time of Receipt (DateTime Received)
                specimenDetailOne.ReceivedDateTime = new ISO8601DateTime(DateTime.Now);

                // Parent Specimen Identifier
                specimenDetailOne.ParentSpecimenIdentifier = BaseCDAModel.CreateInstanceIdentifier("1.2.36.84425496912", BaseCDAModel.CreateGuid());

                // Container Identifier
                specimenDetailOne.ContainerIdentifier = BaseCDAModel.CreateInstanceIdentifier("1.2.36.84425496912", BaseCDAModel.CreateGuid());

                // Specimen Identifier
                specimenDetailOne.SpecimenIdentifier = BaseCDAModel.CreateInstanceIdentifier("1.2.36.84425496912", BaseCDAModel.CreateGuid());
            }

            return(specimenDetailOne);
        }
        /// <summary>
        /// Creates and hydrates the 'Pathology Test Results' section.
        /// </summary>
        /// <returns>A hydrated 'PathologyTestResult' object.</returns>
        public static PathologyTestResult CreatePathologyResults(Boolean mandatorySectionsOnly)
        {
            DateTimeNow = DateTime.Now;

            // Pathology test result
            PathologyTestResult pathologyTestResult = BaseCDAModel.CreatePathologyTestResult();

            // Test Result Name
            pathologyTestResult.TestResultName = BaseCDAModel.CreateCodableText("104950002", CodingSystem.SNOMED, "Sulfhaemoglobin measurement");

            // Diagnostic Service
            pathologyTestResult.DiagnosticService = DiagnosticServiceSectionID.Chemistry;

            // Overall Pathology Test Result Status
            pathologyTestResult.OverallTestResultStatus = BaseCDAModel.CreateCodableText(HL7ResultStatus.FinalResultsResultsStoredAndVerifiedCanOnlyBeChangedWithACorrectedResult);

            // Observation Date Time
            pathologyTestResult.ObservationDateTime = new ISO8601DateTime(DateTimeNow);

            if (!mandatorySectionsOnly)
            {
                // Clinical Information Provided
                pathologyTestResult.ClinicalInformationProvided = "Hepatitus";

                //Pathological Diagnosis
                pathologyTestResult.PathologicalDiagnosis = new List <ICodableText>
                {
                    BaseCDAModel.CreateCodableText("17621005", CodingSystem.SNOMED, "Normal"),
                    BaseCDAModel.CreateCodableText("263654008", CodingSystem.SNOMED, "Abnormal")
                };

                // Conclusion
                pathologyTestResult.Conclusion = "Test Result Group Conclusion";

                // Test Result Representation
                pathologyTestResult.TestResultRepresentation = BaseCDAModel.CreateEncapsulatedData();
                pathologyTestResult.TestResultRepresentation.ExternalData = BaseCDAModel.CreateExternalData(MediaType.PDF, AttachmentFileNameAndPath, "Test Result Representation");

                //
                // Demonstrating Text for EncapsulatedData
                //
                //pathologyTestResult.TestResultRepresentation = BaseCDAModel.CreateEncapsulatedData();
                //pathologyTestResult.TestResultRepresentation.Text = "Lipase 150 U/L (RR < 70)";


                // Test Comment
                pathologyTestResult.TestComment = "Test Result Group Comment";

                // Test request details one
                ITestRequest testRequestDetailsOne = BaseCDAModel.CreateTestRequest();

                // Requester Order Identifier
                testRequestDetailsOne.RequesterOrderIdentifier = BaseCDAModel.CreateInstanceIdentifier("1.2.36.1.2001.1005.52.8003620833333789", "10523479");

                // LaboratoryTestResultIdentifier
                testRequestDetailsOne.LaboratoryTestResultIdentifier = BaseCDAModel.CreateInstanceIdentifier(BaseCDAModel.CreateGuid(), "Laboratory Test Result Identifier");

                // Tests Requested Name
                testRequestDetailsOne.TestsRequestedName = new List <ICodableText>
                {
                    BaseCDAModel.CreateCodableText("401324008", CodingSystem.SNOMED, "Urinary microscopy, culture and sensitivities"),
                    BaseCDAModel.CreateCodableText("401324008", CodingSystem.SNOMED, "Urinary microscopy, culture and sensitivities"),
                };


                // Test Request Details
                pathologyTestResult.TestRequestDetails = new List <ITestRequest>
                {
                    testRequestDetailsOne
                };

                // Result Group (PATHOLOGY TEST RESULT GROUP)
                pathologyTestResult.ResultGroup = new List <ITestResultGroup>
                {
                    CreateTestResultGroup(mandatorySectionsOnly)
                };
            }
            else
            {
                // Reporting Pathologist
                pathologyTestResult.ReportingPathologist = CreateReportingPathologist(mandatorySectionsOnly);
            }

            pathologyTestResult.TestSpecimenDetail = new List <SpecimenDetail>
            {
                CreateTestSpecimenDetail(mandatorySectionsOnly)
            };


            return(pathologyTestResult);
        }