/// <summary> /// Creates and hydrates the 'OrderDetails' section. /// </summary> /// <param name="mandatorySectionsOnly">Includes on the mandatory items</param> /// <returns>A hydrated 'OrderDetails' object.</returns> public static OrderDetails CreateOrderDetails(Boolean mandatorySectionsOnly) { // Order Details var orderDetails = DiagnosticImagingReport.CreateOrderDetails(); // Requester Order Identifier orderDetails.RequesterOrderIdentifier = BaseCDAModel.CreateIdentifier("1.2.36.1.2001.1005.52.8003620833333789", "10523479"); // Requester orderDetails.Requester = GenericObjectReuseSample.CreateRequester(mandatorySectionsOnly); return(orderDetails); }
/// <summary> /// Creates and hydrates the 'OrderDetails' section. /// </summary> /// <param name="mandatorySectionsOnly">Includes on the mandatory items</param> /// <returns>A hydrated 'OrderDetails' object.</returns> public static OrderDetails CreateOrderDetails(Boolean mandatorySectionsOnly) { // Order Details var orderDetails = DiagnosticImagingReport.CreateOrderDetails(); // Requester Order Identifier orderDetails.AccessionNumber = DiagnosticImagingReport.CreateAccessionNumber("8003620833333789", "10523475"); if (!mandatorySectionsOnly) { // Requester Order Identifier - Note: Use BaseCDAModel.CreateIdentifier for a non default root element eg.. BaseCDAModel.CreateIdentifier("1.2.36.1.2001.1005.52.8003621231166540", "23451"); orderDetails.RequesterOrderIdentifier = DiagnosticImagingReport.CreateRequesterOrderIdentifier("8003620833333789", "23451"); } // Requester orderDetails.Requester = GenericObjectReuseSample.CreateRequester(mandatorySectionsOnly); return(orderDetails); }
/// <summary> /// Creates and hydrates the 'OrderDetails' section. /// </summary> /// <param name="mandatorySectionsOnly">Includes on the mandatory items</param> /// <returns>A hydrated 'OrderDetails' object.</returns> public static OrderDetails CreateOrderDetails(Boolean mandatorySectionsOnly) { // Order Details var orderDetails = DiagnosticImagingReport.CreateOrderDetails(); if (!mandatorySectionsOnly) { // Requester Order Identifier orderDetails.RequesterOrderIdentifier = BaseCDAModel.CreateIdentifier("1.2.36.1.2001.1005.52.8003620833333789", "10523479"); // Requester Order Identifier orderDetails.RequestedTestName = BaseCDAModel.CreateCodableText("26604007", CodingSystem.SNOMED, "Complete blood count"); } // Requester orderDetails.Requester = GenericObjectReuseSample.CreateRequester(mandatorySectionsOnly); return(orderDetails); }
/// <summary> /// This sample populates both the mandatory and optional Sections / Entries depending on the /// mandatorySectionsOnly Boolean /// </summary> internal static PathologyResultReport PopulatedPathologyResultReport(Boolean mandatorySectionsOnly) { var pathologyResultReport = PathologyResultReport.CreatePathologyResultReport(); // Include Logo pathologyResultReport.IncludeLogo = true; pathologyResultReport.LogoPath = OutputFolderPath; // Set Creation Time pathologyResultReport.DocumentCreationTime = new ISO8601DateTime(DateTime.Now); #region Setup and populate the CDA context model // Setup and populate the CDA context model var cdaContext = PathologyResultReport.CreateCDAContext(); // Document Id cdaContext.DocumentId = BaseCDAModel.CreateIdentifier(BaseCDAModel.CreateOid(), null); // Set Id cdaContext.SetId = BaseCDAModel.CreateIdentifier(BaseCDAModel.CreateGuid(), null); // CDA Context Version cdaContext.Version = "1"; // Custodian cdaContext.Custodian = BaseCDAModel.CreateCustodian(); GenericObjectReuseSample.HydrateCustodian(cdaContext.Custodian, "Pathology Queensland", mandatorySectionsOnly); // Legal Authenticator cdaContext.LegalAuthenticator = BaseCDAModel.CreateLegalAuthenticator(); GenericObjectReuseSample.HydrateAuthenticator(cdaContext.LegalAuthenticator, mandatorySectionsOnly); pathologyResultReport.CDAContext = cdaContext; #endregion // Setup and Populate the SCS Context model #region Setup and Populate the SCS Context model pathologyResultReport.SCSContext = PathologyResultReport.CreateSCSContext(); // Author Health Care Provider pathologyResultReport.SCSContext.Author = BaseCDAModel.CreateAuthorHealthcareProvider(); GenericObjectReuseSample.HydrateAuthorHealthcareProvider(pathologyResultReport.SCSContext.Author, "Pathology Queensland", mandatorySectionsOnly); // The Reporting Pathologist pathologyResultReport.SCSContext.ReportingPathologist = CreateReportingPathologist(mandatorySectionsOnly); // Order Details pathologyResultReport.SCSContext.OrderDetails = CreateOrderDetails(mandatorySectionsOnly); // Subject Of Care pathologyResultReport.SCSContext.SubjectOfCare = BaseCDAModel.CreateSubjectOfCare(); GenericObjectReuseSample.HydrateSubjectofCare(pathologyResultReport.SCSContext.SubjectOfCare, mandatorySectionsOnly); #endregion #region Setup and populate the SCS Content model // Setup and populate the SCS Content model pathologyResultReport.SCSContent = PathologyResultReport.CreateSCSContent(); // Pathology Test Result pathologyResultReport.SCSContent.PathologyTestResult = new List <PathologyTestResult> { CreatePathologyTestResult(mandatorySectionsOnly ? null : "DR Arreza Araceli"), CreatePathologyTestResult(mandatorySectionsOnly ? null : "DR Arshi Lakdawala") }; // Related Document pathologyResultReport.SCSContent.RelatedDocument = CreateRelatedDocument(mandatorySectionsOnly); #endregion return(pathologyResultReport); }
/// <summary> /// This sample populates both the mandatory and optional Sections / Entries depending on the /// mandatorySectionsOnly Boolean /// </summary> internal static AdvanceCareInformation PopulatedAdvanceCareInformation(Boolean mandatorySectionsOnly, AuthorType authorType) { var advanceCareInformation = AdvanceCareInformation.CreateAdvanceCareInformation(); // Include Logo advanceCareInformation.IncludeLogo = true; advanceCareInformation.LogoPath = OutputFolderPath; // Set Creation Time advanceCareInformation.DocumentCreationTime = new ISO8601DateTime(DateTime.Now); #region Setup and populate the CDA context model // Setup and populate the CDA context model var cdaContext = AdvanceCareInformation.CreateCDAContext(); // Document Id cdaContext.DocumentId = BaseCDAModel.CreateIdentifier(BaseCDAModel.CreateOid()); // Set Id cdaContext.SetId = BaseCDAModel.CreateIdentifier(BaseCDAModel.CreateGuid()); // CDA Context Version cdaContext.Version = "1"; // Custodian cdaContext.Custodian = BaseCDAModel.CreateCustodian(); GenericObjectReuseSample.HydrateCustodian(cdaContext.Custodian, "Organisation Name", mandatorySectionsOnly); // Legal Authenticator cdaContext.LegalAuthenticator = BaseCDAModel.CreateLegalAuthenticator(); GenericObjectReuseSample.HydrateAuthenticator(cdaContext.LegalAuthenticator, mandatorySectionsOnly); advanceCareInformation.CDAContext = cdaContext; #endregion #region Setup and Populate the SCS Context model // Setup and Populate the SCS Context model advanceCareInformation.SCSContext = AdvanceCareInformation.CreateSCSContext(); // Switch on the author enumerator. switch (authorType) { case AuthorType.AuthorHealthcareProvider: // Create Author Healthcare Provider var authorHealthcareProvider = BaseCDAModel.CreateAuthorHealthcareProvider(); GenericObjectReuseSample.HydrateAuthorHealthcareProvider(authorHealthcareProvider, "Organisation Name", mandatorySectionsOnly); advanceCareInformation.SCSContext.Author = authorHealthcareProvider; break; case AuthorType.AuthorNonHealthcareProvider: // Create Author Non Healthcare Provider var authorNonHealthcareProvider = BaseCDAModel.CreateAuthorPerson(); GenericObjectReuseSample.HydrateAuthorNonHealthcareProvider(authorNonHealthcareProvider, mandatorySectionsOnly); advanceCareInformation.SCSContext.Author = authorNonHealthcareProvider; break; } advanceCareInformation.SCSContext.SubjectOfCare = BaseCDAModel.CreateSubjectOfCare(); GenericObjectReuseSample.HydrateSubjectofCare(advanceCareInformation.SCSContext.SubjectOfCare, mandatorySectionsOnly); // REMOVE THESE FIELDS AS NOT ALLOWED IN ACI advanceCareInformation.SCSContext.SubjectOfCare.Participant.Person.DateOfDeath = null; advanceCareInformation.SCSContext.SubjectOfCare.Participant.Person.DateOfDeathAccuracyIndicator = null; advanceCareInformation.SCSContext.SubjectOfCare.Participant.Person.SourceOfDeathNotification = null; #endregion #region Setup and populate the SCS Content model // Setup and populate the SCS Content model advanceCareInformation.SCSContent = AdvanceCareInformation.CreateSCSContent(); // Related Information advanceCareInformation.SCSContent.DocumentDetails = CreateRelatedDocument(mandatorySectionsOnly); #endregion return(advanceCareInformation); }
/// <summary> /// This sample populates both the mandatory and optional Sections / Entries depending on the /// mandatorySectionsOnly Boolean /// </summary> internal static DiagnosticImagingReport PopulatedDiagnosticImagingReport(Boolean mandatorySectionsOnly) { var diagnosticImagingReport = DiagnosticImagingReport.CreateDiagnosticImagingReport(); // Include Logo diagnosticImagingReport.IncludeLogo = true; diagnosticImagingReport.LogoPath = OutputFolderPath; // Set Creation Time diagnosticImagingReport.DocumentCreationTime = new ISO8601DateTime(DateTime.Now); #region Setup and populate the CDA context model // Setup and populate the CDA context model var cdaContext = DiagnosticImagingReport.CreateCDAContext(); // Document Id cdaContext.DocumentId = BaseCDAModel.CreateIdentifier(BaseCDAModel.CreateOid()); // Set Id cdaContext.SetId = BaseCDAModel.CreateIdentifier(BaseCDAModel.CreateGuid()); // CDA Context Version cdaContext.Version = "1"; // Custodian cdaContext.Custodian = BaseCDAModel.CreateCustodian(); GenericObjectReuseSample.HydrateCustodian(cdaContext.Custodian, "Queensland Diagnostic Services", mandatorySectionsOnly); // Legal Authenticator cdaContext.LegalAuthenticator = BaseCDAModel.CreateLegalAuthenticator(); GenericObjectReuseSample.HydrateAuthenticator(cdaContext.LegalAuthenticator, mandatorySectionsOnly); diagnosticImagingReport.CDAContext = cdaContext; #endregion #region Setup and Populate the SCS Context model // Setup and Populate the SCS Context model diagnosticImagingReport.SCSContext = DiagnosticImagingReport.CreateSCSContext(); // Reporting Radiologist diagnosticImagingReport.SCSContext.ReportingRadiologist = CreateReportingRadiologist(mandatorySectionsOnly); // Order Details diagnosticImagingReport.SCSContext.OrderDetails = CreateOrderDetails(mandatorySectionsOnly); // Author Health Care Provider diagnosticImagingReport.SCSContext.Author = BaseCDAModel.CreateAuthorHealthcareProvider(); GenericObjectReuseSample.HydrateAuthorHealthcareProvider(diagnosticImagingReport.SCSContext.Author, "Queensland Diagnostic Services", mandatorySectionsOnly); // Subject Of Care diagnosticImagingReport.SCSContext.SubjectOfCare = BaseCDAModel.CreateSubjectOfCare(); GenericObjectReuseSample.HydrateSubjectofCare(diagnosticImagingReport.SCSContext.SubjectOfCare, mandatorySectionsOnly); #endregion #region Setup and populate the SCS Content model // Setup and populate the SCS Content model diagnosticImagingReport.SCSContent = DiagnosticImagingReport.CreateSCSContent(); // Imaging Examination Results diagnosticImagingReport.SCSContent.ImagingExaminationResults = new List <IDiagnosticImagingExaminationResult> { CreateDiagnosticImagingResults(mandatorySectionsOnly, true), CreateDiagnosticImagingResults(mandatorySectionsOnly, false) }; // Related Information diagnosticImagingReport.SCSContent.RelatedDocument = CreateRelatedDocument(mandatorySectionsOnly); #endregion return(diagnosticImagingReport); }