Browse Source

修改时间为当前时间前一年

denny 1 năm trước cách đây
mục cha
commit
90a97dcdde

+ 11 - 11
Tools/Flyinsono.DBCopy.Tool/Entities/ReportInfoResults.cs

@@ -378,17 +378,17 @@ namespace Flyinsono.DBCopy.Tool.Entities
             }
         }
 
-        //public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, object value)
-        //{
-        //    if (value == null)
-        //    {
-        //        context.Writer.WriteNull();
-        //    }
-        //    else
-        //    {
-        //        BsonValueSerializer.Instance.Serialize(context, value as BsonValue);
-        //    }
-        //}
+        public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, object value)
+        {
+            if (value == null)
+            {
+                context.Writer.WriteNull();
+            }
+            else
+            {
+                BsonValueSerializer.Instance.Serialize(context, value as BsonValue);
+            }
+        }
     }
 
 

+ 2 - 148
Tools/Flyinsono.DBCopy.Tool/Entities/ReportInfoResultsInfo.cs

@@ -21,9 +21,9 @@ namespace Flyinsono.DBCopy.Tool.Entities
 
         public string Template { get; set; }
         public StorageServerInfo StorageServer { get; set; }
-        public IList<ReportInfoElementDo> ElementCollection { get; set; }
+        public IList<Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement> ElementCollection { get; set; }
 
-        public IList<ReportInfoMeasrueElementDo> MeasureElementCollection { get; set; }
+        public IList<Flyinsono.DBCopy.Tool.Extensions.ReportInfoMeasrueElement> MeasureElementCollection { get; set; }
 
         public AdminInfo User { get; set; }
         public string RecordId { get; set; }
@@ -55,150 +55,4 @@ namespace Flyinsono.DBCopy.Tool.Entities
         /// </summary>
         public IList<QualityControlData> QualityControlDatas { get; set; }
     }
-
-    internal class ReportInfoMeasrueElementDo
-    {
-        public ElementTag ElementTag { get; set; }
-        public IList<ReportMeasureValueElement> ElementCollection { get; set; }
-
-    }
-
-    internal class ReportMeasureValueElementDo
-    {
-        public MeasureTag MeasureTag { get; set; }
-        public TextElementValue ElementValue { get; set; }
-    }
-
-    internal class TextElementValueDo : ElementValue
-    {
-        public TextElementValueDo()
-        {
-            ElementValueType = ElementValueTypes.String;
-        }
-        public TextElementValueDo(string value)
-        {
-            Value = value;
-            ElementValueType = ElementValueTypes.String;
-        }
-    }
-
-    internal class IntegerElementValueDo : ElementValue
-    {
-        public IntegerElementValueDo()
-        {
-
-        }
-        public IntegerElementValueDo(int value)
-        {
-            Value = value;
-            ElementValueType = ElementValueTypes.Integer;
-        }
-
-    }
-
-    internal class DateTimeElementValueDo : ElementValue
-    {
-        public DateTimeElementValueDo()
-        {
-
-        }
-        public DateTimeElementValueDo(DateTime? dateTime)
-        {
-            Value = dateTime;
-            ElementValueType = ElementValueTypes.Datetime;
-        }
-    }
-
-    internal class FloatElementValueDo : ElementValue
-    {
-        public FloatElementValueDo()
-        {
-        }
-        public FloatElementValueDo(float value)
-        {
-            ElementValueType = ElementValueTypes.Float;
-            Value = value;
-        }
-    }
-
-    class FileImageValueDo : ElementValue
-    {
-        public string ExamDataId { get; set; }
-
-        public FileImageValueDo()
-        {
-        }
-        public FileImageValueDo(string value, string examDataId)
-        {
-            Value = value;
-            ExamDataId = examDataId;
-            ElementValueType = ElementValueTypes.FileImage;
-        }
-    }
-
-    class BufferImageValueDo : ElementValue
-    {
-        public BufferImageValueDo()
-        {
-
-        }
-        public BufferImageValueDo(byte[] value)
-        {
-            Value = value;
-            ElementValueType = ElementValueTypes.BufferImage;
-        }
-    }
-
-    internal class ImageListElementValueDo : ElementValue
-    {
-        public ImageListElementValueDo()
-        {
-
-        }
-        public ImageListElementValueDo(List<FileImageValue> value)
-        {
-            Value = value;
-            ElementValueType = ElementValueTypes.ImageList;
-        }
-    }
-
-    internal class StringListElementValueDo : ElementValue
-    {
-        public StringListElementValueDo()
-        {
-
-        }
-        public StringListElementValueDo(List<TextElementValue> value)
-        {
-            Value = value;
-            ElementValueType = ElementValueTypes.StringList;
-        }
-    }
-
-
-    internal class ReportInfoElementDo
-    {
-        public ElementTag ElementTag { get; set; }
-        public ElementValue ElementValue { get; set; }
-        public ReportInfoElementDo()
-        {
-
-        }
-
-        public ReportInfoElementDo(ElementTag elementTag, ElementValue elementValue)
-        {
-            ElementTag = elementTag;
-            ElementValue = elementValue;
-        }
-    }
-    [BsonKnownTypes(typeof(TextElementValue), typeof(IntegerElementValue), typeof(DateTimeElementValue),
-    typeof(FloatElementValue), typeof(FileImageValue), typeof(BufferImageValue), typeof(ImageListElementValue),
-    typeof(StringListElementValue))]
-    internal class ElementValueDo
-    {
-        public object? Value { get; set; }
-
-        public ElementValueTypes ElementValueType { get; set; }
-    }
-
 }

+ 939 - 0
Tools/Flyinsono.DBCopy.Tool/Extensions/ElementValue.cs

@@ -0,0 +1,939 @@
+using MongoDB.Bson.Serialization.Attributes;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Flyinsono.DBCopy.Tool.Extensions
+{
+    internal class ReportInfoMeasrueElement
+    {
+        public ElementTag ElementTag { get; set; }
+        public IList<ReportMeasureValueElement> ElementCollection { get; set; }
+
+    }
+
+    internal class ReportMeasureValueElement
+    {
+        public MeasureTag MeasureTag { get; set; }
+        public TextElementValue ElementValue { get; set; }
+    }
+
+    internal class TextElementValue : ElementValue
+    {
+        public TextElementValue()
+        {
+            ElementValueType = ElementValueTypes.String;
+        }
+        public TextElementValue(string value)
+        {
+            Value = value;
+            ElementValueType = ElementValueTypes.String;
+        }
+    }
+
+    internal class IntegerElementValue : ElementValue
+    {
+        public IntegerElementValue()
+        {
+
+        }
+        public IntegerElementValue(int value)
+        {
+            Value = value;
+            ElementValueType = ElementValueTypes.Integer;
+        }
+
+    }
+
+    internal class DateTimeElementValue : ElementValue
+    {
+        public DateTimeElementValue()
+        {
+
+        }
+        public DateTimeElementValue(DateTime? dateTime)
+        {
+            Value = dateTime;
+            ElementValueType = ElementValueTypes.Datetime;
+        }
+    }
+
+    internal class FloatElementValue : ElementValue
+    {
+        public FloatElementValue()
+        {
+        }
+        public FloatElementValue(float value)
+        {
+            ElementValueType = ElementValueTypes.Float;
+            Value = value;
+        }
+    }
+
+    class FileImageValue : ElementValue
+    {
+        public string ExamDataId { get; set; }
+
+        public FileImageValue()
+        {
+        }
+        public FileImageValue(string value, string examDataId)
+        {
+            Value = value;
+            ExamDataId = examDataId;
+            ElementValueType = ElementValueTypes.FileImage;
+        }
+    }
+
+    class BufferImageValue : ElementValue
+    {
+        public BufferImageValue()
+        {
+
+        }
+        public BufferImageValue(byte[] value)
+        {
+            Value = value;
+            ElementValueType = ElementValueTypes.BufferImage;
+        }
+    }
+
+    internal class ImageListElementValue : ElementValue
+    {
+        public ImageListElementValue()
+        {
+
+        }
+        public ImageListElementValue(List<FileImageValue> value)
+        {
+            Value = value;
+            ElementValueType = ElementValueTypes.ImageList;
+        }
+    }
+
+    internal class StringListElementValue : ElementValue
+    {
+        public StringListElementValue()
+        {
+
+        }
+        public StringListElementValue(List<TextElementValue> value)
+        {
+            Value = value;
+            ElementValueType = ElementValueTypes.StringList;
+        }
+    }
+
+    public enum ElementValueTypes
+    {
+        String,
+        Integer,
+        Float,
+        Datetime,
+        FileImage,
+        BufferImage,
+        ImageList,
+        StringList
+    }
+
+    public class MeasureTag
+    {
+        public const string ReportTemplatePrefix = "ReportTemplate.";
+
+        public string[] AvailableMethods
+        {
+            get => InternalAvailableMethods.ToArray();
+            set => InternalAvailableMethods = value == null ? null : new SortedSet<string>(value);
+        }
+
+        public string BaseType { get; set; }
+
+        public string CalculationId { get; set; }
+        private SortedSet<string> _internalAvailableMethods;
+        private SortedSet<string> InternalAvailableMethods
+        {
+            get => _internalAvailableMethods ?? new SortedSet<string>();
+            set => _internalAvailableMethods = value;
+        }
+
+        public bool IsCustomize => UserId?.StartsWith(ReportTemplatePrefix) ?? false;
+
+        public string MatchId { get; set; }
+
+        public string Method { get; set; }
+
+        public string Mode { get; set; }
+
+        public string Output { get; set; }
+
+        public string OutputV2 { get; set; }
+
+        public string Unit { get; set; }
+
+        public string UserId { get; set; }
+
+        public string UserIdWithoutPrefix => UserId?.Replace(ReportTemplatePrefix, "");
+
+        public string MeasureResultType { get; set; }
+
+    }
+
+    internal class ReportInfoElement
+    {
+        public ElementTag ElementTag { get; set; }
+        public ElementValue ElementValue { get; set; }
+        public ReportInfoElement()
+        {
+
+        }
+
+        public ReportInfoElement(ElementTag elementTag, ElementValue elementValue)
+        {
+            ElementTag = elementTag;
+            ElementValue = elementValue;
+        }
+    }
+    [BsonKnownTypes(typeof(TextElementValue), typeof(IntegerElementValue), typeof(DateTimeElementValue),
+    typeof(FloatElementValue), typeof(FileImageValue), typeof(BufferImageValue), typeof(ImageListElementValue),
+    typeof(StringListElementValue))]
+    internal class ElementValue
+    {
+        public object? Value { get; set; }
+
+        public ElementValueTypes ElementValueType { get; set; }
+    }
+
+    public enum ElementTagType
+    {
+        General,
+        DiagnosticEntry
+    }
+    public class ElementTag : IEquatable<ElementTag>
+    {
+        public static ElementTag PatientTable =
+         new ElementTag("9pbbaa61-a91d-4399-a3f4-df29117d2d59", "PatientTable", true);
+
+        /// <summary>
+        /// Specifies PatientId tag.
+        /// </summary>
+        public static ElementTag PatientId = new ElementTag("90bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientId", true);
+
+        /// <summary>
+        /// Specifies PatientName tag.
+        /// </summary>
+        public static ElementTag PatientName =
+            new ElementTag("91bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientName", true);
+
+        /// <summary>
+        /// Specifies PatientAge tag.
+        /// </summary>
+        public static ElementTag PatientAge =
+            new ElementTag("92bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientAge", true);
+
+        /// <summary>
+        /// Specifies PatientGender tag.
+        /// </summary>
+        public static ElementTag PatientGender =
+            new ElementTag("93bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientGender", true);
+
+        /// <summary>
+        /// Specifies PatientNation phone number.
+        /// </summary>
+        public static ElementTag PatientPhoneNumber =
+            new ElementTag("94bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientPhoneNumber", true);
+
+        /// <summary>
+        /// Specifies PatientExamDate tag.
+        /// </summary>
+        public static ElementTag PatientExamDate =
+            new ElementTag("95bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientExamDate", true);
+
+        /// <summary>
+        /// Specifies PatientInspectionItems tag.
+        /// </summary>
+        public static ElementTag PatientInspectionItems =
+            new ElementTag("96baa61-a91d-4399-a3f4-df29117d2d59", "PatientInspectionItems", true);
+
+        /// <summary>
+        /// Specifies PatientLMP tag.
+        /// </summary>
+        public static ElementTag PatientLMP = new ElementTag("97baa61-a91d-4399-a3f4-df29117d2d59", "PatientLMP", true);
+
+        /// <summary>
+        /// Specifies PatientGA tag.
+        /// </summary>
+        public static ElementTag PatientGA = new ElementTag("98bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientGA", true);
+
+        /// <summary>
+        /// Specifies PatientEDD tag.
+        /// </summary>
+        public static ElementTag PatientEDD =
+            new ElementTag("99bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientEDD", true);
+
+        /// <summary>
+        /// Specifies PatientPerfPhysician tag.
+        /// </summary>
+        public static ElementTag PatientPerfPhysician =
+            new ElementTag("9abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientPerfPhysician", true);
+
+        /// <summary>
+        /// Specifies PatientInspectionSite tag.
+        /// </summary>
+        public static ElementTag PatientInspectionSite =
+            new ElementTag("9bbbaa61-a91d-4399-a3f4-df29117d2d59", "PatientInspectionSite", true);
+
+        /// <summary>
+        /// Specifies disease name tag.
+        /// </summary>
+        public static ElementTag DiseaseName =
+            new ElementTag("9bbbaa61-a91d-4399-a3f4-df29117d2d59", "DiseaseName", true);
+
+        /// <summary>
+        /// Specifies conclusion tag.
+        /// </summary>
+        public static ElementTag Conclusion =
+            new ElementTag("9bbbaa61-a91d-4399-a3f4-df29117d2d59", "Conclusion", true);
+
+        /// <summary>
+        /// Specifies PatientExaminationWay tag.
+        /// </summary>
+        public static ElementTag PatientExaminationWay =
+            new ElementTag("9cbbaa61-a91d-4399-a3f4-df29117d2d59", "PatientExaminationWay", true);
+
+        /// <summary>
+        /// Specifies ReportDescription tag.
+        /// </summary>
+        public static ElementTag ReportDescription =
+            new ElementTag("9dbbaa61-a91d-4399-a3f4-df29117d2d59", "ReportDescription", true, ElementTagType.DiagnosticEntry);
+
+        /// <summary>
+        /// Specifies ReportSummary tag.
+        /// </summary>
+        public static ElementTag ReportSummary =
+            new ElementTag("9ebbaa61-a91d-4399-a3f4-df29117d2d59", "ReportSummary", true, ElementTagType.DiagnosticEntry);
+
+        public static ElementTag DescriptionOfRemoteConsultationPatients =
+            new ElementTag("d62a4a9c-0ad7-4c56-8b45-c3eff679b45b", "DescriptionOfRemoteConsultationPatients", true);
+
+        /// <summary>
+        /// Specifies ReportImages tag.
+        /// </summary>
+        public static ElementTag ReportImages =
+            new ElementTag("9fbbaa61-a91d-4399-a3f4-df29117d2d59", "ReportImages", true);
+
+        /// <summary>
+        /// Specifies Signature tag.
+        /// </summary>
+        public static ElementTag DigitalSignature =
+            new ElementTag("53545af1-59b7-41a8-9bd5-bdba1aaf9891", "DigitalSignature", true);
+        /// <summary>
+        /// Specifies ReportOBGraph tag.
+        /// </summary>
+        public static ElementTag ReportOBGraph =
+            new ElementTag("9a0baa61-a91d-4399-a3f4-df29117d2d59", "ReportOBGraph", true);
+
+        /// <summary>
+        /// Specifies ReportWorkSheet tag.
+        /// </summary>
+        public static ElementTag ReportWorkSheet =
+            new ElementTag("9a1baa61-a91d-4399-a3f4-df29117d2d59", "ReportWorkSheet", true);
+
+        /// <summary>
+        /// Specifies ReportWorkSheet tag.
+        /// </summary>
+        public static ElementTag ReportNormalValueTips =
+            new ElementTag("9b1baa61-a91d-4399-a3f4-df29117d2d59", "ReportNormalValueTips", true);
+
+        /// <summary>
+        /// Specifies PatientCheckNumber tag.
+        /// </summary>
+        public static ElementTag PatientCheckNumber =
+            new ElementTag("9a2baa61-a91d-4399-a3f4-df29117d2d59", "PatientCheckNumber", true);
+
+        /// <summary>
+        /// Specifies PatientHeight tag.
+        /// </summary>
+        public static ElementTag PatientApplicationDepartment = new ElementTag("9a3baa61-a91d-4399-a3f4-df29117d2d59",
+            "PatientApplicationDepartment", true);
+
+        /// <summary>
+        /// Specifies RecordId tag.
+        /// </summary>
+        public static ElementTag RecordId = new ElementTag("9a4baa61-a91d-4399-a3f4-df29117d2d59", "RecordId", true);
+
+        /// <summary>
+        /// Specifies ExamId tag.
+        /// </summary>
+        public static ElementTag ExamId = new ElementTag("9a5baa61-a91d-4399-a3f4-df29117d2d59", "ExamId", true);
+
+        /// <summary>
+        /// Specifies update time.
+        /// </summary>
+        public static ElementTag UpdateTime =
+            new ElementTag("9a6baa61-a91d-4399-a3f4-df29117d2d59", "UpdateTime", true);
+
+        /// <summary>
+        /// Specifies update time.
+        /// </summary>
+        public static ElementTag CreateUserId =
+            new ElementTag("9a7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserId", true);
+
+        public static ElementTag CreateUserName =
+            new ElementTag("9b7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserName", true);
+
+        public static ElementTag CreateUserFirstName =
+            new ElementTag("9c7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserFirstName", true);
+
+        public static ElementTag CreateUserLastName =
+            new ElementTag("9d7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserLastName", true);
+
+        public static ElementTag CreateUserNickName =
+            new ElementTag("9e7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserNickName", true);
+
+        /// <summary>
+        /// Specifies create time.
+        /// </summary>
+        public static ElementTag CreateTime =
+            new ElementTag("9a8baa61-a91d-4399-a3f4-df29117d2d59", "CreateTime", true);
+
+        /// <summary>
+        /// Specifies report type.
+        /// </summary>
+        public static ElementTag ReportType =
+            new ElementTag("9a9baa61-a91d-4399-a3f4-df29117d2d59", "ReportType", true);
+
+        /// <summary>
+        /// Specifies report type.
+        /// </summary>
+        public static ElementTag PatientBirthday =
+            new ElementTag("9aabaa61-a91d-4399-a3f4-df29117d2d59", "PatientBirthday", true);
+
+        /// <summary>
+        /// Specifies PatientDeviceNumber tag.
+        /// </summary>
+        public static ElementTag PatientDeviceNumber =
+            new ElementTag("1abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientDeviceNumber", true);
+
+        /// <summary>
+        /// Specifies PatientDeviceNumber tag.
+        /// </summary>
+        public static ElementTag PatientOutpatientNumber =
+            new ElementTag("2abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientOutpatientNumber", true);
+
+        /// <summary>
+        /// Specifies PatientUltrasonicNumber tag.
+        /// </summary>
+        public static ElementTag PatientUltrasonicNumber =
+            new ElementTag("3abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientUltrasonicNumber", true);
+
+        /// <summary>
+        /// Specifies ReportTime tag.
+        /// </summary>
+        public static ElementTag ReportTime =
+            new ElementTag("4abbaa61-a91d-4399-a3f4-df29117d2d59", "ReportTime", true);
+
+        /// <summary>
+        /// Specifies ConsultationNumber tag.
+        /// </summary>
+        public static ElementTag ConsultationNumber =
+            new ElementTag("1acgaa61-a91d-4397-a3f4-df29144d2d55", "ConsultationNumber", true);
+
+        /// <summary>
+        /// Specifies ReportPhysician tag.
+        /// </summary>
+        public static ElementTag ReportPhysician =
+            new ElementTag("5abbaa61-a91d-4399-a3f4-df29117d2d59", "ReportPhysician", true);
+
+        /// <summary>
+        /// Specifies InspectionPhysician tag.
+        /// </summary>
+        public static ElementTag InspectionPhysician =
+            new ElementTag("6abbaa61-a91d-4399-a3f4-df29117d2d59", "InspectionPhysician", true);
+
+        public static ElementTag ScanPhysician =
+            new ElementTag("26f81427-613d-456a-8a45-7af401d6943a", "ScanPhysician", true);
+
+        public static ElementTag OrganizationInformation =
+            new ElementTag("7382eee6-9b1b-498d-af26-e22ce26a0325", "OrganizationInformation", true);
+
+        /// <summary>
+        /// Specifies HospitalName tag.
+        /// </summary>
+        public static ElementTag HospitalName =
+            new ElementTag("7abbaa61-a91d-4399-a3f4-df29117d2d59", "HospitalName", true);
+
+        /// <summary>
+        /// Specifies HospitalDepartment tag.
+        /// </summary>
+        public static ElementTag HospitalDepartment =
+            new ElementTag("9E4D1A91-44D6-46AE-AF29-34FFCB6A34A9", "HospitalDepartment", true);
+
+        /// <summary>
+        /// Specifies HospitalAddress tag.
+        /// </summary>
+        public static ElementTag HospitalAddress =
+            new ElementTag("A8BF19D0-556C-4C32-B5CB-41EA30027505", "HospitalAddress", true);
+
+        /// <summary>
+        /// Specifies PerformingPhysician tag.
+        /// </summary>
+        public static ElementTag PerformingPhysician =
+            new ElementTag("48EE0F65-B86C-4591-BDAB-14D46EEB4C30", "PerformingPhysician", true);
+
+        /// <summary>
+        /// Specifies ReferringPhysician tag.
+        /// </summary>
+        public static ElementTag ReferringPhysician =
+            new ElementTag("BD4049E6-6847-46FA-A70E-991533BC67F7", "ReferringPhysician", true);
+
+        /// <summary>
+        /// Specifies ObInfo tag.
+        /// </summary>
+        public static ElementTag ObInfo = new ElementTag("877FAFEA-4E47-4E76-A93F-10950B9ABA1A", "ObInfo", true);
+
+        /// <summary>
+        /// Specifies ZScore tag.
+        /// </summary>
+        public static ElementTag ZScore = new ElementTag("CF8D47A2-B3F0-4BD7-B366-B1B44B63D82A", "ZScore", true);
+
+        /// <summary>
+        /// Specifies Fetal Biophysical Score tag.
+        /// </summary>
+        public static ElementTag FetalBiophysicalScore =
+            new ElementTag("157017B8-6FC5-4677-9818-605601D907AC", "FetalBiophysicalScore", true);
+
+        /// <summary>
+        /// Specifies Follicle2D tag.
+        /// </summary>
+        public static ElementTag Follicle =
+            new ElementTag("5347554A-084E-40AB-A7D4-941085B61A84", "Follicle", true);
+
+        /// <summary>
+        /// Specifies AutoFollicle tag.
+        /// </summary>
+        public static ElementTag AutoFollicle =
+            new ElementTag("B38D4CE8-5B1B-4432-8474-EDF70A3FF6CF", "AutoFollicle", true);
+
+        /// <summary>
+        /// Specifies AutoFollicleImages tag.
+        /// </summary>
+        public static ElementTag AutoFollicleImages = new ElementTag("019EA88D-58F0-4639-809D-A5A524DADFC1", "AutoFollicleImages", true);
+
+        /// <summary>
+        /// Specifies AutoFollicle3D tag.
+        /// </summary>
+        public static ElementTag AutoFollicle3D =
+            new ElementTag("66A8781E-9F2B-42B9-997E-A40BDA3C3728", "AutoFollicle3D", true);
+
+        /// <summary>
+        /// Specifies AutoFollicle3DImages tag.
+        /// </summary>
+        public static ElementTag AutoFollicle3DImages = new ElementTag("0E696819-AE15-4AC4-81A4-645A2F53F958", "AutoFollicle3DImages", true);
+
+        /// <summary>
+        /// Specifies AutoOvary tag.
+        /// </summary>
+        public static ElementTag AutoOvary = new ElementTag("5195679C-ED36-4C9E-8106-7B1CD9C181C9", "AutoOvary", true);
+
+        /// <summary>
+        /// Specifies AutoOvaryImages tag.
+        /// </summary>
+        public static ElementTag AutoOvaryImages = new ElementTag("DBECDD4C-5080-4EA5-A2A7-1A7A2FCAC2A9", "AutoOvaryImages", true);
+
+        /// <summary>
+        /// Specifies WMS tag.
+        /// </summary>
+        public static ElementTag Wms = new ElementTag("5B810BC6-6101-4F90-83CE-D31BDE97A07B", "WMS", true);
+
+        /// <summary>
+        /// Specifies StrainRate tag.
+        /// </summary>
+        public static ElementTag StrainRate =
+            new ElementTag("3B466E45-070E-41DF-A00D-D96D5797C85F", "StrainRate", true);
+
+        /// <summary>
+        /// Specifies ReproSummary tag.
+        /// </summary>
+        public static ElementTag ReproSummary = new ElementTag("DFB8A17B-310D-4B14-9F4F-A16E2F500084", "ReproSummary", true);
+
+        /// <summary>
+        /// Specifies GestationalAgeOriginDescription tag.
+        /// </summary>
+        public static ElementTag GestationalAgeOriginDescription =
+            new ElementTag("F46A48B1-96BB-475E-8EF7-5CBFF22AAECB", "GestationalAgeOriginDescription", true);
+
+        /// <summary>
+        /// Specifies GestationalAgeOriginValue tag.
+        /// </summary>
+        public static ElementTag GestationalAgeOriginValue =
+            new ElementTag("9569465B-FCCB-4E04-8B6B-D4624224722D", "GestationalAgeOriginValue", true);
+
+        /// <summary>
+        /// Specifies Owner tag.
+        /// </summary>
+        public static ElementTag Owner = new ElementTag("DB1202FB-51DF-4EB7-903A-2F6740CAD74B", "Owner", true);
+
+        /// <summary>
+        /// Specifies Species tag.
+        /// </summary>
+        public static ElementTag Species = new ElementTag("FC5F7564-B63F-4185-8E1C-FC4BC5046332", "Species", true);
+
+        /// <summary>
+        /// Specifies Breed tag.
+        /// </summary>
+        public static ElementTag Breed = new ElementTag("B7631C99-706A-48D8-A6DF-1C11F90106C9", "Breed", true);
+
+        /// <summary>
+        /// Specifies FetusA tag.
+        /// </summary>
+        public static ElementTag FetusA = new ElementTag("4D916526-9947-4EDE-8630-337632A35627", "FetusA", true);
+
+        /// <summary>
+        /// Specifies FetusB tag.
+        /// </summary>
+        public static ElementTag FetusB = new ElementTag("B5A2AAE5-4DDB-4945-9515-82DB367B04F2", "FetusB", true);
+
+        /// <summary>
+        /// Specifies FetusC tag.
+        /// </summary>
+        public static ElementTag FetusC = new ElementTag("35C22E6B-D15E-43CD-88F9-99AA79C3575D", "FetusC", true);
+
+        /// <summary>
+        /// Specifies FetusD tag.
+        /// </summary>
+        public static ElementTag FetusD = new ElementTag("24498307-BB99-458B-8EC0-AC8434DE491D", "FetusD", true);
+
+        /// <summary>
+        /// Specifies FetusE tag.
+        /// </summary>
+        public static ElementTag FetusE = new ElementTag("AEC6FDB6-1CD4-4C43-896A-2E914B837545", "FetusE", true);
+
+        /// <summary>
+        /// Specifies Patient Height.
+        /// </summary>
+        public static ElementTag PatientHeight =
+            new ElementTag("9556EA12-CFB3-4AD5-8717-1057D1D5A3EE", "PatientHeight", true);
+
+        /// <summary>
+        /// Specifies Patient Weight.
+        /// </summary>
+        public static ElementTag PatientWeight =
+            new ElementTag("0003B8C3-397C-4688-985D-55B757E3855D", "PatientWeight", true);
+
+        /// <summary>
+        /// Specifies BSA.
+        /// </summary>
+        public static ElementTag BSA = new ElementTag("5AAC30D9-FCE3-4FD0-998C-3A9E2D54F312", "BSA", true);
+
+        /// <summary>
+        /// Specifies AB.
+        /// </summary>
+        public static ElementTag AB = new ElementTag("EA33699C-E86D-497B-A9A9-B8AFAF4A11C7", "AB", true);
+
+        /// <summary>
+        /// Specifies Ectopic.
+        /// </summary>
+        public static ElementTag Ectopic = new ElementTag("5B2BF3CE-62B2-4BE8-8685-29DB9A62465B", "Ectopic", true);
+
+        /// <summary>
+        /// Specifies Gravida.
+        /// </summary>
+        public static ElementTag Gravida = new ElementTag("04FA2451-BDD0-45E4-931B-3D01E95123E0", "Gravida", true);
+
+        /// <summary>
+        /// Specifies Para.
+        /// </summary>
+        public static ElementTag Para = new ElementTag("96C987B0-D0C3-445B-BD45-CB10A276E6D7", "Para", true);
+
+        /// <summary>
+        /// Specifies PSA.
+        /// </summary>
+        public static ElementTag PSA = new ElementTag("3969C8BE-7715-4423-919E-51D6EBEBFA8E", "PSA", true);
+
+        /// <summary>
+        /// Specifies PPSACoefficient.
+        /// </summary>
+        public static ElementTag PPSACoefficient =
+            new ElementTag("C64CC111-3557-4B29-ACBF-678816235694", "PPSACoefficient", true);
+
+        /// <summary>
+        /// Specifies BMI.
+        /// </summary>
+        public static ElementTag BMI = new ElementTag("91D8F2DE-331F-49E5-95C0-1AEF9D566185", "BMI", true);
+
+        /// <summary>
+        /// Specifies HR.
+        /// </summary>
+        public static ElementTag HR = new ElementTag("33D46E3F-A089-4B0A-8D1D-F4C7556BD62D", "HR", true);
+
+        /// <summary>
+        /// Specifies SBP.
+        /// </summary>
+        public static ElementTag SBP = new ElementTag("EFB98909-D077-4650-9235-B4C9EA111BA3", "SBP", true);
+
+        /// <summary>
+        /// Specifies DBP.
+        /// </summary>
+        public static ElementTag DBP = new ElementTag("BFEE3EE4-E98E-4981-9A55-80761F3903CD", "DBP", true);
+
+        /// <summary>
+        /// Specifies FetusNumber.
+        /// </summary>
+        public static ElementTag FetusNumber =
+            new ElementTag("5E0FFEF1-1A67-44D2-BF3D-527F27FCC171", "FetusNumber", true);
+
+        /// <summary>
+        /// Specifies Operator
+        /// </summary>
+        public static ElementTag Operator = new ElementTag("0FC1FC7D-2D87-4C6C-A54B-3033B8DB922B", "Operator", true);
+
+        /// <summary>
+        /// Specifies SecondId
+        /// </summary>
+        public static ElementTag SecondId = new ElementTag("B57E11C6-1DA4-4119-810D-F823AB42D86D", "SecondId", true);
+
+        /// <summary>
+        /// Specifies Operator
+        /// </summary>
+        public static ElementTag AccessionNumber =
+            new ElementTag("21B58982-52C6-4F79-B9B2-57BD109F42A1", "AccessionNumber", true);
+
+        /// <summary>
+        /// Specifies PatientUniqueCode
+        /// </summary>
+        public static ElementTag PatientUniqueCode =
+            new ElementTag("43D40A8E-16FA-4528-B69D-C160F9B24AD5", "PatientUniqueCode", true);
+
+        public static ElementTag History =
+            new ElementTag("12340A8E-16FA-4528-B69D-C160F9B24AD5", "History", true);
+
+        public static ElementTag PatientPresentation =
+            new ElementTag("CD340A8E-16FA-4321-B69D-C140F9F24AD5", "PatientPresentation", true);
+
+        public static ElementTag PatientInspectionSiteSingle =
+            new ElementTag("CD340A5E-16FA-4321-B79D-C14012F24AD5", "PatientInspectionSiteSingle", true);
+
+        public static ElementTag AIIndexFlag =
+          new ElementTag("11340A5E-15FA-4321-B79D-C13212F24AD5", "AIIndexFlag", false);
+
+        public static ElementTag EditReporttime =
+         new ElementTag("2340A5E-16FA-4321-B79D-C14412F24AD5", "EditReporttime", false);
+
+        public static ElementTag ContactAddress = new ElementTag("A2340A5E-16FA-4321-B79D-C14412F24AD5", "ContactAddress", true);
+        public static ElementTag PatientSource = new ElementTag("B2340A5E-16FA-4321-B79D-C14412F24AD5", "PatientSource", true);
+        public static ElementTag ADNumber = new ElementTag("C2340A5E-16FA-4321-B79D-C14412F24AD5", "ADNumber", true);
+        public static ElementTag BedNumber = new ElementTag("D2340A5E-16FA-4321-B79D-C14412F24AD5", "BedNumber", true);
+        public static ElementTag ExamType = new ElementTag("E2340A5E-16FA-4321-B79D-C14412F24AD5", "ExamType", true);
+        public static ElementTag InspectionDepartment = new ElementTag("F2340A5E-16FA-4321-B79D-C14412F24AD5", "InspectionDepartment", true);
+
+        public static ElementTag LeftTumor = new ElementTag("F4340A5E-16FA-4521-B79D-C14412F24AD5", "LeftTumor", true);
+        public static ElementTag RightTumor = new ElementTag("F4340A5E-16FA-A321-B79D-C14412F24AD5", "RightTumor", true);
+
+
+        public static ElementTag ApplyForHospital = new ElementTag("d02481bc-c9fb-4514-a757-1b6cf1528186", "ApplyForHospital", true);
+
+        public static ElementTag ConsultationHospital = new ElementTag("53a84c3d-a374-4902-aba3-f226a4e8d01a", "ConsultationHospital", true);
+
+        public static List<ElementTag> FetusTags = new List<ElementTag>
+        {
+            FetusA,
+            FetusB,
+            FetusC,
+            FetusD,
+            FetusE,
+        };
+
+        /// <summary>
+        /// The default tags for RTTable.
+        /// </summary>
+        public static IEnumerable<ElementTag> DefaultTableTags = new List<ElementTag>(FetusTags)
+        {
+            ObInfo,
+            ZScore,
+            ReportWorkSheet,
+            FetalBiophysicalScore,
+            Follicle,
+            AutoFollicle,
+            AutoFollicle3D,
+            AutoOvary,
+            Wms,
+            StrainRate,
+            ReproSummary,
+            ReportNormalValueTips,
+        };
+
+        /// <summary>
+        /// The default tags.
+        /// </summary>
+        public static IEnumerable<ElementTag> DefaultTags = new List<ElementTag>(FetusTags)
+        {
+            HospitalName,
+            PatientId,
+            PatientName,
+            PatientAge,
+            PatientGender,
+            PatientPhoneNumber,
+            PatientGA,
+            PatientEDD,
+            PatientLMP,
+            PatientExamDate,
+            PatientInspectionItems,
+            PatientInspectionSite,
+            DiseaseName,
+            Conclusion,
+            PatientExaminationWay,
+            PatientCheckNumber,
+            PatientApplicationDepartment,
+            PatientPerfPhysician,
+            PatientDeviceNumber,
+            PatientOutpatientNumber,
+            PatientUltrasonicNumber,
+            ReportDescription,
+            ReportSummary,
+            ReportImages,
+            ReportOBGraph,
+            ReportWorkSheet,
+            PatientBirthday,
+            ReportTime,
+            ReportPhysician,
+            InspectionPhysician,
+            HospitalDepartment,
+            HospitalAddress,
+            ReferringPhysician,
+            PerformingPhysician,
+            ObInfo,
+            ZScore,
+            FetalBiophysicalScore,
+            Follicle,
+            AutoFollicle,
+            AutoFollicleImages,
+            AutoFollicle3D,
+            AutoFollicle3DImages,
+            AutoOvary,
+            AutoOvaryImages,
+            Wms,
+            StrainRate,
+            ReproSummary,
+            GestationalAgeOriginDescription,
+            GestationalAgeOriginValue,
+            Owner,
+            Species,
+            Breed,
+            PatientHeight,
+            PatientWeight,
+            BSA,
+            AB,
+            Ectopic,
+            Para,
+            PSA,
+            PPSACoefficient,
+            BMI,
+            HR,
+            SBP,
+            DBP,
+            FetusNumber,
+            Operator,
+            PatientUniqueCode,
+            History,
+            PatientPresentation,
+            PatientInspectionSiteSingle,
+            ConsultationNumber,
+            ContactAddress,
+            PatientSource,
+            ADNumber,
+            BedNumber,
+            ExamType,
+            InspectionDepartment,
+            LeftTumor,
+            RightTumor,
+            ScanPhysician,
+            DigitalSignature,
+            DescriptionOfRemoteConsultationPatients,
+            ApplyForHospital,
+            ConsultationHospital,
+            OrganizationInformation
+        };
+
+        /// <summary>
+        /// Gets or sets the input tag id.
+        /// </summary>
+        public string Id { get; private set; }
+
+        /// <summary>
+        /// Ges the input tag name.e.g. PatientName, ReportDescription
+        /// </summary>
+        public string Name { get; private set; }
+        public string DisplayName { get; set; }
+
+        /// <summary>
+        /// Gets the value to indicate whether the element tag is default or added by user.
+        /// </summary>
+        public bool IsDefault { get; private set; }
+
+        /// <summary>
+        /// Gets the element tag type.
+        /// </summary>
+        public ElementTagType ElementTagType { get; private set; }
+
+        /// <summary>
+        /// Initialize <see cref="ElementTag"/>
+        /// </summary>
+        /// <param name="id">The element tag id.</param>
+        /// <param name="name">The element tag name.</param>
+        /// <param name="isDefault">The value to indicate whether the tag is default or not.</param>
+        public ElementTag(string id, string name, bool isDefault, ElementTagType elementTagType = ElementTagType.General, string displayName = "")
+        {
+            Id = id;
+            Name = name;
+            IsDefault = isDefault;
+            ElementTagType = elementTagType;
+            DisplayName = displayName;
+        }
+
+        /// <summary>
+        /// Tests whether the specified <see cref="ElementTag"/> structure is identical to this tag.
+        /// </summary>
+        /// <param name="other">The <see cref="ElementTag" /> structure to compare to the current structure.</param>
+        /// <returns>If the specified <see cref="ElementTag"/> structure is identical to the current structure, returns true; otherwise, returns false.</returns>
+        public bool Equals(ElementTag other)
+        {
+            if (other == null)
+            {
+                return false;
+            }
+
+            return string.Equals(Id, other.Id) && string.Equals(Name, other.Name);
+        }
+
+        /// <summary>
+        /// Tests whether the specified object is a <see cref="ElementTag" /> structure and is equivalent to this tag.
+        /// </summary>
+        /// <param name="obj">The object to compare to this <see cref="ElementTag" /> structure.</param>
+        /// <returns>If the specified object is a <see cref="ElementTag"/> structure and is identical to the current structure, returns true; otherwise, returns false. </returns>
+        public override bool Equals(object obj)
+        {
+            if (ReferenceEquals(null, obj)) return false;
+            return obj is ElementTag && Equals((ElementTag)obj);
+        }
+
+        /// <summary>
+        /// Returns the hash code for this instance.
+        /// </summary>
+        /// <returns>A hash code for the current <see cref="ElementTag" />.</returns>
+        public override int GetHashCode()
+        {
+            unchecked
+            {
+                return ((Id != null ? Id.GetHashCode() : 0) * 397) ^ (Name != null ? Name.GetHashCode() : 0);
+            }
+        }
+
+        public override string ToString()
+        {
+            return Name;
+        }
+    }
+}
+

+ 59 - 59
Tools/Flyinsono.DBCopy.Tool/Service/Repositories/ReportInfoResultDBRepository.cs

@@ -75,10 +75,10 @@ namespace Flyinsono.DBCopy.Tool.Service.Repositories
                     startIndex = i * 2000;
                     var filterData = list.GetRange(startIndex, length);
                     //先删除类似的备份数据在新增
-                    var bakBuilder = Builders<ReportInfoResultsInfo>.Filter;
+                    var bakBuilder = Builders<ReportInfoResults>.Filter;
                     var deleteIds = filterData.Select(c => c.Id).Distinct().ToList();
-                    var bakFilter = bakBuilder.In(x => x.Id, deleteIds);
-                    var res = MongoDbClientSingle.Instance.ReportInfoResultsInfo.DeleteMany(bakFilter);
+                    var bakFilter = bakBuilder.In(x => x.Id, deleteIds);                     
+                    var res = MongoDbClientSingle.Instance.ReportInfoResults.DeleteMany(bakFilter);
                     //删完就新增
                     MongoDbClientSingle.Instance.ReportInfoResultsInfo.InsertMany(filterData);
                     Console.WriteLine($"Clear TerminalRecords Data Range {startIndex} - {(startIndex + length)}");
@@ -104,7 +104,7 @@ namespace Flyinsono.DBCopy.Tool.Service.Repositories
                 PatientPerfPhysician = diagnosisResult.PerformingPhysician,
                 UpdateTime = diagnosisResult.UpdateTime,
                 PatientName = $"{diagnosisResult.PatientInfo.LastName} {diagnosisResult.PatientInfo.FirstName}",
-                MeasureElementCollection = new List<ReportInfoMeasrueElementDo>(),
+                MeasureElementCollection = new List<Flyinsono.DBCopy.Tool.Extensions.ReportInfoMeasrueElement>(),
                 CustomLabels = new List<string>(),
                 Organ = EnumOrgans.NotSpecified,
                 PreviewImages = new List<ImageInfo>(),
@@ -112,30 +112,30 @@ namespace Flyinsono.DBCopy.Tool.Service.Repositories
                 ReportPreviewPdf = string.Empty,
                 StorageServer = new StorageServerInfo()
             };
-            var elementCollection = new List<ReportInfoElementDo>();
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientName,
-                new TextElementValue($"{diagnosisResult.PatientInfo.LastName} {diagnosisResult.PatientInfo.FirstName}")));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.RecordId, new TextElementValue(diagnosisResult.TerminalRecordId ?? string.Empty)
+            var elementCollection = new List<Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement>();
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientName,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue($"{diagnosisResult.PatientInfo.LastName} {diagnosisResult.PatientInfo.FirstName}")));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.RecordId, new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult.TerminalRecordId ?? string.Empty)
                 ));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.ExamId, new TextElementValue(diagnosisResult.ExamId ?? string.Empty)
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.ExamId, new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult.ExamId ?? string.Empty)
             ));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.CreateUserId, new TextElementValue(diagnosisResult?.User?._id ?? string.Empty)
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.CreateUserId, new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult?.User?._id ?? string.Empty)
             ));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.CreateTime, new DateTimeElementValue(diagnosisResult.CreateTime)
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.CreateTime, new Flyinsono.DBCopy.Tool.Extensions.DateTimeElementValue(diagnosisResult.CreateTime)
             ));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.UpdateTime, new DateTimeElementValue(diagnosisResult.UpdateTime)
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.UpdateTime, new Flyinsono.DBCopy.Tool.Extensions.DateTimeElementValue(diagnosisResult.UpdateTime)
             ));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientId, new TextElementValue(diagnosisResult.PatientInfo?.PatientId ?? string.Empty)
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientId, new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult.PatientInfo?.PatientId ?? string.Empty)
             ));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientBirthday, new DateTimeElementValue(diagnosisResult.PatientInfo.Birthday ?? DateTime.MinValue)
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientBirthday, new Flyinsono.DBCopy.Tool.Extensions.DateTimeElementValue(diagnosisResult.PatientInfo.Birthday ?? DateTime.MinValue)
             ));
             var patientAge = diagnosisResult.Age;
             if (patientAge == 0)
@@ -144,60 +144,60 @@ namespace Flyinsono.DBCopy.Tool.Service.Repositories
                     ? 0
                     : DateTime.Now.Year - diagnosisResult.PatientInfo.Birthday.Value.Year;
             }
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientAge, new IntegerElementValue(patientAge)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientAge, new Flyinsono.DBCopy.Tool.Extensions.IntegerElementValue(patientAge)));
             var patientGender = string.Empty;
             if (diagnosisResult.PatientInfo.IsMale != null)
             {
                 patientGender = diagnosisResult.PatientInfo.IsMale.Value ? "Male" : "Female";
             }
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientGender,
-                new TextElementValue(patientGender)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientExamDate,
-                new DateTimeElementValue(diagnosisResult.ExamDate)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientGender,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(patientGender)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientExamDate,
+                new Flyinsono.DBCopy.Tool.Extensions.DateTimeElementValue(diagnosisResult.ExamDate)));
             var t = diagnosisResult.PatientInfo?.PatientGynInfo?.LMP ?? DateTime.MinValue;
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientLMP,
-                new DateTimeElementValue(t)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientLMP,
+                new Flyinsono.DBCopy.Tool.Extensions.DateTimeElementValue(t)));
             var gestationalAge = int.MinValue;
             if (diagnosisResult.PatientInfo.PatientObInfo.GestationalAge != null)
             {
                 gestationalAge = diagnosisResult.PatientInfo.PatientObInfo.GestationalAge.Value;
             }
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientGA,
-                new IntegerElementValue(gestationalAge)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientEDD,
-                new DateTimeElementValue(diagnosisResult.PatientInfo?.PatientObInfo?.EstimateDueDate ?? DateTime.MinValue)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.PatientPerfPhysician,
-                new TextElementValue(diagnosisResult?.PerformingPhysician ?? string.Empty)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.ReportPhysician,
-                new TextElementValue(diagnosisResult?.PerformingPhysician ?? string.Empty)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.HospitalName,
-                new TextElementValue(diagnosisResult?.Title ?? string.Empty)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.ReportDescription,
-                new TextElementValue(diagnosisResult?.Description ?? string.Empty)));
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.ReportSummary,
-                new TextElementValue(diagnosisResult?.Summary ?? string.Empty)));
-            var imageList = new List<FileImageValue>();
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientGA,
+                new Flyinsono.DBCopy.Tool.Extensions.IntegerElementValue(gestationalAge)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientEDD,
+                new Flyinsono.DBCopy.Tool.Extensions.DateTimeElementValue(diagnosisResult.PatientInfo?.PatientObInfo?.EstimateDueDate ?? DateTime.MinValue)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.PatientPerfPhysician,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult?.PerformingPhysician ?? string.Empty)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.ReportPhysician,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult?.PerformingPhysician ?? string.Empty)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.HospitalName,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult?.Title ?? string.Empty)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.ReportDescription,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult?.Description ?? string.Empty)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.ReportSummary,
+                new Flyinsono.DBCopy.Tool.Extensions.TextElementValue(diagnosisResult?.Summary ?? string.Empty)));
+            var imageList = new List<Flyinsono.DBCopy.Tool.Extensions.FileImageValue>();
             if (diagnosisResult?.Images?.Count > 0)
             {
                 foreach (var diagnosisResultImage in diagnosisResult?.Images)
                 {
-                    imageList.Add(new FileImageValue(diagnosisResultImage.Name, (diagnosisResultImage.ExamDataId ?? string.Empty)));
+                    imageList.Add(new Flyinsono.DBCopy.Tool.Extensions.FileImageValue(diagnosisResultImage.Name, (diagnosisResultImage.ExamDataId ?? string.Empty)));
                 }
             }
-            elementCollection.Add(new ReportInfoElementDo(
-                ElementTag.ReportImages,
-                new ImageListElementValue(imageList)));
+            elementCollection.Add(new Flyinsono.DBCopy.Tool.Extensions.ReportInfoElement(
+                Flyinsono.DBCopy.Tool.Extensions.ElementTag.ReportImages,
+                new Flyinsono.DBCopy.Tool.Extensions.ImageListElementValue(imageList)));
 
             reportInfoResult.ElementCollection = elementCollection;
             reportInfoResult.Template = diagnosisResult.Template ?? string.Empty;