-
Notifications
You must be signed in to change notification settings - Fork 44
/
OclMapping.java
233 lines (171 loc) · 5.01 KB
/
OclMapping.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
/**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
*
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.openconceptlab.client;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown = true)
public class OclMapping {
private String id;
@JsonProperty("external_id")
private String externalId;
private String type;
private String url;
private Boolean retired;
@JsonProperty("map_type")
private String mapType;
@JsonProperty("from_source_url")
private String fromSourceUrl;
@JsonProperty("from_source_name")
private String fromSourceName;
@JsonProperty("from_concept_url")
private String fromConceptUrl;
@JsonProperty("from_concept_code")
private String fromConceptCode;
@JsonProperty("to_concept_url")
private String toConceptUrl;
@JsonProperty("to_source_name_resolved")
private String toSourceNameResolved;
@JsonProperty("to_source_name")
private String toSourceName;
@JsonProperty("to_concept_code")
private String toConceptCode;
@JsonProperty("updated_on")
private Date updatedOn;
@JsonProperty("sort_weight")
private Double sortWeight;
@JsonProperty("extras")
private Extras extras;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Boolean getRetired() {
return retired;
}
public boolean isRetired() {
return Boolean.TRUE.equals(retired);
}
public void setRetired(Boolean retired) {
this.retired = retired;
}
public String getMapType() {
return mapType;
}
public void setMapType(String mapType) {
this.mapType = mapType;
}
public String getFromSourceUrl() {
return fromSourceUrl;
}
public void setFromSourceUrl(String fromSourceUrl) {
this.fromSourceUrl = fromSourceUrl;
}
public String getFromSourceName() {
return fromSourceName;
}
public void setFromSourceName(String fromSourceName) {
this.fromSourceName = fromSourceName;
}
public String getFromConceptUrl() {
return fromConceptUrl;
}
public void setFromConceptUrl(String fromConceptUrl) {
this.fromConceptUrl = fromConceptUrl;
}
public String getFromConceptCode() {
return fromConceptCode;
}
public void setFromConceptCode(String fromConceptCode) {
this.fromConceptCode = fromConceptCode;
}
public String getToSourceName() {
return toSourceName != null ? toSourceName : toSourceNameResolved;
}
public void setToSourceName(String toSourceName) {
this.toSourceName = toSourceName;
}
public String getToSourceNameResolved() {
return toSourceNameResolved;
}
public void setToSourceNameResolved(String toSourceName) {
this.toSourceName = toSourceName;
}
public String getToConceptCode() {
return toConceptCode;
}
public void setToConceptCode(String toConceptCode) {
this.toConceptCode = toConceptCode;
}
public String getToConceptUrl() {
return toConceptUrl;
}
public void setToConceptUrl(String toConceptUrl) {
this.toConceptUrl = toConceptUrl;
}
public Date getUpdatedOn() {
return updatedOn;
}
public void setUpdatedOn(Date updatedOn) {
this.updatedOn = updatedOn;
}
public Double getSortWeight() {
return sortWeight == null ? (getExtras() != null ? getExtras().getSortWeight() : null) : sortWeight;
}
public void setSortWeight(Double sortWeight) {
this.sortWeight = sortWeight;
}
public Extras getExtras() {
return extras;
}
public void setExtras(Extras extras) {
this.extras = extras;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("externalId", externalId).build();
}
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Extras {
@JsonProperty("sort_weight")
private Double sortWeight;
public Double getSortWeight() {
return sortWeight;
}
public void setSortWeight(Double sortWeight) {
this.sortWeight = sortWeight;
}
}
public static final class MapType {
public static final String Q_AND_A = "Q-AND-A";
public static final String SET = "CONCEPT-SET";
}
}