Skip to content

Commit

Permalink
push data to elastic search
Browse files Browse the repository at this point in the history
  • Loading branch information
Dert1129 committed Nov 13, 2024
1 parent 4337185 commit 6d553a3
Show file tree
Hide file tree
Showing 8 changed files with 1,328 additions and 15 deletions.
776 changes: 765 additions & 11 deletions .classpath

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/main/java/org/kpmp/QueryController.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.kpmp.spatialViewerDataset.SpatialViewerExternalLinkDataset;
import org.kpmp.spatialViewerDataset.SpatialViewerFileDataset;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.graphql.data.method.annotation.QueryMapping;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,29 @@ public interface SpatialViewerDataset {

Double getReleaseVersion();

String getPrimaryAdjudicatedCategory();

String getKdigoStage();

String getBaselineEgfr();

String getProteinuria();

String getA1c();

String getAlbuminuria();

String getDiabetesDuration();

String getDiabetesHistory();

String getHypertensionDuration();

String getHypertensionHistory();

String getOnRaasBlockade();

String getRace();

}

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.fasterxml.jackson.annotation.*;
import org.springframework.lang.Nullable;
import org.apache.commons.text.WordUtils;
import org.kpmp.file.File;

import java.util.ArrayList;
Expand All @@ -33,6 +34,21 @@ public class SpatialViewerExternalLinkDataset implements SpatialViewerDataset {
private String tissueSource;
private String enrollmentCategory;
private Double releaseVersion;
@Column(name = "primary_adjudicated_cat")
private String primaryAdjudicatedCategory;
private String kdigoStage;
private String baselineEgfr;
private String proteinuria;
private String a1c;
private String albuminuria;
private String diabetesHistory;
private String diabetesDuration;
private String hypertensionDuration;
private String hypertensionHistory;
private String onRaasBlockade;
private String race;


@Transient
private String releaseVersionDisplay;

Expand Down Expand Up @@ -185,6 +201,164 @@ public void setReleaseVersionDisplay(String releaseVersionDisplay) {
this.releaseVersionDisplay = releaseVersionDisplay;
}

@JsonProperty("primaryadjudicatedcategory")
public String getPrimaryAdjudicatedCategory() {
return this.primaryAdjudicatedCategory;
}

public void setPrimaryAdjudicatedCategory(String primaryAdjudicatedCategory) {
this.primaryAdjudicatedCategory = primaryAdjudicatedCategory;
}

@JsonProperty("kdigostage")
public String getKdigoStage() {
if(this.kdigoStage.isEmpty()){
return null;
}else{
return this.kdigoStage;
}
}

public void setKdigoStage(String kdigoStage) {
this.kdigoStage = kdigoStage;
}

@JsonProperty("baselineegfr")
public String getBaselineEgfr() {
if(this.baselineEgfr.isEmpty()){
return null;
}else{
return this.baselineEgfr;
}
}

public void setBaselineEgfr(String baselineEgfr) {
this.baselineEgfr = baselineEgfr;
}

@JsonProperty("proteinuria")
public String getProteinuria() {
if(this.proteinuria.isEmpty()){
return null;
}else {
return this.proteinuria;
}
}

public void setProteinuria(String proteinuria) {
this.proteinuria = proteinuria;
}

@JsonProperty("a1c")
public String getA1c() {
if(this.a1c.isEmpty()){
return null;
}else {
return this.a1c;
}
}

public void setA1c(String a1c) {
this.a1c = a1c;
}

@JsonProperty("albuminuria")
public String getAlbuminuria() {
if(this.albuminuria.isEmpty()){
return null;
}else{
return albuminuria;
}
}

public void setAlbuminuria(String albuminuria) {
this.albuminuria = albuminuria;
}

@JsonProperty("diabeteshistory")
public String getDiabetesHistory() {
if(this.diabetesHistory.isEmpty()){
return null;
}else{
return fixCapitalization(this.diabetesHistory);
}
}

public void setDiabetesHistory(String diabetesHistory) {
this.diabetesHistory = diabetesHistory;
}

@JsonProperty("diabetesduration")
public String getDiabetesDuration() {
if(this.diabetesDuration.isEmpty()){
return null;
}else{
return this.diabetesDuration;
}
}

public void setDiabetesDuration(String diabetesDuration) {
this.diabetesDuration = diabetesDuration;
}

@JsonProperty("hypertensionduration")
public String getHypertensionDuration() {
if(this.hypertensionDuration.isEmpty()){
return null;
}else{
return this.hypertensionDuration;
}
}

public void setHypertensionDuration(String hypertensionDuration) {
this.hypertensionDuration = hypertensionDuration;
}

@JsonProperty("hypertensionhistory")
public String getHypertensionHistory() {
if(this.hypertensionHistory.isEmpty()){
return null;
}else{
return fixCapitalization(this.hypertensionHistory);
}
}

public void setHypertensionHistory(String hypertensionHistory) {
this.hypertensionHistory = hypertensionHistory;
}

@JsonProperty("onraasblockade")
public String getOnRaasBlockade() {
if(this.onRaasBlockade.isEmpty()){
return null;
}else{
return this.onRaasBlockade;
}
}

@JsonProperty("ethnicity")
public String getRace() {
if(this.race.isEmpty()){
return null;
}else {
return this.race;
}
}

public void setRace(String race) {
this.race = race;
}

public void setOnRaasBlockade(String onRaasBlockade) {
this.onRaasBlockade = onRaasBlockade;
}
public void setParticipantIdSort(int participantIdSort) {
this.participantIdSort = participantIdSort;
}
public void setImageTypeSort(String imageTypeSort) {
this.imageTypeSort = imageTypeSort;
}

@JsonProperty("dlfileid")
public String getDlFileId() {
return null;
Expand Down Expand Up @@ -235,7 +409,10 @@ public String getPackageId() {
public String getLevel() {
return null;
}



public String fixCapitalization(String input){
String updatedInput = WordUtils.capitalizeFully(input);
return updatedInput;
}

}
Loading

0 comments on commit 6d553a3

Please sign in to comment.