mirror of
https://github.com/dnpm-dip/mv64e-mtb-dto-java.git
synced 2025-07-02 02:32:55 +00:00
Add IHC report and Therapies
This commit is contained in:
@ -3,15 +3,15 @@ package dev.pcvolkmer.mv64e.mtb;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class CodingEcog {
|
||||
private PurpleCode code;
|
||||
private EcogCode code;
|
||||
private String display;
|
||||
private String system;
|
||||
private String version;
|
||||
|
||||
@JsonProperty("code")
|
||||
public PurpleCode getCode() { return code; }
|
||||
public EcogCode getCode() { return code; }
|
||||
@JsonProperty("code")
|
||||
public void setCode(PurpleCode value) { this.code = value; }
|
||||
public void setCode(EcogCode value) { this.code = value; }
|
||||
|
||||
@JsonProperty("display")
|
||||
public String getDisplay() { return display; }
|
||||
|
@ -0,0 +1,30 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class CodingProteinExpressionIcScore {
|
||||
private ICScoreCode code;
|
||||
private String display;
|
||||
private String system;
|
||||
private String version;
|
||||
|
||||
@JsonProperty("code")
|
||||
public ICScoreCode getCode() { return code; }
|
||||
@JsonProperty("code")
|
||||
public void setCode(ICScoreCode value) { this.code = value; }
|
||||
|
||||
@JsonProperty("display")
|
||||
public String getDisplay() { return display; }
|
||||
@JsonProperty("display")
|
||||
public void setDisplay(String value) { this.display = value; }
|
||||
|
||||
@JsonProperty("system")
|
||||
public String getSystem() { return system; }
|
||||
@JsonProperty("system")
|
||||
public void setSystem(String value) { this.system = value; }
|
||||
|
||||
@JsonProperty("version")
|
||||
public String getVersion() { return version; }
|
||||
@JsonProperty("version")
|
||||
public void setVersion(String value) { this.version = value; }
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class CodingProteinExpressionResult {
|
||||
private ProteinExpressionResultCode code;
|
||||
private String display;
|
||||
private String system;
|
||||
private String version;
|
||||
|
||||
@JsonProperty("code")
|
||||
public ProteinExpressionResultCode getCode() { return code; }
|
||||
@JsonProperty("code")
|
||||
public void setCode(ProteinExpressionResultCode value) { this.code = value; }
|
||||
|
||||
@JsonProperty("display")
|
||||
public String getDisplay() { return display; }
|
||||
@JsonProperty("display")
|
||||
public void setDisplay(String value) { this.display = value; }
|
||||
|
||||
@JsonProperty("system")
|
||||
public String getSystem() { return system; }
|
||||
@JsonProperty("system")
|
||||
public void setSystem(String value) { this.system = value; }
|
||||
|
||||
@JsonProperty("version")
|
||||
public String getVersion() { return version; }
|
||||
@JsonProperty("version")
|
||||
public void setVersion(String value) { this.version = value; }
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class CodingProteinExpressionTcScore {
|
||||
private TcScoreCode code;
|
||||
private String display;
|
||||
private String system;
|
||||
private String version;
|
||||
|
||||
@JsonProperty("code")
|
||||
public TcScoreCode getCode() { return code; }
|
||||
@JsonProperty("code")
|
||||
public void setCode(TcScoreCode value) { this.code = value; }
|
||||
|
||||
@JsonProperty("display")
|
||||
public String getDisplay() { return display; }
|
||||
@JsonProperty("display")
|
||||
public void setDisplay(String value) { this.display = value; }
|
||||
|
||||
@JsonProperty("system")
|
||||
public String getSystem() { return system; }
|
||||
@JsonProperty("system")
|
||||
public void setSystem(String value) { this.system = value; }
|
||||
|
||||
@JsonProperty("version")
|
||||
public String getVersion() { return version; }
|
||||
@JsonProperty("version")
|
||||
public void setVersion(String value) { this.version = value; }
|
||||
}
|
@ -3,15 +3,15 @@ package dev.pcvolkmer.mv64e.mtb;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class CodingRecist {
|
||||
private FluffyCode code;
|
||||
private RecistCode code;
|
||||
private String display;
|
||||
private String system;
|
||||
private String version;
|
||||
|
||||
@JsonProperty("code")
|
||||
public FluffyCode getCode() { return code; }
|
||||
public RecistCode getCode() { return code; }
|
||||
@JsonProperty("code")
|
||||
public void setCode(FluffyCode value) { this.code = value; }
|
||||
public void setCode(RecistCode value) { this.code = value; }
|
||||
|
||||
@JsonProperty("display")
|
||||
public String getDisplay() { return display; }
|
||||
|
@ -3,7 +3,7 @@ package dev.pcvolkmer.mv64e.mtb;
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public enum PurpleCode {
|
||||
public enum EcogCode {
|
||||
CODE_0, CODE_1, CODE_2, CODE_3, CODE_4;
|
||||
|
||||
@JsonValue
|
||||
@ -19,7 +19,7 @@ public enum PurpleCode {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static PurpleCode forValue(String value) throws IOException {
|
||||
public static EcogCode forValue(String value) throws IOException {
|
||||
switch (value) {
|
||||
case "0":
|
||||
return CODE_0;
|
||||
@ -32,6 +32,6 @@ public enum PurpleCode {
|
||||
case "4":
|
||||
return CODE_4;
|
||||
}
|
||||
throw new IOException("Cannot deserialize PurpleCode");
|
||||
throw new IOException("Cannot deserialize EcogCode");
|
||||
}
|
||||
}
|
34
src/main/java/dev/pcvolkmer/mv64e/mtb/ICScoreCode.java
Normal file
34
src/main/java/dev/pcvolkmer/mv64e/mtb/ICScoreCode.java
Normal file
@ -0,0 +1,34 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public enum ICScoreCode {
|
||||
CODE_0, CODE_1, CODE_2, CODE_3;
|
||||
|
||||
@JsonValue
|
||||
public String toValue() {
|
||||
switch (this) {
|
||||
case CODE_0: return "0";
|
||||
case CODE_1: return "1";
|
||||
case CODE_2: return "2";
|
||||
case CODE_3: return "3";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static ICScoreCode forValue(String value) throws IOException {
|
||||
switch (value) {
|
||||
case "0":
|
||||
return CODE_0;
|
||||
case "1":
|
||||
return CODE_1;
|
||||
case "2":
|
||||
return CODE_2;
|
||||
case "3":
|
||||
return CODE_3;
|
||||
}
|
||||
throw new IOException("Cannot deserialize ICScoreCode");
|
||||
}
|
||||
}
|
58
src/main/java/dev/pcvolkmer/mv64e/mtb/IHCReport.java
Normal file
58
src/main/java/dev/pcvolkmer/mv64e/mtb/IHCReport.java
Normal file
@ -0,0 +1,58 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class IHCReport {
|
||||
private ExternalId blockId;
|
||||
private Date date;
|
||||
private String id;
|
||||
private ExternalId journalId;
|
||||
private List<MSIMmrResult> msiMmrResults;
|
||||
private Reference patient;
|
||||
private List<ProteinExpressionResult> proteinExpressionResults;
|
||||
private Reference specimen;
|
||||
|
||||
@JsonProperty("blockId")
|
||||
public ExternalId getBlockId() { return blockId; }
|
||||
@JsonProperty("blockId")
|
||||
public void setBlockId(ExternalId value) { this.blockId = value; }
|
||||
|
||||
@JsonProperty("date")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
public Date getDate() { return date; }
|
||||
@JsonProperty("date")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
public void setDate(Date value) { this.date = value; }
|
||||
|
||||
@JsonProperty("id")
|
||||
public String getId() { return id; }
|
||||
@JsonProperty("id")
|
||||
public void setId(String value) { this.id = value; }
|
||||
|
||||
@JsonProperty("journalId")
|
||||
public ExternalId getJournalId() { return journalId; }
|
||||
@JsonProperty("journalId")
|
||||
public void setJournalId(ExternalId value) { this.journalId = value; }
|
||||
|
||||
@JsonProperty("msiMmrResults")
|
||||
public List<MSIMmrResult> getMsiMmrResults() { return msiMmrResults; }
|
||||
@JsonProperty("msiMmrResults")
|
||||
public void setMsiMmrResults(List<MSIMmrResult> value) { this.msiMmrResults = value; }
|
||||
|
||||
@JsonProperty("patient")
|
||||
public Reference getPatient() { return patient; }
|
||||
@JsonProperty("patient")
|
||||
public void setPatient(Reference value) { this.patient = value; }
|
||||
|
||||
@JsonProperty("proteinExpressionResults")
|
||||
public List<ProteinExpressionResult> getProteinExpressionResults() { return proteinExpressionResults; }
|
||||
@JsonProperty("proteinExpressionResults")
|
||||
public void setProteinExpressionResults(List<ProteinExpressionResult> value) { this.proteinExpressionResults = value; }
|
||||
|
||||
@JsonProperty("specimen")
|
||||
public Reference getSpecimen() { return specimen; }
|
||||
@JsonProperty("specimen")
|
||||
public void setSpecimen(Reference value) { this.specimen = value; }
|
||||
}
|
48
src/main/java/dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java
Normal file
48
src/main/java/dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java
Normal file
@ -0,0 +1,48 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class MSIMmrResult {
|
||||
private CodingProteinExpressionIcScore icScore;
|
||||
private String id;
|
||||
private Reference patient;
|
||||
private Coding protein;
|
||||
private CodingProteinExpressionTcScore tcScore;
|
||||
private Long tpsScore;
|
||||
private CodingProteinExpressionResult value;
|
||||
|
||||
@JsonProperty("icScore")
|
||||
public CodingProteinExpressionIcScore getIcScore() { return icScore; }
|
||||
@JsonProperty("icScore")
|
||||
public void setIcScore(CodingProteinExpressionIcScore value) { this.icScore = value; }
|
||||
|
||||
@JsonProperty("id")
|
||||
public String getId() { return id; }
|
||||
@JsonProperty("id")
|
||||
public void setId(String value) { this.id = value; }
|
||||
|
||||
@JsonProperty("patient")
|
||||
public Reference getPatient() { return patient; }
|
||||
@JsonProperty("patient")
|
||||
public void setPatient(Reference value) { this.patient = value; }
|
||||
|
||||
@JsonProperty("protein")
|
||||
public Coding getProtein() { return protein; }
|
||||
@JsonProperty("protein")
|
||||
public void setProtein(Coding value) { this.protein = value; }
|
||||
|
||||
@JsonProperty("tcScore")
|
||||
public CodingProteinExpressionTcScore getTcScore() { return tcScore; }
|
||||
@JsonProperty("tcScore")
|
||||
public void setTcScore(CodingProteinExpressionTcScore value) { this.tcScore = value; }
|
||||
|
||||
@JsonProperty("tpsScore")
|
||||
public Long getTpsScore() { return tpsScore; }
|
||||
@JsonProperty("tpsScore")
|
||||
public void setTpsScore(Long value) { this.tpsScore = value; }
|
||||
|
||||
@JsonProperty("value")
|
||||
public CodingProteinExpressionResult getValue() { return value; }
|
||||
@JsonProperty("value")
|
||||
public void setValue(CodingProteinExpressionResult value) { this.value = value; }
|
||||
}
|
@ -5,7 +5,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class MTBMedicationTherapy {
|
||||
private String basedOn;
|
||||
private Reference basedOn;
|
||||
private String diagnosis;
|
||||
private String id;
|
||||
private Reference indication;
|
||||
@ -19,9 +19,9 @@ public class MTBMedicationTherapy {
|
||||
private Long therapyLine;
|
||||
|
||||
@JsonProperty("basedOn")
|
||||
public String getBasedOn() { return basedOn; }
|
||||
public Reference getBasedOn() { return basedOn; }
|
||||
@JsonProperty("basedOn")
|
||||
public void setBasedOn(String value) { this.basedOn = value; }
|
||||
public void setBasedOn(Reference value) { this.basedOn = value; }
|
||||
|
||||
@JsonProperty("diagnosis")
|
||||
public String getDiagnosis() { return diagnosis; }
|
||||
|
@ -14,6 +14,7 @@ public class Mtb {
|
||||
private List<OncoProdecure> guidelineProcedures;
|
||||
private List<MTBMedicationTherapy> guidelineTherapies;
|
||||
private List<HistologyReport> histologyReports;
|
||||
private List<IHCReport> ihcReports;
|
||||
private List<MolecularTherapy> molecularTherapies;
|
||||
private List<SomaticNgsReport> ngsReports;
|
||||
private MtbPatient patient;
|
||||
@ -22,6 +23,7 @@ public class Mtb {
|
||||
private List<Response> responses;
|
||||
private List<TumorSpecimen> specimens;
|
||||
private List<StudyEnrollmentRecommendation> studyInclusionRequests;
|
||||
private List<Therapy> therapies;
|
||||
|
||||
@JsonProperty("carePlans")
|
||||
public List<MTBCarePlan> getCarePlans() { return carePlans; }
|
||||
@ -73,6 +75,11 @@ public class Mtb {
|
||||
@JsonProperty("histologyReports")
|
||||
public void setHistologyReports(List<HistologyReport> value) { this.histologyReports = value; }
|
||||
|
||||
@JsonProperty("ihcReports")
|
||||
public List<IHCReport> getIhcReports() { return ihcReports; }
|
||||
@JsonProperty("ihcReports")
|
||||
public void setIhcReports(List<IHCReport> value) { this.ihcReports = value; }
|
||||
|
||||
@JsonProperty("molecularTherapies")
|
||||
public List<MolecularTherapy> getMolecularTherapies() { return molecularTherapies; }
|
||||
@JsonProperty("molecularTherapies")
|
||||
@ -112,4 +119,9 @@ public class Mtb {
|
||||
public List<StudyEnrollmentRecommendation> getStudyInclusionRequests() { return studyInclusionRequests; }
|
||||
@JsonProperty("studyInclusionRequests")
|
||||
public void setStudyInclusionRequests(List<StudyEnrollmentRecommendation> value) { this.studyInclusionRequests = value; }
|
||||
|
||||
@JsonProperty("therapies")
|
||||
public List<Therapy> getTherapies() { return therapies; }
|
||||
@JsonProperty("therapies")
|
||||
public void setTherapies(List<Therapy> value) { this.therapies = value; }
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public class ProteinExpressionResult {
|
||||
private CodingProteinExpressionIcScore icScore;
|
||||
private String id;
|
||||
private Reference patient;
|
||||
private Coding protein;
|
||||
private CodingProteinExpressionTcScore tcScore;
|
||||
private Long tpsScore;
|
||||
private CodingProteinExpressionResult value;
|
||||
|
||||
@JsonProperty("icScore")
|
||||
public CodingProteinExpressionIcScore getIcScore() { return icScore; }
|
||||
@JsonProperty("icScore")
|
||||
public void setIcScore(CodingProteinExpressionIcScore value) { this.icScore = value; }
|
||||
|
||||
@JsonProperty("id")
|
||||
public String getId() { return id; }
|
||||
@JsonProperty("id")
|
||||
public void setId(String value) { this.id = value; }
|
||||
|
||||
@JsonProperty("patient")
|
||||
public Reference getPatient() { return patient; }
|
||||
@JsonProperty("patient")
|
||||
public void setPatient(Reference value) { this.patient = value; }
|
||||
|
||||
@JsonProperty("protein")
|
||||
public Coding getProtein() { return protein; }
|
||||
@JsonProperty("protein")
|
||||
public void setProtein(Coding value) { this.protein = value; }
|
||||
|
||||
@JsonProperty("tcScore")
|
||||
public CodingProteinExpressionTcScore getTcScore() { return tcScore; }
|
||||
@JsonProperty("tcScore")
|
||||
public void setTcScore(CodingProteinExpressionTcScore value) { this.tcScore = value; }
|
||||
|
||||
@JsonProperty("tpsScore")
|
||||
public Long getTpsScore() { return tpsScore; }
|
||||
@JsonProperty("tpsScore")
|
||||
public void setTpsScore(Long value) { this.tpsScore = value; }
|
||||
|
||||
@JsonProperty("value")
|
||||
public CodingProteinExpressionResult getValue() { return value; }
|
||||
@JsonProperty("value")
|
||||
public void setValue(CodingProteinExpressionResult value) { this.value = value; }
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public enum ProteinExpressionResultCode {
|
||||
EXP, NOT_EXP, CODE_1_PLUS, CODE_2_PLUS, CODE_3_PLUS, UNKNOWN;
|
||||
|
||||
@JsonValue
|
||||
public String toValue() {
|
||||
switch (this) {
|
||||
case EXP: return "exp";
|
||||
case NOT_EXP: return "not-exp";
|
||||
case CODE_1_PLUS: return "1+";
|
||||
case CODE_2_PLUS: return "2+";
|
||||
case CODE_3_PLUS: return "3+";
|
||||
case UNKNOWN: return "unknown";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static ProteinExpressionResultCode forValue(String value) throws IOException {
|
||||
switch (value) {
|
||||
case "exp":
|
||||
return EXP;
|
||||
case "not-exp":
|
||||
return NOT_EXP;
|
||||
case "1+":
|
||||
return CODE_1_PLUS;
|
||||
case "2+":
|
||||
return CODE_2_PLUS;
|
||||
case "3+":
|
||||
return CODE_3_PLUS;
|
||||
case "unknown":
|
||||
return UNKNOWN;
|
||||
}
|
||||
throw new IOException("Cannot deserialize PurpleCode");
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@ package dev.pcvolkmer.mv64e.mtb;
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public enum FluffyCode {
|
||||
public enum RecistCode {
|
||||
CR, MR, NA, NYA, PD, PR, SD;
|
||||
|
||||
@JsonValue
|
||||
@ -21,7 +21,7 @@ public enum FluffyCode {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static FluffyCode forValue(String value) throws IOException {
|
||||
public static RecistCode forValue(String value) throws IOException {
|
||||
switch (value) {
|
||||
case "CR":
|
||||
return CR;
|
||||
@ -38,6 +38,6 @@ public enum FluffyCode {
|
||||
case "SD":
|
||||
return SD;
|
||||
}
|
||||
throw new IOException("Cannot deserialize FluffyCode");
|
||||
throw new IOException("Cannot deserialize RecistCode");
|
||||
}
|
||||
}
|
43
src/main/java/dev/pcvolkmer/mv64e/mtb/TcScoreCode.java
Normal file
43
src/main/java/dev/pcvolkmer/mv64e/mtb/TcScoreCode.java
Normal file
@ -0,0 +1,43 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
|
||||
public enum TcScoreCode {
|
||||
CODE_0, CODE_1, CODE_2, CODE_3, CODE_4, CODE_5, CODE_6;
|
||||
|
||||
@JsonValue
|
||||
public String toValue() {
|
||||
switch (this) {
|
||||
case CODE_0: return "0";
|
||||
case CODE_1: return "1";
|
||||
case CODE_2: return "2";
|
||||
case CODE_3: return "3";
|
||||
case CODE_4: return "4";
|
||||
case CODE_5: return "5";
|
||||
case CODE_6: return "6";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public static TcScoreCode forValue(String value) throws IOException {
|
||||
switch (value) {
|
||||
case "0":
|
||||
return CODE_0;
|
||||
case "1":
|
||||
return CODE_1;
|
||||
case "2":
|
||||
return CODE_2;
|
||||
case "3":
|
||||
return CODE_3;
|
||||
case "4":
|
||||
return CODE_4;
|
||||
case "5":
|
||||
return CODE_5;
|
||||
case "6":
|
||||
return CODE_6;
|
||||
}
|
||||
throw new IOException("Cannot deserialize TcScoreCode");
|
||||
}
|
||||
}
|
13
src/main/java/dev/pcvolkmer/mv64e/mtb/Therapy.java
Normal file
13
src/main/java/dev/pcvolkmer/mv64e/mtb/Therapy.java
Normal file
@ -0,0 +1,13 @@
|
||||
package dev.pcvolkmer.mv64e.mtb;
|
||||
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
public class Therapy {
|
||||
private List<MTBMedicationTherapy> history;
|
||||
|
||||
@JsonProperty("history")
|
||||
public List<MTBMedicationTherapy> getHistory() { return history; }
|
||||
@JsonProperty("history")
|
||||
public void setHistory(List<MTBMedicationTherapy> value) { this.history = value; }
|
||||
}
|
@ -4,13 +4,14 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ConverterTest {
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
class ConverterTest {
|
||||
|
||||
@Test
|
||||
void shouldDeserializeJsonString() throws IOException {
|
||||
var ressource = getClass().getClassLoader().getResource("mv64e-mtb-fake-patient.json");
|
||||
|
||||
Converter.fromJsonString(new String(ressource.openStream().readAllBytes()));
|
||||
assertNotNull(Converter.fromJsonString(new String(ressource.openStream().readAllBytes())));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user