/NuGenHL7v231/Genetibase/NuGenHL7/model/v231/message/RCL_I06.cs

https://github.com/GunioRobot/NuGenHL7 · C# · 436 lines · 343 code · 28 blank · 65 comment · 0 complexity · 65a51e7f26bc63d4bd49078781cac112 MD5 · raw file

  1. using System;
  2. using Genetibase.NuGenHL7.model.v231.group;
  3. using Genetibase.NuGenHL7.model.v231.segment;
  4. using HL7Exception = Genetibase.NuGenHL7.NuGenHL7Exception;
  5. using ModelClassFactory = Genetibase.NuGenHL7.parser.NuGenModelClassFactory;
  6. using DefaultModelClassFactory = Genetibase.NuGenHL7.parser.NuGenDefaultModelClassFactory;
  7. using AbstractMessage = Genetibase.NuGenHL7.model.AbstractMessage;
  8. namespace Genetibase.NuGenHL7.model.v231.message
  9. {
  10. /// <summary> <p>Represents a RCL_I06 message structure (see chapter ?). This structure contains the
  11. /// following elements: </p>
  12. /// 0: MSH (MSH - message header segment) <b></b><br>
  13. /// 1: MSA (MSA - message acknowledgment segment) <b></b><br>
  14. /// 2: QRD (QRD - original-style query definition segment) <b></b><br>
  15. /// 3: QRF (QRF - original style query filter segment) <b>optional </b><br>
  16. /// 4: RCL_I06_PRDCTD (a Group object) <b>repeating</b><br>
  17. /// 5: PID (PID - patient identification segment) <b></b><br>
  18. /// 6: DG1 (DG1 - diagnosis segment) <b>optional repeating</b><br>
  19. /// 7: DRG (DRG - diagnosis related group segment) <b>optional repeating</b><br>
  20. /// 8: AL1 (AL1 - patient allergy information segment) <b>optional repeating</b><br>
  21. /// 9: NTE (NTE - notes and comments segment) <b>optional repeating</b><br>
  22. /// 10: DSP (DSP - display data segment) <b>optional repeating</b><br>
  23. /// 11: DSC (DSC - Continuation pointer segment) <b>optional </b><br>
  24. /// </summary>
  25. [Serializable]
  26. public class RCL_I06:AbstractMessage
  27. {
  28. /// <summary> Returns MSH (MSH - message header segment) - creates it if necessary</summary>
  29. virtual public MSH MSH
  30. {
  31. get
  32. {
  33. MSH ret = null;
  34. try
  35. {
  36. ret = (MSH) this.get_Renamed("MSH");
  37. }
  38. catch (NuGenHL7Exception)
  39. {
  40. throw new Exception();
  41. }
  42. return ret;
  43. }
  44. }
  45. /// <summary> Returns MSA (MSA - message acknowledgment segment) - creates it if necessary</summary>
  46. virtual public MSA MSA
  47. {
  48. get
  49. {
  50. MSA ret = null;
  51. try
  52. {
  53. ret = (MSA) this.get_Renamed("MSA");
  54. }
  55. catch (NuGenHL7Exception)
  56. {
  57. throw new Exception();
  58. }
  59. return ret;
  60. }
  61. }
  62. /// <summary> Returns QRD (QRD - original-style query definition segment) - creates it if necessary</summary>
  63. virtual public QRD QRD
  64. {
  65. get
  66. {
  67. QRD ret = null;
  68. try
  69. {
  70. ret = (QRD) this.get_Renamed("QRD");
  71. }
  72. catch (NuGenHL7Exception)
  73. {
  74. throw new Exception();
  75. }
  76. return ret;
  77. }
  78. }
  79. /// <summary> Returns QRF (QRF - original style query filter segment) - creates it if necessary</summary>
  80. virtual public QRF QRF
  81. {
  82. get
  83. {
  84. QRF ret = null;
  85. try
  86. {
  87. ret = (QRF) this.get_Renamed("QRF");
  88. }
  89. catch (NuGenHL7Exception)
  90. {
  91. throw new Exception();
  92. }
  93. return ret;
  94. }
  95. }
  96. /// <summary> Returns the number of existing repetitions of RCL_I06_PRDCTD </summary>
  97. virtual public int PRDCTDReps
  98. {
  99. get
  100. {
  101. int reps = - 1;
  102. try
  103. {
  104. reps = this.getAll("PRDCTD").Length;
  105. }
  106. catch (NuGenHL7Exception)
  107. {
  108. System.String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
  109. throw new System.SystemException(message);
  110. }
  111. return reps;
  112. }
  113. }
  114. /// <summary> Returns PID (PID - patient identification segment) - creates it if necessary</summary>
  115. virtual public PID PID
  116. {
  117. get
  118. {
  119. PID ret = null;
  120. try
  121. {
  122. ret = (PID) this.get_Renamed("PID");
  123. }
  124. catch (NuGenHL7Exception)
  125. {
  126. throw new Exception();
  127. }
  128. return ret;
  129. }
  130. }
  131. /// <summary> Returns the number of existing repetitions of DG1 </summary>
  132. virtual public int DG1Reps
  133. {
  134. get
  135. {
  136. int reps = - 1;
  137. try
  138. {
  139. reps = this.getAll("DG1").Length;
  140. }
  141. catch (NuGenHL7Exception)
  142. {
  143. System.String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
  144. throw new System.SystemException(message);
  145. }
  146. return reps;
  147. }
  148. }
  149. /// <summary> Returns the number of existing repetitions of DRG </summary>
  150. virtual public int DRGReps
  151. {
  152. get
  153. {
  154. int reps = - 1;
  155. try
  156. {
  157. reps = this.getAll("DRG").Length;
  158. }
  159. catch (NuGenHL7Exception)
  160. {
  161. System.String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
  162. throw new System.SystemException(message);
  163. }
  164. return reps;
  165. }
  166. }
  167. /// <summary> Returns the number of existing repetitions of AL1 </summary>
  168. virtual public int AL1Reps
  169. {
  170. get
  171. {
  172. int reps = - 1;
  173. try
  174. {
  175. reps = this.getAll("AL1").Length;
  176. }
  177. catch (NuGenHL7Exception)
  178. {
  179. System.String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
  180. throw new System.SystemException(message);
  181. }
  182. return reps;
  183. }
  184. }
  185. /// <summary> Returns the number of existing repetitions of NTE </summary>
  186. virtual public int NTEReps
  187. {
  188. get
  189. {
  190. int reps = - 1;
  191. try
  192. {
  193. reps = this.getAll("NTE").Length;
  194. }
  195. catch (NuGenHL7Exception)
  196. {
  197. System.String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
  198. throw new System.SystemException(message);
  199. }
  200. return reps;
  201. }
  202. }
  203. /// <summary> Returns the number of existing repetitions of DSP </summary>
  204. virtual public int DSPReps
  205. {
  206. get
  207. {
  208. int reps = - 1;
  209. try
  210. {
  211. reps = this.getAll("DSP").Length;
  212. }
  213. catch (NuGenHL7Exception)
  214. {
  215. System.String message = "Unexpected error accessing data - this is probably a bug in the source code generator.";
  216. throw new System.SystemException(message);
  217. }
  218. return reps;
  219. }
  220. }
  221. /// <summary> Returns DSC (DSC - Continuation pointer segment) - creates it if necessary</summary>
  222. virtual public DSC DSC
  223. {
  224. get
  225. {
  226. DSC ret = null;
  227. try
  228. {
  229. ret = (DSC) this.get_Renamed("DSC");
  230. }
  231. catch (NuGenHL7Exception)
  232. {
  233. throw new Exception();
  234. }
  235. return ret;
  236. }
  237. }
  238. /// <summary> Creates a new RCL_I06 Group with custom ModelClassFactory.</summary>
  239. public RCL_I06(ModelClassFactory factory):base(factory)
  240. {
  241. init(factory);
  242. }
  243. /// <summary> Creates a new RCL_I06 Group with DefaultModelClassFactory. </summary>
  244. public RCL_I06():base(new DefaultModelClassFactory())
  245. {
  246. init(new DefaultModelClassFactory());
  247. }
  248. private void init(ModelClassFactory factory)
  249. {
  250. try
  251. {
  252. this.add(typeof(MSH), true, false);
  253. this.add(typeof(MSA), true, false);
  254. this.add(typeof(QRD), true, false);
  255. this.add(typeof(QRF), false, false);
  256. this.add(typeof(RCL_I06_PRDCTD), true, true);
  257. this.add(typeof(PID), true, false);
  258. this.add(typeof(DG1), false, true);
  259. this.add(typeof(DRG), false, true);
  260. this.add(typeof(AL1), false, true);
  261. this.add(typeof(NTE), false, true);
  262. this.add(typeof(DSP), false, true);
  263. this.add(typeof(DSC), false, false);
  264. }
  265. catch (NuGenHL7Exception)
  266. {
  267. }
  268. }
  269. /// <summary> Returns first repetition of RCL_I06_PRDCTD (a Group object) - creates it if necessary</summary>
  270. public virtual RCL_I06_PRDCTD getPRDCTD()
  271. {
  272. RCL_I06_PRDCTD ret = null;
  273. try
  274. {
  275. ret = (RCL_I06_PRDCTD) this.get_Renamed("PRDCTD");
  276. }
  277. catch (NuGenHL7Exception)
  278. {
  279. throw new Exception();
  280. }
  281. return ret;
  282. }
  283. /// <summary> Returns a specific repetition of RCL_I06_PRDCTD
  284. /// (a Group object) - creates it if necessary
  285. /// throws HL7Exception if the repetition requested is more than one
  286. /// greater than the number of existing repetitions.
  287. /// </summary>
  288. public virtual RCL_I06_PRDCTD getPRDCTD(int rep)
  289. {
  290. return (RCL_I06_PRDCTD) this.get_Renamed("PRDCTD", rep);
  291. }
  292. /// <summary> Returns first repetition of DG1 (DG1 - diagnosis segment) - creates it if necessary</summary>
  293. public virtual DG1 getDG1()
  294. {
  295. DG1 ret = null;
  296. try
  297. {
  298. ret = (DG1) this.get_Renamed("DG1");
  299. }
  300. catch (NuGenHL7Exception)
  301. {
  302. throw new Exception();
  303. }
  304. return ret;
  305. }
  306. /// <summary> Returns a specific repetition of DG1
  307. /// (DG1 - diagnosis segment) - creates it if necessary
  308. /// throws HL7Exception if the repetition requested is more than one
  309. /// greater than the number of existing repetitions.
  310. /// </summary>
  311. public virtual DG1 getDG1(int rep)
  312. {
  313. return (DG1) this.get_Renamed("DG1", rep);
  314. }
  315. /// <summary> Returns first repetition of DRG (DRG - diagnosis related group segment) - creates it if necessary</summary>
  316. public virtual DRG getDRG()
  317. {
  318. DRG ret = null;
  319. try
  320. {
  321. ret = (DRG) this.get_Renamed("DRG");
  322. }
  323. catch (NuGenHL7Exception)
  324. {
  325. throw new Exception();
  326. }
  327. return ret;
  328. }
  329. /// <summary> Returns a specific repetition of DRG
  330. /// (DRG - diagnosis related group segment) - creates it if necessary
  331. /// throws HL7Exception if the repetition requested is more than one
  332. /// greater than the number of existing repetitions.
  333. /// </summary>
  334. public virtual DRG getDRG(int rep)
  335. {
  336. return (DRG) this.get_Renamed("DRG", rep);
  337. }
  338. /// <summary> Returns first repetition of AL1 (AL1 - patient allergy information segment) - creates it if necessary</summary>
  339. public virtual AL1 getAL1()
  340. {
  341. AL1 ret = null;
  342. try
  343. {
  344. ret = (AL1) this.get_Renamed("AL1");
  345. }
  346. catch (NuGenHL7Exception)
  347. {
  348. throw new Exception();
  349. }
  350. return ret;
  351. }
  352. /// <summary> Returns a specific repetition of AL1
  353. /// (AL1 - patient allergy information segment) - creates it if necessary
  354. /// throws HL7Exception if the repetition requested is more than one
  355. /// greater than the number of existing repetitions.
  356. /// </summary>
  357. public virtual AL1 getAL1(int rep)
  358. {
  359. return (AL1) this.get_Renamed("AL1", rep);
  360. }
  361. /// <summary> Returns first repetition of NTE (NTE - notes and comments segment) - creates it if necessary</summary>
  362. public virtual NTE getNTE()
  363. {
  364. NTE ret = null;
  365. try
  366. {
  367. ret = (NTE) this.get_Renamed("NTE");
  368. }
  369. catch (NuGenHL7Exception)
  370. {
  371. throw new Exception();
  372. }
  373. return ret;
  374. }
  375. /// <summary> Returns a specific repetition of NTE
  376. /// (NTE - notes and comments segment) - creates it if necessary
  377. /// throws HL7Exception if the repetition requested is more than one
  378. /// greater than the number of existing repetitions.
  379. /// </summary>
  380. public virtual NTE getNTE(int rep)
  381. {
  382. return (NTE) this.get_Renamed("NTE", rep);
  383. }
  384. /// <summary> Returns first repetition of DSP (DSP - display data segment) - creates it if necessary</summary>
  385. public virtual DSP getDSP()
  386. {
  387. DSP ret = null;
  388. try
  389. {
  390. ret = (DSP) this.get_Renamed("DSP");
  391. }
  392. catch (NuGenHL7Exception)
  393. {
  394. throw new Exception();
  395. }
  396. return ret;
  397. }
  398. /// <summary> Returns a specific repetition of DSP
  399. /// (DSP - display data segment) - creates it if necessary
  400. /// throws HL7Exception if the repetition requested is more than one
  401. /// greater than the number of existing repetitions.
  402. /// </summary>
  403. public virtual DSP getDSP(int rep)
  404. {
  405. return (DSP) this.get_Renamed("DSP", rep);
  406. }
  407. }
  408. }