Skip to content

Commit 7adb69b

Browse files
oleg-odysseusalex-odysseus
authored andcommitted
[ATL-58] Added concept set version to annotations
1 parent 0fff858 commit 7adb69b

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

src/main/java/org/ohdsi/webapi/conceptset/annotation/ConceptSetAnnotation.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public class ConceptSetAnnotation extends CommonEntity<Integer> implements Seria
4444
@Column(name = "vocabulary_version")
4545
private String vocabularyVersion;
4646

47+
@Column(name = "concept_set_version")
48+
private String conceptSetVersion;
49+
4750
public Integer getId() {
4851
return id;
4952
}
@@ -83,4 +86,12 @@ public String getVocabularyVersion() {
8386
public void setVocabularyVersion(String vocabularyVersion) {
8487
this.vocabularyVersion = vocabularyVersion;
8588
}
89+
90+
public String getConceptSetVersion() {
91+
return conceptSetVersion;
92+
}
93+
94+
public void setConceptSetVersion(String conceptSetVersion) {
95+
this.conceptSetVersion = conceptSetVersion;
96+
}
8697
}

src/main/java/org/ohdsi/webapi/service/ConceptSetService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,7 @@ public boolean saveConceptSetAnnotation(@PathParam("id") final int id, ConceptSe
903903
throw new RuntimeException(e);
904904
}
905905
conceptSetAnnotation.setVocabularyVersion(m.getVocabularyVersion());
906+
conceptSetAnnotation.setConceptSetVersion(m.getConceptSetVersion());
906907
conceptSetAnnotation.setConceptId(m.getConceptId());
907908
conceptSetAnnotation.setCreatedBy(getCurrentUser());
908909
conceptSetAnnotation.setCreatedDate(new Date());
@@ -928,6 +929,7 @@ public List<AnnotationDTO> getConceptSetAnnotation(@PathParam("id") final int id
928929
annotationDTO = mapper.readValue(conceptSetAnnotation.getAnnotationDetails(), AnnotationDTO.class);
929930
annotationDTO.setId(conceptSetAnnotation.getId());
930931
annotationDTO.setVocabularyVersion(conceptSetAnnotation.getVocabularyVersion());
932+
annotationDTO.setConceptSetVersion(conceptSetAnnotation.getConceptSetVersion());
931933
annotationDTO.setCreatedBy(conceptSetAnnotation.getCreatedBy() != null ? conceptSetAnnotation.getCreatedBy().getName() : null);
932934
annotationDTO.setCreatedDate(conceptSetAnnotation.getCreatedDate() != null ? conceptSetAnnotation.getCreatedDate().toString() : null);
933935
annotationDTOList.add(annotationDTO);

src/main/java/org/ohdsi/webapi/service/dto/AnnotationDTO.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public class AnnotationDTO extends AnnotationDetailsDTO {
88
private String createdBy;
99
private String createdDate;
1010
private String vocabularyVersion;
11+
private String conceptSetVersion;
1112

1213
public String getCreatedBy() {
1314
return createdBy;
@@ -32,4 +33,12 @@ public String getVocabularyVersion() {
3233
public void setVocabularyVersion(String vocabularyVersion) {
3334
this.vocabularyVersion = vocabularyVersion;
3435
}
36+
37+
public String getConceptSetVersion() {
38+
return conceptSetVersion;
39+
}
40+
41+
public void setConceptSetVersion(String conceptSetVersion) {
42+
this.conceptSetVersion = conceptSetVersion;
43+
}
3544
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE ${ohdsiSchema}.concept_set_annotation ADD concept_set_version VARCHAR;

0 commit comments

Comments
 (0)