ElementValue.cs 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939
  1. using MongoDB.Bson.Serialization.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Flyinsono.DBCopy.Tool.Extensions
  8. {
  9. internal class ReportInfoMeasrueElement
  10. {
  11. public ElementTag ElementTag { get; set; }
  12. public IList<ReportMeasureValueElement> ElementCollection { get; set; }
  13. }
  14. internal class ReportMeasureValueElement
  15. {
  16. public MeasureTag MeasureTag { get; set; }
  17. public TextElementValue ElementValue { get; set; }
  18. }
  19. internal class TextElementValue : ElementValue
  20. {
  21. public TextElementValue()
  22. {
  23. ElementValueType = ElementValueTypes.String;
  24. }
  25. public TextElementValue(string value)
  26. {
  27. Value = value;
  28. ElementValueType = ElementValueTypes.String;
  29. }
  30. }
  31. internal class IntegerElementValue : ElementValue
  32. {
  33. public IntegerElementValue()
  34. {
  35. }
  36. public IntegerElementValue(int value)
  37. {
  38. Value = value;
  39. ElementValueType = ElementValueTypes.Integer;
  40. }
  41. }
  42. internal class DateTimeElementValue : ElementValue
  43. {
  44. public DateTimeElementValue()
  45. {
  46. }
  47. public DateTimeElementValue(DateTime? dateTime)
  48. {
  49. Value = dateTime;
  50. ElementValueType = ElementValueTypes.Datetime;
  51. }
  52. }
  53. internal class FloatElementValue : ElementValue
  54. {
  55. public FloatElementValue()
  56. {
  57. }
  58. public FloatElementValue(float value)
  59. {
  60. ElementValueType = ElementValueTypes.Float;
  61. Value = value;
  62. }
  63. }
  64. class FileImageValue : ElementValue
  65. {
  66. public string ExamDataId { get; set; }
  67. public FileImageValue()
  68. {
  69. }
  70. public FileImageValue(string value, string examDataId)
  71. {
  72. Value = value;
  73. ExamDataId = examDataId;
  74. ElementValueType = ElementValueTypes.FileImage;
  75. }
  76. }
  77. class BufferImageValue : ElementValue
  78. {
  79. public BufferImageValue()
  80. {
  81. }
  82. public BufferImageValue(byte[] value)
  83. {
  84. Value = value;
  85. ElementValueType = ElementValueTypes.BufferImage;
  86. }
  87. }
  88. internal class ImageListElementValue : ElementValue
  89. {
  90. public ImageListElementValue()
  91. {
  92. }
  93. public ImageListElementValue(List<FileImageValue> value)
  94. {
  95. Value = value;
  96. ElementValueType = ElementValueTypes.ImageList;
  97. }
  98. }
  99. internal class StringListElementValue : ElementValue
  100. {
  101. public StringListElementValue()
  102. {
  103. }
  104. public StringListElementValue(List<TextElementValue> value)
  105. {
  106. Value = value;
  107. ElementValueType = ElementValueTypes.StringList;
  108. }
  109. }
  110. public enum ElementValueTypes
  111. {
  112. String,
  113. Integer,
  114. Float,
  115. Datetime,
  116. FileImage,
  117. BufferImage,
  118. ImageList,
  119. StringList
  120. }
  121. public class MeasureTag
  122. {
  123. public const string ReportTemplatePrefix = "ReportTemplate.";
  124. public string[] AvailableMethods
  125. {
  126. get => InternalAvailableMethods.ToArray();
  127. set => InternalAvailableMethods = value == null ? null : new SortedSet<string>(value);
  128. }
  129. public string BaseType { get; set; }
  130. public string CalculationId { get; set; }
  131. private SortedSet<string> _internalAvailableMethods;
  132. private SortedSet<string> InternalAvailableMethods
  133. {
  134. get => _internalAvailableMethods ?? new SortedSet<string>();
  135. set => _internalAvailableMethods = value;
  136. }
  137. public bool IsCustomize => UserId?.StartsWith(ReportTemplatePrefix) ?? false;
  138. public string MatchId { get; set; }
  139. public string Method { get; set; }
  140. public string Mode { get; set; }
  141. public string Output { get; set; }
  142. public string OutputV2 { get; set; }
  143. public string Unit { get; set; }
  144. public string UserId { get; set; }
  145. public string UserIdWithoutPrefix => UserId?.Replace(ReportTemplatePrefix, "");
  146. public string MeasureResultType { get; set; }
  147. }
  148. internal class ReportInfoElement
  149. {
  150. public ElementTag ElementTag { get; set; }
  151. public ElementValue ElementValue { get; set; }
  152. public ReportInfoElement()
  153. {
  154. }
  155. public ReportInfoElement(ElementTag elementTag, ElementValue elementValue)
  156. {
  157. ElementTag = elementTag;
  158. ElementValue = elementValue;
  159. }
  160. }
  161. [BsonKnownTypes(typeof(TextElementValue), typeof(IntegerElementValue), typeof(DateTimeElementValue),
  162. typeof(FloatElementValue), typeof(FileImageValue), typeof(BufferImageValue), typeof(ImageListElementValue),
  163. typeof(StringListElementValue))]
  164. internal class ElementValue
  165. {
  166. public object? Value { get; set; }
  167. public ElementValueTypes ElementValueType { get; set; }
  168. }
  169. public enum ElementTagType
  170. {
  171. General,
  172. DiagnosticEntry
  173. }
  174. public class ElementTag : IEquatable<ElementTag>
  175. {
  176. public static ElementTag PatientTable =
  177. new ElementTag("9pbbaa61-a91d-4399-a3f4-df29117d2d59", "PatientTable", true);
  178. /// <summary>
  179. /// Specifies PatientId tag.
  180. /// </summary>
  181. public static ElementTag PatientId = new ElementTag("90bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientId", true);
  182. /// <summary>
  183. /// Specifies PatientName tag.
  184. /// </summary>
  185. public static ElementTag PatientName =
  186. new ElementTag("91bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientName", true);
  187. /// <summary>
  188. /// Specifies PatientAge tag.
  189. /// </summary>
  190. public static ElementTag PatientAge =
  191. new ElementTag("92bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientAge", true);
  192. /// <summary>
  193. /// Specifies PatientGender tag.
  194. /// </summary>
  195. public static ElementTag PatientGender =
  196. new ElementTag("93bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientGender", true);
  197. /// <summary>
  198. /// Specifies PatientNation phone number.
  199. /// </summary>
  200. public static ElementTag PatientPhoneNumber =
  201. new ElementTag("94bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientPhoneNumber", true);
  202. /// <summary>
  203. /// Specifies PatientExamDate tag.
  204. /// </summary>
  205. public static ElementTag PatientExamDate =
  206. new ElementTag("95bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientExamDate", true);
  207. /// <summary>
  208. /// Specifies PatientInspectionItems tag.
  209. /// </summary>
  210. public static ElementTag PatientInspectionItems =
  211. new ElementTag("96baa61-a91d-4399-a3f4-df29117d2d59", "PatientInspectionItems", true);
  212. /// <summary>
  213. /// Specifies PatientLMP tag.
  214. /// </summary>
  215. public static ElementTag PatientLMP = new ElementTag("97baa61-a91d-4399-a3f4-df29117d2d59", "PatientLMP", true);
  216. /// <summary>
  217. /// Specifies PatientGA tag.
  218. /// </summary>
  219. public static ElementTag PatientGA = new ElementTag("98bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientGA", true);
  220. /// <summary>
  221. /// Specifies PatientEDD tag.
  222. /// </summary>
  223. public static ElementTag PatientEDD =
  224. new ElementTag("99bbaa61-a91d-4399-a3f4-df29117d2d59", "PatientEDD", true);
  225. /// <summary>
  226. /// Specifies PatientPerfPhysician tag.
  227. /// </summary>
  228. public static ElementTag PatientPerfPhysician =
  229. new ElementTag("9abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientPerfPhysician", true);
  230. /// <summary>
  231. /// Specifies PatientInspectionSite tag.
  232. /// </summary>
  233. public static ElementTag PatientInspectionSite =
  234. new ElementTag("9bbbaa61-a91d-4399-a3f4-df29117d2d59", "PatientInspectionSite", true);
  235. /// <summary>
  236. /// Specifies disease name tag.
  237. /// </summary>
  238. public static ElementTag DiseaseName =
  239. new ElementTag("9bbbaa61-a91d-4399-a3f4-df29117d2d59", "DiseaseName", true);
  240. /// <summary>
  241. /// Specifies conclusion tag.
  242. /// </summary>
  243. public static ElementTag Conclusion =
  244. new ElementTag("9bbbaa61-a91d-4399-a3f4-df29117d2d59", "Conclusion", true);
  245. /// <summary>
  246. /// Specifies PatientExaminationWay tag.
  247. /// </summary>
  248. public static ElementTag PatientExaminationWay =
  249. new ElementTag("9cbbaa61-a91d-4399-a3f4-df29117d2d59", "PatientExaminationWay", true);
  250. /// <summary>
  251. /// Specifies ReportDescription tag.
  252. /// </summary>
  253. public static ElementTag ReportDescription =
  254. new ElementTag("9dbbaa61-a91d-4399-a3f4-df29117d2d59", "ReportDescription", true, ElementTagType.DiagnosticEntry);
  255. /// <summary>
  256. /// Specifies ReportSummary tag.
  257. /// </summary>
  258. public static ElementTag ReportSummary =
  259. new ElementTag("9ebbaa61-a91d-4399-a3f4-df29117d2d59", "ReportSummary", true, ElementTagType.DiagnosticEntry);
  260. public static ElementTag DescriptionOfRemoteConsultationPatients =
  261. new ElementTag("d62a4a9c-0ad7-4c56-8b45-c3eff679b45b", "DescriptionOfRemoteConsultationPatients", true);
  262. /// <summary>
  263. /// Specifies ReportImages tag.
  264. /// </summary>
  265. public static ElementTag ReportImages =
  266. new ElementTag("9fbbaa61-a91d-4399-a3f4-df29117d2d59", "ReportImages", true);
  267. /// <summary>
  268. /// Specifies Signature tag.
  269. /// </summary>
  270. public static ElementTag DigitalSignature =
  271. new ElementTag("53545af1-59b7-41a8-9bd5-bdba1aaf9891", "DigitalSignature", true);
  272. /// <summary>
  273. /// Specifies ReportOBGraph tag.
  274. /// </summary>
  275. public static ElementTag ReportOBGraph =
  276. new ElementTag("9a0baa61-a91d-4399-a3f4-df29117d2d59", "ReportOBGraph", true);
  277. /// <summary>
  278. /// Specifies ReportWorkSheet tag.
  279. /// </summary>
  280. public static ElementTag ReportWorkSheet =
  281. new ElementTag("9a1baa61-a91d-4399-a3f4-df29117d2d59", "ReportWorkSheet", true);
  282. /// <summary>
  283. /// Specifies ReportWorkSheet tag.
  284. /// </summary>
  285. public static ElementTag ReportNormalValueTips =
  286. new ElementTag("9b1baa61-a91d-4399-a3f4-df29117d2d59", "ReportNormalValueTips", true);
  287. /// <summary>
  288. /// Specifies PatientCheckNumber tag.
  289. /// </summary>
  290. public static ElementTag PatientCheckNumber =
  291. new ElementTag("9a2baa61-a91d-4399-a3f4-df29117d2d59", "PatientCheckNumber", true);
  292. /// <summary>
  293. /// Specifies PatientHeight tag.
  294. /// </summary>
  295. public static ElementTag PatientApplicationDepartment = new ElementTag("9a3baa61-a91d-4399-a3f4-df29117d2d59",
  296. "PatientApplicationDepartment", true);
  297. /// <summary>
  298. /// Specifies RecordId tag.
  299. /// </summary>
  300. public static ElementTag RecordId = new ElementTag("9a4baa61-a91d-4399-a3f4-df29117d2d59", "RecordId", true);
  301. /// <summary>
  302. /// Specifies ExamId tag.
  303. /// </summary>
  304. public static ElementTag ExamId = new ElementTag("9a5baa61-a91d-4399-a3f4-df29117d2d59", "ExamId", true);
  305. /// <summary>
  306. /// Specifies update time.
  307. /// </summary>
  308. public static ElementTag UpdateTime =
  309. new ElementTag("9a6baa61-a91d-4399-a3f4-df29117d2d59", "UpdateTime", true);
  310. /// <summary>
  311. /// Specifies update time.
  312. /// </summary>
  313. public static ElementTag CreateUserId =
  314. new ElementTag("9a7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserId", true);
  315. public static ElementTag CreateUserName =
  316. new ElementTag("9b7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserName", true);
  317. public static ElementTag CreateUserFirstName =
  318. new ElementTag("9c7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserFirstName", true);
  319. public static ElementTag CreateUserLastName =
  320. new ElementTag("9d7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserLastName", true);
  321. public static ElementTag CreateUserNickName =
  322. new ElementTag("9e7baa61-a91d-4399-a3f4-df29117d2d59", "CreateUserNickName", true);
  323. /// <summary>
  324. /// Specifies create time.
  325. /// </summary>
  326. public static ElementTag CreateTime =
  327. new ElementTag("9a8baa61-a91d-4399-a3f4-df29117d2d59", "CreateTime", true);
  328. /// <summary>
  329. /// Specifies report type.
  330. /// </summary>
  331. public static ElementTag ReportType =
  332. new ElementTag("9a9baa61-a91d-4399-a3f4-df29117d2d59", "ReportType", true);
  333. /// <summary>
  334. /// Specifies report type.
  335. /// </summary>
  336. public static ElementTag PatientBirthday =
  337. new ElementTag("9aabaa61-a91d-4399-a3f4-df29117d2d59", "PatientBirthday", true);
  338. /// <summary>
  339. /// Specifies PatientDeviceNumber tag.
  340. /// </summary>
  341. public static ElementTag PatientDeviceNumber =
  342. new ElementTag("1abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientDeviceNumber", true);
  343. /// <summary>
  344. /// Specifies PatientDeviceNumber tag.
  345. /// </summary>
  346. public static ElementTag PatientOutpatientNumber =
  347. new ElementTag("2abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientOutpatientNumber", true);
  348. /// <summary>
  349. /// Specifies PatientUltrasonicNumber tag.
  350. /// </summary>
  351. public static ElementTag PatientUltrasonicNumber =
  352. new ElementTag("3abbaa61-a91d-4399-a3f4-df29117d2d59", "PatientUltrasonicNumber", true);
  353. /// <summary>
  354. /// Specifies ReportTime tag.
  355. /// </summary>
  356. public static ElementTag ReportTime =
  357. new ElementTag("4abbaa61-a91d-4399-a3f4-df29117d2d59", "ReportTime", true);
  358. /// <summary>
  359. /// Specifies ConsultationNumber tag.
  360. /// </summary>
  361. public static ElementTag ConsultationNumber =
  362. new ElementTag("1acgaa61-a91d-4397-a3f4-df29144d2d55", "ConsultationNumber", true);
  363. /// <summary>
  364. /// Specifies ReportPhysician tag.
  365. /// </summary>
  366. public static ElementTag ReportPhysician =
  367. new ElementTag("5abbaa61-a91d-4399-a3f4-df29117d2d59", "ReportPhysician", true);
  368. /// <summary>
  369. /// Specifies InspectionPhysician tag.
  370. /// </summary>
  371. public static ElementTag InspectionPhysician =
  372. new ElementTag("6abbaa61-a91d-4399-a3f4-df29117d2d59", "InspectionPhysician", true);
  373. public static ElementTag ScanPhysician =
  374. new ElementTag("26f81427-613d-456a-8a45-7af401d6943a", "ScanPhysician", true);
  375. public static ElementTag OrganizationInformation =
  376. new ElementTag("7382eee6-9b1b-498d-af26-e22ce26a0325", "OrganizationInformation", true);
  377. /// <summary>
  378. /// Specifies HospitalName tag.
  379. /// </summary>
  380. public static ElementTag HospitalName =
  381. new ElementTag("7abbaa61-a91d-4399-a3f4-df29117d2d59", "HospitalName", true);
  382. /// <summary>
  383. /// Specifies HospitalDepartment tag.
  384. /// </summary>
  385. public static ElementTag HospitalDepartment =
  386. new ElementTag("9E4D1A91-44D6-46AE-AF29-34FFCB6A34A9", "HospitalDepartment", true);
  387. /// <summary>
  388. /// Specifies HospitalAddress tag.
  389. /// </summary>
  390. public static ElementTag HospitalAddress =
  391. new ElementTag("A8BF19D0-556C-4C32-B5CB-41EA30027505", "HospitalAddress", true);
  392. /// <summary>
  393. /// Specifies PerformingPhysician tag.
  394. /// </summary>
  395. public static ElementTag PerformingPhysician =
  396. new ElementTag("48EE0F65-B86C-4591-BDAB-14D46EEB4C30", "PerformingPhysician", true);
  397. /// <summary>
  398. /// Specifies ReferringPhysician tag.
  399. /// </summary>
  400. public static ElementTag ReferringPhysician =
  401. new ElementTag("BD4049E6-6847-46FA-A70E-991533BC67F7", "ReferringPhysician", true);
  402. /// <summary>
  403. /// Specifies ObInfo tag.
  404. /// </summary>
  405. public static ElementTag ObInfo = new ElementTag("877FAFEA-4E47-4E76-A93F-10950B9ABA1A", "ObInfo", true);
  406. /// <summary>
  407. /// Specifies ZScore tag.
  408. /// </summary>
  409. public static ElementTag ZScore = new ElementTag("CF8D47A2-B3F0-4BD7-B366-B1B44B63D82A", "ZScore", true);
  410. /// <summary>
  411. /// Specifies Fetal Biophysical Score tag.
  412. /// </summary>
  413. public static ElementTag FetalBiophysicalScore =
  414. new ElementTag("157017B8-6FC5-4677-9818-605601D907AC", "FetalBiophysicalScore", true);
  415. /// <summary>
  416. /// Specifies Follicle2D tag.
  417. /// </summary>
  418. public static ElementTag Follicle =
  419. new ElementTag("5347554A-084E-40AB-A7D4-941085B61A84", "Follicle", true);
  420. /// <summary>
  421. /// Specifies AutoFollicle tag.
  422. /// </summary>
  423. public static ElementTag AutoFollicle =
  424. new ElementTag("B38D4CE8-5B1B-4432-8474-EDF70A3FF6CF", "AutoFollicle", true);
  425. /// <summary>
  426. /// Specifies AutoFollicleImages tag.
  427. /// </summary>
  428. public static ElementTag AutoFollicleImages = new ElementTag("019EA88D-58F0-4639-809D-A5A524DADFC1", "AutoFollicleImages", true);
  429. /// <summary>
  430. /// Specifies AutoFollicle3D tag.
  431. /// </summary>
  432. public static ElementTag AutoFollicle3D =
  433. new ElementTag("66A8781E-9F2B-42B9-997E-A40BDA3C3728", "AutoFollicle3D", true);
  434. /// <summary>
  435. /// Specifies AutoFollicle3DImages tag.
  436. /// </summary>
  437. public static ElementTag AutoFollicle3DImages = new ElementTag("0E696819-AE15-4AC4-81A4-645A2F53F958", "AutoFollicle3DImages", true);
  438. /// <summary>
  439. /// Specifies AutoOvary tag.
  440. /// </summary>
  441. public static ElementTag AutoOvary = new ElementTag("5195679C-ED36-4C9E-8106-7B1CD9C181C9", "AutoOvary", true);
  442. /// <summary>
  443. /// Specifies AutoOvaryImages tag.
  444. /// </summary>
  445. public static ElementTag AutoOvaryImages = new ElementTag("DBECDD4C-5080-4EA5-A2A7-1A7A2FCAC2A9", "AutoOvaryImages", true);
  446. /// <summary>
  447. /// Specifies WMS tag.
  448. /// </summary>
  449. public static ElementTag Wms = new ElementTag("5B810BC6-6101-4F90-83CE-D31BDE97A07B", "WMS", true);
  450. /// <summary>
  451. /// Specifies StrainRate tag.
  452. /// </summary>
  453. public static ElementTag StrainRate =
  454. new ElementTag("3B466E45-070E-41DF-A00D-D96D5797C85F", "StrainRate", true);
  455. /// <summary>
  456. /// Specifies ReproSummary tag.
  457. /// </summary>
  458. public static ElementTag ReproSummary = new ElementTag("DFB8A17B-310D-4B14-9F4F-A16E2F500084", "ReproSummary", true);
  459. /// <summary>
  460. /// Specifies GestationalAgeOriginDescription tag.
  461. /// </summary>
  462. public static ElementTag GestationalAgeOriginDescription =
  463. new ElementTag("F46A48B1-96BB-475E-8EF7-5CBFF22AAECB", "GestationalAgeOriginDescription", true);
  464. /// <summary>
  465. /// Specifies GestationalAgeOriginValue tag.
  466. /// </summary>
  467. public static ElementTag GestationalAgeOriginValue =
  468. new ElementTag("9569465B-FCCB-4E04-8B6B-D4624224722D", "GestationalAgeOriginValue", true);
  469. /// <summary>
  470. /// Specifies Owner tag.
  471. /// </summary>
  472. public static ElementTag Owner = new ElementTag("DB1202FB-51DF-4EB7-903A-2F6740CAD74B", "Owner", true);
  473. /// <summary>
  474. /// Specifies Species tag.
  475. /// </summary>
  476. public static ElementTag Species = new ElementTag("FC5F7564-B63F-4185-8E1C-FC4BC5046332", "Species", true);
  477. /// <summary>
  478. /// Specifies Breed tag.
  479. /// </summary>
  480. public static ElementTag Breed = new ElementTag("B7631C99-706A-48D8-A6DF-1C11F90106C9", "Breed", true);
  481. /// <summary>
  482. /// Specifies FetusA tag.
  483. /// </summary>
  484. public static ElementTag FetusA = new ElementTag("4D916526-9947-4EDE-8630-337632A35627", "FetusA", true);
  485. /// <summary>
  486. /// Specifies FetusB tag.
  487. /// </summary>
  488. public static ElementTag FetusB = new ElementTag("B5A2AAE5-4DDB-4945-9515-82DB367B04F2", "FetusB", true);
  489. /// <summary>
  490. /// Specifies FetusC tag.
  491. /// </summary>
  492. public static ElementTag FetusC = new ElementTag("35C22E6B-D15E-43CD-88F9-99AA79C3575D", "FetusC", true);
  493. /// <summary>
  494. /// Specifies FetusD tag.
  495. /// </summary>
  496. public static ElementTag FetusD = new ElementTag("24498307-BB99-458B-8EC0-AC8434DE491D", "FetusD", true);
  497. /// <summary>
  498. /// Specifies FetusE tag.
  499. /// </summary>
  500. public static ElementTag FetusE = new ElementTag("AEC6FDB6-1CD4-4C43-896A-2E914B837545", "FetusE", true);
  501. /// <summary>
  502. /// Specifies Patient Height.
  503. /// </summary>
  504. public static ElementTag PatientHeight =
  505. new ElementTag("9556EA12-CFB3-4AD5-8717-1057D1D5A3EE", "PatientHeight", true);
  506. /// <summary>
  507. /// Specifies Patient Weight.
  508. /// </summary>
  509. public static ElementTag PatientWeight =
  510. new ElementTag("0003B8C3-397C-4688-985D-55B757E3855D", "PatientWeight", true);
  511. /// <summary>
  512. /// Specifies BSA.
  513. /// </summary>
  514. public static ElementTag BSA = new ElementTag("5AAC30D9-FCE3-4FD0-998C-3A9E2D54F312", "BSA", true);
  515. /// <summary>
  516. /// Specifies AB.
  517. /// </summary>
  518. public static ElementTag AB = new ElementTag("EA33699C-E86D-497B-A9A9-B8AFAF4A11C7", "AB", true);
  519. /// <summary>
  520. /// Specifies Ectopic.
  521. /// </summary>
  522. public static ElementTag Ectopic = new ElementTag("5B2BF3CE-62B2-4BE8-8685-29DB9A62465B", "Ectopic", true);
  523. /// <summary>
  524. /// Specifies Gravida.
  525. /// </summary>
  526. public static ElementTag Gravida = new ElementTag("04FA2451-BDD0-45E4-931B-3D01E95123E0", "Gravida", true);
  527. /// <summary>
  528. /// Specifies Para.
  529. /// </summary>
  530. public static ElementTag Para = new ElementTag("96C987B0-D0C3-445B-BD45-CB10A276E6D7", "Para", true);
  531. /// <summary>
  532. /// Specifies PSA.
  533. /// </summary>
  534. public static ElementTag PSA = new ElementTag("3969C8BE-7715-4423-919E-51D6EBEBFA8E", "PSA", true);
  535. /// <summary>
  536. /// Specifies PPSACoefficient.
  537. /// </summary>
  538. public static ElementTag PPSACoefficient =
  539. new ElementTag("C64CC111-3557-4B29-ACBF-678816235694", "PPSACoefficient", true);
  540. /// <summary>
  541. /// Specifies BMI.
  542. /// </summary>
  543. public static ElementTag BMI = new ElementTag("91D8F2DE-331F-49E5-95C0-1AEF9D566185", "BMI", true);
  544. /// <summary>
  545. /// Specifies HR.
  546. /// </summary>
  547. public static ElementTag HR = new ElementTag("33D46E3F-A089-4B0A-8D1D-F4C7556BD62D", "HR", true);
  548. /// <summary>
  549. /// Specifies SBP.
  550. /// </summary>
  551. public static ElementTag SBP = new ElementTag("EFB98909-D077-4650-9235-B4C9EA111BA3", "SBP", true);
  552. /// <summary>
  553. /// Specifies DBP.
  554. /// </summary>
  555. public static ElementTag DBP = new ElementTag("BFEE3EE4-E98E-4981-9A55-80761F3903CD", "DBP", true);
  556. /// <summary>
  557. /// Specifies FetusNumber.
  558. /// </summary>
  559. public static ElementTag FetusNumber =
  560. new ElementTag("5E0FFEF1-1A67-44D2-BF3D-527F27FCC171", "FetusNumber", true);
  561. /// <summary>
  562. /// Specifies Operator
  563. /// </summary>
  564. public static ElementTag Operator = new ElementTag("0FC1FC7D-2D87-4C6C-A54B-3033B8DB922B", "Operator", true);
  565. /// <summary>
  566. /// Specifies SecondId
  567. /// </summary>
  568. public static ElementTag SecondId = new ElementTag("B57E11C6-1DA4-4119-810D-F823AB42D86D", "SecondId", true);
  569. /// <summary>
  570. /// Specifies Operator
  571. /// </summary>
  572. public static ElementTag AccessionNumber =
  573. new ElementTag("21B58982-52C6-4F79-B9B2-57BD109F42A1", "AccessionNumber", true);
  574. /// <summary>
  575. /// Specifies PatientUniqueCode
  576. /// </summary>
  577. public static ElementTag PatientUniqueCode =
  578. new ElementTag("43D40A8E-16FA-4528-B69D-C160F9B24AD5", "PatientUniqueCode", true);
  579. public static ElementTag History =
  580. new ElementTag("12340A8E-16FA-4528-B69D-C160F9B24AD5", "History", true);
  581. public static ElementTag PatientPresentation =
  582. new ElementTag("CD340A8E-16FA-4321-B69D-C140F9F24AD5", "PatientPresentation", true);
  583. public static ElementTag PatientInspectionSiteSingle =
  584. new ElementTag("CD340A5E-16FA-4321-B79D-C14012F24AD5", "PatientInspectionSiteSingle", true);
  585. public static ElementTag AIIndexFlag =
  586. new ElementTag("11340A5E-15FA-4321-B79D-C13212F24AD5", "AIIndexFlag", false);
  587. public static ElementTag EditReporttime =
  588. new ElementTag("2340A5E-16FA-4321-B79D-C14412F24AD5", "EditReporttime", false);
  589. public static ElementTag ContactAddress = new ElementTag("A2340A5E-16FA-4321-B79D-C14412F24AD5", "ContactAddress", true);
  590. public static ElementTag PatientSource = new ElementTag("B2340A5E-16FA-4321-B79D-C14412F24AD5", "PatientSource", true);
  591. public static ElementTag ADNumber = new ElementTag("C2340A5E-16FA-4321-B79D-C14412F24AD5", "ADNumber", true);
  592. public static ElementTag BedNumber = new ElementTag("D2340A5E-16FA-4321-B79D-C14412F24AD5", "BedNumber", true);
  593. public static ElementTag ExamType = new ElementTag("E2340A5E-16FA-4321-B79D-C14412F24AD5", "ExamType", true);
  594. public static ElementTag InspectionDepartment = new ElementTag("F2340A5E-16FA-4321-B79D-C14412F24AD5", "InspectionDepartment", true);
  595. public static ElementTag LeftTumor = new ElementTag("F4340A5E-16FA-4521-B79D-C14412F24AD5", "LeftTumor", true);
  596. public static ElementTag RightTumor = new ElementTag("F4340A5E-16FA-A321-B79D-C14412F24AD5", "RightTumor", true);
  597. public static ElementTag ApplyForHospital = new ElementTag("d02481bc-c9fb-4514-a757-1b6cf1528186", "ApplyForHospital", true);
  598. public static ElementTag ConsultationHospital = new ElementTag("53a84c3d-a374-4902-aba3-f226a4e8d01a", "ConsultationHospital", true);
  599. public static List<ElementTag> FetusTags = new List<ElementTag>
  600. {
  601. FetusA,
  602. FetusB,
  603. FetusC,
  604. FetusD,
  605. FetusE,
  606. };
  607. /// <summary>
  608. /// The default tags for RTTable.
  609. /// </summary>
  610. public static IEnumerable<ElementTag> DefaultTableTags = new List<ElementTag>(FetusTags)
  611. {
  612. ObInfo,
  613. ZScore,
  614. ReportWorkSheet,
  615. FetalBiophysicalScore,
  616. Follicle,
  617. AutoFollicle,
  618. AutoFollicle3D,
  619. AutoOvary,
  620. Wms,
  621. StrainRate,
  622. ReproSummary,
  623. ReportNormalValueTips,
  624. };
  625. /// <summary>
  626. /// The default tags.
  627. /// </summary>
  628. public static IEnumerable<ElementTag> DefaultTags = new List<ElementTag>(FetusTags)
  629. {
  630. HospitalName,
  631. PatientId,
  632. PatientName,
  633. PatientAge,
  634. PatientGender,
  635. PatientPhoneNumber,
  636. PatientGA,
  637. PatientEDD,
  638. PatientLMP,
  639. PatientExamDate,
  640. PatientInspectionItems,
  641. PatientInspectionSite,
  642. DiseaseName,
  643. Conclusion,
  644. PatientExaminationWay,
  645. PatientCheckNumber,
  646. PatientApplicationDepartment,
  647. PatientPerfPhysician,
  648. PatientDeviceNumber,
  649. PatientOutpatientNumber,
  650. PatientUltrasonicNumber,
  651. ReportDescription,
  652. ReportSummary,
  653. ReportImages,
  654. ReportOBGraph,
  655. ReportWorkSheet,
  656. PatientBirthday,
  657. ReportTime,
  658. ReportPhysician,
  659. InspectionPhysician,
  660. HospitalDepartment,
  661. HospitalAddress,
  662. ReferringPhysician,
  663. PerformingPhysician,
  664. ObInfo,
  665. ZScore,
  666. FetalBiophysicalScore,
  667. Follicle,
  668. AutoFollicle,
  669. AutoFollicleImages,
  670. AutoFollicle3D,
  671. AutoFollicle3DImages,
  672. AutoOvary,
  673. AutoOvaryImages,
  674. Wms,
  675. StrainRate,
  676. ReproSummary,
  677. GestationalAgeOriginDescription,
  678. GestationalAgeOriginValue,
  679. Owner,
  680. Species,
  681. Breed,
  682. PatientHeight,
  683. PatientWeight,
  684. BSA,
  685. AB,
  686. Ectopic,
  687. Para,
  688. PSA,
  689. PPSACoefficient,
  690. BMI,
  691. HR,
  692. SBP,
  693. DBP,
  694. FetusNumber,
  695. Operator,
  696. PatientUniqueCode,
  697. History,
  698. PatientPresentation,
  699. PatientInspectionSiteSingle,
  700. ConsultationNumber,
  701. ContactAddress,
  702. PatientSource,
  703. ADNumber,
  704. BedNumber,
  705. ExamType,
  706. InspectionDepartment,
  707. LeftTumor,
  708. RightTumor,
  709. ScanPhysician,
  710. DigitalSignature,
  711. DescriptionOfRemoteConsultationPatients,
  712. ApplyForHospital,
  713. ConsultationHospital,
  714. OrganizationInformation
  715. };
  716. /// <summary>
  717. /// Gets or sets the input tag id.
  718. /// </summary>
  719. public string Id { get; set; }
  720. /// <summary>
  721. /// Ges the input tag name.e.g. PatientName, ReportDescription
  722. /// </summary>
  723. public string Name { get; set; }
  724. public string DisplayName { get; set; }
  725. /// <summary>
  726. /// Gets the value to indicate whether the element tag is default or added by user.
  727. /// </summary>
  728. public bool IsDefault { get; set; }
  729. /// <summary>
  730. /// Gets the element tag type.
  731. /// </summary>
  732. public ElementTagType ElementTagType { get; set; }
  733. /// <summary>
  734. /// Initialize <see cref="ElementTag"/>
  735. /// </summary>
  736. /// <param name="id">The element tag id.</param>
  737. /// <param name="name">The element tag name.</param>
  738. /// <param name="isDefault">The value to indicate whether the tag is default or not.</param>
  739. public ElementTag(string id, string name, bool isDefault, ElementTagType elementTagType = ElementTagType.General, string displayName = "")
  740. {
  741. Id = id;
  742. Name = name;
  743. IsDefault = isDefault;
  744. ElementTagType = elementTagType;
  745. DisplayName = displayName;
  746. }
  747. /// <summary>
  748. /// Tests whether the specified <see cref="ElementTag"/> structure is identical to this tag.
  749. /// </summary>
  750. /// <param name="other">The <see cref="ElementTag" /> structure to compare to the current structure.</param>
  751. /// <returns>If the specified <see cref="ElementTag"/> structure is identical to the current structure, returns true; otherwise, returns false.</returns>
  752. public bool Equals(ElementTag other)
  753. {
  754. if (other == null)
  755. {
  756. return false;
  757. }
  758. return string.Equals(Id, other.Id) && string.Equals(Name, other.Name);
  759. }
  760. /// <summary>
  761. /// Tests whether the specified object is a <see cref="ElementTag" /> structure and is equivalent to this tag.
  762. /// </summary>
  763. /// <param name="obj">The object to compare to this <see cref="ElementTag" /> structure.</param>
  764. /// <returns>If the specified object is a <see cref="ElementTag"/> structure and is identical to the current structure, returns true; otherwise, returns false. </returns>
  765. public override bool Equals(object obj)
  766. {
  767. if (ReferenceEquals(null, obj)) return false;
  768. return obj is ElementTag && Equals((ElementTag)obj);
  769. }
  770. /// <summary>
  771. /// Returns the hash code for this instance.
  772. /// </summary>
  773. /// <returns>A hash code for the current <see cref="ElementTag" />.</returns>
  774. public override int GetHashCode()
  775. {
  776. unchecked
  777. {
  778. return ((Id != null ? Id.GetHashCode() : 0) * 397) ^ (Name != null ? Name.GetHashCode() : 0);
  779. }
  780. }
  781. public override string ToString()
  782. {
  783. return Name;
  784. }
  785. }
  786. }