From 263715c24d638e63aa9d05d253c1eb4c39ecdee2 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Tue, 24 Dec 2024 13:28:56 +0100 Subject: [PATCH] Add IHC report and Therapies --- .../dev/pcvolkmer/mv64e/mtb/CodingEcog.java | 6 +- .../mtb/CodingProteinExpressionIcScore.java | 30 ++++++++++ .../mtb/CodingProteinExpressionResult.java | 30 ++++++++++ .../mtb/CodingProteinExpressionTcScore.java | 30 ++++++++++ .../dev/pcvolkmer/mv64e/mtb/CodingRecist.java | 6 +- .../mtb/{PurpleCode.java => EcogCode.java} | 6 +- .../dev/pcvolkmer/mv64e/mtb/ICScoreCode.java | 34 +++++++++++ .../dev/pcvolkmer/mv64e/mtb/IHCReport.java | 58 +++++++++++++++++++ .../dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java | 48 +++++++++++++++ .../mv64e/mtb/MTBMedicationTherapy.java | 6 +- .../java/dev/pcvolkmer/mv64e/mtb/Mtb.java | 12 ++++ .../mv64e/mtb/ProteinExpressionResult.java | 48 +++++++++++++++ .../mtb/ProteinExpressionResultCode.java | 40 +++++++++++++ .../mtb/{FluffyCode.java => RecistCode.java} | 6 +- .../dev/pcvolkmer/mv64e/mtb/TcScoreCode.java | 43 ++++++++++++++ .../java/dev/pcvolkmer/mv64e/mtb/Therapy.java | 13 +++++ .../pcvolkmer/mv64e/mtb/ConverterTest.java | 7 ++- 17 files changed, 405 insertions(+), 18 deletions(-) create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionIcScore.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionResult.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionTcScore.java rename src/main/java/dev/pcvolkmer/mv64e/mtb/{PurpleCode.java => EcogCode.java} (82%) create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/ICScoreCode.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/IHCReport.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResult.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResultCode.java rename src/main/java/dev/pcvolkmer/mv64e/mtb/{FluffyCode.java => RecistCode.java} (85%) create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/TcScoreCode.java create mode 100644 src/main/java/dev/pcvolkmer/mv64e/mtb/Therapy.java diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingEcog.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingEcog.java index 956717a..22fc01a 100644 --- a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingEcog.java +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingEcog.java @@ -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; } diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionIcScore.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionIcScore.java new file mode 100644 index 0000000..fb10972 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionIcScore.java @@ -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; } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionResult.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionResult.java new file mode 100644 index 0000000..9ed9ac8 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionResult.java @@ -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; } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionTcScore.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionTcScore.java new file mode 100644 index 0000000..ec33755 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingProteinExpressionTcScore.java @@ -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; } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingRecist.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingRecist.java index 67db26b..c05c8d0 100644 --- a/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingRecist.java +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/CodingRecist.java @@ -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; } diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/PurpleCode.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/EcogCode.java similarity index 82% rename from src/main/java/dev/pcvolkmer/mv64e/mtb/PurpleCode.java rename to src/main/java/dev/pcvolkmer/mv64e/mtb/EcogCode.java index 368f39d..b32991c 100644 --- a/src/main/java/dev/pcvolkmer/mv64e/mtb/PurpleCode.java +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/EcogCode.java @@ -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"); } } diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/ICScoreCode.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/ICScoreCode.java new file mode 100644 index 0000000..0122265 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/ICScoreCode.java @@ -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"); + } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/IHCReport.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/IHCReport.java new file mode 100644 index 0000000..722dee6 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/IHCReport.java @@ -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 msiMmrResults; + private Reference patient; + private List 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 getMsiMmrResults() { return msiMmrResults; } + @JsonProperty("msiMmrResults") + public void setMsiMmrResults(List 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 getProteinExpressionResults() { return proteinExpressionResults; } + @JsonProperty("proteinExpressionResults") + public void setProteinExpressionResults(List value) { this.proteinExpressionResults = value; } + + @JsonProperty("specimen") + public Reference getSpecimen() { return specimen; } + @JsonProperty("specimen") + public void setSpecimen(Reference value) { this.specimen = value; } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java new file mode 100644 index 0000000..5311eb6 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/MSIMmrResult.java @@ -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; } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/MTBMedicationTherapy.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/MTBMedicationTherapy.java index d8cacd0..265cf3d 100644 --- a/src/main/java/dev/pcvolkmer/mv64e/mtb/MTBMedicationTherapy.java +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/MTBMedicationTherapy.java @@ -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; } diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/Mtb.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/Mtb.java index 9a8ae51..3b9baab 100644 --- a/src/main/java/dev/pcvolkmer/mv64e/mtb/Mtb.java +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/Mtb.java @@ -14,6 +14,7 @@ public class Mtb { private List guidelineProcedures; private List guidelineTherapies; private List histologyReports; + private List ihcReports; private List molecularTherapies; private List ngsReports; private MtbPatient patient; @@ -22,6 +23,7 @@ public class Mtb { private List responses; private List specimens; private List studyInclusionRequests; + private List therapies; @JsonProperty("carePlans") public List getCarePlans() { return carePlans; } @@ -73,6 +75,11 @@ public class Mtb { @JsonProperty("histologyReports") public void setHistologyReports(List value) { this.histologyReports = value; } + @JsonProperty("ihcReports") + public List getIhcReports() { return ihcReports; } + @JsonProperty("ihcReports") + public void setIhcReports(List value) { this.ihcReports = value; } + @JsonProperty("molecularTherapies") public List getMolecularTherapies() { return molecularTherapies; } @JsonProperty("molecularTherapies") @@ -112,4 +119,9 @@ public class Mtb { public List getStudyInclusionRequests() { return studyInclusionRequests; } @JsonProperty("studyInclusionRequests") public void setStudyInclusionRequests(List value) { this.studyInclusionRequests = value; } + + @JsonProperty("therapies") + public List getTherapies() { return therapies; } + @JsonProperty("therapies") + public void setTherapies(List value) { this.therapies = value; } } diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResult.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResult.java new file mode 100644 index 0000000..e004417 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResult.java @@ -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; } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResultCode.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResultCode.java new file mode 100644 index 0000000..2348bdd --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/ProteinExpressionResultCode.java @@ -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"); + } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/FluffyCode.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/RecistCode.java similarity index 85% rename from src/main/java/dev/pcvolkmer/mv64e/mtb/FluffyCode.java rename to src/main/java/dev/pcvolkmer/mv64e/mtb/RecistCode.java index 09cade6..702e551 100644 --- a/src/main/java/dev/pcvolkmer/mv64e/mtb/FluffyCode.java +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/RecistCode.java @@ -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"); } } diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/TcScoreCode.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/TcScoreCode.java new file mode 100644 index 0000000..9024092 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/TcScoreCode.java @@ -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"); + } +} diff --git a/src/main/java/dev/pcvolkmer/mv64e/mtb/Therapy.java b/src/main/java/dev/pcvolkmer/mv64e/mtb/Therapy.java new file mode 100644 index 0000000..78fe4c4 --- /dev/null +++ b/src/main/java/dev/pcvolkmer/mv64e/mtb/Therapy.java @@ -0,0 +1,13 @@ +package dev.pcvolkmer.mv64e.mtb; + +import com.fasterxml.jackson.annotation.*; +import java.util.List; + +public class Therapy { + private List history; + + @JsonProperty("history") + public List getHistory() { return history; } + @JsonProperty("history") + public void setHistory(List value) { this.history = value; } +} diff --git a/src/test/java/dev/pcvolkmer/mv64e/mtb/ConverterTest.java b/src/test/java/dev/pcvolkmer/mv64e/mtb/ConverterTest.java index efbc36e..518ac4d 100644 --- a/src/test/java/dev/pcvolkmer/mv64e/mtb/ConverterTest.java +++ b/src/test/java/dev/pcvolkmer/mv64e/mtb/ConverterTest.java @@ -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()))); } }