Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 832af4c

Browse files
SORMAS-Foundation#3957 Add typing ID to specific pathogen test types (SORMAS-Foundation#4232)
* Add basic event generator for devmode SORMAS-Foundation#4185 * Revert "Add basic event generator for devmode SORMAS-Foundation#4185" This reverts commit 0b75f28. * Add new pathogen test type, add typing id SORMAS-Foundation#3957 * Add typing ID to app SORMAS-Foundation#3957 * Add i18n translation SORMAS-Foundation#3957 * Add conditions to typing id display in app SORMAS-Foundation#3957 * Revert "Add conditions to typing id display in app SORMAS-Foundation#3957" This reverts commit 079b3aa. * Fix app display condition for typing id SORMAS-Foundation#3957 * Add basic event generator for devmode SORMAS-Foundation#4185 * Revert "Add basic event generator for devmode SORMAS-Foundation#4185" This reverts commit 0b75f28. * Merge development into feature-3957-pathogen-test-typingid * Fix Formatting SORMAS-Foundation#3957
1 parent 3daa221 commit 832af4c

15 files changed

Lines changed: 80 additions & 2 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ public interface Captions {
12201220
String PathogenTest_testResultVerified = "PathogenTest.testResultVerified";
12211221
String PathogenTest_testType = "PathogenTest.testType";
12221222
String PathogenTest_testTypeText = "PathogenTest.testTypeText";
1223+
String PathogenTest_typingId = "PathogenTest.typingId";
12231224
String pathogenTestNewResult = "pathogenTestNewResult";
12241225
String pathogenTestNewTest = "pathogenTestNewTest";
12251226
String PathogenTests = "PathogenTests";

sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class PathogenTestDto extends PseudonymizableDto {
3939
public static final String SAMPLE = "sample";
4040
public static final String TESTED_DISEASE = "testedDisease";
4141
public static final String TESTED_DISEASE_DETAILS = "testedDiseaseDetails";
42+
public static final String TYPING_ID = "typingId";
4243
public static final String TEST_TYPE = "testType";
4344
public static final String TEST_TYPE_TEXT = "testTypeText";
4445
public static final String TEST_DATE_TIME = "testDateTime";
@@ -57,6 +58,7 @@ public class PathogenTestDto extends PseudonymizableDto {
5758
@Required
5859
private Disease testedDisease;
5960
private String testedDiseaseDetails;
61+
private String typingId;
6062
@Required
6163
private PathogenTestType testType;
6264
@SensitiveData
@@ -133,6 +135,14 @@ public void setTestedDiseaseDetails(String testedDiseaseDetails) {
133135
this.testedDiseaseDetails = testedDiseaseDetails;
134136
}
135137

138+
public String getTypingId() {
139+
return typingId;
140+
}
141+
142+
public void setTypingId(String typingId) {
143+
this.typingId = typingId;
144+
}
145+
136146
public PathogenTestType getTestType() {
137147
return testType;
138148
}

sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public enum PathogenTestType {
4141
LATEX_AGGLUTINATION,
4242
CQ_VALUE_DETECTION,
4343
SEQUENCING,
44+
DNA_MICROARRAY,
4445
OTHER;
4546

4647
public String toString() {

sormas-api/src/main/resources/captions.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,7 @@ PathogenTest.testType=Type of test
13391339
PathogenTest.testTypeText=Specify test details
13401340
PathogenTest.testedDisease=Tested disease
13411341
PathogenTest.testedDiseaseDetails=Tested disease name
1342+
PathogenTest.typingId=Typing ID
13421343
PathogenTest.serotype=Serotype
13431344
PathogenTest.cqValue=CQ/CT Value
13441345

sormas-api/src/main/resources/captions_de-DE.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@ PathogenTest.testType=Art des Tests
13291329
PathogenTest.testTypeText=Testdetails angeben
13301330
PathogenTest.testedDisease=Getestete Krankheit
13311331
PathogenTest.testedDiseaseDetails=Name der getesteten Krankheit
1332+
PathogenTest.typingId=Typisierungs ID
13321333
PathogenTest.serotype=Serotyp
13331334
PathogenTest.cqValue=CQ/CT Wert
13341335

sormas-api/src/main/resources/enum.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ PathogenTestType.ANTIGEN_DETECTION = Antigen detection test
733733
PathogenTestType.CULTURE = Culture
734734
PathogenTestType.DENGUE_FEVER_ANTIBODIES = Dengue fever neutralizing antibodies
735735
PathogenTestType.DENGUE_FEVER_IGM = Dengue fever IgM serum antibody
736+
PathogenTestType.DNA_MICROARRAY = DNA Microarray
736737
PathogenTestType.HISTOPATHOLOGY = Histopathology
737738
PathogenTestType.IGG_SERUM_ANTIBODY = IgG serum antibody
738739
PathogenTestType.IGM_SERUM_ANTIBODY = IgM serum antibody

sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
153153
public static final String DATABASE_NAME = "sormas.db";
154154
// any time you make changes to your database objects, you may have to increase the database version
155155

156-
public static final int DATABASE_VERSION = 267;
156+
public static final int DATABASE_VERSION = 268;
157157

158158
private static DatabaseHelper instance = null;
159159

@@ -1910,6 +1910,10 @@ public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int
19101910
getDao(Case.class).executeRaw(
19111911
"ALTER TABLE cases ADD COLUMN diseaseVariant_id bigint REFERENCES diseaseVariant(id);");
19121912

1913+
case 267:
1914+
currentVersion = 267;
1915+
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN typingId text;");
1916+
19131917
// ATTENTION: break should only be done after last version
19141918
break;
19151919

sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ public class PathogenTest extends PseudonymizableAdo {
6464
@Column(length = COLUMN_LENGTH_DEFAULT)
6565
private String testedDiseaseDetails;
6666

67+
@Column
68+
private String typingId;
69+
6770
@Enumerated(EnumType.STRING)
6871
@Column
6972
private PathogenTestResultType testResult;
@@ -127,6 +130,14 @@ public void setTestedDiseaseDetails(String testedDiseaseDetails) {
127130
this.testedDiseaseDetails = testedDiseaseDetails;
128131
}
129132

133+
public String getTypingId() {
134+
return typingId;
135+
}
136+
137+
public void setTypingId(String typingId) {
138+
this.typingId = typingId;
139+
}
140+
130141
public PathogenTestResultType getTestResult() {
131142
return testResult;
132143
}

sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTestDtoHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ protected void fillInnerFromDto(PathogenTest target, PathogenTestDto source) {
6666
target.setTestTypeText(source.getTestTypeText());
6767
target.setTestedDisease(source.getTestedDisease());
6868
target.setTestedDiseaseDetails(source.getTestedDiseaseDetails());
69+
target.setTypingId(source.getTypingId());
6970
target.setTestResultVerified(source.getTestResultVerified());
7071
target.setTestResultText(source.getTestResultText());
7172
target.setFourFoldIncreaseAntibodyTiter(source.isFourFoldIncreaseAntibodyTiter());
@@ -92,6 +93,7 @@ protected void fillInnerFromAdo(PathogenTestDto target, PathogenTest source) {
9293
target.setTestTypeText(source.getTestTypeText());
9394
target.setTestedDisease(source.getTestedDisease());
9495
target.setTestedDiseaseDetails(source.getTestedDiseaseDetails());
96+
target.setTypingId(source.getTypingId());
9597

9698
if (source.getLab() != null) {
9799
Facility lab = DatabaseHelper.getFacilityDao().queryForId(source.getLab().getId());

sormas-app/app/src/main/res/layout/fragment_pathogen_test_edit_layout.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@
8383
app:required="true"
8484
app:value="@={data.testedDiseaseDetails}"/>
8585

86+
<de.symeda.sormas.app.component.controls.ControlTextEditField
87+
android:id="@+id/pathogenTest_typingId"
88+
style="@style/ControlSingleColumnStyle"
89+
app:dependencyParentField="@{pathogenTestTestType}"
90+
app:dependencyParentValue="@{PathogenTestType.DNA_MICROARRAY}"
91+
app:dependencyParentValue2="@{PathogenTestType.PCR_RT_PCR}"
92+
app:dependencyParentValue3="@{PathogenTestType.SEQUENCING}"
93+
app:value="@={data.typingId}"/>
94+
8695
<de.symeda.sormas.app.component.controls.ControlDateTimeField
8796
android:id="@+id/pathogenTest_testDateTime"
8897
app:dateHint="@string/caption_date_of_sampling"

0 commit comments

Comments
 (0)