1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.openehealth.ipf.commons.ihe.hl7v2.definitions.xpid.v25.message;
18
19 import ca.uhn.hl7v2.HL7Exception;
20 import ca.uhn.hl7v2.model.Structure;
21 import ca.uhn.hl7v2.model.v25.group.ADT_A43_PATIENT;
22 import ca.uhn.hl7v2.model.v25.segment.EVN;
23 import ca.uhn.hl7v2.model.v25.segment.MSH;
24 import ca.uhn.hl7v2.model.v25.segment.SFT;
25 import ca.uhn.hl7v2.parser.ModelClassFactory;
26 import org.openehealth.ipf.commons.ihe.hl7v2.definitions.xpid.v25.segment.ZZI;
27 import org.openehealth.ipf.modules.hl7.model.AbstractMessage;
28
29 import java.util.List;
30 import java.util.Map;
31
32
33
34
35 public class ADT_A43 extends AbstractMessage {
36
37 public ADT_A43() {
38 super();
39 }
40
41 public ADT_A43(ModelClassFactory factory) {
42 super(factory);
43 }
44
45 @Override
46 protected Map<Class<? extends Structure>, Cardinality> structures(Map<Class<? extends Structure>, Cardinality> s) {
47 s.put(MSH.class, Cardinality.REQUIRED);
48 s.put(SFT.class, Cardinality.OPTIONAL_REPEATING);
49 s.put(EVN.class, Cardinality.REQUIRED);
50 s.put(ADT_A43_PATIENT.class, Cardinality.REQUIRED_REPEATING);
51 s.put(ZZI.class, Cardinality.OPTIONAL);
52 return s;
53 }
54
55 public String getVersion() {
56 return "2.5";
57 }
58
59 public MSH getMSH() {
60 return getTyped("MSH", MSH.class);
61 }
62
63 public EVN getEVN() {
64 return getTyped("EVN", EVN.class);
65 }
66
67
68
69
70
71
72
73 public SFT getSFT(int rep) {
74 return getTyped("SFT", rep, SFT.class);
75 }
76
77
78
79
80 public int getSFTReps() {
81 return getReps("SFT");
82 }
83
84
85
86
87 public java.util.List<SFT> getSFTAll() throws HL7Exception {
88 return getAllAsList("SFT", SFT.class);
89 }
90
91 public ADT_A43_PATIENT getPATIENT() {
92 return this.getTyped("PATIENT", ADT_A43_PATIENT.class);
93 }
94
95 public ADT_A43_PATIENT getPATIENT(int rep) {
96 return this.getTyped("PATIENT", rep, ADT_A43_PATIENT.class);
97 }
98
99 public int getPATIENTReps() {
100 return this.getReps("PATIENT");
101 }
102
103 public List<ADT_A43_PATIENT> getPATIENTAll() throws HL7Exception {
104 return this.getAllAsList("PATIENT", ADT_A43_PATIENT.class);
105 }
106
107 public void insertPATIENT(ADT_A43_PATIENT structure, int rep) throws HL7Exception {
108 super.insertRepetition("PATIENT", structure, rep);
109 }
110
111 public ADT_A43_PATIENT insertPATIENT(int rep) throws HL7Exception {
112 return (ADT_A43_PATIENT)super.insertRepetition("PATIENT", rep);
113 }
114
115 public ADT_A43_PATIENT removePATIENT(int rep) throws HL7Exception {
116 return (ADT_A43_PATIENT)super.removeRepetition("PATIENT", rep);
117 }
118 }